@joeyshi12/casper 0.16.0 → 0.17.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.
- package/README.md +39 -108
- package/dist/mcp.js +1 -1
- package/dist/server.js +1092 -156
- package/dist/web/assets/{abnfDiagram-N423BO3Z-DQdd062N.js → abnfDiagram-N423BO3Z-Bo2zpD_r.js} +1 -1
- package/dist/web/assets/{arc-WhOJ_KR1.js → arc-eMfj-v5r.js} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-3zZgBQZT.js → architectureDiagram-T3A2C74G-SMny_PQB.js} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-CW9mWWLl.js → blockDiagram-VBNYF7ZC-DSEqDPwv.js} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-xXmfR_aG.js → c4Diagram-5PPSVZJV-CpqtaVod.js} +1 -1
- package/dist/web/assets/channel-BsxsiUCc.js +1 -0
- package/dist/web/assets/{chunk-2GRJ4B5K-CuCN8EG_.js → chunk-2GRJ4B5K-AuFfmAbN.js} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-BC-h61jv.js → chunk-2Q5K7J3B-iOn5T_gD.js} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-BqZ4ICSN.js → chunk-5RXB4S5H-4T8n_Vjj.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-_EcX9Eg6.js → chunk-5VM5RSS4-BXZGGB8b.js} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-Rjg4xt7f.js → chunk-6Q2QTUOP-CaHKdpZm.js} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-CllNzjfD.js → chunk-GF5L2VYU-JzGg4vgu.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-Cc24s09e.js → chunk-JWPE2WC7-CsXwzKxD.js} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-DYClY3b3.js → chunk-KBJHAD2P-4iRbBEYU.js} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-C5PSe7M_.js → chunk-RYQCIY6F-D-VbfyMB.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-DK8-XmXo.js → chunk-XXDRQBXY-CeFbm4g1.js} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-CRUWBeef.js +1 -0
- package/dist/web/assets/classDiagram-v2-OCEON4UE-CRUWBeef.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-Dxs4GA2q.js → cose-bilkent-JH36ORCC-CYNfxa8A.js} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-kzjViLcF.js → cynefin-VYW2F7L2-rvO1KlAd.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-B9zBzt3B.js → cynefinDiagram-MW4NZA55-DvzcG3NL.js} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-BNwMkCZi.js → dagre-VZM6K2ZE-BgutGA8k.js} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-DpIoQsS7.js → diagram-7IWD3JNH-BoLPEgBs.js} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-BKWdzhKi.js → diagram-B4RE2ZJO-BaaHgQLy.js} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-DBbKFigX.js → diagram-LBJQPF4R-Bc7jkgiW.js} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-B7qLPRw9.js → diagram-Q27KOJAE-p311g83v.js} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-DVncy6q5.js → diagram-UB23O5K3-ALwvcWzK.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-B9rA3ylb.js → ebnfDiagram-BXEA7PRR-DveTtKRe.js} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-BExDcOc7.js → erDiagram-JOGREHBK-D3kM5uf0.js} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-B1xPLh9u.js → flowDiagram-UKHOOZJN-h_YgCdts.js} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-BYS5NkM6.js → ganttDiagram-PKOTCBZU-DpMVjZz3.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CN4An7lt.js → gitGraphDiagram-DS77QQ5N-OJ0-BsVV.js} +1 -1
- package/dist/web/assets/index-BYjBvJ2T.css +1 -0
- package/dist/web/assets/index-C0MiltSe.js +245 -0
- package/dist/web/assets/{index-BuQTY976.js → index-DHJZ0QFt.js} +1 -1
- package/dist/web/assets/{infoDiagram-6WML65LV-sk97M0G1.js → infoDiagram-6WML65LV-C3dDMfD2.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-BzW2rVh6.js → ishikawaDiagram-WSZJBQD7-QSccwWZc.js} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-iaCo98OS.js → journeyDiagram-NVQOT4AX-BBse3ziF.js} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-Ce38xzYm.js → kanban-definition-27J2QSJJ-DrbZwvww.js} +1 -1
- package/dist/web/assets/{linear-BoUX9N6W.js → linear-DSPm6cs7.js} +1 -1
- package/dist/web/assets/{mermaid.core-CC54dZcH.js → mermaid.core-DXBmt4hx.js} +4 -4
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-BxRXpNJ-.js → mindmap-definition-FAOFIHXS-DnF7VGZ2.js} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-Cg0-J9c8.js → pegDiagram-VL7TDLO6-DU79M4ax.js} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-DUjXAJq4.js → pieDiagram-7S7Q4E2Y-D_kGXiwY.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-q1HsW0pP.js → quadrantDiagram-CIZ2JOQS-Sy59mKJK.js} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-ats1_veK.js → railroadDiagram-AXF67PYL-i-7HN_g3.js} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-CV2_uFpI.js → requirementDiagram-LRYGKXZP-MbXlWZ5N.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-BwyC8qNn.js → sankeyDiagram-W5VNT64P-BhU2pRtd.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-72yj0uCA.js → sequenceDiagram-SI44F4Z6-ju70uzxa.js} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CV7PeUrN.js → sizeCapture-X5ZJPWSS-Oy3UrbXL.js} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-B08_WgjO.js → stateDiagram-OKZ733FA-DzSL7BOW.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-TGjHDp18.js +1 -0
- package/dist/web/assets/{swimlanes-SLNWSIFB-DnBKpTQH.js → swimlanes-SLNWSIFB-a_3Pai9c.js} +2 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-Dq3BU0bp.js +8 -0
- package/dist/web/assets/{timeline-definition-Z64GVDOM-BAoT5Fu8.js → timeline-definition-Z64GVDOM-CdYiXKKc.js} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-VLzfwvza.js → vennDiagram-T6HMQDX7-CNquHYyi.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-QaCRHB2e.js → wardleyDiagram-T6FBY63Y-D-dCSbF5.js} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-DCUP6k1x.js → xychartDiagram-ELKLHX3M-BZCQNI1R.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/web/assets/channel-QybFlytR.js +0 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-CcJ6l3H0.js +0 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-CcJ6l3H0.js +0 -1
- package/dist/web/assets/index-BwBYAAwi.js +0 -244
- package/dist/web/assets/index-CRxbcY2R.css +0 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-80B2GltS.js +0 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CeWA7IPZ.js +0 -8
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DHJZ0QFt.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ay=Object.defineProperty;var Iy=(e,t,n)=>t in e?Ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>Iy(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=n(a);fetch(a.href,u)}})();function pd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc={exports:{}},Is={},rc={exports:{}},De={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Bp;function Ly(){if(Bp)return De;Bp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),E=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=E&&P[E]||P["@@iterator"],typeof P=="function"?P:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,v={};function D(P,G,w){this.props=P,this.context=G,this.refs=v,this.updater=w||x}D.prototype.isReactComponent={},D.prototype.setState=function(P,G){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,G,"setState")},D.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function I(){}I.prototype=D.prototype;function R(P,G,w){this.props=P,this.context=G,this.refs=v,this.updater=w||x}var H=R.prototype=new I;H.constructor=R,C(H,D.prototype),H.isPureReactComponent=!0;var W=Array.isArray,q=Object.prototype.hasOwnProperty,B={current:null},ie={key:!0,ref:!0,__self:!0,__source:!0};function Z(P,G,w){var me,Se={},_e=null,Ue=null;if(G!=null)for(me in G.ref!==void 0&&(Ue=G.ref),G.key!==void 0&&(_e=""+G.key),G)q.call(G,me)&&!ie.hasOwnProperty(me)&&(Se[me]=G[me]);var Re=arguments.length-2;if(Re===1)Se.children=w;else if(1<Re){for(var ze=Array(Re),ot=0;ot<Re;ot++)ze[ot]=arguments[ot+2];Se.children=ze}if(P&&P.defaultProps)for(me in Re=P.defaultProps,Re)Se[me]===void 0&&(Se[me]=Re[me]);return{$$typeof:e,type:P,key:_e,ref:Ue,props:Se,_owner:B.current}}function ce(P,G){return{$$typeof:e,type:P.type,key:G,ref:P.ref,props:P.props,_owner:P._owner}}function M(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function pe(P){var G={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(w){return G[w]})}var V=/\/+/g;function de(P,G){return typeof P=="object"&&P!==null&&P.key!=null?pe(""+P.key):G.toString(36)}function he(P,G,w,me,Se){var _e=typeof P;(_e==="undefined"||_e==="boolean")&&(P=null);var Ue=!1;if(P===null)Ue=!0;else switch(_e){case"string":case"number":Ue=!0;break;case"object":switch(P.$$typeof){case e:case t:Ue=!0}}if(Ue)return Ue=P,Se=Se(Ue),P=me===""?"."+de(Ue,0):me,W(Se)?(w="",P!=null&&(w=P.replace(V,"$&/")+"/"),he(Se,G,w,"",function(ot){return ot})):Se!=null&&(M(Se)&&(Se=ce(Se,w+(!Se.key||Ue&&Ue.key===Se.key?"":(""+Se.key).replace(V,"$&/")+"/")+P)),G.push(Se)),1;if(Ue=0,me=me===""?".":me+":",W(P))for(var Re=0;Re<P.length;Re++){_e=P[Re];var ze=me+de(_e,Re);Ue+=he(_e,G,w,ze,Se)}else if(ze=b(P),typeof ze=="function")for(P=ze.call(P),Re=0;!(_e=P.next()).done;)_e=_e.value,ze=me+de(_e,Re++),Ue+=he(_e,G,w,ze,Se);else if(_e==="object")throw G=String(P),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return Ue}function re(P,G,w){if(P==null)return P;var me=[],Se=0;return he(P,me,"","",function(_e){return G.call(w,_e,Se++)}),me}function X(P){if(P._status===-1){var G=P._result;G=G(),G.then(function(w){(P._status===0||P._status===-1)&&(P._status=1,P._result=w)},function(w){(P._status===0||P._status===-1)&&(P._status=2,P._result=w)}),P._status===-1&&(P._status=0,P._result=G)}if(P._status===1)return P._result.default;throw P._result}var ye={current:null},J={transition:null},oe={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:J,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:re,forEach:function(P,G,w){re(P,function(){G.apply(this,arguments)},w)},count:function(P){var G=0;return re(P,function(){G++}),G},toArray:function(P){return re(P,function(G){return G})||[]},only:function(P){if(!M(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},De.Component=D,De.Fragment=n,De.Profiler=a,De.PureComponent=R,De.StrictMode=i,De.Suspense=f,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,De.act=S,De.cloneElement=function(P,G,w){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var me=C({},P.props),Se=P.key,_e=P.ref,Ue=P._owner;if(G!=null){if(G.ref!==void 0&&(_e=G.ref,Ue=B.current),G.key!==void 0&&(Se=""+G.key),P.type&&P.type.defaultProps)var Re=P.type.defaultProps;for(ze in G)q.call(G,ze)&&!ie.hasOwnProperty(ze)&&(me[ze]=G[ze]===void 0&&Re!==void 0?Re[ze]:G[ze])}var ze=arguments.length-2;if(ze===1)me.children=w;else if(1<ze){Re=Array(ze);for(var ot=0;ot<ze;ot++)Re[ot]=arguments[ot+2];me.children=Re}return{$$typeof:e,type:P.type,key:Se,ref:_e,props:me,_owner:Ue}},De.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:u,_context:P},P.Consumer=P},De.createElement=Z,De.createFactory=function(P){var G=Z.bind(null,P);return G.type=P,G},De.createRef=function(){return{current:null}},De.forwardRef=function(P){return{$$typeof:c,render:P}},De.isValidElement=M,De.lazy=function(P){return{$$typeof:T,_payload:{_status:-1,_result:P},_init:X}},De.memo=function(P,G){return{$$typeof:p,type:P,compare:G===void 0?null:G}},De.startTransition=function(P){var G=J.transition;J.transition={};try{P()}finally{J.transition=G}},De.unstable_act=S,De.useCallback=function(P,G){return ye.current.useCallback(P,G)},De.useContext=function(P){return ye.current.useContext(P)},De.useDebugValue=function(){},De.useDeferredValue=function(P){return ye.current.useDeferredValue(P)},De.useEffect=function(P,G){return ye.current.useEffect(P,G)},De.useId=function(){return ye.current.useId()},De.useImperativeHandle=function(P,G,w){return ye.current.useImperativeHandle(P,G,w)},De.useInsertionEffect=function(P,G){return ye.current.useInsertionEffect(P,G)},De.useLayoutEffect=function(P,G){return ye.current.useLayoutEffect(P,G)},De.useMemo=function(P,G){return ye.current.useMemo(P,G)},De.useReducer=function(P,G,w){return ye.current.useReducer(P,G,w)},De.useRef=function(P){return ye.current.useRef(P)},De.useState=function(P){return ye.current.useState(P)},De.useSyncExternalStore=function(P,G,w){return ye.current.useSyncExternalStore(P,G,w)},De.useTransition=function(){return ye.current.useTransition()},De.version="18.3.1",De}var Up;function md(){return Up||(Up=1,rc.exports=Ly()),rc.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var Hp;function Ry(){if(Hp)return Is;Hp=1;var e=md(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,p){var T,E={},b=null,x=null;p!==void 0&&(b=""+p),f.key!==void 0&&(b=""+f.key),f.ref!==void 0&&(x=f.ref);for(T in f)i.call(f,T)&&!u.hasOwnProperty(T)&&(E[T]=f[T]);if(c&&c.defaultProps)for(T in f=c.defaultProps,f)E[T]===void 0&&(E[T]=f[T]);return{$$typeof:t,type:c,key:b,ref:x,props:E,_owner:a.current}}return Is.Fragment=n,Is.jsx=l,Is.jsxs=l,Is}var zp;function Oy(){return zp||(zp=1,nc.exports=Ry()),nc.exports}var h=Oy(),_=md();const Bs=pd(_);var _u={},ic={exports:{}},jt={},sc={exports:{}},ac={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var $p;function Dy(){return $p||($p=1,(function(e){function t(J,oe){var S=J.length;J.push(oe);e:for(;0<S;){var P=S-1>>>1,G=J[P];if(0<a(G,oe))J[P]=oe,J[S]=G,S=P;else break e}}function n(J){return J.length===0?null:J[0]}function i(J){if(J.length===0)return null;var oe=J[0],S=J.pop();if(S!==oe){J[0]=S;e:for(var P=0,G=J.length,w=G>>>1;P<w;){var me=2*(P+1)-1,Se=J[me],_e=me+1,Ue=J[_e];if(0>a(Se,S))_e<G&&0>a(Ue,Se)?(J[P]=Ue,J[_e]=S,P=_e):(J[P]=Se,J[me]=S,P=me);else if(_e<G&&0>a(Ue,S))J[P]=Ue,J[_e]=S,P=_e;else break e}}return oe}function a(J,oe){var S=J.sortIndex-oe.sortIndex;return S!==0?S:J.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],p=[],T=1,E=null,b=3,x=!1,C=!1,v=!1,D=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function H(J){for(var oe=n(p);oe!==null;){if(oe.callback===null)i(p);else if(oe.startTime<=J)i(p),oe.sortIndex=oe.expirationTime,t(f,oe);else break;oe=n(p)}}function W(J){if(v=!1,H(J),!C)if(n(f)!==null)C=!0,X(q);else{var oe=n(p);oe!==null&&ye(W,oe.startTime-J)}}function q(J,oe){C=!1,v&&(v=!1,I(Z),Z=-1),x=!0;var S=b;try{for(H(oe),E=n(f);E!==null&&(!(E.expirationTime>oe)||J&&!pe());){var P=E.callback;if(typeof P=="function"){E.callback=null,b=E.priorityLevel;var G=P(E.expirationTime<=oe);oe=e.unstable_now(),typeof G=="function"?E.callback=G:E===n(f)&&i(f),H(oe)}else i(f);E=n(f)}if(E!==null)var w=!0;else{var me=n(p);me!==null&&ye(W,me.startTime-oe),w=!1}return w}finally{E=null,b=S,x=!1}}var B=!1,ie=null,Z=-1,ce=5,M=-1;function pe(){return!(e.unstable_now()-M<ce)}function V(){if(ie!==null){var J=e.unstable_now();M=J;var oe=!0;try{oe=ie(!0,J)}finally{oe?de():(B=!1,ie=null)}}else B=!1}var de;if(typeof R=="function")de=function(){R(V)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,re=he.port2;he.port1.onmessage=V,de=function(){re.postMessage(null)}}else de=function(){D(V,0)};function X(J){ie=J,B||(B=!0,de())}function ye(J,oe){Z=D(function(){J(e.unstable_now())},oe)}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(J){J.callback=null},e.unstable_continueExecution=function(){C||x||(C=!0,X(q))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(J){switch(b){case 1:case 2:case 3:var oe=3;break;default:oe=b}var S=b;b=oe;try{return J()}finally{b=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,oe){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var S=b;b=J;try{return oe()}finally{b=S}},e.unstable_scheduleCallback=function(J,oe,S){var P=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?P+S:P):S=P,J){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=S+G,J={id:T++,callback:oe,priorityLevel:J,startTime:S,expirationTime:G,sortIndex:-1},S>P?(J.sortIndex=S,t(p,J),n(f)===null&&J===n(p)&&(v?(I(Z),Z=-1):v=!0,ye(W,S-P))):(J.sortIndex=G,t(f,J),C||x||(C=!0,X(q))),J},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(J){var oe=b;return function(){var S=b;b=oe;try{return J.apply(this,arguments)}finally{b=S}}}})(ac)),ac}var Wp;function Py(){return Wp||(Wp=1,sc.exports=Dy()),sc.exports}/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var Yp;function My(){if(Yp)return jt;Yp=1;var e=md(),t=Py();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,o=1;o<arguments.length;o++)s+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function u(r,s){l(r,s),l(r+"Capture",s)}function l(r,s){for(a[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,T={},E={};function b(r){return f.call(E,r)?!0:f.call(T,r)?!1:p.test(r)?E[r]=!0:(T[r]=!0,!1)}function x(r,s,o,d){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:o!==null?!o.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function C(r,s,o,d){if(s===null||typeof s>"u"||x(r,s,o,d))return!0;if(d)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(r,s,o,d,g,y,k){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=o,this.propertyName=r,this.type=s,this.sanitizeURL=y,this.removeEmptyString=k}var D={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){D[r]=new v(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];D[s]=new v(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){D[r]=new v(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){D[r]=new v(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){D[r]=new v(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){D[r]=new v(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){D[r]=new v(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){D[r]=new v(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){D[r]=new v(r,5,!1,r.toLowerCase(),null,!1,!1)});var I=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(I,R);D[s]=new v(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(I,R);D[s]=new v(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(I,R);D[s]=new v(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){D[r]=new v(r,1,!1,r.toLowerCase(),null,!1,!1)}),D.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){D[r]=new v(r,1,!1,r.toLowerCase(),null,!0,!0)});function H(r,s,o,d){var g=D.hasOwnProperty(s)?D[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(C(s,o,g,d)&&(o=null),d||g===null?b(s)&&(o===null?r.removeAttribute(s):r.setAttribute(s,""+o)):g.mustUseProperty?r[g.propertyName]=o===null?g.type===3?!1:"":o:(s=g.attributeName,d=g.attributeNamespace,o===null?r.removeAttribute(s):(g=g.type,o=g===3||g===4&&o===!0?"":""+o,d?r.setAttributeNS(d,s,o):r.setAttribute(s,o))))}var W=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),B=Symbol.for("react.portal"),ie=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),pe=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),J=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=J&&r[J]||r["@@iterator"],typeof r=="function"?r:null)}var S=Object.assign,P;function G(r){if(P===void 0)try{throw Error()}catch(o){var s=o.stack.trim().match(/\n( *(at )?)/);P=s&&s[1]||""}return`
|
|
35
|
+
`+P+r}var w=!1;function me(r,s){if(!r||w)return"";w=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(Y){var d=Y}Reflect.construct(r,[],s)}else{try{s.call()}catch(Y){d=Y}r.call(s.prototype)}else{try{throw Error()}catch(Y){d=Y}r()}}catch(Y){if(Y&&d&&typeof Y.stack=="string"){for(var g=Y.stack.split(`
|
|
36
|
+
`),y=d.stack.split(`
|
|
37
|
+
`),k=g.length-1,L=y.length-1;1<=k&&0<=L&&g[k]!==y[L];)L--;for(;1<=k&&0<=L;k--,L--)if(g[k]!==y[L]){if(k!==1||L!==1)do if(k--,L--,0>L||g[k]!==y[L]){var F=`
|
|
38
|
+
`+g[k].replace(" at new "," at ");return r.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",r.displayName)),F}while(1<=k&&0<=L);break}}}finally{w=!1,Error.prepareStackTrace=o}return(r=r?r.displayName||r.name:"")?G(r):""}function Se(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=me(r.type,!1),r;case 11:return r=me(r.type.render,!1),r;case 1:return r=me(r.type,!0),r;default:return""}}function _e(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case ie:return"Fragment";case B:return"Portal";case ce:return"Profiler";case Z:return"StrictMode";case de:return"Suspense";case he:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case pe:return(r.displayName||"Context")+".Consumer";case M:return(r._context.displayName||"Context")+".Provider";case V:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case re:return s=r.displayName||null,s!==null?s:_e(r.type)||"Memo";case X:s=r._payload,r=r._init;try{return _e(r(s))}catch{}}return null}function Ue(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(s);case 8:return s===Z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ze(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function ot(r){var s=ze(r)?"checked":"value",o=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var g=o.get,y=o.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(k){d=""+k,y.call(this,k)}}),Object.defineProperty(r,s,{enumerable:o.enumerable}),{getValue:function(){return d},setValue:function(k){d=""+k},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function On(r){r._valueTracker||(r._valueTracker=ot(r))}function ha(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var o=s.getValue(),d="";return r&&(d=ze(r)?r.checked?"true":"false":r.value),r=d,r!==o?(s.setValue(r),!0):!1}function ni(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}}function Wi(r,s){var o=s.checked;return S({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??r._wrapperState.initialChecked})}function Yi(r,s){var o=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;o=Re(s.value!=null?s.value:o),r._wrapperState={initialChecked:d,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Vi(r,s){s=s.checked,s!=null&&H(r,"checked",s,!1)}function ri(r,s){Vi(r,s);var o=Re(s.value),d=s.type;if(o!=null)d==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+o):r.value!==""+o&&(r.value=""+o);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?ii(r,s.type,o):s.hasOwnProperty("defaultValue")&&ii(r,s.type,Re(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function pa(r,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,o||s===r.value||(r.value=s),r.defaultValue=s}o=r.name,o!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,o!==""&&(r.name=o)}function ii(r,s,o){(s!=="number"||ni(r.ownerDocument)!==r)&&(o==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+o&&(r.defaultValue=""+o))}var qn=Array.isArray;function Qn(r,s,o,d){if(r=r.options,s){s={};for(var g=0;g<o.length;g++)s["$"+o[g]]=!0;for(o=0;o<r.length;o++)g=s.hasOwnProperty("$"+r[o].value),r[o].selected!==g&&(r[o].selected=g),g&&d&&(r[o].defaultSelected=!0)}else{for(o=""+Re(o),s=null,g=0;g<r.length;g++){if(r[g].value===o){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function qi(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function ma(r,s){var o=s.value;if(o==null){if(o=s.children,s=s.defaultValue,o!=null){if(s!=null)throw Error(n(92));if(qn(o)){if(1<o.length)throw Error(n(93));o=o[0]}s=o}s==null&&(s=""),o=s}r._wrapperState={initialValue:Re(o)}}function ga(r,s){var o=Re(s.value),d=Re(s.defaultValue);o!=null&&(o=""+o,o!==r.value&&(r.value=o),s.defaultValue==null&&r.defaultValue!==o&&(r.defaultValue=o)),d!=null&&(r.defaultValue=""+d)}function Ea(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function K(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fe(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?K(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var we,Oe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,o,d,g){MSApp.execUnsafeLocalFunction(function(){return r(s,o,d,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(we=we||document.createElement("div"),we.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=we.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function je(r,s){if(s){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=s;return}}r.textContent=s}var Tt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Dn=["Webkit","ms","Moz","O"];Object.keys(Tt).forEach(function(r){Dn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),Tt[s]=Tt[r]})});function Xt(r,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||Tt.hasOwnProperty(r)&&Tt[r]?(""+s).trim():s+"px"}function Gn(r,s){r=r.style;for(var o in s)if(s.hasOwnProperty(o)){var d=o.indexOf("--")===0,g=Xt(o,s[o],d);o==="float"&&(o="cssFloat"),d?r.setProperty(o,g):r[o]=g}}var Nr=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function yt(r,s){if(s){if(Nr[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function kn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";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 $t=null;function Eo(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var To=null,si=null,ai=null;function tf(r){if(r=ms(r)){if(typeof To!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Ua(s),To(r.stateNode,r.type,s))}}function nf(r){si?ai?ai.push(r):ai=[r]:si=r}function rf(){if(si){var r=si,s=ai;if(ai=si=null,tf(r),s)for(r=0;r<s.length;r++)tf(s[r])}}function sf(r,s){return r(s)}function af(){}var yo=!1;function uf(r,s,o){if(yo)return r(s,o);yo=!0;try{return sf(r,s,o)}finally{yo=!1,(si!==null||ai!==null)&&(af(),rf())}}function Qi(r,s){var o=r.stateNode;if(o===null)return null;var d=Ua(o);if(d===null)return null;o=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(n(231,s,typeof o));return o}var xo=!1;if(c)try{var Gi={};Object.defineProperty(Gi,"passive",{get:function(){xo=!0}}),window.addEventListener("test",Gi,Gi),window.removeEventListener("test",Gi,Gi)}catch{xo=!1}function PE(r,s,o,d,g,y,k,L,F){var Y=Array.prototype.slice.call(arguments,3);try{s.apply(o,Y)}catch(ne){this.onError(ne)}}var Ki=!1,Ta=null,ya=!1,bo=null,ME={onError:function(r){Ki=!0,Ta=r}};function FE(r,s,o,d,g,y,k,L,F){Ki=!1,Ta=null,PE.apply(ME,arguments)}function jE(r,s,o,d,g,y,k,L,F){if(FE.apply(this,arguments),Ki){if(Ki){var Y=Ta;Ki=!1,Ta=null}else throw Error(n(198));ya||(ya=!0,bo=Y)}}function wr(r){var s=r,o=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(o=s.return),r=s.return;while(r)}return s.tag===3?o:null}function of(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function lf(r){if(wr(r)!==r)throw Error(n(188))}function BE(r){var s=r.alternate;if(!s){if(s=wr(r),s===null)throw Error(n(188));return s!==r?null:r}for(var o=r,d=s;;){var g=o.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){o=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===o)return lf(g),r;if(y===d)return lf(g),s;y=y.sibling}throw Error(n(188))}if(o.return!==d.return)o=g,d=y;else{for(var k=!1,L=g.child;L;){if(L===o){k=!0,o=g,d=y;break}if(L===d){k=!0,d=g,o=y;break}L=L.sibling}if(!k){for(L=y.child;L;){if(L===o){k=!0,o=y,d=g;break}if(L===d){k=!0,d=y,o=g;break}L=L.sibling}if(!k)throw Error(n(189))}}if(o.alternate!==d)throw Error(n(190))}if(o.tag!==3)throw Error(n(188));return o.stateNode.current===o?r:s}function cf(r){return r=BE(r),r!==null?df(r):null}function df(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=df(r);if(s!==null)return s;r=r.sibling}return null}var ff=t.unstable_scheduleCallback,hf=t.unstable_cancelCallback,UE=t.unstable_shouldYield,HE=t.unstable_requestPaint,st=t.unstable_now,zE=t.unstable_getCurrentPriorityLevel,ko=t.unstable_ImmediatePriority,pf=t.unstable_UserBlockingPriority,xa=t.unstable_NormalPriority,$E=t.unstable_LowPriority,mf=t.unstable_IdlePriority,ba=null,Cn=null;function WE(r){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(ba,r,void 0,(r.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:qE,YE=Math.log,VE=Math.LN2;function qE(r){return r>>>=0,r===0?32:31-(YE(r)/VE|0)|0}var ka=64,Ca=4194304;function Xi(r){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: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Sa(r,s){var o=r.pendingLanes;if(o===0)return 0;var d=0,g=r.suspendedLanes,y=r.pingedLanes,k=o&268435455;if(k!==0){var L=k&~g;L!==0?d=Xi(L):(y&=k,y!==0&&(d=Xi(y)))}else k=o&~g,k!==0?d=Xi(k):y!==0&&(d=Xi(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=o&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)o=31-on(s),g=1<<o,d|=r[o],s&=~g;return d}function QE(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function GE(r,s){for(var o=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,y=r.pendingLanes;0<y;){var k=31-on(y),L=1<<k,F=g[k];F===-1?((L&o)===0||(L&d)!==0)&&(g[k]=QE(L,s)):F<=s&&(r.expiredLanes|=L),y&=~L}}function Co(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function gf(){var r=ka;return ka<<=1,(ka&4194240)===0&&(ka=64),r}function So(r){for(var s=[],o=0;31>o;o++)s.push(r);return s}function Ji(r,s,o){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-on(s),r[s]=o}function KE(r,s){var o=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<o;){var g=31-on(o),y=1<<g;s[g]=0,d[g]=-1,r[g]=-1,o&=~y}}function _o(r,s){var o=r.entangledLanes|=s;for(r=r.entanglements;o;){var d=31-on(o),g=1<<d;g&s|r[d]&s&&(r[d]|=s),o&=~g}}var $e=0;function Ef(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Tf,vo,yf,xf,bf,No=!1,_a=[],Kn=null,Xn=null,Jn=null,Zi=new Map,es=new Map,Zn=[],XE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function kf(r,s){switch(r){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":Zi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":es.delete(s.pointerId)}}function ts(r,s,o,d,g,y){return r===null||r.nativeEvent!==y?(r={blockedOn:s,domEventName:o,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=ms(s),s!==null&&vo(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function JE(r,s,o,d,g){switch(s){case"focusin":return Kn=ts(Kn,r,s,o,d,g),!0;case"dragenter":return Xn=ts(Xn,r,s,o,d,g),!0;case"mouseover":return Jn=ts(Jn,r,s,o,d,g),!0;case"pointerover":var y=g.pointerId;return Zi.set(y,ts(Zi.get(y)||null,r,s,o,d,g)),!0;case"gotpointercapture":return y=g.pointerId,es.set(y,ts(es.get(y)||null,r,s,o,d,g)),!0}return!1}function Cf(r){var s=Ar(r.target);if(s!==null){var o=wr(s);if(o!==null){if(s=o.tag,s===13){if(s=of(o),s!==null){r.blockedOn=s,bf(r.priority,function(){yf(o)});return}}else if(s===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function va(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var o=Ao(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);$t=d,o.target.dispatchEvent(d),$t=null}else return s=ms(o),s!==null&&vo(s),r.blockedOn=o,!1;s.shift()}return!0}function Sf(r,s,o){va(r)&&o.delete(s)}function ZE(){No=!1,Kn!==null&&va(Kn)&&(Kn=null),Xn!==null&&va(Xn)&&(Xn=null),Jn!==null&&va(Jn)&&(Jn=null),Zi.forEach(Sf),es.forEach(Sf)}function ns(r,s){r.blockedOn===s&&(r.blockedOn=null,No||(No=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ZE)))}function rs(r){function s(g){return ns(g,r)}if(0<_a.length){ns(_a[0],r);for(var o=1;o<_a.length;o++){var d=_a[o];d.blockedOn===r&&(d.blockedOn=null)}}for(Kn!==null&&ns(Kn,r),Xn!==null&&ns(Xn,r),Jn!==null&&ns(Jn,r),Zi.forEach(s),es.forEach(s),o=0;o<Zn.length;o++)d=Zn[o],d.blockedOn===r&&(d.blockedOn=null);for(;0<Zn.length&&(o=Zn[0],o.blockedOn===null);)Cf(o),o.blockedOn===null&&Zn.shift()}var ui=W.ReactCurrentBatchConfig,Na=!0;function eT(r,s,o,d){var g=$e,y=ui.transition;ui.transition=null;try{$e=1,wo(r,s,o,d)}finally{$e=g,ui.transition=y}}function tT(r,s,o,d){var g=$e,y=ui.transition;ui.transition=null;try{$e=4,wo(r,s,o,d)}finally{$e=g,ui.transition=y}}function wo(r,s,o,d){if(Na){var g=Ao(r,s,o,d);if(g===null)Vo(r,s,d,wa,o),kf(r,d);else if(JE(g,r,s,o,d))d.stopPropagation();else if(kf(r,d),s&4&&-1<XE.indexOf(r)){for(;g!==null;){var y=ms(g);if(y!==null&&Tf(y),y=Ao(r,s,o,d),y===null&&Vo(r,s,d,wa,o),y===g)break;g=y}g!==null&&d.stopPropagation()}else Vo(r,s,d,null,o)}}var wa=null;function Ao(r,s,o,d){if(wa=null,r=Eo(d),r=Ar(r),r!==null)if(s=wr(r),s===null)r=null;else if(o=s.tag,o===13){if(r=of(s),r!==null)return r;r=null}else if(o===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return wa=r,null}function _f(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zE()){case ko:return 1;case pf:return 4;case xa:case $E:return 16;case mf:return 536870912;default:return 16}default:return 16}}var er=null,Io=null,Aa=null;function vf(){if(Aa)return Aa;var r,s=Io,o=s.length,d,g="value"in er?er.value:er.textContent,y=g.length;for(r=0;r<o&&s[r]===g[r];r++);var k=o-r;for(d=1;d<=k&&s[o-d]===g[y-d];d++);return Aa=g.slice(r,1<d?1-d:void 0)}function Ia(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function La(){return!0}function Nf(){return!1}function Wt(r){function s(o,d,g,y,k){this._reactName=o,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var L in r)r.hasOwnProperty(L)&&(o=r[L],this[L]=o?o(y):y[L]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?La:Nf,this.isPropagationStopped=Nf,this}return S(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=La)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=La)},persist:function(){},isPersistent:La}),s}var oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lo=Wt(oi),is=S({},oi,{view:0,detail:0}),nT=Wt(is),Ro,Oo,ss,Ra=S({},is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Po,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!==ss&&(ss&&r.type==="mousemove"?(Ro=r.screenX-ss.screenX,Oo=r.screenY-ss.screenY):Oo=Ro=0,ss=r),Ro)},movementY:function(r){return"movementY"in r?r.movementY:Oo}}),wf=Wt(Ra),rT=S({},Ra,{dataTransfer:0}),iT=Wt(rT),sT=S({},is,{relatedTarget:0}),Do=Wt(sT),aT=S({},oi,{animationName:0,elapsedTime:0,pseudoElement:0}),uT=Wt(aT),oT=S({},oi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),lT=Wt(oT),cT=S({},oi,{data:0}),Af=Wt(cT),dT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fT={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"},hT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pT(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=hT[r])?!!s[r]:!1}function Po(){return pT}var mT=S({},is,{key:function(r){if(r.key){var s=dT[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Ia(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?fT[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Po,charCode:function(r){return r.type==="keypress"?Ia(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ia(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),gT=Wt(mT),ET=S({},Ra,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),If=Wt(ET),TT=S({},is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Po}),yT=Wt(TT),xT=S({},oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),bT=Wt(xT),kT=S({},Ra,{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}),CT=Wt(kT),ST=[9,13,27,32],Mo=c&&"CompositionEvent"in window,as=null;c&&"documentMode"in document&&(as=document.documentMode);var _T=c&&"TextEvent"in window&&!as,Lf=c&&(!Mo||as&&8<as&&11>=as),Rf=" ",Of=!1;function Df(r,s){switch(r){case"keyup":return ST.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var li=!1;function vT(r,s){switch(r){case"compositionend":return Pf(s);case"keypress":return s.which!==32?null:(Of=!0,Rf);case"textInput":return r=s.data,r===Rf&&Of?null:r;default:return null}}function NT(r,s){if(li)return r==="compositionend"||!Mo&&Df(r,s)?(r=vf(),Aa=Io=er=null,li=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Lf&&s.locale!=="ko"?null:s.data;default:return null}}var wT={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 Mf(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!wT[r.type]:s==="textarea"}function Ff(r,s,o,d){nf(d),s=Fa(s,"onChange"),0<s.length&&(o=new Lo("onChange","change",null,o,d),r.push({event:o,listeners:s}))}var us=null,os=null;function AT(r){th(r,0)}function Oa(r){var s=pi(r);if(ha(s))return r}function IT(r,s){if(r==="change")return s}var jf=!1;if(c){var Fo;if(c){var jo="oninput"in document;if(!jo){var Bf=document.createElement("div");Bf.setAttribute("oninput","return;"),jo=typeof Bf.oninput=="function"}Fo=jo}else Fo=!1;jf=Fo&&(!document.documentMode||9<document.documentMode)}function Uf(){us&&(us.detachEvent("onpropertychange",Hf),os=us=null)}function Hf(r){if(r.propertyName==="value"&&Oa(os)){var s=[];Ff(s,os,r,Eo(r)),uf(AT,s)}}function LT(r,s,o){r==="focusin"?(Uf(),us=s,os=o,us.attachEvent("onpropertychange",Hf)):r==="focusout"&&Uf()}function RT(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Oa(os)}function OT(r,s){if(r==="click")return Oa(s)}function DT(r,s){if(r==="input"||r==="change")return Oa(s)}function PT(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var ln=typeof Object.is=="function"?Object.is:PT;function ls(r,s){if(ln(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var o=Object.keys(r),d=Object.keys(s);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var g=o[d];if(!f.call(s,g)||!ln(r[g],s[g]))return!1}return!0}function zf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function $f(r,s){var o=zf(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=s&&d>=s)return{node:o,offset:s-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=zf(o)}}function Wf(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Wf(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Yf(){for(var r=window,s=ni();s instanceof r.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)r=s.contentWindow;else break;s=ni(r.document)}return s}function Bo(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function MT(r){var s=Yf(),o=r.focusedElem,d=r.selectionRange;if(s!==o&&o&&o.ownerDocument&&Wf(o.ownerDocument.documentElement,o)){if(d!==null&&Bo(o)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(r,o.value.length);else if(r=(s=o.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var g=o.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!r.extend&&y>d&&(g=d,d=y,y=g),g=$f(o,y);var k=$f(o,d);g&&k&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==k.node||r.focusOffset!==k.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),y>d?(r.addRange(s),r.extend(k.node,k.offset)):(s.setEnd(k.node,k.offset),r.addRange(s)))}}for(s=[],r=o;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<s.length;o++)r=s[o],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var FT=c&&"documentMode"in document&&11>=document.documentMode,ci=null,Uo=null,cs=null,Ho=!1;function Vf(r,s,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ho||ci==null||ci!==ni(d)||(d=ci,"selectionStart"in d&&Bo(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),cs&&ls(cs,d)||(cs=d,d=Fa(Uo,"onSelect"),0<d.length&&(s=new Lo("onSelect","select",null,s,o),r.push({event:s,listeners:d}),s.target=ci)))}function Da(r,s){var o={};return o[r.toLowerCase()]=s.toLowerCase(),o["Webkit"+r]="webkit"+s,o["Moz"+r]="moz"+s,o}var di={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionend:Da("Transition","TransitionEnd")},zo={},qf={};c&&(qf=document.createElement("div").style,"AnimationEvent"in window||(delete di.animationend.animation,delete di.animationiteration.animation,delete di.animationstart.animation),"TransitionEvent"in window||delete di.transitionend.transition);function Pa(r){if(zo[r])return zo[r];if(!di[r])return r;var s=di[r],o;for(o in s)if(s.hasOwnProperty(o)&&o in qf)return zo[r]=s[o];return r}var Qf=Pa("animationend"),Gf=Pa("animationiteration"),Kf=Pa("animationstart"),Xf=Pa("transitionend"),Jf=new Map,Zf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tr(r,s){Jf.set(r,s),u(s,[r])}for(var $o=0;$o<Zf.length;$o++){var Wo=Zf[$o],jT=Wo.toLowerCase(),BT=Wo[0].toUpperCase()+Wo.slice(1);tr(jT,"on"+BT)}tr(Qf,"onAnimationEnd"),tr(Gf,"onAnimationIteration"),tr(Kf,"onAnimationStart"),tr("dblclick","onDoubleClick"),tr("focusin","onFocus"),tr("focusout","onBlur"),tr(Xf,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ds="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(" "),UT=new Set("cancel close invalid load scroll toggle".split(" ").concat(ds));function eh(r,s,o){var d=r.type||"unknown-event";r.currentTarget=o,jE(d,s,void 0,r),r.currentTarget=null}function th(r,s){s=(s&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var k=d.length-1;0<=k;k--){var L=d[k],F=L.instance,Y=L.currentTarget;if(L=L.listener,F!==y&&g.isPropagationStopped())break e;eh(g,L,Y),y=F}else for(k=0;k<d.length;k++){if(L=d[k],F=L.instance,Y=L.currentTarget,L=L.listener,F!==y&&g.isPropagationStopped())break e;eh(g,L,Y),y=F}}}if(ya)throw r=bo,ya=!1,bo=null,r}function Xe(r,s){var o=s[Jo];o===void 0&&(o=s[Jo]=new Set);var d=r+"__bubble";o.has(d)||(nh(s,r,2,!1),o.add(d))}function Yo(r,s,o){var d=0;s&&(d|=4),nh(o,r,d,s)}var Ma="_reactListening"+Math.random().toString(36).slice(2);function fs(r){if(!r[Ma]){r[Ma]=!0,i.forEach(function(o){o!=="selectionchange"&&(UT.has(o)||Yo(o,!1,r),Yo(o,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Ma]||(s[Ma]=!0,Yo("selectionchange",!1,s))}}function nh(r,s,o,d){switch(_f(s)){case 1:var g=eT;break;case 4:g=tT;break;default:g=wo}o=g.bind(null,s,o,r),g=void 0,!xo||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(s,o,{capture:!0,passive:g}):r.addEventListener(s,o,!0):g!==void 0?r.addEventListener(s,o,{passive:g}):r.addEventListener(s,o,!1)}function Vo(r,s,o,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var k=d.tag;if(k===3||k===4){var L=d.stateNode.containerInfo;if(L===g||L.nodeType===8&&L.parentNode===g)break;if(k===4)for(k=d.return;k!==null;){var F=k.tag;if((F===3||F===4)&&(F=k.stateNode.containerInfo,F===g||F.nodeType===8&&F.parentNode===g))return;k=k.return}for(;L!==null;){if(k=Ar(L),k===null)return;if(F=k.tag,F===5||F===6){d=y=k;continue e}L=L.parentNode}}d=d.return}uf(function(){var Y=y,ne=Eo(o),se=[];e:{var ee=Jf.get(r);if(ee!==void 0){var Ee=Lo,xe=r;switch(r){case"keypress":if(Ia(o)===0)break e;case"keydown":case"keyup":Ee=gT;break;case"focusin":xe="focus",Ee=Do;break;case"focusout":xe="blur",Ee=Do;break;case"beforeblur":case"afterblur":Ee=Do;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ee=wf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=iT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=yT;break;case Qf:case Gf:case Kf:Ee=uT;break;case Xf:Ee=bT;break;case"scroll":Ee=nT;break;case"wheel":Ee=CT;break;case"copy":case"cut":case"paste":Ee=lT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=If}var be=(s&4)!==0,at=!be&&r==="scroll",U=be?ee!==null?ee+"Capture":null:ee;be=[];for(var j=Y,$;j!==null;){$=j;var le=$.stateNode;if($.tag===5&&le!==null&&($=le,U!==null&&(le=Qi(j,U),le!=null&&be.push(hs(j,le,$)))),at)break;j=j.return}0<be.length&&(ee=new Ee(ee,xe,null,o,ne),se.push({event:ee,listeners:be}))}}if((s&7)===0){e:{if(ee=r==="mouseover"||r==="pointerover",Ee=r==="mouseout"||r==="pointerout",ee&&o!==$t&&(xe=o.relatedTarget||o.fromElement)&&(Ar(xe)||xe[Pn]))break e;if((Ee||ee)&&(ee=ne.window===ne?ne:(ee=ne.ownerDocument)?ee.defaultView||ee.parentWindow:window,Ee?(xe=o.relatedTarget||o.toElement,Ee=Y,xe=xe?Ar(xe):null,xe!==null&&(at=wr(xe),xe!==at||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(Ee=null,xe=Y),Ee!==xe)){if(be=wf,le="onMouseLeave",U="onMouseEnter",j="mouse",(r==="pointerout"||r==="pointerover")&&(be=If,le="onPointerLeave",U="onPointerEnter",j="pointer"),at=Ee==null?ee:pi(Ee),$=xe==null?ee:pi(xe),ee=new be(le,j+"leave",Ee,o,ne),ee.target=at,ee.relatedTarget=$,le=null,Ar(ne)===Y&&(be=new be(U,j+"enter",xe,o,ne),be.target=$,be.relatedTarget=at,le=be),at=le,Ee&&xe)t:{for(be=Ee,U=xe,j=0,$=be;$;$=fi($))j++;for($=0,le=U;le;le=fi(le))$++;for(;0<j-$;)be=fi(be),j--;for(;0<$-j;)U=fi(U),$--;for(;j--;){if(be===U||U!==null&&be===U.alternate)break t;be=fi(be),U=fi(U)}be=null}else be=null;Ee!==null&&rh(se,ee,Ee,be,!1),xe!==null&&at!==null&&rh(se,at,xe,be,!0)}}e:{if(ee=Y?pi(Y):window,Ee=ee.nodeName&&ee.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&ee.type==="file")var ke=IT;else if(Mf(ee))if(jf)ke=DT;else{ke=RT;var ve=LT}else(Ee=ee.nodeName)&&Ee.toLowerCase()==="input"&&(ee.type==="checkbox"||ee.type==="radio")&&(ke=OT);if(ke&&(ke=ke(r,Y))){Ff(se,ke,o,ne);break e}ve&&ve(r,ee,Y),r==="focusout"&&(ve=ee._wrapperState)&&ve.controlled&&ee.type==="number"&&ii(ee,"number",ee.value)}switch(ve=Y?pi(Y):window,r){case"focusin":(Mf(ve)||ve.contentEditable==="true")&&(ci=ve,Uo=Y,cs=null);break;case"focusout":cs=Uo=ci=null;break;case"mousedown":Ho=!0;break;case"contextmenu":case"mouseup":case"dragend":Ho=!1,Vf(se,o,ne);break;case"selectionchange":if(FT)break;case"keydown":case"keyup":Vf(se,o,ne)}var Ne;if(Mo)e:{switch(r){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else li?Df(r,o)&&(Ae="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Ae="onCompositionStart");Ae&&(Lf&&o.locale!=="ko"&&(li||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&li&&(Ne=vf()):(er=ne,Io="value"in er?er.value:er.textContent,li=!0)),ve=Fa(Y,Ae),0<ve.length&&(Ae=new Af(Ae,r,null,o,ne),se.push({event:Ae,listeners:ve}),Ne?Ae.data=Ne:(Ne=Pf(o),Ne!==null&&(Ae.data=Ne)))),(Ne=_T?vT(r,o):NT(r,o))&&(Y=Fa(Y,"onBeforeInput"),0<Y.length&&(ne=new Af("onBeforeInput","beforeinput",null,o,ne),se.push({event:ne,listeners:Y}),ne.data=Ne))}th(se,s)})}function hs(r,s,o){return{instance:r,listener:s,currentTarget:o}}function Fa(r,s){for(var o=s+"Capture",d=[];r!==null;){var g=r,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Qi(r,o),y!=null&&d.unshift(hs(r,y,g)),y=Qi(r,s),y!=null&&d.push(hs(r,y,g))),r=r.return}return d}function fi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function rh(r,s,o,d,g){for(var y=s._reactName,k=[];o!==null&&o!==d;){var L=o,F=L.alternate,Y=L.stateNode;if(F!==null&&F===d)break;L.tag===5&&Y!==null&&(L=Y,g?(F=Qi(o,y),F!=null&&k.unshift(hs(o,F,L))):g||(F=Qi(o,y),F!=null&&k.push(hs(o,F,L)))),o=o.return}k.length!==0&&r.push({event:s,listeners:k})}var HT=/\r\n?/g,zT=/\u0000|\uFFFD/g;function ih(r){return(typeof r=="string"?r:""+r).replace(HT,`
|
|
39
|
+
`).replace(zT,"")}function ja(r,s,o){if(s=ih(s),ih(r)!==s&&o)throw Error(n(425))}function Ba(){}var qo=null,Qo=null;function Go(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ko=typeof setTimeout=="function"?setTimeout:void 0,$T=typeof clearTimeout=="function"?clearTimeout:void 0,sh=typeof Promise=="function"?Promise:void 0,WT=typeof queueMicrotask=="function"?queueMicrotask:typeof sh<"u"?function(r){return sh.resolve(null).then(r).catch(YT)}:Ko;function YT(r){setTimeout(function(){throw r})}function Xo(r,s){var o=s,d=0;do{var g=o.nextSibling;if(r.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"){if(d===0){r.removeChild(g),rs(s);return}d--}else o!=="$"&&o!=="$?"&&o!=="$!"||d++;o=g}while(o);rs(s)}function nr(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function ah(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"){if(s===0)return r;s--}else o==="/$"&&s++}r=r.previousSibling}return null}var hi=Math.random().toString(36).slice(2),Sn="__reactFiber$"+hi,ps="__reactProps$"+hi,Pn="__reactContainer$"+hi,Jo="__reactEvents$"+hi,VT="__reactListeners$"+hi,qT="__reactHandles$"+hi;function Ar(r){var s=r[Sn];if(s)return s;for(var o=r.parentNode;o;){if(s=o[Pn]||o[Sn]){if(o=s.alternate,s.child!==null||o!==null&&o.child!==null)for(r=ah(r);r!==null;){if(o=r[Sn])return o;r=ah(r)}return s}r=o,o=r.parentNode}return null}function ms(r){return r=r[Sn]||r[Pn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function pi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Ua(r){return r[ps]||null}var Zo=[],mi=-1;function rr(r){return{current:r}}function Je(r){0>mi||(r.current=Zo[mi],Zo[mi]=null,mi--)}function Ke(r,s){mi++,Zo[mi]=r.current,r.current=s}var ir={},kt=rr(ir),Ot=rr(!1),Ir=ir;function gi(r,s){var o=r.type.contextTypes;if(!o)return ir;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in o)g[y]=s[y];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function Dt(r){return r=r.childContextTypes,r!=null}function Ha(){Je(Ot),Je(kt)}function uh(r,s,o){if(kt.current!==ir)throw Error(n(168));Ke(kt,s),Ke(Ot,o)}function oh(r,s,o){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return o;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,Ue(r)||"Unknown",g));return S({},o,d)}function za(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ir,Ir=kt.current,Ke(kt,r),Ke(Ot,Ot.current),!0}function lh(r,s,o){var d=r.stateNode;if(!d)throw Error(n(169));o?(r=oh(r,s,Ir),d.__reactInternalMemoizedMergedChildContext=r,Je(Ot),Je(kt),Ke(kt,r)):Je(Ot),Ke(Ot,o)}var Mn=null,$a=!1,el=!1;function ch(r){Mn===null?Mn=[r]:Mn.push(r)}function QT(r){$a=!0,ch(r)}function sr(){if(!el&&Mn!==null){el=!0;var r=0,s=$e;try{var o=Mn;for($e=1;r<o.length;r++){var d=o[r];do d=d(!0);while(d!==null)}Mn=null,$a=!1}catch(g){throw Mn!==null&&(Mn=Mn.slice(r+1)),ff(ko,sr),g}finally{$e=s,el=!1}}return null}var Ei=[],Ti=0,Wa=null,Ya=0,Jt=[],Zt=0,Lr=null,Fn=1,jn="";function Rr(r,s){Ei[Ti++]=Ya,Ei[Ti++]=Wa,Wa=r,Ya=s}function dh(r,s,o){Jt[Zt++]=Fn,Jt[Zt++]=jn,Jt[Zt++]=Lr,Lr=r;var d=Fn;r=jn;var g=32-on(d)-1;d&=~(1<<g),o+=1;var y=32-on(s)+g;if(30<y){var k=g-g%5;y=(d&(1<<k)-1).toString(32),d>>=k,g-=k,Fn=1<<32-on(s)+g|o<<g|d,jn=y+r}else Fn=1<<y|o<<g|d,jn=r}function tl(r){r.return!==null&&(Rr(r,1),dh(r,1,0))}function nl(r){for(;r===Wa;)Wa=Ei[--Ti],Ei[Ti]=null,Ya=Ei[--Ti],Ei[Ti]=null;for(;r===Lr;)Lr=Jt[--Zt],Jt[Zt]=null,jn=Jt[--Zt],Jt[Zt]=null,Fn=Jt[--Zt],Jt[Zt]=null}var Yt=null,Vt=null,et=!1,cn=null;function fh(r,s){var o=rn(5,null,null,0);o.elementType="DELETED",o.stateNode=s,o.return=r,s=r.deletions,s===null?(r.deletions=[o],r.flags|=16):s.push(o)}function hh(r,s){switch(r.tag){case 5:var o=r.type;return s=s.nodeType!==1||o.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Yt=r,Vt=nr(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Yt=r,Vt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(o=Lr!==null?{id:Fn,overflow:jn}:null,r.memoizedState={dehydrated:s,treeContext:o,retryLane:1073741824},o=rn(18,null,null,0),o.stateNode=s,o.return=r,r.child=o,Yt=r,Vt=null,!0):!1;default:return!1}}function rl(r){return(r.mode&1)!==0&&(r.flags&128)===0}function il(r){if(et){var s=Vt;if(s){var o=s;if(!hh(r,s)){if(rl(r))throw Error(n(418));s=nr(o.nextSibling);var d=Yt;s&&hh(r,s)?fh(d,o):(r.flags=r.flags&-4097|2,et=!1,Yt=r)}}else{if(rl(r))throw Error(n(418));r.flags=r.flags&-4097|2,et=!1,Yt=r}}}function ph(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Yt=r}function Va(r){if(r!==Yt)return!1;if(!et)return ph(r),et=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Go(r.type,r.memoizedProps)),s&&(s=Vt)){if(rl(r))throw mh(),Error(n(418));for(;s;)fh(r,s),s=nr(s.nextSibling)}if(ph(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"){if(s===0){Vt=nr(r.nextSibling);break e}s--}else o!=="$"&&o!=="$!"&&o!=="$?"||s++}r=r.nextSibling}Vt=null}}else Vt=Yt?nr(r.stateNode.nextSibling):null;return!0}function mh(){for(var r=Vt;r;)r=nr(r.nextSibling)}function yi(){Vt=Yt=null,et=!1}function sl(r){cn===null?cn=[r]:cn.push(r)}var GT=W.ReactCurrentBatchConfig;function gs(r,s,o){if(r=o.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(n(309));var d=o.stateNode}if(!d)throw Error(n(147,r));var g=d,y=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(k){var L=g.refs;k===null?delete L[y]:L[y]=k},s._stringRef=y,s)}if(typeof r!="string")throw Error(n(284));if(!o._owner)throw Error(n(290,r))}return r}function qa(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function gh(r){var s=r._init;return s(r._payload)}function Eh(r){function s(U,j){if(r){var $=U.deletions;$===null?(U.deletions=[j],U.flags|=16):$.push(j)}}function o(U,j){if(!r)return null;for(;j!==null;)s(U,j),j=j.sibling;return null}function d(U,j){for(U=new Map;j!==null;)j.key!==null?U.set(j.key,j):U.set(j.index,j),j=j.sibling;return U}function g(U,j){return U=hr(U,j),U.index=0,U.sibling=null,U}function y(U,j,$){return U.index=$,r?($=U.alternate,$!==null?($=$.index,$<j?(U.flags|=2,j):$):(U.flags|=2,j)):(U.flags|=1048576,j)}function k(U){return r&&U.alternate===null&&(U.flags|=2),U}function L(U,j,$,le){return j===null||j.tag!==6?(j=Kl($,U.mode,le),j.return=U,j):(j=g(j,$),j.return=U,j)}function F(U,j,$,le){var ke=$.type;return ke===ie?ne(U,j,$.props.children,le,$.key):j!==null&&(j.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===X&&gh(ke)===j.type)?(le=g(j,$.props),le.ref=gs(U,j,$),le.return=U,le):(le=Eu($.type,$.key,$.props,null,U.mode,le),le.ref=gs(U,j,$),le.return=U,le)}function Y(U,j,$,le){return j===null||j.tag!==4||j.stateNode.containerInfo!==$.containerInfo||j.stateNode.implementation!==$.implementation?(j=Xl($,U.mode,le),j.return=U,j):(j=g(j,$.children||[]),j.return=U,j)}function ne(U,j,$,le,ke){return j===null||j.tag!==7?(j=Ur($,U.mode,le,ke),j.return=U,j):(j=g(j,$),j.return=U,j)}function se(U,j,$){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Kl(""+j,U.mode,$),j.return=U,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case q:return $=Eu(j.type,j.key,j.props,null,U.mode,$),$.ref=gs(U,null,j),$.return=U,$;case B:return j=Xl(j,U.mode,$),j.return=U,j;case X:var le=j._init;return se(U,le(j._payload),$)}if(qn(j)||oe(j))return j=Ur(j,U.mode,$,null),j.return=U,j;qa(U,j)}return null}function ee(U,j,$,le){var ke=j!==null?j.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return ke!==null?null:L(U,j,""+$,le);if(typeof $=="object"&&$!==null){switch($.$$typeof){case q:return $.key===ke?F(U,j,$,le):null;case B:return $.key===ke?Y(U,j,$,le):null;case X:return ke=$._init,ee(U,j,ke($._payload),le)}if(qn($)||oe($))return ke!==null?null:ne(U,j,$,le,null);qa(U,$)}return null}function Ee(U,j,$,le,ke){if(typeof le=="string"&&le!==""||typeof le=="number")return U=U.get($)||null,L(j,U,""+le,ke);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case q:return U=U.get(le.key===null?$:le.key)||null,F(j,U,le,ke);case B:return U=U.get(le.key===null?$:le.key)||null,Y(j,U,le,ke);case X:var ve=le._init;return Ee(U,j,$,ve(le._payload),ke)}if(qn(le)||oe(le))return U=U.get($)||null,ne(j,U,le,ke,null);qa(j,le)}return null}function xe(U,j,$,le){for(var ke=null,ve=null,Ne=j,Ae=j=0,mt=null;Ne!==null&&Ae<$.length;Ae++){Ne.index>Ae?(mt=Ne,Ne=null):mt=Ne.sibling;var He=ee(U,Ne,$[Ae],le);if(He===null){Ne===null&&(Ne=mt);break}r&&Ne&&He.alternate===null&&s(U,Ne),j=y(He,j,Ae),ve===null?ke=He:ve.sibling=He,ve=He,Ne=mt}if(Ae===$.length)return o(U,Ne),et&&Rr(U,Ae),ke;if(Ne===null){for(;Ae<$.length;Ae++)Ne=se(U,$[Ae],le),Ne!==null&&(j=y(Ne,j,Ae),ve===null?ke=Ne:ve.sibling=Ne,ve=Ne);return et&&Rr(U,Ae),ke}for(Ne=d(U,Ne);Ae<$.length;Ae++)mt=Ee(Ne,U,Ae,$[Ae],le),mt!==null&&(r&&mt.alternate!==null&&Ne.delete(mt.key===null?Ae:mt.key),j=y(mt,j,Ae),ve===null?ke=mt:ve.sibling=mt,ve=mt);return r&&Ne.forEach(function(pr){return s(U,pr)}),et&&Rr(U,Ae),ke}function be(U,j,$,le){var ke=oe($);if(typeof ke!="function")throw Error(n(150));if($=ke.call($),$==null)throw Error(n(151));for(var ve=ke=null,Ne=j,Ae=j=0,mt=null,He=$.next();Ne!==null&&!He.done;Ae++,He=$.next()){Ne.index>Ae?(mt=Ne,Ne=null):mt=Ne.sibling;var pr=ee(U,Ne,He.value,le);if(pr===null){Ne===null&&(Ne=mt);break}r&&Ne&&pr.alternate===null&&s(U,Ne),j=y(pr,j,Ae),ve===null?ke=pr:ve.sibling=pr,ve=pr,Ne=mt}if(He.done)return o(U,Ne),et&&Rr(U,Ae),ke;if(Ne===null){for(;!He.done;Ae++,He=$.next())He=se(U,He.value,le),He!==null&&(j=y(He,j,Ae),ve===null?ke=He:ve.sibling=He,ve=He);return et&&Rr(U,Ae),ke}for(Ne=d(U,Ne);!He.done;Ae++,He=$.next())He=Ee(Ne,U,Ae,He.value,le),He!==null&&(r&&He.alternate!==null&&Ne.delete(He.key===null?Ae:He.key),j=y(He,j,Ae),ve===null?ke=He:ve.sibling=He,ve=He);return r&&Ne.forEach(function(wy){return s(U,wy)}),et&&Rr(U,Ae),ke}function at(U,j,$,le){if(typeof $=="object"&&$!==null&&$.type===ie&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case q:e:{for(var ke=$.key,ve=j;ve!==null;){if(ve.key===ke){if(ke=$.type,ke===ie){if(ve.tag===7){o(U,ve.sibling),j=g(ve,$.props.children),j.return=U,U=j;break e}}else if(ve.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===X&&gh(ke)===ve.type){o(U,ve.sibling),j=g(ve,$.props),j.ref=gs(U,ve,$),j.return=U,U=j;break e}o(U,ve);break}else s(U,ve);ve=ve.sibling}$.type===ie?(j=Ur($.props.children,U.mode,le,$.key),j.return=U,U=j):(le=Eu($.type,$.key,$.props,null,U.mode,le),le.ref=gs(U,j,$),le.return=U,U=le)}return k(U);case B:e:{for(ve=$.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===$.containerInfo&&j.stateNode.implementation===$.implementation){o(U,j.sibling),j=g(j,$.children||[]),j.return=U,U=j;break e}else{o(U,j);break}else s(U,j);j=j.sibling}j=Xl($,U.mode,le),j.return=U,U=j}return k(U);case X:return ve=$._init,at(U,j,ve($._payload),le)}if(qn($))return xe(U,j,$,le);if(oe($))return be(U,j,$,le);qa(U,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,j!==null&&j.tag===6?(o(U,j.sibling),j=g(j,$),j.return=U,U=j):(o(U,j),j=Kl($,U.mode,le),j.return=U,U=j),k(U)):o(U,j)}return at}var xi=Eh(!0),Th=Eh(!1),Qa=rr(null),Ga=null,bi=null,al=null;function ul(){al=bi=Ga=null}function ol(r){var s=Qa.current;Je(Qa),r._currentValue=s}function ll(r,s,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===o)break;r=r.return}}function ki(r,s){Ga=r,al=bi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(Pt=!0),r.firstContext=null)}function en(r){var s=r._currentValue;if(al!==r)if(r={context:r,memoizedValue:s,next:null},bi===null){if(Ga===null)throw Error(n(308));bi=r,Ga.dependencies={lanes:0,firstContext:r}}else bi=bi.next=r;return s}var Or=null;function cl(r){Or===null?Or=[r]:Or.push(r)}function yh(r,s,o,d){var g=s.interleaved;return g===null?(o.next=o,cl(s)):(o.next=g.next,g.next=o),s.interleaved=o,Bn(r,d)}function Bn(r,s){r.lanes|=s;var o=r.alternate;for(o!==null&&(o.lanes|=s),o=r,r=r.return;r!==null;)r.childLanes|=s,o=r.alternate,o!==null&&(o.childLanes|=s),o=r,r=r.return;return o.tag===3?o.stateNode:null}var ar=!1;function dl(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Un(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function ur(r,s,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Be&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Bn(r,o)}return g=d.interleaved,g===null?(s.next=s,cl(d)):(s.next=g.next,g.next=s),d.interleaved=s,Bn(r,o)}function Ka(r,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,_o(r,o)}}function bh(r,s){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var g=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var k={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};y===null?g=y=k:y=y.next=k,o=o.next}while(o!==null);y===null?g=y=s:y=y.next=s}else g=y=s;o={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=s:r.next=s,o.lastBaseUpdate=s}function Xa(r,s,o,d){var g=r.updateQueue;ar=!1;var y=g.firstBaseUpdate,k=g.lastBaseUpdate,L=g.shared.pending;if(L!==null){g.shared.pending=null;var F=L,Y=F.next;F.next=null,k===null?y=Y:k.next=Y,k=F;var ne=r.alternate;ne!==null&&(ne=ne.updateQueue,L=ne.lastBaseUpdate,L!==k&&(L===null?ne.firstBaseUpdate=Y:L.next=Y,ne.lastBaseUpdate=F))}if(y!==null){var se=g.baseState;k=0,ne=Y=F=null,L=y;do{var ee=L.lane,Ee=L.eventTime;if((d&ee)===ee){ne!==null&&(ne=ne.next={eventTime:Ee,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var xe=r,be=L;switch(ee=s,Ee=o,be.tag){case 1:if(xe=be.payload,typeof xe=="function"){se=xe.call(Ee,se,ee);break e}se=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=be.payload,ee=typeof xe=="function"?xe.call(Ee,se,ee):xe,ee==null)break e;se=S({},se,ee);break e;case 2:ar=!0}}L.callback!==null&&L.lane!==0&&(r.flags|=64,ee=g.effects,ee===null?g.effects=[L]:ee.push(L))}else Ee={eventTime:Ee,lane:ee,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ne===null?(Y=ne=Ee,F=se):ne=ne.next=Ee,k|=ee;if(L=L.next,L===null){if(L=g.shared.pending,L===null)break;ee=L,L=ee.next,ee.next=null,g.lastBaseUpdate=ee,g.shared.pending=null}}while(!0);if(ne===null&&(F=se),g.baseState=F,g.firstBaseUpdate=Y,g.lastBaseUpdate=ne,s=g.shared.interleaved,s!==null){g=s;do k|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);Mr|=k,r.lanes=k,r.memoizedState=se}}function kh(r,s,o){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],g=d.callback;if(g!==null){if(d.callback=null,d=o,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Es={},_n=rr(Es),Ts=rr(Es),ys=rr(Es);function Dr(r){if(r===Es)throw Error(n(174));return r}function fl(r,s){switch(Ke(ys,s),Ke(Ts,r),Ke(_n,Es),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:fe(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=fe(s,r)}Je(_n),Ke(_n,s)}function Ci(){Je(_n),Je(Ts),Je(ys)}function Ch(r){Dr(ys.current);var s=Dr(_n.current),o=fe(s,r.type);s!==o&&(Ke(Ts,r),Ke(_n,o))}function hl(r){Ts.current===r&&(Je(_n),Je(Ts))}var nt=rr(0);function Ja(r){for(var s=r;s!==null;){if(s.tag===13){var o=s.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var pl=[];function ml(){for(var r=0;r<pl.length;r++)pl[r]._workInProgressVersionPrimary=null;pl.length=0}var Za=W.ReactCurrentDispatcher,gl=W.ReactCurrentBatchConfig,Pr=0,rt=null,dt=null,ht=null,eu=!1,xs=!1,bs=0,KT=0;function Ct(){throw Error(n(321))}function El(r,s){if(s===null)return!1;for(var o=0;o<s.length&&o<r.length;o++)if(!ln(r[o],s[o]))return!1;return!0}function Tl(r,s,o,d,g,y){if(Pr=y,rt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Za.current=r===null||r.memoizedState===null?ey:ty,r=o(d,g),xs){y=0;do{if(xs=!1,bs=0,25<=y)throw Error(n(301));y+=1,ht=dt=null,s.updateQueue=null,Za.current=ny,r=o(d,g)}while(xs)}if(Za.current=ru,s=dt!==null&&dt.next!==null,Pr=0,ht=dt=rt=null,eu=!1,s)throw Error(n(300));return r}function yl(){var r=bs!==0;return bs=0,r}function vn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?rt.memoizedState=ht=r:ht=ht.next=r,ht}function tn(){if(dt===null){var r=rt.alternate;r=r!==null?r.memoizedState:null}else r=dt.next;var s=ht===null?rt.memoizedState:ht.next;if(s!==null)ht=s,dt=r;else{if(r===null)throw Error(n(310));dt=r,r={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},ht===null?rt.memoizedState=ht=r:ht=ht.next=r}return ht}function ks(r,s){return typeof s=="function"?s(r):s}function xl(r){var s=tn(),o=s.queue;if(o===null)throw Error(n(311));o.lastRenderedReducer=r;var d=dt,g=d.baseQueue,y=o.pending;if(y!==null){if(g!==null){var k=g.next;g.next=y.next,y.next=k}d.baseQueue=g=y,o.pending=null}if(g!==null){y=g.next,d=d.baseState;var L=k=null,F=null,Y=y;do{var ne=Y.lane;if((Pr&ne)===ne)F!==null&&(F=F.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),d=Y.hasEagerState?Y.eagerState:r(d,Y.action);else{var se={lane:ne,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};F===null?(L=F=se,k=d):F=F.next=se,rt.lanes|=ne,Mr|=ne}Y=Y.next}while(Y!==null&&Y!==y);F===null?k=d:F.next=L,ln(d,s.memoizedState)||(Pt=!0),s.memoizedState=d,s.baseState=k,s.baseQueue=F,o.lastRenderedState=d}if(r=o.interleaved,r!==null){g=r;do y=g.lane,rt.lanes|=y,Mr|=y,g=g.next;while(g!==r)}else g===null&&(o.lanes=0);return[s.memoizedState,o.dispatch]}function bl(r){var s=tn(),o=s.queue;if(o===null)throw Error(n(311));o.lastRenderedReducer=r;var d=o.dispatch,g=o.pending,y=s.memoizedState;if(g!==null){o.pending=null;var k=g=g.next;do y=r(y,k.action),k=k.next;while(k!==g);ln(y,s.memoizedState)||(Pt=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),o.lastRenderedState=y}return[y,d]}function Sh(){}function _h(r,s){var o=rt,d=tn(),g=s(),y=!ln(d.memoizedState,g);if(y&&(d.memoizedState=g,Pt=!0),d=d.queue,kl(wh.bind(null,o,d,r),[r]),d.getSnapshot!==s||y||ht!==null&&ht.memoizedState.tag&1){if(o.flags|=2048,Cs(9,Nh.bind(null,o,d,g,s),void 0,null),pt===null)throw Error(n(349));(Pr&30)!==0||vh(o,s,g)}return g}function vh(r,s,o){r.flags|=16384,r={getSnapshot:s,value:o},s=rt.updateQueue,s===null?(s={lastEffect:null,stores:null},rt.updateQueue=s,s.stores=[r]):(o=s.stores,o===null?s.stores=[r]:o.push(r))}function Nh(r,s,o,d){s.value=o,s.getSnapshot=d,Ah(s)&&Ih(r)}function wh(r,s,o){return o(function(){Ah(s)&&Ih(r)})}function Ah(r){var s=r.getSnapshot;r=r.value;try{var o=s();return!ln(r,o)}catch{return!0}}function Ih(r){var s=Bn(r,1);s!==null&&pn(s,r,1,-1)}function Lh(r){var s=vn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:r},s.queue=r,r=r.dispatch=ZT.bind(null,rt,r),[s.memoizedState,r]}function Cs(r,s,o,d){return r={tag:r,create:s,destroy:o,deps:d,next:null},s=rt.updateQueue,s===null?(s={lastEffect:null,stores:null},rt.updateQueue=s,s.lastEffect=r.next=r):(o=s.lastEffect,o===null?s.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,s.lastEffect=r)),r}function Rh(){return tn().memoizedState}function tu(r,s,o,d){var g=vn();rt.flags|=r,g.memoizedState=Cs(1|s,o,void 0,d===void 0?null:d)}function nu(r,s,o,d){var g=tn();d=d===void 0?null:d;var y=void 0;if(dt!==null){var k=dt.memoizedState;if(y=k.destroy,d!==null&&El(d,k.deps)){g.memoizedState=Cs(s,o,y,d);return}}rt.flags|=r,g.memoizedState=Cs(1|s,o,y,d)}function Oh(r,s){return tu(8390656,8,r,s)}function kl(r,s){return nu(2048,8,r,s)}function Dh(r,s){return nu(4,2,r,s)}function Ph(r,s){return nu(4,4,r,s)}function Mh(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function Fh(r,s,o){return o=o!=null?o.concat([r]):null,nu(4,4,Mh.bind(null,s,r),o)}function Cl(){}function jh(r,s){var o=tn();s=s===void 0?null:s;var d=o.memoizedState;return d!==null&&s!==null&&El(s,d[1])?d[0]:(o.memoizedState=[r,s],r)}function Bh(r,s){var o=tn();s=s===void 0?null:s;var d=o.memoizedState;return d!==null&&s!==null&&El(s,d[1])?d[0]:(r=r(),o.memoizedState=[r,s],r)}function Uh(r,s,o){return(Pr&21)===0?(r.baseState&&(r.baseState=!1,Pt=!0),r.memoizedState=o):(ln(o,s)||(o=gf(),rt.lanes|=o,Mr|=o,r.baseState=!0),s)}function XT(r,s){var o=$e;$e=o!==0&&4>o?o:4,r(!0);var d=gl.transition;gl.transition={};try{r(!1),s()}finally{$e=o,gl.transition=d}}function Hh(){return tn().memoizedState}function JT(r,s,o){var d=dr(r);if(o={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null},zh(r))$h(s,o);else if(o=yh(r,s,o,d),o!==null){var g=Lt();pn(o,r,d,g),Wh(o,s,d)}}function ZT(r,s,o){var d=dr(r),g={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null};if(zh(r))$h(s,g);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var k=s.lastRenderedState,L=y(k,o);if(g.hasEagerState=!0,g.eagerState=L,ln(L,k)){var F=s.interleaved;F===null?(g.next=g,cl(s)):(g.next=F.next,F.next=g),s.interleaved=g;return}}catch{}finally{}o=yh(r,s,g,d),o!==null&&(g=Lt(),pn(o,r,d,g),Wh(o,s,d))}}function zh(r){var s=r.alternate;return r===rt||s!==null&&s===rt}function $h(r,s){xs=eu=!0;var o=r.pending;o===null?s.next=s:(s.next=o.next,o.next=s),r.pending=s}function Wh(r,s,o){if((o&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,_o(r,o)}}var ru={readContext:en,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},ey={readContext:en,useCallback:function(r,s){return vn().memoizedState=[r,s===void 0?null:s],r},useContext:en,useEffect:Oh,useImperativeHandle:function(r,s,o){return o=o!=null?o.concat([r]):null,tu(4194308,4,Mh.bind(null,s,r),o)},useLayoutEffect:function(r,s){return tu(4194308,4,r,s)},useInsertionEffect:function(r,s){return tu(4,2,r,s)},useMemo:function(r,s){var o=vn();return s=s===void 0?null:s,r=r(),o.memoizedState=[r,s],r},useReducer:function(r,s,o){var d=vn();return s=o!==void 0?o(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=JT.bind(null,rt,r),[d.memoizedState,r]},useRef:function(r){var s=vn();return r={current:r},s.memoizedState=r},useState:Lh,useDebugValue:Cl,useDeferredValue:function(r){return vn().memoizedState=r},useTransition:function(){var r=Lh(!1),s=r[0];return r=XT.bind(null,r[1]),vn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,o){var d=rt,g=vn();if(et){if(o===void 0)throw Error(n(407));o=o()}else{if(o=s(),pt===null)throw Error(n(349));(Pr&30)!==0||vh(d,s,o)}g.memoizedState=o;var y={value:o,getSnapshot:s};return g.queue=y,Oh(wh.bind(null,d,y,r),[r]),d.flags|=2048,Cs(9,Nh.bind(null,d,y,o,s),void 0,null),o},useId:function(){var r=vn(),s=pt.identifierPrefix;if(et){var o=jn,d=Fn;o=(d&~(1<<32-on(d)-1)).toString(32)+o,s=":"+s+"R"+o,o=bs++,0<o&&(s+="H"+o.toString(32)),s+=":"}else o=KT++,s=":"+s+"r"+o.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},ty={readContext:en,useCallback:jh,useContext:en,useEffect:kl,useImperativeHandle:Fh,useInsertionEffect:Dh,useLayoutEffect:Ph,useMemo:Bh,useReducer:xl,useRef:Rh,useState:function(){return xl(ks)},useDebugValue:Cl,useDeferredValue:function(r){var s=tn();return Uh(s,dt.memoizedState,r)},useTransition:function(){var r=xl(ks)[0],s=tn().memoizedState;return[r,s]},useMutableSource:Sh,useSyncExternalStore:_h,useId:Hh,unstable_isNewReconciler:!1},ny={readContext:en,useCallback:jh,useContext:en,useEffect:kl,useImperativeHandle:Fh,useInsertionEffect:Dh,useLayoutEffect:Ph,useMemo:Bh,useReducer:bl,useRef:Rh,useState:function(){return bl(ks)},useDebugValue:Cl,useDeferredValue:function(r){var s=tn();return dt===null?s.memoizedState=r:Uh(s,dt.memoizedState,r)},useTransition:function(){var r=bl(ks)[0],s=tn().memoizedState;return[r,s]},useMutableSource:Sh,useSyncExternalStore:_h,useId:Hh,unstable_isNewReconciler:!1};function dn(r,s){if(r&&r.defaultProps){s=S({},s),r=r.defaultProps;for(var o in r)s[o]===void 0&&(s[o]=r[o]);return s}return s}function Sl(r,s,o,d){s=r.memoizedState,o=o(d,s),o=o==null?s:S({},s,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var iu={isMounted:function(r){return(r=r._reactInternals)?wr(r)===r:!1},enqueueSetState:function(r,s,o){r=r._reactInternals;var d=Lt(),g=dr(r),y=Un(d,g);y.payload=s,o!=null&&(y.callback=o),s=ur(r,y,g),s!==null&&(pn(s,r,g,d),Ka(s,r,g))},enqueueReplaceState:function(r,s,o){r=r._reactInternals;var d=Lt(),g=dr(r),y=Un(d,g);y.tag=1,y.payload=s,o!=null&&(y.callback=o),s=ur(r,y,g),s!==null&&(pn(s,r,g,d),Ka(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var o=Lt(),d=dr(r),g=Un(o,d);g.tag=2,s!=null&&(g.callback=s),s=ur(r,g,d),s!==null&&(pn(s,r,d,o),Ka(s,r,d))}};function Yh(r,s,o,d,g,y,k){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,y,k):s.prototype&&s.prototype.isPureReactComponent?!ls(o,d)||!ls(g,y):!0}function Vh(r,s,o){var d=!1,g=ir,y=s.contextType;return typeof y=="object"&&y!==null?y=en(y):(g=Dt(s)?Ir:kt.current,d=s.contextTypes,y=(d=d!=null)?gi(r,g):ir),s=new s(o,y),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=iu,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=y),s}function qh(r,s,o,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(o,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(o,d),s.state!==r&&iu.enqueueReplaceState(s,s.state,null)}function _l(r,s,o,d){var g=r.stateNode;g.props=o,g.state=r.memoizedState,g.refs={},dl(r);var y=s.contextType;typeof y=="object"&&y!==null?g.context=en(y):(y=Dt(s)?Ir:kt.current,g.context=gi(r,y)),g.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Sl(r,s,y,o),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&iu.enqueueReplaceState(g,g.state,null),Xa(r,o,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function Si(r,s){try{var o="",d=s;do o+=Se(d),d=d.return;while(d);var g=o}catch(y){g=`
|
|
40
|
+
Error generating stack: `+y.message+`
|
|
41
|
+
`+y.stack}return{value:r,source:s,stack:g,digest:null}}function vl(r,s,o){return{value:r,source:null,stack:o??null,digest:s??null}}function Nl(r,s){try{console.error(s.value)}catch(o){setTimeout(function(){throw o})}}var ry=typeof WeakMap=="function"?WeakMap:Map;function Qh(r,s,o){o=Un(-1,o),o.tag=3,o.payload={element:null};var d=s.value;return o.callback=function(){du||(du=!0,zl=d),Nl(r,s)},o}function Gh(r,s,o){o=Un(-1,o),o.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;o.payload=function(){return d(g)},o.callback=function(){Nl(r,s)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(o.callback=function(){Nl(r,s),typeof d!="function"&&(lr===null?lr=new Set([this]):lr.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})}),o}function Kh(r,s,o){var d=r.pingCache;if(d===null){d=r.pingCache=new ry;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(o)||(g.add(o),r=Ey.bind(null,r,s,o),s.then(r,r))}function Xh(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Jh(r,s,o,d,g){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(s=Un(-1,1),s.tag=2,ur(o,s,1))),o.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var iy=W.ReactCurrentOwner,Pt=!1;function It(r,s,o,d){s.child=r===null?Th(s,null,o,d):xi(s,r.child,o,d)}function Zh(r,s,o,d,g){o=o.render;var y=s.ref;return ki(s,g),d=Tl(r,s,o,d,y,g),o=yl(),r!==null&&!Pt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Hn(r,s,g)):(et&&o&&tl(s),s.flags|=1,It(r,s,d,g),s.child)}function ep(r,s,o,d,g){if(r===null){var y=o.type;return typeof y=="function"&&!Gl(y)&&y.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(s.tag=15,s.type=y,tp(r,s,y,d,g)):(r=Eu(o.type,null,d,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(y=r.child,(r.lanes&g)===0){var k=y.memoizedProps;if(o=o.compare,o=o!==null?o:ls,o(k,d)&&r.ref===s.ref)return Hn(r,s,g)}return s.flags|=1,r=hr(y,d),r.ref=s.ref,r.return=s,s.child=r}function tp(r,s,o,d,g){if(r!==null){var y=r.memoizedProps;if(ls(y,d)&&r.ref===s.ref)if(Pt=!1,s.pendingProps=d=y,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Pt=!0);else return s.lanes=r.lanes,Hn(r,s,g)}return wl(r,s,o,d,g)}function np(r,s,o){var d=s.pendingProps,g=d.children,y=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(vi,qt),qt|=o;else{if((o&1073741824)===0)return r=y!==null?y.baseLanes|o:o,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,Ke(vi,qt),qt|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:o,Ke(vi,qt),qt|=d}else y!==null?(d=y.baseLanes|o,s.memoizedState=null):d=o,Ke(vi,qt),qt|=d;return It(r,s,g,o),s.child}function rp(r,s){var o=s.ref;(r===null&&o!==null||r!==null&&r.ref!==o)&&(s.flags|=512,s.flags|=2097152)}function wl(r,s,o,d,g){var y=Dt(o)?Ir:kt.current;return y=gi(s,y),ki(s,g),o=Tl(r,s,o,d,y,g),d=yl(),r!==null&&!Pt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Hn(r,s,g)):(et&&d&&tl(s),s.flags|=1,It(r,s,o,g),s.child)}function ip(r,s,o,d,g){if(Dt(o)){var y=!0;za(s)}else y=!1;if(ki(s,g),s.stateNode===null)au(r,s),Vh(s,o,d),_l(s,o,d,g),d=!0;else if(r===null){var k=s.stateNode,L=s.memoizedProps;k.props=L;var F=k.context,Y=o.contextType;typeof Y=="object"&&Y!==null?Y=en(Y):(Y=Dt(o)?Ir:kt.current,Y=gi(s,Y));var ne=o.getDerivedStateFromProps,se=typeof ne=="function"||typeof k.getSnapshotBeforeUpdate=="function";se||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(L!==d||F!==Y)&&qh(s,k,d,Y),ar=!1;var ee=s.memoizedState;k.state=ee,Xa(s,d,k,g),F=s.memoizedState,L!==d||ee!==F||Ot.current||ar?(typeof ne=="function"&&(Sl(s,o,ne,d),F=s.memoizedState),(L=ar||Yh(s,o,L,d,ee,F,Y))?(se||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(s.flags|=4194308)):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=F),k.props=d,k.state=F,k.context=Y,d=L):(typeof k.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{k=s.stateNode,xh(r,s),L=s.memoizedProps,Y=s.type===s.elementType?L:dn(s.type,L),k.props=Y,se=s.pendingProps,ee=k.context,F=o.contextType,typeof F=="object"&&F!==null?F=en(F):(F=Dt(o)?Ir:kt.current,F=gi(s,F));var Ee=o.getDerivedStateFromProps;(ne=typeof Ee=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(L!==se||ee!==F)&&qh(s,k,d,F),ar=!1,ee=s.memoizedState,k.state=ee,Xa(s,d,k,g);var xe=s.memoizedState;L!==se||ee!==xe||Ot.current||ar?(typeof Ee=="function"&&(Sl(s,o,Ee,d),xe=s.memoizedState),(Y=ar||Yh(s,o,Y,d,ee,xe,F)||!1)?(ne||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(d,xe,F),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(d,xe,F)),typeof k.componentDidUpdate=="function"&&(s.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof k.componentDidUpdate!="function"||L===r.memoizedProps&&ee===r.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||L===r.memoizedProps&&ee===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=xe),k.props=d,k.state=xe,k.context=F,d=Y):(typeof k.componentDidUpdate!="function"||L===r.memoizedProps&&ee===r.memoizedState||(s.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||L===r.memoizedProps&&ee===r.memoizedState||(s.flags|=1024),d=!1)}return Al(r,s,o,d,y,g)}function Al(r,s,o,d,g,y){rp(r,s);var k=(s.flags&128)!==0;if(!d&&!k)return g&&lh(s,o,!1),Hn(r,s,y);d=s.stateNode,iy.current=s;var L=k&&typeof o.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&k?(s.child=xi(s,r.child,null,y),s.child=xi(s,null,L,y)):It(r,s,L,y),s.memoizedState=d.state,g&&lh(s,o,!0),s.child}function sp(r){var s=r.stateNode;s.pendingContext?uh(r,s.pendingContext,s.pendingContext!==s.context):s.context&&uh(r,s.context,!1),fl(r,s.containerInfo)}function ap(r,s,o,d,g){return yi(),sl(g),s.flags|=256,It(r,s,o,d),s.child}var Il={dehydrated:null,treeContext:null,retryLane:0};function Ll(r){return{baseLanes:r,cachePool:null,transitions:null}}function up(r,s,o){var d=s.pendingProps,g=nt.current,y=!1,k=(s.flags&128)!==0,L;if((L=k)||(L=r!==null&&r.memoizedState===null?!1:(g&2)!==0),L?(y=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),Ke(nt,g&1),r===null)return il(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(k=d.children,r=d.fallback,y?(d=s.mode,y=s.child,k={mode:"hidden",children:k},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=k):y=Tu(k,d,0,null),r=Ur(r,d,o,null),y.return=s,r.return=s,y.sibling=r,s.child=y,s.child.memoizedState=Ll(o),s.memoizedState=Il,r):Rl(s,k));if(g=r.memoizedState,g!==null&&(L=g.dehydrated,L!==null))return sy(r,s,k,d,L,g,o);if(y){y=d.fallback,k=s.mode,g=r.child,L=g.sibling;var F={mode:"hidden",children:d.children};return(k&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=F,s.deletions=null):(d=hr(g,F),d.subtreeFlags=g.subtreeFlags&14680064),L!==null?y=hr(L,y):(y=Ur(y,k,o,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,k=r.child.memoizedState,k=k===null?Ll(o):{baseLanes:k.baseLanes|o,cachePool:null,transitions:k.transitions},y.memoizedState=k,y.childLanes=r.childLanes&~o,s.memoizedState=Il,d}return y=r.child,r=y.sibling,d=hr(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=o),d.return=s,d.sibling=null,r!==null&&(o=s.deletions,o===null?(s.deletions=[r],s.flags|=16):o.push(r)),s.child=d,s.memoizedState=null,d}function Rl(r,s){return s=Tu({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function su(r,s,o,d){return d!==null&&sl(d),xi(s,r.child,null,o),r=Rl(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function sy(r,s,o,d,g,y,k){if(o)return s.flags&256?(s.flags&=-257,d=vl(Error(n(422))),su(r,s,k,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=Tu({mode:"visible",children:d.children},g,0,null),y=Ur(y,g,k,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&xi(s,r.child,null,k),s.child.memoizedState=Ll(k),s.memoizedState=Il,y);if((s.mode&1)===0)return su(r,s,k,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var L=d.dgst;return d=L,y=Error(n(419)),d=vl(y,d,void 0),su(r,s,k,d)}if(L=(k&r.childLanes)!==0,Pt||L){if(d=pt,d!==null){switch(k&-k){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|k))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Bn(r,g),pn(d,r,g,-1))}return Ql(),d=vl(Error(n(421))),su(r,s,k,d)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=Ty.bind(null,r),g._reactRetry=s,null):(r=y.treeContext,Vt=nr(g.nextSibling),Yt=s,et=!0,cn=null,r!==null&&(Jt[Zt++]=Fn,Jt[Zt++]=jn,Jt[Zt++]=Lr,Fn=r.id,jn=r.overflow,Lr=s),s=Rl(s,d.children),s.flags|=4096,s)}function op(r,s,o){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),ll(r.return,s,o)}function Ol(r,s,o,d,g){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=o,y.tailMode=g)}function lp(r,s,o){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(It(r,s,d.children,o),d=nt.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&op(r,o,s);else if(r.tag===19)op(r,o,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(Ke(nt,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(o=s.child,g=null;o!==null;)r=o.alternate,r!==null&&Ja(r)===null&&(g=o),o=o.sibling;o=g,o===null?(g=s.child,s.child=null):(g=o.sibling,o.sibling=null),Ol(s,!1,g,o,y);break;case"backwards":for(o=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&Ja(r)===null){s.child=g;break}r=g.sibling,g.sibling=o,o=g,g=r}Ol(s,!0,o,null,y);break;case"together":Ol(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function au(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Hn(r,s,o){if(r!==null&&(s.dependencies=r.dependencies),Mr|=s.lanes,(o&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,o=hr(r,r.pendingProps),s.child=o,o.return=s;r.sibling!==null;)r=r.sibling,o=o.sibling=hr(r,r.pendingProps),o.return=s;o.sibling=null}return s.child}function ay(r,s,o){switch(s.tag){case 3:sp(s),yi();break;case 5:Ch(s);break;case 1:Dt(s.type)&&za(s);break;case 4:fl(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;Ke(Qa,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(Ke(nt,nt.current&1),s.flags|=128,null):(o&s.child.childLanes)!==0?up(r,s,o):(Ke(nt,nt.current&1),r=Hn(r,s,o),r!==null?r.sibling:null);Ke(nt,nt.current&1);break;case 19:if(d=(o&s.childLanes)!==0,(r.flags&128)!==0){if(d)return lp(r,s,o);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Ke(nt,nt.current),d)break;return null;case 22:case 23:return s.lanes=0,np(r,s,o)}return Hn(r,s,o)}var cp,Dl,dp,fp;cp=function(r,s){for(var o=s.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Dl=function(){},dp=function(r,s,o,d){var g=r.memoizedProps;if(g!==d){r=s.stateNode,Dr(_n.current);var y=null;switch(o){case"input":g=Wi(r,g),d=Wi(r,d),y=[];break;case"select":g=S({},g,{value:void 0}),d=S({},d,{value:void 0}),y=[];break;case"textarea":g=qi(r,g),d=qi(r,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=Ba)}yt(o,d);var k;o=null;for(Y in g)if(!d.hasOwnProperty(Y)&&g.hasOwnProperty(Y)&&g[Y]!=null)if(Y==="style"){var L=g[Y];for(k in L)L.hasOwnProperty(k)&&(o||(o={}),o[k]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(a.hasOwnProperty(Y)?y||(y=[]):(y=y||[]).push(Y,null));for(Y in d){var F=d[Y];if(L=g!=null?g[Y]:void 0,d.hasOwnProperty(Y)&&F!==L&&(F!=null||L!=null))if(Y==="style")if(L){for(k in L)!L.hasOwnProperty(k)||F&&F.hasOwnProperty(k)||(o||(o={}),o[k]="");for(k in F)F.hasOwnProperty(k)&&L[k]!==F[k]&&(o||(o={}),o[k]=F[k])}else o||(y||(y=[]),y.push(Y,o)),o=F;else Y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,L=L?L.__html:void 0,F!=null&&L!==F&&(y=y||[]).push(Y,F)):Y==="children"?typeof F!="string"&&typeof F!="number"||(y=y||[]).push(Y,""+F):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(a.hasOwnProperty(Y)?(F!=null&&Y==="onScroll"&&Xe("scroll",r),y||L===F||(y=[])):(y=y||[]).push(Y,F))}o&&(y=y||[]).push("style",o);var Y=y;(s.updateQueue=Y)&&(s.flags|=4)}},fp=function(r,s,o,d){o!==d&&(s.flags|=4)};function Ss(r,s){if(!et)switch(r.tailMode){case"hidden":s=r.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function St(r){var s=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(s)for(var g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=o,s}function uy(r,s,o){var d=s.pendingProps;switch(nl(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(s),null;case 1:return Dt(s.type)&&Ha(),St(s),null;case 3:return d=s.stateNode,Ci(),Je(Ot),Je(kt),ml(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(Va(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,cn!==null&&(Yl(cn),cn=null))),Dl(r,s),St(s),null;case 5:hl(s);var g=Dr(ys.current);if(o=s.type,r!==null&&s.stateNode!=null)dp(r,s,o,d,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return St(s),null}if(r=Dr(_n.current),Va(s)){d=s.stateNode,o=s.type;var y=s.memoizedProps;switch(d[Sn]=s,d[ps]=y,r=(s.mode&1)!==0,o){case"dialog":Xe("cancel",d),Xe("close",d);break;case"iframe":case"object":case"embed":Xe("load",d);break;case"video":case"audio":for(g=0;g<ds.length;g++)Xe(ds[g],d);break;case"source":Xe("error",d);break;case"img":case"image":case"link":Xe("error",d),Xe("load",d);break;case"details":Xe("toggle",d);break;case"input":Yi(d,y),Xe("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},Xe("invalid",d);break;case"textarea":ma(d,y),Xe("invalid",d)}yt(o,y),g=null;for(var k in y)if(y.hasOwnProperty(k)){var L=y[k];k==="children"?typeof L=="string"?d.textContent!==L&&(y.suppressHydrationWarning!==!0&&ja(d.textContent,L,r),g=["children",L]):typeof L=="number"&&d.textContent!==""+L&&(y.suppressHydrationWarning!==!0&&ja(d.textContent,L,r),g=["children",""+L]):a.hasOwnProperty(k)&&L!=null&&k==="onScroll"&&Xe("scroll",d)}switch(o){case"input":On(d),pa(d,y,!0);break;case"textarea":On(d),Ea(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=Ba)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{k=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=K(o)),r==="http://www.w3.org/1999/xhtml"?o==="script"?(r=k.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=k.createElement(o,{is:d.is}):(r=k.createElement(o),o==="select"&&(k=r,d.multiple?k.multiple=!0:d.size&&(k.size=d.size))):r=k.createElementNS(r,o),r[Sn]=s,r[ps]=d,cp(r,s,!1,!1),s.stateNode=r;e:{switch(k=kn(o,d),o){case"dialog":Xe("cancel",r),Xe("close",r),g=d;break;case"iframe":case"object":case"embed":Xe("load",r),g=d;break;case"video":case"audio":for(g=0;g<ds.length;g++)Xe(ds[g],r);g=d;break;case"source":Xe("error",r),g=d;break;case"img":case"image":case"link":Xe("error",r),Xe("load",r),g=d;break;case"details":Xe("toggle",r),g=d;break;case"input":Yi(r,d),g=Wi(r,d),Xe("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=S({},d,{value:void 0}),Xe("invalid",r);break;case"textarea":ma(r,d),g=qi(r,d),Xe("invalid",r);break;default:g=d}yt(o,g),L=g;for(y in L)if(L.hasOwnProperty(y)){var F=L[y];y==="style"?Gn(r,F):y==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&Oe(r,F)):y==="children"?typeof F=="string"?(o!=="textarea"||F!=="")&&je(r,F):typeof F=="number"&&je(r,""+F):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?F!=null&&y==="onScroll"&&Xe("scroll",r):F!=null&&H(r,y,F,k))}switch(o){case"input":On(r),pa(r,d,!1);break;case"textarea":On(r),Ea(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Re(d.value));break;case"select":r.multiple=!!d.multiple,y=d.value,y!=null?Qn(r,!!d.multiple,y,!1):d.defaultValue!=null&&Qn(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Ba)}switch(o){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return St(s),null;case 6:if(r&&s.stateNode!=null)fp(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(o=Dr(ys.current),Dr(_n.current),Va(s)){if(d=s.stateNode,o=s.memoizedProps,d[Sn]=s,(y=d.nodeValue!==o)&&(r=Yt,r!==null))switch(r.tag){case 3:ja(d.nodeValue,o,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ja(d.nodeValue,o,(r.mode&1)!==0)}y&&(s.flags|=4)}else d=(o.nodeType===9?o:o.ownerDocument).createTextNode(d),d[Sn]=s,s.stateNode=d}return St(s),null;case 13:if(Je(nt),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(et&&Vt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)mh(),yi(),s.flags|=98560,y=!1;else if(y=Va(s),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Sn]=s}else yi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;St(s),y=!1}else cn!==null&&(Yl(cn),cn=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=o,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(nt.current&1)!==0?ft===0&&(ft=3):Ql())),s.updateQueue!==null&&(s.flags|=4),St(s),null);case 4:return Ci(),Dl(r,s),r===null&&fs(s.stateNode.containerInfo),St(s),null;case 10:return ol(s.type._context),St(s),null;case 17:return Dt(s.type)&&Ha(),St(s),null;case 19:if(Je(nt),y=s.memoizedState,y===null)return St(s),null;if(d=(s.flags&128)!==0,k=y.rendering,k===null)if(d)Ss(y,!1);else{if(ft!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(k=Ja(r),k!==null){for(s.flags|=128,Ss(y,!1),d=k.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=o,o=s.child;o!==null;)y=o,r=d,y.flags&=14680066,k=y.alternate,k===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=k.childLanes,y.lanes=k.lanes,y.child=k.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=k.memoizedProps,y.memoizedState=k.memoizedState,y.updateQueue=k.updateQueue,y.type=k.type,r=k.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),o=o.sibling;return Ke(nt,nt.current&1|2),s.child}r=r.sibling}y.tail!==null&&st()>Ni&&(s.flags|=128,d=!0,Ss(y,!1),s.lanes=4194304)}else{if(!d)if(r=Ja(k),r!==null){if(s.flags|=128,d=!0,o=r.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),Ss(y,!0),y.tail===null&&y.tailMode==="hidden"&&!k.alternate&&!et)return St(s),null}else 2*st()-y.renderingStartTime>Ni&&o!==1073741824&&(s.flags|=128,d=!0,Ss(y,!1),s.lanes=4194304);y.isBackwards?(k.sibling=s.child,s.child=k):(o=y.last,o!==null?o.sibling=k:s.child=k,y.last=k)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=st(),s.sibling=null,o=nt.current,Ke(nt,d?o&1|2:o&1),s):(St(s),null);case 22:case 23:return ql(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(qt&1073741824)!==0&&(St(s),s.subtreeFlags&6&&(s.flags|=8192)):St(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function oy(r,s){switch(nl(s),s.tag){case 1:return Dt(s.type)&&Ha(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Ci(),Je(Ot),Je(kt),ml(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return hl(s),null;case 13:if(Je(nt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));yi()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Je(nt),null;case 4:return Ci(),null;case 10:return ol(s.type._context),null;case 22:case 23:return ql(),null;case 24:return null;default:return null}}var uu=!1,_t=!1,ly=typeof WeakSet=="function"?WeakSet:Set,Te=null;function _i(r,s){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(d){it(r,s,d)}else o.current=null}function Pl(r,s,o){try{o()}catch(d){it(r,s,d)}}var hp=!1;function cy(r,s){if(qo=Na,r=Yf(),Bo(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var k=0,L=-1,F=-1,Y=0,ne=0,se=r,ee=null;t:for(;;){for(var Ee;se!==o||g!==0&&se.nodeType!==3||(L=k+g),se!==y||d!==0&&se.nodeType!==3||(F=k+d),se.nodeType===3&&(k+=se.nodeValue.length),(Ee=se.firstChild)!==null;)ee=se,se=Ee;for(;;){if(se===r)break t;if(ee===o&&++Y===g&&(L=k),ee===y&&++ne===d&&(F=k),(Ee=se.nextSibling)!==null)break;se=ee,ee=se.parentNode}se=Ee}o=L===-1||F===-1?null:{start:L,end:F}}else o=null}o=o||{start:0,end:0}}else o=null;for(Qo={focusedElem:r,selectionRange:o},Na=!1,Te=s;Te!==null;)if(s=Te,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Te=r;else for(;Te!==null;){s=Te;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var be=xe.memoizedProps,at=xe.memoizedState,U=s.stateNode,j=U.getSnapshotBeforeUpdate(s.elementType===s.type?be:dn(s.type,be),at);U.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(le){it(s,s.return,le)}if(r=s.sibling,r!==null){r.return=s.return,Te=r;break}Te=s.return}return xe=hp,hp=!1,xe}function _s(r,s,o){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var y=g.destroy;g.destroy=void 0,y!==void 0&&Pl(s,o,y)}g=g.next}while(g!==d)}}function ou(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&r)===r){var d=o.create;o.destroy=d()}o=o.next}while(o!==s)}}function Ml(r){var s=r.ref;if(s!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof s=="function"?s(r):s.current=r}}function pp(r){var s=r.alternate;s!==null&&(r.alternate=null,pp(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[Sn],delete s[ps],delete s[Jo],delete s[VT],delete s[qT])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function mp(r){return r.tag===5||r.tag===3||r.tag===4}function gp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||mp(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.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 Fl(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(r,s):o.insertBefore(r,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(r,o)):(s=o,s.appendChild(r)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=Ba));else if(d!==4&&(r=r.child,r!==null))for(Fl(r,s,o),r=r.sibling;r!==null;)Fl(r,s,o),r=r.sibling}function jl(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.insertBefore(r,s):o.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(jl(r,s,o),r=r.sibling;r!==null;)jl(r,s,o),r=r.sibling}var xt=null,fn=!1;function or(r,s,o){for(o=o.child;o!==null;)Ep(r,s,o),o=o.sibling}function Ep(r,s,o){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(ba,o)}catch{}switch(o.tag){case 5:_t||_i(o,s);case 6:var d=xt,g=fn;xt=null,or(r,s,o),xt=d,fn=g,xt!==null&&(fn?(r=xt,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):xt.removeChild(o.stateNode));break;case 18:xt!==null&&(fn?(r=xt,o=o.stateNode,r.nodeType===8?Xo(r.parentNode,o):r.nodeType===1&&Xo(r,o),rs(r)):Xo(xt,o.stateNode));break;case 4:d=xt,g=fn,xt=o.stateNode.containerInfo,fn=!0,or(r,s,o),xt=d,fn=g;break;case 0:case 11:case 14:case 15:if(!_t&&(d=o.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,k=y.destroy;y=y.tag,k!==void 0&&((y&2)!==0||(y&4)!==0)&&Pl(o,s,k),g=g.next}while(g!==d)}or(r,s,o);break;case 1:if(!_t&&(_i(o,s),d=o.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=o.memoizedProps,d.state=o.memoizedState,d.componentWillUnmount()}catch(L){it(o,s,L)}or(r,s,o);break;case 21:or(r,s,o);break;case 22:o.mode&1?(_t=(d=_t)||o.memoizedState!==null,or(r,s,o),_t=d):or(r,s,o);break;default:or(r,s,o)}}function Tp(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new ly),s.forEach(function(d){var g=yy.bind(null,r,d);o.has(d)||(o.add(d),d.then(g,g))})}}function hn(r,s){var o=s.deletions;if(o!==null)for(var d=0;d<o.length;d++){var g=o[d];try{var y=r,k=s,L=k;e:for(;L!==null;){switch(L.tag){case 5:xt=L.stateNode,fn=!1;break e;case 3:xt=L.stateNode.containerInfo,fn=!0;break e;case 4:xt=L.stateNode.containerInfo,fn=!0;break e}L=L.return}if(xt===null)throw Error(n(160));Ep(y,k,g),xt=null,fn=!1;var F=g.alternate;F!==null&&(F.return=null),g.return=null}catch(Y){it(g,s,Y)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)yp(s,r),s=s.sibling}function yp(r,s){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(hn(s,r),Nn(r),d&4){try{_s(3,r,r.return),ou(3,r)}catch(be){it(r,r.return,be)}try{_s(5,r,r.return)}catch(be){it(r,r.return,be)}}break;case 1:hn(s,r),Nn(r),d&512&&o!==null&&_i(o,o.return);break;case 5:if(hn(s,r),Nn(r),d&512&&o!==null&&_i(o,o.return),r.flags&32){var g=r.stateNode;try{je(g,"")}catch(be){it(r,r.return,be)}}if(d&4&&(g=r.stateNode,g!=null)){var y=r.memoizedProps,k=o!==null?o.memoizedProps:y,L=r.type,F=r.updateQueue;if(r.updateQueue=null,F!==null)try{L==="input"&&y.type==="radio"&&y.name!=null&&Vi(g,y),kn(L,k);var Y=kn(L,y);for(k=0;k<F.length;k+=2){var ne=F[k],se=F[k+1];ne==="style"?Gn(g,se):ne==="dangerouslySetInnerHTML"?Oe(g,se):ne==="children"?je(g,se):H(g,ne,se,Y)}switch(L){case"input":ri(g,y);break;case"textarea":ga(g,y);break;case"select":var ee=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var Ee=y.value;Ee!=null?Qn(g,!!y.multiple,Ee,!1):ee!==!!y.multiple&&(y.defaultValue!=null?Qn(g,!!y.multiple,y.defaultValue,!0):Qn(g,!!y.multiple,y.multiple?[]:"",!1))}g[ps]=y}catch(be){it(r,r.return,be)}}break;case 6:if(hn(s,r),Nn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,y=r.memoizedProps;try{g.nodeValue=y}catch(be){it(r,r.return,be)}}break;case 3:if(hn(s,r),Nn(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{rs(s.containerInfo)}catch(be){it(r,r.return,be)}break;case 4:hn(s,r),Nn(r);break;case 13:hn(s,r),Nn(r),g=r.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(Hl=st())),d&4&&Tp(r);break;case 22:if(ne=o!==null&&o.memoizedState!==null,r.mode&1?(_t=(Y=_t)||ne,hn(s,r),_t=Y):hn(s,r),Nn(r),d&8192){if(Y=r.memoizedState!==null,(r.stateNode.isHidden=Y)&&!ne&&(r.mode&1)!==0)for(Te=r,ne=r.child;ne!==null;){for(se=Te=ne;Te!==null;){switch(ee=Te,Ee=ee.child,ee.tag){case 0:case 11:case 14:case 15:_s(4,ee,ee.return);break;case 1:_i(ee,ee.return);var xe=ee.stateNode;if(typeof xe.componentWillUnmount=="function"){d=ee,o=ee.return;try{s=d,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(be){it(d,o,be)}}break;case 5:_i(ee,ee.return);break;case 22:if(ee.memoizedState!==null){kp(se);continue}}Ee!==null?(Ee.return=ee,Te=Ee):kp(se)}ne=ne.sibling}e:for(ne=null,se=r;;){if(se.tag===5){if(ne===null){ne=se;try{g=se.stateNode,Y?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(L=se.stateNode,F=se.memoizedProps.style,k=F!=null&&F.hasOwnProperty("display")?F.display:null,L.style.display=Xt("display",k))}catch(be){it(r,r.return,be)}}}else if(se.tag===6){if(ne===null)try{se.stateNode.nodeValue=Y?"":se.memoizedProps}catch(be){it(r,r.return,be)}}else if((se.tag!==22&&se.tag!==23||se.memoizedState===null||se===r)&&se.child!==null){se.child.return=se,se=se.child;continue}if(se===r)break e;for(;se.sibling===null;){if(se.return===null||se.return===r)break e;ne===se&&(ne=null),se=se.return}ne===se&&(ne=null),se.sibling.return=se.return,se=se.sibling}}break;case 19:hn(s,r),Nn(r),d&4&&Tp(r);break;case 21:break;default:hn(s,r),Nn(r)}}function Nn(r){var s=r.flags;if(s&2){try{e:{for(var o=r.return;o!==null;){if(mp(o)){var d=o;break e}o=o.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(je(g,""),d.flags&=-33);var y=gp(r);jl(r,y,g);break;case 3:case 4:var k=d.stateNode.containerInfo,L=gp(r);Fl(r,L,k);break;default:throw Error(n(161))}}catch(F){it(r,r.return,F)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function dy(r,s,o){Te=r,xp(r)}function xp(r,s,o){for(var d=(r.mode&1)!==0;Te!==null;){var g=Te,y=g.child;if(g.tag===22&&d){var k=g.memoizedState!==null||uu;if(!k){var L=g.alternate,F=L!==null&&L.memoizedState!==null||_t;L=uu;var Y=_t;if(uu=k,(_t=F)&&!Y)for(Te=g;Te!==null;)k=Te,F=k.child,k.tag===22&&k.memoizedState!==null?Cp(g):F!==null?(F.return=k,Te=F):Cp(g);for(;y!==null;)Te=y,xp(y),y=y.sibling;Te=g,uu=L,_t=Y}bp(r)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Te=y):bp(r)}}function bp(r){for(;Te!==null;){var s=Te;if((s.flags&8772)!==0){var o=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:_t||ou(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!_t)if(o===null)d.componentDidMount();else{var g=s.elementType===s.type?o.memoizedProps:dn(s.type,o.memoizedProps);d.componentDidUpdate(g,o.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&kh(s,y,d);break;case 3:var k=s.updateQueue;if(k!==null){if(o=null,s.child!==null)switch(s.child.tag){case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}kh(s,k,o)}break;case 5:var L=s.stateNode;if(o===null&&s.flags&4){o=L;var F=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&o.focus();break;case"img":F.src&&(o.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Y=s.alternate;if(Y!==null){var ne=Y.memoizedState;if(ne!==null){var se=ne.dehydrated;se!==null&&rs(se)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}_t||s.flags&512&&Ml(s)}catch(ee){it(s,s.return,ee)}}if(s===r){Te=null;break}if(o=s.sibling,o!==null){o.return=s.return,Te=o;break}Te=s.return}}function kp(r){for(;Te!==null;){var s=Te;if(s===r){Te=null;break}var o=s.sibling;if(o!==null){o.return=s.return,Te=o;break}Te=s.return}}function Cp(r){for(;Te!==null;){var s=Te;try{switch(s.tag){case 0:case 11:case 15:var o=s.return;try{ou(4,s)}catch(F){it(s,o,F)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(F){it(s,g,F)}}var y=s.return;try{Ml(s)}catch(F){it(s,y,F)}break;case 5:var k=s.return;try{Ml(s)}catch(F){it(s,k,F)}}}catch(F){it(s,s.return,F)}if(s===r){Te=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Te=L;break}Te=s.return}}var fy=Math.ceil,lu=W.ReactCurrentDispatcher,Bl=W.ReactCurrentOwner,nn=W.ReactCurrentBatchConfig,Be=0,pt=null,lt=null,bt=0,qt=0,vi=rr(0),ft=0,vs=null,Mr=0,cu=0,Ul=0,Ns=null,Mt=null,Hl=0,Ni=1/0,zn=null,du=!1,zl=null,lr=null,fu=!1,cr=null,hu=0,ws=0,$l=null,pu=-1,mu=0;function Lt(){return(Be&6)!==0?st():pu!==-1?pu:pu=st()}function dr(r){return(r.mode&1)===0?1:(Be&2)!==0&&bt!==0?bt&-bt:GT.transition!==null?(mu===0&&(mu=gf()),mu):(r=$e,r!==0||(r=window.event,r=r===void 0?16:_f(r.type)),r)}function pn(r,s,o,d){if(50<ws)throw ws=0,$l=null,Error(n(185));Ji(r,o,d),((Be&2)===0||r!==pt)&&(r===pt&&((Be&2)===0&&(cu|=o),ft===4&&fr(r,bt)),Ft(r,d),o===1&&Be===0&&(s.mode&1)===0&&(Ni=st()+500,$a&&sr()))}function Ft(r,s){var o=r.callbackNode;GE(r,s);var d=Sa(r,r===pt?bt:0);if(d===0)o!==null&&hf(o),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(o!=null&&hf(o),s===1)r.tag===0?QT(_p.bind(null,r)):ch(_p.bind(null,r)),WT(function(){(Be&6)===0&&sr()}),o=null;else{switch(Ef(d)){case 1:o=ko;break;case 4:o=pf;break;case 16:o=xa;break;case 536870912:o=mf;break;default:o=xa}o=Op(o,Sp.bind(null,r))}r.callbackPriority=s,r.callbackNode=o}}function Sp(r,s){if(pu=-1,mu=0,(Be&6)!==0)throw Error(n(327));var o=r.callbackNode;if(wi()&&r.callbackNode!==o)return null;var d=Sa(r,r===pt?bt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=gu(r,d);else{s=d;var g=Be;Be|=2;var y=Np();(pt!==r||bt!==s)&&(zn=null,Ni=st()+500,jr(r,s));do try{my();break}catch(L){vp(r,L)}while(!0);ul(),lu.current=y,Be=g,lt!==null?s=0:(pt=null,bt=0,s=ft)}if(s!==0){if(s===2&&(g=Co(r),g!==0&&(d=g,s=Wl(r,g))),s===1)throw o=vs,jr(r,0),fr(r,d),Ft(r,st()),o;if(s===6)fr(r,d);else{if(g=r.current.alternate,(d&30)===0&&!hy(g)&&(s=gu(r,d),s===2&&(y=Co(r),y!==0&&(d=y,s=Wl(r,y))),s===1))throw o=vs,jr(r,0),fr(r,d),Ft(r,st()),o;switch(r.finishedWork=g,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:Br(r,Mt,zn);break;case 3:if(fr(r,d),(d&130023424)===d&&(s=Hl+500-st(),10<s)){if(Sa(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){Lt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=Ko(Br.bind(null,r,Mt,zn),s);break}Br(r,Mt,zn);break;case 4:if(fr(r,d),(d&4194240)===d)break;for(s=r.eventTimes,g=-1;0<d;){var k=31-on(d);y=1<<k,k=s[k],k>g&&(g=k),d&=~y}if(d=g,d=st()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*fy(d/1960))-d,10<d){r.timeoutHandle=Ko(Br.bind(null,r,Mt,zn),d);break}Br(r,Mt,zn);break;case 5:Br(r,Mt,zn);break;default:throw Error(n(329))}}}return Ft(r,st()),r.callbackNode===o?Sp.bind(null,r):null}function Wl(r,s){var o=Ns;return r.current.memoizedState.isDehydrated&&(jr(r,s).flags|=256),r=gu(r,s),r!==2&&(s=Mt,Mt=o,s!==null&&Yl(s)),r}function Yl(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function hy(r){for(var s=r;;){if(s.flags&16384){var o=s.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var d=0;d<o.length;d++){var g=o[d],y=g.getSnapshot;g=g.value;try{if(!ln(y(),g))return!1}catch{return!1}}}if(o=s.child,s.subtreeFlags&16384&&o!==null)o.return=s,s=o;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function fr(r,s){for(s&=~Ul,s&=~cu,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var o=31-on(s),d=1<<o;r[o]=-1,s&=~d}}function _p(r){if((Be&6)!==0)throw Error(n(327));wi();var s=Sa(r,0);if((s&1)===0)return Ft(r,st()),null;var o=gu(r,s);if(r.tag!==0&&o===2){var d=Co(r);d!==0&&(s=d,o=Wl(r,d))}if(o===1)throw o=vs,jr(r,0),fr(r,s),Ft(r,st()),o;if(o===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Br(r,Mt,zn),Ft(r,st()),null}function Vl(r,s){var o=Be;Be|=1;try{return r(s)}finally{Be=o,Be===0&&(Ni=st()+500,$a&&sr())}}function Fr(r){cr!==null&&cr.tag===0&&(Be&6)===0&&wi();var s=Be;Be|=1;var o=nn.transition,d=$e;try{if(nn.transition=null,$e=1,r)return r()}finally{$e=d,nn.transition=o,Be=s,(Be&6)===0&&sr()}}function ql(){qt=vi.current,Je(vi)}function jr(r,s){r.finishedWork=null,r.finishedLanes=0;var o=r.timeoutHandle;if(o!==-1&&(r.timeoutHandle=-1,$T(o)),lt!==null)for(o=lt.return;o!==null;){var d=o;switch(nl(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Ha();break;case 3:Ci(),Je(Ot),Je(kt),ml();break;case 5:hl(d);break;case 4:Ci();break;case 13:Je(nt);break;case 19:Je(nt);break;case 10:ol(d.type._context);break;case 22:case 23:ql()}o=o.return}if(pt=r,lt=r=hr(r.current,null),bt=qt=s,ft=0,vs=null,Ul=cu=Mr=0,Mt=Ns=null,Or!==null){for(s=0;s<Or.length;s++)if(o=Or[s],d=o.interleaved,d!==null){o.interleaved=null;var g=d.next,y=o.pending;if(y!==null){var k=y.next;y.next=g,d.next=k}o.pending=d}Or=null}return r}function vp(r,s){do{var o=lt;try{if(ul(),Za.current=ru,eu){for(var d=rt.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}eu=!1}if(Pr=0,ht=dt=rt=null,xs=!1,bs=0,Bl.current=null,o===null||o.return===null){ft=1,vs=s,lt=null;break}e:{var y=r,k=o.return,L=o,F=s;if(s=bt,L.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var Y=F,ne=L,se=ne.tag;if((ne.mode&1)===0&&(se===0||se===11||se===15)){var ee=ne.alternate;ee?(ne.updateQueue=ee.updateQueue,ne.memoizedState=ee.memoizedState,ne.lanes=ee.lanes):(ne.updateQueue=null,ne.memoizedState=null)}var Ee=Xh(k);if(Ee!==null){Ee.flags&=-257,Jh(Ee,k,L,y,s),Ee.mode&1&&Kh(y,Y,s),s=Ee,F=Y;var xe=s.updateQueue;if(xe===null){var be=new Set;be.add(F),s.updateQueue=be}else xe.add(F);break e}else{if((s&1)===0){Kh(y,Y,s),Ql();break e}F=Error(n(426))}}else if(et&&L.mode&1){var at=Xh(k);if(at!==null){(at.flags&65536)===0&&(at.flags|=256),Jh(at,k,L,y,s),sl(Si(F,L));break e}}y=F=Si(F,L),ft!==4&&(ft=2),Ns===null?Ns=[y]:Ns.push(y),y=k;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var U=Qh(y,F,s);bh(y,U);break e;case 1:L=F;var j=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(lr===null||!lr.has($)))){y.flags|=65536,s&=-s,y.lanes|=s;var le=Gh(y,L,s);bh(y,le);break e}}y=y.return}while(y!==null)}Ap(o)}catch(ke){s=ke,lt===o&&o!==null&&(lt=o=o.return);continue}break}while(!0)}function Np(){var r=lu.current;return lu.current=ru,r===null?ru:r}function Ql(){(ft===0||ft===3||ft===2)&&(ft=4),pt===null||(Mr&268435455)===0&&(cu&268435455)===0||fr(pt,bt)}function gu(r,s){var o=Be;Be|=2;var d=Np();(pt!==r||bt!==s)&&(zn=null,jr(r,s));do try{py();break}catch(g){vp(r,g)}while(!0);if(ul(),Be=o,lu.current=d,lt!==null)throw Error(n(261));return pt=null,bt=0,ft}function py(){for(;lt!==null;)wp(lt)}function my(){for(;lt!==null&&!UE();)wp(lt)}function wp(r){var s=Rp(r.alternate,r,qt);r.memoizedProps=r.pendingProps,s===null?Ap(r):lt=s,Bl.current=null}function Ap(r){var s=r;do{var o=s.alternate;if(r=s.return,(s.flags&32768)===0){if(o=uy(o,s,qt),o!==null){lt=o;return}}else{if(o=oy(o,s),o!==null){o.flags&=32767,lt=o;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ft=6,lt=null;return}}if(s=s.sibling,s!==null){lt=s;return}lt=s=r}while(s!==null);ft===0&&(ft=5)}function Br(r,s,o){var d=$e,g=nn.transition;try{nn.transition=null,$e=1,gy(r,s,o,d)}finally{nn.transition=g,$e=d}return null}function gy(r,s,o,d){do wi();while(cr!==null);if((Be&6)!==0)throw Error(n(327));o=r.finishedWork;var g=r.finishedLanes;if(o===null)return null;if(r.finishedWork=null,r.finishedLanes=0,o===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var y=o.lanes|o.childLanes;if(KE(r,y),r===pt&&(lt=pt=null,bt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||fu||(fu=!0,Op(xa,function(){return wi(),null})),y=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||y){y=nn.transition,nn.transition=null;var k=$e;$e=1;var L=Be;Be|=4,Bl.current=null,cy(r,o),yp(o,r),MT(Qo),Na=!!qo,Qo=qo=null,r.current=o,dy(o),HE(),Be=L,$e=k,nn.transition=y}else r.current=o;if(fu&&(fu=!1,cr=r,hu=g),y=r.pendingLanes,y===0&&(lr=null),WE(o.stateNode),Ft(r,st()),s!==null)for(d=r.onRecoverableError,o=0;o<s.length;o++)g=s[o],d(g.value,{componentStack:g.stack,digest:g.digest});if(du)throw du=!1,r=zl,zl=null,r;return(hu&1)!==0&&r.tag!==0&&wi(),y=r.pendingLanes,(y&1)!==0?r===$l?ws++:(ws=0,$l=r):ws=0,sr(),null}function wi(){if(cr!==null){var r=Ef(hu),s=nn.transition,o=$e;try{if(nn.transition=null,$e=16>r?16:r,cr===null)var d=!1;else{if(r=cr,cr=null,hu=0,(Be&6)!==0)throw Error(n(331));var g=Be;for(Be|=4,Te=r.current;Te!==null;){var y=Te,k=y.child;if((Te.flags&16)!==0){var L=y.deletions;if(L!==null){for(var F=0;F<L.length;F++){var Y=L[F];for(Te=Y;Te!==null;){var ne=Te;switch(ne.tag){case 0:case 11:case 15:_s(8,ne,y)}var se=ne.child;if(se!==null)se.return=ne,Te=se;else for(;Te!==null;){ne=Te;var ee=ne.sibling,Ee=ne.return;if(pp(ne),ne===Y){Te=null;break}if(ee!==null){ee.return=Ee,Te=ee;break}Te=Ee}}}var xe=y.alternate;if(xe!==null){var be=xe.child;if(be!==null){xe.child=null;do{var at=be.sibling;be.sibling=null,be=at}while(be!==null)}}Te=y}}if((y.subtreeFlags&2064)!==0&&k!==null)k.return=y,Te=k;else e:for(;Te!==null;){if(y=Te,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:_s(9,y,y.return)}var U=y.sibling;if(U!==null){U.return=y.return,Te=U;break e}Te=y.return}}var j=r.current;for(Te=j;Te!==null;){k=Te;var $=k.child;if((k.subtreeFlags&2064)!==0&&$!==null)$.return=k,Te=$;else e:for(k=j;Te!==null;){if(L=Te,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:ou(9,L)}}catch(ke){it(L,L.return,ke)}if(L===k){Te=null;break e}var le=L.sibling;if(le!==null){le.return=L.return,Te=le;break e}Te=L.return}}if(Be=g,sr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(ba,r)}catch{}d=!0}return d}finally{$e=o,nn.transition=s}}return!1}function Ip(r,s,o){s=Si(o,s),s=Qh(r,s,1),r=ur(r,s,1),s=Lt(),r!==null&&(Ji(r,1,s),Ft(r,s))}function it(r,s,o){if(r.tag===3)Ip(r,r,o);else for(;s!==null;){if(s.tag===3){Ip(s,r,o);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(lr===null||!lr.has(d))){r=Si(o,r),r=Gh(s,r,1),s=ur(s,r,1),r=Lt(),s!==null&&(Ji(s,1,r),Ft(s,r));break}}s=s.return}}function Ey(r,s,o){var d=r.pingCache;d!==null&&d.delete(s),s=Lt(),r.pingedLanes|=r.suspendedLanes&o,pt===r&&(bt&o)===o&&(ft===4||ft===3&&(bt&130023424)===bt&&500>st()-Hl?jr(r,0):Ul|=o),Ft(r,s)}function Lp(r,s){s===0&&((r.mode&1)===0?s=1:(s=Ca,Ca<<=1,(Ca&130023424)===0&&(Ca=4194304)));var o=Lt();r=Bn(r,s),r!==null&&(Ji(r,s,o),Ft(r,o))}function Ty(r){var s=r.memoizedState,o=0;s!==null&&(o=s.retryLane),Lp(r,o)}function yy(r,s){var o=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(o=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),Lp(r,o)}var Rp;Rp=function(r,s,o){if(r!==null)if(r.memoizedProps!==s.pendingProps||Ot.current)Pt=!0;else{if((r.lanes&o)===0&&(s.flags&128)===0)return Pt=!1,ay(r,s,o);Pt=(r.flags&131072)!==0}else Pt=!1,et&&(s.flags&1048576)!==0&&dh(s,Ya,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;au(r,s),r=s.pendingProps;var g=gi(s,kt.current);ki(s,o),g=Tl(null,s,d,r,g,o);var y=yl();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dt(d)?(y=!0,za(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,dl(s),g.updater=iu,s.stateNode=g,g._reactInternals=s,_l(s,d,r,o),s=Al(null,s,d,!0,y,o)):(s.tag=0,et&&y&&tl(s),It(null,s,g,o),s=s.child),s;case 16:d=s.elementType;e:{switch(au(r,s),r=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=by(d),r=dn(d,r),g){case 0:s=wl(null,s,d,r,o);break e;case 1:s=ip(null,s,d,r,o);break e;case 11:s=Zh(null,s,d,r,o);break e;case 14:s=ep(null,s,d,dn(d.type,r),o);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:dn(d,g),wl(r,s,d,g,o);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:dn(d,g),ip(r,s,d,g,o);case 3:e:{if(sp(s),r===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,xh(r,s),Xa(s,d,null,o);var k=s.memoizedState;if(d=k.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=Si(Error(n(423)),s),s=ap(r,s,d,o,g);break e}else if(d!==g){g=Si(Error(n(424)),s),s=ap(r,s,d,o,g);break e}else for(Vt=nr(s.stateNode.containerInfo.firstChild),Yt=s,et=!0,cn=null,o=Th(s,null,d,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(yi(),d===g){s=Hn(r,s,o);break e}It(r,s,d,o)}s=s.child}return s;case 5:return Ch(s),r===null&&il(s),d=s.type,g=s.pendingProps,y=r!==null?r.memoizedProps:null,k=g.children,Go(d,g)?k=null:y!==null&&Go(d,y)&&(s.flags|=32),rp(r,s),It(r,s,k,o),s.child;case 6:return r===null&&il(s),null;case 13:return up(r,s,o);case 4:return fl(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=xi(s,null,d,o):It(r,s,d,o),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:dn(d,g),Zh(r,s,d,g,o);case 7:return It(r,s,s.pendingProps,o),s.child;case 8:return It(r,s,s.pendingProps.children,o),s.child;case 12:return It(r,s,s.pendingProps.children,o),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,k=g.value,Ke(Qa,d._currentValue),d._currentValue=k,y!==null)if(ln(y.value,k)){if(y.children===g.children&&!Ot.current){s=Hn(r,s,o);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var L=y.dependencies;if(L!==null){k=y.child;for(var F=L.firstContext;F!==null;){if(F.context===d){if(y.tag===1){F=Un(-1,o&-o),F.tag=2;var Y=y.updateQueue;if(Y!==null){Y=Y.shared;var ne=Y.pending;ne===null?F.next=F:(F.next=ne.next,ne.next=F),Y.pending=F}}y.lanes|=o,F=y.alternate,F!==null&&(F.lanes|=o),ll(y.return,o,s),L.lanes|=o;break}F=F.next}}else if(y.tag===10)k=y.type===s.type?null:y.child;else if(y.tag===18){if(k=y.return,k===null)throw Error(n(341));k.lanes|=o,L=k.alternate,L!==null&&(L.lanes|=o),ll(k,o,s),k=y.sibling}else k=y.child;if(k!==null)k.return=y;else for(k=y;k!==null;){if(k===s){k=null;break}if(y=k.sibling,y!==null){y.return=k.return,k=y;break}k=k.return}y=k}It(r,s,g.children,o),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,ki(s,o),g=en(g),d=d(g),s.flags|=1,It(r,s,d,o),s.child;case 14:return d=s.type,g=dn(d,s.pendingProps),g=dn(d.type,g),ep(r,s,d,g,o);case 15:return tp(r,s,s.type,s.pendingProps,o);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:dn(d,g),au(r,s),s.tag=1,Dt(d)?(r=!0,za(s)):r=!1,ki(s,o),Vh(s,d,g),_l(s,d,g,o),Al(null,s,d,!0,r,o);case 19:return lp(r,s,o);case 22:return np(r,s,o)}throw Error(n(156,s.tag))};function Op(r,s){return ff(r,s)}function xy(r,s,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(r,s,o,d){return new xy(r,s,o,d)}function Gl(r){return r=r.prototype,!(!r||!r.isReactComponent)}function by(r){if(typeof r=="function")return Gl(r)?1:0;if(r!=null){if(r=r.$$typeof,r===V)return 11;if(r===re)return 14}return 2}function hr(r,s){var o=r.alternate;return o===null?(o=rn(r.tag,s,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=s,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,s=r.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Eu(r,s,o,d,g,y){var k=2;if(d=r,typeof r=="function")Gl(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case ie:return Ur(o.children,g,y,s);case Z:k=8,g|=8;break;case ce:return r=rn(12,o,s,g|2),r.elementType=ce,r.lanes=y,r;case de:return r=rn(13,o,s,g),r.elementType=de,r.lanes=y,r;case he:return r=rn(19,o,s,g),r.elementType=he,r.lanes=y,r;case ye:return Tu(o,g,y,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case M:k=10;break e;case pe:k=9;break e;case V:k=11;break e;case re:k=14;break e;case X:k=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=rn(k,o,s,g),s.elementType=r,s.type=d,s.lanes=y,s}function Ur(r,s,o,d){return r=rn(7,r,d,s),r.lanes=o,r}function Tu(r,s,o,d){return r=rn(22,r,d,s),r.elementType=ye,r.lanes=o,r.stateNode={isHidden:!1},r}function Kl(r,s,o){return r=rn(6,r,null,s),r.lanes=o,r}function Xl(r,s,o){return s=rn(4,r.children!==null?r.children:[],r.key,s),s.lanes=o,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function ky(r,s,o,d,g){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=So(0),this.expirationTimes=So(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=So(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Jl(r,s,o,d,g,y,k,L,F){return r=new ky(r,s,o,L,F),s===1?(s=1,y===!0&&(s|=8)):s=0,y=rn(3,null,null,s),r.current=y,y.stateNode=r,y.memoizedState={element:d,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},dl(y),r}function Cy(r,s,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:r,containerInfo:s,implementation:o}}function Dp(r){if(!r)return ir;r=r._reactInternals;e:{if(wr(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Dt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var o=r.type;if(Dt(o))return oh(r,o,s)}return s}function Pp(r,s,o,d,g,y,k,L,F){return r=Jl(o,d,!0,r,g,y,k,L,F),r.context=Dp(null),o=r.current,d=Lt(),g=dr(o),y=Un(d,g),y.callback=s??null,ur(o,y,g),r.current.lanes=g,Ji(r,g,d),Ft(r,d),r}function yu(r,s,o,d){var g=s.current,y=Lt(),k=dr(g);return o=Dp(o),s.context===null?s.context=o:s.pendingContext=o,s=Un(y,k),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=ur(g,s,k),r!==null&&(pn(r,g,k,y),Ka(r,g,k)),k}function xu(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Mp(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<s?o:s}}function Zl(r,s){Mp(r,s),(r=r.alternate)&&Mp(r,s)}function Sy(){return null}var Fp=typeof reportError=="function"?reportError:function(r){console.error(r)};function ec(r){this._internalRoot=r}bu.prototype.render=ec.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));yu(r,s,null,null)},bu.prototype.unmount=ec.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Fr(function(){yu(null,r,null,null)}),s[Pn]=null}};function bu(r){this._internalRoot=r}bu.prototype.unstable_scheduleHydration=function(r){if(r){var s=xf();r={blockedOn:null,target:r,priority:s};for(var o=0;o<Zn.length&&s!==0&&s<Zn[o].priority;o++);Zn.splice(o,0,r),o===0&&Cf(r)}};function tc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function ku(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function jp(){}function _y(r,s,o,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var Y=xu(k);y.call(Y)}}var k=Pp(s,d,r,0,null,!1,!1,"",jp);return r._reactRootContainer=k,r[Pn]=k.current,fs(r.nodeType===8?r.parentNode:r),Fr(),k}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var L=d;d=function(){var Y=xu(F);L.call(Y)}}var F=Jl(r,0,!1,null,null,!1,!1,"",jp);return r._reactRootContainer=F,r[Pn]=F.current,fs(r.nodeType===8?r.parentNode:r),Fr(function(){yu(s,F,o,d)}),F}function Cu(r,s,o,d,g){var y=o._reactRootContainer;if(y){var k=y;if(typeof g=="function"){var L=g;g=function(){var F=xu(k);L.call(F)}}yu(s,k,r,g)}else k=_y(o,s,r,g,d);return xu(k)}Tf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var o=Xi(s.pendingLanes);o!==0&&(_o(s,o|1),Ft(s,st()),(Be&6)===0&&(Ni=st()+500,sr()))}break;case 13:Fr(function(){var d=Bn(r,1);if(d!==null){var g=Lt();pn(d,r,1,g)}}),Zl(r,1)}},vo=function(r){if(r.tag===13){var s=Bn(r,134217728);if(s!==null){var o=Lt();pn(s,r,134217728,o)}Zl(r,134217728)}},yf=function(r){if(r.tag===13){var s=dr(r),o=Bn(r,s);if(o!==null){var d=Lt();pn(o,r,s,d)}Zl(r,s)}},xf=function(){return $e},bf=function(r,s){var o=$e;try{return $e=r,s()}finally{$e=o}},To=function(r,s,o){switch(s){case"input":if(ri(r,o),s=o.name,o.type==="radio"&&s!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<o.length;s++){var d=o[s];if(d!==r&&d.form===r.form){var g=Ua(d);if(!g)throw Error(n(90));ha(d),ri(d,g)}}}break;case"textarea":ga(r,o);break;case"select":s=o.value,s!=null&&Qn(r,!!o.multiple,s,!1)}},sf=Vl,af=Fr;var vy={usingClientEntryPoint:!1,Events:[ms,pi,Ua,nf,rf,Vl]},As={findFiberByHostInstance:Ar,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ny={bundleType:As.bundleType,version:As.version,rendererPackageName:As.rendererPackageName,rendererConfig:As.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:W.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=cf(r),r===null?null:r.stateNode},findFiberByHostInstance:As.findFiberByHostInstance||Sy,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{ba=Su.inject(Ny),Cn=Su}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vy,jt.createPortal=function(r,s){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!tc(s))throw Error(n(200));return Cy(r,s,null,o)},jt.createRoot=function(r,s){if(!tc(r))throw Error(n(299));var o=!1,d="",g=Fp;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Jl(r,1,!1,null,null,o,!1,d,g),r[Pn]=s.current,fs(r.nodeType===8?r.parentNode:r),new ec(s)},jt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=cf(s),r=r===null?null:r.stateNode,r},jt.flushSync=function(r){return Fr(r)},jt.hydrate=function(r,s,o){if(!ku(s))throw Error(n(200));return Cu(null,r,s,!0,o)},jt.hydrateRoot=function(r,s,o){if(!tc(r))throw Error(n(405));var d=o!=null&&o.hydratedSources||null,g=!1,y="",k=Fp;if(o!=null&&(o.unstable_strictMode===!0&&(g=!0),o.identifierPrefix!==void 0&&(y=o.identifierPrefix),o.onRecoverableError!==void 0&&(k=o.onRecoverableError)),s=Pp(s,null,r,1,o??null,g,!1,y,k),r[Pn]=s.current,fs(r),d)for(r=0;r<d.length;r++)o=d[r],g=o._getVersion,g=g(o._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[o,g]:s.mutableSourceEagerHydrationData.push(o,g);return new bu(s)},jt.render=function(r,s,o){if(!ku(s))throw Error(n(200));return Cu(null,r,s,!1,o)},jt.unmountComponentAtNode=function(r){if(!ku(r))throw Error(n(40));return r._reactRootContainer?(Fr(function(){Cu(null,null,r,!1,function(){r._reactRootContainer=null,r[Pn]=null})}),!0):!1},jt.unstable_batchedUpdates=Vl,jt.unstable_renderSubtreeIntoContainer=function(r,s,o,d){if(!ku(o))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Cu(r,s,o,!1,d)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var Vp;function z0(){if(Vp)return ic.exports;Vp=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(),ic.exports=My(),ic.exports}var qp;function Fy(){if(qp)return _u;qp=1;var e=z0();return _u.createRoot=e.createRoot,_u.hydrateRoot=e.hydrateRoot,_u}var jy=Fy();/**
|
|
42
|
+
* react-router v7.18.2
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/var gd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,$0=/^[\\/]{2}/;function By(e,t){return t+e.replace(/\\/g,"/")}var Qp="popstate";function Gp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Uy(e={}){function t(i,a){var p;let u=(p=a.state)==null?void 0:p.masked,{pathname:l,search:c,hash:f}=u||i.location;return Hc("",{pathname:l,search:c,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",u?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,a){return typeof a=="string"?a:Gs(a)}return zy(t,n,null,e)}function Ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Hy(){return Math.random().toString(36).substring(2,10)}function Kp(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Hc(e,t,n=null,i,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Mi(t):t,state:n,key:t&&t.key||i||Hy(),mask:a}}function Gs({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Mi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function zy(e,t,n,i={}){let{window:a=document.defaultView,v5Compat:u=!1}=i,l=a.history,c="POP",f=null,p=T();p==null&&(p=0,l.replaceState({...l.state,idx:p},""));function T(){return(l.state||{idx:null}).idx}function E(){c="POP";let D=T(),I=D==null?null:D-p;p=D,f&&f({action:c,location:v.location,delta:I})}function b(D,I){c="PUSH";let R=Gp(D)?D:Hc(v.location,D,I);p=T()+1;let H=Kp(R,p),W=v.createHref(R.mask||R);try{l.pushState(H,"",W)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;a.location.assign(W)}u&&f&&f({action:c,location:v.location,delta:1})}function x(D,I){c="REPLACE";let R=Gp(D)?D:Hc(v.location,D,I);p=T();let H=Kp(R,p),W=v.createHref(R.mask||R);l.replaceState(H,"",W),u&&f&&f({action:c,location:v.location,delta:0})}function C(D){return $y(a,D)}let v={get action(){return c},get location(){return e(a,l)},listen(D){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Qp,E),f=D,()=>{a.removeEventListener(Qp,E),f=null}},createHref(D){return t(a,D)},createURL:C,encodeLocation(D){let I=C(D);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:b,replace:x,go(D){return l.go(D)}};return v}function $y(e,t,n=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),Ze(i,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Gs(t);return a=a.replace(/ $/,"%20"),!n&&$0.test(a)&&(a=i+a),new URL(a,i)}function W0(e,t,n="/"){return Wy(e,t,n,!1)}function Wy(e,t,n,i,a){let u=typeof t=="string"?Mi(t):t,l=Wn(u.pathname||"/",n);if(l==null)return null;let c=Yy(e),f=null,p=G0(l);for(let T=0;f==null&&T<c.length;++T)f=tx(c[T],p,i);return f}function Yy(e){let t=Y0(e);return Vy(t),t}function Y0(e,t=[],n=[],i="",a=!1){let u=(l,c,f=a,p)=>{let T={relativePath:p===void 0?l.path||"":p,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(i)&&f)return;Ze(T.relativePath.startsWith(i),`Absolute route path "${T.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(i.length)}let E=En([i,T.relativePath]),b=n.concat(T);l.children&&l.children.length>0&&(Ze(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Y0(l.children,t,b,E,f)),!(l.path==null&&!l.index)&&t.push({path:E,score:Zy(E,l.index),routesMeta:b.map((x,C)=>{let[v,D]=Q0(x.relativePath,x.caseSensitive,C===b.length-1);return{...x,matcher:v,compiledParams:D}})})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))u(l,c);else for(let p of V0(l.path))u(l,c,!0,p)}),t}function V0(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,a=n.endsWith("?"),u=n.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let l=V0(i.join("/")),c=[];return c.push(...l.map(f=>f===""?u:[u,f].join("/"))),a&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function Vy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ex(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var qy=/^:[\w-]+$/,Qy=3,Gy=2,Ky=1,Xy=10,Jy=-2,Xp=e=>e==="*";function Zy(e,t){let n=e.split("/"),i=n.length;return n.some(Xp)&&(i+=Jy),t&&(i+=Gy),n.filter(a=>!Xp(a)).reduce((a,u)=>a+(qy.test(u)?Qy:u===""?Ky:Xy),i)}function ex(e,t){return e.length===t.length&&e.slice(0,-1).every((i,a)=>i===t[a])?e[e.length-1]-t[t.length-1]:0}function tx(e,t,n=!1){let{routesMeta:i}=e,a={},u="/",l=[];for(let c=0;c<i.length;++c){let f=i[c],p=c===i.length-1,T=u==="/"?t:t.slice(u.length)||"/",E={path:f.relativePath,caseSensitive:f.caseSensitive,end:p},b=f.matcher&&f.compiledParams?q0(E,T,f.matcher,f.compiledParams):Ks(E,T),x=f.route;if(!b&&p&&n&&!i[i.length-1].route.index&&(b=Ks({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},T)),!b)return null;Object.assign(a,b.params),l.push({params:a,pathname:En([u,b.pathname]),pathnameBase:ix(En([u,b.pathnameBase])),route:x}),b.pathnameBase!=="/"&&(u=En([u,b.pathnameBase]))}return l}function Ks(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=Q0(e.path,e.caseSensitive,e.end);return q0(e,t,n,i)}function q0(e,t,n,i){let a=t.match(n);if(!a)return null;let u=a[0],l=u.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:i.reduce((p,{paramName:T,isOptional:E},b)=>{if(T==="*"){let C=c[b]||"";l=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const x=c[b];return E&&!x?p[T]=void 0:p[T]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:u,pathnameBase:l,pattern:e}}function Q0(e,t=!1,n=!0){yn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,f,p,T)=>{if(i.push({paramName:c,isOptional:f!=null}),f){let E=T.charAt(p+l.length);return E&&E!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),i]}function G0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}function nx(e,t="/"){let{pathname:n,search:i="",hash:a=""}=typeof e=="string"?Mi(e):e,u;return n?(n=K0(n),n.startsWith("/")?u=Jp(n.substring(1),"/"):u=Jp(n,t)):u=t,{pathname:u,search:sx(i),hash:ax(a)}}function Jp(e,t){let n=Wu(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function uc(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ed(e){let t=rx(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Zu(e,t,n,i=!1){let a;typeof e=="string"?a=Mi(e):(a={...e},Ze(!a.pathname||!a.pathname.includes("?"),uc("?","pathname","search",a)),Ze(!a.pathname||!a.pathname.includes("#"),uc("#","pathname","hash",a)),Ze(!a.search||!a.search.includes("#"),uc("#","search","hash",a)));let u=e===""||a.pathname==="",l=u?"/":a.pathname,c;if(l==null)c=n;else{let E=t.length-1;if(!i&&l.startsWith("..")){let b=l.split("/");for(;b[0]==="..";)b.shift(),E-=1;a.pathname=b.join("/")}c=E>=0?t[E]:"/"}let f=nx(a,c),p=l&&l!=="/"&&l.endsWith("/"),T=(u||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||T)&&(f.pathname+="/"),f}var K0=e=>e.replace(/[\\/]{2,}/g,"/"),En=e=>K0(e.join("/")),Wu=e=>e.replace(/\/+$/,""),ix=e=>Wu(e).replace(/^\/*/,"/"),sx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ax=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ux=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ox(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function lx(e){let t=e.map(n=>n.route.path).filter(Boolean);return En(t)||"/"}var X0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function J0(e,t){let n=e;if(typeof n!="string"||!gd.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,a=!1;if(X0)try{let u=new URL(window.location.href),l=$0.test(n)?new URL(By(n,u.protocol)):new URL(n),c=Wn(l.pathname,t);l.origin===u.origin&&c!=null?n=c+l.search+l.hash:a=!0}catch{yn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z0=["POST","PUT","PATCH","DELETE"];new Set(Z0);var cx=["GET",...Z0];new Set(cx);var dx=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function fx(e){try{return dx.includes(new URL(e).protocol)}catch{return!1}}var Fi=_.createContext(null);Fi.displayName="DataRouter";var eo=_.createContext(null);eo.displayName="DataRouterState";var eg=_.createContext(!1);function hx(){return _.useContext(eg)}var tg=_.createContext({isTransitioning:!1});tg.displayName="ViewTransition";var px=_.createContext(new Map);px.displayName="Fetchers";var mx=_.createContext(null);mx.displayName="Await";var Kt=_.createContext(null);Kt.displayName="Navigation";var ta=_.createContext(null);ta.displayName="Location";var In=_.createContext({outlet:null,matches:[],isDataRoute:!1});In.displayName="Route";var Td=_.createContext(null);Td.displayName="RouteError";var ng="REACT_ROUTER_ERROR",gx="REDIRECT",Ex="ROUTE_ERROR_RESPONSE";function Tx(e){if(e.startsWith(`${ng}:${gx}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function yx(e){if(e.startsWith(`${ng}:${Ex}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ux(t.status,t.statusText,t.data)}catch{}}function xx(e,{relative:t}={}){Ze(Xr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=_.useContext(Kt),{hash:a,pathname:u,search:l}=na(e,{relative:t}),c=u;return n!=="/"&&(c=u==="/"?n:En([n,u])),i.createHref({pathname:c,search:l,hash:a})}function Xr(){return _.useContext(ta)!=null}function xn(){return Ze(Xr(),"useLocation() may be used only in the context of a <Router> component."),_.useContext(ta).location}function Zp(e){Ze(Xr(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=xn();return _.useMemo(()=>Ks(e,G0(t)),[t,e])}var rg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ig(e){_.useContext(Kt).static||_.useLayoutEffect(e)}function yd(){let{isDataRoute:e}=_.useContext(In);return e?Ox():bx()}function bx(){Ze(Xr(),"useNavigate() may be used only in the context of a <Router> component.");let e=_.useContext(Fi),{basename:t,navigator:n}=_.useContext(Kt),{matches:i}=_.useContext(In),{pathname:a}=xn(),u=JSON.stringify(Ed(i)),l=_.useRef(!1);return ig(()=>{l.current=!0}),_.useCallback((f,p={})=>{if(yn(l.current,rg),!l.current)return;if(typeof f=="number"){n.go(f);return}let T=Zu(f,JSON.parse(u),a,p.relative==="path");e==null&&t!=="/"&&(T.pathname=T.pathname==="/"?t:En([t,T.pathname])),(p.replace?n.replace:n.push)(T,p.state,p)},[t,n,u,a,e])}_.createContext(null);function na(e,{relative:t}={}){let{matches:n}=_.useContext(In),{pathname:i}=xn(),a=JSON.stringify(Ed(n));return _.useMemo(()=>Zu(e,JSON.parse(a),i,t==="path"),[e,a,i,t])}function kx(e,t){return sg(e,t)}function sg(e,t,n){var D;Ze(Xr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=_.useContext(Kt),{matches:a}=_.useContext(In),u=a[a.length-1],l=u?u.params:{},c=u?u.pathname:"/",f=u?u.pathnameBase:"/",p=u&&u.route;{let I=p&&p.path||"";ug(c,!p||I.endsWith("*")||I.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${I}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
51
|
+
|
|
52
|
+
Please change the parent <Route path="${I}"> to <Route path="${I==="/"?"*":`${I}/*`}">.`)}let T=xn(),E;if(t){let I=typeof t=="string"?Mi(t):t;Ze(f==="/"||((D=I.pathname)==null?void 0:D.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${I.pathname}" was given in the \`location\` prop.`),E=I}else E=T;let b=E.pathname||"/",x=b;if(f!=="/"){let I=f.replace(/^\//,"").split("/");x="/"+b.replace(/^\//,"").split("/").slice(I.length).join("/")}let C=n&&n.state.matches.length?n.state.matches.map(I=>Object.assign(I,{route:n.manifest[I.route.id]||I.route})):W0(e,{pathname:x});yn(p||C!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),yn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=Nx(C&&C.map(I=>Object.assign({},I,{params:Object.assign({},l,I.params),pathname:En([f,i.encodeLocation?i.encodeLocation(I.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:I.pathname]),pathnameBase:I.pathnameBase==="/"?f:En([f,i.encodeLocation?i.encodeLocation(I.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:I.pathnameBase])})),a,n);return t&&v?_.createElement(ta.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...E},navigationType:"POP"}},v):v}function Cx(){let e=Rx(),t=ox(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:u},"ErrorBoundary")," or"," ",_.createElement("code",{style:u},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),n?_.createElement("pre",{style:a},n):null,l)}var Sx=_.createElement(Cx,null),ag=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=yx(e.digest);n&&(e=n)}let t=e!==void 0?_.createElement(In.Provider,{value:this.props.routeContext},_.createElement(Td.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?_.createElement(_x,{error:e},t):t}};ag.contextType=eg;var oc=new WeakMap;function _x({children:e,error:t}){let{basename:n}=_.useContext(Kt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=Tx(t.digest);if(i){let a=oc.get(t);if(a)throw a;let u=J0(i.location,n),l=u.absoluteURL||u.to;if(fx(l))throw new Error("Invalid redirect location");if(X0&&!oc.get(t))if(u.isExternal||i.reloadDocument)window.location.href=l;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw oc.set(t,c),c}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function vx({routeContext:e,match:t,children:n}){let i=_.useContext(Fi);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(In.Provider,{value:e},n)}function Nx(e,t=[],n){let i=n==null?void 0:n.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,u=i==null?void 0:i.errors;if(u!=null){let T=a.findIndex(E=>E.route.id&&(u==null?void 0:u[E.route.id])!==void 0);Ze(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,T+1))}let l=!1,c=-1;if(n&&i){l=i.renderFallback;for(let T=0;T<a.length;T++){let E=a[T];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(c=T),E.route.id){let{loaderData:b,errors:x}=i,C=E.route.loader&&!b.hasOwnProperty(E.route.id)&&(!x||x[E.route.id]===void 0);if(E.route.lazy||C){n.isStatic&&(l=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,p=i&&f?(T,E)=>{var b,x;f(T,{location:i.location,params:((x=(b=i.matches)==null?void 0:b[0])==null?void 0:x.params)??{},pattern:lx(i.matches),errorInfo:E})}:void 0;return a.reduceRight((T,E,b)=>{let x,C=!1,v=null,D=null;i&&(x=u&&E.route.id?u[E.route.id]:void 0,v=E.route.errorElement||Sx,l&&(c<0&&b===0?(ug("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,D=null):c===b&&(C=!0,D=E.route.hydrateFallbackElement||null)));let I=t.concat(a.slice(0,b+1)),R=()=>{let H;return x?H=v:C?H=D:E.route.Component?H=_.createElement(E.route.Component,null):E.route.element?H=E.route.element:H=T,_.createElement(vx,{match:E,routeContext:{outlet:T,matches:I,isDataRoute:i!=null},children:H})};return i&&(E.route.ErrorBoundary||E.route.errorElement||b===0)?_.createElement(ag,{location:i.location,revalidation:i.revalidation,component:v,error:x,children:R(),routeContext:{outlet:null,matches:I,isDataRoute:!0},onError:p}):R()},null)}function xd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wx(e){let t=_.useContext(Fi);return Ze(t,xd(e)),t}function Ax(e){let t=_.useContext(eo);return Ze(t,xd(e)),t}function Ix(e){let t=_.useContext(In);return Ze(t,xd(e)),t}function bd(e){let t=Ix(e),n=t.matches[t.matches.length-1];return Ze(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Lx(){return bd("useRouteId")}function Rx(){var i;let e=_.useContext(Td),t=Ax("useRouteError"),n=bd("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function Ox(){let{router:e}=wx("useNavigate"),t=bd("useNavigate"),n=_.useRef(!1);return ig(()=>{n.current=!0}),_.useCallback(async(a,u={})=>{yn(n.current,rg),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...u}))},[e,t])}var em={};function ug(e,t,n){!t&&!em[e]&&(em[e]=!0,yn(!1,n))}_.memo(Dx);function Dx({routes:e,manifest:t,future:n,state:i,isStatic:a,onError:u}){return sg(e,void 0,{manifest:t,state:i,isStatic:a,onError:u})}function Px({to:e,replace:t,state:n,relative:i}){Ze(Xr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=_.useContext(Kt);yn(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=_.useContext(In),{pathname:l}=xn(),c=yd(),f=Zu(e,Ed(u),l,i==="path"),p=JSON.stringify(f);return _.useEffect(()=>{c(JSON.parse(p),{replace:t,state:n,relative:i})},[c,p,i,t,n]),null}function Ii(e){Ze(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Mx({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:a,static:u=!1,useTransitions:l}){Ze(!Xr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=_.useMemo(()=>({basename:c,navigator:a,static:u,useTransitions:l,future:{}}),[c,a,u,l]);typeof n=="string"&&(n=Mi(n));let{pathname:p="/",search:T="",hash:E="",state:b=null,key:x="default",mask:C}=n,v=_.useMemo(()=>{let D=Wn(p,c);return D==null?null:{location:{pathname:D,search:T,hash:E,state:b,key:x,mask:C},navigationType:i}},[c,p,T,E,b,x,i,C]);return yn(v!=null,`<Router basename="${c}"> is not able to match the URL "${p}${T}${E}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:_.createElement(Kt.Provider,{value:f},_.createElement(ta.Provider,{children:t,value:v}))}function Fx({children:e,location:t}){return kx(zc(e),t)}function zc(e,t=[]){let n=[];return _.Children.forEach(e,(i,a)=>{if(!_.isValidElement(i))return;let u=[...t,a];if(i.type===_.Fragment){n.push.apply(n,zc(i.props.children,u));return}Ze(i.type===Ii,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ze(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=zc(i.props.children,u)),n.push(l)}),n}var Ou="get",Du="application/x-www-form-urlencoded";function to(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function jx(e){return to(e)&&e.tagName.toLowerCase()==="button"}function Bx(e){return to(e)&&e.tagName.toLowerCase()==="form"}function Ux(e){return to(e)&&e.tagName.toLowerCase()==="input"}function Hx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zx(e,t){return e.button===0&&(!t||t==="_self")&&!Hx(e)}var vu=null;function $x(){if(vu===null)try{new FormData(document.createElement("form"),0),vu=!1}catch{vu=!0}return vu}var Wx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function lc(e){return e!=null&&!Wx.has(e)?(yn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Du}"`),null):e}function Yx(e,t){let n,i,a,u,l;if(Bx(e)){let c=e.getAttribute("action");i=c?Wn(c,t):null,n=e.getAttribute("method")||Ou,a=lc(e.getAttribute("enctype"))||Du,u=new FormData(e)}else if(jx(e)||Ux(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(i=f?Wn(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Ou,a=lc(e.getAttribute("formenctype"))||lc(c.getAttribute("enctype"))||Du,u=new FormData(c,e),!$x()){let{name:p,type:T,value:E}=e;if(T==="image"){let b=p?`${p}.`:"";u.append(`${b}x`,"0"),u.append(`${b}y`,"0")}else p&&u.append(p,E)}}else{if(to(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ou,i=null,a=Du,l=e}return u&&a==="text/plain"&&(l=u,u=void 0),{action:i,method:n.toLowerCase(),encType:a,formData:u,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function kd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function og(e,t,n,i){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${i}`:a.pathname=`${a.pathname}.${i}`:a.pathname==="/"?a.pathname=`_root.${i}`:t&&Wn(a.pathname,t)==="/"?a.pathname=`${Wu(t)}/_root.${i}`:a.pathname=`${Wu(a.pathname)}.${i}`,a}async function Vx(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function qx(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Qx(e,t,n){let i=await Promise.all(e.map(async a=>{let u=t.routes[a.route.id];if(u){let l=await Vx(u,n);return l.links?l.links():[]}return[]}));return Jx(i.flat(1).filter(qx).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function tm(e,t,n,i,a,u){let l=(f,p)=>n[p]?f.route.id!==n[p].route.id:!0,c=(f,p)=>{var T;return n[p].pathname!==f.pathname||((T=n[p].route.path)==null?void 0:T.endsWith("*"))&&n[p].params["*"]!==f.params["*"]};return u==="assets"?t.filter((f,p)=>l(f,p)||c(f,p)):u==="data"?t.filter((f,p)=>{var E;let T=i.routes[f.route.id];if(!T||!T.hasLoader)return!1;if(l(f,p)||c(f,p))return!0;if(f.route.shouldRevalidate){let b=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((E=n[0])==null?void 0:E.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function Gx(e,t,{includeHydrateFallback:n}={}){return Kx(e.map(i=>{let a=t.routes[i.route.id];if(!a)return[];let u=[a.module];return a.clientActionModule&&(u=u.concat(a.clientActionModule)),a.clientLoaderModule&&(u=u.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(u=u.concat(a.hydrateFallbackModule)),a.imports&&(u=u.concat(a.imports)),u}).flat(1))}function Kx(e){return[...new Set(e)]}function Xx(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function Jx(e,t){let n=new Set;return new Set(t),e.reduce((i,a)=>{let u=JSON.stringify(Xx(a));return n.has(u)||(n.add(u),i.push({key:u,link:a})),i},[])}function Cd(){let e=_.useContext(Fi);return kd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Zx(){let e=_.useContext(eo);return kd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Sd=_.createContext(void 0);Sd.displayName="FrameworkContext";function no(){let e=_.useContext(Sd);return kd(e,"You must render this element inside a <HydratedRouter> element"),e}function e2(e,t){let n=_.useContext(Sd),[i,a]=_.useState(!1),[u,l]=_.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:p,onMouseLeave:T,onTouchStart:E}=t,b=_.useRef(null);_.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=I=>{I.forEach(R=>{l(R.isIntersecting)})},D=new IntersectionObserver(v,{threshold:.5});return b.current&&D.observe(b.current),()=>{D.disconnect()}}},[e]),_.useEffect(()=>{if(i){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[i]);let x=()=>{a(!0)},C=()=>{a(!1),l(!1)};return n?e!=="intent"?[u,b,{}]:[u,b,{onFocus:Ls(c,x),onBlur:Ls(f,C),onMouseEnter:Ls(p,x),onMouseLeave:Ls(T,C),onTouchStart:Ls(E,x)}]:[!1,b,{}]}function Ls(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function t2({page:e,...t}){let n=hx(),{nonce:i}=no(),{router:a}=Cd(),u=_.useMemo(()=>W0(a.routes,e,a.basename),[a.routes,e,a.basename]);return u?(t.nonce==null&&i&&(t={...t,nonce:i}),n?_.createElement(r2,{page:e,matches:u,...t}):_.createElement(i2,{page:e,matches:u,...t})):null}function n2(e){let{manifest:t,routeModules:n}=no(),[i,a]=_.useState([]);return _.useEffect(()=>{let u=!1;return Qx(e,t,n).then(l=>{u||a(l)}),()=>{u=!0}},[e,t,n]),i}function r2({page:e,matches:t,...n}){let i=xn(),{future:a}=no(),{basename:u}=Cd(),l=_.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let c=og(e,u,a.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,p=[];for(let T of t)typeof T.route.shouldRevalidate=="function"?f=!0:p.push(T.route.id);return f&&p.length>0&&c.searchParams.set("_routes",p.join(",")),[c.pathname+c.search]},[u,a.v8_trailingSlashAwareDataRequests,e,i,t]);return _.createElement(_.Fragment,null,l.map(c=>_.createElement("link",{key:c,rel:"prefetch",as:"fetch",href:c,...n})))}function i2({page:e,matches:t,...n}){let i=xn(),{future:a,manifest:u,routeModules:l}=no(),{basename:c}=Cd(),{loaderData:f,matches:p}=Zx(),T=_.useMemo(()=>tm(e,t,p,u,i,"data"),[e,t,p,u,i]),E=_.useMemo(()=>tm(e,t,p,u,i,"assets"),[e,t,p,u,i]),b=_.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let v=new Set,D=!1;if(t.forEach(R=>{var W;let H=u.routes[R.route.id];!H||!H.hasLoader||(!T.some(q=>q.route.id===R.route.id)&&R.route.id in f&&((W=l[R.route.id])!=null&&W.shouldRevalidate)||H.hasClientLoader?D=!0:v.add(R.route.id))}),v.size===0)return[];let I=og(e,c,a.v8_trailingSlashAwareDataRequests,"data");return D&&v.size>0&&I.searchParams.set("_routes",t.filter(R=>v.has(R.route.id)).map(R=>R.route.id).join(",")),[I.pathname+I.search]},[c,a.v8_trailingSlashAwareDataRequests,f,i,u,T,t,e,l]),x=_.useMemo(()=>Gx(E,u),[E,u]),C=n2(E);return _.createElement(_.Fragment,null,b.map(v=>_.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),x.map(v=>_.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),C.map(({key:v,link:D})=>_.createElement("link",{key:v,nonce:n.nonce,...D,crossOrigin:D.crossOrigin??n.crossOrigin})))}function s2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var a2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{a2&&(window.__reactRouterVersion="7.18.2")}catch{}function u2({basename:e,children:t,useTransitions:n,window:i}){let a=_.useRef();a.current==null&&(a.current=Uy({window:i,v5Compat:!0}));let u=a.current,[l,c]=_.useState({action:u.action,location:u.location}),f=_.useCallback(p=>{n===!1?c(p):_.startTransition(()=>c(p))},[n]);return _.useLayoutEffect(()=>u.listen(f),[u,f]),_.createElement(Mx,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:u,useTransitions:n})}var _d=_.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:a,reloadDocument:u,replace:l,mask:c,state:f,target:p,to:T,preventScrollReset:E,viewTransition:b,defaultShouldRevalidate:x,...C},v){let{basename:D,navigator:I,useTransitions:R}=_.useContext(Kt),H=typeof T=="string"&&gd.test(T),W=J0(T,D);T=W.to;let q=xx(T,{relative:a}),B=xn(),ie=null;if(c){let re=Zu(c,[],B.mask?B.mask.pathname:"/",!0);D!=="/"&&(re.pathname=re.pathname==="/"?D:En([D,re.pathname])),ie=I.createHref(re)}let[Z,ce,M]=e2(i,C),pe=d2(T,{replace:l,mask:c,state:f,target:p,preventScrollReset:E,relative:a,viewTransition:b,defaultShouldRevalidate:x,useTransitions:R});function V(re){t&&t(re),re.defaultPrevented||pe(re)}let de=!(W.isExternal||u),he=_.createElement("a",{...C,...M,href:(de?ie:void 0)||W.absoluteURL||q,onClick:de?V:t,ref:s2(v,ce),target:p,"data-discover":!H&&n==="render"?"true":void 0});return Z&&!H?_.createElement(_.Fragment,null,he,_.createElement(t2,{page:q})):he});_d.displayName="Link";var o2=_.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:a=!1,style:u,to:l,viewTransition:c,children:f,...p},T){let E=na(l,{relative:p.relative}),b=xn(),x=_.useContext(eo),{navigator:C,basename:v}=_.useContext(Kt),D=x!=null&&g2(E)&&c===!0,I=C.encodeLocation?C.encodeLocation(E).pathname:E.pathname,R=b.pathname,H=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(R=R.toLowerCase(),H=H?H.toLowerCase():null,I=I.toLowerCase()),H&&v&&(H=Wn(H,v)||H);const W=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let q=R===I||!a&&R.startsWith(I)&&R.charAt(W)==="/",B=H!=null&&(H===I||!a&&H.startsWith(I)&&H.charAt(I.length)==="/"),ie={isActive:q,isPending:B,isTransitioning:D},Z=q?t:void 0,ce;typeof i=="function"?ce=i(ie):ce=[i,q?"active":null,B?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let M=typeof u=="function"?u(ie):u;return _.createElement(_d,{...p,"aria-current":Z,className:ce,ref:T,style:M,to:l,viewTransition:c},typeof f=="function"?f(ie):f)});o2.displayName="NavLink";var l2=_.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:u,method:l=Ou,action:c,onSubmit:f,relative:p,preventScrollReset:T,viewTransition:E,defaultShouldRevalidate:b,...x},C)=>{let{useTransitions:v}=_.useContext(Kt),D=p2(),I=m2(c,{relative:p}),R=l.toLowerCase()==="get"?"get":"post",H=typeof c=="string"&&gd.test(c),W=q=>{if(f&&f(q),q.defaultPrevented)return;q.preventDefault();let B=q.nativeEvent.submitter,ie=(B==null?void 0:B.getAttribute("formmethod"))||l,Z=()=>D(B||q.currentTarget,{fetcherKey:t,method:ie,navigate:n,replace:a,state:u,relative:p,preventScrollReset:T,viewTransition:E,defaultShouldRevalidate:b});v&&n!==!1?_.startTransition(()=>Z()):Z()};return _.createElement("form",{ref:C,method:R,action:I,onSubmit:i?f:W,...x,"data-discover":!H&&e==="render"?"true":void 0})});l2.displayName="Form";function c2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lg(e){let t=_.useContext(Fi);return Ze(t,c2(e)),t}function d2(e,{target:t,replace:n,mask:i,state:a,preventScrollReset:u,relative:l,viewTransition:c,defaultShouldRevalidate:f,useTransitions:p}={}){let T=yd(),E=xn(),b=na(e,{relative:l});return _.useCallback(x=>{if(zx(x,t)){x.preventDefault();let C=n!==void 0?n:Gs(E)===Gs(b),v=()=>T(e,{replace:C,mask:i,state:a,preventScrollReset:u,relative:l,viewTransition:c,defaultShouldRevalidate:f});p?_.startTransition(()=>v()):v()}},[E,T,b,n,i,a,t,e,u,l,c,f,p])}var f2=0,h2=()=>`__${String(++f2)}__`;function p2(){let{router:e}=lg("useSubmit"),{basename:t}=_.useContext(Kt),n=Lx(),i=e.fetch,a=e.navigate;return _.useCallback(async(u,l={})=>{let{action:c,method:f,encType:p,formData:T,body:E}=Yx(u,t);if(l.navigate===!1){let b=l.fetcherKey||h2();await i(b,n,l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:T,body:E,formMethod:l.method||f,formEncType:l.encType||p,flushSync:l.flushSync})}else await a(l.action||c,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:T,body:E,formMethod:l.method||f,formEncType:l.encType||p,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,a,t,n])}function m2(e,{relative:t}={}){let{basename:n}=_.useContext(Kt),i=_.useContext(In);Ze(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),u={...na(e||".",{relative:t})},l=xn();if(e==null){u.search=l.search;let c=new URLSearchParams(u.search),f=c.getAll("index");if(f.some(T=>T==="")){c.delete("index"),f.filter(E=>E).forEach(E=>c.append("index",E));let T=c.toString();u.search=T?`?${T}`:""}}return(!e||e===".")&&a.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(u.pathname=u.pathname==="/"?n:En([n,u.pathname])),Gs(u)}function g2(e,{relative:t}={}){let n=_.useContext(tg);Ze(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=lg("useViewTransitionState"),a=na(e,{relative:t});if(!n.isTransitioning)return!1;let u=Wn(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=Wn(n.nextLocation.pathname,i)||n.nextLocation.pathname;return Ks(a.pathname,l)!=null||Ks(a.pathname,u)!=null}const nm=e=>{let t;const n=new Set,i=(p,T)=>{const E=typeof p=="function"?p(t):p;if(!Object.is(E,t)){const b=t;t=T??(typeof E!="object"||E===null)?E:Object.assign({},t,E),n.forEach(x=>x(t,b))}},a=()=>t,c={setState:i,getState:a,getInitialState:()=>f,subscribe:p=>(n.add(p),()=>n.delete(p))},f=t=e(i,a,c);return c},E2=(e=>e?nm(e):nm),T2=e=>e;function y2(e,t=T2){const n=Bs.useSyncExternalStore(e.subscribe,Bs.useCallback(()=>t(e.getState()),[e,t]),Bs.useCallback(()=>t(e.getInitialState()),[e,t]));return Bs.useDebugValue(n),n}const rm=e=>{const t=E2(e),n=i=>y2(t,i);return Object.assign(n,t),n},x2=(e=>e?rm(e):rm),cg="invoke_sub_agent";function b2(e){var u;const t=(u=e._meta)==null?void 0:u.kiro;if((t==null?void 0:t.kind)==="agent-subtask")return cg;const n=t==null?void 0:t.serverName;if(!n)return;const i=e.title??"",a=`@${n}/`;return`${n}/${i.startsWith(a)?i.slice(a.length):i}`}const vd="Attached files: ";function dg(e){return e.split(`
|
|
53
|
+
`).filter(t=>!t.startsWith(vd)).join(`
|
|
54
|
+
`).trim()}function im(){return{turnStatus:"idle",contextUsagePercentage:0,compacting:!1}}function Pu(e,t,n=Date.now()){const i=[...e.items];return e.streamingThought.trim()&&i.push({type:"message",message:{id:`t-${t}`,role:"thinking",text:e.streamingThought.trim(),timestamp:n}}),e.streamingText.trim()&&i.push({type:"message",message:{id:`a-${t}`,role:"assistant",text:e.streamingText,timestamp:n}}),i}function sm(e){return e.map(t=>t.type==="tool_call"&&(t.tool.status==="pending"||t.tool.status==="in_progress")?{type:"tool_call",tool:{...t.tool,status:"failed"}}:t)}function k2(e,t,n,i){var a,u;if(t.sessionUpdate==="agent_message_chunk"){const l=((a=t.content)==null?void 0:a.text)??"";return{...e,streamingText:e.streamingText+l}}if(t.sessionUpdate==="agent_thought_chunk"){const l=((u=t.content)==null?void 0:u.text)??"";return{...e,streamingThought:e.streamingThought+l}}if(t.sessionUpdate==="tool_call"){const l=t,c=b2(l);return{items:[...Pu(e,`s-${n}`,i),{type:"tool_call",tool:{id:l.toolCallId,name:c,title:l.title??l.toolCallId,kind:l.kind,status:l.status??"pending",input:l.rawInput,content:l.content??[]}}],streamingText:"",streamingThought:""}}if(t.sessionUpdate==="tool_call_update"){const l=t;return{...e,items:e.items.map(c=>c.type==="tool_call"&&c.tool.id===l.toolCallId?{type:"tool_call",tool:{...c.tool,status:l.status??c.tool.status,output:l.rawOutput??c.tool.output,content:l.content??c.tool.content}}:c)}}return e}const C2=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);function fg(e,t){const n=e.find(a=>a.chatId===t.chatId),i=n&&n.updatedAt.localeCompare(t.updatedAt)>0?{...t,updatedAt:n.updatedAt}:t;return[...e.filter(a=>a.chatId!==t.chatId),i].sort(C2)}function S2(e,t,n){const i=e.find(a=>a.chatId===t);return i?fg(e,{...i,updatedAt:n}):e}function hg(e){const t=e.toLowerCase();return t.includes("credential")||t.includes("expired")||t.includes("not authenticated")||t.includes("unauthorized")||t.includes("kiro-cli login")?{title:"Kiro isn't authenticated",fix:"Run `kiro-cli login` on the server, then retry.",sessionWide:!0}:t.includes("a turn is already running")?{title:"A turn is already running",fix:"Wait for the current turn to finish, or stop it first."}:t.includes("enoent")||t.includes("spawn")||t.includes("command not found")?{title:"Couldn't start kiro-cli",fix:"Check that KIRO_BIN points at an executable kiro-cli.",sessionWide:!0}:t.includes("timed out")?{title:"The request timed out"}:{title:"Turn failed"}}function _2(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}const ge=x2((e,t)=>({chats:[],models:[],agents:[],defaultAgentId:"vibe",activeId:null,chatId:null,loadingChatId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:im(),subagents:[],fsVersion:{},watchedPaths:[],streamingText:"",streamingThought:"",pending:[],chatNotice:null,connStatus:"closed",createError:null,reloadingId:null,previewPath:null,setConnStatus:n=>e({connStatus:n}),setCreateError:n=>e({createError:n}),setReloadingId:n=>e({reloadingId:n}),openFilePreview:n=>e({previewPath:n}),closeFilePreview:()=>e({previewPath:null}),setSubagents:n=>e({subagents:n}),markCancelling:()=>e(n=>n.observability.turnStatus==="running"?{observability:{...n.observability,turnStatus:"cancelling"}}:{}),setCurrentModel:n=>e({currentModelId:n}),setCurrentEffort:n=>e({currentEffort:n}),setCurrentAgent:n=>e(i=>({currentModeId:n,chats:i.activeId?i.chats.map(a=>a.chatId===i.activeId?{...a,agentId:n}:a):i.chats})),setCompacting:n=>e(i=>i.observability.compacting===n?{}:{observability:{...i.observability,compacting:n}}),markPendingSending:n=>e(i=>({pending:i.pending.map(a=>a.id===n?{...a,status:"sending",error:void 0}:a)})),renameChatRow:(n,i)=>e(a=>({chats:a.chats.map(u=>u.chatId===n?{...u,title:i}:u)})),pinChatRow:(n,i)=>e(a=>({chats:a.chats.map(u=>u.chatId===n?{...u,pinned:i}:u)})),bumpFsPath:n=>e(i=>({fsVersion:{...i.fsVersion,[n]:(i.fsVersion[n]??0)+1}})),setWatchedPaths:n=>e({watchedPaths:n}),setChats:n=>e({chats:n}),setModels:n=>e({models:n}),setAgents:(n,i)=>e({agents:n,defaultAgentId:i}),setLoadingChat:n=>e({loadingChatId:n}),loadDetail:(n,i)=>e(a=>({activeId:n.summary.chatId,chatId:n.summary.chatId,loadingChatId:null,chats:fg(a.chats,n.summary),modes:n.modes,currentModeId:n.currentModeId,currentModelId:n.summary.modelId,currentEffort:n.summary.effortLevel,observability:n.observability,items:n.transcript,appliedSeq:n.head,remainingOlder:Math.max(0,n.transcriptTotal-n.transcript.length),streamingText:"",streamingThought:"",pending:i!=null&&i.keepPending?a.pending:[],chatNotice:null,subagents:[]})),prependItems:n=>e(i=>({items:[...n,...i.items],remainingOlder:Math.max(0,i.remainingOlder-n.length)})),newChatId:()=>{const n=_2();return e({chatId:n}),n},clearActive:()=>e({activeId:null,loadingChatId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:im(),streamingText:"",streamingThought:"",pending:[],chatNotice:null,currentModeId:void 0,currentModelId:void 0,currentEffort:void 0,previewPath:null,subagents:[]}),dismissChatNotice:()=>e({chatNotice:null}),setChatNotice:n=>e({chatNotice:n}),addPending:n=>e(i=>({pending:[...i.pending,{...n,status:"sending"}]})),dropPending:n=>e(i=>({pending:i.pending.filter(a=>a.id!==n)})),markPendingFailed:(n,i)=>e(a=>({pending:a.pending.map(u=>u.id===n?{...u,status:"failed",error:i}:u)})),applyEvent:n=>{const i=t(),a=n.payload;if(!(n.seq<=i.appliedSeq))switch(e({appliedSeq:n.seq}),a.kind){case"turn_started":{const u=a.prompt.filter(T=>T.type==="text").map(T=>T.text).join(""),l=dg(u),c=i.pending.findIndex(T=>T.status==="sending"&&!T.steer),f=new Date(n.ts).toISOString(),p=S2(i.chats,n.chatId,f);e({items:[...i.items,{type:"message",message:{id:`u-${n.seq}`,role:"user",text:l,timestamp:n.ts,attachments:a.attachments}}],pending:c===-1?i.pending:i.pending.filter((T,E)=>E!==c),chats:p,streamingText:"",observability:{...i.observability,turnStatus:"running"}});break}case"session_update":{const u=k2(i,a.update,n.seq,n.ts);u!==i&&e({items:u.items,streamingText:u.streamingText,streamingThought:u.streamingThought});break}case"turn_ended":{const u=Pu(i,`s-${n.seq}`,n.ts),l=a.stopReason==="cancelled"?[...sm(u),{type:"turn_interrupted",id:`int-${n.seq}`,timestamp:n.ts}]:u;e({items:a.stats?[...l,{type:"turn_stats",id:`ts-${n.seq}`,...a.stats}]:l,chatNotice:null,streamingText:"",streamingThought:"",observability:{...i.observability,turnStatus:"idle"}});break}case"turn_error":{const u=hg(a.message);e({items:[...sm(Pu(i,`s-${n.seq}`,n.ts)),{type:"turn_error",id:`err-${n.seq}`,message:a.message,timestamp:n.ts}],chatNotice:u.sessionWide?{title:u.title,fix:u.fix,detail:a.message}:i.chatNotice,streamingText:"",streamingThought:"",observability:{...i.observability,turnStatus:"idle"}});break}case"subagents_changed":e({subagents:a.subagents});break;case"metadata":e({observability:{...i.observability,contextUsagePercentage:a.params.contextUsagePercentage??i.observability.contextUsagePercentage,contextBreakdown:a.params.contextBreakdown??i.observability.contextBreakdown,sessionCredits:a.params.sessionCredits??i.observability.sessionCredits}});break;case"settings_changed":e({currentModelId:a.modelId??i.currentModelId,currentEffort:a.effortLevel??void 0,chats:i.chats.map(u=>u.chatId===n.chatId?{...u,modelId:a.modelId??u.modelId,effortLevel:a.effortLevel??void 0}:u)});break;case"steer_injected":e({items:[...Pu(i,`s-${n.seq}`,n.ts),{type:"message",message:{id:`s-${n.seq}`,role:"user",text:a.text,timestamp:n.ts,steer:!0}}],streamingText:"",streamingThought:"",pending:i.pending.filter(u=>u.id!==a.clientId)});break;case"steer_dropped":a.clientId&&i.markPendingFailed(a.clientId,"The turn ended before Casper read this. Retry to send it.");break;case"prompt_id":{const u=[...i.items];for(let l=u.length-1;l>=0;l--){const c=u[l];if(c.type==="message"&&c.message.role==="user"&&!c.message.steer){c.message.messageId||(u[l]={...c,message:{...c.message,messageId:a.messageId}},e({items:u}));break}}break}case"compaction":{const u=a.params.status.type!=="started",l=a.params.summary??"";e({observability:{...i.observability,compacting:!u},items:u&&l.trim()?[...i.items,{type:"compaction",id:`c-${n.seq}`,summary:l,timestamp:n.ts}]:i.items});break}case"process_exited":e({observability:{...i.observability,turnStatus:"idle",compacting:!1}});break}}}));async function We(e,t,n){const i={};n!==void 0&&(i["content-type"]="application/json");const a=await fetch(t,{method:e,headers:i,credentials:"same-origin",body:n!==void 0?JSON.stringify(n):void 0});if(a.status===401)throw new Error("Unauthorized");if(!a.ok){const l=await a.text();let c="";try{c=JSON.parse(l).error??""}catch{}throw new Error(c||`${e} ${t} failed (${a.status}): ${l}`)}const u=await a.text();return u?JSON.parse(u):{}}function v2(e){return We("POST","/api/login",{token:e})}function N2(){return We("POST","/api/logout")}const qe={devices:()=>We("GET","/api/devices"),revokeDevice:e=>We("DELETE",`/api/devices/${e}`),logoutAll:()=>We("POST","/api/logout-all"),models:()=>We("GET","/api/models"),agents:()=>We("GET","/api/agents"),listDirs:e=>We("GET",`/api/fs/dirs?path=${encodeURIComponent(e)}`),listChats:()=>We("GET","/api/chats"),createChat:e=>We("POST","/api/chats",e),getChat:e=>We("GET",`/api/chats/${e}`),transcriptPage:(e,t,n)=>We("GET",`/api/chats/${e}/transcript?offset=${t}&limit=${n}`),subagents:e=>We("GET",`/api/chats/${e}/subagents`),subagentDetail:(e,t)=>We("GET",`/api/chats/${e}/subagents/${t}`),deleteChat:e=>We("DELETE",`/api/chats/${e}`),renameChat:(e,t)=>We("POST",`/api/chats/${e}/rename`,{title:t}),pinChat:(e,t)=>We("POST",`/api/chats/${e}/pin`,{pinned:t}),setChatCwd:(e,t)=>We("POST",`/api/chats/${e}/cwd`,{cwd:t}),reloadChat:e=>We("POST",`/api/chats/${e}/reload`),chatUsage:e=>We("GET",`/api/chats/${e}/usage`),settings:()=>We("GET","/api/settings"),updateDefaults:e=>We("PUT","/api/settings/defaults",e),tools:()=>We("GET","/api/tools"),addMcpServer:e=>We("POST","/api/tools/mcp",e),setMcpServerDisabled:(e,t)=>We("PUT",`/api/tools/mcp/${encodeURIComponent(e)}`,{disabled:t}),removeMcpServer:e=>We("DELETE",`/api/tools/mcp/${encodeURIComponent(e)}`),branchChat:(e,t)=>We("POST",`/api/chats/${e}/branch`,{messageId:t}),rewindChat:(e,t)=>We("POST",`/api/chats/${e}/rewind`,{messageId:t}),tree:(e,t="")=>We("GET",`/api/chats/${e}/tree?path=${encodeURIComponent(t)}`),downloadUrl:(e,t)=>t.startsWith("/")?`/api/fs/file?download=1&path=${encodeURIComponent(t)}`:`/api/chats/${e}/download?path=${encodeURIComponent(t)}`,previewUrl:(e,t)=>t.startsWith("/")?`/api/fs/file?path=${encodeURIComponent(t)}`:`/api/chats/${e}/preview?path=${encodeURIComponent(t)}`,uploadFiles:async(e,t)=>{const n=new FormData;for(const a of t)n.append("files",a,a.name);const i=await fetch(`/api/chats/${encodeURIComponent(e)}/uploads`,{method:"POST",credentials:"same-origin",body:n});if(i.status===401)throw new Error("Unauthorized");if(!i.ok){const a=await i.text();throw new Error(`Upload failed (${i.status}): ${a}`)}return await i.json()}},Mu={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},w2=8e3,pg=25e3,A2=1e4;function am(e){return e.state===void 0||e.state===Mu.CLOSED||e.state===Mu.CLOSING?!0:e.state===Mu.CONNECTING?e.now-e.connectingSince>w2:e.now-e.lastMessageAt>pg+A2}function I2(e){return e.state===Mu.OPEN&&e.now-e.lastMessageAt>pg}const L2=1008;class R2{constructor(t,n,i=0){Le(this,"ws",null);Le(this,"cursor",0);Le(this,"closedByUser",!1);Le(this,"backoff",500);Le(this,"reconnectTimer",null);Le(this,"connectingSince",0);Le(this,"lastMessageAt",0);Le(this,"watchdog",null);Le(this,"eager",()=>{this.closedByUser||am(this.sample())&&this.connect()});Le(this,"onVisibility",()=>{document.visibilityState==="visible"&&this.eager()});this.chatId=t,this.handlers=n,this.cursor=i,window.addEventListener("online",this.eager),document.addEventListener("visibilitychange",this.onVisibility)}sample(){var t;return{state:(t=this.ws)==null?void 0:t.readyState,connectingSince:this.connectingSince,lastMessageAt:this.lastMessageAt,now:Date.now()}}startWatchdog(){this.watchdog===null&&(this.watchdog=window.setInterval(()=>{if(this.closedByUser)return;const t=this.sample();am(t)?this.connect():I2(t)&&this.send({type:"ping"})},5e3))}reset(t){this.cursor=t}connect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;t&&(this.ws=null,t.onopen=null,t.onmessage=null,t.onclose=null,t.onerror=null,(t.readyState===WebSocket.OPEN||t.readyState===WebSocket.CONNECTING)&&t.close()),this.connectingSince=Date.now(),this.lastMessageAt=Date.now(),this.startWatchdog(),this.handlers.onStatus(this.cursor>0?"reconnecting":"connecting");const i=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws?chatId=${encodeURIComponent(this.chatId)}&cursor=${this.cursor}`,a=new WebSocket(i);this.ws=a,a.onopen=()=>{this.ws===a&&(this.backoff=500,this.handlers.onStatus("replaying"))},a.onmessage=u=>{var c,f,p,T,E,b;if(this.ws!==a)return;this.lastMessageAt=Date.now();const l=JSON.parse(u.data);switch(l.type){case"event":l.event.seq>this.cursor&&(this.cursor=l.event.seq,this.handlers.onEvent(l.event));break;case"replay_complete":this.handlers.onStatus("connected");break;case"resync":this.handlers.onStatus("resyncing"),this.handlers.onResync();break;case"ack":(f=(c=this.handlers).onAck)==null||f.call(c,l.action,l.ok,l.error);break;case"error":console.warn("ws error:",l.message),(T=(p=this.handlers).onServerError)==null||T.call(p,l.message);break;case"fs_changed":(b=(E=this.handlers).onFsChanged)==null||b.call(E,l.path);break}},a.onclose=u=>{var l,c;if(this.ws===a){if(this.closedByUser){this.handlers.onStatus("closed");return}if(u.code===L2){this.closedByUser=!0,this.handlers.onStatus("closed"),(c=(l=this.handlers).onUnauthorized)==null||c.call(l);return}this.handlers.onStatus("reconnecting"),this.reconnectTimer=window.setTimeout(()=>this.connect(),this.backoff),this.backoff=Math.min(this.backoff*1.7,1e4)}},a.onerror=()=>{this.ws===a&&a.close()}}send(t){var n;return((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify(t)),!0):!1}prompt(t,n,i=!1){return this.send({type:"prompt",content:t,attachments:n,...i?{retry:i}:{}})}steer(t,n){return this.send({type:"steer",text:t,clientId:n})}cancel(){this.send({type:"cancel"})}setMode(t){this.send({type:"set_mode",modeId:t})}setModel(t){this.send({type:"set_model",modelId:t})}setEffort(t){this.send({type:"set_effort",effortLevel:t})}watchPaths(t){this.send({type:"watch_paths",paths:t})}execCommand(t){this.send({type:"exec_command",command:t})}close(){this.closedByUser=!0,window.removeEventListener("online",this.eager),document.removeEventListener("visibilitychange",this.onVisibility),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.watchdog!==null&&(clearInterval(this.watchdog),this.watchdog=null);const t=this.ws;this.ws=null,t&&(t.onopen=null,t.onmessage=null,t.onclose=null,t.onerror=null,t.close())}}const mg="/c",gg=`${mg}/:chatId`;function Fu(e){return`${mg}/${encodeURIComponent(e)}`}const Nd="/new",O2={prompt:"Message",cancel:"Stop",set_mode:"Agent change",set_model:"Model change",set_effort:"Effort change",steer:"Message",exec_command:"Command"};class D2{constructor(t={}){Le(this,"api");Le(this,"createSocket");Le(this,"listCoalesceMs");Le(this,"turnEndedRefreshMs");Le(this,"compactTimeoutMs");Le(this,"host",null);Le(this,"socket",null);Le(this,"openTarget",null);Le(this,"handledRoute");Le(this,"isDraft",!1);Le(this,"lastSent",null);Le(this,"lastSteer",null);Le(this,"msgSeq",0);Le(this,"firstPrompt",null);Le(this,"lastCreateOpts",null);Le(this,"listSeq",0);Le(this,"listTimer",null);this.api=t.api??qe,this.createSocket=t.createSocket??((n,i,a)=>new R2(n,i,a)),this.listCoalesceMs=t.listCoalesceMs??150,this.turnEndedRefreshMs=t.turnEndedRefreshMs??1200,this.compactTimeoutMs=t.compactTimeoutMs??12e4}attach(t){this.host=t}get state(){return ge.getState()}refreshSessions(){this.listTimer===null&&(this.listTimer=setTimeout(()=>{this.listTimer=null;const t=++this.listSeq;this.api.listChats().then(n=>{t===this.listSeq&&this.state.setChats(n.chats)}).catch(()=>{})},this.listCoalesceMs))}loadPickers(){this.api.models().then(t=>this.state.setModels(t.models)).catch(()=>{}),this.api.agents().then(t=>this.state.setAgents(t.agents,t.defaultAgentId)).catch(()=>{})}syncRoute(t,n){if(this.isDraft=n,n&&!this.state.chatId&&this.state.newChatId(),this.handledRoute!==t)if(this.handledRoute=t,t)this.openChat(t);else{this.openTarget=null,this.closeSocket();const i=this.state.activeId===null&&this.state.chatId!==null;this.state.clearActive(),i||this.state.newChatId(),this.refreshSessions()}}closeSocket(){var t;(t=this.socket)==null||t.close(),this.socket=null}async openChat(t,n){var a;if(this.state.activeId===t)return;this.openTarget=t,this.closeSocket(),this.state.setConnStatus("connecting"),n||this.state.setLoadingChat(t);let i;if(n)i=n;else try{i=await this.api.getChat(t)}catch(u){if(this.openTarget!==t)return;this.state.setConnStatus("closed"),this.state.setLoadingChat(null),console.error("open session failed:",u),(a=this.host)==null||a.navigate("/",{replace:!0});return}this.openTarget===t&&(this.state.loadDetail(i,{keepPending:!!n}),this.socket=this.createSocket(t,this.socketHandlers(t),i.head),this.socket.connect())}socketHandlers(t){return{onEvent:n=>{const i=n.seq>this.state.appliedSeq;this.state.applyEvent(n),i&&((n.payload.kind==="turn_started"||n.payload.kind==="title_changed")&&this.refreshSessions(),n.payload.kind==="history_replaced"&&this.refetch(t),n.payload.kind==="turn_ended"&&setTimeout(()=>this.refreshSessions(),this.turnEndedRefreshMs))},onStatus:n=>{if(this.state.setConnStatus(n),n==="connected"&&this.firstPrompt){const i=this.firstPrompt;this.firstPrompt=null,this.deliver(i.id,i.content,i.attachments)}},onResync:()=>this.refetch(t),onAck:(n,i,a)=>{if(i)return;const u=a??"The server rejected the request.";if(n==="prompt"){this.lastSent&&this.state.markPendingFailed(this.lastSent,u);return}if(n==="steer"){this.lastSteer&&this.state.markPendingFailed(this.lastSteer,u);return}console.error(`${O2[n]??n} rejected:`,u)},onFsChanged:n=>this.state.bumpFsPath(n),onUnauthorized:()=>{var n;this.closeSocket(),this.state.clearActive(),(n=this.host)==null||n.onLock()},onServerError:n=>{console.error("server error:",n)}}}async refetch(t){var i;const n=await this.api.getChat(t);this.openTarget===t&&(this.state.loadDetail(n),(i=this.socket)==null||i.reset(n.head))}async createChat(t){var n;this.closeSocket(),this.state.setConnStatus("connecting"),this.state.setCreateError(null),this.lastCreateOpts=t;try{const i=await this.api.createChat({chatId:this.state.chatId??void 0,cwd:t.cwd||void 0,agentId:t.agentId,modelId:t.modelId,effortLevel:t.effortLevel,freshWorkspace:!t.cwd});this.refreshSessions();const a=i.summary.chatId;return this.handledRoute=a,this.isDraft=!1,(n=this.host)==null||n.navigate(Fu(a)),this.openChat(a,i),!0}catch(i){return this.state.setConnStatus("closed"),this.state.setCreateError(i instanceof Error?i.message:"Failed to create session"),!1}}retryCreate(){this.lastCreateOpts&&this.createChat(this.lastCreateOpts)}dismissCreateError(){var t;this.state.setCreateError(null),(t=this.host)==null||t.navigate("/")}startDraft(){var t;this.openTarget=null,this.closeSocket(),this.state.clearActive(),this.state.newChatId(),this.state.setCreateError(null),(t=this.host)==null||t.navigate(Nd)}send(t,n,i={}){const a=`pending-${this.msgSeq++}`,u=dg(t.filter(l=>l.type==="text").map(l=>l.text).join(`
|
|
55
|
+
`));if(this.state.addPending({id:a,text:u,attachments:n,content:t}),this.isDraft){const{currentModeId:l,currentModelId:c,currentEffort:f}=this.state;this.createChat({agentId:l,modelId:c,effortLevel:f}).then(p=>{p?this.firstPrompt={id:a,content:t,attachments:n}:this.state.markPendingFailed(a,"Could not start the session.")});return}this.deliver(a,t,n,i.retry)}steer(t){const n=t.trim();if(!n)return;const i=`pending-${this.msgSeq++}`;this.state.addPending({id:i,text:n,content:[{type:"text",text:n}],steer:!0}),this.deliverSteer(i,n)}deliverSteer(t,n){var i;this.lastSteer=t,!((i=this.socket)!=null&&i.steer(n,t))&&this.state.markPendingFailed(t,"Not connected to the server - reconnecting. Retry once the status dot is green.")}deliver(t,n,i,a=!1){var u;this.lastSent=t,!((u=this.socket)!=null&&u.prompt(n,i,a))&&this.state.markPendingFailed(t,this.socket?"Not connected to the server - reconnecting. Retry once the status dot is green.":"No active session socket.")}retrySend(t){const n=this.state.pending.find(i=>i.id===t);if(n){if(n.steer&&this.state.observability.turnStatus==="running"){this.state.markPendingSending(t),this.deliverSteer(t,n.text);return}if(n.steer){this.state.dropPending(t),this.send(n.content);return}this.state.markPendingSending(t),this.deliver(t,n.content,n.attachments)}}retryTurn(t){this.send([{type:"text",text:t}],void 0,{retry:!0})}cancel(){var t;(t=this.socket)==null||t.cancel(),this.state.markCancelling()}changeModel(t){var n;(n=this.socket)==null||n.setModel(t),this.state.setCurrentModel(t),this.socket||this.state.setCurrentEffort(void 0)}changeEffort(t){var n;(n=this.socket)==null||n.setEffort(t),this.state.setCurrentEffort(t)}async branchFrom(t){var i;const n=this.state.activeId;if(n)try{const a=await this.api.branchChat(n,t);this.refreshSessions();const u=a.summary.chatId;this.handledRoute=u,(i=this.host)==null||i.navigate(Fu(u)),await this.openChat(u,a)}catch(a){this.cutFailed(n,"Couldn't branch the chat",a)}}async editPrompt(t,n,i){var c;const a=this.state.activeId;if(!a)return!1;let u;try{u=await this.api.rewindChat(a,t)}catch(f){return this.cutFailed(a,"Couldn't edit the message",f),!1}if(this.state.activeId!==a)return!1;this.state.loadDetail(u),(c=this.socket)==null||c.reset(u.head),this.refreshSessions();const l=[];return i!=null&&i.length&&l.push({type:"text",text:vd+i.map(f=>f.path).join(", ")+`
|
|
56
|
+
`}),n.trim()&&l.push({type:"text",text:n.trim()}),l.length>0&&this.send(l,i),!0}cutFailed(t,n,i){if(this.state.activeId!==t)return;const a=i instanceof Error?i.message:"The server rejected the request.";this.state.setChatNotice({title:n,fix:a,detail:a})}changeAgent(t){var n;(n=this.socket)==null||n.setMode(t),this.state.setCurrentAgent(t)}compact(){var t;(t=this.socket)==null||t.execCommand("compact"),this.state.setCompacting(!0),setTimeout(()=>this.state.setCompacting(!1),this.compactTimeoutMs)}async reloadChat(){var n;const t=this.state.activeId;if(!(!t||this.state.reloadingId===t)){this.state.setReloadingId(t);try{const i=await this.api.reloadChat(t);if(this.state.activeId!==t)return;this.state.loadDetail(i),(n=this.socket)==null||n.reset(i.head),this.loadPickers()}catch(i){if(this.state.activeId!==t)return;const a=i instanceof Error?i.message:"The server rejected the reload.";this.state.setChatNotice({title:"Couldn't reload the session",fix:a,detail:a})}finally{this.state.reloadingId===t&&this.state.setReloadingId(null)}}}watchPaths(t){var n;(n=this.socket)==null||n.watchPaths(t)}async deleteChat(t){var n;try{await this.api.deleteChat(t)}catch{console.error("delete session failed"),this.refreshSessions();return}this.state.activeId===t?(n=this.host)==null||n.navigate("/"):this.refreshSessions()}async renameChat(t,n){this.state.renameChatRow(t,n),await this.api.renameChat(t,n).catch(()=>{console.error("rename session failed")}),this.refreshSessions()}async pinChat(t,n){this.state.pinChatRow(t,n),await this.api.pinChat(t,n).catch(()=>{console.error("pin session failed")}),this.refreshSessions()}goToChat(t){var n;(n=this.host)==null||n.navigate(Fu(t))}markLoading(t){t!==this.state.activeId&&this.state.setLoadingChat(t)}lock(){var t,n;this.closeSocket(),this.state.clearActive(),(t=this.host)==null||t.navigate("/",{replace:!0}),(n=this.host)==null||n.onLock()}get canSend(){return this.isDraft||ge.getState().activeId!==null}}const Ye=new D2;function wd(e){return e.observability.turnStatus==="idle"&&!e.observability.compacting}function Eg(e){const t=e.trim().slice(0,4e3);return!t||!Ye.canSend||!wd(ge.getState())?!1:(Ye.send([{type:"text",text:t}]),!0)}const cc=1440*60*1e3;function P2(e,t=new Date){const n=new Date(t);n.setHours(0,0,0,0);const i=n.getTime(),a=[{label:"Today",chats:[]},{label:"Yesterday",chats:[]},{label:"Previous 7 days",chats:[]},{label:"Previous 30 days",chats:[]},{label:"Older",chats:[]}];for(const u of e){const l=Date.parse(u.updatedAt),c=l>=i?0:l>=i-cc?1:l>=i-7*cc?2:l>=i-30*cc?3:4;a[c].chats.push(u)}return a.filter(u=>u.chats.length>0)}function kr({size:e=14,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"6 9 12 15 18 9"})})}function M2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[h.jsx("circle",{cx:"4",cy:"12",r:"1.8"}),h.jsx("circle",{cx:"12",cy:"12",r:"1.8"}),h.jsx("circle",{cx:"20",cy:"12",r:"1.8"})]})}function F2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[h.jsx("circle",{cx:"12",cy:"5",r:"1.9"}),h.jsx("circle",{cx:"12",cy:"12",r:"1.9"}),h.jsx("circle",{cx:"12",cy:"19",r:"1.9"})]})}function Tg({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M20 11a8 8 0 0 0-13.6-4.5L3 9"}),h.jsx("polyline",{points:"3 4 3 9 8 9"}),h.jsx("path",{d:"M4 13a8 8 0 0 0 13.6 4.5L21 15"}),h.jsx("polyline",{points:"21 20 21 15 16 15"})]})}function ro({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),h.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function $c({size:e=16,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Ad({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z"}),h.jsx("line",{x1:"12",y1:"9.5",x2:"12",y2:"13.5"}),h.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}function j2({size:e=18,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),h.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}function br({size:e=28,className:t}){return h.jsx("svg",{className:`spinner ${t??""}`,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":!0,children:h.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})})}function um({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M12 19V5"}),h.jsx("path",{d:"m5 12 7-7 7 7"})]})}function B2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":!0,children:[h.jsx("circle",{cx:"12",cy:"12",r:"9.5"}),h.jsx("rect",{x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.2",fill:"currentColor",stroke:"none"})]})}function om({size:e=16,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":!0,children:h.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function Id({size:e=20,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function yg({size:e=20,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("circle",{cx:"11",cy:"11",r:"7"}),h.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]})}function xg({size:e=16,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function U2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2v1"}),h.jsx("path",{d:"M2 10l2.5 9h15l2.5-9H7.5"})]})}function bg({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function lm({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("polyline",{points:"9 15 7 13 9 11"}),h.jsx("polyline",{points:"15 11 17 13 15 15"})]})}function H2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("circle",{cx:"12",cy:"15",r:"2"}),h.jsx("path",{d:"M12 11v2"}),h.jsx("path",{d:"M12 17v1"})]})}function z2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),h.jsx("line",{x1:"8",y1:"17",x2:"14",y2:"17"})]})}function $2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("circle",{cx:"10",cy:"14",r:"2"}),h.jsx("path",{d:"M20 17l-3-3-5 5"})]})}function W2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("path",{d:"M8 13h3v3H8z"}),h.jsx("line",{x1:"14",y1:"13",x2:"16",y2:"13"}),h.jsx("line",{x1:"14",y1:"16",x2:"16",y2:"16"})]})}function Y2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),h.jsx("polyline",{points:"14 2 14 8 20 8"}),h.jsx("polyline",{points:"8 15 10 13 8 11"}),h.jsx("line",{x1:"12",y1:"16",x2:"16",y2:"16"})]})}function V2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),h.jsx("polyline",{points:"7 10 12 15 17 10"}),h.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function dc({size:e=20,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":!0,children:h.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})})}function q2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),h.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"}),h.jsx("line",{x1:"9",y1:"18",x2:"13",y2:"18"})]})}function Q2({size:e=18,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"4 14 10 14 10 20"}),h.jsx("polyline",{points:"20 10 14 10 14 4"}),h.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),h.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function G2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function K2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"16 18 22 12 16 6"}),h.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function X2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"15 3 21 3 21 9"}),h.jsx("polyline",{points:"9 21 3 21 3 15"}),h.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),h.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function J2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("polyline",{points:"4 14 10 14 10 20"}),h.jsx("polyline",{points:"20 10 14 10 14 4"}),h.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),h.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function Z2({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M12 20h9"}),h.jsx("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function eb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("circle",{cx:"6",cy:"5",r:"2"}),h.jsx("circle",{cx:"6",cy:"19",r:"2"}),h.jsx("circle",{cx:"18",cy:"7",r:"2"}),h.jsx("path",{d:"M6 7v10"}),h.jsx("path",{d:"M18 9c0 5-12 3-12 8"})]})}function kg({size:e=14,className:t}){return h.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"9 6 15 12 9 18"})})}function tb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("circle",{cx:"12",cy:"12",r:"3"}),h.jsx("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z"})]})}function nb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("path",{d:"M4 7h16"}),h.jsx("path",{d:"M10 11v6M14 11v6"}),h.jsx("path",{d:"M6 7l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12"}),h.jsx("path",{d:"M9 7V4h6v3"})]})}function rb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),h.jsx("path",{d:"M8 20h8M12 16v4"})]})}function ib({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"7",y:"3",width:"10",height:"18",rx:"2"}),h.jsx("path",{d:"M11 17h2"})]})}function sb({size:e=16,className:t}){return h.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[h.jsx("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2"}),h.jsx("path",{d:"M3 10h18M8 3v4M16 3v4"})]})}var ra=z0();const Rs=8,cm=6;function Cg({anchor:e,onClose:t,children:n}){const i=_.useRef(null),[a,u]=_.useState(null);return _.useLayoutEffect(()=>{const l=i.current;if(!e||!l)return;const c=e.getBoundingClientRect(),f=l.getBoundingClientRect(),p=c.bottom+cm,E=p+f.height+Rs<=window.innerHeight?p:Math.max(Rs,c.top-cm-f.height),b=Math.min(Math.max(Rs,c.right-f.width),Math.max(Rs,window.innerWidth-f.width-Rs));u({top:E,left:b})},[e]),_.useEffect(()=>{const l=p=>{var E;const T=p.target;(E=i.current)!=null&&E.contains(T)||e!=null&&e.contains(T)||t()},c=p=>{p.key==="Escape"&&t()};document.addEventListener("mousedown",l),document.addEventListener("keydown",c);const f={capture:!0,passive:!0};return window.addEventListener("scroll",t,f),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c),window.removeEventListener("scroll",t,f),window.removeEventListener("resize",t)}},[e,t]),ra.createPortal(h.jsx("div",{ref:i,className:"menu-list menu-list-floating",role:"menu",style:a?{top:a.top,left:a.left}:{visibility:"hidden"},children:n}),document.body)}function ab(e,t){const n=e.trim().toLowerCase();if(!n)return 0;const i=t.toLowerCase();let a=0,u=0,l=-2;for(let c=0;c<n.length;c++){const f=n[c],p=i.indexOf(f,u);if(p===-1)return-1;a+=1,p===l+1&&(a+=3),(p===0||/\s|[-_/.]/.test(i[p-1]??""))&&(a+=2),l=p,u=p+1}return a}function ub({sessions:e,onOpen:t,onClose:n}){const[i,a]=_.useState(""),[u,l]=_.useState(0),c=_.useRef(null);_.useEffect(()=>{var E;(E=c.current)==null||E.focus()},[]);const f=_.useMemo(()=>i.trim()?e.map(E=>({s:E,score:ab(i,E.title)})).filter(E=>E.score>=0).sort((E,b)=>b.score-E.score).map(E=>E.s):e.slice(0,50),[e,i]);_.useEffect(()=>{l(0)},[i]);const p=E=>{t(E),Ye.goToChat(E),n()},T=E=>{if(E.key==="Escape")n();else if(E.key==="ArrowDown")E.preventDefault(),l(b=>Math.min(b+1,f.length-1));else if(E.key==="ArrowUp")E.preventDefault(),l(b=>Math.max(b-1,0));else if(E.key==="Enter"){E.preventDefault();const b=f[u];b&&p(b.chatId)}};return ra.createPortal(h.jsx("div",{className:"search-backdrop",onClick:n,children:h.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Search sessions",onClick:E=>E.stopPropagation(),children:[h.jsxs("div",{className:"search-field",children:[h.jsx(yg,{size:20,className:"search-field-icon"}),h.jsx("input",{ref:c,className:"search-modal-input",value:i,placeholder:"Search sessions…",onChange:E=>a(E.target.value),onKeyDown:T}),h.jsx("kbd",{className:"search-esc",children:"esc"})]}),h.jsx("div",{className:"search-results",children:f.length===0?h.jsx("p",{className:"search-empty",children:i.trim()?`No sessions match "${i}".`:"No sessions yet."}):f.map((E,b)=>h.jsxs("button",{className:`search-result ${b===u?"is-active":""}`,onMouseEnter:()=>l(b),onClick:()=>p(E.chatId),children:[h.jsx("span",{className:"search-result-title",children:E.title}),h.jsx("span",{className:"search-result-agent",children:E.agentId??"vibe"})]},E.chatId))})]})}),document.body)}function Yu(e){const t=Math.max(0,Math.round(e));return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`}function ju({ariaLabel:e,value:t,options:n,onChange:i}){const[a,u]=_.useState(!1),[l,c]=_.useState(0),f=_.useRef(null),p=n.find(b=>b.value===t);_.useEffect(()=>{if(!a)return;const b=x=>{f.current&&!f.current.contains(x.target)&&u(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[a]),_.useEffect(()=>{if(!a)return;const b=n.findIndex(x=>x.value===t);c(b>=0?b:0)},[a]);const T=b=>{i(b),u(!1)},E=b=>{if(!a){(b.key==="Enter"||b.key===" "||b.key==="ArrowDown")&&(b.preventDefault(),u(!0));return}if(b.key==="Escape")u(!1);else if(b.key==="ArrowDown")b.preventDefault(),c(x=>Math.min(x+1,n.length-1));else if(b.key==="ArrowUp")b.preventDefault(),c(x=>Math.max(x-1,0));else if(b.key==="Enter"){b.preventDefault();const x=n[l];x&&T(x.value)}};return h.jsxs("div",{className:"dd",ref:f,children:[h.jsxs("button",{type:"button",className:`dd-trigger ${a?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,onClick:()=>u(b=>!b),onKeyDown:E,"aria-label":e,children:[h.jsx("span",{className:"dd-value",children:(p==null?void 0:p.label)??t??"Select…"}),h.jsx(kr,{size:13,className:"dd-chevron"})]}),a&&h.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((b,x)=>h.jsxs("button",{type:"button",role:"option","aria-selected":b.value===t,className:`dd-option ${x===l?"is-active":""} ${b.value===t?"is-selected":""}`,onMouseEnter:()=>c(x),onClick:()=>T(b.value),children:[h.jsx("span",{className:"dd-check",children:b.value===t&&h.jsx($c,{size:15})}),h.jsx("span",{className:"dd-option-label",children:b.label}),b.hint&&h.jsx("span",{className:"dd-option-hint",children:b.hint})]},b.value))})]})}const ob={none:"None",low:"Low",medium:"Medium",high:"High",xhigh:"Extra",max:"Max"};function Bu(e){return ob[e]??e.charAt(0).toUpperCase()+e.slice(1)}function lb({value:e,effort:t,draft:n,onChange:i,onEffortChange:a}){var pe;const u=ge(V=>V.models),[l,c]=_.useState(!1),[f,p]=_.useState(!1),[T,E]=_.useState(0),[b,x]=_.useState(0),C=_.useRef(null),v=_.useRef(null),D=e??((pe=u.find(V=>V.isDefault))==null?void 0:pe.modelId),I=u.find(V=>V.modelId===D),R=(I==null?void 0:I.effortLevels)??[],H=n?I==null?void 0:I.defaultEffort:I==null?void 0:I.recommendedEffort,W=R.length>0?t&&R.includes(t)?t:H:void 0,q=u.length+(R.length>0?1:0),B=()=>{c(!1),p(!1)};_.useEffect(()=>{if(!l)return;const V=de=>{C.current&&!C.current.contains(de.target)&&B()};return document.addEventListener("mousedown",V),()=>document.removeEventListener("mousedown",V)},[l]),_.useEffect(()=>{var de,he,re;if(!l)return;const V=u.findIndex(X=>X.modelId===D);E(V>=0?V:0),(re=(he=(de=v.current)==null?void 0:de.querySelector(".is-selected"))==null?void 0:he.scrollIntoView)==null||re.call(he,{block:"nearest"})},[l]);const ie=()=>{const V=W?R.indexOf(W):0;x(V>=0?V:0),p(!0)},Z=V=>{V!==D&&i(V),B()},ce=V=>{V!==W&&a(V),B()},M=V=>{if(!l){(V.key==="Enter"||V.key===" "||V.key==="ArrowDown")&&(V.preventDefault(),c(!0));return}if(f){if(V.key==="Escape"||V.key==="ArrowLeft")V.preventDefault(),p(!1);else if(V.key==="ArrowDown")V.preventDefault(),x(de=>Math.min(de+1,R.length-1));else if(V.key==="ArrowUp")V.preventDefault(),x(de=>Math.max(de-1,0));else if(V.key==="Enter"){V.preventDefault();const de=R[b];de&&ce(de)}return}if(V.key==="Escape")B();else if(V.key==="ArrowDown")V.preventDefault(),E(de=>Math.min(de+1,q-1));else if(V.key==="ArrowUp")V.preventDefault(),E(de=>Math.max(de-1,0));else if(V.key==="ArrowRight"&&T===u.length)V.preventDefault(),ie();else if(V.key==="Enter")if(V.preventDefault(),T===u.length)ie();else{const de=u[T];de&&Z(de.modelId)}};return h.jsxs("div",{className:"dd mp",ref:C,children:[h.jsxs("button",{type:"button",className:`dd-trigger ${l?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":l,onClick:()=>l?B():c(!0),onKeyDown:M,"aria-label":"Model",children:[h.jsx("span",{className:"dd-value",children:(I==null?void 0:I.modelName)??D??"Select…"}),W&&h.jsx("span",{className:"mp-trigger-effort",children:Bu(W)}),h.jsx(kr,{size:13,className:"dd-chevron"})]}),l&&h.jsxs("div",{className:"mp-panel",children:[h.jsx("div",{className:"mp-list",role:"listbox","aria-label":"Models",ref:v,children:u.map((V,de)=>h.jsxs("button",{type:"button",role:"option","aria-selected":V.modelId===D,className:`mp-option ${de===T&&!f?"is-active":""} ${V.modelId===D?"is-selected":""}`,onMouseEnter:()=>{E(de),p(!1)},onClick:()=>Z(V.modelId),children:[h.jsx("span",{className:"mp-option-name",children:V.modelName}),h.jsx("span",{className:"dd-option-hint",children:`${V.rateMultiplier}x`}),h.jsx("span",{className:"dd-check",children:V.modelId===D&&h.jsx($c,{size:15})})]},V.modelId))}),R.length>0&&W&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"mp-divider",role:"separator"}),h.jsxs("button",{type:"button",className:`mp-effort-row ${T===u.length||f?"is-active":""}`,"aria-haspopup":"listbox","aria-expanded":f,onMouseEnter:()=>{E(u.length),ie()},onClick:()=>f?p(!1):ie(),children:[h.jsx("span",{className:"mp-effort-label",children:"Effort"}),h.jsx("span",{className:"mp-effort-value",children:Bu(W)}),h.jsx(kg,{size:13,className:"mp-effort-chevron"})]})]}),f&&R.length>0&&h.jsx("div",{className:"mp-effort",role:"listbox","aria-label":"Effort",children:R.map((V,de)=>h.jsxs("button",{type:"button",role:"option","aria-selected":V===W,className:`mp-option mp-level ${de===b?"is-active":""} ${V===W?"is-selected":""}`,onMouseEnter:()=>x(de),onClick:()=>ce(V),children:[h.jsx("span",{className:"mp-option-name",children:Bu(V)}),V===(I==null?void 0:I.recommendedEffort)&&h.jsx("span",{className:"mp-pill",children:"Recommended"}),V==="max"&&h.jsxs("span",{className:"mp-pill is-warn",children:[h.jsx(Ad,{size:11}),"Uses the most credits"]}),h.jsx("span",{className:"dd-check",children:V===W&&h.jsx($c,{size:15})})]},V))})]})]})}function cb({value:e,onChange:t}){const n=ge(c=>c.modes),i=ge(c=>c.agents),a=ge(c=>c.defaultAgentId),u=n.length>0?n:i,l=e??a;return h.jsx(ju,{ariaLabel:"Agent",value:l,onChange:t,options:u.map(c=>({value:c.id,label:c.name}))})}function db(e,t=!1){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.round((Date.now()-n)/6e4),a=l=>t?`${l} ago`:l;if(i<1)return t?"just now":"now";if(i<60)return a(`${i}m`);const u=Math.round(i/60);return u<24?a(`${u}h`):a(`${Math.round(u/24)}d`)}function fb(e){if(!e)return"Unknown device";const t=/iPhone|iPad/.test(e)?"iOS":/Android/.test(e)?"Android":/Macintosh|Mac OS/.test(e)?"macOS":/Windows/.test(e)?"Windows":/Linux/.test(e)?"Linux":"Device",n=/Firefox/.test(e)?"Firefox":/Edg\//.test(e)?"Edge":/Chrome/.test(e)?"Chrome":/Safari/.test(e)?"Safari":"";return n?`${t} · ${n}`:t}function hb(e){return!!e&&/iPhone|iPad|Android/.test(e)}function pb({onSelfRevoked:e}){const[t,n]=_.useState(null),[i,a]=_.useState(!1),u=()=>qe.devices().then(f=>n(f.devices)).catch(()=>n([]));_.useEffect(()=>{u()},[]);const l=async f=>{a(!0);try{if(await qe.revokeDevice(f.id),f.current){e();return}await u()}finally{a(!1)}},c=async()=>{a(!0);try{await qe.logoutAll(),e()}finally{a(!1)}};return h.jsxs("section",{className:"settings-card","aria-label":"Logged-in devices",children:[h.jsxs("header",{className:"settings-card-head",children:[h.jsxs("span",{className:"settings-card-title",children:["Logged-in devices ",t&&h.jsx("span",{className:"settings-count",children:t.length})]}),t&&t.length>1&&h.jsx("button",{className:"btn-sm btn-ghost device-revoke",disabled:i,onClick:()=>void c(),children:"Sign out all"})]}),t===null?h.jsx("p",{className:"settings-empty",children:"Loading…"}):t.length===0?h.jsx("p",{className:"settings-empty",children:"No active devices."}):t.map(f=>h.jsxs("div",{className:"settings-item",children:[h.jsx("span",{className:"settings-item-icon",children:hb(f.userAgent)?h.jsx(ib,{size:16}):h.jsx(rb,{size:16})}),h.jsxs("span",{className:"settings-item-text",children:[h.jsxs("span",{className:"settings-item-name",children:[fb(f.userAgent),f.current&&h.jsx("span",{className:"device-badge",children:"This device"})]}),h.jsxs("span",{className:"settings-item-desc",children:["Active ",db(f.lastSeenAt,!0)]})]}),h.jsx("button",{className:"btn-sm btn-ghost device-revoke",disabled:i,onClick:()=>void l(f),children:"Sign out"})]},f.id))]})}const mb=[{id:"general",label:"General"},{id:"tools",label:"Tools"},{id:"account",label:"Account"},{id:"about",label:"About"}];function gb({onClose:e,onLock:t}){const[n,i]=_.useState("general"),[a,u]=_.useState(null),[l,c]=_.useState(null),f=()=>qe.settings().then(p=>u(p),p=>c(p instanceof Error?p.message:"Could not read the settings."));return _.useEffect(()=>{f();const p=T=>{T.key==="Escape"&&e()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[]),ra.createPortal(h.jsx("div",{className:"search-backdrop",onClick:e,children:h.jsxs("div",{className:"search-modal settings-modal",role:"dialog","aria-label":"Settings",onClick:p=>p.stopPropagation(),children:[h.jsxs("div",{className:"devices-head",children:[h.jsx("span",{className:"devices-title",children:"Settings"}),h.jsx("button",{className:"iconbtn settings-close","aria-label":"Close settings",onClick:e,children:h.jsx(ro,{size:16})})]}),h.jsxs("div",{className:"settings-body",children:[h.jsx("nav",{className:"settings-tabs",role:"tablist","aria-label":"Settings sections",children:mb.map(p=>h.jsx("button",{role:"tab","aria-selected":n===p.id,className:`settings-tab${n===p.id?" is-active":""}`,onClick:()=>i(p.id),children:p.label},p.id))}),h.jsxs("div",{className:`settings-pane settings-pane-${n}`,role:"tabpanel",children:[l&&h.jsx("p",{className:"settings-error",children:l}),n==="general"&&h.jsx(Eb,{settings:a,onError:c,onSaved:f}),n==="tools"&&h.jsx(bb,{onError:c}),n==="account"&&h.jsxs("div",{className:"settings-stack",children:[h.jsx(pb,{onSelfRevoked:t}),h.jsxs("section",{className:"settings-card","aria-label":"This browser",children:[h.jsx("header",{className:"settings-card-head",children:h.jsx("span",{className:"settings-card-title",children:"This browser"})}),h.jsx(Uu,{icon:h.jsx(j2,{size:16}),label:"Lock this app",hint:"Sign this browser out. Running chats keep going.",children:h.jsx("button",{className:"btn-sm",onClick:t,children:"Lock"})})]})]}),n==="about"&&h.jsx(Tb,{settings:a})]})]})]})}),document.body)}function Uu({icon:e,label:t,hint:n,children:i}){return h.jsxs("div",{className:"settings-item",children:[e&&h.jsx("span",{className:"settings-item-icon",children:e}),h.jsxs("span",{className:"settings-item-text",children:[h.jsx("span",{className:"settings-item-name",children:t}),n&&h.jsx("span",{className:"settings-item-desc",children:n})]}),h.jsx("span",{className:"setting-control",children:i})]})}function Eb({settings:e,onError:t,onSaved:n}){const i=ge(f=>f.models),a=ge(f=>f.agents),u=i.find(f=>f.isDefault),l=(u==null?void 0:u.effortLevels)??[],c=async f=>{t(null);try{await qe.updateDefaults(f),Ye.loadPickers(),n()}catch(p){t(p instanceof Error?p.message:"Could not save the setting.")}};return h.jsxs("div",{className:"settings-stack",children:[h.jsx("p",{className:"settings-note",children:"These are kiro’s own defaults, so the kiro CLI uses them too."}),h.jsxs("section",{className:"settings-card settings-card-menus","aria-label":"Defaults for new chats",children:[h.jsx("header",{className:"settings-card-head",children:h.jsx("span",{className:"settings-card-title",children:"Defaults for new chats"})}),h.jsx(Uu,{label:"Model",hint:"The model a new chat starts on.",children:h.jsx(ju,{ariaLabel:"Default model",value:u==null?void 0:u.modelId,onChange:f=>void c({modelId:f}),options:i.map(f=>({value:f.modelId,label:f.modelName,hint:`${f.rateMultiplier}x`}))})}),h.jsx(Uu,{label:"Effort",hint:"How long the model thinks before it answers.",children:u&&l.length>0?h.jsx(ju,{ariaLabel:"Default effort",value:u.defaultEffort,onChange:f=>void c({effort:{modelId:u.modelId,level:f}}),options:l.map(f=>({value:f,label:Bu(f)}))}):h.jsx("span",{className:"setting-none",children:"Not set for this model"})}),h.jsx(Uu,{label:"Agent",hint:"The agent a new chat uses.",children:h.jsx(ju,{ariaLabel:"Default agent",value:e==null?void 0:e.defaultAgentId,onChange:f=>void c({agentId:f}),options:a.map(f=>({value:f.id,label:f.name}))})})]})]})}function Tb({settings:e}){if(!e)return h.jsx("p",{className:"settings-note",children:"Loading…"});const t=e.server,n=[{title:"Versions",rows:[["Casper",t.version],["kiro-cli",t.kiroVersion??"unknown"],["kiro-cli path",t.kiroBin]]},{title:"Server",rows:[["Listening on",`${t.host}:${t.port}`],["Login",t.authEnabled?"Required":"Off"],["Live sessions",`${t.liveSessions} of ${t.maxLiveSessions}`],["Running for",Yu(t.uptimeMs/1e3)]]},{title:"Folders",rows:[["File access root",t.fileRoot],["Default folder",t.defaultCwd],["Data folder",t.dataDir],["Config file",t.configFile]]}];return h.jsxs("div",{className:"settings-stack",children:[h.jsx("p",{className:"settings-note",children:"These come from the config file and the environment, and change on a restart."}),n.map(i=>h.jsxs("section",{className:"settings-card","aria-label":i.title,children:[h.jsx("header",{className:"settings-card-head",children:h.jsx("span",{className:"settings-card-title",children:i.title})}),h.jsx("dl",{className:"settings-about",children:i.rows.map(([a,u])=>h.jsxs("div",{className:"settings-about-row",children:[h.jsx("dt",{children:a}),h.jsx("dd",{children:u})]},a))})]},i.title))]})}function yb(e){return[...e.matchAll(/"([^"]*)"|'([^']*)'|(\S+)/g)].map(t=>t[1]??t[2]??t[3]??"")}function xb(e){const t={};for(const n of e.split(`
|
|
57
|
+
`)){const i=n.trim();if(!i)continue;const a=i.indexOf("=");if(a<=0)throw new Error(`Write each variable as NAME=value: ${i}`);t[i.slice(0,a).trim()]=i.slice(a+1).trim()}return t}function bb({onError:e}){const[t,n]=_.useState(null),[i,a]=_.useState(!1),[u,l]=_.useState(!1),[c,f]=_.useState({name:"",target:"",args:"",env:""}),p=()=>qe.tools().then(n,C=>e(C instanceof Error?C.message:"Could not read the tools."));_.useEffect(()=>{p()},[]);const T=async C=>{a(!0),e(null);try{return await C(),await p(),!0}catch(v){return e(v instanceof Error?v.message:"That did not work."),!1}finally{a(!1)}},E=c.target.trim(),b=/^https?:\/\//.test(E),x=async()=>{let C;try{C=xb(c.env)}catch(D){e(D.message);return}await T(()=>qe.addMcpServer({name:c.name.trim(),...b?{url:E}:{command:E,args:yb(c.args)},...Object.keys(C).length?{env:C}:{}}))&&(l(!1),f({name:"",target:"",args:"",env:""}))};return t?h.jsxs("div",{className:"settings-stack",children:[h.jsx("p",{className:"settings-note",children:"kiro reads these when a session starts: a new chat, or an open one after Reload."}),h.jsxs("section",{className:"settings-card","aria-label":"MCP servers",children:[h.jsxs("header",{className:"settings-card-head",children:[h.jsxs("span",{className:"settings-card-title",children:["MCP servers ",h.jsx("span",{className:"settings-count",children:t.mcpServers.length})]}),!u&&h.jsxs("button",{className:"btn-sm tools-add",onClick:()=>l(!0),children:[h.jsx(Id,{size:13}),"Add server"]})]}),u&&h.jsxs("div",{className:"mcp-form",children:[h.jsxs("label",{className:"mcp-field",children:[h.jsx("span",{children:"Name"}),h.jsx("input",{className:"settings-input","aria-label":"Server name",placeholder:"figma",value:c.name,onChange:C=>f({...c,name:C.target.value})})]}),h.jsxs("label",{className:"mcp-field",children:[h.jsx("span",{children:"Command or URL"}),h.jsx("input",{className:"settings-input","aria-label":"Command or URL",placeholder:"npx, or https://…",value:c.target,onChange:C=>f({...c,target:C.target.value})})]}),!b&&h.jsxs("label",{className:"mcp-field mcp-field-wide",children:[h.jsx("span",{children:"Arguments"}),h.jsx("input",{className:"settings-input","aria-label":"Arguments",placeholder:"-y figma-developer-mcp --stdio",value:c.args,onChange:C=>f({...c,args:C.target.value})})]}),h.jsxs("label",{className:"mcp-field mcp-field-wide",children:[h.jsx("span",{children:"Environment"}),h.jsx("textarea",{className:"settings-input settings-mono-input","aria-label":"Environment variables",placeholder:"API_KEY=… (one per line)",rows:2,value:c.env,onChange:C=>f({...c,env:C.target.value})})]}),h.jsxs("div",{className:"mcp-form-actions mcp-field-wide",children:[h.jsx("button",{className:"btn-sm btn-ghost",onClick:()=>l(!1),children:"Cancel"}),h.jsx("button",{className:"btn-sm btn-primary",disabled:i||!c.name.trim()||!E,onClick:()=>void x(),children:"Add server"})]})]}),t.mcpServers.length===0?h.jsx("p",{className:"settings-empty",children:"No servers in ~/.kiro/settings/mcp.json."}):t.mcpServers.map(C=>h.jsxs("div",{className:`settings-item${C.disabled?" is-off":""}`,children:[h.jsxs("span",{className:"settings-item-text",children:[h.jsxs("span",{className:"settings-item-name",children:[C.name,h.jsx("span",{className:"tools-tag",children:C.url?"HTTP":"stdio"}),C.disabled&&h.jsx("span",{className:"tools-tag is-off",children:"Off"})]}),h.jsx("code",{className:"settings-item-detail",children:C.url??[C.command,...C.args].join(" ")}),C.envKeys.length>0&&h.jsxs("span",{className:"settings-item-env",children:["env: ",C.envKeys.join(", ")]})]}),h.jsxs("span",{className:"settings-item-actions",children:[h.jsxs("label",{className:"switch",title:C.disabled?"Turn on":"Turn off",children:[h.jsx("input",{type:"checkbox","aria-label":`Use ${C.name}`,checked:!C.disabled,disabled:i,onChange:v=>void T(()=>qe.setMcpServerDisabled(C.name,!v.target.checked))}),h.jsx("span",{className:"switch-track","aria-hidden":!0})]}),h.jsx("button",{className:"iconbtn tools-remove","aria-label":`Remove ${C.name}`,title:"Remove",disabled:i,onClick:()=>{window.confirm(`Remove ${C.name} from kiro's MCP servers?`)&&T(()=>qe.removeMcpServer(C.name))},children:h.jsx(nb,{size:15})})]})]},C.name))]}),h.jsxs("section",{className:"settings-card","aria-label":"Skills",children:[h.jsxs("header",{className:"settings-card-head",children:[h.jsxs("span",{className:"settings-card-title",children:["Skills ",h.jsx("span",{className:"settings-count",children:t.skills.length})]}),h.jsx("span",{className:"settings-card-where",children:"~/.kiro/skills"})]}),t.skills.length===0?h.jsx("p",{className:"settings-empty",children:"No skills in ~/.kiro/skills."}):t.skills.map(C=>h.jsxs("a",{className:"settings-item settings-item-link",href:qe.previewUrl("",C.path),target:"_blank",rel:"noopener noreferrer",children:[h.jsxs("span",{className:"settings-item-text",children:[h.jsx("span",{className:"settings-item-name",children:C.name}),C.description&&h.jsx("span",{className:"settings-item-desc",children:C.description})]}),h.jsx(kg,{size:14,className:"settings-item-chevron"})]},C.path))]})]}):h.jsx("p",{className:"settings-note",children:"Loading…"})}function kb({title:e,message:t,confirmLabel:n="Confirm",danger:i=!1,onConfirm:a,onCancel:u}){return _.useEffect(()=>{const l=c=>{c.key==="Escape"&&u()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[u]),ra.createPortal(h.jsx("div",{className:"confirm-backdrop",onClick:l=>{l.target===l.currentTarget&&u()},children:h.jsxs("div",{className:"confirm-modal",role:"dialog","aria-modal":"true","aria-label":e,children:[h.jsx("h3",{className:"confirm-title",children:e}),t&&h.jsx("p",{className:"confirm-message",children:t}),h.jsxs("div",{className:"confirm-actions",children:[h.jsx("button",{className:"btn-ghost",onClick:u,children:"Cancel"}),h.jsx("button",{className:i?"btn-danger":"btn-primary",onClick:a,autoFocus:!0,children:n})]})]})}),document.body)}const Sg="casper.groupChatsByDate";function Cb(){try{return localStorage.getItem(Sg)==="1"}catch{return!1}}function Sb(e){try{localStorage.setItem(Sg,e?"1":"0")}catch{}}function _b({sessions:e,activeId:t,loadingId:n,onOpen:i,onNew:a,onDelete:u,onRename:l,onPin:c,onLock:f}){const[p,T]=_.useState(!1),[E,b]=_.useState(!1),[x,C]=_.useState(null),[v,D]=_.useState(null),[I,R]=_.useState(null),[H,W]=_.useState(null),[q,B]=_.useState(""),[ie,Z]=_.useState(Cb),[ce,M]=_.useState(!1),[pe,V]=_.useState(()=>new Set),de=_.useCallback(()=>{C(null),D(null)},[]),he=w=>{const me=q.trim();me&&l(w,me),W(null)},re=e.filter(w=>w.pinned),X=e.filter(w=>!w.pinned),ye=()=>{Sb(!ie),Z(!ie)},J=w=>V(me=>{const Se=new Set(me);return Se.has(w)?Se.delete(w):Se.add(w),Se}),oe=h.jsx("button",{className:`iconbtn sidebar-section-btn sidebar-group-btn${ie?" is-on":""}`,"aria-label":"Group chats by date","aria-pressed":ie,title:ie?"Stop grouping by date":"Group by date",onClick:ye,children:h.jsx(sb,{size:15})}),S=(w,me,Se)=>h.jsxs("div",{className:"sidebar-section-head",children:[Se===void 0?h.jsx("span",{className:"sidebar-section-title",children:w}):h.jsxs("button",{className:"sidebar-section-toggle","aria-expanded":Se,onClick:()=>J(w),children:[h.jsx("span",{className:"sidebar-section-title",children:w}),h.jsx(kr,{size:12,className:`sidebar-section-chevron${Se?"":" is-closed"}`})]}),me]}),P=(w,me,Se)=>{const _e=!pe.has(w);return h.jsxs("section",{className:"sidebar-section","aria-label":w,children:[S(w,Se,_e),_e&&h.jsx("div",{className:"sidebar-list",children:me.map(G)})]},w)},G=w=>h.jsxs("div",{className:`srow ${w.chatId===t?"is-active":""} ${x===w.chatId?"is-menu-open":""}`,children:[H===w.chatId?h.jsx("input",{className:"srow-rename",autoFocus:!0,onFocus:me=>me.currentTarget.select(),value:q,onChange:me=>B(me.target.value),onBlur:()=>he(w.chatId),onKeyDown:me=>{me.key==="Enter"&&he(w.chatId),me.key==="Escape"&&W(null)},onClick:me=>me.stopPropagation()}):h.jsxs(_d,{className:"srow-open",to:Fu(w.chatId),onClick:me=>{me.metaKey||me.ctrlKey||me.shiftKey||me.altKey||i(w.chatId)},children:[h.jsx("span",{className:"sb-icon",children:n===w.chatId?h.jsx(br,{size:12,className:"srow-spinner"}):h.jsx("span",{className:"srow-dot"})}),h.jsx("span",{className:"srow-title",title:w.title,children:w.title})]}),h.jsxs("div",{className:"srow-menu",children:[h.jsx("button",{className:"iconbtn srow-menu-btn","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":x===w.chatId,onClick:me=>{me.stopPropagation();const Se=x===w.chatId;D(Se?null:me.currentTarget),C(Se?null:w.chatId)},children:h.jsx(F2,{size:16})}),x===w.chatId&&h.jsxs(Cg,{anchor:v,onClose:de,children:[h.jsx("button",{className:"menu-item",onClick:()=>{de(),c(w.chatId,!w.pinned)},children:w.pinned?"Unpin":"Pin"}),h.jsx("button",{className:"menu-item",onClick:()=>{B(w.title),W(w.chatId),de()},children:"Rename"}),h.jsx("button",{className:"menu-item menu-item-danger",onClick:()=>{de(),R(w.chatId)},children:"Delete"})]})]})]},w.chatId);return h.jsxs("aside",{className:"sidebar",children:[h.jsx("header",{className:`sidebar-head${ce?" is-scrolled":""}`,children:h.jsxs("span",{className:"brand",children:[h.jsx("img",{className:"brand-logo",src:"/logo.svg",alt:""}),h.jsx("span",{className:"wordmark",children:"Casper"})]})}),h.jsxs("div",{className:"sidebar-scroll",onScroll:w=>M(w.currentTarget.scrollTop>0),children:[h.jsxs("nav",{className:"sidebar-nav","aria-label":"Casper",children:[h.jsxs("button",{className:"snav-item",onClick:a,children:[h.jsx("span",{className:"sb-icon",children:h.jsx(Id,{size:18})}),"New"]}),h.jsxs("button",{className:"snav-item",onClick:()=>T(!0),children:[h.jsx("span",{className:"sb-icon",children:h.jsx(yg,{size:17})}),"Search"]}),h.jsxs("button",{className:"snav-item",onClick:()=>b(!0),children:[h.jsx("span",{className:"sb-icon",children:h.jsx(tb,{size:17})}),"Settings"]})]}),re.length>0&&P("Pinned",re),e.length===0?h.jsxs(h.Fragment,{children:[S("Chats",oe),h.jsx("div",{className:"sidebar-list",children:h.jsx("p",{className:"sidebar-empty",children:"No sessions yet. Start one and it keeps running while you're away."})})]}):ie?P2(X).map((w,me)=>P(w.label,w.chats,me===0?oe:void 0)):X.length>0&&P("Chats",X,oe)]}),p&&h.jsx(ub,{sessions:e,onOpen:i,onClose:()=>T(!1)}),E&&h.jsx(gb,{onClose:()=>b(!1),onLock:()=>{b(!1),f()}}),I&&h.jsx(kb,{title:"Delete session?",message:"This session and its history will be permanently deleted. This can't be undone.",confirmLabel:"Delete",danger:!0,onConfirm:()=>{const w=I;R(null),u(w)},onCancel:()=>R(null)})]})}const vb="modulepreload",Nb=function(e){return"/"+e},dm={},Wc=function(t,n,i){let a=Promise.resolve();if(n&&n.length>0){let l=function(p){return Promise.all(p.map(T=>Promise.resolve(T).then(E=>({status:"fulfilled",value:E}),E=>({status:"rejected",reason:E}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));a=l(n.map(p=>{if(p=Nb(p),p in dm)return;dm[p]=!0;const T=p.endsWith(".css"),E=T?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${E}`))return;const b=document.createElement("link");if(b.rel=T?"stylesheet":vb,T||(b.as="script"),b.crossOrigin="",b.href=p,f&&b.setAttribute("nonce",f),document.head.appendChild(b),T)return new Promise((x,C)=>{b.addEventListener("load",x),b.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&u(c.reason);return t().catch(u)})};function fm(e){const t=[],n=String(e||"");let i=n.indexOf(","),a=0,u=!1;for(;!u;){i===-1&&(i=n.length,u=!0);const l=n.slice(a,i).trim();(l||!u)&&t.push(l),a=i+1,i=n.indexOf(",",a)}return t}function _g(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ab=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ib={};function hm(e,t){return(Ib.jsx?Ab:wb).test(e)}const Lb=/[ \t\n\f\r]/g;function Rb(e){return typeof e=="object"?e.type==="text"?pm(e.value):!1:pm(e)}function pm(e){return e.replace(Lb,"")===""}class ia{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function vg(e,t){const n={},i={};for(const a of e)Object.assign(n,a.property),Object.assign(i,a.normal);return new ia(n,i,t)}function Xs(e){return e.toLowerCase()}class zt{constructor(t,n){this.attribute=n,this.property=t}}zt.prototype.attribute="";zt.prototype.booleanish=!1;zt.prototype.boolean=!1;zt.prototype.commaOrSpaceSeparated=!1;zt.prototype.commaSeparated=!1;zt.prototype.defined=!1;zt.prototype.mustUseProperty=!1;zt.prototype.number=!1;zt.prototype.overloadedBoolean=!1;zt.prototype.property="";zt.prototype.spaceSeparated=!1;zt.prototype.space=void 0;let Ob=0;const Ie=Jr(),ct=Jr(),Yc=Jr(),ue=Jr(),Qe=Jr(),qr=Jr(),Qt=Jr();function Jr(){return 2**++Ob}const Vc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:ct,commaOrSpaceSeparated:Qt,commaSeparated:qr,number:ue,overloadedBoolean:Yc,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),fc=Object.keys(Vc);class Ld extends zt{constructor(t,n,i,a){let u=-1;if(super(t,n),mm(this,"space",a),typeof i=="number")for(;++u<fc.length;){const l=fc[u];mm(this,fc[u],(i&Vc[l])===Vc[l])}}}Ld.prototype.defined=!0;function mm(e,t,n){n&&(e[t]=n)}function ji(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const u=new Ld(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[Xs(i)]=i,n[Xs(u.attribute)]=i}return new ia(t,n,e.space)}const Ng=ji({properties:{ariaActiveDescendant:null,ariaAtomic:ct,ariaAutoComplete:null,ariaBusy:ct,ariaChecked:ct,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ct,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ct,ariaFlowTo:Qe,ariaGrabbed:ct,ariaHasPopup:null,ariaHidden:ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ue,ariaLive:null,ariaModal:ct,ariaMultiLine:ct,ariaMultiSelectable:ct,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:ct,ariaReadOnly:ct,ariaRelevant:null,ariaRequired:ct,ariaRoleDescription:Qe,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:ct,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function wg(e,t){return t in e?e[t]:t}function Ag(e,t){return wg(e,t.toLowerCase())}const Db=ji({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qr,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alpha:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:Qe,autoFocus:Ie,autoPlay:Ie,blocking:Qe,capture:null,charSet:null,checked:Ie,cite:null,className:Qe,closedBy:null,colorSpace:null,cols:ue,colSpan:ue,command:null,commandFor:null,content:null,contentEditable:ct,controls:Ie,controlsList:Qe,coords:ue|qr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Yc,draggable:ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:Qe,height:ue,hidden:Yc,high:ue,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Ie,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:ue,pattern:null,ping:Qe,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:Qe,required:Ie,reversed:Ie,rows:ue,rowSpan:ue,sandbox:Qe,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootCustomElementRegistry:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shadowRootSerializable:Ie,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:ct,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:ct,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ie,disablePictureInPicture:Ie,disableRemotePlayback:Ie,exportParts:qr,part:Qe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Ag}),Pb=ji({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:Qt,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Qe,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:qr,g2:qr,glyphName:qr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qt,rev:Qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qt,requiredFeatures:Qt,requiredFonts:Qt,requiredFormats:Qt,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qt,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wg}),Ig=ji({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()}}),Lg=ji({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ag}),Rg=ji({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Mb={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"},Fb=/[A-Z]/g,gm=/-[a-z]/g,jb=/^data[-\w.:]+$/i;function io(e,t){const n=Xs(t);let i=t,a=zt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jb.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(gm,Ub);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!gm.test(u)){let l=u.replace(Fb,Bb);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=Ld}return new a(i,t)}function Bb(e){return"-"+e.toLowerCase()}function Ub(e){return e.charAt(1).toUpperCase()}const sa=vg([Ng,Db,Ig,Lg,Rg],"html"),Cr=vg([Ng,Pb,Ig,Lg,Rg],"svg");function Em(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Og(e){return e.join(" ").trim()}var Ai={},hc,Tm;function Hb(){if(Tm)return hc;Tm=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
58
|
+
`,p="/",T="*",E="",b="comment",x="declaration";function C(D,I){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];I=I||{};var R=1,H=1;function W(he){var re=he.match(t);re&&(R+=re.length);var X=he.lastIndexOf(f);H=~X?he.length-X:H+he.length}function q(){var he={line:R,column:H};return function(re){return re.position=new B(he),ce(),re}}function B(he){this.start=he,this.end={line:R,column:H},this.source=I.source}B.prototype.content=D;function ie(he){var re=new Error(I.source+":"+R+":"+H+": "+he);if(re.reason=he,re.filename=I.source,re.line=R,re.column=H,re.source=D,!I.silent)throw re}function Z(he){var re=he.exec(D);if(re){var X=re[0];return W(X),D=D.slice(X.length),re}}function ce(){Z(n)}function M(he){var re;for(he=he||[];re=pe();)re!==!1&&he.push(re);return he}function pe(){var he=q();if(!(p!=D.charAt(0)||T!=D.charAt(1))){for(var re=2;E!=D.charAt(re)&&(T!=D.charAt(re)||p!=D.charAt(re+1));)++re;if(re+=2,E===D.charAt(re-1))return ie("End of comment missing");var X=D.slice(2,re-2);return H+=2,W(X),D=D.slice(re),H+=2,he({type:b,comment:X})}}function V(){var he=q(),re=Z(i);if(re){if(pe(),!Z(a))return ie("property missing ':'");var X=Z(u),ye=he({type:x,property:v(re[0].replace(e,E)),value:X?v(X[0].replace(e,E)):E});return Z(l),ye}}function de(){var he=[];M(he);for(var re;re=V();)re!==!1&&(he.push(re),M(he));return he}return ce(),de()}function v(D){return D?D.replace(c,E):E}return hc=C,hc}var ym;function zb(){if(ym)return Ai;ym=1;var e=Ai&&Ai.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.default=n;const t=e(Hb());function n(i,a){let u=null;if(!i||typeof i!="string")return u;const l=(0,t.default)(i),c=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:T}=f;c?a(p,T,f):T&&(u=u||{},u[p]=T)}),u}return Ai}var Os={},xm;function $b(){if(xm)return Os;xm=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,u=function(p){return!p||n.test(p)||e.test(p)},l=function(p,T){return T.toUpperCase()},c=function(p,T){return"".concat(T,"-")},f=function(p,T){return T===void 0&&(T={}),u(p)?p:(p=p.toLowerCase(),T.reactCompat?p=p.replace(a,c):p=p.replace(i,c),p.replace(t,l))};return Os.camelCase=f,Os}var Ds,bm;function Wb(){if(bm)return Ds;bm=1;var e=Ds&&Ds.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(zb()),n=$b();function i(a,u){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(c,f){c&&f&&(l[(0,n.camelCase)(c,u)]=f)}),l}return i.default=i,Ds=i,Ds}var Yb=Wb();const Vb=pd(Yb),so=Dg("end"),Ln=Dg("start");function Dg(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Pg(e){const t=Ln(e),n=so(e);if(t&&n)return{start:t,end:n}}function Hs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?km(e.position):"start"in e||"end"in e?km(e):"line"in e||"column"in e?qc(e):""}function qc(e){return Cm(e&&e.line)+":"+Cm(e&&e.column)}function km(e){return qc(e&&e.start)+"-"+qc(e&&e.end)}function Cm(e){return e&&typeof e=="number"?e:1}class wt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?a=t:!u.cause&&t&&(l=!0,a=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?u.ruleId=i:(u.source=i.slice(0,f),u.ruleId=i.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=Hs(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}wt.prototype.file="";wt.prototype.name="";wt.prototype.reason="";wt.prototype.message="";wt.prototype.stack="";wt.prototype.column=void 0;wt.prototype.line=void 0;wt.prototype.ancestors=void 0;wt.prototype.cause=void 0;wt.prototype.fatal=void 0;wt.prototype.place=void 0;wt.prototype.ruleId=void 0;wt.prototype.source=void 0;const Rd={}.hasOwnProperty,qb=new Map,Qb=/[A-Z]/g,Gb=new Set(["table","tbody","thead","tfoot","tr"]),Kb=new Set(["td","th"]),Mg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=sk(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");i=ik(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?Cr:sa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=Fg(a,e,void 0);return u&&typeof u!="string"?u:a.create(e,a.Fragment,{children:u||void 0},void 0)}function Fg(e,t,n){if(t.type==="element")return Jb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Zb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return tk(e,t,n);if(t.type==="mdxjsEsm")return ek(e,t);if(t.type==="root")return nk(e,t,n);if(t.type==="text")return rk(e,t)}function Jb(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=Cr,e.schema=a),e.ancestors.push(t);const u=Bg(e,t.tagName,!1),l=ak(e,t);let c=Dd(e,t);return Gb.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Rb(f):!0})),jg(e,l,u,t),Od(l,c),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function Zb(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Js(e,t.position)}function ek(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Js(e,t.position)}function tk(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=Cr,e.schema=a),e.ancestors.push(t);const u=t.name===null?e.Fragment:Bg(e,t.name,!0),l=uk(e,t),c=Dd(e,t);return jg(e,l,u,t),Od(l,c),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function nk(e,t,n){const i={};return Od(i,Dd(e,t)),e.create(t,e.Fragment,i,n)}function rk(e,t){return t.value}function jg(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Od(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ik(e,t,n){return i;function i(a,u,l,c){const p=Array.isArray(l.children)?n:t;return c?p(u,l,c):p(u,l)}}function sk(e,t){return n;function n(i,a,u,l){const c=Array.isArray(u.children),f=Ln(i);return t(a,u,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function ak(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Rd.call(t.properties,a)){const u=ok(e,a,t.properties[a]);if(u){const[l,c]=u;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&Kb.has(t.tagName)?i=c:n[l]=c}}if(i){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function uk(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const l=u.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Js(e,t.position);else{const a=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,u=e.evaluater.evaluateExpression(c.expression)}else Js(e,t.position);else u=i.value===null?!0:i.value;n[a]=u}return n}function Dd(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:qb;for(;++i<t.children.length;){const u=t.children[i];let l;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const p=a.get(f)||0;l=f+"-"+p,a.set(f,p+1)}}const c=Fg(e,u,l);c!==void 0&&n.push(c)}return n}function ok(e,t,n){const i=io(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?_g(n):Og(n)),i.property==="style"){let a=typeof n=="object"?n:lk(e,String(n));return e.stylePropertyNameCase==="css"&&(a=ck(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?Mb[i.property]||i.property:i.attribute,n]}}function lk(e,t){try{return Vb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new wt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Mg+"#cannot-parse-style-attribute",a}}function Bg(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let u=-1,l;for(;++u<a.length;){const c=hm(a[u])?{type:"Identifier",name:a[u]}:{type:"Literal",value:a[u]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}i=l}else i=hm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Rd.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);Js(e)}function Js(e,t){const n=new wt("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=Mg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ck(e){const t={};let n;for(n in e)Rd.call(e,n)&&(t[dk(n)]=e[n]);return t}function dk(e){let t=e.replace(Qb,fk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function fk(e){return"-"+e.toLowerCase()}const pc={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"]},hk={};function Pd(e,t){const n=hk,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ug(e,i,a)}function Ug(e,t,n){if(pk(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 Sm(e.children,t,n)}return Array.isArray(e)?Sm(e,t,n):""}function Sm(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=Ug(e[a],t,n);return i.join("")}function pk(e){return!!(e&&typeof e=="object")}const _m=document.createElement("i");function Md(e){const t="&"+e+";";_m.innerHTML=t;const n=_m.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Gt(e,t,n,i){const a=e.length;let u=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<i.length;)l=i.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function sn(e,t){return e.length>0?(Gt(e,e.length,0,t),e):t}const vm={}.hasOwnProperty;function Hg(e){const t={};let n=-1;for(;++n<e.length;)mk(t,e[n]);return t}function mk(e,t){let n;for(n in t){const a=(vm.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){vm.call(a,l)||(a[l]=[]);const c=u[l];gk(a[l],Array.isArray(c)?c:c?[c]:[])}}}function gk(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Gt(e,0,0,i)}function zg(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Tn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=Sr(/[A-Za-z]/),vt=Sr(/[\dA-Za-z]/),Ek=Sr(/[#-'*+\--9=?A-Z^-~]/);function Vu(e){return e!==null&&(e<32||e===127)}const Qc=Sr(/\d/),Tk=Sr(/[\dA-Fa-f]/),yk=Sr(/[!-/:-@[-`{-~]/);function Ce(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const ao=Sr(new RegExp("\\p{P}|\\p{S}","u")),Gr=Sr(/\s/);function Sr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bi(e){const t=[];let n=-1,i=0,a=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&vt(e.charCodeAt(n+1))&&vt(e.charCodeAt(n+2)))a=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(l=String.fromCharCode(u,c),a=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(i)}function Me(e,t,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(f){return Fe(f)?(e.enter(n),c(f)):t(f)}function c(f){return Fe(f)&&u++<a?(e.consume(f),c):(e.exit(n),t(f))}}const xk={tokenize:bk};function bk(e){const t=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Me(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),u(c)}function u(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ce(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),l)}}const kk={tokenize:Ck},Nm={tokenize:Sk};function Ck(e){const t=this,n=[];let i=0,a,u,l;return c;function c(H){if(i<n.length){const W=n[i];return t.containerState=W[1],e.attempt(W[0].continuation,f,p)(H)}return p(H)}function f(H){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&R();const W=t.events.length;let q=W,B;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){B=t.events[q][1].end;break}I(i);let ie=W;for(;ie<t.events.length;)t.events[ie][1].end={...B},ie++;return Gt(t.events,q+1,0,t.events.slice(W)),t.events.length=ie,p(H)}return c(H)}function p(H){if(i===n.length){if(!a)return b(H);if(a.currentConstruct&&a.currentConstruct.concrete)return C(H);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nm,T,E)(H)}function T(H){return a&&R(),I(i),b(H)}function E(H){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,C(H)}function b(H){return t.containerState={},e.attempt(Nm,x,C)(H)}function x(H){return i++,n.push([t.currentConstruct,t.containerState]),b(H)}function C(H){if(H===null){a&&R(),I(0),e.consume(H);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:u}),v(H)}function v(H){if(H===null){D(e.exit("chunkFlow"),!0),I(0),e.consume(H);return}return Ce(H)?(e.consume(H),D(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(H),v)}function D(H,W){const q=t.sliceStream(H);if(W&&q.push(null),H.previous=u,u&&(u.next=H),u=H,a.defineSkip(H.start),a.write(q),t.parser.lazy[H.start.line]){let B=a.events.length;for(;B--;)if(a.events[B][1].start.offset<l&&(!a.events[B][1].end||a.events[B][1].end.offset>l))return;const ie=t.events.length;let Z=ie,ce,M;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(ce){M=t.events[Z][1].end;break}ce=!0}for(I(i),B=ie;B<t.events.length;)t.events[B][1].end={...M},B++;Gt(t.events,Z+1,0,t.events.slice(ie)),t.events.length=B}}function I(H){let W=n.length;for(;W-- >H;){const q=n[W];t.containerState=q[1],q[0].exit.call(t,e)}n.length=H}function R(){a.write([null]),u=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Sk(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(e){if(e===null||Ge(e)||Gr(e))return 1;if(ao(e))return 2}function uo(e,t,n){const i=[];let a=-1;for(;++a<e.length;){const u=e[a].resolveAll;u&&!i.includes(u)&&(t=u(t,n),i.push(u))}return t}const Gc={name:"attention",resolveAll:_k,tokenize:vk};function _k(e,t){let n=-1,i,a,u,l,c,f,p,T;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E={...e[i][1].end},b={...e[n][1].start};wm(E,-f),wm(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:E,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},u={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=sn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=sn(p,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",u,t]]),p=sn(p,uo(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),p=sn(p,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(T=2,p=sn(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):T=0,Gt(e,i-1,n-i+3,p),n=i+p.length-T-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function vk(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=Di(i);let u;return l;function l(f){return u=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===u)return e.consume(f),c;const p=e.exit("attentionSequence"),T=Di(f),E=!T||T===2&&a||n.includes(f),b=!a||a===2&&T||n.includes(i);return p._open=!!(u===42?E:E&&(a||!b)),p._close=!!(u===42?b:b&&(T||!E)),t(f)}}function wm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Nk={name:"autolink",tokenize:wk};function wk(e,t,n){let i=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Rt(x)?(e.consume(x),l):x===64?n(x):p(x)}function l(x){return x===43||x===45||x===46||vt(x)?(i=1,c(x)):p(x)}function c(x){return x===58?(e.consume(x),i=0,f):(x===43||x===45||x===46||vt(x))&&i++<32?(e.consume(x),c):(i=0,p(x))}function f(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||Vu(x)?n(x):(e.consume(x),f)}function p(x){return x===64?(e.consume(x),T):Ek(x)?(e.consume(x),p):n(x)}function T(x){return vt(x)?E(x):n(x)}function E(x){return x===46?(e.consume(x),i=0,T):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):b(x)}function b(x){if((x===45||vt(x))&&i++<63){const C=x===45?b:E;return e.consume(x),C}return n(x)}}const aa={partial:!0,tokenize:Ak};function Ak(e,t,n){return i;function i(u){return Fe(u)?Me(e,a,"linePrefix")(u):a(u)}function a(u){return u===null||Ce(u)?t(u):n(u)}}const $g={continuation:{tokenize:Lk},exit:Rk,name:"blockQuote",tokenize:Ik};function Ik(e,t,n){const i=this;return a;function a(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return Fe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Lk(e,t,n){const i=this;return a;function a(l){return Fe(l)?Me(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt($g,t,n)(l)}}function Rk(e){e.exit("blockQuote")}const Wg={name:"characterEscape",tokenize:Ok};function Ok(e,t,n){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),a}function a(u){return yk(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const Yg={name:"characterReference",tokenize:Dk};function Dk(e,t,n){const i=this;let a=0,u,l;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,l=vt,T(E))}function p(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=Tk,T):(e.enter("characterReferenceValue"),u=7,l=Qc,T(E))}function T(E){if(E===59&&a){const b=e.exit("characterReferenceValue");return l===vt&&!Md(i.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(E)&&a++<u?(e.consume(E),T):n(E)}}const Am={partial:!0,tokenize:Mk},Im={concrete:!0,name:"codeFenced",tokenize:Pk};function Pk(e,t,n){const i=this,a={partial:!0,tokenize:q};let u=0,l=0,c;return f;function f(B){return p(B)}function p(B){const ie=i.events[i.events.length-1];return u=ie&&ie[1].type==="linePrefix"?ie[2].sliceSerialize(ie[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),T(B)}function T(B){return B===c?(l++,e.consume(B),T):l<3?n(B):(e.exit("codeFencedFenceSequence"),Fe(B)?Me(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Ce(B)?(e.exit("codeFencedFence"),i.interrupt?t(B):e.check(Am,v,W)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Ce(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Fe(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,x,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),b)}function x(B){return B===null||Ce(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(B))}function C(B){return B===null||Ce(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),C)}function v(B){return e.attempt(a,W,D)(B)}function D(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),I}function I(B){return u>0&&Fe(B)?Me(e,R,"linePrefix",u+1)(B):R(B)}function R(B){return B===null||Ce(B)?e.check(Am,v,W)(B):(e.enter("codeFlowValue"),H(B))}function H(B){return B===null||Ce(B)?(e.exit("codeFlowValue"),R(B)):(e.consume(B),H)}function W(B){return e.exit("codeFenced"),t(B)}function q(B,ie,Z){let ce=0;return M;function M(re){return B.enter("lineEnding"),B.consume(re),B.exit("lineEnding"),pe}function pe(re){return B.enter("codeFencedFence"),Fe(re)?Me(B,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):V(re)}function V(re){return re===c?(B.enter("codeFencedFenceSequence"),de(re)):Z(re)}function de(re){return re===c?(ce++,B.consume(re),de):ce>=l?(B.exit("codeFencedFenceSequence"),Fe(re)?Me(B,he,"whitespace")(re):he(re)):Z(re)}function he(re){return re===null||Ce(re)?(B.exit("codeFencedFence"),ie(re)):Z(re)}}}function Mk(e,t,n){const i=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const mc={name:"codeIndented",tokenize:jk},Fk={partial:!0,tokenize:Bk};function jk(e,t,n){const i=this;return a;function a(p){return e.enter("codeIndented"),Me(e,u,"linePrefix",5)(p)}function u(p){const T=i.events[i.events.length-1];return T&&T[1].type==="linePrefix"&&T[2].sliceSerialize(T[1],!0).length>=4?l(p):n(p)}function l(p){return p===null?f(p):Ce(p)?e.attempt(Fk,l,f)(p):(e.enter("codeFlowValue"),c(p))}function c(p){return p===null||Ce(p)?(e.exit("codeFlowValue"),l(p)):(e.consume(p),c)}function f(p){return e.exit("codeIndented"),t(p)}}function Bk(e,t,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):Me(e,u,"linePrefix",5)(l)}function u(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Ce(l)?a(l):n(l)}}const Uk={name:"codeText",previous:zk,resolve:Hk,tokenize:$k};function Hk(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function zk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $k(e,t,n){let i=0,a,u;return l;function l(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),i++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(u=e.enter("codeTextSequence"),a=0,T(E)):Ce(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(E))}function p(E){return E===null||E===32||E===96||Ce(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),p)}function T(E){return E===96?(e.consume(E),a++,T):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(u.type="codeTextData",p(E))}}class Wk{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const a=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&Ps(this.left,i),u.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),Ps(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ps(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);Ps(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ps(this.left,n.reverse())}}}function Ps(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 Vg(e){const t={};let n=-1,i,a,u,l,c,f,p;const T=new Wk(e);for(;++n<T.length;){for(;n in t;)n=t[n];if(i=T.get(n),n&&i[1].type==="chunkFlow"&&T.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,Yk(T,n)),n=t[n],p=!0);else if(i[1]._container){for(u=n,a=void 0;u--;)if(l=T.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(T.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(i[1].end={...T.get(a)[1].start},c=T.slice(a,n),c.unshift(i),T.splice(a,n-a+1,c))}}return Gt(e,0,Number.POSITIVE_INFINITY,T.slice(0)),!p}function Yk(e,t){const n=e.get(t)[1],i=e.get(t)[2];let a=t-1;const u=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],p={};let T,E,b=-1,x=n,C=0,v=0;const D=[v];for(;x;){for(;e.get(++a)[1]!==x;);u.push(a),x._tokenizer||(T=i.sliceStream(x),x.next||T.push(null),E&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(T),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),E=x,x=x.next}for(x=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(v=b+1,D.push(v),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):D.pop(),b=D.length;b--;){const I=c.slice(D[b],D[b+1]),R=u.pop();f.push([R,R+I.length-1]),e.splice(R,2,I)}for(f.reverse(),b=-1;++b<f.length;)p[C+f[b][0]]=C+f[b][1],C+=f[b][1]-f[b][0]-1;return p}const Vk={resolve:Qk,tokenize:Gk},qk={partial:!0,tokenize:Kk};function Qk(e){return Vg(e),e}function Gk(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?u(c):Ce(c)?e.check(qk,l,u)(c):(e.consume(c),a)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Kk(e,t,n){const i=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Me(e,u,"linePrefix")}function u(l){if(l===null||Ce(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function qg(e,t,n,i,a,u,l,c,f){const p=f||Number.POSITIVE_INFINITY;let T=0;return E;function E(I){return I===60?(e.enter(i),e.enter(a),e.enter(u),e.consume(I),e.exit(u),b):I===null||I===32||I===41||Vu(I)?n(I):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(I))}function b(I){return I===62?(e.enter(u),e.consume(I),e.exit(u),e.exit(a),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(I))}function x(I){return I===62?(e.exit("chunkString"),e.exit(c),b(I)):I===null||I===60||Ce(I)?n(I):(e.consume(I),I===92?C:x)}function C(I){return I===60||I===62||I===92?(e.consume(I),x):x(I)}function v(I){return!T&&(I===null||I===41||Ge(I))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(I)):T<p&&I===40?(e.consume(I),T++,v):I===41?(e.consume(I),T--,v):I===null||I===32||I===40||Vu(I)?n(I):(e.consume(I),I===92?D:v)}function D(I){return I===40||I===41||I===92?(e.consume(I),v):v(I)}}function Qg(e,t,n,i,a,u){const l=this;let c=0,f;return p;function p(x){return e.enter(i),e.enter(a),e.consume(x),e.exit(a),e.enter(u),T}function T(x){return c>999||x===null||x===91||x===93&&!f||x===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(u),e.enter(a),e.consume(x),e.exit(a),e.exit(i),t):Ce(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),T):(e.enter("chunkString",{contentType:"string"}),E(x))}function E(x){return x===null||x===91||x===93||Ce(x)||c++>999?(e.exit("chunkString"),T(x)):(e.consume(x),f||(f=!Fe(x)),x===92?b:E)}function b(x){return x===91||x===92||x===93?(e.consume(x),c++,E):E(x)}}function Gg(e,t,n,i,a,u){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(i),e.enter(a),e.consume(b),e.exit(a),l=b===40?41:b,f):n(b)}function f(b){return b===l?(e.enter(a),e.consume(b),e.exit(a),e.exit(i),t):(e.enter(u),p(b))}function p(b){return b===l?(e.exit(u),f(l)):b===null?n(b):Ce(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Me(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),T(b))}function T(b){return b===l||b===null||Ce(b)?(e.exit("chunkString"),p(b)):(e.consume(b),b===92?E:T)}function E(b){return b===l||b===92?(e.consume(b),T):T(b)}}function zs(e,t){let n;return i;function i(a){return Ce(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):Fe(a)?Me(e,i,n?"linePrefix":"lineSuffix")(a):t(a)}}const Xk={name:"definition",tokenize:Zk},Jk={partial:!0,tokenize:eC};function Zk(e,t,n){const i=this;let a;return u;function u(x){return e.enter("definition"),l(x)}function l(x){return Qg.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return a=Tn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return Ge(x)?zs(e,p)(x):p(x)}function p(x){return qg(e,T,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function T(x){return e.attempt(Jk,E,E)(x)}function E(x){return Fe(x)?Me(e,b,"whitespace")(x):b(x)}function b(x){return x===null||Ce(x)?(e.exit("definition"),i.parser.defined.push(a),t(x)):n(x)}}function eC(e,t,n){return i;function i(c){return Ge(c)?zs(e,a)(c):n(c)}function a(c){return Gg(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return Fe(c)?Me(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ce(c)?t(c):n(c)}}const tC={name:"hardBreakEscape",tokenize:nC};function nC(e,t,n){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),a}function a(u){return Ce(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const rC={name:"headingAtx",resolve:iC,tokenize:sC};function iC(e,t){let n=e.length-2,i=3,a,u;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},u={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Gt(e,i,n-i+1,[["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t]])),e}function sC(e,t,n){let i=0;return a;function a(T){return e.enter("atxHeading"),u(T)}function u(T){return e.enter("atxHeadingSequence"),l(T)}function l(T){return T===35&&i++<6?(e.consume(T),l):T===null||Ge(T)?(e.exit("atxHeadingSequence"),c(T)):n(T)}function c(T){return T===35?(e.enter("atxHeadingSequence"),f(T)):T===null||Ce(T)?(e.exit("atxHeading"),t(T)):Fe(T)?Me(e,c,"whitespace")(T):(e.enter("atxHeadingText"),p(T))}function f(T){return T===35?(e.consume(T),f):(e.exit("atxHeadingSequence"),c(T))}function p(T){return T===null||T===35||Ge(T)?(e.exit("atxHeadingText"),c(T)):(e.consume(T),p)}}const aC=["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"],Lm=["pre","script","style","textarea"],uC={concrete:!0,name:"htmlFlow",resolveTo:cC,tokenize:dC},oC={partial:!0,tokenize:hC},lC={partial:!0,tokenize:fC};function cC(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 dC(e,t,n){const i=this;let a,u,l,c,f;return p;function p(w){return T(w)}function T(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),E}function E(w){return w===33?(e.consume(w),b):w===47?(e.consume(w),u=!0,v):w===63?(e.consume(w),a=3,i.interrupt?t:S):Rt(w)?(e.consume(w),l=String.fromCharCode(w),D):n(w)}function b(w){return w===45?(e.consume(w),a=2,x):w===91?(e.consume(w),a=5,c=0,C):Rt(w)?(e.consume(w),a=4,i.interrupt?t:S):n(w)}function x(w){return w===45?(e.consume(w),i.interrupt?t:S):n(w)}function C(w){const me="CDATA[";return w===me.charCodeAt(c++)?(e.consume(w),c===me.length?i.interrupt?t:V:C):n(w)}function v(w){return Rt(w)?(e.consume(w),l=String.fromCharCode(w),D):n(w)}function D(w){if(w===null||w===47||w===62||Ge(w)){const me=w===47,Se=l.toLowerCase();return!me&&!u&&Lm.includes(Se)?(a=1,i.interrupt?t(w):V(w)):aC.includes(l.toLowerCase())?(a=6,me?(e.consume(w),I):i.interrupt?t(w):V(w)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(w):u?R(w):H(w))}return w===45||vt(w)?(e.consume(w),l+=String.fromCharCode(w),D):n(w)}function I(w){return w===62?(e.consume(w),i.interrupt?t:V):n(w)}function R(w){return Fe(w)?(e.consume(w),R):M(w)}function H(w){return w===47?(e.consume(w),M):w===58||w===95||Rt(w)?(e.consume(w),W):Fe(w)?(e.consume(w),H):M(w)}function W(w){return w===45||w===46||w===58||w===95||vt(w)?(e.consume(w),W):q(w)}function q(w){return w===61?(e.consume(w),B):Fe(w)?(e.consume(w),q):H(w)}function B(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),f=w,ie):Fe(w)?(e.consume(w),B):Z(w)}function ie(w){return w===f?(e.consume(w),f=null,ce):w===null||Ce(w)?n(w):(e.consume(w),ie)}function Z(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ge(w)?q(w):(e.consume(w),Z)}function ce(w){return w===47||w===62||Fe(w)?H(w):n(w)}function M(w){return w===62?(e.consume(w),pe):n(w)}function pe(w){return w===null||Ce(w)?V(w):Fe(w)?(e.consume(w),pe):n(w)}function V(w){return w===45&&a===2?(e.consume(w),X):w===60&&a===1?(e.consume(w),ye):w===62&&a===4?(e.consume(w),P):w===63&&a===3?(e.consume(w),S):w===93&&a===5?(e.consume(w),oe):Ce(w)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(oC,G,de)(w)):w===null||Ce(w)?(e.exit("htmlFlowData"),de(w)):(e.consume(w),V)}function de(w){return e.check(lC,he,G)(w)}function he(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),re}function re(w){return w===null||Ce(w)?de(w):(e.enter("htmlFlowData"),V(w))}function X(w){return w===45?(e.consume(w),S):V(w)}function ye(w){return w===47?(e.consume(w),l="",J):V(w)}function J(w){if(w===62){const me=l.toLowerCase();return Lm.includes(me)?(e.consume(w),P):V(w)}return Rt(w)&&l.length<8?(e.consume(w),l+=String.fromCharCode(w),J):V(w)}function oe(w){return w===93?(e.consume(w),S):V(w)}function S(w){return w===62?(e.consume(w),P):w===45&&a===2?(e.consume(w),S):V(w)}function P(w){return w===null||Ce(w)?(e.exit("htmlFlowData"),G(w)):(e.consume(w),P)}function G(w){return e.exit("htmlFlow"),t(w)}}function fC(e,t,n){const i=this;return a;function a(l){return Ce(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function hC(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(aa,t,n)}}const pC={name:"htmlText",tokenize:mC};function mC(e,t,n){const i=this;let a,u,l;return c;function c(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),q):S===63?(e.consume(S),H):Rt(S)?(e.consume(S),Z):n(S)}function p(S){return S===45?(e.consume(S),T):S===91?(e.consume(S),u=0,C):Rt(S)?(e.consume(S),R):n(S)}function T(S){return S===45?(e.consume(S),x):n(S)}function E(S){return S===null?n(S):S===45?(e.consume(S),b):Ce(S)?(l=E,ye(S)):(e.consume(S),E)}function b(S){return S===45?(e.consume(S),x):E(S)}function x(S){return S===62?X(S):S===45?b(S):E(S)}function C(S){const P="CDATA[";return S===P.charCodeAt(u++)?(e.consume(S),u===P.length?v:C):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),D):Ce(S)?(l=v,ye(S)):(e.consume(S),v)}function D(S){return S===93?(e.consume(S),I):v(S)}function I(S){return S===62?X(S):S===93?(e.consume(S),I):v(S)}function R(S){return S===null||S===62?X(S):Ce(S)?(l=R,ye(S)):(e.consume(S),R)}function H(S){return S===null?n(S):S===63?(e.consume(S),W):Ce(S)?(l=H,ye(S)):(e.consume(S),H)}function W(S){return S===62?X(S):H(S)}function q(S){return Rt(S)?(e.consume(S),B):n(S)}function B(S){return S===45||vt(S)?(e.consume(S),B):ie(S)}function ie(S){return Ce(S)?(l=ie,ye(S)):Fe(S)?(e.consume(S),ie):X(S)}function Z(S){return S===45||vt(S)?(e.consume(S),Z):S===47||S===62||Ge(S)?ce(S):n(S)}function ce(S){return S===47?(e.consume(S),X):S===58||S===95||Rt(S)?(e.consume(S),M):Ce(S)?(l=ce,ye(S)):Fe(S)?(e.consume(S),ce):X(S)}function M(S){return S===45||S===46||S===58||S===95||vt(S)?(e.consume(S),M):pe(S)}function pe(S){return S===61?(e.consume(S),V):Ce(S)?(l=pe,ye(S)):Fe(S)?(e.consume(S),pe):ce(S)}function V(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,de):Ce(S)?(l=V,ye(S)):Fe(S)?(e.consume(S),V):(e.consume(S),he)}function de(S){return S===a?(e.consume(S),a=void 0,re):S===null?n(S):Ce(S)?(l=de,ye(S)):(e.consume(S),de)}function he(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ge(S)?ce(S):(e.consume(S),he)}function re(S){return S===47||S===62||Ge(S)?ce(S):n(S)}function X(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function ye(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),J}function J(S){return Fe(S)?Me(e,oe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):oe(S)}function oe(S){return e.enter("htmlTextData"),l(S)}}const Fd={name:"labelEnd",resolveAll:yC,resolveTo:xC,tokenize:bC},gC={tokenize:kC},EC={tokenize:CC},TC={tokenize:SC};function yC(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",t+=a}}return e.length!==n.length&&Gt(e,0,e.length,n),e}function xC(e,t){let n=e.length,i=0,a,u,l,c;for(;n--;)if(a=e[n][1],u){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(u=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[l][1].end}},T={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",p,t]],c=sn(c,e.slice(u+1,u+i+3)),c=sn(c,[["enter",T,t]]),c=sn(c,uo(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),c=sn(c,[["exit",T,t],e[l-2],e[l-1],["exit",p,t]]),c=sn(c,e.slice(l+1)),c=sn(c,[["exit",f,t]]),Gt(e,u,e.length,c),e}function bC(e,t,n){const i=this;let a=i.events.length,u,l;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){u=i.events[a][1];break}return c;function c(b){return u?u._inactive?E(b):(l=i.parser.defined.includes(Tn(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(gC,T,l?T:E)(b):b===91?e.attempt(EC,T,l?p:E)(b):l?T(b):E(b)}function p(b){return e.attempt(TC,T,E)(b)}function T(b){return t(b)}function E(b){return u._balanced=!0,n(b)}}function kC(e,t,n){return i;function i(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),a}function a(E){return Ge(E)?zs(e,u)(E):u(E)}function u(E){return E===41?T(E):qg(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function l(E){return Ge(E)?zs(e,f)(E):T(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?Gg(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):T(E)}function p(E){return Ge(E)?zs(e,T)(E):T(E)}function T(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function CC(e,t,n){const i=this;return a;function a(c){return Qg.call(i,e,u,l,"reference","referenceMarker","referenceString")(c)}function u(c){return i.parser.defined.includes(Tn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function SC(e,t,n){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),a}function a(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const _C={name:"labelStartImage",resolveAll:Fd.resolveAll,tokenize:vC};function vC(e,t,n){const i=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const NC={name:"labelStartLink",resolveAll:Fd.resolveAll,tokenize:wC};function wC(e,t,n){const i=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const gc={name:"lineEnding",tokenize:AC};function AC(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const Hu={name:"thematicBreak",tokenize:IC};function IC(e,t,n){let i=0,a;return u;function u(p){return e.enter("thematicBreak"),l(p)}function l(p){return a=p,c(p)}function c(p){return p===a?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||Ce(p))?(e.exit("thematicBreak"),t(p)):n(p)}function f(p){return p===a?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),Fe(p)?Me(e,c,"whitespace")(p):c(p))}}const Ut={continuation:{tokenize:DC},exit:MC,name:"list",tokenize:OC},LC={partial:!0,tokenize:FC},RC={partial:!0,tokenize:PC};function OC(e,t,n){const i=this,a=i.events[i.events.length-1];let u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return c;function c(x){const C=i.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||x===i.containerState.marker:Qc(x)){if(i.containerState.type||(i.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Hu,n,p)(x):p(x);if(!i.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return Qc(x)&&++l<10?(e.consume(x),f):(!i.interrupt||l<2)&&(i.containerState.marker?x===i.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):n(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||x,e.check(aa,i.interrupt?n:T,e.attempt(LC,b,E))}function T(x){return i.containerState.initialBlankLine=!0,u++,b(x)}function E(x){return Fe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),b):n(x)}function b(x){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function DC(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(aa,a,u);function a(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Me(e,t,"listItemIndent",i.containerState.size+1)(c)}function u(c){return i.containerState.furtherBlankLines||!Fe(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(RC,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Me(e,e.attempt(Ut,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function PC(e,t,n){const i=this;return Me(e,a,"listItemIndent",i.containerState.size+1);function a(u){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(u):n(u)}}function MC(e){e.exit(this.containerState.type)}function FC(e,t,n){const i=this;return Me(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(u){const l=i.events[i.events.length-1];return!Fe(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const Rm={name:"setextUnderline",resolveTo:jC,tokenize:BC};function jC(e,t){let n=e.length,i,a,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",u?(e.splice(a,0,["enter",l,t]),e.splice(u+1,0,["exit",e[i][1],t]),e[i][1].end={...e[u][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function BC(e,t,n){const i=this;let a;return u;function u(p){let T=i.events.length,E;for(;T--;)if(i.events[T][1].type!=="lineEnding"&&i.events[T][1].type!=="linePrefix"&&i.events[T][1].type!=="content"){E=i.events[T][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||E)?(e.enter("setextHeadingLine"),a=p,l(p)):n(p)}function l(p){return e.enter("setextHeadingLineSequence"),c(p)}function c(p){return p===a?(e.consume(p),c):(e.exit("setextHeadingLineSequence"),Fe(p)?Me(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||Ce(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const UC={tokenize:HC};function HC(e){const t=this,n=e.attempt(aa,i,e.attempt(this.parser.constructs.flowInitial,a,Me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Vk,a)),"linePrefix")));return n;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zC={resolveAll:Xg()},$C=Kg("string"),WC=Kg("text");function Kg(e){return{resolveAll:Xg(e==="text"?YC:void 0),tokenize:t};function t(n){const i=this,a=this.parser.constructs[e],u=n.attempt(a,l,c);return l;function l(T){return p(T)?u(T):c(T)}function c(T){if(T===null){n.consume(T);return}return n.enter("data"),n.consume(T),f}function f(T){return p(T)?(n.exit("data"),u(T)):(n.consume(T),f)}function p(T){if(T===null)return!0;const E=a[T];let b=-1;if(E)for(;++b<E.length;){const x=E[b];if(!x.previous||x.previous.call(i,i.previous))return!0}return!1}}}function Xg(e){return t;function t(n,i){let a=-1,u;for(;++a<=n.length;)u===void 0?n[a]&&n[a][1].type==="data"&&(u=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==u+2&&(n[u][1].end=n[a-1][1].end,n.splice(u+2,a-u-2),a=u+2),u=void 0);return e?e(n,i):n}}function YC(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 i=e[n-1][1],a=t.sliceStream(i);let u=a.length,l=-1,c=0,f;for(;u--;){const p=a[u];if(typeof p=="string"){for(l=p.length;p.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(p===-2)f=!0,c++;else if(p!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const p={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:i.start._bufferIndex+l,_index:i.start._index+u,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const VC={42:Ut,43:Ut,45:Ut,48:Ut,49:Ut,50:Ut,51:Ut,52:Ut,53:Ut,54:Ut,55:Ut,56:Ut,57:Ut,62:$g},qC={91:Xk},QC={[-2]:mc,[-1]:mc,32:mc},GC={35:rC,42:Hu,45:[Rm,Hu],60:uC,61:Rm,95:Hu,96:Im,126:Im},KC={38:Yg,92:Wg},XC={[-5]:gc,[-4]:gc,[-3]:gc,33:_C,38:Yg,42:Gc,60:[Nk,pC],91:NC,92:[tC,Wg],93:Fd,95:Gc,96:Uk},JC={null:[Gc,zC]},ZC={null:[42,95]},eS={null:[]},tS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ZC,contentInitial:qC,disable:eS,document:VC,flow:GC,flowInitial:QC,insideSpan:JC,string:KC,text:XC},Symbol.toStringTag,{value:"Module"}));function nS(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},u=[];let l=[],c=[];const f={attempt:ie(q),check:ie(B),consume:R,enter:H,exit:W,interrupt:ie(B,{interrupt:!0})},p={code:null,containerState:{},defineSkip:v,events:[],now:C,parser:e,previous:null,sliceSerialize:b,sliceStream:x,write:E};let T=t.tokenize.call(p,f);return t.resolveAll&&u.push(t),p;function E(pe){return l=sn(l,pe),D(),l[l.length-1]!==null?[]:(Z(t,0),p.events=uo(u,p.events,p),p.events)}function b(pe,V){return iS(x(pe),V)}function x(pe){return rS(l,pe)}function C(){const{_bufferIndex:pe,_index:V,line:de,column:he,offset:re}=i;return{_bufferIndex:pe,_index:V,line:de,column:he,offset:re}}function v(pe){a[pe.line]=pe.column,M()}function D(){let pe;for(;i._index<l.length;){const V=l[i._index];if(typeof V=="string")for(pe=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===pe&&i._bufferIndex<V.length;)I(V.charCodeAt(i._bufferIndex));else I(V)}}function I(pe){T=T(pe)}function R(pe){Ce(pe)?(i.line++,i.column=1,i.offset+=pe===-3?2:1,M()):pe!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=pe}function H(pe,V){const de=V||{};return de.type=pe,de.start=C(),p.events.push(["enter",de,p]),c.push(de),de}function W(pe){const V=c.pop();return V.end=C(),p.events.push(["exit",V,p]),V}function q(pe,V){Z(pe,V.from)}function B(pe,V){V.restore()}function ie(pe,V){return de;function de(he,re,X){let ye,J,oe,S;return Array.isArray(he)?G(he):"tokenize"in he?G([he]):P(he);function P(_e){return Ue;function Ue(Re){const ze=Re!==null&&_e[Re],ot=Re!==null&&_e.null,On=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(ot)?ot:ot?[ot]:[]];return G(On)(Re)}}function G(_e){return ye=_e,J=0,_e.length===0?X:w(_e[J])}function w(_e){return Ue;function Ue(Re){return S=ce(),oe=_e,_e.partial||(p.currentConstruct=_e),_e.name&&p.parser.constructs.disable.null.includes(_e.name)?Se():_e.tokenize.call(V?Object.assign(Object.create(p),V):p,f,me,Se)(Re)}}function me(_e){return pe(oe,S),re}function Se(_e){return S.restore(),++J<ye.length?w(ye[J]):X}}}function Z(pe,V){pe.resolveAll&&!u.includes(pe)&&u.push(pe),pe.resolve&&Gt(p.events,V,p.events.length-V,pe.resolve(p.events.slice(V),p)),pe.resolveTo&&(p.events=pe.resolveTo(p.events,p))}function ce(){const pe=C(),V=p.previous,de=p.currentConstruct,he=p.events.length,re=Array.from(c);return{from:he,restore:X};function X(){i=pe,p.previous=V,p.currentConstruct=de,p.events.length=he,c=re,M()}}function M(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function rS(e,t){const n=t.start._index,i=t.start._bufferIndex,a=t.end._index,u=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(i,u)];else{if(l=e.slice(n,a),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}u>0&&l.push(e[a].slice(0,u))}return l}function iS(e,t){let n=-1;const i=[];let a;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
|
|
59
|
+
`;break}case-3:{l=`\r
|
|
60
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(u)}a=u===-2,i.push(l)}return i.join("")}function sS(e){const i={constructs:Hg([tS,...(e||{}).extensions||[]]),content:a(xk),defined:[],document:a(kk),flow:a(UC),lazy:{},string:a($C),text:a(WC)};return i;function a(u){return l;function l(c){return nS(i,u,c)}}}function aS(e){for(;!Vg(e););return e}const Om=/[\0\t\n\r]/g;function uS(){let e=1,t="",n=!0,i;return a;function a(u,l,c){const f=[];let p,T,E,b,x;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),E=0,t="",n&&(u.charCodeAt(0)===65279&&E++,n=void 0);E<u.length;){if(Om.lastIndex=E,p=Om.exec(u),b=p&&p.index!==void 0?p.index:u.length,x=u.charCodeAt(b),!p){t=u.slice(E);break}if(x===10&&E===b&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),E<b&&(f.push(u.slice(E,b)),e+=b-E),x){case 0:{f.push(65533),e++;break}case 9:{for(T=Math.ceil(e/4)*4,f.push(-2);e++<T;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}E=b+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const oS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lS(e){return e.replace(oS,cS)}function cS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),u=a===120||a===88;return zg(n.slice(u?2:1),u?16:10)}return Md(n)||e}const Jg={}.hasOwnProperty;function dS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),fS(n)(aS(sS(n).document().write(uS()(e,t,!0))))}function fS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(ii),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:u(Yi),blockQuote:u(ot),characterEscape:ce,characterReference:ce,codeFenced:u(On),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(On,l),codeText:u(ha,l),codeTextData:ce,data:ce,codeFlowValue:ce,definition:u(ni),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(Wi),hardBreakEscape:u(Vi),hardBreakTrailing:u(Vi),htmlFlow:u(ri,l),htmlFlowData:ce,htmlText:u(ri,l),htmlTextData:ce,image:u(pa),label:l,link:u(ii),listItem:u(Qn),listItemValue:b,listOrdered:u(qn,E),listUnordered:u(qn),paragraph:u(qi),reference:w,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(Yi),strong:u(ma),thematicBreak:u(Ea)},exit:{atxHeading:f(),atxHeadingSequence:q,autolink:f(),autolinkEmail:ze,autolinkProtocol:Re,blockQuote:f(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:_e,characterReference:Ue,codeFenced:f(D),codeFencedFence:v,codeFencedFenceInfo:x,codeFencedFenceMeta:C,codeFlowValue:M,codeIndented:f(I),codeText:f(re),codeTextData:M,data:M,definition:f(),definitionDestinationString:W,definitionLabelString:R,definitionTitleString:H,emphasis:f(),hardBreakEscape:f(V),hardBreakTrailing:f(V),htmlFlow:f(de),htmlFlowData:M,htmlText:f(he),htmlTextData:M,image:f(ye),label:oe,labelText:J,lineEnding:pe,link:f(X),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:me,resourceDestinationString:S,resourceTitleString:P,resource:G,setextHeading:f(Z),setextHeadingLineSequence:ie,setextHeadingText:B,strong:f(),thematicBreak:f()}};Zg(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(K){let fe={type:"root",children:[]};const we={stack:[fe],tokenStack:[],config:t,enter:c,exit:p,buffer:l,resume:T,data:n},Oe=[];let je=-1;for(;++je<K.length;)if(K[je][1].type==="listOrdered"||K[je][1].type==="listUnordered")if(K[je][0]==="enter")Oe.push(je);else{const Tt=Oe.pop();je=a(K,Tt,je)}for(je=-1;++je<K.length;){const Tt=t[K[je][0]];Jg.call(Tt,K[je][1].type)&&Tt[K[je][1].type].call(Object.assign({sliceSerialize:K[je][2].sliceSerialize},we),K[je][1])}if(we.tokenStack.length>0){const Tt=we.tokenStack[we.tokenStack.length-1];(Tt[1]||Dm).call(we,void 0,Tt[0])}for(fe.position={start:mr(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:mr(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},je=-1;++je<t.transforms.length;)fe=t.transforms[je](fe)||fe;return fe}function a(K,fe,we){let Oe=fe-1,je=-1,Tt=!1,Dn,Xt,Gn,Nr;for(;++Oe<=we;){const yt=K[Oe];switch(yt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{yt[0]==="enter"?je++:je--,Nr=void 0;break}case"lineEndingBlank":{yt[0]==="enter"&&(Dn&&!Nr&&!je&&!Gn&&(Gn=Oe),Nr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Nr=void 0}if(!je&&yt[0]==="enter"&&yt[1].type==="listItemPrefix"||je===-1&&yt[0]==="exit"&&(yt[1].type==="listUnordered"||yt[1].type==="listOrdered")){if(Dn){let kn=Oe;for(Xt=void 0;kn--;){const $t=K[kn];if($t[1].type==="lineEnding"||$t[1].type==="lineEndingBlank"){if($t[0]==="exit")continue;Xt&&(K[Xt][1].type="lineEndingBlank",Tt=!0),$t[1].type="lineEnding",Xt=kn}else if(!($t[1].type==="linePrefix"||$t[1].type==="blockQuotePrefix"||$t[1].type==="blockQuotePrefixWhitespace"||$t[1].type==="blockQuoteMarker"||$t[1].type==="listItemIndent"))break}Gn&&(!Xt||Gn<Xt)&&(Dn._spread=!0),Dn.end=Object.assign({},Xt?K[Xt][1].start:yt[1].end),K.splice(Xt||Oe,0,["exit",Dn,yt[2]]),Oe++,we++}if(yt[1].type==="listItemPrefix"){const kn={type:"listItem",_spread:!1,start:Object.assign({},yt[1].start),end:void 0};Dn=kn,K.splice(Oe,0,["enter",kn,yt[2]]),Oe++,we++,Gn=void 0,Nr=!0}}}return K[fe][1]._spread=Tt,we}function u(K,fe){return we;function we(Oe){c.call(this,K(Oe),Oe),fe&&fe.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(K,fe,we){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([fe,we||void 0]),K.position={start:mr(fe.start),end:void 0}}function f(K){return fe;function fe(we){K&&K.call(this,we),p.call(this,we)}}function p(K,fe){const we=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==K.type&&(fe?fe.call(this,K,Oe[0]):(Oe[1]||Dm).call(this,K,Oe[0]));else throw new Error("Cannot close `"+K.type+"` ("+Hs({start:K.start,end:K.end})+"): it’s not open");we.position.end=mr(K.end)}function T(){return Pd(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(K){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function x(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=K}function C(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=K}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function I(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K.replace(/(\r?\n|\r)$/g,"")}function R(K){const fe=this.resume(),we=this.stack[this.stack.length-1];we.label=fe,we.identifier=Tn(this.sliceSerialize(K)).toLowerCase()}function H(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.title=K}function W(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.url=K}function q(K){const fe=this.stack[this.stack.length-1];if(!fe.depth){const we=this.sliceSerialize(K).length;fe.depth=we}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function ie(K){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(K){const we=this.stack[this.stack.length-1].children;let Oe=we[we.length-1];(!Oe||Oe.type!=="text")&&(Oe=ga(),Oe.position={start:mr(K.start),end:void 0},we.push(Oe)),this.stack.push(Oe)}function M(K){const fe=this.stack.pop();fe.value+=this.sliceSerialize(K),fe.position.end=mr(K.end)}function pe(K){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=fe.children[fe.children.length-1];we.position.end=mr(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(ce.call(this,K),M.call(this,K))}function V(){this.data.atHardBreak=!0}function de(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K}function he(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K}function re(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.value=K}function X(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=fe,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function ye(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=fe,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function J(K){const fe=this.sliceSerialize(K),we=this.stack[this.stack.length-2];we.label=lS(fe),we.identifier=Tn(fe).toLowerCase()}function oe(){const K=this.stack[this.stack.length-1],fe=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Oe=K.children;we.children=Oe}else we.alt=fe}function S(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.url=K}function P(){const K=this.resume(),fe=this.stack[this.stack.length-1];fe.title=K}function G(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function me(K){const fe=this.resume(),we=this.stack[this.stack.length-1];we.label=fe,we.identifier=Tn(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function Se(K){this.data.characterReferenceType=K.type}function _e(K){const fe=this.sliceSerialize(K),we=this.data.characterReferenceType;let Oe;we?(Oe=zg(fe,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=Md(fe);const je=this.stack[this.stack.length-1];je.value+=Oe}function Ue(K){const fe=this.stack.pop();fe.position.end=mr(K.end)}function Re(K){M.call(this,K);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(K)}function ze(K){M.call(this,K);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(K)}function ot(){return{type:"blockquote",children:[]}}function On(){return{type:"code",lang:null,meta:null,value:""}}function ha(){return{type:"inlineCode",value:""}}function ni(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Wi(){return{type:"emphasis",children:[]}}function Yi(){return{type:"heading",depth:0,children:[]}}function Vi(){return{type:"break"}}function ri(){return{type:"html",value:""}}function pa(){return{type:"image",title:null,url:"",alt:null}}function ii(){return{type:"link",title:null,url:"",children:[]}}function qn(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function Qn(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function qi(){return{type:"paragraph",children:[]}}function ma(){return{type:"strong",children:[]}}function ga(){return{type:"text",value:""}}function Ea(){return{type:"thematicBreak"}}}function mr(e){return{line:e.line,column:e.column,offset:e.offset}}function Zg(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Zg(e,i):hS(e,i)}}function hS(e,t){let n;for(n in t)if(Jg.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Dm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Hs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Hs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Hs({start:t.start,end:t.end})+") is still open")}function pS(e){const t=this;t.parser=n;function n(i){return dS(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mS(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 gS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
61
|
+
`}]}function ES(e,t){const n=t.value?t.value+`
|
|
62
|
+
`:"",i={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(i.className=["language-"+a[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function TS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=Bi(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=u+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function bS(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 kS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function e1(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const a=e.all(t),u=a[0];u&&u.type==="text"?u.value="["+u.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=i:a.push({type:"text",value:i}),a}function CS(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return e1(e,t);const a={src:Bi(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const u={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,u),e.applyData(t,u)}function SS(e,t){const n={src:Bi(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function _S(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function vS(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return e1(e,t);const a={href:Bi(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const u={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function NS(e,t){const n={href:Bi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function wS(e,t,n){const i=e.all(t),a=n?AS(n):t1(t),u={},l=[];if(typeof t.checked=="boolean"){const T=i[0];let E;T&&T.type==="element"&&T.tagName==="p"?E=T:(E={type:"element",tagName:"p",properties:{},children:[]},i.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const T=i[c];(a||c!==0||T.type!=="element"||T.tagName!=="p")&&l.push({type:"text",value:`
|
|
63
|
+
`}),T.type==="element"&&T.tagName==="p"&&!a?l.push(...T.children):l.push(T)}const f=i[i.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
64
|
+
`});const p={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,p),e.applyData(t,p)}function AS(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=t1(n[i])}return t}function t1(e){const t=e.spread;return t??e.children.length>1}function IS(e,t){const n={},i=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<i.length;){const l=i[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,u),e.applyData(t,u)}function LS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function OS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DS(e,t){const n=e.all(t),i=n.shift(),a=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Ln(t.children[1]),f=so(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),a.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function PS(e,t,n){const i=n?n.children:void 0,u=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const p=[];for(;++f<c;){const E=t.children[f],b={},x=l?l[f]:void 0;x&&(b.align=x);let C={type:"element",tagName:u,properties:b,children:[]};E&&(C.children=e.all(E),e.patch(E,C),C=e.applyData(E,C)),p.push(C)}const T={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,T),e.applyData(t,T)}function MS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Pm=9,Mm=32;function FS(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const u=[];for(;i;)u.push(Fm(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return u.push(Fm(t.slice(a),a>0,!1)),u.join("")}function Fm(e,t,n){let i=0,a=e.length;if(t){let u=e.codePointAt(i);for(;u===Pm||u===Mm;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(a-1);for(;u===Pm||u===Mm;)a--,u=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function jS(e,t){const n={type:"text",value:FS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function BS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const US={blockquote:mS,break:gS,code:ES,delete:TS,emphasis:yS,footnoteReference:xS,heading:bS,html:kS,imageReference:CS,image:SS,inlineCode:_S,linkReference:vS,link:NS,listItem:wS,list:IS,paragraph:LS,root:RS,strong:OS,table:DS,tableCell:MS,tableRow:PS,text:jS,thematicBreak:BS,toml:Nu,yaml:Nu,definition:Nu,footnoteDefinition:Nu};function Nu(){}const n1=-1,oo=0,$s=1,qu=2,jd=3,Bd=4,Ud=5,Hd=6,r1=7,i1=8,HS=typeof self=="object"?self:globalThis,jm=(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 HS[e](t)},zS=(e,t)=>{const n=(a,u)=>(e.set(u,a),a),i=a=>{if(e.has(a))return e.get(a);const[u,l]=t[a];switch(u){case oo:case n1:return n(l,a);case $s:{const c=n([],a);for(const f of l)c.push(i(f));return c}case qu:{const c=n({},a);for(const[f,p]of l)c[i(f)]=i(p);return c}case jd:return n(new Date(l),a);case Bd:{const{source:c,flags:f}=l;return n(new RegExp(c,f),a)}case Ud:{const c=n(new Map,a);for(const[f,p]of l)c.set(i(f),i(p));return c}case Hd:{const c=n(new Set,a);for(const f of l)c.add(i(f));return c}case r1:{const{name:c,message:f}=l;return n(jm(c,f),a)}case i1:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(jm(u,l),a)};return i},Bm=e=>zS(new Map,e)(0),Yr="",{toString:$S}={},{keys:WS}=Object,Ms=e=>{const t=typeof e;if(t!=="object"||!e)return[oo,t];const n=$S.call(e).slice(8,-1);switch(n){case"Array":return[$s,Yr];case"Object":return[qu,Yr];case"Date":return[jd,Yr];case"RegExp":return[Bd,Yr];case"Map":return[Ud,Yr];case"Set":return[Hd,Yr];case"DataView":return[$s,n]}return n.includes("Array")?[$s,n]:n.includes("Error")?[r1,n]:[qu,n]},wu=([e,t])=>e===oo&&(t==="function"||t==="symbol"),YS=(e,t,n,i)=>{const a=(l,c)=>{const f=i.push(l)-1;return n.set(c,f),f},u=l=>{if(n.has(l))return n.get(l);let[c,f]=Ms(l);switch(c){case oo:{let T=l;switch(f){case"bigint":c=i1,T=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);T=null;break;case"undefined":return a([n1],l)}return a([c,T],l)}case $s:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),a([f,[...b]],l)}const T=[],E=a([c,T],l);for(const b of l)T.push(u(b));return E}case qu:{if(f)switch(f){case"BigInt":return a([f,l.toString()],l);case"Boolean":case"Number":case"String":return a([f,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const T=[],E=a([c,T],l);for(const b of WS(l))(e||!wu(Ms(l[b])))&&T.push([u(b),u(l[b])]);return E}case jd:return a([c,isNaN(l.getTime())?Yr:l.toISOString()],l);case Bd:{const{source:T,flags:E}=l;return a([c,{source:T,flags:E}],l)}case Ud:{const T=[],E=a([c,T],l);for(const[b,x]of l)(e||!(wu(Ms(b))||wu(Ms(x))))&&T.push([u(b),u(x)]);return E}case Hd:{const T=[],E=a([c,T],l);for(const b of l)(e||!wu(Ms(b)))&&T.push(u(b));return E}}const{message:p}=l;return a([c,{name:f,message:p}],l)};return u},Um=(e,{json:t,lossy:n}={})=>{const i=[];return YS(!(t||n),!!t,new Map,i)(e),i},Kr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Bm(Um(e,t)):structuredClone(e):(e,t)=>Bm(Um(e,t));function VS(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 qS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function QS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||VS,i=e.options.footnoteBackLabel||qS,a=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const T=e.all(p),E=String(p.identifier).toUpperCase(),b=Bi(E.toLowerCase());let x=0;const C=[],v=e.footnoteCounts.get(E);for(;v!==void 0&&++x<=v;){C.length>0&&C.push({type:"text",value:" "});let R=typeof n=="string"?n:n(f,x);typeof R=="string"&&(R={type:"text",value:R}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,x),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const D=T[T.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const R=D.children[D.children.length-1];R&&R.type==="text"?R.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...C)}else T.push(...C);const I={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(T,!0)};e.patch(p,I),c.push(I)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Kr(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
65
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
66
|
+
`}]}}const lo=(function(e){if(e==null)return JS;if(typeof e=="function")return co(e);if(typeof e=="object")return Array.isArray(e)?GS(e):KS(e);if(typeof e=="string")return XS(e);throw new Error("Expected function, string, or object as test")});function GS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=lo(e[n]);return co(i);function i(...a){let u=-1;for(;++u<t.length;)if(t[u].apply(this,a))return!0;return!1}}function KS(e){const t=e;return co(n);function n(i){const a=i;let u;for(u in e)if(a[u]!==t[u])return!1;return!0}}function XS(e){return co(t);function t(n){return n&&n.type===e}}function co(e){return t;function t(n,i,a){return!!(ZS(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function JS(){return!0}function ZS(e){return e!==null&&typeof e=="object"&&"type"in e}const s1=[],e_=!0,Kc=!1,t_="skip";function a1(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const u=lo(a),l=i?-1:1;c(e,void 0,[])();function c(f,p,T){const E=f&&typeof f=="object"?f:{};if(typeof E.type=="string"){const x=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=s1,C,v,D;if((!t||u(f,p,T[T.length-1]||void 0))&&(x=n_(n(f,T)),x[0]===Kc))return x;if("children"in f&&f.children){const I=f;if(I.children&&x[0]!==t_)for(v=(i?I.children.length:-1)+l,D=T.concat(I);v>-1&&v<I.children.length;){const R=I.children[v];if(C=c(R,v,D)(),C[0]===Kc)return C;v=typeof C[1]=="number"?C[1]:v+l}}return x}}}function n_(e){return Array.isArray(e)?e:typeof e=="number"?[e_,e]:e==null?s1:[e]}function fo(e,t,n,i){let a,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,a=n):(u=t,l=n,a=i),a1(e,u,c,a);function c(f,p){const T=p[p.length-1],E=T?T.children.indexOf(f):void 0;return l(f,E,T)}}const Xc={}.hasOwnProperty,r_={};function i_(e,t){const n=t||r_,i=new Map,a=new Map,u=new Map,l={...US,...n.handlers},c={all:p,applyData:a_,definitionById:i,footnoteById:a,footnoteCounts:u,footnoteOrder:[],handlers:l,one:f,options:n,patch:s_,wrap:o_};return fo(e,function(T){if(T.type==="definition"||T.type==="footnoteDefinition"){const E=T.type==="definition"?i:a,b=String(T.identifier).toUpperCase();E.has(b)||E.set(b,T)}}),c;function f(T,E){const b=T.type,x=c.handlers[b];if(Xc.call(c.handlers,b)&&x)return x(c,T,E);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in T){const{children:v,...D}=T,I=Kr(D);return I.children=c.all(T),I}return Kr(T)}return(c.options.unknownHandler||u_)(c,T,E)}function p(T){const E=[];if("children"in T){const b=T.children;let x=-1;for(;++x<b.length;){const C=c.one(b[x],T);if(C){if(x&&b[x-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Hm(C.value)),!Array.isArray(C)&&C.type==="element")){const v=C.children[0];v&&v.type==="text"&&(v.value=Hm(v.value))}Array.isArray(C)?E.push(...C):E.push(C)}}}return E}}function s_(e,t){e.position&&(t.position=Pg(e))}function a_(e,t){let n=t;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,Kr(u)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function u_(e,t){const n=t.data||{},i="value"in t&&!(Xc.call(n,"hProperties")||Xc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function o_(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
67
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
68
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
69
|
+
`}),n}function Hm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function zm(e,t){const n=i_(e,t),i=n.one(e,void 0),a=QS(n),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&u.children.push({type:"text",value:`
|
|
70
|
+
`},a),u}function l_(e,t){return e&&"run"in e?async function(n,i){const a=zm(n,{file:i,...t});await e.run(a,i)}:function(n,i){return zm(n,{file:i,...e||t})}}function $m(e){if(e)throw e}var Ec,Wm;function c_(){if(Wm)return Ec;Wm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},u=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var T=e.call(p,"constructor"),E=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!T&&!E)return!1;var b;for(b in p);return typeof b>"u"||e.call(p,b)},l=function(p,T){n&&T.name==="__proto__"?n(p,T.name,{enumerable:!0,configurable:!0,value:T.newValue,writable:!0}):p[T.name]=T.newValue},c=function(p,T){if(T==="__proto__")if(e.call(p,T)){if(i)return i(p,T).value}else return;return p[T]};return Ec=function f(){var p,T,E,b,x,C,v=arguments[0],D=1,I=arguments.length,R=!1;for(typeof v=="boolean"&&(R=v,v=arguments[1]||{},D=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});D<I;++D)if(p=arguments[D],p!=null)for(T in p)E=c(v,T),b=c(p,T),v!==b&&(R&&b&&(u(b)||(x=a(b)))?(x?(x=!1,C=E&&a(E)?E:[]):C=E&&u(E)?E:{},l(v,{name:T,newValue:f(R,C,b)})):typeof b<"u"&&l(v,{name:T,newValue:b}));return v},Ec}var d_=c_();const Tc=pd(d_);function Jc(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 f_(){const e=[],t={run:n,use:i};return t;function n(...a){let u=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...a);function c(f,...p){const T=e[++u];let E=-1;if(f){l(f);return}for(;++E<a.length;)(p[E]===null||p[E]===void 0)&&(p[E]=a[E]);a=p,T?h_(T,c)(...p):l(null,...p)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function h_(e,t){let n;return i;function i(...l){const c=e.length>l.length;let f;c&&l.push(a);try{f=e.apply(this,l)}catch(p){const T=p;if(c&&n)throw T;return a(T)}c||(f&&f.then&&typeof f.then=="function"?f.then(u,a):f instanceof Error?a(f):u(f))}function a(l,...c){n||(n=!0,t(l,...c))}function u(l){a(null,l)}}const wn={basename:p_,dirname:m_,extname:g_,join:E_,sep:"/"};function p_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ua(e);let n=0,i=-1,a=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else i<0&&(u=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,c=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else l<0&&(u=!0,l=a+1),c>-1&&(e.codePointAt(a)===t.codePointAt(c--)?c<0&&(i=a):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function m_(e){if(ua(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function g_(e){ua(e);let t=e.length,n=-1,i=0,a=-1,u=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?a<0?a=t:u!==1&&(u=1):a>-1&&(u=-1)}return a<0||n<0||u===0||u===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function E_(...e){let t=-1,n;for(;++t<e.length;)ua(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":T_(n)}function T_(e){ua(e);const t=e.codePointAt(0)===47;let n=y_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function y_(e,t){let n="",i=0,a=-1,u=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(a===l-1||u===1))if(a!==l-1&&u===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),a=l,u=0;continue}}else if(n.length>0){n="",i=0,a=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),i=l-a-1;a=l,u=0}else c===46&&u>-1?u++:u=-1}return n}function ua(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const x_={cwd:b_};function b_(){return"/"}function Zc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function k_(e){if(typeof e=="string")e=new URL(e);else if(!Zc(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 C_(e)}function C_(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const yc=["history","path","basename","stem","extname","dirname"];class u1{constructor(t){let n;t?Zc(t)?n={path:t}:typeof t=="string"||S_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":x_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<yc.length;){const u=yc[i];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let a;for(a in n)yc.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?wn.basename(this.path):void 0}set basename(t){bc(t,"basename"),xc(t,"basename"),this.path=wn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?wn.dirname(this.path):void 0}set dirname(t){Ym(this.basename,"dirname"),this.path=wn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?wn.extname(this.path):void 0}set extname(t){if(xc(t,"extname"),Ym(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=wn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zc(t)&&(t=k_(t)),bc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?wn.basename(this.path,this.extname):void 0}set stem(t){bc(t,"stem"),xc(t,"stem"),this.path=wn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const a=this.message(t,n,i);throw a.fatal=!0,a}info(t,n,i){const a=this.message(t,n,i);return a.fatal=void 0,a}message(t,n,i){const a=new wt(t,n,i);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xc(e,t){if(e&&e.includes(wn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+wn.sep+"`")}function bc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ym(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function S_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const __=(function(e){const i=this.constructor.prototype,a=i[e],u=function(){return a.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),v_={}.hasOwnProperty;class zd extends __{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=f_()}copy(){const t=new zd;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Tc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Sc("data",this.frozen),this.namespace[t]=n,this):v_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Sc("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const a=n.call(t,...i);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Au(t),i=this.parser||this.Parser;return kc("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),kc("process",this.parser||this.Parser),Cc("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(u,l){const c=Au(t),f=i.parse(c);i.run(f,c,function(T,E,b){if(T||!E||!b)return p(T);const x=E,C=i.stringify(x,b);A_(C)?b.value=C:b.result=C,p(T,b)});function p(T,E){T||!E?l(T):u?u(E):n(void 0,E)}}}processSync(t){let n=!1,i;return this.freeze(),kc("processSync",this.parser||this.Parser),Cc("processSync",this.compiler||this.Compiler),this.process(t,a),qm("processSync","process",n),i;function a(u,l){n=!0,$m(u),i=l}}run(t,n,i){Vm(t),this.freeze();const a=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?u(void 0,i):new Promise(u);function u(l,c){const f=Au(n);a.run(t,f,p);function p(T,E,b){const x=E||t;T?c(T):l?l(x):i(void 0,x,b)}}}runSync(t,n){let i=!1,a;return this.run(t,n,u),qm("runSync","run",i),a;function u(l,c){$m(l),a=c,i=!0}}stringify(t,n){this.freeze();const i=Au(n),a=this.compiler||this.Compiler;return Cc("stringify",a),Vm(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(Sc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[T,...E]=p;f(T,E)}else l(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function l(p){if(!("plugins"in p)&&!("settings"in p))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");c(p.plugins),p.settings&&(a.settings=Tc(!0,a.settings,p.settings))}function c(p){let T=-1;if(p!=null)if(Array.isArray(p))for(;++T<p.length;){const E=p[T];u(E)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,T){let E=-1,b=-1;for(;++E<i.length;)if(i[E][0]===p){b=E;break}if(b===-1)i.push([p,...T]);else if(T.length>0){let[x,...C]=T;const v=i[b][1];Jc(v)&&Jc(x)&&(x=Tc(!0,v,x)),i[b]=[p,x,...C]}}}}const N_=new zd().freeze();function kc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sc(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 Vm(e){if(!Jc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Au(e){return w_(e)?e:new u1(e)}function w_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function A_(e){return typeof e=="string"||I_(e)}function I_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const L_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qm=[],Gm={allowDangerousHtml:!0},R_=/^(https?|ircs?|mailto|xmpp)$/i,O_=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function D_(e){const t=P_(e),n=M_(e);return F_(t.runSync(t.parse(n),n),e)}function P_(e){const t=e.rehypePlugins||Qm,n=e.remarkPlugins||Qm,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gm}:Gm;return N_().use(pS).use(n).use(l_,i).use(t)}function M_(e){const t=e.children||"",n=new u1;return typeof t=="string"&&(n.value=t),n}function F_(e,t){const n=t.allowedElements,i=t.allowElement,a=t.components,u=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||j_;for(const T of O_)Object.hasOwn(t,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+L_+T.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),fo(e,p),Xb(e,{Fragment:h.Fragment,components:a,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(T,E,b){if(T.type==="raw"&&b&&typeof E=="number")return l?b.children.splice(E,1):b.children[E]={type:"text",value:T.value},E;if(T.type==="element"){let x;for(x in pc)if(Object.hasOwn(pc,x)&&Object.hasOwn(T.properties,x)){const C=T.properties[x],v=pc[x];(v===null||v.includes(T.tagName))&&(T.properties[x]=f(String(C||""),x,T))}}if(T.type==="element"){let x=n?!n.includes(T.tagName):u?u.includes(T.tagName):!1;if(!x&&i&&typeof E=="number"&&(x=!i(T,E,b)),x&&b&&typeof E=="number")return c&&T.children?b.children.splice(E,1,...T.children):b.children.splice(E,1),E}}}function j_(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||i!==-1&&t>i||R_.test(e.slice(0,t))?e:""}function Km(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,a=n.indexOf(t);for(;a!==-1;)i++,a=n.indexOf(t,a+t.length);return i}function B_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function U_(e,t,n){const a=lo((n||{}).ignore||[]),u=H_(t);let l=-1;for(;++l<u.length;)a1(e,"text",c);function c(p,T){let E=-1,b;for(;++E<T.length;){const x=T[E],C=b?b.children:void 0;if(a(x,C?C.indexOf(x):void 0,b))return;b=x}if(b)return f(p,T)}function f(p,T){const E=T[T.length-1],b=u[l][0],x=u[l][1];let C=0;const D=E.children.indexOf(p);let I=!1,R=[];b.lastIndex=0;let H=b.exec(p.value);for(;H;){const W=H.index,q={index:H.index,input:H.input,stack:[...T,p]};let B=x(...H,q);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=W+1:(C!==W&&R.push({type:"text",value:p.value.slice(C,W)}),Array.isArray(B)?R.push(...B):B&&R.push(B),C=W+H[0].length,I=!0),!b.global)break;H=b.exec(p.value)}return I?(C<p.value.length&&R.push({type:"text",value:p.value.slice(C)}),E.children.splice(D,1,...R)):R=[p],D+R.length}}function H_(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 i=-1;for(;++i<n.length;){const a=n[i];t.push([z_(a[0]),$_(a[1])])}return t}function z_(e){return typeof e=="string"?new RegExp(B_(e),"g"):e}function $_(e){return typeof e=="function"?e:function(){return e}}const _c="phrasing",vc=["autolink","link","image","label"];function W_(){return{transforms:[X_],enter:{literalAutolink:V_,literalAutolinkEmail:Nc,literalAutolinkHttp:Nc,literalAutolinkWww:Nc},exit:{literalAutolink:K_,literalAutolinkEmail:G_,literalAutolinkHttp:q_,literalAutolinkWww:Q_}}}function Y_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:_c,notInConstruct:vc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:_c,notInConstruct:vc},{character:":",before:"[ps]",after:"\\/",inConstruct:_c,notInConstruct:vc}]}}function V_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nc(e){this.config.enter.autolinkProtocol.call(this,e)}function q_(e){this.config.exit.autolinkProtocol.call(this,e)}function Q_(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 G_(e){this.config.exit.autolinkEmail.call(this,e)}function K_(e){this.exit(e)}function X_(e){U_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,J_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Z_]],{ignore:["link","linkReference"]})}function J_(e,t,n,i,a){let u="";if(!o1(a)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!ev(n)))return!1;const l=tv(n+i);if(!l[0])return!1;const c={type:"link",title:null,url:u+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function Z_(e,t,n,i){return!o1(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ev(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 tv(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const a=Km(e,"(");let u=Km(e,")");for(;i!==-1&&a>u;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),u++;return[e,n]}function o1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Gr(n)||ao(n))&&(!t||n!==47)}l1.peek=cv;function nv(){this.buffer()}function rv(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iv(){this.buffer()}function sv(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function av(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uv(e){this.exit(e)}function ov(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Tn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lv(e){this.exit(e)}function cv(){return"["}function l1(e,t,n,i){const a=n.createTracker(i);let u=a.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return u+=a.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),l(),u+=a.move("]"),u}function dv(){return{enter:{gfmFootnoteCallString:nv,gfmFootnoteCall:rv,gfmFootnoteDefinitionLabelString:iv,gfmFootnoteDefinition:sv},exit:{gfmFootnoteCallString:av,gfmFootnoteCall:uv,gfmFootnoteDefinitionLabelString:ov,gfmFootnoteDefinition:lv}}}function fv(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:l1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,a,u,l){const c=u.createTracker(l);let f=c.move("[^");const p=u.enter("footnoteDefinition"),T=u.enter("label");return f+=c.move(u.safe(u.associationId(i),{before:f,after:"]"})),T(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
71
|
+
`:" ")+u.indentLines(u.containerFlow(i,c.current()),t?c1:hv))),p(),f}}function hv(e,t,n){return t===0?e:c1(e,t,n)}function c1(e,t,n){return(n?"":" ")+e}const pv=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];d1.peek=yv;function mv(){return{canContainEols:["delete"],enter:{strikethrough:Ev},exit:{strikethrough:Tv}}}function gv(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pv}],handlers:{delete:d1}}}function Ev(e){this.enter({type:"delete",children:[]},e)}function Tv(e){this.exit(e)}function d1(e,t,n,i){const a=n.createTracker(i),u=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),u(),l}function yv(){return"~"}function xv(e){return e.length}function bv(e,t){const n=t||{},i=(n.align||[]).concat(),a=n.stringLength||xv,u=[],l=[],c=[],f=[];let p=0,T=-1;for(;++T<e.length;){const v=[],D=[];let I=-1;for(e[T].length>p&&(p=e[T].length);++I<e[T].length;){const R=kv(e[T][I]);if(n.alignDelimiters!==!1){const H=a(R);D[I]=H,(f[I]===void 0||H>f[I])&&(f[I]=H)}v.push(R)}l[T]=v,c[T]=D}let E=-1;if(typeof i=="object"&&"length"in i)for(;++E<p;)u[E]=Xm(i[E]);else{const v=Xm(i);for(;++E<p;)u[E]=v}E=-1;const b=[],x=[];for(;++E<p;){const v=u[E];let D="",I="";v===99?(D=":",I=":"):v===108?D=":":v===114&&(I=":");let R=n.alignDelimiters===!1?1:Math.max(1,f[E]-D.length-I.length);const H=D+"-".repeat(R)+I;n.alignDelimiters!==!1&&(R=D.length+R+I.length,R>f[E]&&(f[E]=R),x[E]=R),b[E]=H}l.splice(1,0,b),c.splice(1,0,x),T=-1;const C=[];for(;++T<l.length;){const v=l[T],D=c[T];E=-1;const I=[];for(;++E<p;){const R=v[E]||"";let H="",W="";if(n.alignDelimiters!==!1){const q=f[E]-(D[E]||0),B=u[E];B===114?H=" ".repeat(q):B===99?q%2?(H=" ".repeat(q/2+.5),W=" ".repeat(q/2-.5)):(H=" ".repeat(q/2),W=H):W=" ".repeat(q)}n.delimiterStart!==!1&&!E&&I.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||E)&&I.push(" "),n.alignDelimiters!==!1&&I.push(H),I.push(R),n.alignDelimiters!==!1&&I.push(W),n.padding!==!1&&I.push(" "),(n.delimiterEnd!==!1||E!==p-1)&&I.push("|")}C.push(n.delimiterEnd===!1?I.join("").replace(/ +$/,""):I.join(""))}return C.join(`
|
|
72
|
+
`)}function kv(e){return e==null?"":String(e)}function Xm(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}const Jm={}.hasOwnProperty;function f1(e,t){const n=t||{};function i(a,...u){let l=i.invalid;const c=i.handlers;if(a&&Jm.call(a,e)){const f=String(a[e]);l=Jm.call(c,f)?c[f]:i.unknown}if(l)return l.call(this,a,...u)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}function Cv(e,t,n,i){const a=n.enter("blockquote"),u=n.createTracker(i);u.move("> "),u.shift(2);const l=n.indentLines(n.containerFlow(e,u.current()),Sv);return a(),l}function Sv(e,t,n){return">"+(n?"":" ")+e}function _v(e,t){return Zm(e,t.inConstruct,!0)&&!Zm(e,t.notInConstruct,!1)}function Zm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function e0(e,t,n,i){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
73
|
+
`&&_v(n.stack,n.unsafe[a]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
74
|
+
`}function h1(e,t){const n=String(e);let i=n.indexOf(t),a=i,u=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===a?++u>l&&(l=u):u=1,a=i+t.length,i=n.indexOf(t,a);return l}function vv(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 Nv(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 wv(e,t,n,i){const a=Nv(n),u=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(vv(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(u,Av);return E(),b}const c=n.createTracker(i),f=a.repeat(Math.max(h1(u,a)+1,3)),p=n.enter("codeFenced");let T=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${l}`);T+=c.move(n.safe(e.lang,{before:T,after:" ",encode:["`"],...c.current()})),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${l}`);T+=c.move(" "),T+=c.move(n.safe(e.meta,{before:T,after:`
|
|
75
|
+
`,encode:["`"],...c.current()})),E()}return T+=c.move(`
|
|
76
|
+
`),u&&(T+=c.move(u+`
|
|
77
|
+
`)),T+=c.move(f),p(),T}function Av(e,t,n){return(n?"":" ")+e}function $d(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 Iv(e,t,n,i){const a=$d(n),u=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(i);let p=f.move("[");return p+=f.move(n.safe(n.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(c=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":`
|
|
78
|
+
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${u}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),c()),l(),p}function Lv(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 Zs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qu(e,t,n){const i=Di(e),a=Di(t);return i===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}p1.peek=Rv;function p1(e,t,n,i){const a=Lv(n),u=n.enter("emphasis"),l=n.createTracker(i),c=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const p=f.charCodeAt(0),T=Qu(i.before.charCodeAt(i.before.length-1),p,a);T.inside&&(f=Zs(p)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Qu(i.after.charCodeAt(0),E,a);b.inside&&(f=f.slice(0,-1)+Zs(E));const x=l.move(a);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:T.outside},c+f+x}function Rv(e,t,n){return n.options.emphasis||"*"}function Ov(e,t){let n=!1;return fo(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Kc}),!!((!e.depth||e.depth<3)&&Pd(e)&&(t.options.setext||n))}function Dv(e,t,n,i){const a=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(i);if(Ov(e,n)){const T=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,{...u.current(),before:`
|
|
79
|
+
`,after:`
|
|
80
|
+
`});return E(),T(),b+`
|
|
81
|
+
`+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
82
|
+
`))+1))}const l="#".repeat(a),c=n.enter("headingAtx"),f=n.enter("phrasing");u.move(l+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
|
|
83
|
+
`,...u.current()});return/^[\t ]/.test(p)&&(p=Zs(p.charCodeAt(0))+p.slice(1)),p=p?l+" "+p:l,n.options.closeAtx&&(p+=" "+l),f(),c(),p}m1.peek=Pv;function m1(e){return e.value||""}function Pv(){return"<"}g1.peek=Mv;function g1(e,t,n,i){const a=$d(n),u=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(i);let p=f.move("![");return p+=f.move(n.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(c=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${u}`),p+=f.move(" "+a),p+=f.move(n.safe(e.title,{before:p,after:a,...f.current()})),p+=f.move(a),c()),p+=f.move(")"),l(),p}function Mv(){return"!"}E1.peek=Fv;function E1(e,t,n,i){const a=e.referenceType,u=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(i);let f=c.move("![");const p=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(p+"]["),l();const T=n.stack;n.stack=[],l=n.enter("reference");const E=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=T,u(),a==="full"||!p||p!==E?f+=c.move(E+"]"):a==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Fv(){return"!"}T1.peek=jv;function T1(e,t,n){let i=e.value||"",a="`",u=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(i);)a+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<n.unsafe.length;){const l=n.unsafe[u],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return a+i+a}function jv(){return"`"}function y1(e,t){const n=Pd(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))}x1.peek=Bv;function x1(e,t,n,i){const a=$d(n),u=a==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let c,f;if(y1(e,n)){const T=n.stack;n.stack=[],c=n.enter("autolink");let E=l.move("<");return E+=l.move(n.containerPhrasing(e,{before:E,after:">",...l.current()})),E+=l.move(">"),c(),n.stack=T,E}c=n.enter("link"),f=n.enter("label");let p=l.move("[");return p+=l.move(n.containerPhrasing(e,{before:p,after:"](",...l.current()})),p+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=l.move("<"),p+=l.move(n.safe(e.url,{before:p,after:">",...l.current()})),p+=l.move(">")):(f=n.enter("destinationRaw"),p+=l.move(n.safe(e.url,{before:p,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${u}`),p+=l.move(" "+a),p+=l.move(n.safe(e.title,{before:p,after:a,...l.current()})),p+=l.move(a),f()),p+=l.move(")"),c(),p}function Bv(e,t,n){return y1(e,n)?"<":"["}b1.peek=Uv;function b1(e,t,n,i){const a=e.referenceType,u=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(i);let f=c.move("[");const p=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(p+"]["),l();const T=n.stack;n.stack=[],l=n.enter("reference");const E=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=T,u(),a==="full"||!p||p!==E?f+=c.move(E+"]"):a==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Uv(){return"["}function Wd(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 Hv(e){const t=Wd(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 zv(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 k1(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 $v(e,t,n,i){const a=n.enter("list"),u=n.bulletCurrent;let l=e.ordered?zv(n):Wd(n);const c=e.ordered?l==="."?")":".":Hv(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const T=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&T&&(!T.children||!T.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&&(f=!0),k1(n)===l&&T){let E=-1;for(;++E<e.children.length;){const b=e.children[E];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const p=n.containerFlow(e,i);return n.bulletLastUsed=l,n.bulletCurrent=u,a(),p}function Wv(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 Yv(e,t,n,i){const a=Wv(n);let u=n.bulletCurrent||Wd(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let l=u.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(i);c.move(u+" ".repeat(l-u.length)),c.shift(l);const f=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,c.current()),T);return f(),p;function T(E,b,x){return b?(x?"":" ".repeat(l))+E:(x?u:u+" ".repeat(l-u.length))+E}}function Vv(e,t,n,i){const a=n.enter("paragraph"),u=n.enter("phrasing"),l=n.containerPhrasing(e,i);return u(),a(),l}const qv=lo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Qv(e,t,n,i){return(e.children.some(function(l){return qv(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Gv(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}C1.peek=Kv;function C1(e,t,n,i){const a=Gv(n),u=n.enter("strong"),l=n.createTracker(i),c=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const p=f.charCodeAt(0),T=Qu(i.before.charCodeAt(i.before.length-1),p,a);T.inside&&(f=Zs(p)+f.slice(1));const E=f.charCodeAt(f.length-1),b=Qu(i.after.charCodeAt(0),E,a);b.inside&&(f=f.slice(0,-1)+Zs(E));const x=l.move(a+a);return u(),n.attentionEncodeSurroundingInfo={after:b.outside,before:T.outside},c+f+x}function Kv(e,t,n){return n.options.strong||"*"}function Xv(e,t,n,i){return n.safe(e.value,i)}function Jv(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 Zv(e,t,n){const i=(k1(n)+(n.options.ruleSpaces?" ":"")).repeat(Jv(n));return n.options.ruleSpaces?i.slice(0,-1):i}const S1={blockquote:Cv,break:e0,code:wv,definition:Iv,emphasis:p1,hardBreak:e0,heading:Dv,html:m1,image:g1,imageReference:E1,inlineCode:T1,link:x1,linkReference:b1,list:$v,listItem:Yv,paragraph:Vv,root:Qv,strong:C1,text:Xv,thematicBreak:Zv};function eN(){return{enter:{table:tN,tableData:t0,tableHeader:t0,tableRow:rN},exit:{codeText:iN,table:nN,tableData:wc,tableHeader:wc,tableRow:wc}}}function tN(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 nN(e){this.exit(e),this.data.inTable=void 0}function rN(e){this.enter({type:"tableRow",children:[]},e)}function wc(e){this.exit(e)}function t0(e){this.enter({type:"tableCell",children:[]},e)}function iN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sN(e,t){return t==="|"?t:e}function aN(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,a=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
84
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:f,tableRow:c}};function l(x,C,v,D){return p(T(x,v,D),x.align)}function c(x,C,v,D){const I=E(x,v,D),R=p([I]);return R.slice(0,R.indexOf(`
|
|
85
|
+
`))}function f(x,C,v,D){const I=v.enter("tableCell"),R=v.enter("phrasing"),H=v.containerPhrasing(x,{...D,before:u,after:u});return R(),I(),H}function p(x,C){return bv(x,{align:C,alignDelimiters:i,padding:n,stringLength:a})}function T(x,C,v){const D=x.children;let I=-1;const R=[],H=C.enter("table");for(;++I<D.length;)R[I]=E(D[I],C,v);return H(),R}function E(x,C,v){const D=x.children;let I=-1;const R=[],H=C.enter("tableRow");for(;++I<D.length;)R[I]=f(D[I],x,C,v);return H(),R}function b(x,C,v){let D=S1.inlineCode(x,C,v);return v.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function uN(){return{exit:{taskListCheckValueChecked:n0,taskListCheckValueUnchecked:n0,paragraph:lN}}}function oN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cN}}}function n0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lN(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 i=n.children[0];if(i&&i.type==="text"){const a=t.children;let u=-1,l;for(;++u<a.length;){const c=a[u];if(c.type==="paragraph"){l=c;break}}l===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function cN(e,t,n,i){const a=e.children[0],u=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);u&&c.move(l);let f=S1.listItem(e,t,n,{...i,...c.current()});return u&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(T){return T+l}}function dN(){return[W_(),dv(),mv(),eN(),uN()]}function fN(e){return{extensions:[Y_(),fv(e),gv(),aN(e),oN()]}}const hN={tokenize:yN,partial:!0},_1={tokenize:xN,partial:!0},v1={tokenize:bN,partial:!0},N1={tokenize:kN,partial:!0},pN={tokenize:CN,partial:!0},w1={name:"wwwAutolink",tokenize:EN,previous:I1},A1={name:"protocolAutolink",tokenize:TN,previous:L1},Yn={name:"emailAutolink",tokenize:gN,previous:R1},Rn={};function mN(){return{text:Rn}}let Hr=48;for(;Hr<123;)Rn[Hr]=Yn,Hr++,Hr===58?Hr=65:Hr===91&&(Hr=97);Rn[43]=Yn;Rn[45]=Yn;Rn[46]=Yn;Rn[95]=Yn;Rn[72]=[Yn,A1];Rn[104]=[Yn,A1];Rn[87]=[Yn,w1];Rn[119]=[Yn,w1];function gN(e,t,n){const i=this;let a,u;return l;function l(E){return!ed(E)||!R1.call(i,i.previous)||Yd(i.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return ed(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(pN,T,p)(E):E===45||E===95||vt(E)?(u=!0,e.consume(E),f):T(E)}function p(E){return e.consume(E),a=!0,f}function T(E){return u&&a&&Rt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function EN(e,t,n){const i=this;return a;function a(l){return l!==87&&l!==119||!I1.call(i,i.previous)||Yd(i.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(hN,e.attempt(_1,e.attempt(v1,u),n),n)(l))}function u(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function TN(e,t,n){const i=this;let a="",u=!1;return l;function l(E){return(E===72||E===104)&&L1.call(i,i.previous)&&!Yd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(Rt(E)&&a.length<5)return a+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(E),f}return n(E)}function f(E){return E===47?(e.consume(E),u?p:(u=!0,f)):n(E)}function p(E){return E===null||Vu(E)||Ge(E)||Gr(E)||ao(E)?n(E):e.attempt(_1,e.attempt(v1,T),n)(E)}function T(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function yN(e,t,n){let i=0;return a;function a(l){return(l===87||l===119)&&i<3?(i++,e.consume(l),a):l===46&&i===3?(e.consume(l),u):n(l)}function u(l){return l===null?n(l):t(l)}}function xN(e,t,n){let i,a,u;return l;function l(p){return p===46||p===95?e.check(N1,f,c)(p):p===null||Ge(p)||Gr(p)||p!==45&&ao(p)?f(p):(u=!0,e.consume(p),l)}function c(p){return p===95?i=!0:(a=i,i=void 0),e.consume(p),l}function f(p){return a||i||!u?n(p):t(p)}}function bN(e,t){let n=0,i=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&i<n?u(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(N1,t,u)(l):l===null||Ge(l)||Gr(l)?t(l):(e.consume(l),a)}function u(l){return l===41&&i++,e.consume(l),a}}function kN(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),u):c===93?(e.consume(c),a):c===60||c===null||Ge(c)||Gr(c)?t(c):n(c)}function a(c){return c===null||c===40||c===91||Ge(c)||Gr(c)?t(c):i(c)}function u(c){return Rt(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),i):Rt(c)?(e.consume(c),l):n(c)}}function CN(e,t,n){return i;function i(u){return e.consume(u),a}function a(u){return vt(u)?n(u):t(u)}}function I1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ge(e)}function L1(e){return!Rt(e)}function R1(e){return!(e===47||ed(e))}function ed(e){return e===43||e===45||e===46||e===95||vt(e)}function Yd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const SN={tokenize:RN,partial:!0};function _N(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:AN,continuation:{tokenize:IN},exit:LN}},text:{91:{name:"gfmFootnoteCall",tokenize:wN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vN,resolveTo:NN}}}}function vN(e,t,n){const i=this;let a=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l;for(;a--;){const f=i.events[a][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const p=Tn(i.sliceSerialize({start:l.end,end:i.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function NN(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 i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",u,t],["enter",l,t],["exit",l,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function wN(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,l;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),f}function f(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(E){if(u>999||E===93&&!l||E===null||E===91||Ge(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return a.includes(Tn(i.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return Ge(E)||(l=!0),u++,e.consume(E),E===92?T:p}function T(E){return E===91||E===92||E===93?(e.consume(E),u++,p):p(E)}}function AN(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,l=0,c;return f;function f(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",T):n(C)}function T(C){if(l>999||C===93&&!c||C===null||C===91||Ge(C))return n(C);if(C===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return u=Tn(i.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return Ge(C)||(c=!0),l++,e.consume(C),C===92?E:T}function E(C){return C===91||C===92||C===93?(e.consume(C),l++,T):T(C)}function b(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),a.includes(u)||a.push(u),Me(e,x,"gfmFootnoteDefinitionWhitespace")):n(C)}function x(C){return t(C)}}function IN(e,t,n){return e.check(aa,t,e.attempt(SN,t,n))}function LN(e){e.exit("gfmFootnoteDefinition")}function RN(e,t,n){const i=this;return Me(e,a,"gfmFootnoteDefinitionIndent",5);function a(u){const l=i.events[i.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(u):n(u)}}function ON(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:a};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function a(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let p=f;for(;p--;)if(l[p][0]==="exit"&&l[p][1].type==="strikethroughSequenceTemporary"&&l[p][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[p][1].end.offset-l[p][1].start.offset){l[f][1].type="strikethroughSequence",l[p][1].type="strikethroughSequence";const T={type:"strikethrough",start:Object.assign({},l[p][1].start),end:Object.assign({},l[f][1].end)},E={type:"strikethroughText",start:Object.assign({},l[p][1].end),end:Object.assign({},l[f][1].start)},b=[["enter",T,c],["enter",l[p][1],c],["exit",l[p][1],c],["enter",E,c]],x=c.parser.constructs.insideSpan.null;x&&Gt(b,b.length,0,uo(x,l.slice(p+1,f),c)),Gt(b,b.length,0,[["exit",E,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",T,c]]),Gt(l,p-1,f-p+3,b),f=p+b.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function u(l,c,f){const p=this.previous,T=this.events;let E=0;return b;function b(C){return p===126&&T[T.length-1][1].type!=="characterEscape"?f(C):(l.enter("strikethroughSequenceTemporary"),x(C))}function x(C){const v=Di(p);if(C===126)return E>1?f(C):(l.consume(C),E++,x);if(E<2&&!n)return f(C);const D=l.exit("strikethroughSequenceTemporary"),I=Di(C);return D._open=!I||I===2&&!!v,D._close=!v||v===2&&!!I,c(C)}}}class DN{constructor(){this.map=[]}add(t,n,i){PN(this,t,n,i)}consume(t){if(this.map.sort(function(u,l){return u[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let a=i.pop();for(;a;){for(const u of a)t.push(u);a=i.pop()}this.map.length=0}}function PN(e,t,n,i){let a=0;if(!(n===0&&i.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...i);return}a+=1}e.map.push([t,n,i])}}function MN(e,t){let n=!1;const i=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function FN(){return{flow:{null:{name:"table",tokenize:jN,resolveAll:BN}}}}function jN(e,t,n){const i=this;let a=0,u=0,l;return c;function c(M){let pe=i.events.length-1;for(;pe>-1;){const he=i.events[pe][1].type;if(he==="lineEnding"||he==="linePrefix")pe--;else break}const V=pe>-1?i.events[pe][1].type:null,de=V==="tableHead"||V==="tableRow"?B:f;return de===B&&i.parser.lazy[i.now().line]?n(M):de(M)}function f(M){return e.enter("tableHead"),e.enter("tableRow"),p(M)}function p(M){return M===124||(l=!0,u+=1),T(M)}function T(M){return M===null?n(M):Ce(M)?u>1?(u=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),x):n(M):Fe(M)?Me(e,T,"whitespace")(M):(u+=1,l&&(l=!1,a+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),l=!0,T):(e.enter("data"),E(M)))}function E(M){return M===null||M===124||Ge(M)?(e.exit("data"),T(M)):(e.consume(M),M===92?b:E)}function b(M){return M===92||M===124?(e.consume(M),E):E(M)}function x(M){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(M):(e.enter("tableDelimiterRow"),l=!1,Fe(M)?Me(e,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):C(M))}function C(M){return M===45||M===58?D(M):M===124?(l=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),v):q(M)}function v(M){return Fe(M)?Me(e,D,"whitespace")(M):D(M)}function D(M){return M===58?(u+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),I):M===45?(u+=1,I(M)):M===null||Ce(M)?W(M):q(M)}function I(M){return M===45?(e.enter("tableDelimiterFiller"),R(M)):q(M)}function R(M){return M===45?(e.consume(M),R):M===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),H):(e.exit("tableDelimiterFiller"),H(M))}function H(M){return Fe(M)?Me(e,W,"whitespace")(M):W(M)}function W(M){return M===124?C(M):M===null||Ce(M)?!l||a!==u?q(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):q(M)}function q(M){return n(M)}function B(M){return e.enter("tableRow"),ie(M)}function ie(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),ie):M===null||Ce(M)?(e.exit("tableRow"),t(M)):Fe(M)?Me(e,ie,"whitespace")(M):(e.enter("data"),Z(M))}function Z(M){return M===null||M===124||Ge(M)?(e.exit("data"),ie(M)):(e.consume(M),M===92?ce:Z)}function ce(M){return M===92||M===124?(e.consume(M),Z):Z(M)}}function BN(e,t){let n=-1,i=!0,a=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,p,T,E;const b=new DN;for(;++n<e.length;){const x=e[n],C=x[1];x[0]==="enter"?C.type==="tableHead"?(c=!1,f!==0&&(r0(b,t,f,p,T),T=void 0,f=0),p={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},b.add(n,0,[["enter",p,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,E=void 0,u=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,T={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},b.add(n,0,[["enter",T,t]])),a=C.type==="tableDelimiterRow"?2:T?3:1):a&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,l[2]===0&&(u[1]!==0&&(l[0]=l[1],E=Iu(b,t,u,a,void 0,E),u=[0,0,0,0]),l[2]=n)):C.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(l[0]=l[1],E=Iu(b,t,u,a,void 0,E)),u=l,l=[u[1],n,0,0])):C.type==="tableHead"?(c=!0,f=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(f=n,u[1]!==0?(l[0]=l[1],E=Iu(b,t,u,a,n,E)):l[1]!==0&&(E=Iu(b,t,l,a,n,E)),a=0):a&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&r0(b,t,f,p,T),b.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=MN(t.events,n))}return e}function Iu(e,t,n,i,a,u){const l=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Li(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const f=Li(t.events,n[1]);if(u={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const p=Li(t.events,n[2]),T=Li(t.events,n[3]),E={type:c,start:Object.assign({},p),end:Object.assign({},T)};if(e.add(n[2],0,[["enter",E,t]]),i!==2){const b=t.events[n[2]],x=t.events[n[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,v=n[3]-n[2]-1;e.add(C,v,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return a!==void 0&&(u.end=Object.assign({},Li(t.events,a)),e.add(a,0,[["exit",u,t]]),u=void 0),u}function r0(e,t,n,i,a){const u=[],l=Li(t.events,n);a&&(a.end=Object.assign({},l),u.push(["exit",a,t])),i.end=Object.assign({},l),u.push(["exit",i,t]),e.add(n+1,0,u)}function Li(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const UN={name:"tasklistCheck",tokenize:zN};function HN(){return{text:{91:UN}}}function zN(e,t,n){const i=this;return a;function a(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),u)}function u(f){return Ge(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Ce(f)?t(f):Fe(f)?e.check({tokenize:$N},t,n)(f):n(f)}}function $N(e,t,n){return Me(e,i,"whitespace");function i(a){return a===null?n(a):t(a)}}function WN(e){return Hg([mN(),_N(),ON(e),FN(),HN()])}const YN={};function VN(e){const t=this,n=e||YN,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(WN(n)),u.push(dN()),l.push(fN(n))}function qN(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:u},exit:{mathFlow:a,mathFlowFence:i,mathFlowFenceMeta:n,mathFlowValue:c,mathText:l,mathTextData:c}};function e(f){const p={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[p]}},f)}function t(){this.buffer()}function n(){const f=this.resume(),p=this.stack[this.stack.length-1];p.type,p.meta=f}function i(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(f){const p=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),T=this.stack[this.stack.length-1];T.type,this.exit(f),T.value=p;const E=T.data.hChildren[0];E.type,E.tagName,E.children.push({type:"text",value:p}),this.data.mathFlowInside=void 0}function u(f){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},f),this.buffer()}function l(f){const p=this.resume(),T=this.stack[this.stack.length-1];T.type,this.exit(f),T.value=p,T.data.hChildren.push({type:"text",value:p})}function c(f){this.config.enter.data.call(this,f),this.config.exit.data.call(this,f)}}function QN(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),i.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
86
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:i}};function n(u,l,c,f){const p=u.value||"",T=c.createTracker(f),E="$".repeat(Math.max(h1(p,"$")+1,2)),b=c.enter("mathFlow");let x=T.move(E);if(u.meta){const C=c.enter("mathFlowMeta");x+=T.move(c.safe(u.meta,{after:`
|
|
87
|
+
`,before:x,encode:["$"],...T.current()})),C()}return x+=T.move(`
|
|
88
|
+
`),p&&(x+=T.move(p+`
|
|
89
|
+
`)),x+=T.move(E),b(),x}function i(u,l,c){let f=u.value||"",p=1;for(t||p++;new RegExp("(^|[^$])"+"\\$".repeat(p)+"([^$]|$)").test(f);)p++;const T="$".repeat(p);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let E=-1;for(;++E<c.unsafe.length;){const b=c.unsafe[E];if(!b.atBreak)continue;const x=c.compilePattern(b);let C;for(;C=x.exec(f);){let v=C.index;f.codePointAt(v)===10&&f.codePointAt(v-1)===13&&v--,f=f.slice(0,v)+" "+f.slice(C.index+1)}}return T+f+T}function a(){return"$"}}const GN={tokenize:KN,concrete:!0,name:"mathFlow"},i0={tokenize:XN,partial:!0};function KN(e,t,n){const i=this,a=i.events[i.events.length-1],u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let l=0;return c;function c(R){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(R)}function f(R){return R===36?(e.consume(R),l++,f):l<2?n(R):(e.exit("mathFlowFenceSequence"),Me(e,p,"whitespace")(R))}function p(R){return R===null||Ce(R)?E(R):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||Ce(R)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),E(R)):R===36?n(R):(e.consume(R),T)}function E(R){return e.exit("mathFlowFence"),i.interrupt?t(R):e.attempt(i0,b,D)(R)}function b(R){return e.attempt({tokenize:I,partial:!0},D,x)(R)}function x(R){return(u?Me(e,C,"linePrefix",u+1):C)(R)}function C(R){return R===null?D(R):Ce(R)?e.attempt(i0,b,D)(R):(e.enter("mathFlowValue"),v(R))}function v(R){return R===null||Ce(R)?(e.exit("mathFlowValue"),C(R)):(e.consume(R),v)}function D(R){return e.exit("mathFlow"),t(R)}function I(R,H,W){let q=0;return Me(R,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function B(ce){return R.enter("mathFlowFence"),R.enter("mathFlowFenceSequence"),ie(ce)}function ie(ce){return ce===36?(q++,R.consume(ce),ie):q<l?W(ce):(R.exit("mathFlowFenceSequence"),Me(R,Z,"whitespace")(ce))}function Z(ce){return ce===null||Ce(ce)?(R.exit("mathFlowFence"),H(ce)):W(ce)}}}function XN(e,t,n){const i=this;return a;function a(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function JN(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:i,resolve:ZN,previous:e3,name:"mathText"};function i(a,u,l){let c=0,f,p;return T;function T(v){return a.enter("mathText"),a.enter("mathTextSequence"),E(v)}function E(v){return v===36?(a.consume(v),c++,E):c<2&&!n?l(v):(a.exit("mathTextSequence"),b(v))}function b(v){return v===null?l(v):v===36?(p=a.enter("mathTextSequence"),f=0,C(v)):v===32?(a.enter("space"),a.consume(v),a.exit("space"),b):Ce(v)?(a.enter("lineEnding"),a.consume(v),a.exit("lineEnding"),b):(a.enter("mathTextData"),x(v))}function x(v){return v===null||v===32||v===36||Ce(v)?(a.exit("mathTextData"),b(v)):(a.consume(v),x)}function C(v){return v===36?(a.consume(v),f++,C):f===c?(a.exit("mathTextSequence"),a.exit("mathText"),u(v)):(p.type="mathTextData",x(v))}}}function ZN(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="mathTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function e3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function t3(e){return{flow:{36:GN},text:{36:JN(e)}}}const n3={};function r3(e){const t=this,n=e||n3,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(t3(n)),u.push(qN()),l.push(QN(n))}const i3=[VN,r3],s3=/\\[a-zA-Z]+|[\^_]/,a3=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,u3=/^[a-zA-Z]{3,}$/,s0=/[=+\-*/<>≤≥±×÷]/,o3=/[.,;:!?]$/,l3=/\n/,c3=/\s+/,d3=/\d,\d{3}\b/,f3=/\d/;function h3(e){const t=e.trim();if(!t||l3.test(e))return!1;if(s3.test(t))return!0;if(a3.test(t))return!1;const n=t.split(c3),i=n.filter(u=>u3.test(u.replace(o3,"")));return i.length>=2||d3.test(t)?!1:!!(n.every(u=>u.length<=4)&&(n.length===1||s0.test(t))||s0.test(t)&&i.length===0)}function p3(e,t){if(e.startsWith("```",t)||e.startsWith("~~~",t)){const n=e.slice(t,t+3),i=e.indexOf(`
|
|
90
|
+
${n}`,t+3);return i===-1?e.length:i+4}if(e[t]==="`"){let n=0;for(;e[t+n]==="`";)n++;const i=e.indexOf("`".repeat(n),t+n);return i===-1?t+n:i+n}return t}function m3(e){let t="",n=0;for(;n<e.length;){const i=p3(e,n);if(i>n){t+=e.slice(n,i),n=i;continue}if(e[n]==="$"&&e[n+1]==="$"){const a=e.indexOf("$$",n+2),u=a===-1?e.length:a+2;t+=e.slice(n,u),n=u;continue}if(e[n]==="$"&&e[n-1]!=="\\"){const a=e.indexOf("$",n+1);if(a!==-1){const u=e.slice(n+1,a);if(f3.test(e[a+1]??"")||!h3(u)){t+=`\\$${u}`,n=a;continue}t+=e.slice(n,a+1),n=a+1;continue}}t+=e[n],n++}return t}const a0=/[#.]/g;function g3(e,t){const n=e||"",i={};let a=0,u,l;for(;a<n.length;){a0.lastIndex=a;const c=a0.exec(n),f=n.slice(a,c?c.index:n.length);f&&(u?u==="#"?i.id=f:Array.isArray(i.className)?i.className.push(f):i.className=[f]:l=f,a+=f.length),c&&(u=c[0],a++)}return{type:"element",tagName:l||t||"div",properties:i,children:[]}}function O1(e,t,n){const i=n?x3(n):void 0;function a(u,l,...c){let f;if(u==null){f={type:"root",children:[]};const p=l;c.unshift(p)}else{f=g3(u,t);const p=f.tagName.toLowerCase(),T=i?i.get(p):void 0;if(f.tagName=T||p,E3(l))c.unshift(l);else for(const[E,b]of Object.entries(l))T3(e,f.properties,E,b)}for(const p of c)td(f.children,p);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function E3(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 i of n){const a=t[i];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const u=a;for(const l of u)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function T3(e,t,n,i){const a=io(e,n);let u;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;u=i}else typeof i=="boolean"?u=i:typeof i=="string"?a.spaceSeparated?u=Em(i):a.commaSeparated?u=fm(i):a.commaOrSpaceSeparated?u=Em(fm(i).join(" ")):u=u0(a,a.property,i):Array.isArray(i)?u=[...i]:u=a.property==="style"?y3(i):String(i);if(Array.isArray(u)){const l=[];for(const c of u)l.push(u0(a,a.property,c));u=l}a.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[a.property]=u}}function td(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)td(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?td(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function u0(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Xs(n)===Xs(t)))return!0}return n}function y3(e){const t=[];for(const[n,i]of Object.entries(e))t.push([n,i].join(": "));return t.join("; ")}function x3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const b3=["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"],k3=O1(sa,"div"),C3=O1(Cr,"g",b3);function S3(e){const t=String(e),n=[];return{toOffset:a,toPoint:i};function i(u){if(typeof u=="number"&&u>-1&&u<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const f=o0(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>u)return{line:l+1,column:u-(l>0?n[l-1]:0)+1,offset:u};l++}}}function a(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],f=o0(t,c),p=f===-1?t.length+1:f+1;if(c===p)break;n.push(p)}const l=(u.line>1?n[u.line-2]:0)+u.column-1;if(l<n[u.line-1])return l}}}function o0(e,t){const n=e.indexOf("\r",t),i=e.indexOf(`
|
|
91
|
+
`,t);return i===-1?n:n===-1||n+1===i?i:n<i?n:i}const Vr={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/"},D1={}.hasOwnProperty,_3=Object.prototype;function v3(e,t){const n=t||{};return Vd({file:n.file||void 0,location:!1,schema:n.space==="svg"?Cr:sa,verbose:n.verbose||!1},e)}function Vd(e,t){let n;switch(t.nodeName){case"#comment":{const i=t;return n={type:"comment",value:i.data},zu(e,i,n),n}case"#document":case"#document-fragment":{const i=t,a="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(n={type:"root",children:P1(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const u=String(e.file),l=S3(u),c=l.toPoint(0),f=l.toPoint(u.length);n.position={start:c,end:f}}return n}case"#documentType":{const i=t;return n={type:"doctype"},zu(e,i,n),n}case"#text":{const i=t;return n={type:"text",value:i.value},zu(e,i,n),n}default:return n=N3(e,t),n}}function P1(e,t){let n=-1;const i=[];for(;++n<t.length;){const a=Vd(e,t[n]);i.push(a)}return i}function N3(e,t){const n=e.schema;e.schema=t.namespaceURI===Vr.svg?Cr:sa;let i=-1;const a={};for(;++i<t.attrs.length;){const c=t.attrs[i],f=(c.prefix?c.prefix+":":"")+c.name;D1.call(_3,f)||(a[f]=c.value)}const l=(e.schema.space==="svg"?C3:k3)(t.tagName,a,P1(e,t.childNodes));if(zu(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,p=f&&f.startTag&&Ri(f.startTag),T=f&&f.endTag&&Ri(f.endTag),E=Vd(e,c.content);p&&T&&e.file&&(E.position={start:p.end,end:T.start}),l.content=E}return e.schema=n,l}function zu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=w3(e,n,t.sourceCodeLocation);i&&(e.location=!0,n.position=i)}}function w3(e,t,n){const i=Ri(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(i&&!n.endTag&&a&&a.position&&a.position.end&&(i.end=Object.assign({},a.position.end)),e.verbose){const u={};let l;if(n.attrs)for(l in n.attrs)D1.call(n.attrs,l)&&(u[io(e.schema,l).property]=Ri(n.attrs[l]));n.startTag;const c=Ri(n.startTag),f=n.endTag?Ri(n.endTag):void 0,p={opening:c};f&&(p.closing=f),p.properties=u,t.data={position:p}}}return i}function Ri(e){const t=l0({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=l0({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function l0(e){return e.line&&e.column?e:void 0}const A3={},I3={}.hasOwnProperty,M1=f1("type",{handlers:{root:R3,element:F3,text:P3,comment:M3,doctype:D3}});function L3(e,t){const i=(t||A3).space;return M1(e,i==="svg"?Cr:sa)}function R3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=qd(e.children,n,t),Ui(e,n),n}function O3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=qd(e.children,n,t),Ui(e,n),n}function D3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ui(e,t),t}function P3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ui(e,t),t}function M3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ui(e,t),t}function F3(e,t){const n=t;let i=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Cr);const a=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&I3.call(e.properties,u)){const f=j3(i,u,e.properties[u]);f&&a.push(f)}}const l=i.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Vr[l],childNodes:[],parentNode:null};return c.childNodes=qd(e.children,c,i),Ui(e,c),e.tagName==="template"&&e.content&&(c.content=O3(e.content,i)),c}function j3(e,t,n){const i=io(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&i.boolean)return;Array.isArray(n)&&(n=i.commaSeparated?_g(n):Og(n));const a={name:i.attribute,value:n===!0?"":String(n)};if(i.space&&i.space!=="html"&&i.space!=="svg"){const u=a.name.indexOf(":");u<0?a.prefix="":(a.name=a.name.slice(u+1),a.prefix=i.attribute.slice(0,u)),a.namespace=Vr[i.space]}return a}function qd(e,t,n){let i=-1;const a=[];if(e)for(;++i<e.length;){const u=M1(e[i],n);u.parentNode=t,a.push(u)}return a}function Ui(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 B3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],U3=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]),tt="�";var N;(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"})(N||(N={}));const Bt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function F1(e){return e>=55296&&e<=57343}function H3(e){return e>=56320&&e<=57343}function z3(e,t){return(e-55296)*1024+9216+t}function j1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function B1(e){return e>=64976&&e<=65007||U3.has(e)}var Q;(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"})(Q||(Q={}));const $3=65536;class W3{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=$3,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:i,col:a,offset:u}=this,l=a+n,c=u+n;return{code:t,startLine:i,endLine:i,startCol:l,endCol:l,startOffset:c,endOffset:c}}_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(H3(n))return this.pos++,this._addGap(),z3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(Q.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 i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const i=this.html.charCodeAt(n);return i===N.CARRIAGE_RETURN?N.LINE_FEED:i}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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,F1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){j1(t)?this._err(Q.controlCharacterInInputStream):B1(t)&&this._err(Q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Pe;(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"})(Pe||(Pe={}));function U1(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 Y3=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୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢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;怳Ādpuct;戏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ǣጓ\0y;䐎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Ā;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀ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Ā;elƀ;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\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»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ↄⅪ←ٖ↛ǰ↉\0proø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;䅓Ācrir;榿;쀀𝔬ͯ\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\0m;櫳;櫽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))),V3=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 q3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=V3.get(e))!==null&&t!==void 0?t:e}var Et;(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"})(Et||(Et={}));const Q3=32;var xr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xr||(xr={}));function nd(e){return e>=Et.ZERO&&e<=Et.NINE}function G3(e){return e>=Et.UPPER_A&&e<=Et.UPPER_F||e>=Et.LOWER_A&&e<=Et.LOWER_F}function K3(e){return e>=Et.UPPER_A&&e<=Et.UPPER_Z||e>=Et.LOWER_A&&e<=Et.LOWER_Z||nd(e)}function X3(e){return e===Et.EQUALS||K3(e)}var gt;(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"})(gt||(gt={}));var $n;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($n||($n={}));class J3{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=gt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$n.Strict}startEntity(t){this.decodeMode=t,this.state=gt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case gt.EntityStart:return t.charCodeAt(n)===Et.NUM?(this.state=gt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=gt.NamedEntity,this.stateNamedEntity(t,n));case gt.NumericStart:return this.stateNumericStart(t,n);case gt.NumericDecimal:return this.stateNumericDecimal(t,n);case gt.NumericHex:return this.stateNumericHex(t,n);case gt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Q3)===Et.LOWER_X?(this.state=gt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=gt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,a){if(n!==i){const u=i-n;this.result=this.result*Math.pow(a,u)+Number.parseInt(t.substr(n,u),a),this.consumed+=u}}stateNumericHex(t,n){const i=n;for(;n<t.length;){const a=t.charCodeAt(n);if(nd(a)||G3(a))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){const i=n;for(;n<t.length;){const a=t.charCodeAt(n);if(nd(a))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Et.SEMI)this.consumed+=1;else if(this.decodeMode===$n.Strict)return 0;return this.emitCodePoint(q3(this.result),this.consumed),this.errors&&(t!==Et.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let a=i[this.treeIndex],u=(a&xr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=Z3(i,a,this.treeIndex+Math.max(1,u),l),this.treeIndex<0)return this.result===0||this.decodeMode===$n.Attribute&&(u===0||X3(l))?0:this.emitNotTerminatedNamedEntity();if(a=i[this.treeIndex],u=(a&xr.VALUE_LENGTH)>>14,u!==0){if(l===Et.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==$n.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,a=(i[n]&xr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~xr.VALUE_LENGTH:a[t+1],i),n===3&&this.emitCodePoint(a[t+2],i),i}end(){var t;switch(this.state){case gt.NamedEntity:return this.result!==0&&(this.decodeMode!==$n.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case gt.NumericDecimal:return this.emitNumericEntity(0,2);case gt.NumericHex:return this.emitNumericEntity(0,3);case gt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case gt.EntityStart:return 0}}}function Z3(e,t,n,i){const a=(t&xr.BRANCH_LENGTH)>>7,u=t&xr.JUMP_TABLE;if(a===0)return u!==0&&i===u?n:-1;if(u){const f=i-u;return f<0||f>=a?-1:e[n+f]-1}let l=n,c=l+a-1;for(;l<=c;){const f=l+c>>>1,p=e[f];if(p<i)l=f+1;else if(p>i)c=f-1;else return e[f+a]}return-1}var te;(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/"})(te||(te={}));var Qr;(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"})(Qr||(Qr={}));var an;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(an||(an={}));var z;(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"})(z||(z={}));var m;(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"})(m||(m={}));const ew=new Map([[z.A,m.A],[z.ADDRESS,m.ADDRESS],[z.ANNOTATION_XML,m.ANNOTATION_XML],[z.APPLET,m.APPLET],[z.AREA,m.AREA],[z.ARTICLE,m.ARTICLE],[z.ASIDE,m.ASIDE],[z.B,m.B],[z.BASE,m.BASE],[z.BASEFONT,m.BASEFONT],[z.BGSOUND,m.BGSOUND],[z.BIG,m.BIG],[z.BLOCKQUOTE,m.BLOCKQUOTE],[z.BODY,m.BODY],[z.BR,m.BR],[z.BUTTON,m.BUTTON],[z.CAPTION,m.CAPTION],[z.CENTER,m.CENTER],[z.CODE,m.CODE],[z.COL,m.COL],[z.COLGROUP,m.COLGROUP],[z.DD,m.DD],[z.DESC,m.DESC],[z.DETAILS,m.DETAILS],[z.DIALOG,m.DIALOG],[z.DIR,m.DIR],[z.DIV,m.DIV],[z.DL,m.DL],[z.DT,m.DT],[z.EM,m.EM],[z.EMBED,m.EMBED],[z.FIELDSET,m.FIELDSET],[z.FIGCAPTION,m.FIGCAPTION],[z.FIGURE,m.FIGURE],[z.FONT,m.FONT],[z.FOOTER,m.FOOTER],[z.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[z.FORM,m.FORM],[z.FRAME,m.FRAME],[z.FRAMESET,m.FRAMESET],[z.H1,m.H1],[z.H2,m.H2],[z.H3,m.H3],[z.H4,m.H4],[z.H5,m.H5],[z.H6,m.H6],[z.HEAD,m.HEAD],[z.HEADER,m.HEADER],[z.HGROUP,m.HGROUP],[z.HR,m.HR],[z.HTML,m.HTML],[z.I,m.I],[z.IMG,m.IMG],[z.IMAGE,m.IMAGE],[z.INPUT,m.INPUT],[z.IFRAME,m.IFRAME],[z.KEYGEN,m.KEYGEN],[z.LABEL,m.LABEL],[z.LI,m.LI],[z.LINK,m.LINK],[z.LISTING,m.LISTING],[z.MAIN,m.MAIN],[z.MALIGNMARK,m.MALIGNMARK],[z.MARQUEE,m.MARQUEE],[z.MATH,m.MATH],[z.MENU,m.MENU],[z.META,m.META],[z.MGLYPH,m.MGLYPH],[z.MI,m.MI],[z.MO,m.MO],[z.MN,m.MN],[z.MS,m.MS],[z.MTEXT,m.MTEXT],[z.NAV,m.NAV],[z.NOBR,m.NOBR],[z.NOFRAMES,m.NOFRAMES],[z.NOEMBED,m.NOEMBED],[z.NOSCRIPT,m.NOSCRIPT],[z.OBJECT,m.OBJECT],[z.OL,m.OL],[z.OPTGROUP,m.OPTGROUP],[z.OPTION,m.OPTION],[z.P,m.P],[z.PARAM,m.PARAM],[z.PLAINTEXT,m.PLAINTEXT],[z.PRE,m.PRE],[z.RB,m.RB],[z.RP,m.RP],[z.RT,m.RT],[z.RTC,m.RTC],[z.RUBY,m.RUBY],[z.S,m.S],[z.SCRIPT,m.SCRIPT],[z.SEARCH,m.SEARCH],[z.SECTION,m.SECTION],[z.SELECT,m.SELECT],[z.SOURCE,m.SOURCE],[z.SMALL,m.SMALL],[z.SPAN,m.SPAN],[z.STRIKE,m.STRIKE],[z.STRONG,m.STRONG],[z.STYLE,m.STYLE],[z.SUB,m.SUB],[z.SUMMARY,m.SUMMARY],[z.SUP,m.SUP],[z.TABLE,m.TABLE],[z.TBODY,m.TBODY],[z.TEMPLATE,m.TEMPLATE],[z.TEXTAREA,m.TEXTAREA],[z.TFOOT,m.TFOOT],[z.TD,m.TD],[z.TH,m.TH],[z.THEAD,m.THEAD],[z.TITLE,m.TITLE],[z.TR,m.TR],[z.TRACK,m.TRACK],[z.TT,m.TT],[z.U,m.U],[z.UL,m.UL],[z.SVG,m.SVG],[z.VAR,m.VAR],[z.WBR,m.WBR],[z.XMP,m.XMP]]);function Hi(e){var t;return(t=ew.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const ae=m,tw={[te.HTML]:new Set([ae.ADDRESS,ae.APPLET,ae.AREA,ae.ARTICLE,ae.ASIDE,ae.BASE,ae.BASEFONT,ae.BGSOUND,ae.BLOCKQUOTE,ae.BODY,ae.BR,ae.BUTTON,ae.CAPTION,ae.CENTER,ae.COL,ae.COLGROUP,ae.DD,ae.DETAILS,ae.DIR,ae.DIV,ae.DL,ae.DT,ae.EMBED,ae.FIELDSET,ae.FIGCAPTION,ae.FIGURE,ae.FOOTER,ae.FORM,ae.FRAME,ae.FRAMESET,ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6,ae.HEAD,ae.HEADER,ae.HGROUP,ae.HR,ae.HTML,ae.IFRAME,ae.IMG,ae.INPUT,ae.LI,ae.LINK,ae.LISTING,ae.MAIN,ae.MARQUEE,ae.MENU,ae.META,ae.NAV,ae.NOEMBED,ae.NOFRAMES,ae.NOSCRIPT,ae.OBJECT,ae.OL,ae.P,ae.PARAM,ae.PLAINTEXT,ae.PRE,ae.SCRIPT,ae.SECTION,ae.SELECT,ae.SOURCE,ae.STYLE,ae.SUMMARY,ae.TABLE,ae.TBODY,ae.TD,ae.TEMPLATE,ae.TEXTAREA,ae.TFOOT,ae.TH,ae.THEAD,ae.TITLE,ae.TR,ae.TRACK,ae.UL,ae.WBR,ae.XMP]),[te.MATHML]:new Set([ae.MI,ae.MO,ae.MN,ae.MS,ae.MTEXT,ae.ANNOTATION_XML]),[te.SVG]:new Set([ae.TITLE,ae.FOREIGN_OBJECT,ae.DESC]),[te.XLINK]:new Set,[te.XML]:new Set,[te.XMLNS]:new Set},rd=new Set([ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6]);z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT;var A;(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"})(A||(A={}));const ut={DATA:A.DATA,RCDATA:A.RCDATA,RAWTEXT:A.RAWTEXT,SCRIPT_DATA:A.SCRIPT_DATA,PLAINTEXT:A.PLAINTEXT,CDATA_SECTION:A.CDATA_SECTION};function nw(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Us(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function rw(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function gr(e){return rw(e)||Us(e)}function c0(e){return gr(e)||nw(e)}function Lu(e){return e+32}function H1(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function d0(e){return H1(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function iw(e){return e===N.NULL?Q.nullCharacterReference:e>1114111?Q.characterReferenceOutsideUnicodeRange:F1(e)?Q.surrogateCharacterReference:B1(e)?Q.noncharacterCharacterReference:j1(e)||e===N.CARRIAGE_RETURN?Q.controlCharacterReference:null}class sw{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=A.DATA,this.returnState=A.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new W3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new J3(Y3,(i,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(Q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const a=iw(i);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var i,a;(a=(i=this.handler).onParseError)===null||a===void 0||a.call(i,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,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i==null||i()}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:Pe.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Pe.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Pe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Pe.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 i=this.currentToken;if(U1(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const a=(t=(n=i.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(Q.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=Hi(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(Q.endTagWithAttributes),t.selfClosing&&this._err(Q.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 Pe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pe.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:Pe.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=H1(t)?Pe.WHITESPACE_CHARACTER:t===N.NULL?Pe.NULL_CHARACTER:Pe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=A.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$n.Attribute:$n.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===A.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===A.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case A.DATA:{this._stateData(t);break}case A.RCDATA:{this._stateRcdata(t);break}case A.RAWTEXT:{this._stateRawtext(t);break}case A.SCRIPT_DATA:{this._stateScriptData(t);break}case A.PLAINTEXT:{this._statePlaintext(t);break}case A.TAG_OPEN:{this._stateTagOpen(t);break}case A.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case A.TAG_NAME:{this._stateTagName(t);break}case A.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case A.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case A.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case A.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case A.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case A.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case A.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case A.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case A.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case A.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case A.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case A.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case A.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case A.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case A.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case A.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case A.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case A.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case A.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case A.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case A.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case A.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case A.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case A.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case A.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case A.BOGUS_COMMENT:{this._stateBogusComment(t);break}case A.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case A.COMMENT_START:{this._stateCommentStart(t);break}case A.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case A.COMMENT:{this._stateComment(t);break}case A.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case A.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case A.COMMENT_END:{this._stateCommentEnd(t);break}case A.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case A.DOCTYPE:{this._stateDoctype(t);break}case A.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case A.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case A.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case A.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case A.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case A.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case A.CDATA_SECTION:{this._stateCdataSection(t);break}case A.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case A.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case A.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case A.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=A.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=A.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=A.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(tt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(gr(t))this._createStartTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=A.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=A.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(Q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=A.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(gr(t))this._createEndTagToken(),this.state=A.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(Q.missingEndTagName),this.state=A.DATA;break}case N.EOF:{this._err(Q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(Q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=A.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.tagName+=tt;break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Us(t)?Lu(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=A.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){gr(t)?(this.state=A.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=A.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=A.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=A.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=A.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=A.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){gr(t)?(this.state=A.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=A.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=A.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=A.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){gr(t)?(this.state=A.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=A.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(tt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(tt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_ESCAPED,this._emitChars(tt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:gr(t)?(this._emitChars("<"),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){gr(t)?(this.state=A.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Bt.SCRIPT,!1)&&d0(this.preprocessor.peek(Bt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this._emitChars(tt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(tt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=A.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(tt);break}case N.EOF:{this._err(Q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Bt.SCRIPT,!1)&&d0(this.preprocessor.peek(Bt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Bt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=A.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=A.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(Q.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=A.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=A.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(Q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.name+=tt;break}default:this.currentAttr.name+=String.fromCodePoint(Us(t)?Lu(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=A.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=A.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=A.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=A.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=A.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingAttributeValue),this.state=A.DATA,this.emitCurrentTagToken();break}default:this.state=A.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=tt;break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=A.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=tt;break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),this.currentAttr.value+=tt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(Q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=A.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=A.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=A.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBetweenAttributes),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=A.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(Q.eofInTag),this._emitEOFToken();break}default:this._err(Q.unexpectedSolidusInTag),this.state=A.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=tt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Bt.DASH_DASH,!0)?(this._createCommentToken(Bt.DASH_DASH.length+1),this.state=A.COMMENT_START):this._consumeSequenceIfMatch(Bt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Bt.DOCTYPE.length+1),this.state=A.DOCTYPE):this._consumeSequenceIfMatch(Bt.CDATA_START,!0)?this.inForeignNode?this.state=A.CDATA_SECTION:(this._err(Q.cdataInHtmlContent),this._createCommentToken(Bt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=A.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=A.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=A.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=A.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptClosingOfEmptyComment),this.state=A.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=A.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=A.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.data+=tt;break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=A.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=A.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=A.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=A.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=A.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(Q.nestedComment),this.state=A.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=A.COMMENT_END;break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=A.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=A.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=A.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(Q.incorrectlyClosedComment),this.state=A.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(Q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=A.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(Q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingWhitespaceBeforeDoctypeName),this.state=A.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Us(t))this._createDoctypeToken(String.fromCharCode(Lu(t))),this.state=A.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(Q.unexpectedNullCharacter),this._createDoctypeToken(tt),this.state=A.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.EOF:{this._err(Q.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=A.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=A.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.name+=tt;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Us(t)?Lu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Bt.PUBLIC,!1)?this.state=A.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Bt.SYSTEM,!1)?this.state=A.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=A.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=tt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.EOF:{this._err(Q.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 N.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.publicId+=tt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.EOF:{this._err(Q.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=A.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=A.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(Q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=A.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(Q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=tt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.EOF:{this._err(Q.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 N.APOSTROPHE:{this.state=A.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(Q.unexpectedNullCharacter),n.systemId+=tt;break}case N.GREATER_THAN_SIGN:{this._err(Q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.EOF:{this._err(Q.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 N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.EOF:{this._err(Q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(Q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=A.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=A.DATA;break}case N.NULL:{this._err(Q.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=A.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(Q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=A.CDATA_SECTION_END:(this._emitChars("]"),this.state=A.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=A.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=A.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&c0(this.preprocessor.peek(1))?A.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){c0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(Q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const z1=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),f0=new Set([...z1,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),Gu=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),aw=new Set([...Gu,m.OL,m.UL]),uw=new Set([...Gu,m.BUTTON]),h0=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),p0=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),ow=new Set([m.TR,m.TEMPLATE,m.HTML]),lw=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),cw=new Set([m.TABLE,m.TEMPLATE,m.HTML]),dw=new Set([m.TD,m.TH]);class fw{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===te.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 i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,i),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===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])!==te.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 i=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(i,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(rd,te.HTML)}popUntilTableCellPopped(){this.popUntilPopped(dw,te.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(cw,te.HTML)}clearBackToTableBodyContext(){this.clearBackTo(lw,te.HTML)}clearBackToTableRowContext(){this.clearBackTo(ow,te.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]===m.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]===m.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const a=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case te.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case te.SVG:{if(p0.has(a))return!1;break}case te.MATHML:{if(h0.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gu)}hasInListItemScope(t){return this.hasInDynamicScope(t,aw)}hasInButtonScope(t){return this.hasInDynamicScope(t,uw)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case te.HTML:{if(rd.has(n))return!0;if(Gu.has(n))return!1;break}case te.SVG:{if(p0.has(n))return!1;break}case te.MATHML:{if(h0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===te.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===te.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===te.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&z1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&f0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&f0.has(this.currentTagId);)this.pop()}}const Ac=3;var An;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(An||(An={}));const m0={type:An.Marker};class hw{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],a=n.length,u=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===An.Marker)break;const{element:p}=f;if(this.treeAdapter.getTagName(p)===u&&this.treeAdapter.getNamespaceURI(p)===l){const T=this.treeAdapter.getAttrList(p);T.length===a&&i.push({idx:c,attrs:T})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Ac)return;const n=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,n);if(i.length<Ac)return;const a=new Map(n.map(l=>[l.name,l.value]));let u=0;for(let l=0;l<i.length;l++){const c=i[l];c.attrs.every(f=>a.get(f.name)===f.value)&&(u+=1,u>=Ac&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(m0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:An.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:An.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(m0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===An.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===An.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===An.Element&&n.element===t)}}const Er={createDocument(){return{nodeName:"#document",mode:an.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 i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const a=e.childNodes.find(u=>u.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=i;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};Er.appendChild(e,u)}},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(Er.isTextNode(n)){n.value+=t;return}}Er.appendChild(e,Er.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&Er.isTextNode(i)?i.value+=t:Er.insertBefore(e,Er.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)n.has(t[i].name)||e.attrs.push(t[i])},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}}},$1="html",pw="about:legacy-compat",mw="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",W1=["+//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//"],gw=[...W1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Ew=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Y1=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Tw=[...Y1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function g0(e,t){return t.some(n=>e.startsWith(n))}function yw(e){return e.name===$1&&e.publicId===null&&(e.systemId===null||e.systemId===pw)}function xw(e){if(e.name!==$1)return an.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===mw)return an.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Ew.has(n))return an.QUIRKS;let i=t===null?gw:W1;if(g0(n,i))return an.QUIRKS;if(i=t===null?Y1:Tw,g0(n,i))return an.LIMITED_QUIRKS}return an.NO_QUIRKS}const E0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},bw="definitionurl",kw="definitionURL",Cw=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])),Sw=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:te.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:te.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:te.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:te.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:te.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:te.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:te.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:te.XML}],["xml:space",{prefix:"xml",name:"space",namespace:te.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:te.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:te.XMLNS}]]),_w=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])),vw=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function Nw(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:i})=>i===Qr.COLOR||i===Qr.SIZE||i===Qr.FACE)||vw.has(t)}function V1(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===bw){e.attrs[t].name=kw;break}}function q1(e){for(let t=0;t<e.attrs.length;t++){const n=Cw.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Qd(e){for(let t=0;t<e.attrs.length;t++){const n=Sw.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 ww(e){const t=_w.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Hi(e.tagName))}function Aw(e,t){return t===te.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function Iw(e,t,n){if(t===te.MATHML&&e===m.ANNOTATION_XML){for(let i=0;i<n.length;i++)if(n[i].name===Qr.ENCODING){const a=n[i].value.toLowerCase();return a===E0.TEXT_HTML||a===E0.APPLICATION_XML}}return t===te.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function Lw(e,t,n,i){return(!i||i===te.HTML)&&Iw(e,t,n)||(!i||i===te.MATHML)&&Aw(e,t)}const Rw="hidden",Ow=8,Dw=3;var O;(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"})(O||(O={}));const Pw={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Q1=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),T0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Er,onParseError:null};class y0{constructor(t,n,i=null,a=null){this.fragmentContext=i,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=O.INITIAL,this.originalInsertionMode=O.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={...T0,...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 sw(this.options,this),this.activeFormattingElements=new hw(this.treeAdapter),this.fragmentContextID=i?Hi(this.treeAdapter.getTagName(i)):m.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new fw(this.document,this.treeAdapter,this)}static parse(t,n){const i=new this(n);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,n){const i={...T0,...n};t??(t=i.treeAdapter.createElement(z.TEMPLATE,te.HTML,[]));const a=i.treeAdapter.createElement("documentmock",te.HTML,[]),u=new this(i,a,t);return u.fragmentContextID===m.TEMPLATE&&u.tmplInsertionModeStack.unshift(O.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,i){var a;if(!this.onParseError)return;const u=(a=t.location)!==null&&a!==void 0?a:Pw,l={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:i?u.startLine:u.endLine,endCol:i?u.startCol:u.endCol,endOffset:i?u.startOffset:u.endOffset};this.onParseError(l)}onItemPush(t,n,i){var a,u;(u=(a=this.treeAdapter).onItemPush)===null||u===void 0||u.call(a,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var i,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(i=this.treeAdapter).onItemPop)===null||a===void 0||a.call(i,t,this.openElements.current),n){let u,l;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,l=this.fragmentContextID):{current:u,currentTagId:l}=this.openElements,this._setContextModes(u,l)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===te.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,te.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=O.TEXT}switchToPlaintextParsing(){this.insertionMode=O.TEXT,this.originalInsertionMode=O.IN_BODY,this.tokenizer.state=ut.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)===z.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==te.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=ut.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=ut.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=ut.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=ut.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,te.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,te.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(z.HTML,te.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),u=i?a.lastIndexOf(i):a.length,l=a[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:p,endOffset:T}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:p,endOffset:T})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,a=this.treeAdapter.getTagName(t),u=n.type===Pe.END_TAG&&a===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===m.SVG&&this.treeAdapter.getTagName(n)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===te.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,te.HTML)}_processToken(t){switch(t.type){case Pe.CHARACTER:{this.onCharacter(t);break}case Pe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pe.COMMENT:{this.onComment(t);break}case Pe.DOCTYPE:{this.onDoctype(t);break}case Pe.START_TAG:{this._processStartTag(t);break}case Pe.END_TAG:{this.onEndTag(t);break}case Pe.EOF:{this.onEof(t);break}case Pe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const a=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return Lw(t,a,u,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===An.Marker||this.openElements.contains(a.element)),i=n===-1?t-1:n-1;for(let a=i;a>=0;a--){const u=this.activeFormattingElements.entries[a];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=O.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=O.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=O.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=O.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=O.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=O.IN_TABLE;return}case m.BODY:{this.insertionMode=O.IN_BODY;return}case m.FRAMESET:{this.insertionMode=O.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?O.AFTER_HEAD:O.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=O.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=O.IN_HEAD;return}break}}this.insertionMode=O.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===m.TEMPLATE)break;if(i===m.TABLE){this.insertionMode=O.IN_SELECT_IN_TABLE;return}}this.insertionMode=O.IN_SELECT}_isElementCausesFosterParenting(t){return Q1.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===te.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,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 i=this.treeAdapter.getNamespaceURI(t);return tw[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dI(this,t);return}switch(this.insertionMode){case O.INITIAL:{Fs(this,t);break}case O.BEFORE_HTML:{Ws(this,t);break}case O.BEFORE_HEAD:{Ys(this,t);break}case O.IN_HEAD:{Vs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case O.AFTER_HEAD:{Qs(this,t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:{K1(this,t);break}case O.TEXT:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Ic(this,t);break}case O.IN_TABLE_TEXT:{nE(this,t);break}case O.IN_COLUMN_GROUP:{Ku(this,t);break}case O.AFTER_BODY:{Xu(this,t);break}case O.AFTER_AFTER_BODY:{$u(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cI(this,t);return}switch(this.insertionMode){case O.INITIAL:{Fs(this,t);break}case O.BEFORE_HTML:{Ws(this,t);break}case O.BEFORE_HEAD:{Ys(this,t);break}case O.IN_HEAD:{Vs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case O.AFTER_HEAD:{Qs(this,t);break}case O.TEXT:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Ic(this,t);break}case O.IN_COLUMN_GROUP:{Ku(this,t);break}case O.AFTER_BODY:{Xu(this,t);break}case O.AFTER_AFTER_BODY:{$u(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){id(this,t);return}switch(this.insertionMode){case O.INITIAL:case O.BEFORE_HTML:case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_TEMPLATE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{id(this,t);break}case O.IN_TABLE_TEXT:{js(this,t);break}case O.AFTER_BODY:{zw(this,t);break}case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{$w(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case O.INITIAL:{Ww(this,t);break}case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:{this._err(t,Q.misplacedDoctype);break}case O.IN_TABLE_TEXT:{js(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?fI(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Fs(this,t);break}case O.BEFORE_HTML:{Yw(this,t);break}case O.BEFORE_HEAD:{qw(this,t);break}case O.IN_HEAD:{bn(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Kw(this,t);break}case O.AFTER_HEAD:{Jw(this,t);break}case O.IN_BODY:{At(this,t);break}case O.IN_TABLE:{Pi(this,t);break}case O.IN_TABLE_TEXT:{js(this,t);break}case O.IN_CAPTION:{QA(this,t);break}case O.IN_COLUMN_GROUP:{Xd(this,t);break}case O.IN_TABLE_BODY:{mo(this,t);break}case O.IN_ROW:{go(this,t);break}case O.IN_CELL:{XA(this,t);break}case O.IN_SELECT:{sE(this,t);break}case O.IN_SELECT_IN_TABLE:{ZA(this,t);break}case O.IN_TEMPLATE:{tI(this,t);break}case O.AFTER_BODY:{rI(this,t);break}case O.IN_FRAMESET:{iI(this,t);break}case O.AFTER_FRAMESET:{aI(this,t);break}case O.AFTER_AFTER_BODY:{oI(this,t);break}case O.AFTER_AFTER_FRAMESET:{lI(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?hI(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Fs(this,t);break}case O.BEFORE_HTML:{Vw(this,t);break}case O.BEFORE_HEAD:{Qw(this,t);break}case O.IN_HEAD:{Gw(this,t);break}case O.IN_HEAD_NO_SCRIPT:{Xw(this,t);break}case O.AFTER_HEAD:{Zw(this,t);break}case O.IN_BODY:{po(this,t);break}case O.TEXT:{jA(this,t);break}case O.IN_TABLE:{ea(this,t);break}case O.IN_TABLE_TEXT:{js(this,t);break}case O.IN_CAPTION:{GA(this,t);break}case O.IN_COLUMN_GROUP:{KA(this,t);break}case O.IN_TABLE_BODY:{sd(this,t);break}case O.IN_ROW:{iE(this,t);break}case O.IN_CELL:{JA(this,t);break}case O.IN_SELECT:{aE(this,t);break}case O.IN_SELECT_IN_TABLE:{eI(this,t);break}case O.IN_TEMPLATE:{nI(this,t);break}case O.AFTER_BODY:{oE(this,t);break}case O.IN_FRAMESET:{sI(this,t);break}case O.AFTER_FRAMESET:{uI(this,t);break}case O.AFTER_AFTER_BODY:{$u(this,t);break}}}onEof(t){switch(this.insertionMode){case O.INITIAL:{Fs(this,t);break}case O.BEFORE_HTML:{Ws(this,t);break}case O.BEFORE_HEAD:{Ys(this,t);break}case O.IN_HEAD:{Vs(this,t);break}case O.IN_HEAD_NO_SCRIPT:{qs(this,t);break}case O.AFTER_HEAD:{Qs(this,t);break}case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{eE(this,t);break}case O.TEXT:{BA(this,t);break}case O.IN_TABLE_TEXT:{js(this,t);break}case O.IN_TEMPLATE:{uE(this,t);break}case O.AFTER_BODY:case O.IN_FRAMESET:case O.AFTER_FRAMESET:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{Kd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.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 O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.TEXT:case O.IN_COLUMN_GROUP:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{this._insertCharacters(t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:case O.AFTER_BODY:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{G1(this,t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Ic(this,t);break}case O.IN_TABLE_TEXT:{tE(this,t);break}}}}function Mw(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):Z1(e,t),n}function Fw(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const a=e.openElements.items[i];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[i])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function jw(e,t,n){let i=t,a=e.openElements.getCommonAncestor(t);for(let u=0,l=a;l!==n;u++,l=a){a=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),f=c&&u>=Dw;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=Bw(e,c),i===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(l,i),i=l)}return i}function Bw(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function Uw(e,t,n){const i=e.treeAdapter.getTagName(t),a=Hi(i);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);a===m.TEMPLATE&&u===te.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Hw(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,u=e.treeAdapter.createElement(a.tagName,i,a.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,a.tagID)}function Gd(e,t){for(let n=0;n<Ow;n++){const i=Mw(e,t);if(!i)break;const a=Fw(e,i);if(!a)break;e.activeFormattingElements.bookmark=i;const u=jw(e,a,i.element),l=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(u),l&&Uw(e,l,u),Hw(e,a,i)}}function id(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function zw(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $w(e,t){e._appendCommentNode(t,e.document)}function Kd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(i);if(a&&!a.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(u);l&&!l.endTag&&e._setEndLocation(u,t)}}}}function Ww(e,t){e._setDocumentType(t);const n=t.forceQuirks?an.QUIRKS:xw(t);yw(t)||e._err(t,Q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=O.BEFORE_HTML}function Fs(e,t){e._err(t,Q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,an.QUIRKS),e.insertionMode=O.BEFORE_HTML,e._processToken(t)}function Yw(e,t){t.tagID===m.HTML?(e._insertElement(t,te.HTML),e.insertionMode=O.BEFORE_HEAD):Ws(e,t)}function Vw(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&Ws(e,t)}function Ws(e,t){e._insertFakeRootElement(),e.insertionMode=O.BEFORE_HEAD,e._processToken(t)}function qw(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.HEAD:{e._insertElement(t,te.HTML),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD;break}default:Ys(e,t)}}function Qw(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ys(e,t):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Ys(e,t){e._insertFakeElement(z.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD,e._processToken(t)}function bn(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,ut.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ut.RAWTEXT):(e._insertElement(t,te.HTML),e.insertionMode=O.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,ut.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,ut.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=O.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(O.IN_TEMPLATE);break}case m.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Vs(e,t)}}function Gw(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=O.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{Vs(e,t);break}case m.TEMPLATE:{Zr(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Zr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,Q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Q.endTagWithoutMatchingOpenElement)}function Vs(e,t){e.openElements.pop(),e.insertionMode=O.AFTER_HEAD,e._processToken(t)}function Kw(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{bn(e,t);break}case m.NOSCRIPT:{e._err(t,Q.nestedNoscriptInHead);break}default:qs(e,t)}}function Xw(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=O.IN_HEAD;break}case m.BR:{qs(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function qs(e,t){const n=t.type===Pe.EOF?Q.openElementsLeftAfterEof:Q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=O.IN_HEAD,e._processToken(t)}function Jw(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.BODY:{e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=O.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,te.HTML),e.insertionMode=O.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,Q.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),bn(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,Q.misplacedStartTagForHeadElement);break}default:Qs(e,t)}}function Zw(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{Qs(e,t);break}case m.TEMPLATE:{Zr(e,t);break}default:e._err(t,Q.endTagWithoutMatchingOpenElement)}}function Qs(e,t){e._insertFakeElement(z.BODY,m.BODY),e.insertionMode=O.IN_BODY,ho(e,t)}function ho(e,t){switch(t.type){case Pe.CHARACTER:{K1(e,t);break}case Pe.WHITESPACE_CHARACTER:{G1(e,t);break}case Pe.COMMENT:{id(e,t);break}case Pe.START_TAG:{At(e,t);break}case Pe.END_TAG:{po(e,t);break}case Pe.EOF:{eE(e,t);break}}}function G1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function K1(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function eA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function tA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function nA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,te.HTML),e.insertionMode=O.IN_FRAMESET)}function rA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function iA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&rd.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,te.HTML)}function sA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function aA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),n||(e.formElement=e.openElements.current))}function uA(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const a=e.openElements.tagIDs[i];if(n===m.LI&&a===m.LI||(n===m.DD||n===m.DT)&&(a===m.DD||a===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==m.ADDRESS&&a!==m.DIV&&a!==m.P&&e._isSpecialElement(e.openElements.items[i],a))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function oA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.tokenizer.state=ut.PLAINTEXT}function lA(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1}function cA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Gd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function dA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function fA(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Gd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function pA(e,t){e.treeAdapter.getDocumentMode(e.document)!==an.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=O.IN_TABLE}function X1(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function J1(e){const t=U1(e,Qr.TYPE);return t!=null&&t.toLowerCase()===Rw}function mA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),J1(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function gA(e,t){e._appendElement(t,te.HTML),t.ackSelfClosing=!0}function EA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TA(e,t){t.tagName=z.IMG,t.tagID=m.IMG,X1(e,t)}function yA(e,t){e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O.TEXT}function xA(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ut.RAWTEXT)}function bA(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ut.RAWTEXT)}function x0(e,t){e._switchToTextParsing(t,ut.RAWTEXT)}function kA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===O.IN_TABLE||e.insertionMode===O.IN_CAPTION||e.insertionMode===O.IN_TABLE_BODY||e.insertionMode===O.IN_ROW||e.insertionMode===O.IN_CELL?O.IN_SELECT_IN_TABLE:O.IN_SELECT}function CA(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function SA(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,te.HTML)}function _A(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,te.HTML)}function vA(e,t){e._reconstructActiveFormattingElements(),V1(t),Qd(t),t.selfClosing?e._appendElement(t,te.MATHML):e._insertElement(t,te.MATHML),t.ackSelfClosing=!0}function NA(e,t){e._reconstructActiveFormattingElements(),q1(t),Qd(t),t.selfClosing?e._appendElement(t,te.SVG):e._insertElement(t,te.SVG),t.ackSelfClosing=!0}function b0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function At(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{dA(e,t);break}case m.A:{cA(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{iA(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{rA(e,t);break}case m.LI:case m.DD:case m.DT:{uA(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{X1(e,t);break}case m.HR:{EA(e,t);break}case m.RB:case m.RTC:{SA(e,t);break}case m.RT:case m.RP:{_A(e,t);break}case m.PRE:case m.LISTING:{sA(e,t);break}case m.XMP:{xA(e,t);break}case m.SVG:{NA(e,t);break}case m.HTML:{eA(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{bn(e,t);break}case m.BODY:{tA(e,t);break}case m.FORM:{aA(e,t);break}case m.NOBR:{fA(e,t);break}case m.MATH:{vA(e,t);break}case m.TABLE:{pA(e,t);break}case m.INPUT:{mA(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{gA(e,t);break}case m.IMAGE:{TA(e,t);break}case m.BUTTON:{lA(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{hA(e,t);break}case m.IFRAME:{bA(e,t);break}case m.SELECT:{kA(e,t);break}case m.OPTION:case m.OPTGROUP:{CA(e,t);break}case m.NOEMBED:case m.NOFRAMES:{x0(e,t);break}case m.FRAMESET:{nA(e,t);break}case m.TEXTAREA:{yA(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?x0(e,t):b0(e,t);break}case m.PLAINTEXT:{oA(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:b0(e,t)}}function wA(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=O.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function AA(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=O.AFTER_BODY,oE(e,t))}function IA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function LA(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function RA(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(z.P,m.P),e._closePElement()}function OA(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function DA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function PA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function MA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function FA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function Z1(e,t){const n=t.tagName,i=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const u=e.openElements.items[a],l=e.openElements.tagIDs[a];if(i===l&&(i!==m.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(u,l))break}}function po(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Gd(e,t);break}case m.P:{RA(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{IA(e,t);break}case m.LI:{OA(e);break}case m.DD:case m.DT:{DA(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{PA(e);break}case m.BR:{FA(e);break}case m.BODY:{wA(e,t);break}case m.HTML:{AA(e,t);break}case m.FORM:{LA(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{MA(e,t);break}case m.TEMPLATE:{Zr(e,t);break}default:Z1(e,t)}}function eE(e,t){e.tmplInsertionModeStack.length>0?uE(e,t):Kd(e,t)}function jA(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function BA(e,t){e._err(t,Q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ic(e,t){if(e.openElements.currentTagId!==void 0&&Q1.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=O.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{nE(e,t);break}case Pe.WHITESPACE_CHARACTER:{tE(e,t);break}}else oa(e,t)}function UA(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,te.HTML),e.insertionMode=O.IN_CAPTION}function HA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=O.IN_COLUMN_GROUP}function zA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,m.COLGROUP),e.insertionMode=O.IN_COLUMN_GROUP,Xd(e,t)}function $A(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=O.IN_TABLE_BODY}function WA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,m.TBODY),e.insertionMode=O.IN_TABLE_BODY,mo(e,t)}function YA(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function VA(e,t){J1(t)?e._appendElement(t,te.HTML):oa(e,t),t.ackSelfClosing=!0}function qA(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,te.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Pi(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{WA(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{bn(e,t);break}case m.COL:{zA(e,t);break}case m.FORM:{qA(e,t);break}case m.TABLE:{YA(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{$A(e,t);break}case m.INPUT:{VA(e,t);break}case m.CAPTION:{UA(e,t);break}case m.COLGROUP:{HA(e,t);break}default:oa(e,t)}}function ea(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{Zr(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:oa(e,t)}}function oa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ho(e,t),e.fosterParentingEnabled=n}function tE(e,t){e.pendingCharacterTokens.push(t)}function nE(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function js(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)oa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const rE=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function QA(e,t){const n=t.tagID;rE.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,Pi(e,t)):At(e,t)}function GA(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,n===m.TABLE&&ea(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:po(e,t)}}function Xd(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.COL:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{bn(e,t);break}default:Ku(e,t)}}function KA(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case m.TEMPLATE:{Zr(e,t);break}case m.COL:break;default:Ku(e,t)}}function Ku(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE,e._processToken(t))}function mo(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,te.HTML),e.insertionMode=O.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,m.TR),e.insertionMode=O.IN_ROW,go(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Pi(e,t));break}default:Pi(e,t)}}function sd(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,ea(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:ea(e,t)}}function go(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,te.HTML),e.insertionMode=O.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,mo(e,t));break}default:Pi(e,t)}}function iE(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,sd(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,sd(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:ea(e,t)}}function XA(e,t){const n=t.tagID;rE.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),go(e,t)):At(e,t)}function JA(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),iE(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:po(e,t)}}function sE(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{bn(e,t);break}}}function aE(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{Zr(e,t);break}}}function ZA(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):sE(e,t)}function eI(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):aE(e,t)}function tI(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{bn(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=O.IN_TABLE,e.insertionMode=O.IN_TABLE,Pi(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=O.IN_COLUMN_GROUP,e.insertionMode=O.IN_COLUMN_GROUP,Xd(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=O.IN_TABLE_BODY,e.insertionMode=O.IN_TABLE_BODY,mo(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=O.IN_ROW,e.insertionMode=O.IN_ROW,go(e,t);break}default:e.tmplInsertionModeStack[0]=O.IN_BODY,e.insertionMode=O.IN_BODY,At(e,t)}}function nI(e,t){t.tagID===m.TEMPLATE&&Zr(e,t)}function uE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Kd(e,t)}function rI(e,t){t.tagID===m.HTML?At(e,t):Xu(e,t)}function oE(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=O.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else Xu(e,t)}function Xu(e,t){e.insertionMode=O.IN_BODY,ho(e,t)}function iI(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.FRAMESET:{e._insertElement(t,te.HTML);break}case m.FRAME:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{bn(e,t);break}}}function sI(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=O.AFTER_FRAMESET))}function aI(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.NOFRAMES:{bn(e,t);break}}}function uI(e,t){t.tagID===m.HTML&&(e.insertionMode=O.AFTER_AFTER_FRAMESET)}function oI(e,t){t.tagID===m.HTML?At(e,t):$u(e,t)}function $u(e,t){e.insertionMode=O.IN_BODY,ho(e,t)}function lI(e,t){switch(t.tagID){case m.HTML:{At(e,t);break}case m.NOFRAMES:{bn(e,t);break}}}function cI(e,t){t.chars=tt,e._insertCharacters(t)}function dI(e,t){e._insertCharacters(t),e.framesetOk=!1}function lE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==te.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function fI(e,t){if(Nw(t))lE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===te.MATHML?V1(t):i===te.SVG&&(ww(t),q1(t)),Qd(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function hI(e,t){if(t.tagID===m.P||t.tagID===m.BR){lE(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===te.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(i);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR;const pI=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,mI=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),k0={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function cE(e,t){const n=_I(e),i=f1("type",{handlers:{root:gI,element:EI,text:TI,comment:fE,doctype:yI,raw:bI},unknown:kI}),a={parser:n?new y0(k0):y0.getFragmentParser(void 0,k0),handle(c){i(c,a)},stitches:!1,options:t||{}};i(e,a),zi(a,Ln());const u=n?a.parser.document:a.parser.getFragment(),l=v3(u,{file:a.options.file});return a.stitches&&fo(l,"comment",function(c,f,p){const T=c;if(T.value.stitch&&p&&f!==void 0){const E=p.children;return E[f]=T.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function dE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function gI(e,t){dE(e.children,t)}function EI(e,t){CI(e,t),dE(e.children,t),SI(e,t)}function TI(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:la(e)};zi(t,Ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yI(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:la(e)};zi(t,Ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function xI(e,t){t.stitches=!0;const n=vI(e);if("children"in e&&"children"in n){const i=cE({type:"root",children:e.children},t.options);n.children=i.children}fE({type:"comment",value:{stitch:n}},t)}function fE(e,t){const n=e.value,i={type:Pe.COMMENT,data:n,location:la(e)};zi(t,Ln(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function bI(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,hE(t,Ln(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(pI,"<$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 kI(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))xI(n,t);else{let i="";throw mI.has(n.type)&&(i=". 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"+i)}}function zi(e,t){hE(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=ut.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 hE(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 CI(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ut.PLAINTEXT)return;zi(t,Ln(e));const i=t.parser.openElements.current;let a="namespaceURI"in i?i.namespaceURI:Vr.html;a===Vr.html&&n==="svg"&&(a=Vr.svg);const u=L3({...e,children:[]},{space:a===Vr.svg?"svg":"html"}),l={type:Pe.START_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:la(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function SI(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&B3.includes(n)||t.parser.tokenizer.state===ut.PLAINTEXT)return;zi(t,so(e));const i={type:Pe.END_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:la(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ut.RCDATA||t.parser.tokenizer.state===ut.RAWTEXT||t.parser.tokenizer.state===ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=ut.DATA)}function _I(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function la(e){const t=Ln(e)||{line:void 0,column:void 0,offset:void 0},n=so(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 vI(e){return"children"in e?Kr({...e,children:[]}):Kr(e)}function NI(e){return function(t,n){return cE(t,{...e,file:n})}}const zr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ad={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...zr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...zr],h2:[["className","sr-only"]],img:[...zr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...zr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...zr],table:[...zr],ul:[...zr,["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"]},yr={}.hasOwnProperty;function wI(e,t){let n={type:"root",children:[]};const i={schema:t?{...ad,...t}:ad,stack:[]},a=pE(i,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function pE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return AI(e,n);case"doctype":return II(e,n);case"element":return LI(e,n);case"root":return RI(e,n);case"text":return OI(e,n)}}}function AI(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",i=n.indexOf("-->"),u={type:"comment",value:i<0?n:n.slice(0,i)};return ca(u,t),u}}function II(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ca(n,t),n}}function LI(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const i=mE(e,t.children),a=DI(e,t.properties);e.stack.pop();let u=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(u=!0,e.schema.ancestors&&yr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let f=-1;for(u=!1;++f<c.length;)e.stack.includes(c[f])&&(u=!0)}if(!u)return e.schema.strip&&!e.schema.strip.includes(n)?i:void 0;const l={type:"element",tagName:n,properties:a,children:i};return ca(l,t),l}function RI(e,t){const i={type:"root",children:mE(e,t.children)};return ca(i,t),i}function OI(e,t){const i={type:"text",value:typeof t.value=="string"?t.value:""};return ca(i,t),i}function mE(e,t){const n=[];if(Array.isArray(t)){const i=t;let a=-1;for(;++a<i.length;){const u=pE(e,i[a]);u&&(Array.isArray(u)?n.push(...u):n.push(u))}}return n}function DI(e,t){const n=e.stack[e.stack.length-1],i=e.schema.attributes,a=e.schema.required,u=i&&yr.call(i,n)?i[n]:void 0,l=i&&yr.call(i,"*")?i["*"]:void 0,c=t&&typeof t=="object"?t:{},f={};let p;for(p in c)if(yr.call(c,p)){const T=c[p];let E=C0(e,S0(u,p),p,T);E==null&&(E=C0(e,S0(l,p),p,T)),E!=null&&(f[p]=E)}if(a&&yr.call(a,n)){const T=a[n];for(p in T)yr.call(T,p)&&!yr.call(f,p)&&(f[p]=T[p])}return f}function C0(e,t,n,i){return t?Array.isArray(i)?PI(e,t,n,i):gE(e,t,n,i):void 0}function PI(e,t,n,i){let a=-1;const u=[];for(;++a<i.length;){const l=gE(e,t,n,i[a]);(typeof l=="number"||typeof l=="string")&&u.push(l)}return u}function gE(e,t,n,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&MI(e,n,i)){if(typeof t=="object"&&t.length>1){let a=!1,u=0;for(;++u<t.length;){const l=t[u];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(i))){a=!0;break}}else if(l===i){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+i:i}}function MI(e,t,n){const i=e.schema.protocols&&yr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!i||i.length===0)return!0;const a=String(n),u=a.indexOf(":"),l=a.indexOf("?"),c=a.indexOf("#"),f=a.indexOf("/");if(u<0||f>-1&&u>f||l>-1&&u>l||c>-1&&u>c)return!0;let p=-1;for(;++p<i.length;){const T=i[p];if(u===T.length&&a.slice(0,T.length)===T)return!0}return!1}function ca(e,t){const n=Pg(t);t.data&&(e.data=Kr(t.data)),n&&(e.position=n)}function S0(e,t){let n,i=-1;if(e)for(;++i<e.length;){const a=e[i],u=typeof a=="string"?a:a[0];if(u===t)return a;u==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function FI(e){return function(t){return wI(t,e)}}const ud=ad,$r=(e,...t)=>{var n;return[...((n=ud.attributes)==null?void 0:n[e])??[],...t]},jI={...ud,attributes:{...ud.attributes,p:$r("p","align"),div:$r("div","align"),h1:$r("h1","align"),h2:$r("h2","align"),h3:$r("h3","align"),img:$r("img","width","height","align"),a:$r("a","align")}},BI=new Set(["code","pre","svg","math","style","script","textarea"]),UI="fade-word";function HI(e){const t=[];for(const n of e.split(/(\s+)/))if(n){if(/^\s+$/.test(n)){t.push({type:"text",value:n});continue}t.push({type:"element",tagName:"span",properties:{className:[UI]},children:[{type:"text",value:n}]})}return t}function EE(e){const t=e.children;if(!t)return;const n=[];for(const i of t){if(i.type==="text"){n.push(...HI(i.value??""));continue}if(i.type==="element"&&BI.has(i.tagName??"")){n.push(i);continue}EE(i),n.push(i)}e.children=n}function zI(){return e=>EE(e)}const $I=256*1024;let Wr=null,WI=0;const Ju=new Map;function _0(e,t){var n;(n=Ju.get(e))==null||n(t),Ju.delete(e)}function YI(){if(Wr)return Wr;try{Wr=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),Wr.addEventListener("message",e=>_0(e.data.id,e.data.html)),Wr.addEventListener("error",()=>{for(const e of[...Ju.keys()])_0(e,null);Wr=null})}catch{return null}return Wr}async function Jd(e,t){if(e.length>$I)return null;const n=YI();if(!n)return null;const i=++WI;return new Promise(a=>{Ju.set(i,a),n.postMessage({id:i,code:e,lang:t})})}function VI({code:e,lang:t}){const[n,i]=_.useState(null);_.useEffect(()=>{let u=!1;return Jd(e,t).then(l=>{u||i(l)}).catch(()=>{u||i(null)}),()=>{u=!0}},[e,t]);const a=()=>{var u;return void((u=navigator.clipboard)==null?void 0:u.writeText(e))};return h.jsxs("div",{className:"codeblock",children:[h.jsxs("div",{className:"codeblock-bar",children:[h.jsx("span",{className:"codeblock-lang",children:t||"text"}),h.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?h.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):h.jsx("pre",{className:"codeblock-body codeblock-plain",children:h.jsx("code",{children:e})})]})}let Lc=null;function qI(){return Lc||(Lc=Wc(()=>import("./mermaid.core-DXBmt4hx.js").then(e=>e.bp),[]).then(e=>(e.default.initialize({startOnLoad:!1,theme:"dark",securityLevel:"strict",themeVariables:{primaryColor:"#44475a",primaryTextColor:"#f8f8f2",primaryBorderColor:"#bd93f9",lineColor:"#8be9fd",fontFamily:"Inter, sans-serif"}}),e.default))),Lc}let QI=0;function GI({code:e}){const t=_.useRef(null),[n,i]=_.useState(!1);return _.useEffect(()=>{let a=!1;i(!1);const u=e.trim();if(u)return qI().then(async l=>{const c=await l.parse(u,{suppressErrors:!0});if(a||!c)return;const{svg:f}=await l.render(`mermaid-${QI++}`,u);a||!t.current||(t.current.innerHTML=f,i(!0))}).catch(()=>{}),()=>{a=!0}},[e]),h.jsxs("div",{className:"mermaid-wrap",children:[h.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&h.jsxs("div",{className:"codeblock",children:[h.jsx("div",{className:"codeblock-bar",children:h.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),h.jsx("pre",{className:"codeblock-body codeblock-plain",children:h.jsx("code",{children:e})})]})]})}const KI=/language-(\w+)/,XI=/\n$/,JI={code(e){const{className:t,children:n}=e,i=KI.exec(t??""),a=String(n).replace(XI,"");if(!t&&!a.includes(`
|
|
92
|
+
`))return h.jsx("code",{className:"md-inline-code",children:a});const l=(i==null?void 0:i[1])??"";return l==="mermaid"?h.jsx(GI,{code:a}):h.jsx(VI,{code:a,lang:l})},a(e){return h.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let Oi=null,v0=null;function TE(){return v0??(v0=Promise.all([Wc(()=>import("./index-DHJZ0QFt.js"),__vite__mapDeps([0,1])),Wc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{Oi=e.default})),v0}let N0=!1;function ZI(){if(N0||Oi)return;N0=!0;const e=()=>void TE(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const e6=/(^|[^\\])\$/,$i=_.memo(function({text:t,html:n=!1,streaming:i=!1}){const a=_.useMemo(()=>m3(t),[t]),u=e6.test(a),[l,c]=_.useState(()=>Oi!==null);_.useEffect(()=>{if(Oi)return;if(!u){ZI();return}let p=!0;return TE().then(()=>{p&&c(!0)}),()=>{p=!1}},[u]);const f=_.useMemo(()=>{const p=u&&Oi?[Oi]:[];return n?[NI,[FI,jI],...p]:i?[...p,zI]:p},[n,i,u,l]);return h.jsx("div",{className:"md",children:h.jsx(D_,{remarkPlugins:i3,rehypePlugins:f,components:JI,children:a})})});function Vn({open:e,children:t}){const[n,i]=_.useState(e);_.useEffect(()=>{e&&i(!0)},[e]);const a=u=>{u.target===u.currentTarget&&u.propertyName==="grid-template-rows"&&!e&&i(!1)};return h.jsx("div",{className:`collapse ${e?"is-open":""}`,onTransitionEnd:a,children:h.jsx("div",{className:"collapse-inner",children:n?t:null})})}function t6(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return A0(t.replace(/^\.\//,""));const n=w0(e),i=A0(w0(t));return i===null||i===n?null:i.startsWith(`${n}/`)?i.slice(n.length+1):null}const w0=e=>e.replace(/\/+$/,"");function A0(e){const t=e.startsWith("/"),n=[];for(const a of e.split("/"))if(!(a===""||a===".")){if(a!==".."){n.push(a);continue}if(n.length===0)return null;n.pop()}const i=n.join("/");return t?`/${i}`:i}const n6=4e5;function I0(e,t){const n=e.split(`
|
|
93
|
+
`),i=t.split(`
|
|
94
|
+
`),a=n.length,u=i.length;if(a*u>n6)return[...n.map(T=>({type:"del",text:T})),...i.map(T=>({type:"add",text:T}))];const l=Array.from({length:a+1},()=>new Array(u+1).fill(0));for(let T=a-1;T>=0;T--)for(let E=u-1;E>=0;E--)l[T][E]=n[T]===i[E]?l[T+1][E+1]+1:Math.max(l[T+1][E],l[T][E+1]);const c=[];let f=0,p=0;for(;f<a&&p<u;)n[f]===i[p]?(c.push({type:"ctx",text:n[f]}),f++,p++):l[f+1][p]>=l[f][p+1]?(c.push({type:"del",text:n[f]}),f++):(c.push({type:"add",text:i[p]}),p++);for(;f<a;)c.push({type:"del",text:n[f++]});for(;p<u;)c.push({type:"add",text:i[p++]});return c}const yE={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},r6=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function i6(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),i=n>0?t.slice(n+1):"";return r6.has(i)?"image":i==="pdf"?"pdf":i==="html"||i==="htm"?"html":i==="md"||i==="markdown"?"markdown":"text"}const s6={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown",html:"html",htm:"html",xml:"xml",css:"css",scss:"scss",less:"less",py:"python",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",kt:"kotlin",kts:"kotlin",swift:"swift",zig:"zig",lua:"lua",tex:"latex",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",dockerfile:"docker",sql:"sql",diff:"diff",patch:"diff",jsonc:"json",svg:"xml",vue:"vue",svelte:"svelte",env:"ini",proto:"proto",graphql:"graphql"};function od(e){return xE(e.trim().split("/").pop()??"")||"text"}function xE(e){const t=e.toLowerCase();if(t==="dockerfile")return"docker";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return s6[n]??""}const Ht=e=>!!e&&typeof e=="object";function da(e){switch(e.name){case"shell":return"shell";case"write":case"strReplace":return"write";case"read":return"read";case"grep":return"grep";case"todo_list":return"todo";case"web_fetch":return"webfetch";case"web_search":return"websearch";case"introspect":return"introspect"}if(e.name)return"generic";const t=Ht(e.input)?e.input:{},n=e.kind,i=typeof t.command=="string"?t.command:void 0,a=u=>Object.prototype.hasOwnProperty.call(t,u);return e.title==="todo_list"||a("tasks")||a("task_list_description")||a("completed_task_ids")||a("remove_task_ids")||i!==void 0&&["complete","add","remove","list"].includes(i)?"todo":n==="read"||Array.isArray(t.operations)||e.title==="read"?"read":e.title==="grep"||typeof t.pattern=="string"&&!a("operations")||n==="search"&&e.title!=="web_search"?"grep":n==="edit"||e.title==="write"||e.title==="strReplace"||(i==="create"||i==="strReplace"||i==="insert")&&typeof t.path=="string"||typeof t.oldStr=="string"&&typeof t.newStr=="string"?"write":n==="execute"||e.title==="shell"||typeof t.command=="string"?"shell":typeof t.url=="string"?"webfetch":typeof t.query=="string"&&(n==="search"||e.title==="web_search")?"websearch":e.title==="introspect"||typeof t.doc_path=="string"?"introspect":"generic"}const Tr=e=>typeof e=="string"?e:void 0,Rc=e=>e.split("/").pop()||e;function a6(e){if(typeof e.path=="string")return e.path;const t=Array.isArray(e.operations)?e.operations:[];for(const n of t){const i=Ht(n)?n:null;if(i&&typeof i.path=="string")return i.path;if(i&&Array.isArray(i.image_paths)&&typeof i.image_paths[0]=="string")return i.image_paths[0]}}const u6={shell:["Ran","Running"],write:["Wrote","Writing"],read:["Read","Reading"],grep:["Searched","Searching"],todo:["Updated the task list","Updating the task list"],webfetch:["Fetched","Fetching"],websearch:["Searched the web","Searching the web"],introspect:["Looked up","Looking up"],generic:["Ran a tool","Running a tool"]};function o6(e,t){const n=Ht(e.input)?e.input:null;if(n)switch(t){case"write":{const i=Tr(n.path);return i?Rc(i):void 0}case"read":{const i=a6(n);return i?Rc(i):void 0}case"grep":{const i=Tr(n.path);return Tr(n.pattern)??Tr(n.query)??(i?Rc(i):void 0)}case"introspect":return Tr(n.query)??Tr(n.doc_path);case"webfetch":{const i=Tr(n.url);if(!i)return;try{return new URL(i).hostname||i}catch{return i}}default:return}}function Zd(e,t){const n=Ht(e.input)?e.input:null,i=n?Tr(n.__tool_use_purpose):void 0;if(i)return i;const a=da(e),[u,l]=u6[a],c=o6(e,a),f=t?l:u;return c?`${f} ${c}`:a==="shell"?t?"Running a command":"Ran a command":f}const l6={shell:["ran a command",e=>`ran ${e} commands`],write:["wrote a file",e=>`wrote ${e} files`],read:["read a file",e=>`read ${e} files`],grep:["searched the code",e=>`searched the code ${e} times`],todo:["updated the task list",e=>`updated the task list ${e} times`],webfetch:["fetched a page",e=>`fetched ${e} pages`],websearch:["searched the web",e=>`searched the web ${e} times`],introspect:["looked something up",e=>`looked up ${e} things`],generic:["ran a tool",e=>`ran ${e} tools`]};function c6(e){const t=[],n=new Map;for(const u of e){const l=da(u);n.has(l)||t.push(l),n.set(l,(n.get(l)??0)+1)}const a=t.map(u=>{const l=n.get(u),[c,f]=l6[u];return l===1?c:f(l)}).join(", ");return a.charAt(0).toUpperCase()+a.slice(1)}function d6(e){return e.length>0?c6(e):"Thought"}function ei(e){const t=[];for(const n of e)Ht(n)&&(n.type==="content"&&Ht(n.content)&&typeof n.content.text=="string"?t.push(n.content.text):n.type==="text"&&typeof n.text=="string"?t.push(n.text):n.kind==="text"&&typeof n.data=="string"&&t.push(n.data));return t.join("")}function ti(e){for(const t of e)if(Ht(t)&&t.kind==="json"&&Ht(t.data))return t.data;return null}function ef(e){const t=Object.keys(e);return t.length===1&&typeof e[t[0]]=="string"?e[t[0]]:null}function f6(e){if(e==null)return[];if(typeof e=="string")return e?[{kind:"text",data:e}]:[];if(Ht(e)&&Array.isArray(e.items)){const t=[];for(const n of e.items)Ht(n)&&(typeof n.Text=="string"?t.push({kind:"text",data:n.Text}):Ht(n.Json)&&t.push({kind:"json",data:n.Json}));return t}return[]}function _r(e){return[...Array.isArray(e.content)?e.content:[],...f6(e.output)]}function h6(e){for(const t of e)if(Ht(t)&&t.type==="diff"&&typeof t.oldText=="string"&&typeof t.newText=="string")return{path:typeof t.path=="string"?t.path:void 0,oldText:t.oldText,newText:t.newText};return null}function p6(e){let t=ti(e);if(!t||!Array.isArray(t.tasks)){const n=ei(e).trim();if(n.startsWith("{"))try{const i=JSON.parse(n);t=Ht(i)?i:null}catch{t=null}}return t&&Array.isArray(t.tasks)?t.tasks.map(n=>{const i=Ht(n)?n:{};return{desc:typeof i.task_description=="string"?i.task_description:"",done:i.completed===!0}}):null}const m6="show_widget";function bE(e){var a;if(!((a=e.name)!=null&&a.endsWith(m6)))return null;const t=e.input??{},n=typeof t.widget_code=="string"?t.widget_code:"";return{title:typeof t.title=="string"?t.title:"",code:n}}function g6(e){return e.replace(/_/g," ").trim()}function kE(e){var u;if(!((u=e.name)!=null&&u.endsWith("show_choice")))return null;const t=e.input??{},n=typeof t.question=="string"?t.question.trim():"",i=Array.isArray(t.options)?t.options:[],a=[];for(const l of i){const c=l??{},f=typeof c.label=="string"&&c.label.trim()?c.label:"";if(!f)continue;const p=typeof c.detail=="string"&&c.detail.trim()?c.detail:void 0,T=typeof c.prompt=="string"&&c.prompt.trim()?c.prompt:f;a.push({label:f,detail:p,prompt:T})}return!n||a.length<2?null:{question:n,options:a}}function E6(e,t){if(t===null)return{picked:null,superseded:!1};const n=e.find(i=>i.prompt.trim()===t.trim());return n?{picked:n.label,superseded:!1}:{picked:null,superseded:!0}}function CE(e){return e.name===cg}function T6(e){var a;const{items:t,pending:n}=ge.getState(),i=t.findIndex(u=>u.type==="tool_call"&&u.tool.id===e);if(i===-1)return null;for(const u of t.slice(i+1))if(u.type==="message"&&u.message.role==="user")return u.message.text;return((a=n[0])==null?void 0:a.text)??null}function y6({data:e,toolId:t}){const n=ge(E=>E.items),i=ge(E=>E.pending),a=ge(wd),[u,l]=_.useState(null),c=E6(e.options,n.length||i.length?T6(t):null),f=u??c.picked,p=f!==null||c.superseded,T=E=>{p||!a||Eg(E.prompt)&&l(E.label)};return h.jsxs("div",{className:"tpl-choice",children:[h.jsx("p",{className:"tpl-choice-q",children:e.question}),h.jsx("div",{className:"tpl-choice-opts",children:e.options.map(E=>{const b=f===E.label;return h.jsxs("button",{className:`tpl-choice-opt${b?" is-picked":""}`,onClick:()=>T(E),disabled:p||!a,"aria-pressed":b,children:[h.jsx("span",{className:"tpl-choice-label",children:E.label}),E.detail&&h.jsx("span",{className:"tpl-choice-detail",children:E.detail})]},E.label)})})]})}const x6=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function b6(){const e=x6.join(" ");return["default-src 'none'",`script-src 'unsafe-inline' ${e}`,`style-src 'unsafe-inline' ${e} https://fonts.googleapis.com`,"img-src data: blob: https:","font-src data: https:",`connect-src ${e}`].join("; ")}const k6=`
|
|
95
|
+
(function () {
|
|
96
|
+
var parent = window.parent;
|
|
97
|
+
var root = document.getElementById('root');
|
|
98
|
+
var last = null;
|
|
99
|
+
var scripted = false;
|
|
100
|
+
|
|
101
|
+
function post(msg) { parent.postMessage(msg, '*'); }
|
|
102
|
+
|
|
103
|
+
window.casper = {
|
|
104
|
+
sendPrompt: function (text) {
|
|
105
|
+
if (typeof text !== 'string' || !text.trim()) return;
|
|
106
|
+
post({ type: 'casper:prompt', text: text.slice(0, 4000) });
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// Guards against a second pass replacing nodes a widget's scripts are already driving.
|
|
111
|
+
function setContent(html) {
|
|
112
|
+
if (!root) root = document.getElementById('root');
|
|
113
|
+
if (!root || html === last) return;
|
|
114
|
+
last = html;
|
|
115
|
+
root.innerHTML = html;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// innerHTML leaves scripts inert; recreating them runs them. One at a time,
|
|
119
|
+
// waiting on anything with a src, or running them all at once risks
|
|
120
|
+
// "X is not defined" from a library that hasn't loaded yet.
|
|
121
|
+
function runScripts() {
|
|
122
|
+
if (scripted) return;
|
|
123
|
+
scripted = true;
|
|
124
|
+
var list = [].slice.call(root.querySelectorAll('script'));
|
|
125
|
+
var index = 0;
|
|
126
|
+
|
|
127
|
+
function next() {
|
|
128
|
+
if (index >= list.length) return;
|
|
129
|
+
var old = list[index++];
|
|
130
|
+
var fresh = document.createElement('script');
|
|
131
|
+
for (var a = 0; a < old.attributes.length; a++) {
|
|
132
|
+
fresh.setAttribute(old.attributes[a].name, old.attributes[a].value);
|
|
133
|
+
}
|
|
134
|
+
fresh.textContent = old.textContent;
|
|
135
|
+
var external = Boolean(old.getAttribute('src'));
|
|
136
|
+
if (external) {
|
|
137
|
+
fresh.async = false;
|
|
138
|
+
var moved = false;
|
|
139
|
+
var advance = function () {
|
|
140
|
+
if (moved) return;
|
|
141
|
+
moved = true;
|
|
142
|
+
next();
|
|
143
|
+
};
|
|
144
|
+
fresh.onload = advance;
|
|
145
|
+
fresh.onerror = advance;
|
|
146
|
+
// A CDN that never answers shouldn't strand the rest of the widget.
|
|
147
|
+
setTimeout(advance, 10000);
|
|
148
|
+
}
|
|
149
|
+
old.parentNode.replaceChild(fresh, old);
|
|
150
|
+
if (!external) next();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
next();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
var lastHeight = 0;
|
|
157
|
+
|
|
158
|
+
// Off #root rather than the document: in a frame the html box reports the
|
|
159
|
+
// viewport size the host already chose, not the content's. +2px absorbs
|
|
160
|
+
// fractional layout heights that otherwise leave a scrollbar.
|
|
161
|
+
function contentHeight() {
|
|
162
|
+
if (!root) root = document.getElementById('root');
|
|
163
|
+
var bottom = 0;
|
|
164
|
+
if (root) {
|
|
165
|
+
var box = root.getBoundingClientRect();
|
|
166
|
+
bottom = box.top + Math.max(root.scrollHeight, box.height);
|
|
167
|
+
}
|
|
168
|
+
var body = document.body ? document.body.scrollHeight : 0;
|
|
169
|
+
return Math.ceil(Math.max(bottom, body)) + 2;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function reportHeight() {
|
|
173
|
+
var h = contentHeight();
|
|
174
|
+
if (h !== lastHeight) { lastHeight = h; post({ type: 'casper:height', height: h }); }
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (window.ResizeObserver) {
|
|
178
|
+
var ro = new ResizeObserver(reportHeight);
|
|
179
|
+
ro.observe(document.documentElement);
|
|
180
|
+
if (root) ro.observe(root);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Canvases and late fonts resize without tripping ResizeObserver, so poll too,
|
|
184
|
+
// briefly after content settles - a transcript full of widgets polling forever
|
|
185
|
+
// would read layout dozens of times a second.
|
|
186
|
+
var poll = null;
|
|
187
|
+
function pollHeight(ms) {
|
|
188
|
+
if (poll) clearInterval(poll);
|
|
189
|
+
var until = Date.now() + ms;
|
|
190
|
+
poll = setInterval(function () {
|
|
191
|
+
reportHeight();
|
|
192
|
+
if (Date.now() > until) { clearInterval(poll); poll = null; }
|
|
193
|
+
}, 250);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
window.addEventListener('message', function (e) {
|
|
197
|
+
if (e.source !== parent) return;
|
|
198
|
+
var d = e.data;
|
|
199
|
+
if (!d || typeof d !== 'object') return;
|
|
200
|
+
if (d.type === 'casper:theme') {
|
|
201
|
+
document.getElementById('theme').textContent = ':root{' + d.css + '}';
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (d.type !== 'casper:html') return;
|
|
205
|
+
setContent(d.html);
|
|
206
|
+
reportHeight();
|
|
207
|
+
runScripts();
|
|
208
|
+
pollHeight(4000);
|
|
209
|
+
});
|
|
210
|
+
})();
|
|
211
|
+
`,C6=`
|
|
212
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
213
|
+
html, body { margin: 0; padding: 0; background: transparent; }
|
|
214
|
+
/* The host sizes the frame to fit, so a scrollbar in here is always a measuring
|
|
215
|
+
error rather than something to scroll. */
|
|
216
|
+
html { overflow: hidden; }
|
|
217
|
+
body {
|
|
218
|
+
font-family: var(--font-body, system-ui, sans-serif);
|
|
219
|
+
font-size: 14px;
|
|
220
|
+
line-height: 1.5;
|
|
221
|
+
color: var(--color-text-primary, #f8f8f2);
|
|
222
|
+
overflow-x: hidden;
|
|
223
|
+
}
|
|
224
|
+
#root { overflow-x: hidden; }
|
|
225
|
+
a { color: var(--color-accent, #bd93f9); }
|
|
226
|
+
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
227
|
+
::-webkit-scrollbar-thumb { background: var(--color-border, #44475a); border-radius: 4px; }
|
|
228
|
+
`;function S6(){return`<!doctype html>
|
|
229
|
+
<html>
|
|
230
|
+
<head>
|
|
231
|
+
<meta charset="utf-8">
|
|
232
|
+
<meta http-equiv="Content-Security-Policy" content="${b6()}">
|
|
233
|
+
<meta name="color-scheme" content="dark">
|
|
234
|
+
<style>${C6}</style>
|
|
235
|
+
<style id="theme"></style>
|
|
236
|
+
</head>
|
|
237
|
+
<body><div id="root"></div>
|
|
238
|
+
<!-- Runtime last: it grabs #root on the way in, so the element has to exist. -->
|
|
239
|
+
<script>${k6}<\/script>
|
|
240
|
+
</body>
|
|
241
|
+
</html>`}const _6=S6(),v6=256*1024;function N6(){const e=getComputedStyle(document.documentElement),t=n=>e.getPropertyValue(n).trim();return[`--color-background-primary:${t("--n0")}`,`--color-background-secondary:${t("--n1")}`,`--color-border:${t("--n2")}`,`--color-text-secondary:${t("--n4")}`,`--color-text-primary:${t("--n5")}`,`--color-accent:${t("--frost")}`,`--color-accent-alt:${t("--aurora-purple")}`,`--color-teal:${t("--frost-teal")}`,`--color-green:${t("--aurora-green")}`,`--color-yellow:${t("--aurora-yellow")}`,`--color-orange:${t("--aurora-orange")}`,`--color-red:${t("--aurora-red")}`,`--font-body:${t("--font-body")}`,`--font-mono:${t("--font-mono")}`].join(";")}function w6({code:e}){const t=_.useRef(null),[n,i]=_.useState(!1),[a,u]=_.useState(120),l=e.length>v6;_.useEffect(()=>{const f=t.current;if(!f)return;const p=T=>{if(T.source!==f.contentWindow)return;const E=T.data;(E==null?void 0:E.type)==="casper:height"&&typeof E.height=="number"?u(Math.min(Math.max(E.height,40),2e3)):(E==null?void 0:E.type)==="casper:prompt"&&typeof E.text=="string"&&Eg(E.text)};return window.addEventListener("message",p),()=>window.removeEventListener("message",p)},[]),_.useEffect(()=>{var f,p;n&&((p=(f=t.current)==null?void 0:f.contentWindow)==null||p.postMessage({type:"casper:theme",css:N6()},"*"))},[n]),_.useEffect(()=>{var f,p;!n||l||(p=(f=t.current)==null?void 0:f.contentWindow)==null||p.postMessage({type:"casper:html",html:e.trimStart()},"*")},[e,n,l]);const c=()=>i(!0);return l?h.jsxs("div",{className:"widget-error",children:["Widget is ",Math.round(e.length/1024)," KB, too large to render."]}):h.jsx("div",{className:"widget-wrap",style:{height:a},children:h.jsx("iframe",{ref:t,className:"widget-frame",title:"Widget",sandbox:"allow-scripts",srcDoc:_6,onLoad:c})})}function SE(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const A6=new Intl.NumberFormat(void 0,{maximumFractionDigits:2});function _E(e){return e>0&&e<.01?"<0.01":A6.format(e)}function I6(e){return!bE(e)&&!kE(e)&&!CE(e)}function L6(e){return e.type==="tool_call"&&I6(e.tool)?{type:"tool",item:e,tool:e.tool}:e.type==="message"&&e.message.role==="thinking"?{type:"thought",item:e,text:e.message.text}:null}function vE(e){const t=[];let n=[];const i=()=>{n.length===1?t.push(n[0]):n.length>1&&t.push({type:"run",members:n}),n=[]};for(const a of e){const u=L6(a);if(u){n.push(u);continue}i(),t.push({type:"other",item:a})}return i(),t}function NE(e){return e?e.type==="run"||e.type==="tool"||e.type==="thought":!1}function wE({entries:e,lastActive:t,streamingThought:n="",arrivedLive:i=()=>!1,chatId:a,onOpenFile:u,readOnly:l=!1}){const c=_.useMemo(()=>{const f=new Map;for(const p of e)p.type==="run"&&f.set(p,p.members.map(Oc));return f},[e]);return h.jsx(h.Fragment,{children:e.map((f,p)=>{const T=p===e.length-1,E=T&&t,b=T&&n&&NE(f)?n:void 0;if(f.type==="run"){const C=f.members[0],v=C.type==="tool"?C.tool.id:C.item.message.id,D=f.members.some(I=>I.type==="tool"&&i(I.tool.id));return h.jsx(Mc,{rows:c.get(f),liveThought:b,arriving:D,active:E},v)}if(f.type==="tool")return b!==void 0?h.jsx(Mc,{rows:[Oc(f)],liveThought:b,arriving:i(f.tool.id),active:E},f.tool.id):h.jsx(j0,{tool:f.tool,arriving:i(f.tool.id),active:E},f.tool.id);if(f.type==="thought")return b!==void 0?h.jsx(Mc,{rows:[Oc(f)],liveThought:b},f.item.message.id):h.jsx(dd,{text:f.text,live:E},f.item.message.id);const x=f.item;return x.type==="message"?x.message.role==="thinking"?h.jsx(dd,{text:x.message.text,live:T&&t},x.message.id):x.message.role==="assistant"?h.jsx("div",{className:"msg msg-assistant",children:h.jsx($i,{text:x.message.text})},x.message.id):h.jsx(R6,{message:x.message,chatId:a,onOpenFile:u,readOnly:l},x.message.id):x.type==="tool_call"?h.jsx(j0,{tool:x.tool,arriving:i(x.tool.id)},x.tool.id):x.type==="turn_error"?h.jsx(L0,{id:x.id,message:x.message,readOnly:l},x.id):x.type==="turn_interrupted"?h.jsx(L0,{id:x.id,readOnly:l},x.id):x.type==="turn_stats"?h.jsx(D6,{elapsedMs:x.elapsedMs,credits:x.credits},x.id):h.jsx(P6,{summary:x.summary},x.id)})})}function R6({message:e,chatId:t,onOpenFile:n,readOnly:i}){const[a,u]=_.useState(!1),[l,c]=_.useState(e.text),[f,p]=_.useState(!1),T=ge(R=>wd(R)&&R.pending.length===0),E=_.useRef(null),b=e.messageId,x=!i&&!!(t&&b);_.useEffect(()=>{if(!a)return;const R=E.current;R&&(R.focus(),R.setSelectionRange(R.value.length,R.value.length))},[a]),_.useEffect(()=>{const R=E.current;!a||!R||(R.style.height="auto",R.style.height=`${Math.min(R.scrollHeight,320)}px`)},[a,l]);const C=e.attachments??[],v=T&&!f&&(l.trim().length>0||C.length>0),D=async()=>{if(!b||!v)return;p(!0),await Ye.editPrompt(b,l,C)||p(!1)},I=async()=>{!b||f||(p(!0),await Ye.branchFrom(b),p(!1))};return h.jsxs("div",{className:`msg-user-wrap${a?" is-editing":""}`,children:[h.jsxs("div",{className:`msg msg-user${a?" is-editing":""}`,children:[t&&C.length>0&&h.jsx(AE,{chatId:t,attachments:C,onOpen:n}),a?h.jsxs("div",{className:"msg-edit",children:[h.jsx("textarea",{ref:E,className:"msg-edit-input","aria-label":"Edit message",value:l,rows:1,onChange:R=>c(R.target.value),onKeyDown:R=>{R.key==="Escape"?(R.preventDefault(),u(!1),c(e.text)):R.key==="Enter"&&!R.shiftKey&&!R.nativeEvent.isComposing&&(R.preventDefault(),D())}}),h.jsxs("div",{className:"msg-edit-actions",children:[h.jsx("button",{type:"button",className:"btn-sm btn-ghost",onClick:()=>{u(!1),c(e.text)},children:"Cancel"}),h.jsx("button",{type:"button",className:"btn-sm btn-primary",disabled:!v,onClick:()=>void D(),children:f?"Sending…":"Send"})]})]}):e.text&&h.jsx("div",{className:"msg-user-text",children:e.text})]}),x&&!a&&h.jsxs("div",{className:"msg-user-actions",children:[h.jsx("button",{type:"button",className:"msg-action","aria-label":"Edit message",title:"Edit message",disabled:!T||f,onClick:()=>{c(e.text),u(!0)},children:h.jsx(Z2,{size:14})}),h.jsx("button",{type:"button",className:"msg-action","aria-label":"Branch from here",title:"Branch from here: a new chat with the conversation up to this message's reply",disabled:!T||f,onClick:()=>void I(),children:h.jsx(eb,{size:14})})]})]})}function AE({chatId:e,attachments:t,onOpen:n}){return h.jsx("div",{className:"msg-attachments",children:t.map(i=>i.kind==="image"?h.jsx("a",{href:qe.previewUrl(e,i.path),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:h.jsx("img",{src:qe.previewUrl(e,i.path),alt:i.name,className:"msg-image",...yE})},i.path):h.jsxs("button",{type:"button",className:"msg-file",title:i.path,onClick:()=>n(i.path),children:[h.jsx(bg,{size:14}),h.jsx("span",{className:"msg-file-name",children:i.name}),h.jsx("span",{className:"msg-file-size",children:SE(i.size)})]},i.path))})}function Oc(e){return e.type==="tool"?{kind:"tool",tool:e.tool}:{kind:"thought",text:e.text}}function O6(e,t,n){if(t>0)return!0;for(let i=e.length-1;i>=0;i--){const a=e[i];if((a.type==="turn_error"||a.type==="turn_interrupted")&&a.id===n)return!1;if(a.type==="message"&&a.message.role==="user")return!0}return!1}function L0({id:e,message:t,readOnly:n=!1}){const i=t!==void 0,[a,u]=_.useState(!1),[l,c]=_.useState(!1),f=i?hg(t):null,p=ge(x=>!n&&O6(x.items,x.pending.length,e)),T=ge(x=>{for(let C=x.items.length-1;C>=0;C--){const v=x.items[C];if(v.type==="message"&&v.message.role==="user"&&!v.message.steer)return v.message.text}return""});if(p&&!i)return null;const E=()=>{var x;(x=navigator.clipboard)==null||x.writeText(t??"").then(()=>{c(!0),setTimeout(()=>c(!1),1500)},()=>{})},b=!!T&&!n&&!p;return h.jsxs("div",{className:`turn-end${i?" is-failed":""}${p?" is-settled":""}`,role:"status",children:[h.jsxs("div",{className:"turn-end-row",children:[h.jsx("span",{className:"turn-end-icon",children:i?h.jsx(Ad,{size:16}):h.jsx(B2,{size:16})}),h.jsx("span",{className:"turn-end-text",children:f?f.title:"Casper's response was interrupted"}),h.jsxs("span",{className:"turn-end-actions",children:[i&&h.jsxs("button",{className:"btn-sm btn-ghost",onClick:()=>u(x=>!x),"aria-expanded":a,children:[a?"Hide details":"Details",h.jsx("span",{className:`toolline-chevron ${a?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),b&&h.jsxs("button",{className:"btn-sm",onClick:()=>Ye.retryTurn(T),children:[h.jsx(Tg,{size:13}),"Retry"]})]})]}),i&&h.jsx(Vn,{open:a,children:h.jsxs("div",{className:"turn-end-body",children:[(f==null?void 0:f.fix)&&h.jsx("p",{className:"turn-end-fix",children:f.fix}),h.jsx("pre",{className:"turn-end-raw",children:t}),h.jsx("button",{className:"btn-sm",onClick:E,children:l?"Copied":"Copy details"})]})})]})}function D6({elapsedMs:e,credits:t}){const n=[...e?[e<1e4?`${(e/1e3).toFixed(1)}s`:Yu(e/1e3)]:[],...t?[`${_E(t)} credits`]:[]];return n.length===0?null:h.jsx("div",{className:"turn-stats",children:n.join(" · ")})}function P6({summary:e}){const[t,n]=_.useState(!1);return h.jsxs("div",{className:"compaction",children:[h.jsx("div",{className:"compaction-rule",children:h.jsxs("button",{className:"compaction-head",onClick:()=>n(i=>!i),"aria-expanded":t,children:[h.jsx(Q2,{size:14,className:"compaction-icon"}),h.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),h.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&h.jsx("div",{className:"compaction-body",children:h.jsx($i,{text:e})})]})}function M6(e){const t=e.input;return typeof(t==null?void 0:t.name)=="string"?[{name:t.name}]:[]}function Dc(e){if(!e.createdAt)return 0;const n=(e.status==="working"||!e.updatedAt?Date.now():new Date(e.updatedAt).getTime())-new Date(e.createdAt).getTime();return n>0?n/1e3:0}function R0(e,t){const n=e.filter(u=>u.status==="completed"||u.status==="failed").length,i=e.length;return t?`Running ${i} ${i===1?"subagent":"subagents"}, ${n} done`:i===1?"Ran 1 subagent":`Ran ${i} subagents`}function F6({tool:e}){const t=ge(v=>v.activeId),n=ge(v=>v.subagents),i=ge(v=>v.setSubagents),a=_.useMemo(()=>M6(e),[e]),u=_.useMemo(()=>n.filter(v=>v.toolCallId===e.id),[n,e.id]),l=u.some(v=>v.status==="working"||v.status==="pending"),[c,f]=_.useState(e.status==="in_progress"||l);_.useEffect(()=>{l&&f(!0)},[l]);const[p,T]=_.useState("loading");_.useEffect(()=>{if(!t)return;let v=!0;return j6(t).then(D=>{v&&(i(D.subagents),T("loaded"))}).catch(()=>{v&&T("failed")}),()=>{v=!1}},[c,t,i]);const[E,b]=_.useState(null),x=e.status==="in_progress";if(p==="loaded"&&u.length===0&&!x)return null;const C=u.length>0?R0(u,l):a.length>0?R0(a.map(v=>({sessionId:v.name,stageName:v.name,status:x?"pending":"completed",createdAt:"",updatedAt:""})),x):x?"Running subagents":"Ran subagents";return h.jsxs("div",{className:"toolline-wrap",children:[h.jsxs("button",{className:"toolline",onClick:()=>f(v=>!v),"aria-expanded":c,children:[h.jsx("span",{className:`toolline-text ${l?"is-live":""}`,children:C}),h.jsx("span",{className:`toolline-chevron ${c?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),h.jsx(Vn,{open:c,children:h.jsx("div",{className:"toolline-box",children:u.length>0?u.map(v=>h.jsx(U6,{chatId:t,subagent:v,open:E===v.sessionId,onToggle:()=>b(D=>D===v.sessionId?null:v.sessionId)},v.sessionId)):p!=="failed"&&a.length>0?a.map(v=>h.jsx("div",{className:"toolline-row",children:h.jsxs("div",{className:"agent-row",children:[h.jsx("span",{className:"agent-dot"}),h.jsx("span",{className:"agent-name",children:v.name}),h.jsx("span",{className:"agent-what is-live",children:"Loading"})]})},v.name)):h.jsx("div",{className:"toolline-row",children:h.jsx("div",{className:"agent-row",children:h.jsx("span",{className:`agent-what ${p==="failed"?"":"is-live"}`,children:p==="failed"?"Couldn't load the subagents.":"Loading"})})})})})]})}const Pc=new Map;function j6(e){let t=Pc.get(e);return t||(t=qe.subagents(e).finally(()=>Pc.delete(e)),Pc.set(e,t)),t}function B6(e){return e.status==="completed"?"Done":e.status==="failed"?e.activity??"Failed":e.activity??"Working"}function U6({chatId:e,subagent:t,open:n,onToggle:i}){const a=t.status==="working",[u,l]=_.useState(()=>Dc(t));return _.useEffect(()=>{if(l(Dc(t)),!a)return;const c=setInterval(()=>l(Dc(t)),1e3);return()=>clearInterval(c)},[a,t]),h.jsxs("div",{className:"toolline-row",children:[h.jsxs("button",{className:"agent-row",onClick:i,"aria-expanded":n,children:[h.jsx("span",{className:`agent-dot agent-dot-${t.status}`}),h.jsx("span",{className:"agent-name",children:t.stageName}),h.jsx("span",{className:`agent-what ${a?"is-live":""}`,children:B6(t)}),h.jsx("span",{className:"agent-time",children:t.status==="pending"?"":Yu(u)})]}),h.jsx(Vn,{open:n,children:h.jsx("div",{className:"agent-detail",children:e&&h.jsx($6,{chatId:e,subagentId:t.sessionId,live:a,elapsed:Yu(u)})})})]})}const O0=6,D0=40,H6=3e3;function z6(e){const t=e.filter(u=>u.type==="message"&&u.message.role==="assistant").length,n=e.filter(u=>u.type==="tool_call").length,i=t===1?"1 message":`${t} messages`,a=n===1?"1 tool call":`${n} tool calls`;return`${i} and ${a}`}function $6({chatId:e,subagentId:t,live:n,elapsed:i}){const a=ge(W=>W.openFilePreview),[u,l]=_.useState(null),[c,f]=_.useState(!1),[p,T]=_.useState(null),[E,b]=_.useState(O0);_.useEffect(()=>{let W=!0;const q=()=>qe.subagentDetail(e,t).then(ie=>{W&&l(ie.transcript)}).catch(()=>{W&&f(!0)});if(q(),!n)return()=>void(W=!1);const B=setInterval(q,H6);return()=>{W=!1,clearInterval(B)}},[e,t,n]);const x=u==null?void 0:u.at(-1),C=!n&&(x==null?void 0:x.type)==="message"&&x.message.role==="assistant"?x:void 0,v=_.useMemo(()=>u?C?u.slice(0,-1):u:[],[u,C]),D=_.useMemo(()=>vE(v),[v]);if(c)return h.jsx("div",{className:"agent-note",children:"Couldn't load this subagent's transcript."});if(u===null)return h.jsx("div",{className:"agent-note",children:"Loading…"});const I=p??n,R=D.slice(-E),H=D.length-R.length;return h.jsxs("div",{className:"agent-transcript",children:[C&&h.jsx("div",{className:"msg msg-assistant",children:h.jsx($i,{text:C.message.text})}),D.length>0&&h.jsxs("div",{children:[h.jsxs("button",{className:"toolline",onClick:()=>T(!I),"aria-expanded":I,children:[h.jsxs("span",{className:"toolline-text",children:[z6(u)," ",n?"so far":`over ${i}`]}),h.jsx("span",{className:`toolline-chevron ${I?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),h.jsx(Vn,{open:I,children:h.jsxs("div",{className:`agent-steps ${E>O0?"is-paged":""}`,children:[H>0&&h.jsxs("button",{className:"agent-earlier",onClick:()=>{T(!0),b(W=>W+D0)},children:["Show ",Math.min(D0,H)," earlier of ",H]}),h.jsx(wE,{entries:R,lastActive:n,chatId:e,onOpenFile:a,readOnly:!0})]})})]})]})}const W6=_.memo(F6),Nt=e=>e&&typeof e=="object"?e:null,Ve=e=>typeof e=="string"?e:void 0,Y6=/\.(png|jpe?g|gif|webp|bmp|svg)$/i;function ld(e){const t=Nt(e.input);if(!t)return[];if(!Array.isArray(t.operations)){const i=Ve(t.path);return i&&Y6.test(i)&&da(e)==="read"?[i]:[]}const n=[];for(const i of t.operations){const a=Nt(i);if(a&&a.mode==="Image"&&Array.isArray(a.image_paths))for(const u of a.image_paths)typeof u=="string"&&n.push(u)}return n}const cd=e=>`/api/fs/file?path=${encodeURIComponent(e)}`,P0=new Map;function V6(e){let t=P0.get(e);return t||(t=fetch(cd(e),{method:"HEAD"}).then(n=>n.ok&&(n.headers.get("content-type")??"").startsWith("image/")).catch(()=>!1),P0.set(e,t)),t}function q6(e){const t=e.join(`
|
|
242
|
+
`),[n,i]=_.useState(null);return _.useEffect(()=>{if(!t)return;let a=!1;const u=t.split(`
|
|
243
|
+
`);return Promise.all(u.map(V6)).then(l=>{a||i({key:t,paths:u.filter((c,f)=>l[f])})}),()=>{a=!0}},[t]),t?(n==null?void 0:n.key)===t?n.paths:null:[]}function IE(e){const t=ld(e),n=q6(t),i=n??t,a=Z6(e),u=t.length>0&&n!==null&&n.length===0&&a==null;return{images:i,body:a,hidden:u}}function Q6({tool:e,arriving:t,active:n}){if(CE(e))return h.jsx(W6,{tool:e});const i=bE(e);if(i)return e.status==="failed"?h.jsxs("div",{className:"widget-error",children:["Widget ",g6(i.title)||"call"," failed."]}):i.code?h.jsx(w6,{code:i.code}):null;const a=kE(e);return a?h.jsx(y6,{data:a,toolId:e.id}):h.jsx(G6,{tool:e,arriving:t,active:n})}function LE({paths:e}){return e.length===0?null:h.jsx("div",{className:"toolcall-images",children:e.map(t=>h.jsx("a",{href:cd(t),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:h.jsx("img",{src:cd(t),alt:t.split("/").pop()??"image",className:"toolcall-image",...yE})},t))})}function G6({tool:e,arriving:t=!1,active:n=!1}){const i=e.status,[a,u]=_.useState(!1),{images:l,body:c,hidden:f}=IE(e),p=c!=null||l.length>0;return f?null:h.jsxs("div",{className:`toolline-wrap ${t?"is-arriving":""}`,children:[h.jsx(fa,{text:Zd(e,i==="in_progress"),detail:OE(e),live:i==="in_progress"||n&&i!=="failed",failed:i==="failed",open:a,onToggle:p?()=>u(T=>!T):void 0}),p&&h.jsx(Vn,{open:a,children:h.jsxs("div",{className:"toolcall-body",children:[h.jsx(LE,{paths:l}),c]})})]})}function fa({text:e,detail:t,live:n,failed:i,open:a,onToggle:u}){const l=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:`toolline-text ${n?"is-live":""}`,children:e}),t&&h.jsx("span",{className:"toolline-detail",children:t}),u&&h.jsx("span",{className:`toolline-chevron ${a?"is-open":""}`,children:h.jsx(kr,{size:13})})]}),c=`toolline ${i?"is-failed":""}`;return u?h.jsx("button",{className:c,onClick:u,"aria-expanded":a,children:l}):h.jsx("div",{className:c,children:l})}function K6({rows:e,liveThought:t,arriving:n=!1,active:i=!1}){const[a,u]=_.useState(!1),l=e.flatMap(T=>T.kind==="tool"?[T.tool]:[]),c=l.find(T=>T.status==="in_progress"),f=c?Zd(c,!0):t!==void 0?"Thinking":d6(l),p=!!c||t!==void 0||i;return h.jsxs("div",{className:`toolline-wrap ${n?"is-arriving":""}`,children:[h.jsx(fa,{text:f,live:p,failed:!1,open:a,onToggle:()=>u(T=>!T)}),h.jsx(Vn,{open:a,children:h.jsx("div",{className:"toolline-box",children:[...e.map((T,E)=>T.kind==="tool"?h.jsx(X6,{tool:T.tool},T.tool.id):h.jsx(M0,{text:T.text},`thought-${E}`)),...t!==void 0?[h.jsx(M0,{text:t,live:!0},`thought-${e.length}`)]:[]]})})]})}function X6({tool:e}){const t=e.status,[n,i]=_.useState(!1),{images:a,body:u,hidden:l}=IE(e),c=u!=null||a.length>0;return l?null:h.jsxs("div",{className:"toolline-row",children:[h.jsx(fa,{text:Zd(e,t==="in_progress"),detail:OE(e),live:t==="in_progress",failed:t==="failed",open:n,onToggle:c?()=>i(f=>!f):void 0}),c&&h.jsx(Vn,{open:n,children:h.jsxs("div",{className:"toolcall-body",children:[h.jsx(LE,{paths:a}),u]})})]})}function M0({text:e,live:t=!1}){const[n,i]=_.useState(!1);return!t&&!e.trim()?null:h.jsxs("div",{className:"toolline-row",children:[h.jsx(fa,{text:"Thinking",live:t,failed:!1,open:n,onToggle:()=>i(a=>!a)}),h.jsx(Vn,{open:n,children:h.jsx("div",{className:"toolcall-body",children:h.jsx("div",{className:"thought-text",children:e})})})]})}function J6({text:e,live:t=!1,arriving:n=!1}){const[i,a]=_.useState(!1);return!t&&!e.trim()?null:h.jsxs("div",{className:`toolline-wrap ${n?"is-arriving":""}`,children:[h.jsx(fa,{text:"Thinking",live:t,failed:!1,open:i,onToggle:()=>a(u=>!u)}),h.jsx(Vn,{open:i,children:h.jsx("div",{className:"toolcall-body",children:h.jsx("div",{className:"thought-text",children:e})})})]})}function Z6(e){switch(da(e)){case"shell":return e4(e);case"write":return t4(e);case"read":return r4(e);case"grep":return i4(e);case"todo":return s4(e);case"webfetch":return u4(e);case"websearch":return l4(e);case"introspect":return a4(e);default:return vr(e)}}function e4(e){const t=Nt(e.input),n=Ve(t==null?void 0:t.command)??"",i=_r(e),a=ti(i),u=a?Ve(a.stdout)??"":ei(i),l=a?Ve(a.stderr)??"":"",c=a?String(a.exit_status??""):"",f=c!==""&&!/\b0$/.test(c);return h.jsxs("div",{className:"shell-panel",children:[n&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shell-label",children:"bash"}),h.jsx(un,{code:n,lang:"bash"})]}),u.trim()&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shell-label",children:"Output"}),h.jsx(un,{code:u,lang:"text"})]}),l.trim()&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"shell-label",children:"Errors"}),h.jsx(un,{code:l,lang:"text"})]}),f&&h.jsx("div",{className:"toolcall-exit",children:c})]})}function RE({path:e}){const t=ge(l=>l.activeId),n=ge(l=>{var c;return((c=l.chats.find(f=>f.chatId===l.activeId))==null?void 0:c.cwd)??""}),i=ge(l=>l.openFilePreview),a=t?t6(n,e):null,u=a??e;return a?h.jsx("div",{className:"toolcall-file",children:h.jsx("button",{className:"toolcall-file-name",onClick:()=>i(a),title:`Preview ${e}`,children:u})}):h.jsx("div",{className:"toolcall-file",title:e,children:h.jsx("span",{className:"toolcall-file-name is-plain",children:u})})}function t4(e){const t=Nt(e.input),n=Ve(t==null?void 0:t.path)??"",i=p=>n?h.jsxs(h.Fragment,{children:[h.jsx(RE,{path:n}),p]}):p,a=Ve(t==null?void 0:t.command);if(a==="create"||a==="insert"){const p=Ve(t==null?void 0:t.content);if(p!==void 0)return i(h.jsx(un,{code:p,lang:od(n)}))}const u=Ve(t==null?void 0:t.oldStr),l=Ve(t==null?void 0:t.newStr);if(u!==void 0&&l!==void 0)return i(h.jsx(F0,{diff:I0(u,l)}));const c=h6(e.content);if(c)return i(h.jsx(F0,{diff:I0(c.oldText,c.newText)}));const f=Ve(t==null?void 0:t.text);return i(f!==void 0?h.jsx(un,{code:f,lang:od(n)}):vr(e))}function n4(e){const t=/^\s*<file\b[^>]*>\s*<content>\n?([\s\S]*?)\n?<\/content>\s*<\/file>\s*$/.exec(e);return t?t[1]:e}function r4(e){const t=Nt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],i=ei(_r(e));if(!n.length&&ld(e).length>0)return null;if(!i.trim())return ld(e).length>0?null:vr(e);const a=n.map(Nt).find(f=>f&&f.mode!=="Image"),u=a?void 0:Ve(t==null?void 0:t.path),l=u??(a&&typeof a.path=="string"?a.path:""),c=(a==null?void 0:a.mode)==="Line"||u?od(l):"text";return h.jsxs(h.Fragment,{children:[l&&h.jsx(RE,{path:l}),h.jsx(un,{code:u?n4(i):i,lang:c})]})}function i4(e){const t=_r(e),n=ti(t),i=n&&Array.isArray(n.results)?n.results.filter(u=>{const l=Nt(u);return!!l&&(Array.isArray(l.matches)||typeof l.file=="string")}):null;if(i&&i.length>0)return h.jsx("div",{className:"grep",children:i.map((u,l)=>{const c=Nt(u),f=c&&typeof c.file=="string"?c.file:"",p=c&&Array.isArray(c.matches)?c.matches.map(String):[];return h.jsxs("div",{className:"grep-file",children:[h.jsx("div",{className:"grep-fname",children:f}),h.jsx("pre",{className:"grep-matches",children:p.join(`
|
|
244
|
+
`)})]},l)})});const a=ei(t);return a.trim()?h.jsx(un,{code:a,lang:"text"}):vr(e)}function s4(e){const t=p6(_r(e));return t?t.length===0?h.jsx("div",{className:"todo-empty",children:"All tasks done."}):h.jsx("div",{className:"todo",children:t.map((n,i)=>h.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[h.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),h.jsx("span",{className:"todo-text",children:n.desc})]},i))}):vr(e)}function a4(e){const t=Nt(e.input),n=Ve(t==null?void 0:t.query)??Ve(t==null?void 0:t.doc_path),i=_r(e),a=ti(i),u=(a?Ve(a.documentation)??ef(a):null)??ei(i);return h.jsxs(h.Fragment,{children:[n&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Query"}),h.jsx(un,{code:n,lang:"text"})]}),u.trim()?h.jsx("div",{className:"toolcall-doc",children:h.jsx($i,{text:u})}):vr(e)]})}function u4(e){const t=Nt(e.input),n=Ve(t==null?void 0:t.url),i=Ve(t==null?void 0:t.mode),a=Ve(t==null?void 0:t.search_terms),u=_r(e),l=ti(u),c=l?ef(l)??Ve(l.content)??JSON.stringify(l,null,2):ei(u);return h.jsxs(h.Fragment,{children:[n&&h.jsxs("div",{className:"toolcall-meta",children:[h.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),i&&h.jsx("span",{className:"toolcall-tag",children:i})]}),a&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Search terms"}),h.jsx(un,{code:a,lang:"text"})]}),c.trim()?h.jsx(un,{code:c,lang:"markdown"}):vr(e)]})}function o4(e){if(!e)return null;const t=Array.isArray(e.results)?e.results:Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:null;if(!t)return null;const n=[];for(const i of t){const a=Nt(i);a&&n.push({title:Ve(a.title)??Ve(a.name),url:Ve(a.url)??Ve(a.link)??Ve(a.href),snippet:Ve(a.snippet)??Ve(a.description)??Ve(a.content)??Ve(a.text)})}return n.length?n:null}function l4(e){const t=_r(e),n=o4(ti(t)??Nt(e.output));return n?h.jsx("ul",{className:"websearch",children:n.map((i,a)=>{const u=c4(i.url),l=i.title??i.url??"(untitled)";return h.jsx("li",{children:i.url?h.jsxs("a",{className:"websearch-row",href:i.url,target:"_blank",rel:"noopener noreferrer",title:i.url,children:[h.jsx("span",{className:"websearch-title",children:l}),u&&h.jsx("span",{className:"websearch-site",children:u})]}):h.jsx("span",{className:"websearch-row",children:h.jsx("span",{className:"websearch-title",children:l})})},a)})}):vr(e)}function c4(e){if(e)try{return new URL(e).hostname.replace(/^www\./,"")}catch{return}}function OE(e){if(da(e)!=="websearch")return;const t=Nt(e.input);if(!Ve(t==null?void 0:t.__tool_use_purpose))return Ve(t==null?void 0:t.query)}function vr(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(Nt(t)){const{__tool_use_purpose:f,...p}=Nt(t);n=JSON.stringify(p,null,2)}const i=_r(e),a=ti(i),u=a?ef(a):null,l=u??(a?JSON.stringify(a,null,2):ei(i)),c=u?"text":/^\s*[[{]/.test(l)?"json":"text";return h.jsxs(h.Fragment,{children:[n&&n!=="{}"&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Input"}),h.jsx(un,{code:n,lang:Nt(t)?"json":"text"})]}),l.trim()&&h.jsxs("div",{className:"toolcall-section",children:[h.jsx("div",{className:"toolcall-label",children:"Output"}),h.jsx(un,{code:l,lang:c})]})]})}function un({code:e,lang:t}){const[n,i]=_.useState(null);return _.useEffect(()=>{let a=!1;return Jd(e,t).then(u=>!a&&i(u)).catch(()=>!a&&i(null)),()=>{a=!0}},[e,t]),n?h.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):h.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function F0({diff:e}){return h.jsx("div",{className:"diff-body",children:e.map((t,n)=>h.jsxs("div",{className:`diff-line diff-${t.type}`,children:[h.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),h.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const j0=_.memo(Q6),Mc=_.memo(K6),dd=_.memo(J6),d4=4,B0=300,f4=240,h4=80;function p4(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function m4(e,t,n,i){const a=t-e,u=Math.max(0,i-n);return a>u+d4}class g4{constructor(t){Le(this,"ports");Le(this,"frames");Le(this,"follow",!1);Le(this,"lastScrollTop",0);Le(this,"lastMaxTop",0);Le(this,"anchor",null);Le(this,"loadingOlder",!1);Le(this,"showButton",!1);Le(this,"initializedFor",null);Le(this,"prevPendingCount",0);Le(this,"raf",0);Le(this,"content",{chatId:null,itemCount:0,pendingCount:0,remainingOlder:0});Le(this,"followTick",()=>{var a,u;this.raf=0;const t=this.ports.element();if(!t||!this.follow)return;const n=this.bottomOf(t),i=n-t.scrollTop;if(i<=1||(u=(a=this.ports).reducedMotion)!=null&&u.call(a)){t.scrollTop=n,this.lastScrollTop=t.scrollTop,this.lastMaxTop=n;return}t.scrollTop+=Math.max(10,Math.ceil(i*.3)),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.raf=this.frames.request(this.followTick)});this.ports=t,this.frames=t.frames??{request:n=>requestAnimationFrame(n),cancel:n=>cancelAnimationFrame(n)}}reset(){this.follow=!1,this.prevPendingCount=0,this.anchor=null,this.cancelFollow(),this.setFlags({loadingOlder:!1,showScrollButton:!1})}dispose(){this.cancelFollow()}onContent(t){this.content=t;const n=this.ports.element();if(n){if(this.initializedFor!==t.chatId&&t.itemCount>0){this.initializedFor=t.chatId,this.follow=!1,n.scrollTop=this.bottomOf(n),this.lastScrollTop=n.scrollTop,this.lastMaxTop=this.bottomOf(n),this.prevPendingCount=t.pendingCount,this.setFlags({showScrollButton:!1}),this.fillIfShort(n);return}t.pendingCount>this.prevPendingCount&&(this.follow=!0),this.prevPendingCount=t.pendingCount,this.follow?this.scheduleFollow():this.updateButton(n),this.fillIfShort(n)}}fillIfShort(t){t.clientHeight>0&&this.bottomOf(t)<B0&&this.loadOlder()}onScroll(){const t=this.ports.element();if(!t)return;const n=this.bottomOf(t);m4(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<B0&&this.loadOlder()}jumpToLatest(){this.follow=!0,this.setFlags({showScrollButton:!1}),this.scheduleFollow()}restoreAnchor(){if(this.anchor==null)return;const t=this.ports.element();t&&(t.scrollTop=t.scrollHeight-this.anchor),this.anchor=null,this.setFlags({loadingOlder:!1})}loadOlder(){const t=this.ports.element(),n=this.content.chatId;if(!t||!n||this.loadingOlder||this.content.remainingOlder<=0)return;this.setFlags({loadingOlder:!0});const{offset:i,limit:a}=p4(this.content.remainingOlder,h4);this.ports.fetchPage(n,i,a).then(u=>{if(this.content.chatId!==n)return this.abandonPage();if(u.length===0)return this.abandonPage();const l=this.ports.element();l&&(this.anchor=l.scrollHeight-l.scrollTop),this.ports.prepend(u)}).catch(()=>{this.abandonPage(),console.error("could not load earlier transcript page")})}abandonPage(){this.anchor=null,this.setFlags({loadingOlder:!1})}scheduleFollow(){this.raf||(this.raf=this.frames.request(this.followTick))}cancelFollow(){this.raf&&this.frames.cancel(this.raf),this.raf=0}bottomOf(t){return t.scrollHeight-t.clientHeight}updateButton(t){const n=this.bottomOf(t)-t.scrollTop;this.setFlags({showScrollButton:n>f4})}setFlags(t){const n=t.loadingOlder??this.loadingOlder,i=t.showScrollButton??this.showButton;n===this.loadingOlder&&i===this.showButton||(this.loadingOlder=n,this.showButton=i,this.ports.onFlags({loadingOlder:n,showScrollButton:i}))}}const Fc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function E4(e){if(!e)return!1;if(e.type==="run"||e.type==="thought")return!0;if(e.type==="tool")return e.tool.status!=="failed";const t=e.item;return t.type==="message"?t.message.role==="thinking":t.type==="tool_call"&&t.tool.status==="in_progress"}const T4=_.memo(function(){const t=ge(M=>M.items),n=ge(M=>M.streamingText),i=ge(M=>M.streamingThought),a=ge(M=>M.pending),u=_.useMemo(()=>a.filter(M=>!M.steer),[a]),l=_.useMemo(()=>a.filter(M=>M.steer),[a]),c=u.some(M=>M.status==="sending"),f=ge(M=>M.observability.turnStatus),p=ge(M=>M.observability.compacting),T=ge(M=>M.activeId),E=ge(M=>M.openFilePreview),b=ge(M=>M.remainingOlder),x=_.useRef({session:null,ids:new Set});x.current.session!==T&&(x.current={session:T,ids:new Set(t.filter(M=>M.type==="tool_call").map(M=>M.tool.id))});const C=M=>!x.current.ids.has(M),v=_.useMemo(()=>vE(t),[t]),D=f==="running"&&!n&&u.length===0,I=!!i&&u.length===0||D&&E4(v.at(-1)),R=(f==="running"||c)&&!n&&!I,H=M=>h.jsxs("div",{className:`msg msg-user msg-pending ${M.status==="failed"?"is-failed":""}`,children:[T&&M.attachments&&M.attachments.length>0&&h.jsx(AE,{chatId:T,attachments:M.attachments,onOpen:E}),M.text&&h.jsx("div",{className:"msg-user-text",children:M.text}),M.status==="failed"&&h.jsxs("div",{className:"msg-failed",children:[h.jsx("span",{className:"msg-failed-why",children:M.error??"Failed to send."}),h.jsx("button",{className:"msg-retry",onClick:()=>Ye.retrySend(M.id),children:"Retry"})]})]},M.id),W=_.useRef(null),[q,B]=_.useState({loadingOlder:!1,showScrollButton:!1}),ie=_.useRef(null);ie.current||(ie.current=new g4({element:()=>W.current,fetchPage:(M,pe,V)=>qe.transcriptPage(M,pe,V).then(de=>de.items),prepend:M=>ge.getState().prependItems(M),onFlags:B,reducedMotion:()=>(Fc==null?void 0:Fc.matches)??!1}));const Z=ie.current;_.useEffect(()=>(Z.reset(),()=>Z.dispose()),[T,Z]),_.useEffect(()=>{Z.onContent({chatId:T,itemCount:t.length,pendingCount:a.length,remainingOlder:b})},[t,n,i,a,T,p,b,Z]),_.useLayoutEffect(()=>{Z.restoreAnchor()},[t,Z]);const ce=t.length===0&&!n&&!i&&u.length===0;return h.jsxs("div",{className:"transcript-wrap",children:[q.loadingOlder&&h.jsxs("div",{className:"loading-older",role:"status",children:[h.jsx(br,{size:14}),h.jsx("span",{children:"Loading earlier messages…"})]}),h.jsxs("div",{className:"transcript",ref:W,onScroll:()=>Z.onScroll(),children:[ce&&h.jsxs("div",{className:"transcript-empty",children:[h.jsx("p",{className:"empty-title",children:"Casper is here."}),h.jsx("p",{className:"empty-sub",children:"Hand off a task. Casper keeps working server-side and has it ready when you get back."})]}),h.jsx(wE,{entries:v,lastActive:D,streamingThought:u.length===0?i:"",arrivedLive:C,chatId:T,onOpenFile:E}),u.map(H),i&&!NE(v.at(-1))&&u.length===0&&h.jsx(dd,{text:i,live:!0}),n&&h.jsx("div",{className:"msg msg-assistant",children:h.jsx($i,{text:n,streaming:!0})}),R&&h.jsxs("div",{className:"thinking",children:[h.jsx("span",{className:"thinking-dot"}),h.jsx("span",{className:"thinking-dot"}),h.jsx("span",{className:"thinking-dot"})]}),l.map(H),p&&h.jsx("div",{className:"compaction compaction-live",children:h.jsx("div",{className:"compaction-rule",children:h.jsxs("span",{className:"compaction-head",children:[h.jsx(br,{size:13,className:"compaction-icon"}),h.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),q.showScrollButton&&h.jsx("button",{className:"scroll-to-bottom",onClick:()=>Z.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:h.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:h.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})}),gn="/",jc=2;function y4(e){if(!e||e===gn)return gn;const t=e.replace(/\/+$/,"").lastIndexOf(gn);return t<=0?gn:e.slice(0,t)}function x4(e){const t=[{name:gn,path:gn}];let n="";for(const i of e.split(gn).filter(Boolean))n=`${n}${gn}${i}`,t.push({name:i,path:n});return t}function b4(e,t){return t.slice(e.length).replace(/^\/+/,"")}function k4({initialPath:e,onChange:t,onSubmit:n}){const[i,a]=_.useState(e.trim()),[u,l]=_.useState(""),[c,f]=_.useState(null),[p,T]=_.useState(-1),[E,b]=_.useState(null),x=_.useRef(null),C=_.useRef(null),v=_.useRef(""),D=_.useRef(!1),I=_.useRef(i);I.current=i;const R=_.useRef(t);R.current=t;const H=_.useId(),W=`${H}-listbox`,q=_.useMemo(()=>{if(u.startsWith(gn)||!i)return u;const S=i.endsWith(gn)?i:i+gn;return u?S+u:S},[i,u]);_.useEffect(()=>{v.current=q;const S=setTimeout(()=>{qe.listDirs(q).then(P=>{v.current===q&&(f(P),!D.current&&P.dir&&(D.current=!0,I.current||a(P.dir)),R.current(P.target))}).catch(()=>{v.current===q&&f(null)})},150);return()=>clearTimeout(S)},[q]);const B=(c==null?void 0:c.entries)??[],ie=(c==null?void 0:c.dir)??i,Z=x4(ie),ce=Z.length>jc+2,M=ce?Z.slice(1,-jc):[],pe=ce?Z.slice(-jc):Z.slice(1),V=Z[0],de=Z[Z.length-1];_.useEffect(()=>{var P,G;if(p<0)return;const S=(P=C.current)==null?void 0:P.children[p];(G=S==null?void 0:S.scrollIntoView)==null||G.call(S,{block:"nearest"})},[p]);const he=S=>{var P;a(S),l(""),T(-1),(P=x.current)==null||P.focus()},re=S=>{if(S.key==="ArrowDown"&&B.length>0)S.preventDefault(),T(P=>Math.min(P+1,B.length-1));else if(S.key==="ArrowUp"&&B.length>0)S.preventDefault(),T(P=>Math.max(P-1,-1));else if(S.key==="ArrowLeft"&&S.currentTarget.selectionStart===0&&!u)S.preventDefault(),he(y4(ie));else if(S.key==="Enter"){S.preventDefault();const P=p>=0?B[p]:void 0;P?he(P):n()}else S.key==="Escape"&&p>=0&&(S.stopPropagation(),T(-1))},X=c==null?void 0:c.target,ye=!!X&&(c==null?void 0:c.targetKind)==="missing",J=!!X&&(c==null?void 0:c.targetKind)==="file",oe=(S,P="")=>h.jsx("button",{type:"button",className:`dirpick-crumb ${S===de?"is-here":""} ${P}`,onClick:()=>S!==de&&he(S.path),disabled:S===de,title:S.path,children:S.name});return h.jsxs("div",{className:"dirpick",children:[h.jsxs("div",{className:"dirpick-crumbs",children:[oe(V),M.length>0&&h.jsx("button",{type:"button",className:"dirpick-crumb dirpick-more","aria-haspopup":"menu","aria-expanded":E!==null,"aria-label":`Show ${M.length} folders above`,title:`${M.length} folders above`,onClick:S=>b(E?null:S.currentTarget),children:h.jsx(M2,{size:15})}),pe.map((S,P)=>h.jsxs("span",{className:"dirpick-crumb-wrap",children:[(P>0||M.length>0)&&h.jsx("span",{className:"dirpick-sep",children:"/"}),oe(S)]},S.path))]}),E&&h.jsx(Cg,{anchor:E,onClose:()=>b(null),children:M.map(S=>h.jsx("button",{className:"menu-item",onClick:()=>{b(null),he(S.path)},children:S.name},S.path))}),h.jsx("input",{ref:x,className:"dirpick-input",role:"combobox","aria-expanded":B.length>0,"aria-controls":W,"aria-autocomplete":"list","aria-label":"Working directory","aria-activedescendant":p>=0?`${H}-opt-${p}`:void 0,value:u,placeholder:"Search folders…",autoComplete:"off",spellCheck:!1,onChange:S=>{l(S.target.value),T(-1)},onKeyDown:re}),h.jsxs("div",{ref:C,id:W,role:"listbox","aria-label":"Folders",className:"dirpick-list",children:[B.map((S,P)=>h.jsx("button",{id:`${H}-opt-${P}`,type:"button",role:"option","aria-selected":P===p,className:`dirpick-opt ${P===p?"is-active":""}`,title:S,onMouseDown:G=>G.preventDefault(),onClick:()=>he(S),children:h.jsx("span",{className:"dirpick-tail",children:h.jsx("span",{children:b4(ie,S)})})},S)),B.length===0&&h.jsx("div",{className:"dirpick-empty",children:u?"Nothing here matches.":"No subfolders."})]}),h.jsxs("div",{className:"dirpick-status","aria-live":"polite",children:[ye&&h.jsx("span",{className:"dirpick-note is-new",children:"This folder will be created"}),J&&h.jsx("span",{className:"dirpick-note is-bad",children:"That path is a file, not a folder"})]})]})}function C4({chatId:e,currentCwd:t,onChanged:n,onClose:i}){const[a,u]=_.useState(t??""),[l,c]=_.useState(!1),[f,p]=_.useState(null),T=_.useRef(!1);_.useEffect(()=>{const b=x=>{x.key==="Escape"&&i()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[i]);const E=async()=>{const b=a.trim();if(!(!b||l)){c(!0),p(null);try{const x=await qe.setChatCwd(e,b);n(x.cwd),i()}catch(x){p(x.message)}finally{c(!1)}}};return h.jsx("div",{className:"sheet-backdrop",onMouseDown:b=>{T.current=b.target===b.currentTarget},onClick:b=>{b.target===b.currentTarget&&T.current&&i(),T.current=!1},children:h.jsxs("div",{className:"sheet",role:"dialog","aria-modal":"true","aria-labelledby":"change-folder-title",children:[h.jsx("h2",{className:"sheet-title",id:"change-folder-title",children:"Change working directory"}),h.jsx(k4,{initialPath:t??"",onChange:u,onSubmit:E}),f&&h.jsx("div",{className:"sheet-error",children:f}),h.jsxs("div",{className:"sheet-actions",children:[h.jsx("button",{className:"btn-ghost",onClick:i,disabled:l,children:"Cancel"}),h.jsx("button",{className:"btn-primary",onClick:E,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function S4({name:e}){var n;switch((n=e.split(".").pop())==null?void 0:n.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":case"vue":case"svelte":return h.jsx(lm,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return h.jsx(H2,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return h.jsx(z2,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return h.jsx(W2,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return h.jsx(lm,{size:15,className:"ftree-icon-svg ftree-icon-markup"});case"png":case"jpg":case"jpeg":case"gif":case"webp":case"bmp":case"ico":case"avif":return h.jsx($2,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return h.jsx(Y2,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return h.jsx(bg,{size:15,className:"ftree-icon-svg"})}}function DE({entry:e,chatId:t,depth:n,onPreview:i,onExpanded:a}){const u=ge(E=>E.fsVersion[e.path]??0),[l,c]=_.useState({expanded:!1,children:null,loading:!1});_.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),_.useEffect(()=>{if(!u||!l.expanded)return;let E=!0;return qe.tree(t,e.path).then(b=>{E&&c(x=>({...x,children:b.entries}))}).catch(()=>{}),()=>{E=!1}},[u]);const f=_.useCallback(async()=>{if(e.type==="directory"&&!l.loading){if(l.expanded){c(E=>({...E,expanded:!1}));return}if(l.children===null){c(E=>({...E,loading:!0}));try{const E=await qe.tree(t,e.path);c({expanded:!0,children:E.entries,loading:!1})}catch{c(E=>({...E,loading:!1}))}}else c(E=>({...E,expanded:!0}))}},[e,t,l.expanded,l.children,l.loading]),p=_.useCallback(()=>{e.type==="file"&&i(e)},[e,i]),T=n*16;return e.type==="directory"?h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${T+8}px`},children:[h.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?h.jsx(br,{size:12}):h.jsx(kr,{size:12,className:"ftree-chevron-icon"})}),h.jsx("span",{className:"ftree-icon",children:l.expanded?h.jsx(U2,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):h.jsx(xg,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),h.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&h.jsxs("div",{className:"ftree-children",children:[l.children.map(E=>h.jsx(DE,{entry:E,chatId:t,depth:n+1,onPreview:i,onExpanded:a},E.path)),l.children.length===0&&h.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${T+24}px`},children:"Empty"})]})]}):h.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${T+8}px`},onClick:p,children:[h.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),h.jsx("span",{className:"ftree-icon",children:h.jsx(S4,{name:e.name})}),h.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&h.jsx("span",{className:"ftree-size",children:SE(e.size)})]})}function _4({chatId:e,onClose:t}){var ie;const[n,i]=_.useState([]),[a,u]=_.useState(""),[l,c]=_.useState(!0),[f,p]=_.useState(null),[T,E]=_.useState(!1),b=ge(Z=>Z.chats),x=ge(Z=>Z.setWatchedPaths),C=ge(Z=>Z.fsVersion[""]??0),v=_.useRef(new Set),D=ge(Z=>Z.setChats),I=ge(Z=>Z.openFilePreview),R=ge(Z=>Z.observability.turnStatus!=="idle"||Z.observability.compacting),H=(ie=b.find(Z=>Z.chatId===e))==null?void 0:ie.cwd,W=_.useCallback(()=>{x(["",...v.current])},[x]),q=_.useCallback((Z,ce)=>{const M=v.current;ce!==M.has(Z)&&(ce?M.add(Z):M.delete(Z),W())},[W]);_.useEffect(()=>(W(),()=>x([])),[W,x]);const B=_.useCallback(async(Z=!1)=>{Z||c(!0),p(null);try{const ce=await qe.tree(e);i(ce.entries),u(ce.cwd)}catch(ce){p(ce.message)}finally{Z||c(!1)}},[e]);return _.useEffect(()=>{B()},[B]),_.useEffect(()=>{C&&B(!0)},[C]),h.jsxs("div",{className:"ftree-panel",children:[h.jsxs("div",{className:"ftree-header",children:[h.jsx("span",{className:"ftree-title",title:a,children:"Files"}),h.jsx("button",{className:"ftree-refresh",onClick:()=>E(!0),disabled:R,title:R?"Change the folder after the turn":"Change working directory","aria-label":"Change working directory",children:h.jsx(xg,{size:14})}),t&&h.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:h.jsx(ro,{size:15})})]}),a&&h.jsx("div",{className:"ftree-cwd",title:a,children:a}),h.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&h.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&h.jsxs("div",{className:"ftree-error",children:[f,h.jsx("button",{className:"ftree-repoint",onClick:()=>E(!0),disabled:R,title:R?"Change the folder after the turn":void 0,children:"Change folder…"})]}),!l&&!f&&n.length===0&&h.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(Z=>h.jsx(DE,{entry:Z,chatId:e,depth:0,onPreview:ce=>I(ce.path),onExpanded:q},Z.path))]}),T&&h.jsx(C4,{chatId:e,currentCwd:a||H,onChanged:Z=>{D(b.map(ce=>ce.chatId===e?{...ce,cwd:Z}:ce)),B()},onClose:()=>E(!1)})]})}const Bc=e=>e.split("/").pop()||e;function v4({preview:e,chatId:t,onClose:n}){const[i,a]=_.useState(!1),[u,l]=_.useState({}),c=()=>{window.open(qe.downloadUrl(t,e.path),"_blank")},f=x=>{x.target===x.currentTarget&&n()};_.useEffect(()=>{const x=C=>{C.key==="Escape"&&n()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]);const p=u[e.path]??!1,T=e.kind==="html"||e.kind==="markdown",E=T&&!p,b=e.kind!=="image"&&e.kind!=="pdf"&&!E;return h.jsx("div",{className:"fpreview-backdrop",onClick:f,children:h.jsxs("div",{className:`fpreview-modal${i?" fpreview-full":""}`,children:[h.jsxs("div",{className:"fpreview-header",children:[T&&!e.error&&h.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[h.jsx("button",{className:`fpreview-seg-btn${p?"":" is-active"}`,onClick:()=>l(x=>({...x,[e.path]:!1})),title:"Rendered","aria-label":"Rendered","aria-pressed":!p,children:h.jsx(G2,{size:17})}),h.jsx("button",{className:`fpreview-seg-btn${p?" is-active":""}`,onClick:()=>l(x=>({...x,[e.path]:!0})),title:"Source","aria-label":"Source","aria-pressed":p,children:h.jsx(K2,{size:17})})]}),h.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),h.jsx("button",{className:"fpreview-dl",onClick:c,title:"Download file","aria-label":"Download file",children:h.jsx(V2,{size:18})}),h.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(x=>!x),title:i?"Exit fullscreen":"Fullscreen","aria-label":i?"Exit fullscreen":"Fullscreen",children:i?h.jsx(J2,{size:18}):h.jsx(X2,{size:18})}),h.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:h.jsx(ro,{size:18})})]}),h.jsxs("div",{className:"fpreview-body",children:[e.loading&&h.jsx("div",{className:"fpreview-loading",children:h.jsx(br,{size:48})}),e.error&&h.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&h.jsx("img",{src:qe.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&h.jsx("iframe",{src:qe.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&E&&h.jsx("iframe",{src:`${qe.previewUrl(t,e.path)}&raw=1`,title:e.name,className:"fpreview-html",sandbox:"allow-scripts allow-forms"}),!e.loading&&!e.error&&e.kind==="markdown"&&E&&e.content!==null&&h.jsx("div",{className:"fpreview-md",children:h.jsx($i,{text:e.content,html:!0})}),!e.loading&&!e.error&&b&&e.highlightedHtml&&h.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&b&&!e.highlightedHtml&&e.content!==null&&h.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function N4(){const e=ge(l=>l.previewPath),t=ge(l=>l.activeId),n=ge(l=>l.closeFilePreview),[i,a]=_.useState(null),u=_.useCallback(()=>n(),[n]);return _.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const c=i6(Bc(e)),f=c!=="image"&&c!=="pdf";if(a({path:e,name:Bc(e),content:null,highlightedHtml:null,kind:c,loading:f,error:null}),!!f)return(async()=>{try{const p=await fetch(qe.previewUrl(t,e),{credentials:"same-origin"});if(!p.ok)throw new Error(await p.text()||`HTTP ${p.status}`);const T=await p.text();if(l)return;a(x=>x&&x.path===e?{...x,content:T,loading:!1}:x);const E=xE(Bc(e));if(!E)return;const b=await Jd(T,E);if(l||!b)return;a(x=>x&&x.path===e?{...x,highlightedHtml:b}:x)}catch(p){if(l)return;a(T=>T&&T.path===e?{...T,loading:!1,error:p instanceof Error?p.message:"Could not read the file"}:T)}})(),()=>{l=!0}},[e,t]),!i||!t?null:ra.createPortal(h.jsx(v4,{preview:i,chatId:t,onClose:u}),document.body)}const mn=18,fd=2.5,hd=(mn-fd)/2,U0=2*Math.PI*hd;function w4(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const Ru=new Intl.NumberFormat;function A4(e){const t=new Date(`${e}T00:00:00`);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}const I4=[{key:"prompts",label:"Your messages",color:"var(--frost)"},{key:"responses",label:"Responses",color:"var(--frost-teal)"},{key:"tools",label:"Tools",color:"var(--aurora-purple)"},{key:"contextFiles",label:"Context files",color:"var(--aurora-yellow)"},{key:"sessionFiles",label:"Session files",color:"var(--aurora-green)"},{key:"memory",label:"Memory",color:"var(--aurora-orange)"}];function L4(e,t){if(!t)return[];const n=I4.filter(a=>t[a.key]>=.05).map(a=>({label:a.label,color:a.color,pct:t[a.key]}));if(n.length===0)return[];const i=e-n.reduce((a,u)=>a+u.pct,0);return i>=.05&&n.push({label:"System and other",color:"var(--n3)",pct:i}),n}function R4(){var H,W;const e=ge(q=>q.observability.contextUsagePercentage),t=ge(q=>q.observability.contextBreakdown),n=ge(q=>q.observability.sessionCredits),[i,a]=_.useState(null),u=ge(q=>q.observability.compacting),l=ge(q=>q.observability.turnStatus),c=ge(q=>q.activeId),f=ge(q=>q.currentModelId),p=ge(q=>q.models),[T,E]=_.useState(!1),b=_.useRef(null);_.useEffect(()=>{if(!T)return;const q=ie=>{b.current&&!b.current.contains(ie.target)&&E(!1)},B=ie=>{ie.key==="Escape"&&E(!1)};return document.addEventListener("mousedown",q),document.addEventListener("keydown",B),()=>{document.removeEventListener("mousedown",q),document.removeEventListener("keydown",B)}},[T]),_.useEffect(()=>{if(!T||!c)return;let q=!0;return qe.chatUsage(c).then(B=>q&&a(B),()=>{}),()=>{q=!1}},[T,c]),_.useEffect(()=>a(null),[c]);const x=Math.max(0,Math.min(100,e)),C=w4(x),v=x/100*U0,D=(H=p.find(q=>q.modelId===f))==null?void 0:H.contextWindowTokens,I=D?Math.round(x/100*D):void 0,R=L4(x,t);return c?h.jsxs("div",{className:"ctx",ref:b,children:[h.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>E(q=>!q),"aria-haspopup":"dialog","aria-expanded":T,"aria-label":`Context ${x.toFixed(0)}% used`,title:`Context ${x.toFixed(0)}% used`,children:h.jsx("svg",{width:mn,height:mn,viewBox:`0 0 ${mn} ${mn}`,"aria-hidden":!0,children:h.jsxs("g",{transform:`rotate(-90 ${mn/2} ${mn/2})`,children:[h.jsx("circle",{cx:mn/2,cy:mn/2,r:hd,fill:"none",stroke:"var(--n2)",strokeWidth:fd}),h.jsx("circle",{cx:mn/2,cy:mn/2,r:hd,fill:"none",stroke:C,strokeWidth:fd,strokeLinecap:"round",strokeDasharray:`${v} ${U0-v}`})]})})}),T&&h.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[h.jsxs("div",{className:"ctx-pop-head",children:[h.jsx("span",{className:"ctx-pop-title",children:"Context used"}),h.jsxs("span",{className:"ctx-pop-pct",style:{color:C},children:[x.toFixed(1),"%"]})]}),h.jsx("div",{className:"ctx-pop-bar",children:R.length>0?R.map(q=>h.jsx("span",{className:"ctx-pop-bar-part",style:{width:`${Math.min(100,q.pct)}%`,background:q.color}},q.label)):h.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${x}%`,background:C}})}),R.length>0&&h.jsx("dl",{className:"ctx-pop-rows ctx-pop-parts",children:R.map(q=>h.jsxs("div",{className:"ctx-pop-row",children:[h.jsxs("dt",{children:[h.jsx("span",{className:"ctx-pop-dot",style:{background:q.color}}),q.label]}),h.jsxs("dd",{children:[q.pct.toFixed(1),"%"]})]},q.label))}),D?h.jsxs("dl",{className:"ctx-pop-rows",children:[h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"Used"}),h.jsxs("dd",{children:[Ru.format(I??0)," tokens"]})]}),h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"Window"}),h.jsxs("dd",{children:[Ru.format(D)," tokens"]})]})]}):h.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),((i==null?void 0:i.credits)!==void 0||n!==void 0||(i==null?void 0:i.account))&&h.jsxs("dl",{className:"ctx-pop-rows ctx-pop-credits",children:[((i==null?void 0:i.credits)!==void 0||n!==void 0)&&h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"This chat"}),h.jsxs("dd",{children:[_E(Math.max((i==null?void 0:i.credits)??0,n??0))," credits"]})]}),(i==null?void 0:i.account)&&h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{title:i.account.planName,children:"This month"}),h.jsxs("dd",{children:[Ru.format(Math.round(i.account.used)),i.account.limit!==void 0&&` / ${Ru.format(i.account.limit)}`]})]}),((W=i==null?void 0:i.account)==null?void 0:W.resetsOn)&&h.jsxs("div",{className:"ctx-pop-row",children:[h.jsx("dt",{children:"Resets"}),h.jsx("dd",{children:A4(i.account.resetsOn)})]})]}),h.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:u||l!=="idle",onClick:()=>{E(!1),Ye.compact()},children:u?"Compacting…":"Compact conversation"})]})]}):null}const H0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function O4({chatId:e,connStatus:t,draft:n}){const[i,a]=_.useState(""),[u,l]=_.useState([]),[c,f]=_.useState(!1),[p,T]=_.useState(null),E=ge(X=>X.observability.turnStatus),b=ge(X=>X.observability.compacting),x=ge(X=>X.currentModeId),C=ge(X=>X.currentModelId),v=ge(X=>X.currentEffort),D=E==="running",I=E==="cancelling",R=n||t==="connected",H=_.useRef(null),W=_.useRef(null),q=X=>new Promise((ye,J)=>{const oe=new FileReader;oe.onload=()=>ye(oe.result.split(",")[1]??""),oe.onerror=()=>J(new Error("Failed to read file")),oe.readAsDataURL(X)}),B=_.useCallback(()=>{const X=W.current;X&&(X.style.height="auto",X.style.height=`${Math.min(X.scrollHeight,200)}px`)},[]);_.useEffect(()=>{B()},[i,B]);const ie=_.useCallback(X=>{const ye=X.map(J=>{const oe=H0.has(J.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:J,isImage:oe,previewUrl:oe?URL.createObjectURL(J):void 0}});l(J=>[...J,...ye])},[]),Z=async(X,ye,J)=>{const oe=[];X.length>0&&oe.push({type:"text",text:vd+X.map(S=>S.path).join(", ")+`
|
|
245
|
+
`});for(let S=0;S<X.length;S++){const P=X[S],G=ye[S];if(P&&P.kind==="image"&&G)try{const w=await q(G.file);oe.push({type:"image",data:w,mimeType:P.mimeType})}catch{}}return J&&oe.push({type:"text",text:J}),oe},ce=D&&R&&!b&&!!i.trim()&&u.length===0,M=async()=>{const X=i.trim();if(ce){Ye.steer(X),a(""),requestAnimationFrame(()=>{W.current&&(W.current.style.height="auto")});return}if(!X&&u.length===0||D||I||b||!R||c)return;let ye=[];const J=u;if(J.length>0){if(!e){T("No chat to upload to.");return}f(!0),T(null);try{ye=(await qe.uploadFiles(e,J.map(P=>P.file))).files}catch(S){T(S.message),f(!1);return}f(!1)}const oe=await Z(ye,J,X);oe.length!==0&&(Ye.send(oe,ye.map(S=>({path:S.path,name:S.name,size:S.size,kind:S.kind}))),a(""),J.forEach(S=>S.previewUrl&&URL.revokeObjectURL(S.previewUrl)),l([]),requestAnimationFrame(()=>{W.current&&(W.current.style.height="auto")}))},pe=X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),M())},V=_.useCallback(X=>{var oe;const ye=(oe=X.clipboardData)==null?void 0:oe.items;if(!ye)return;const J=[];for(const S of Array.from(ye))if(S.kind==="file"&&H0.has(S.type)){const P=S.getAsFile();P&&J.push(P)}J.length>0&&(X.preventDefault(),ie(J))},[ie]),de=X=>{X.target.files&&ie(Array.from(X.target.files)),X.target.value=""},he=X=>{l(ye=>{const J=ye.find(oe=>oe.id===X);return J!=null&&J.previewUrl&&URL.revokeObjectURL(J.previewUrl),ye.filter(oe=>oe.id!==X)})};_.useEffect(()=>()=>{l(X=>(X.forEach(ye=>ye.previewUrl&&URL.revokeObjectURL(ye.previewUrl)),X))},[]);const re=(i.trim()||u.length>0)&&!D&&!I&&!b&&!c&&R;return h.jsxs("div",{className:"composer",children:[p&&h.jsx("div",{className:"composer-error",children:p}),u.length>0&&h.jsx("div",{className:"composer-attachments",children:u.map(X=>h.jsxs("div",{className:"composer-att",children:[X.isImage&&X.previewUrl?h.jsx("img",{src:X.previewUrl,alt:X.file.name,className:"composer-att-img"}):h.jsxs("div",{className:"composer-att-file",title:X.file.name,children:[h.jsx("span",{className:"composer-att-file-icon",children:"📄"}),h.jsx("span",{className:"composer-att-file-name",children:X.file.name})]}),h.jsx("button",{className:"composer-att-remove",onClick:()=>he(X.id),"aria-label":`Remove ${X.file.name}`,children:"×"})]},X.id))}),h.jsxs("div",{className:"composer-box",children:[h.jsx("textarea",{ref:W,className:"composer-input",value:i,onChange:X=>a(X.target.value),onKeyDown:pe,onPaste:V,placeholder:"Write a message…",rows:1}),h.jsxs("div",{className:"composer-actions",children:[h.jsx("button",{className:"composer-plus",onClick:()=>{var X;return(X=H.current)==null?void 0:X.click()},disabled:!R||c,title:"Add photos & files","aria-label":"Add photos and files",children:h.jsx(Id,{size:18})}),h.jsxs("div",{className:"composer-actions-right",children:[h.jsx(R4,{}),h.jsx(cb,{value:x,onChange:X=>Ye.changeAgent(X)}),h.jsx(lb,{value:C,effort:v,draft:n,onChange:X=>Ye.changeModel(X),onEffortChange:X=>Ye.changeEffort(X)}),ce?h.jsx("button",{className:"composer-btn composer-send",onClick:M,title:"Send to the running turn","aria-label":"Send to the running turn",children:h.jsx(um,{size:17})}):D?h.jsx("button",{className:"composer-btn composer-stop",onClick:()=>Ye.cancel(),title:"Stop","aria-label":"Stop",children:h.jsx(om,{size:15})}):I?h.jsx("button",{className:"composer-btn composer-stop",disabled:!0,title:"Stopping…","aria-label":"Stopping",children:h.jsx(om,{size:15})}):h.jsx("button",{className:"composer-btn composer-send",onClick:M,disabled:!re,title:c?"Uploading…":"Send","aria-label":c?"Uploading":"Send",children:c?h.jsx(br,{size:15}):h.jsx(um,{size:17})})]})]})]}),h.jsx("input",{ref:H,type:"file",multiple:!0,onChange:de,className:"composer-file-input"})]})}const D4={connecting:{cls:"busy",label:"Connecting"},replaying:{cls:"busy",label:"Catching up"},connected:{cls:"ok",label:"Live"},reconnecting:{cls:"busy",label:"Reconnecting"},resyncing:{cls:"busy",label:"Resyncing"},closed:{cls:"down",label:"Offline"}};function P4({status:e}){const{cls:t,label:n}=D4[e];return h.jsxs("span",{className:`conndot conndot-${t}`,children:[h.jsx("span",{className:"conndot-blip"}),h.jsx("span",{className:"conndot-label",children:n})]})}function M4({isDraft:e,navOpen:t,onToggleNav:n}){const i=ge(W=>W.loadingChatId),a=ge(W=>W.connStatus),u=ge(W=>W.createError),l=ge(W=>{var q;return(q=W.chats.find(B=>B.chatId===W.activeId))==null?void 0:q.title}),c=ge(W=>e&&W.pending.length===0&&W.items.length===0),f=ge(W=>W.activeId),p=ge(W=>W.chatId),T=ge(W=>W.chatNotice),E=ge(W=>W.reloadingId!==null&&W.reloadingId===W.activeId),b=ge(W=>W.observability.turnStatus==="running"),x=ge(W=>W.dismissChatNotice),[C,v]=_.useState(!1);if(_.useEffect(()=>{v(!1)},[f]),i)return h.jsxs("main",{className:"chatpane",children:[h.jsxs("header",{className:"chat-head",children:[h.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:h.jsx(dc,{size:20})}),h.jsx("span",{className:"chat-title",children:"Opening session…"})]}),h.jsx("div",{className:"chat-blank",children:h.jsx(br,{size:48,className:"chat-spinner"})})]});if(u)return h.jsxs("main",{className:"chatpane",children:[h.jsxs("header",{className:"chat-head",children:[h.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:h.jsx(dc,{size:20})}),h.jsx("span",{className:"chat-title",children:"New session"})]}),h.jsxs("div",{className:"chat-blank",children:[h.jsx("p",{className:"chat-blank-title",children:"Couldn't start the session"}),h.jsx("p",{className:"chat-blank-sub",children:u}),h.jsxs("div",{className:"chat-error-actions",children:[h.jsx("button",{className:"btn-primary",onClick:()=>Ye.retryCreate(),children:"Try again"}),h.jsx("button",{className:"btn-ghost",onClick:()=>Ye.dismissCreateError(),children:"Back to sessions"})]})]})]});const D=T&&h.jsxs("div",{className:"notice-banner",role:"alert",children:[h.jsx(Ad,{size:16,className:"notice-icon"}),h.jsxs("div",{className:"notice-text",children:[h.jsx("p",{className:"notice-title",children:T.title}),T.fix&&h.jsx("p",{className:"notice-sub",children:T.fix})]}),h.jsx("button",{className:"notice-x",onClick:x,"aria-label":"Dismiss",children:h.jsx(ro,{size:14})})]}),I=h.jsxs("div",{className:"composer-wrap",children:[D,h.jsx(O4,{chatId:p,connStatus:a,draft:e})]}),R=h.jsxs("div",{className:"chat-draft",children:[h.jsxs("div",{className:"draft-hero",children:[h.jsx("img",{className:"draft-logo",src:"/logo.svg",alt:""}),h.jsx("h1",{className:"draft-title",children:"Casper"})]}),I]}),H=h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"chat-body",children:h.jsx(T4,{})}),I]});return h.jsxs("main",{className:`chatpane chatpane-split ${C?"has-tree":""}`,children:[h.jsxs("div",{className:"chat-col",children:[h.jsxs("header",{className:"chat-head",children:[h.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:h.jsx(dc,{size:20})}),!e&&h.jsx("span",{className:"chat-title",title:l,children:l??"Session"}),!e&&h.jsx(P4,{status:a}),!e&&h.jsx("button",{className:"chat-head-btn chat-reload",onClick:()=>void Ye.reloadChat(),disabled:E||b,title:b?"Reload after the turn":"Reload session","aria-label":"Reload session",children:E?h.jsx(br,{size:18}):h.jsx(Tg,{size:18})}),!e&&h.jsx("button",{className:`chat-head-btn ftree-toggle ${C?"is-active":""}`,onClick:()=>v(W=>!W),title:"Toggle file tree","aria-label":"Toggle file tree","aria-pressed":C,children:h.jsx(q2,{size:18})})]}),c?R:H]}),f&&h.jsxs("aside",{className:`ftree-aside ${C?"is-open":""}`,children:[C&&h.jsx(_4,{chatId:f,onClose:()=>v(!1)}),h.jsx(N4,{})]}),f&&C&&h.jsx("div",{className:"ftree-backdrop",onClick:()=>v(!1),"aria-hidden":!0})]})}function F4({onReady:e}){const[t,n]=_.useState(""),[i,a]=_.useState(null),[u,l]=_.useState(!1),c=async()=>{l(!0),a(null);try{await v2(t.trim()),e()}catch(f){a(f.message)}finally{l(!1)}};return h.jsxs("div",{className:"gate",children:[h.jsx("img",{className:"gate-logo",src:"/logo.svg",alt:""}),h.jsx("h1",{className:"gate-title",children:"Casper"}),h.jsx("p",{className:"gate-sub",children:"Enter your access token to continue."}),h.jsx("input",{className:"gate-input",type:"password",value:t,placeholder:"access token",onChange:f=>n(f.target.value),onKeyDown:f=>f.key==="Enter"&&c()}),i&&h.jsx("p",{className:"gate-error",children:i}),h.jsx("button",{className:"btn-primary gate-btn",onClick:c,disabled:u,children:u?"Checking…":"Continue"}),h.jsxs("p",{className:"gate-hint",children:["Don't have it? On the machine running Casper, run ",h.jsx("code",{children:"casper token"}),"."]})]})}const Uc=768;function j4(){const[e,t]=_.useState("checking");return _.useEffect(()=>{e==="checking"&&qe.listChats().then(n=>{ge.getState().setChats(n.chats),t("ready")}).catch(()=>t("gate"))},[e]),e==="checking"?h.jsx("div",{className:"app-splash"}):e==="gate"?h.jsx(F4,{onReady:()=>t("ready")}):h.jsx(u2,{children:h.jsxs(Fx,{children:[h.jsxs(Ii,{element:h.jsx(B4,{onLock:()=>t("gate")}),children:[h.jsx(Ii,{index:!0,element:null}),h.jsx(Ii,{path:Nd,element:null}),h.jsx(Ii,{path:gg,element:null})]}),h.jsx(Ii,{path:"*",element:h.jsx(Px,{to:"/",replace:!0})})]})})}function B4({onLock:e}){var x;const t=ge(C=>C.chats),n=ge(C=>C.activeId),i=ge(C=>C.watchedPaths),a=ge(C=>C.connStatus),u=ge(C=>C.loadingChatId),l=yd(),c=((x=Zp(gg))==null?void 0:x.params.chatId)??null,f=Zp(Nd)!==null||!c&&n===null;_.useEffect(()=>{Ye.attach({navigate:l,onLock:e})},[l,e]),_.useEffect(()=>{Ye.loadPickers(),ge.getState().chats.length===0&&Ye.refreshSessions()},[]),_.useEffect(()=>{Ye.syncRoute(c,f)},[c,f]),_.useEffect(()=>{a==="connected"&&Ye.watchPaths(i)},[i,a]);const p=_.useCallback(()=>{N2(),Ye.lock()},[]),[T,E]=_.useState(()=>window.innerWidth>Uc);_.useEffect(()=>{const C=window.matchMedia(`(max-width: ${Uc}px)`),v=D=>E(!D.matches);return C.addEventListener("change",v),()=>C.removeEventListener("change",v)},[]);const b=_.useCallback(()=>{window.innerWidth<=Uc&&E(!1)},[]);return h.jsxs("div",{className:`layout ${T?"nav-open":""}`,children:[h.jsx(_b,{sessions:t,activeId:n,loadingId:u,onOpen:C=>{Ye.markLoading(C),b()},onNew:()=>{Ye.startDraft(),b()},onDelete:C=>void Ye.deleteChat(C),onRename:(C,v)=>void Ye.renameChat(C,v),onPin:(C,v)=>void Ye.pinChat(C,v),onLock:p}),T&&h.jsx("button",{className:"nav-scrim","aria-label":"Close session panel",onClick:()=>E(!1)}),h.jsx(M4,{navOpen:T,onToggleNav:()=>E(C=>!C),isDraft:f})]})}if("serviceWorker"in navigator){const e=!!navigator.serviceWorker.controller;let t=!1;navigator.serviceWorker.addEventListener("controllerchange",()=>{t||!e||(t=!0,window.location.reload())}),navigator.serviceWorker.ready.then(n=>{n.update().catch(()=>{}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&n.update().catch(()=>{})})}).catch(()=>{})}jy.createRoot(document.getElementById("root")).render(h.jsx(Bs.StrictMode,{children:h.jsx(j4,{})}));export{t_ as S,Wc as _,lo as c,pd as g,k3 as h,C3 as s,a1 as v,Vr as w};
|