@rqmii_immersive/agent-react-sdk 5.6.5 → 5.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Orb-B1DErA0O.cjs +4517 -0
- package/dist/Orb-B1DErA0O.cjs.map +1 -0
- package/dist/RqmiiAgentChat-C0ymqkkq.cjs +2 -0
- package/dist/RqmiiAgentChat-C0ymqkkq.cjs.map +1 -0
- package/dist/RqmiiCloudAvatarPlayer-CmovoCKk.cjs +2918 -0
- package/dist/RqmiiCloudAvatarPlayer-CmovoCKk.cjs.map +1 -0
- package/dist/RqmiiErrorBoundary-Byif85f5.cjs +2 -0
- package/dist/RqmiiErrorBoundary-Byif85f5.cjs.map +1 -0
- package/dist/embed/chunks/Orb-CBt2svdc.js +40903 -0
- package/dist/embed/chunks/Orb-CBt2svdc.js.map +1 -0
- package/dist/embed/chunks/RqmiiCloudAvatarPlayer-DpvI9bmI.js +3357 -0
- package/dist/embed/chunks/RqmiiCloudAvatarPlayer-DpvI9bmI.js.map +1 -0
- package/dist/embed/chunks/chat-box-avatar-DlUI3fDi.js +10 -0
- package/dist/embed/chunks/chat-box-avatar-DlUI3fDi.js.map +1 -0
- package/dist/embed/chunks/chat-box-text-and-voice-BgdFP0_P.js +112 -0
- package/dist/embed/chunks/chat-box-text-and-voice-BgdFP0_P.js.map +1 -0
- package/dist/embed/chunks/chat-box-voice-D0gPyOVt.js +74 -0
- package/dist/embed/chunks/chat-box-voice-D0gPyOVt.js.map +1 -0
- package/dist/embed/chunks/embed-core-B3d4u3wf.js +12623 -0
- package/dist/embed/chunks/embed-core-B3d4u3wf.js.map +1 -0
- package/dist/embed/chunks/highlighted-body-KPVGNVTW-CJl4AHHd.js +19 -0
- package/dist/embed/chunks/highlighted-body-KPVGNVTW-CJl4AHHd.js.map +1 -0
- package/dist/embed/chunks/mermaid-HWGCJPDP-DD9SRoUR.js +22773 -0
- package/dist/embed/chunks/mermaid-HWGCJPDP-DD9SRoUR.js.map +1 -0
- package/dist/embed/chunks/use-rqmii-vad-COqAsQsT.js +10225 -0
- package/dist/embed/chunks/use-rqmii-vad-COqAsQsT.js.map +1 -0
- package/dist/embed/core.js +6 -0
- package/dist/embed/core.js.map +1 -0
- package/dist/embed.js +2 -0
- package/dist/embed.js.map +1 -0
- package/dist/highlighted-body-KPVGNVTW-CSL27xRm.cjs +2 -0
- package/dist/highlighted-body-KPVGNVTW-CSL27xRm.cjs.map +1 -0
- package/dist/index.cjs +50 -0
- package/dist/index.cjs.map +1 -0
- package/dist/lazy.cjs +2 -0
- package/dist/lazy.cjs.map +1 -0
- package/dist/mermaid-HWGCJPDP-CssnmrD3.cjs +2 -0
- package/dist/mermaid-HWGCJPDP-CssnmrD3.cjs.map +1 -0
- package/dist/schedule-load-DbAlv7OH.cjs +2 -0
- package/dist/schedule-load-DbAlv7OH.cjs.map +1 -0
- package/dist/ui-1UzY5QCI.cjs +251 -0
- package/dist/ui-1UzY5QCI.cjs.map +1 -0
- package/dist/ui.cjs +2 -0
- package/dist/ui.cjs.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
"use strict";const Xe=require("./RqmiiErrorBoundary-Byif85f5.cjs"),Dt=require("./RqmiiCloudAvatarPlayer-CmovoCKk.cjs"),O=require("./RqmiiAgentChat-C0ymqkkq.cjs"),f=require("react/jsx-runtime"),b=require("react"),na=require("react-dom");function ra(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}/**
|
|
2
|
+
* @license lucide-react v1.24.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const eo=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
7
|
+
* @license lucide-react v1.24.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Xd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
12
|
+
* @license lucide-react v1.24.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Zd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
17
|
+
* @license lucide-react v1.24.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ns=e=>{const t=Zd(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
22
|
+
* @license lucide-react v1.24.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var ni={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
27
|
+
* @license lucide-react v1.24.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const Jd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},eh=b.createContext({}),th=()=>b.useContext(eh),nh=b.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},u)=>{const{size:l=24,strokeWidth:d=2,absoluteStrokeWidth:h=!1,color:p="currentColor",className:m=""}=th()??{},g=r??h?Number(n??d)*24/Number(t??l):n??d;return b.createElement("svg",{ref:u,...ni,width:t??l??ni.width,height:t??l??ni.height,stroke:e??p,strokeWidth:g,className:eo("lucide",m,i),...!a&&!Jd(o)&&{"aria-hidden":"true"},...o},[...s.map(([y,S])=>b.createElement(y,S)),...Array.isArray(a)?a:[a]])});/**
|
|
32
|
+
* @license lucide-react v1.24.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Ye=(e,t)=>{const n=b.forwardRef(({className:r,...i},a)=>b.createElement(nh,{ref:a,iconNode:t,className:eo(`lucide-${Xd(ns(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ns(e),n};/**
|
|
37
|
+
* @license lucide-react v1.24.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const rh=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ih=Ye("arrow-up",rh);/**
|
|
42
|
+
* @license lucide-react v1.24.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const ah=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],sh=Ye("chevron-left",ah);/**
|
|
47
|
+
* @license lucide-react v1.24.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const uh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],to=Ye("chevron-down",uh);/**
|
|
52
|
+
* @license lucide-react v1.24.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const oh=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],lh=Ye("chevron-up",oh);/**
|
|
57
|
+
* @license lucide-react v1.24.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const ch=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Rr=Ye("loader-circle",ch);/**
|
|
62
|
+
* @license lucide-react v1.24.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const dh=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],hh=Ye("maximize-2",dh);/**
|
|
67
|
+
* @license lucide-react v1.24.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const fh=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],ia=Ye("mic-off",fh);/**
|
|
72
|
+
* @license lucide-react v1.24.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const mh=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],vr=Ye("mic",mh);/**
|
|
77
|
+
* @license lucide-react v1.24.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const ph=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Dr=Ye("minimize-2",ph);/**
|
|
82
|
+
* @license lucide-react v1.24.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const gh=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]],aa=Ye("phone-off",gh);/**
|
|
87
|
+
* @license lucide-react v1.24.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const bh=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],sa=Ye("phone",bh);/**
|
|
92
|
+
* @license lucide-react v1.24.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Eh=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Th=Ye("rotate-ccw",Eh);/**
|
|
97
|
+
* @license lucide-react v1.24.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const xh=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],kh=Ye("star",xh);/**
|
|
102
|
+
* @license lucide-react v1.24.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const yh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ua=Ye("x",yh),Or=(function(e){if(e==null)return Sh;if(typeof e=="function")return Pr(e);if(typeof e=="object")return Array.isArray(e)?Ah(e):Ch(e);if(typeof e=="string")return _h(e);throw new Error("Expected function, string, or object as test")});function Ah(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Or(e[n]);return Pr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Ch(e){const t=e;return Pr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function _h(e){return Pr(t);function t(n){return n&&n.type===e}}function Pr(e){return t;function t(n,r,i){return!!(wh(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Sh(){return!0}function wh(e){return e!==null&&typeof e=="object"&&"type"in e}const no=[],Ln=!0,wi=!1,Vt="skip";function Mr(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Or(i),s=r?-1:1;o(e,void 0,[])();function o(u,l,d){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=no,g,y,S;if((!t||a(u,l,d[d.length-1]||void 0))&&(m=Nh(n(u,d)),m[0]===wi))return m;if("children"in u&&u.children){const k=u;if(k.children&&m[0]!==Vt)for(y=(r?k.children.length:-1)+s,S=d.concat(k);y>-1&&y<k.children.length;){const C=k.children[y];if(g=o(C,y,S)(),g[0]===wi)return g;y=typeof g[1]=="number"?g[1]:y+s}}return m}}}function Nh(e){return Array.isArray(e)?e:typeof e=="number"?[Ln,e]:e==null?no:[e]}function ut(e,t,n,r){let i,a,s;typeof t=="function"&&typeof n!="function"?(a=void 0,s=t,i=n):(a=t,s=n,i=r),Mr(e,a,o,i);function o(u,l){const d=l[l.length-1],h=d?d.children.indexOf(u):void 0;return s(u,h,d)}}const ln={indicator:"indicator",textOnly:"text-only",remove:"remove"};function Ih({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:s="text-gray-500",linkBlockPolicy:o=ln.indicator,imageBlockPolicy:u=ln.indicator}){const l=t.length&&!t.every(h=>h==="*"),d=n.length&&!n.every(h=>h==="*");if(!e&&(l||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const p=Ph(e,t,n,r,i,a,s,o,u);ro(h),ut(h,p)}}function rs(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function Lh(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Rh=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),vh=new Set(["javascript:","data:","file:","vbscript:"]);function is(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const s=rs(e,n);if(!s||vh.has(s.protocol)||!(Rh.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const u=Lh(e);return s&&t.some(l=>{const d=rs(l,n);return!d||d.origin!==s.origin?!1:s.href.startsWith(d.href)})?u?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:u?s.pathname+s.search+s.hash:s.href:null}function ro(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)ro(t)}}const ri=Symbol("node-seen");function Dh(e,t,n){return t===ln.remove?{type:"remove"}:t===ln.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function Oh(e,t,n){if(t===ln.remove)return{type:"remove"};if(t===ln.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const Ph=(e,t,n,r,i,a,s,o,u)=>{const l=(d,h,p)=>{if(d.type!=="element"||d[ri])return Ln;if(d.tagName==="a"){const m=is(d.properties.href,t,e,!1,!1,i);if(m===null){if(d[ri]=!0,ut(d,l),p&&typeof h=="number"){const g=Dh(d,o,s);if(g.type==="remove")return p.children.splice(h,1),[Vt,h];p.children[h]=g.element}return Vt}else return d.properties.href=m,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Ln}if(d.tagName==="img"){const m=is(d.properties.src,n,e,r,!0,i);if(m===null){if(d[ri]=!0,ut(d,l),p&&typeof h=="number"){const g=Oh(d,u,a);if(g.type==="remove")return p.children.splice(h,1),[Vt,h];p.children[h]=g.element}return Vt}else return d.properties.src=m,Ln}return Ln};return l},io=-1,Br=0,Pn=1,Tr=2,oa=3,la=4,ca=5,da=6,ao=7,so=8,{defineProperty:Mh}=Object,uo=typeof self=="object"?self:globalThis,as=(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 uo[e](t)},Bh=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case Br:case io:return n(s,i);case Pn:{const o=n([],i);for(const u of s)o.push(r(u));return o}case Tr:{const o=n({},i);for(const[u,l]of s){const d=r(u),h=r(l);d==="__proto__"?Mh(o,d,{value:h,configurable:!0,enumerable:!0,writable:!0}):o[d]=h}return o}case oa:return n(new Date(s),i);case la:{const{source:o,flags:u}=s;return n(new RegExp(o,u),i)}case ca:{const o=n(new Map,i);for(const[u,l]of s)o.set(r(u),r(l));return o}case da:{const o=n(new Set,i);for(const u of s)o.add(r(u));return o}case ao:{const{name:o,message:u}=s;return n(typeof uo[o]=="function"?as(o,u):new Error(u),i)}case so:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return n(new DataView(o),s)}case"-0":return-0}return n(as(a,s),i)};return r},ss=e=>Bh(new Map,e)(0),qt="",{toString:Fh}={},{keys:Hh,is:Uh}=Object,kn=e=>{const t=typeof e;if(t!=="object"||!e)return[Br,t];const n=Fh.call(e).slice(8,-1);switch(n){case"Array":return[Pn,qt];case"Object":return[Tr,qt];case"Date":return[oa,qt];case"RegExp":return[la,qt];case"Map":return[ca,qt];case"Set":return[da,qt];case"DataView":return[Pn,n]}return n.includes("Array")?[Pn,n]:e instanceof Error?[ao,e.name||"Error"]:[Tr,n]},ar=([e,t])=>e===Br&&(t==="function"||t==="symbol"),jh=(e,t,n,r)=>{const i=(s,o)=>{const u=r.push(s)-1;return n.set(o,u),u},a=s=>{if(n.has(s))return n.get(s);let[o,u]=kn(s);switch(o){case Br:{let d=s;switch(u){case"bigint":o=so,d=s.toString();break;case"number":if(!s&&Uh(s,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return i([io],s)}return i([o,d],s)}case Pn:{if(u){let p=s;return u==="DataView"?p=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(s)),i([u,[...p]],s)}const d=[],h=i([o,d],s);for(const p of s)d.push(a(p));return h}case Tr:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const d=[],h=i([o,d],s);for(const p of Hh(s))(e||!ar(kn(s[p])))&&d.push([a(p),a(s[p])]);return h}case oa:return i([o,isNaN(s.getTime())?qt:s.toISOString()],s);case la:{const{source:d,flags:h}=s;return i([o,{source:d,flags:h}],s)}case ca:{const d=[],h=i([o,d],s);for(const[p,m]of s)(e||!(ar(kn(p))||ar(kn(m))))&&d.push([a(p),a(m)]);return h}case da:{const d=[],h=i([o,d],s);for(const p of s)(e||!ar(kn(p)))&&d.push(a(p));return h}}const{message:l}=s;return i([o,{name:u,message:l}],s)};return a},us=(e,{json:t,lossy:n}={})=>{const r=[];return jh(!(t||n),!!t,new Map,r)(e),r},Qt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ss(us(e,t)):structuredClone(e):(e,t)=>ss(us(e,t));class Gn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Gn.prototype.normal={};Gn.prototype.property={};Gn.prototype.space=void 0;function oo(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Gn(n,r,t)}function $n(e){return e.toLowerCase()}class We{constructor(t,n){this.attribute=n,this.property=t}}We.prototype.attribute="";We.prototype.booleanish=!1;We.prototype.boolean=!1;We.prototype.commaOrSpaceSeparated=!1;We.prototype.commaSeparated=!1;We.prototype.defined=!1;We.prototype.mustUseProperty=!1;We.prototype.number=!1;We.prototype.overloadedBoolean=!1;We.prototype.property="";We.prototype.spaceSeparated=!1;We.prototype.space=void 0;let qh=0;const te=Zt(),Ie=Zt(),Ni=Zt(),$=Zt(),Ee=Zt(),Wt=Zt(),Qe=Zt();function Zt(){return 2**++qh}const Ii=Object.freeze(Object.defineProperty({__proto__:null,boolean:te,booleanish:Ie,commaOrSpaceSeparated:Qe,commaSeparated:Wt,number:$,overloadedBoolean:Ni,spaceSeparated:Ee},Symbol.toStringTag,{value:"Module"})),ii=Object.keys(Ii);class ha extends We{constructor(t,n,r,i){let a=-1;if(super(t,n),os(this,"space",i),typeof r=="number")for(;++a<ii.length;){const s=ii[a];os(this,ii[a],(r&Ii[s])===Ii[s])}}}ha.prototype.defined=!0;function os(e,t,n){n&&(e[t]=n)}function hn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ha(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[$n(r)]=r,n[$n(a.attribute)]=r}return new Gn(t,n,e.space)}const lo=hn({properties:{ariaActiveDescendant:null,ariaAtomic:Ie,ariaAutoComplete:null,ariaBusy:Ie,ariaChecked:Ie,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:Ee,ariaCurrent:null,ariaDescribedBy:Ee,ariaDetails:null,ariaDisabled:Ie,ariaDropEffect:Ee,ariaErrorMessage:null,ariaExpanded:Ie,ariaFlowTo:Ee,ariaGrabbed:Ie,ariaHasPopup:null,ariaHidden:Ie,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ee,ariaLevel:$,ariaLive:null,ariaModal:Ie,ariaMultiLine:Ie,ariaMultiSelectable:Ie,ariaOrientation:null,ariaOwns:Ee,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Ie,ariaReadOnly:Ie,ariaRelevant:null,ariaRequired:Ie,ariaRoleDescription:Ee,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Ie,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function co(e,t){return t in e?e[t]:t}function ho(e,t){return co(e,t.toLowerCase())}const zh=hn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wt,acceptCharset:Ee,accessKey:Ee,action:null,allow:null,allowFullScreen:te,allowPaymentRequest:te,allowUserMedia:te,alpha:te,alt:null,as:null,async:te,autoCapitalize:null,autoComplete:Ee,autoFocus:te,autoPlay:te,blocking:Ee,capture:null,charSet:null,checked:te,cite:null,className:Ee,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:Ie,controls:te,controlsList:Ee,coords:$|Wt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:te,defer:te,dir:null,dirName:null,disabled:te,download:Ni,draggable:Ie,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:te,formTarget:null,headers:Ee,height:$,hidden:Ni,high:$,href:null,hrefLang:null,htmlFor:Ee,httpEquiv:Ee,id:null,imageSizes:null,imageSrcSet:null,inert:te,inputMode:null,integrity:null,is:null,isMap:te,itemId:null,itemProp:Ee,itemRef:Ee,itemScope:te,itemType:Ee,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:te,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:te,muted:te,name:null,nonce:null,noModule:te,noValidate:te,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:te,optimum:$,pattern:null,ping:Ee,placeholder:null,playsInline:te,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:te,referrerPolicy:null,rel:Ee,required:te,reversed:te,rows:$,rowSpan:$,sandbox:Ee,scope:null,scoped:te,seamless:te,selected:te,shadowRootClonable:te,shadowRootCustomElementRegistry:te,shadowRootDelegatesFocus:te,shadowRootMode:null,shadowRootSerializable:te,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Ie,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:te,useMap:null,value:Ie,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ee,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:te,declare:te,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:te,noHref:te,noShade:te,noWrap:te,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Ie,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:te,disablePictureInPicture:te,disableRemotePlayback:te,exportParts:Wt,part:Ee,prefix:null,property:null,results:$,security:null,unselectable:null},space:"html",transform:ho}),$h=hn({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:Qe,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:Ee,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:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:te,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,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:Wt,g2:Wt,glyphName:Wt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:Qe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,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:$,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:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ee,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Qe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Qe,rev:Qe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Qe,requiredFeatures:Qe,requiredFonts:Qe,requiredFormats:Qe,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:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:Qe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Qe,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Qe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:co}),fo=hn({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()}}),mo=hn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ho}),po=hn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vh={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"},Yh=/[A-Z]/g,ls=/-[a-z]/g,Wh=/^data[-\w.:]+$/i;function Fr(e,t){const n=$n(t);let r=t,i=We;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Wh.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ls,Qh);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ls.test(a)){let s=a.replace(Yh,Gh);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ha}return new i(r,t)}function Gh(e){return"-"+e.toLowerCase()}function Qh(e){return e.charAt(1).toUpperCase()}const Qn=oo([lo,zh,fo,mo,po],"html"),Pt=oo([lo,$h,fo,mo,po],"svg");function cs(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const s=n.slice(i,r).trim();(s||!a)&&t.push(s),i=r+1,r=n.indexOf(",",i)}return t}function go(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ds=/[#.]/g;function Kh(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){ds.lastIndex=i;const o=ds.exec(n),u=n.slice(i,o?o.index:n.length);u&&(a?a==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function hs(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function bo(e){return e.join(" ").trim()}function Eo(e,t,n){const r=n?ef(n):void 0;function i(a,s,...o){let u;if(a==null){u={type:"root",children:[]};const l=s;o.unshift(l)}else{u=Kh(a,t);const l=u.tagName.toLowerCase(),d=r?r.get(l):void 0;if(u.tagName=d||l,Xh(s))o.unshift(s);else for(const[h,p]of Object.entries(s))Zh(e,u.properties,h,p)}for(const l of o)Li(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Xh(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 r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Zh(e,t,n,r){const i=Fr(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=hs(r):i.commaSeparated?a=cs(r):i.commaOrSpaceSeparated?a=hs(cs(r).join(" ")):a=fs(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Jh(r):String(r);if(Array.isArray(a)){const s=[];for(const o of a)s.push(fs(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Li(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)Li(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Li(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function fs(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||$n(n)===$n(t)))return!0}return n}function Jh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function ef(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const tf=["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"],nf=Eo(Qn,"div"),rf=Eo(Pt,"g",tf);function af(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=n[s];if(o===void 0){const u=ms(t,n[s-1]);o=u===-1?t.length+1:u+1,n[s]=o}if(o>a)return{line:s+1,column:a-(s>0?n[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const o=n[n.length-1],u=ms(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function ms(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
107
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Yt={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/"},To={}.hasOwnProperty,sf=Object.prototype;function uf(e,t){const n=t||{};return fa({file:n.file||void 0,location:!1,schema:n.space==="svg"?Pt:Qn,verbose:n.verbose||!1},e)}function fa(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},pr(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:xo(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=af(a),o=s.toPoint(0),u=s.toPoint(a.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},pr(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},pr(e,r,n),n}default:return n=of(e,t),n}}function xo(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=fa(e,t[n]);r.push(i)}return r}function of(e,t){const n=e.schema;e.schema=t.namespaceURI===Yt.svg?Pt:Qn;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;To.call(sf,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?rf:nf)(t.tagName,i,xo(e,t.childNodes));if(pr(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&un(u.startTag),d=u&&u.endTag&&un(u.endTag),h=fa(e,o.content);l&&d&&e.file&&(h.position={start:l.end,end:d.start}),s.content=h}return e.schema=n,s}function pr(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=lf(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function lf(e,t,n){const r=un(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let s;if(n.attrs)for(s in n.attrs)To.call(n.attrs,s)&&(a[Fr(e.schema,s).property]=un(n.attrs[s]));n.startTag;const o=un(n.startTag),u=n.endTag?un(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return r}function un(e){const t=ps({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ps({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ps(e){return e.line&&e.column?e:void 0}const gs={}.hasOwnProperty;function ko(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const o=r.handlers;if(i&&gs.call(i,e)){const u=String(i[e]);s=gs.call(o,u)?o[u]:r.unknown}if(s)return s.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const cf={},df={}.hasOwnProperty,yo=ko("type",{handlers:{root:ff,element:Ef,text:gf,comment:bf,doctype:pf}});function hf(e,t){const r=(t||cf).space;return yo(e,r==="svg"?Pt:Qn)}function ff(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ma(e.children,n,t),fn(e,n),n}function mf(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ma(e.children,n,t),fn(e,n),n}function pf(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return fn(e,t),t}function gf(e){const t={nodeName:"#text",value:e.value,parentNode:null};return fn(e,t),t}function bf(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return fn(e,t),t}function Ef(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Pt);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&df.call(e.properties,a)){const u=Tf(r,a,e.properties[a]);u&&i.push(u)}}const s=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Yt[s],childNodes:[],parentNode:null};return o.childNodes=ma(e.children,o,r),fn(e,o),e.tagName==="template"&&e.content&&(o.content=mf(e.content,r)),o}function Tf(e,t,n){const r=Fr(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?go(n):bo(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Yt[r.space]}return i}function ma(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=yo(e[r],n);a.parentNode=t,i.push(a)}return i}function fn(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 xf=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],kf=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]),Se="�";var E;(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"})(E||(E={}));const $e={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ao(e){return e>=55296&&e<=57343}function yf(e){return e>=56320&&e<=57343}function Af(e,t){return(e-55296)*1024+9216+t}function Co(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _o(e){return e>=64976&&e<=65007||kf.has(e)}var P;(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"})(P||(P={}));const Cf=65536;class _f{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=Cf,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:r,col:i,offset:a}=this,s=i+n,o=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:o,endOffset:o}}_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(yf(n))return this.pos++,this._addGap(),Af(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,E.EOF;return this._err(P.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 r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,E.EOF;const r=this.html.charCodeAt(n);return r===E.CARRIAGE_RETURN?E.LINE_FEED:r}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,E.EOF;let t=this.html.charCodeAt(this.pos);return t===E.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,E.LINE_FEED):t===E.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ao(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===E.LINE_FEED||t===E.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Co(t)?this._err(P.controlCharacterInInputStream):_o(t)&&this._err(P.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ae;(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"})(ae||(ae={}));function So(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 Sf=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))),wf=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 Nf(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=wf.get(e))!==null&&t!==void 0?t:e}var De;(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"})(De||(De={}));const If=32;var vt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(vt||(vt={}));function Ri(e){return e>=De.ZERO&&e<=De.NINE}function Lf(e){return e>=De.UPPER_A&&e<=De.UPPER_F||e>=De.LOWER_A&&e<=De.LOWER_F}function Rf(e){return e>=De.UPPER_A&&e<=De.UPPER_Z||e>=De.LOWER_A&&e<=De.LOWER_Z||Ri(e)}function vf(e){return e===De.EQUALS||Rf(e)}var ve;(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"})(ve||(ve={}));var kt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(kt||(kt={}));class Df{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ve.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kt.Strict}startEntity(t){this.decodeMode=t,this.state=ve.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ve.EntityStart:return t.charCodeAt(n)===De.NUM?(this.state=ve.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ve.NamedEntity,this.stateNamedEntity(t,n));case ve.NumericStart:return this.stateNumericStart(t,n);case ve.NumericDecimal:return this.stateNumericDecimal(t,n);case ve.NumericHex:return this.stateNumericHex(t,n);case ve.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|If)===De.LOWER_X?(this.state=ve.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ve.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ri(i)||Lf(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ri(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===De.SEMI)this.consumed+=1;else if(this.decodeMode===kt.Strict)return 0;return this.emitCodePoint(Nf(this.result),this.consumed),this.errors&&(t!==De.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&vt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Of(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===kt.Attribute&&(a===0||vf(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&vt.VALUE_LENGTH)>>14,a!==0){if(s===De.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==kt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&vt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~vt.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case ve.NamedEntity:return this.result!==0&&(this.decodeMode!==kt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ve.NumericDecimal:return this.emitNumericEntity(0,2);case ve.NumericHex:return this.emitNumericEntity(0,3);case ve.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ve.EntityStart:return 0}}}function Of(e,t,n,r){const i=(t&vt.BRANCH_LENGTH)>>7,a=t&vt.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const u=r-a;return u<0||u>=i?-1:e[n+u]-1}let s=n,o=s+i-1;for(;s<=o;){const u=s+o>>>1,l=e[u];if(l<r)s=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}var U;(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/"})(U||(U={}));var Gt;(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"})(Gt||(Gt={}));var et;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(et||(et={}));var L;(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"})(L||(L={}));var c;(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"})(c||(c={}));const Pf=new Map([[L.A,c.A],[L.ADDRESS,c.ADDRESS],[L.ANNOTATION_XML,c.ANNOTATION_XML],[L.APPLET,c.APPLET],[L.AREA,c.AREA],[L.ARTICLE,c.ARTICLE],[L.ASIDE,c.ASIDE],[L.B,c.B],[L.BASE,c.BASE],[L.BASEFONT,c.BASEFONT],[L.BGSOUND,c.BGSOUND],[L.BIG,c.BIG],[L.BLOCKQUOTE,c.BLOCKQUOTE],[L.BODY,c.BODY],[L.BR,c.BR],[L.BUTTON,c.BUTTON],[L.CAPTION,c.CAPTION],[L.CENTER,c.CENTER],[L.CODE,c.CODE],[L.COL,c.COL],[L.COLGROUP,c.COLGROUP],[L.DD,c.DD],[L.DESC,c.DESC],[L.DETAILS,c.DETAILS],[L.DIALOG,c.DIALOG],[L.DIR,c.DIR],[L.DIV,c.DIV],[L.DL,c.DL],[L.DT,c.DT],[L.EM,c.EM],[L.EMBED,c.EMBED],[L.FIELDSET,c.FIELDSET],[L.FIGCAPTION,c.FIGCAPTION],[L.FIGURE,c.FIGURE],[L.FONT,c.FONT],[L.FOOTER,c.FOOTER],[L.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[L.FORM,c.FORM],[L.FRAME,c.FRAME],[L.FRAMESET,c.FRAMESET],[L.H1,c.H1],[L.H2,c.H2],[L.H3,c.H3],[L.H4,c.H4],[L.H5,c.H5],[L.H6,c.H6],[L.HEAD,c.HEAD],[L.HEADER,c.HEADER],[L.HGROUP,c.HGROUP],[L.HR,c.HR],[L.HTML,c.HTML],[L.I,c.I],[L.IMG,c.IMG],[L.IMAGE,c.IMAGE],[L.INPUT,c.INPUT],[L.IFRAME,c.IFRAME],[L.KEYGEN,c.KEYGEN],[L.LABEL,c.LABEL],[L.LI,c.LI],[L.LINK,c.LINK],[L.LISTING,c.LISTING],[L.MAIN,c.MAIN],[L.MALIGNMARK,c.MALIGNMARK],[L.MARQUEE,c.MARQUEE],[L.MATH,c.MATH],[L.MENU,c.MENU],[L.META,c.META],[L.MGLYPH,c.MGLYPH],[L.MI,c.MI],[L.MO,c.MO],[L.MN,c.MN],[L.MS,c.MS],[L.MTEXT,c.MTEXT],[L.NAV,c.NAV],[L.NOBR,c.NOBR],[L.NOFRAMES,c.NOFRAMES],[L.NOEMBED,c.NOEMBED],[L.NOSCRIPT,c.NOSCRIPT],[L.OBJECT,c.OBJECT],[L.OL,c.OL],[L.OPTGROUP,c.OPTGROUP],[L.OPTION,c.OPTION],[L.P,c.P],[L.PARAM,c.PARAM],[L.PLAINTEXT,c.PLAINTEXT],[L.PRE,c.PRE],[L.RB,c.RB],[L.RP,c.RP],[L.RT,c.RT],[L.RTC,c.RTC],[L.RUBY,c.RUBY],[L.S,c.S],[L.SCRIPT,c.SCRIPT],[L.SEARCH,c.SEARCH],[L.SECTION,c.SECTION],[L.SELECT,c.SELECT],[L.SOURCE,c.SOURCE],[L.SMALL,c.SMALL],[L.SPAN,c.SPAN],[L.STRIKE,c.STRIKE],[L.STRONG,c.STRONG],[L.STYLE,c.STYLE],[L.SUB,c.SUB],[L.SUMMARY,c.SUMMARY],[L.SUP,c.SUP],[L.TABLE,c.TABLE],[L.TBODY,c.TBODY],[L.TEMPLATE,c.TEMPLATE],[L.TEXTAREA,c.TEXTAREA],[L.TFOOT,c.TFOOT],[L.TD,c.TD],[L.TH,c.TH],[L.THEAD,c.THEAD],[L.TITLE,c.TITLE],[L.TR,c.TR],[L.TRACK,c.TRACK],[L.TT,c.TT],[L.U,c.U],[L.UL,c.UL],[L.SVG,c.SVG],[L.VAR,c.VAR],[L.WBR,c.WBR],[L.XMP,c.XMP]]);function mn(e){var t;return(t=Pf.get(e))!==null&&t!==void 0?t:c.UNKNOWN}const q=c,Mf={[U.HTML]:new Set([q.ADDRESS,q.APPLET,q.AREA,q.ARTICLE,q.ASIDE,q.BASE,q.BASEFONT,q.BGSOUND,q.BLOCKQUOTE,q.BODY,q.BR,q.BUTTON,q.CAPTION,q.CENTER,q.COL,q.COLGROUP,q.DD,q.DETAILS,q.DIR,q.DIV,q.DL,q.DT,q.EMBED,q.FIELDSET,q.FIGCAPTION,q.FIGURE,q.FOOTER,q.FORM,q.FRAME,q.FRAMESET,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HEADER,q.HGROUP,q.HR,q.HTML,q.IFRAME,q.IMG,q.INPUT,q.LI,q.LINK,q.LISTING,q.MAIN,q.MARQUEE,q.MENU,q.META,q.NAV,q.NOEMBED,q.NOFRAMES,q.NOSCRIPT,q.OBJECT,q.OL,q.P,q.PARAM,q.PLAINTEXT,q.PRE,q.SCRIPT,q.SECTION,q.SELECT,q.SOURCE,q.STYLE,q.SUMMARY,q.TABLE,q.TBODY,q.TD,q.TEMPLATE,q.TEXTAREA,q.TFOOT,q.TH,q.THEAD,q.TITLE,q.TR,q.TRACK,q.UL,q.WBR,q.XMP]),[U.MATHML]:new Set([q.MI,q.MO,q.MN,q.MS,q.MTEXT,q.ANNOTATION_XML]),[U.SVG]:new Set([q.TITLE,q.FOREIGN_OBJECT,q.DESC]),[U.XLINK]:new Set,[U.XML]:new Set,[U.XMLNS]:new Set},vi=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]);L.STYLE,L.SCRIPT,L.XMP,L.IFRAME,L.NOEMBED,L.NOFRAMES,L.PLAINTEXT;var x;(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"})(x||(x={}));const Ne={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function Bf(e){return e>=E.DIGIT_0&&e<=E.DIGIT_9}function Rn(e){return e>=E.LATIN_CAPITAL_A&&e<=E.LATIN_CAPITAL_Z}function Ff(e){return e>=E.LATIN_SMALL_A&&e<=E.LATIN_SMALL_Z}function It(e){return Ff(e)||Rn(e)}function bs(e){return It(e)||Bf(e)}function sr(e){return e+32}function wo(e){return e===E.SPACE||e===E.LINE_FEED||e===E.TABULATION||e===E.FORM_FEED}function Es(e){return wo(e)||e===E.SOLIDUS||e===E.GREATER_THAN_SIGN}function Hf(e){return e===E.NULL?P.nullCharacterReference:e>1114111?P.characterReferenceOutsideUnicodeRange:Ao(e)?P.surrogateCharacterReference:_o(e)?P.noncharacterCharacterReference:Co(e)||e===E.CARRIAGE_RETURN?P.controlCharacterReference:null}class Uf{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=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new _f(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Df(Sf,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(P.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(P.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Hf(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,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?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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:ae.START_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ae.END_TAG,tagName:"",tagID:c.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ae.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ae.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 r=this.currentToken;if(So(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(P.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=mn(t.tagName),t.type===ae.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(P.endTagWithAttributes),t.selfClosing&&this._err(P.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 ae.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ae.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ae.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:ae.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=wo(t)?ae.WHITESPACE_CHARACTER:t===E.NULL?ae.NULL_CHARACTER:ae.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ae.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kt.Attribute:kt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case x.DATA:{this._stateData(t);break}case x.RCDATA:{this._stateRcdata(t);break}case x.RAWTEXT:{this._stateRawtext(t);break}case x.SCRIPT_DATA:{this._stateScriptData(t);break}case x.PLAINTEXT:{this._statePlaintext(t);break}case x.TAG_OPEN:{this._stateTagOpen(t);break}case x.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case x.TAG_NAME:{this._stateTagName(t);break}case x.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case x.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case x.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case x.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case x.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case x.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case x.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case x.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case x.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case x.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case x.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case x.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case x.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case x.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case x.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case x.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case x.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case x.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case x.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case x.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case x.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case x.BOGUS_COMMENT:{this._stateBogusComment(t);break}case x.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case x.COMMENT_START:{this._stateCommentStart(t);break}case x.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case x.COMMENT:{this._stateComment(t);break}case x.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case x.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case x.COMMENT_END:{this._stateCommentEnd(t);break}case x.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case x.DOCTYPE:{this._stateDoctype(t);break}case x.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case x.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case x.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case x.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case x.CDATA_SECTION:{this._stateCdataSection(t);break}case x.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case x.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case x.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case x.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=x.TAG_OPEN;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitCodePoint(t);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case E.AMPERSAND:{this._startCharacterReference();break}case E.LESS_THAN_SIGN:{this.state=x.RCDATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Se);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case E.LESS_THAN_SIGN:{this.state=x.RAWTEXT_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Se);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Se);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Se);break}case E.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(It(t))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case E.EXCLAMATION_MARK:{this.state=x.MARKUP_DECLARATION_OPEN;break}case E.SOLIDUS:{this.state=x.END_TAG_OPEN;break}case E.QUESTION_MARK:{this._err(P.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t);break}case E.EOF:{this._err(P.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(P.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(It(t))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case E.GREATER_THAN_SIGN:{this._err(P.missingEndTagName),this.state=x.DATA;break}case E.EOF:{this._err(P.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(P.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.tagName+=Se;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Rn(t)?sr(t):t)}}_stateRcdataLessThanSign(t){t===E.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){It(t)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=x.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 E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case E.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case E.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===E.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){It(t)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case E.SOLIDUS:{this.state=x.SCRIPT_DATA_END_TAG_OPEN;break}case E.EXCLAMATION_MARK:{this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){It(t)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===E.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===E.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Se);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case E.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(Se);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===E.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:It(t)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){It(t)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith($e.SCRIPT,!1)&&Es(this.preprocessor.peek($e.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$e.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this._emitChars(Se);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case E.HYPHEN_MINUS:{this._emitChars("-");break}case E.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case E.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Se);break}case E.EOF:{this._err(P.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===E.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith($e.SCRIPT,!1)&&Es(this.preprocessor.peek($e.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$e.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._err(P.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:case E.SOLIDUS:case E.GREATER_THAN_SIGN:case E.EOF:{this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case E.EQUALS_SIGN:{this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:{this._err(P.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.name+=Se;break}default:this.currentAttr.name+=String.fromCodePoint(Rn(t)?sr(t):t)}}_stateAfterAttributeName(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case E.EQUALS_SIGN:{this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break}default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case E.QUOTATION_MARK:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case E.APOSTROPHE:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case E.AMPERSAND:{this._startCharacterReference();break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),this.currentAttr.value+=Se;break}case E.QUOTATION_MARK:case E.APOSTROPHE:case E.LESS_THAN_SIGN:case E.EQUALS_SIGN:case E.GRAVE_ACCENT:{this._err(P.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case E.SOLIDUS:{this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break}case E.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._err(P.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case E.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case E.EOF:{this._err(P.eofInTag),this._emitEOFToken();break}default:this._err(P.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case E.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.data+=Se;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch($e.DASH_DASH,!0)?(this._createCommentToken($e.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch($e.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation($e.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch($e.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(P.cdataInHtmlContent),this._createCommentToken($e.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(P.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_START_DASH;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptClosingOfEmptyComment),this.state=x.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_END_DASH;break}case E.LESS_THAN_SIGN:{n.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.data+=Se;break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case E.EXCLAMATION_MARK:{n.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break}case E.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===E.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===E.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==E.GREATER_THAN_SIGN&&t!==E.EOF&&this._err(P.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case E.EXCLAMATION_MARK:{this.state=x.COMMENT_END_BANG;break}case E.HYPHEN_MINUS:{n.data+="-";break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case E.HYPHEN_MINUS:{n.data+="--!",this.state=x.COMMENT_END_DASH;break}case E.GREATER_THAN_SIGN:{this._err(P.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(n);break}case E.EOF:{this._err(P.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=x.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case E.EOF:{this._err(P.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Rn(t))this._createDoctypeToken(String.fromCharCode(sr(t))),this.state=x.DOCTYPE_NAME;else switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.NULL:{this._err(P.unexpectedNullCharacter),this._createDoctypeToken(Se),this.state=x.DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(P.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=x.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.AFTER_DOCTYPE_NAME;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.name+=Se;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Rn(t)?sr(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch($e.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch($e.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(P.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.publicId+=Se;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(P.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 E.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.publicId+=Se;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(P.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 E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case E.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.QUOTATION_MARK:{this._err(P.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{this._err(P.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case E.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case E.GREATER_THAN_SIGN:{this._err(P.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case E.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.systemId+=Se;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(P.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 E.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case E.NULL:{this._err(P.unexpectedNullCharacter),n.systemId+=Se;break}case E.GREATER_THAN_SIGN:{this._err(P.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(P.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 E.SPACE:case E.LINE_FEED:case E.TABULATION:case E.FORM_FEED:break;case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.EOF:{this._err(P.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(P.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case E.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case E.NULL:{this._err(P.unexpectedNullCharacter);break}case E.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case E.RIGHT_SQUARE_BRACKET:{this.state=x.CDATA_SECTION_BRACKET;break}case E.EOF:{this._err(P.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===E.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case E.GREATER_THAN_SIGN:{this.state=x.DATA;break}case E.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=x.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(E.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&bs(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){bs(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===E.SEMICOLON&&this._err(P.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const No=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),Ts=new Set([...No,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),xr=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),jf=new Set([...xr,c.OL,c.UL]),qf=new Set([...xr,c.BUTTON]),xs=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),ks=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),zf=new Set([c.TR,c.TEMPLATE,c.HTML]),$f=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),Vf=new Set([c.TABLE,c.TEMPLATE,c.HTML]),Yf=new Set([c.TD,c.TH]);class Wf{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===U.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 r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===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])!==U.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 r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(vi,U.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Yf,U.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Vf,U.HTML)}clearBackToTableBodyContext(){this.clearBackTo($f,U.HTML)}clearBackToTableRowContext(){this.clearBackTo(zf,U.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]===c.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]===c.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case U.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case U.SVG:{if(ks.has(i))return!1;break}case U.MATHML:{if(xs.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,xr)}hasInListItemScope(t){return this.hasInDynamicScope(t,jf)}hasInButtonScope(t){return this.hasInDynamicScope(t,qf)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case U.HTML:{if(vi.has(n))return!0;if(xr.has(n))return!1;break}case U.SVG:{if(ks.has(n))return!1;break}case U.MATHML:{if(xs.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===U.HTML)switch(this.tagIDs[n]){case t:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===U.HTML)switch(this.tagIDs[t]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===U.HTML)switch(this.tagIDs[n]){case t:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&No.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ts.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ts.has(this.currentTagId);)this.pop()}}const ai=3;var ft;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ft||(ft={}));const ys={type:ft.Marker};class Gf{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===ft.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const d=this.treeAdapter.getAttrList(l);d.length===i&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ai)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ai)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const o=r[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=ai&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(ys)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ft.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ft.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(ys);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ft.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ft.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ft.Element&&n.element===t)}}const Lt={createDocument(){return{nodeName:"#document",mode:et.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 r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Lt.appendChild(e,a)}},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(Lt.isTextNode(n)){n.value+=t;return}}Lt.appendChild(e,Lt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Lt.isTextNode(r)?r.value+=t:Lt.insertBefore(e,Lt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},Io="html",Qf="about:legacy-compat",Kf="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Lo=["+//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//"],Xf=[...Lo,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Zf=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ro=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Jf=[...Ro,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function As(e,t){return t.some(n=>e.startsWith(n))}function em(e){return e.name===Io&&e.publicId===null&&(e.systemId===null||e.systemId===Qf)}function tm(e){if(e.name!==Io)return et.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Kf)return et.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Zf.has(n))return et.QUIRKS;let r=t===null?Xf:Lo;if(As(n,r))return et.QUIRKS;if(r=t===null?Ro:Jf,As(n,r))return et.LIMITED_QUIRKS}return et.NO_QUIRKS}const Cs={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},nm="definitionurl",rm="definitionURL",im=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])),am=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:U.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:U.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:U.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:U.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:U.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:U.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:U.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:U.XML}],["xml:space",{prefix:"xml",name:"space",namespace:U.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:U.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:U.XMLNS}]]),sm=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])),um=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR]);function om(e){const t=e.tagID;return t===c.FONT&&e.attrs.some(({name:r})=>r===Gt.COLOR||r===Gt.SIZE||r===Gt.FACE)||um.has(t)}function vo(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===nm){e.attrs[t].name=rm;break}}function Do(e){for(let t=0;t<e.attrs.length;t++){const n=im.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pa(e){for(let t=0;t<e.attrs.length;t++){const n=am.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 lm(e){const t=sm.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=mn(e.tagName))}function cm(e,t){return t===U.MATHML&&(e===c.MI||e===c.MO||e===c.MN||e===c.MS||e===c.MTEXT)}function dm(e,t,n){if(t===U.MATHML&&e===c.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Gt.ENCODING){const i=n[r].value.toLowerCase();return i===Cs.TEXT_HTML||i===Cs.APPLICATION_XML}}return t===U.SVG&&(e===c.FOREIGN_OBJECT||e===c.DESC||e===c.TITLE)}function hm(e,t,n,r){return(!r||r===U.HTML)&&dm(e,t,n)||(!r||r===U.MATHML)&&cm(e,t)}const fm="hidden",mm=8,pm=3;var A;(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"})(A||(A={}));const gm={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Oo=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),_s={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Lt,onParseError:null};class Ss{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=A.INITIAL,this.originalInsertionMode=A.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={..._s,...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 Uf(this.options,this),this.activeFormattingElements=new Gf(this.treeAdapter),this.fragmentContextID=r?mn(this.treeAdapter.getTagName(r)):c.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Wf(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={..._s,...n};t??(t=r.treeAdapter.createElement(L.TEMPLATE,U.HTML,[]));const i=r.treeAdapter.createElement("documentmock",U.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===c.TEMPLATE&&a.tmplInsertionModeStack.unshift(A.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:gm,s={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===U.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,U.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=A.TEXT}switchToPlaintextParsing(){this.insertionMode=A.TEXT,this.originalInsertionMode=A.IN_BODY,this.tokenizer.state=Ne.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)===L.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==U.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Ne.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Ne.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Ne.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=Ne.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,U.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,U.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(L.HTML,U.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===ae.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===c.SVG&&this.treeAdapter.getTagName(n)===L.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===U.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,U.HTML)}_processToken(t){switch(t.type){case ae.CHARACTER:{this.onCharacter(t);break}case ae.NULL_CHARACTER:{this.onNullCharacter(t);break}case ae.COMMENT:{this.onComment(t);break}case ae.DOCTYPE:{this.onDoctype(t);break}case ae.START_TAG:{this._processStartTag(t);break}case ae.END_TAG:{this.onEndTag(t);break}case ae.EOF:{this.onEof(t);break}case ae.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return hm(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===ft.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=A.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=A.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=A.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=A.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=A.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=A.IN_TABLE;return}case c.BODY:{this.insertionMode=A.IN_BODY;return}case c.FRAMESET:{this.insertionMode=A.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?A.AFTER_HEAD:A.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=A.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=A.IN_HEAD;return}break}}this.insertionMode=A.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===c.TEMPLATE)break;if(r===c.TABLE){this.insertionMode=A.IN_SELECT_IN_TABLE;return}}this.insertionMode=A.IN_SELECT}_isElementCausesFosterParenting(t){return Oo.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 c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===U.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case c.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,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 r=this.treeAdapter.getNamespaceURI(t);return Mf[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Yp(this,t);return}switch(this.insertionMode){case A.INITIAL:{yn(this,t);break}case A.BEFORE_HTML:{Mn(this,t);break}case A.BEFORE_HEAD:{Bn(this,t);break}case A.IN_HEAD:{Fn(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Hn(this,t);break}case A.AFTER_HEAD:{Un(this,t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:{Mo(this,t);break}case A.TEXT:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{si(this,t);break}case A.IN_TABLE_TEXT:{qo(this,t);break}case A.IN_COLUMN_GROUP:{kr(this,t);break}case A.AFTER_BODY:{yr(this,t);break}case A.AFTER_AFTER_BODY:{gr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Vp(this,t);return}switch(this.insertionMode){case A.INITIAL:{yn(this,t);break}case A.BEFORE_HTML:{Mn(this,t);break}case A.BEFORE_HEAD:{Bn(this,t);break}case A.IN_HEAD:{Fn(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Hn(this,t);break}case A.AFTER_HEAD:{Un(this,t);break}case A.TEXT:{this._insertCharacters(t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{si(this,t);break}case A.IN_COLUMN_GROUP:{kr(this,t);break}case A.AFTER_BODY:{yr(this,t);break}case A.AFTER_AFTER_BODY:{gr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Di(this,t);return}switch(this.insertionMode){case A.INITIAL:case A.BEFORE_HTML:case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_TEMPLATE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{Di(this,t);break}case A.IN_TABLE_TEXT:{An(this,t);break}case A.AFTER_BODY:{Am(this,t);break}case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{Cm(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case A.INITIAL:{_m(this,t);break}case A.BEFORE_HEAD:case A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:{this._err(t,P.misplacedDoctype);break}case A.IN_TABLE_TEXT:{An(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,P.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Wp(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{yn(this,t);break}case A.BEFORE_HTML:{Sm(this,t);break}case A.BEFORE_HEAD:{Nm(this,t);break}case A.IN_HEAD:{ot(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Rm(this,t);break}case A.AFTER_HEAD:{Dm(this,t);break}case A.IN_BODY:{Be(this,t);break}case A.IN_TABLE:{cn(this,t);break}case A.IN_TABLE_TEXT:{An(this,t);break}case A.IN_CAPTION:{Ip(this,t);break}case A.IN_COLUMN_GROUP:{Ea(this,t);break}case A.IN_TABLE_BODY:{jr(this,t);break}case A.IN_ROW:{qr(this,t);break}case A.IN_CELL:{vp(this,t);break}case A.IN_SELECT:{Vo(this,t);break}case A.IN_SELECT_IN_TABLE:{Op(this,t);break}case A.IN_TEMPLATE:{Mp(this,t);break}case A.AFTER_BODY:{Fp(this,t);break}case A.IN_FRAMESET:{Hp(this,t);break}case A.AFTER_FRAMESET:{jp(this,t);break}case A.AFTER_AFTER_BODY:{zp(this,t);break}case A.AFTER_AFTER_FRAMESET:{$p(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Gp(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case A.INITIAL:{yn(this,t);break}case A.BEFORE_HTML:{wm(this,t);break}case A.BEFORE_HEAD:{Im(this,t);break}case A.IN_HEAD:{Lm(this,t);break}case A.IN_HEAD_NO_SCRIPT:{vm(this,t);break}case A.AFTER_HEAD:{Om(this,t);break}case A.IN_BODY:{Ur(this,t);break}case A.TEXT:{Tp(this,t);break}case A.IN_TABLE:{Vn(this,t);break}case A.IN_TABLE_TEXT:{An(this,t);break}case A.IN_CAPTION:{Lp(this,t);break}case A.IN_COLUMN_GROUP:{Rp(this,t);break}case A.IN_TABLE_BODY:{Oi(this,t);break}case A.IN_ROW:{$o(this,t);break}case A.IN_CELL:{Dp(this,t);break}case A.IN_SELECT:{Yo(this,t);break}case A.IN_SELECT_IN_TABLE:{Pp(this,t);break}case A.IN_TEMPLATE:{Bp(this,t);break}case A.AFTER_BODY:{Go(this,t);break}case A.IN_FRAMESET:{Up(this,t);break}case A.AFTER_FRAMESET:{qp(this,t);break}case A.AFTER_AFTER_BODY:{gr(this,t);break}}}onEof(t){switch(this.insertionMode){case A.INITIAL:{yn(this,t);break}case A.BEFORE_HTML:{Mn(this,t);break}case A.BEFORE_HEAD:{Bn(this,t);break}case A.IN_HEAD:{Fn(this,t);break}case A.IN_HEAD_NO_SCRIPT:{Hn(this,t);break}case A.AFTER_HEAD:{Un(this,t);break}case A.IN_BODY:case A.IN_TABLE:case A.IN_CAPTION:case A.IN_COLUMN_GROUP:case A.IN_TABLE_BODY:case A.IN_ROW:case A.IN_CELL:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:{Uo(this,t);break}case A.TEXT:{xp(this,t);break}case A.IN_TABLE_TEXT:{An(this,t);break}case A.IN_TEMPLATE:{Wo(this,t);break}case A.AFTER_BODY:case A.IN_FRAMESET:case A.AFTER_FRAMESET:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{ba(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===E.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 A.IN_HEAD:case A.IN_HEAD_NO_SCRIPT:case A.AFTER_HEAD:case A.TEXT:case A.IN_COLUMN_GROUP:case A.IN_SELECT:case A.IN_SELECT_IN_TABLE:case A.IN_FRAMESET:case A.AFTER_FRAMESET:{this._insertCharacters(t);break}case A.IN_BODY:case A.IN_CAPTION:case A.IN_CELL:case A.IN_TEMPLATE:case A.AFTER_BODY:case A.AFTER_AFTER_BODY:case A.AFTER_AFTER_FRAMESET:{Po(this,t);break}case A.IN_TABLE:case A.IN_TABLE_BODY:case A.IN_ROW:{si(this,t);break}case A.IN_TABLE_TEXT:{jo(this,t);break}}}}function bm(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):Ho(e,t),n}function Em(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Tm(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==n;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=pm;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=xm(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function xm(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function km(e,t,n){const r=e.treeAdapter.getTagName(t),i=mn(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===U.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ym(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function ga(e,t){for(let n=0;n<mm;n++){const r=bm(e,t);if(!r)break;const i=Em(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Tm(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&km(e,s,a),ym(e,i,r)}}function Di(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Am(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Cm(e,t){e._appendCommentNode(t,e.document)}function ba(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function _m(e,t){e._setDocumentType(t);const n=t.forceQuirks?et.QUIRKS:tm(t);em(t)||e._err(t,P.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=A.BEFORE_HTML}function yn(e,t){e._err(t,P.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,et.QUIRKS),e.insertionMode=A.BEFORE_HTML,e._processToken(t)}function Sm(e,t){t.tagID===c.HTML?(e._insertElement(t,U.HTML),e.insertionMode=A.BEFORE_HEAD):Mn(e,t)}function wm(e,t){const n=t.tagID;(n===c.HTML||n===c.HEAD||n===c.BODY||n===c.BR)&&Mn(e,t)}function Mn(e,t){e._insertFakeRootElement(),e.insertionMode=A.BEFORE_HEAD,e._processToken(t)}function Nm(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.HEAD:{e._insertElement(t,U.HTML),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD;break}default:Bn(e,t)}}function Im(e,t){const n=t.tagID;n===c.HEAD||n===c.BODY||n===c.HTML||n===c.BR?Bn(e,t):e._err(t,P.endTagWithoutMatchingOpenElement)}function Bn(e,t){e._insertFakeElement(L.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=A.IN_HEAD,e._processToken(t)}function ot(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case c.TITLE:{e._switchToTextParsing(t,Ne.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ne.RAWTEXT):(e._insertElement(t,U.HTML),e.insertionMode=A.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,Ne.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,Ne.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=A.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(A.IN_TEMPLATE);break}case c.HEAD:{e._err(t,P.misplacedStartTagForHeadElement);break}default:Fn(e,t)}}function Lm(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=A.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{Fn(e,t);break}case c.TEMPLATE:{Jt(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function Jt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,P.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,P.endTagWithoutMatchingOpenElement)}function Fn(e,t){e.openElements.pop(),e.insertionMode=A.AFTER_HEAD,e._processToken(t)}function Rm(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{ot(e,t);break}case c.NOSCRIPT:{e._err(t,P.nestedNoscriptInHead);break}default:Hn(e,t)}}function vm(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=A.IN_HEAD;break}case c.BR:{Hn(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function Hn(e,t){const n=t.type===ae.EOF?P.openElementsLeftAfterEof:P.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=A.IN_HEAD,e._processToken(t)}function Dm(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.BODY:{e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=A.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,U.HTML),e.insertionMode=A.IN_FRAMESET;break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{e._err(t,P.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),ot(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,P.misplacedStartTagForHeadElement);break}default:Un(e,t)}}function Om(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{Un(e,t);break}case c.TEMPLATE:{Jt(e,t);break}default:e._err(t,P.endTagWithoutMatchingOpenElement)}}function Un(e,t){e._insertFakeElement(L.BODY,c.BODY),e.insertionMode=A.IN_BODY,Hr(e,t)}function Hr(e,t){switch(t.type){case ae.CHARACTER:{Mo(e,t);break}case ae.WHITESPACE_CHARACTER:{Po(e,t);break}case ae.COMMENT:{Di(e,t);break}case ae.START_TAG:{Be(e,t);break}case ae.END_TAG:{Ur(e,t);break}case ae.EOF:{Uo(e,t);break}}}function Po(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Mo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Pm(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Mm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Bm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,U.HTML),e.insertionMode=A.IN_FRAMESET)}function Fm(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,U.HTML)}function Hm(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&vi.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,U.HTML)}function Um(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function jm(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,U.HTML),n||(e.formElement=e.openElements.current))}function qm(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===c.LI&&i===c.LI||(n===c.DD||n===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,U.HTML)}function zm(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.tokenizer.state=Ne.PLAINTEXT}function $m(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.framesetOk=!1}function Vm(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(L.A);n&&(ga(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ym(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(ga(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,U.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Qm(e,t){e.treeAdapter.getDocumentMode(e.document)!==et.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=A.IN_TABLE}function Bo(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,U.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Fo(e){const t=So(e,Gt.TYPE);return t!=null&&t.toLowerCase()===fm}function Km(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,U.HTML),Fo(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Xm(e,t){e._appendElement(t,U.HTML),t.ackSelfClosing=!0}function Zm(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,U.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jm(e,t){t.tagName=L.IMG,t.tagID=c.IMG,Bo(e,t)}function ep(e,t){e._insertElement(t,U.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ne.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=A.TEXT}function tp(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ne.RAWTEXT)}function np(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ne.RAWTEXT)}function ws(e,t){e._switchToTextParsing(t,Ne.RAWTEXT)}function rp(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===A.IN_TABLE||e.insertionMode===A.IN_CAPTION||e.insertionMode===A.IN_TABLE_BODY||e.insertionMode===A.IN_ROW||e.insertionMode===A.IN_CELL?A.IN_SELECT_IN_TABLE:A.IN_SELECT}function ip(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML)}function ap(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,U.HTML)}function sp(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,U.HTML)}function up(e,t){e._reconstructActiveFormattingElements(),vo(t),pa(t),t.selfClosing?e._appendElement(t,U.MATHML):e._insertElement(t,U.MATHML),t.ackSelfClosing=!0}function op(e,t){e._reconstructActiveFormattingElements(),Do(t),pa(t),t.selfClosing?e._appendElement(t,U.SVG):e._insertElement(t,U.SVG),t.ackSelfClosing=!0}function Ns(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,U.HTML)}function Be(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:{Ym(e,t);break}case c.A:{Vm(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{Hm(e,t);break}case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{Fm(e,t);break}case c.LI:case c.DD:case c.DT:{qm(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{Bo(e,t);break}case c.HR:{Zm(e,t);break}case c.RB:case c.RTC:{ap(e,t);break}case c.RT:case c.RP:{sp(e,t);break}case c.PRE:case c.LISTING:{Um(e,t);break}case c.XMP:{tp(e,t);break}case c.SVG:{op(e,t);break}case c.HTML:{Pm(e,t);break}case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:{ot(e,t);break}case c.BODY:{Mm(e,t);break}case c.FORM:{jm(e,t);break}case c.NOBR:{Wm(e,t);break}case c.MATH:{up(e,t);break}case c.TABLE:{Qm(e,t);break}case c.INPUT:{Km(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{Xm(e,t);break}case c.IMAGE:{Jm(e,t);break}case c.BUTTON:{$m(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{Gm(e,t);break}case c.IFRAME:{np(e,t);break}case c.SELECT:{rp(e,t);break}case c.OPTION:case c.OPTGROUP:{ip(e,t);break}case c.NOEMBED:case c.NOFRAMES:{ws(e,t);break}case c.FRAMESET:{Bm(e,t);break}case c.TEXTAREA:{ep(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?ws(e,t):Ns(e,t);break}case c.PLAINTEXT:{zm(e,t);break}case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:Ns(e,t)}}function lp(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cp(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=A.AFTER_BODY,Go(e,t))}function dp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function hp(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):n&&e.openElements.remove(n))}function fp(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(L.P,c.P),e._closePElement()}function mp(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function pp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function gp(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function bp(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ep(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(L.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function Ho(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(r===s&&(r!==c.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,s))break}}function Ur(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:{ga(e,t);break}case c.P:{fp(e);break}case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{dp(e,t);break}case c.LI:{mp(e);break}case c.DD:case c.DT:{pp(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{gp(e);break}case c.BR:{Ep(e);break}case c.BODY:{lp(e,t);break}case c.HTML:{cp(e,t);break}case c.FORM:{hp(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{bp(e,t);break}case c.TEMPLATE:{Jt(e,t);break}default:Ho(e,t)}}function Uo(e,t){e.tmplInsertionModeStack.length>0?Wo(e,t):ba(e,t)}function Tp(e,t){var n;t.tagID===c.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function xp(e,t){e._err(t,P.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function si(e,t){if(e.openElements.currentTagId!==void 0&&Oo.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=A.IN_TABLE_TEXT,t.type){case ae.CHARACTER:{qo(e,t);break}case ae.WHITESPACE_CHARACTER:{jo(e,t);break}}else Kn(e,t)}function kp(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,U.HTML),e.insertionMode=A.IN_CAPTION}function yp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,U.HTML),e.insertionMode=A.IN_COLUMN_GROUP}function Ap(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.COLGROUP,c.COLGROUP),e.insertionMode=A.IN_COLUMN_GROUP,Ea(e,t)}function Cp(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,U.HTML),e.insertionMode=A.IN_TABLE_BODY}function _p(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.TBODY,c.TBODY),e.insertionMode=A.IN_TABLE_BODY,jr(e,t)}function Sp(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wp(e,t){Fo(t)?e._appendElement(t,U.HTML):Kn(e,t),t.ackSelfClosing=!0}function Np(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,U.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function cn(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{_p(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{ot(e,t);break}case c.COL:{Ap(e,t);break}case c.FORM:{Np(e,t);break}case c.TABLE:{Sp(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{Cp(e,t);break}case c.INPUT:{wp(e,t);break}case c.CAPTION:{kp(e,t);break}case c.COLGROUP:{yp(e,t);break}default:Kn(e,t)}}function Vn(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{Jt(e,t);break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Kn(e,t)}}function Kn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Hr(e,t),e.fosterParentingEnabled=n}function jo(e,t){e.pendingCharacterTokens.push(t)}function qo(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function An(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Kn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const zo=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]);function Ip(e,t){const n=t.tagID;zo.has(n)?e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,cn(e,t)):Be(e,t)}function Lp(e,t){const n=t.tagID;switch(n){case c.CAPTION:case c.TABLE:{e.openElements.hasInTableScope(c.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_TABLE,n===c.TABLE&&Vn(e,t));break}case c.BODY:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:Ur(e,t)}}function Ea(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.COL:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case c.TEMPLATE:{ot(e,t);break}default:kr(e,t)}}function Rp(e,t){switch(t.tagID){case c.COLGROUP:{e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TEMPLATE:{Jt(e,t);break}case c.COL:break;default:kr(e,t)}}function kr(e,t){e.openElements.currentTagId===c.COLGROUP&&(e.openElements.pop(),e.insertionMode=A.IN_TABLE,e._processToken(t))}function jr(e,t){switch(t.tagID){case c.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,U.HTML),e.insertionMode=A.IN_ROW;break}case c.TH:case c.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(L.TR,c.TR),e.insertionMode=A.IN_ROW,qr(e,t);break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,cn(e,t));break}default:cn(e,t)}}function Oi(e,t){const n=t.tagID;switch(t.tagID){case c.TBODY:case c.TFOOT:case c.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE);break}case c.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE,Vn(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:case c.TR:break;default:Vn(e,t)}}function qr(e,t){switch(t.tagID){case c.TH:case c.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,U.HTML),e.insertionMode=A.IN_CELL,e.activeFormattingElements.insertMarker();break}case c.CAPTION:case c.COL:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,jr(e,t));break}default:cn(e,t)}}function $o(e,t){switch(t.tagID){case c.TR:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY);break}case c.TABLE:{e.openElements.hasInTableScope(c.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Oi(e,t));break}case c.TBODY:case c.TFOOT:case c.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(c.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=A.IN_TABLE_BODY,Oi(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TD:case c.TH:break;default:Vn(e,t)}}function vp(e,t){const n=t.tagID;zo.has(n)?(e.openElements.hasInTableScope(c.TD)||e.openElements.hasInTableScope(c.TH))&&(e._closeTableCell(),qr(e,t)):Be(e,t)}function Dp(e,t){const n=t.tagID;switch(n){case c.TD:case c.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=A.IN_ROW);break}case c.TABLE:case c.TBODY:case c.TFOOT:case c.THEAD:case c.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),$o(e,t));break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:break;default:Ur(e,t)}}function Vo(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._insertElement(t,U.HTML);break}case c.OPTGROUP:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._insertElement(t,U.HTML);break}case c.HR:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop(),e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case c.INPUT:case c.KEYGEN:case c.TEXTAREA:case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),t.tagID!==c.SELECT&&e._processStartTag(t));break}case c.SCRIPT:case c.TEMPLATE:{ot(e,t);break}}}function Yo(e,t){switch(t.tagID){case c.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break}case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break}case c.TEMPLATE:{Jt(e,t);break}}}function Op(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Vo(e,t)}function Pp(e,t){const n=t.tagID;n===c.CAPTION||n===c.TABLE||n===c.TBODY||n===c.TFOOT||n===c.THEAD||n===c.TR||n===c.TD||n===c.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Yo(e,t)}function Mp(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{ot(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=A.IN_TABLE,e.insertionMode=A.IN_TABLE,cn(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=A.IN_COLUMN_GROUP,e.insertionMode=A.IN_COLUMN_GROUP,Ea(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=A.IN_TABLE_BODY,e.insertionMode=A.IN_TABLE_BODY,jr(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=A.IN_ROW,e.insertionMode=A.IN_ROW,qr(e,t);break}default:e.tmplInsertionModeStack[0]=A.IN_BODY,e.insertionMode=A.IN_BODY,Be(e,t)}}function Bp(e,t){t.tagID===c.TEMPLATE&&Jt(e,t)}function Wo(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ba(e,t)}function Fp(e,t){t.tagID===c.HTML?Be(e,t):yr(e,t)}function Go(e,t){var n;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=A.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else yr(e,t)}function yr(e,t){e.insertionMode=A.IN_BODY,Hr(e,t)}function Hp(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.FRAMESET:{e._insertElement(t,U.HTML);break}case c.FRAME:{e._appendElement(t,U.HTML),t.ackSelfClosing=!0;break}case c.NOFRAMES:{ot(e,t);break}}}function Up(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=A.AFTER_FRAMESET))}function jp(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.NOFRAMES:{ot(e,t);break}}}function qp(e,t){t.tagID===c.HTML&&(e.insertionMode=A.AFTER_AFTER_FRAMESET)}function zp(e,t){t.tagID===c.HTML?Be(e,t):gr(e,t)}function gr(e,t){e.insertionMode=A.IN_BODY,Hr(e,t)}function $p(e,t){switch(t.tagID){case c.HTML:{Be(e,t);break}case c.NOFRAMES:{ot(e,t);break}}}function Vp(e,t){t.chars=Se,e._insertCharacters(t)}function Yp(e,t){e._insertCharacters(t),e.framesetOk=!1}function Qo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==U.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Wp(e,t){if(om(t))Qo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===U.MATHML?vo(t):r===U.SVG&&(lm(t),Do(t)),pa(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Gp(e,t){if(t.tagID===c.P||t.tagID===c.BR){Qo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===U.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}L.AREA,L.BASE,L.BASEFONT,L.BGSOUND,L.BR,L.COL,L.EMBED,L.FRAME,L.HR,L.IMG,L.INPUT,L.KEYGEN,L.LINK,L.META,L.PARAM,L.SOURCE,L.TRACK,L.WBR;const zr=Ko("end"),mt=Ko("start");function Ko(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Xo(e){const t=mt(e),n=zr(e);if(t&&n)return{start:t,end:n}}const Qp=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Kp=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Is={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Zo(e,t){const n=s0(e),r=ko("type",{handlers:{root:Xp,element:Zp,text:Jp,comment:el,doctype:e0,raw:n0},unknown:r0}),i={parser:n?new Ss(Is):Ss.getFragmentParser(void 0,Is),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),pn(i,mt());const a=n?i.parser.document:i.parser.getFragment(),s=uf(a,{file:i.options.file});return i.stitches&&ut(s,"comment",function(o,u,l){const d=o;if(d.value.stitch&&l&&u!==void 0){const h=l.children;return h[u]=d.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Jo(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Xp(e,t){Jo(e.children,t)}function Zp(e,t){i0(e,t),Jo(e.children,t),a0(e,t)}function Jp(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ae.CHARACTER,chars:e.value,location:Xn(e)};pn(t,mt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function e0(e,t){const n={type:ae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Xn(e)};pn(t,mt(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function t0(e,t){t.stitches=!0;const n=u0(e);if("children"in e&&"children"in n){const r=Zo({type:"root",children:e.children},t.options);n.children=r.children}el({type:"comment",value:{stitch:n}},t)}function el(e,t){const n=e.value,r={type:ae.COMMENT,data:n,location:Xn(e)};pn(t,mt(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function n0(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,tl(t,mt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Qp,"<$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 r0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))t0(n,t);else{let r="";throw Kp.has(n.type)&&(r=". 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"+r)}}function pn(e,t){tl(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=Ne.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 tl(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 i0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ne.PLAINTEXT)return;pn(t,mt(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Yt.html;i===Yt.html&&n==="svg"&&(i=Yt.svg);const a=hf({...e,children:[]},{space:i===Yt.svg?"svg":"html"}),s={type:ae.START_TAG,tagName:n,tagID:mn(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Xn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function a0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&xf.includes(n)||t.parser.tokenizer.state===Ne.PLAINTEXT)return;pn(t,zr(e));const r={type:ae.END_TAG,tagName:n,tagID:mn(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Xn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ne.RCDATA||t.parser.tokenizer.state===Ne.RAWTEXT||t.parser.tokenizer.state===Ne.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ne.DATA)}function s0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Xn(e){const t=mt(e)||{line:void 0,column:void 0,offset:void 0},n=zr(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 u0(e){return"children"in e?Qt({...e,children:[]}):Qt(e)}function Pi(e){return function(t,n){return Zo(t,{...e,file:n})}}const Ht=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],zt={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ht,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ht],h2:[["className","sr-only"]],img:[...Ht,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ht,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ht],table:[...Ht],ul:[...Ht,["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"]},Rt={}.hasOwnProperty;function o0(e,t){let n={type:"root",children:[]};const r={schema:t?{...zt,...t}:zt,stack:[]},i=nl(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function nl(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return l0(e,n);case"doctype":return c0(e,n);case"element":return d0(e,n);case"root":return h0(e,n);case"text":return f0(e,n)}}}function l0(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Zn(a,t),a}}function c0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Zn(n,t),n}}function d0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=rl(e,t.children),i=m0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Rt.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(a=!1;++u<o.length;)e.stack.includes(o[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:i,children:r};return Zn(s,t),s}function h0(e,t){const r={type:"root",children:rl(e,t.children)};return Zn(r,t),r}function f0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Zn(r,t),r}function rl(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=nl(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function m0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Rt.call(r,n)?r[n]:void 0,s=r&&Rt.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(Rt.call(o,l)){const d=o[l];let h=Ls(e,Rs(a,l),l,d);h==null&&(h=Ls(e,Rs(s,l),l,d)),h!=null&&(u[l]=h)}if(i&&Rt.call(i,n)){const d=i[n];for(l in d)Rt.call(d,l)&&!Rt.call(u,l)&&(u[l]=d[l])}return u}function Ls(e,t,n,r){return t?Array.isArray(r)?p0(e,t,n,r):il(e,t,n,r):void 0}function p0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=il(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function il(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&g0(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){i=!0;break}}else if(s===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function g0(e,t,n){const r=e.schema.protocols&&Rt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||s>-1&&a>s||o>-1&&a>o)return!0;let l=-1;for(;++l<r.length;){const d=r[l];if(a===d.length&&i.slice(0,d.length)===d)return!0}return!1}function Zn(e,t){const n=Xo(t);t.data&&(e.data=Qt(t.data)),n&&(e.position=n)}function Rs(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function al(e){return function(t){return o0(t,e)}}function vs(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const je=Mt(/[A-Za-z]/),Me=Mt(/[\dA-Za-z]/),b0=Mt(/[#-'*+\--9=?A-Z^-~]/);function Ar(e){return e!==null&&(e<32||e===127)}const Mi=Mt(/\d/),E0=Mt(/[\dA-Fa-f]/),T0=Mt(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function Te(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const $r=Mt(/\p{P}|\p{S}/u),Kt=Mt(/\s/);function Mt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function x0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function k0(e,t,n){const i=Or((n||{}).ignore||[]),a=y0(t);let s=-1;for(;++s<a.length;)Mr(e,"text",o);function o(l,d){let h=-1,p;for(;++h<d.length;){const m=d[h],g=p?p.children:void 0;if(i(m,g?g.indexOf(m):void 0,p))return;p=m}if(p)return u(l,d)}function u(l,d){const h=d[d.length-1],p=a[s][0],m=a[s][1];let g=0;const S=h.children.indexOf(l);let k=!1,C=[];p.lastIndex=0;let w=p.exec(l.value);for(;w;){const R=w.index,M={index:w.index,input:w.input,stack:[...d,l]};let N=m(...w,M);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=R+1:(g!==R&&C.push({type:"text",value:l.value.slice(g,R)}),Array.isArray(N)?C.push(...N):N&&C.push(N),g=R+w[0].length,k=!0),!p.global)break;w=p.exec(l.value)}return k?(g<l.value.length&&C.push({type:"text",value:l.value.slice(g)}),h.children.splice(S,1,...C)):C=[l],S+C.length}}function y0(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([A0(i[0]),C0(i[1])])}return t}function A0(e){return typeof e=="string"?new RegExp(x0(e),"g"):e}function C0(e){return typeof e=="function"?e:function(){return e}}const ui="phrasing",oi=["autolink","link","image","label"];function _0(){return{transforms:[v0],enter:{literalAutolink:w0,literalAutolinkEmail:li,literalAutolinkHttp:li,literalAutolinkWww:li},exit:{literalAutolink:R0,literalAutolinkEmail:L0,literalAutolinkHttp:N0,literalAutolinkWww:I0}}}function S0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ui,notInConstruct:oi},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ui,notInConstruct:oi},{character:":",before:"[ps]",after:"\\/",inConstruct:ui,notInConstruct:oi}]}}function w0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function li(e){this.config.enter.autolinkProtocol.call(this,e)}function N0(e){this.config.exit.autolinkProtocol.call(this,e)}function I0(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 L0(e){this.config.exit.autolinkEmail.call(this,e)}function R0(e){this.exit(e)}function v0(e){k0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,D0],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,O0]],{ignore:["link","linkReference"]})}function D0(e,t,n,r,i){let a="";if(!sl(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!P0(n)))return!1;const s=M0(n+r);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function O0(e,t,n,r){return!sl(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function P0(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 M0(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=vs(e,"(");let a=vs(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function sl(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Kt(n)||$r(n))&&(!t||n!==47)}function st(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ul.peek=V0;function B0(){this.buffer()}function F0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H0(){this.buffer()}function U0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function j0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=st(this.sliceSerialize(e)).toLowerCase(),n.label=t}function q0(e){this.exit(e)}function z0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=st(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $0(e){this.exit(e)}function V0(){return"["}function ul(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),o=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function Y0(){return{enter:{gfmFootnoteCallString:B0,gfmFootnoteCall:F0,gfmFootnoteDefinitionLabelString:H0,gfmFootnoteDefinition:U0},exit:{gfmFootnoteCallString:j0,gfmFootnoteCall:q0,gfmFootnoteDefinitionLabelString:z0,gfmFootnoteDefinition:$0}}}function W0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ul},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const l=a.enter("footnoteDefinition"),d=a.enter("label");return u+=o.move(a.safe(a.associationId(r),{before:u,after:"]"})),d(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
|
|
108
|
+
`:" ")+a.indentLines(a.containerFlow(r,o.current()),t?ol:G0))),l(),u}}function G0(e,t,n){return t===0?e:ol(e,t,n)}function ol(e,t,n){return(n?"":" ")+e}const Q0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ll.peek=eg;function K0(){return{canContainEols:["delete"],enter:{strikethrough:Z0},exit:{strikethrough:J0}}}function X0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Q0}],handlers:{delete:ll}}}function Z0(e){this.enter({type:"delete",children:[]},e)}function J0(e){this.exit(e)}function ll(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function eg(){return"~"}function tg(e){return e.length}function ng(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||tg,a=[],s=[],o=[],u=[];let l=0,d=-1;for(;++d<e.length;){const y=[],S=[];let k=-1;for(e[d].length>l&&(l=e[d].length);++k<e[d].length;){const C=rg(e[d][k]);if(n.alignDelimiters!==!1){const w=i(C);S[k]=w,(u[k]===void 0||w>u[k])&&(u[k]=w)}y.push(C)}s[d]=y,o[d]=S}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<l;)a[h]=Ds(r[h]);else{const y=Ds(r);for(;++h<l;)a[h]=y}h=-1;const p=[],m=[];for(;++h<l;){const y=a[h];let S="",k="";y===99?(S=":",k=":"):y===108?S=":":y===114&&(k=":");let C=n.alignDelimiters===!1?1:Math.max(1,u[h]-S.length-k.length);const w=S+"-".repeat(C)+k;n.alignDelimiters!==!1&&(C=S.length+C+k.length,C>u[h]&&(u[h]=C),m[h]=C),p[h]=w}s.splice(1,0,p),o.splice(1,0,m),d=-1;const g=[];for(;++d<s.length;){const y=s[d],S=o[d];h=-1;const k=[];for(;++h<l;){const C=y[h]||"";let w="",R="";if(n.alignDelimiters!==!1){const M=u[h]-(S[h]||0),N=a[h];N===114?w=" ".repeat(M):N===99?M%2?(w=" ".repeat(M/2+.5),R=" ".repeat(M/2-.5)):(w=" ".repeat(M/2),R=w):R=" ".repeat(M)}n.delimiterStart!==!1&&!h&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||h)&&k.push(" "),n.alignDelimiters!==!1&&k.push(w),k.push(C),n.alignDelimiters!==!1&&k.push(R),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||h!==l-1)&&k.push("|")}g.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return g.join(`
|
|
109
|
+
`)}function rg(e){return e==null?"":String(e)}function Ds(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ig(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const s=n.indentLines(n.containerFlow(e,a.current()),ag);return i(),s}function ag(e,t,n){return">"+(n?"":" ")+e}function sg(e,t){return Os(e,t.inConstruct,!0)&&!Os(e,t.notInConstruct,!1)}function Os(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ps(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
110
|
+
`&&sg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
111
|
+
`}function ug(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>s&&(s=a):a=1,i=r+t.length,r=n.indexOf(t,i);return s}function og(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 lg(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 cg(e,t,n,r){const i=lg(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(og(e,n)){const h=n.enter("codeIndented"),p=n.indentLines(a,dg);return h(),p}const o=n.createTracker(r),u=i.repeat(Math.max(ug(a,i)+1,3)),l=n.enter("codeFenced");let d=o.move(u);if(e.lang){const h=n.enter(`codeFencedLang${s}`);d+=o.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...o.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);d+=o.move(" "),d+=o.move(n.safe(e.meta,{before:d,after:`
|
|
112
|
+
`,encode:["`"],...o.current()})),h()}return d+=o.move(`
|
|
113
|
+
`),a&&(d+=o.move(a+`
|
|
114
|
+
`)),d+=o.move(u),l(),d}function dg(e,t,n){return(n?"":" ")+e}function Ta(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 hg(e,t,n,r){const i=Ta(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
|
|
115
|
+
`,...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),s(),l}function fg(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 Yn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function dn(e){if(e===null||Te(e)||Kt(e))return 1;if($r(e))return 2}function Cr(e,t,n){const r=dn(e),i=dn(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}cl.peek=mg;function cl(e,t,n,r){const i=fg(n),a=n.enter("emphasis"),s=n.createTracker(r),o=s.move(i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),d=Cr(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Yn(l)+u.slice(1));const h=u.charCodeAt(u.length-1),p=Cr(r.after.charCodeAt(0),h,i);p.inside&&(u=u.slice(0,-1)+Yn(h));const m=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+u+m}function mg(e,t,n){return n.options.emphasis||"*"}const pg={};function xa(e,t){const n=pg,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return dl(e,r,i)}function dl(e,t,n){if(gg(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 Ms(e.children,t,n)}return Array.isArray(e)?Ms(e,t,n):""}function Ms(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=dl(e[i],t,n);return r.join("")}function gg(e){return!!(e&&typeof e=="object")}function bg(e,t){let n=!1;return ut(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,wi}),!!((!e.depth||e.depth<3)&&xa(e)&&(t.options.setext||n))}function Eg(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(bg(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),p=n.containerPhrasing(e,{...a.current(),before:`
|
|
116
|
+
`,after:`
|
|
117
|
+
`});return h(),d(),p+`
|
|
118
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
119
|
+
`))+1))}const s="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");a.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
|
|
120
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=Yn(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),u(),o(),l}hl.peek=Tg;function hl(e){return e.value||""}function Tg(){return"<"}fl.peek=xg;function fl(e,t,n,r){const i=Ta(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),s(),l}function xg(){return"!"}ml.peek=kg;function ml(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!l||l!==h?u+=o.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function kg(){return"!"}pl.peek=yg;function pl(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const s=n.unsafe[a],o=n.compilePattern(s);let u;if(s.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function yg(){return"`"}function gl(e,t){const n=xa(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))}bl.peek=Ag;function bl(e,t,n,r){const i=Ta(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let o,u;if(gl(e,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),o(),n.stack=d,h}o=n.enter("link"),u=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=n.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),o(),l}function Ag(e,t,n){return gl(e,n)?"<":"["}El.peek=Cg;function El(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return s(),n.stack=d,a(),i==="full"||!l||l!==h?u+=o.move(h+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Cg(){return"["}function ka(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 _g(e){const t=ka(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 Sg(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 Tl(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 wg(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Sg(n):ka(n);const o=e.ordered?s==="."?")":".":_g(n);let u=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.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&&(u=!0),Tl(n)===s&&d){let h=-1;for(;++h<e.children.length;){const p=e.children[h];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(s=o),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),l}function Ng(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 Ig(e,t,n,r){const i=Ng(n);let a=n.bulletCurrent||ka(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=n.createTracker(r);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),d);return u(),l;function d(h,p,m){return p?(m?"":" ".repeat(s))+h:(m?a:a+" ".repeat(s-a.length))+h}}function Lg(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Rg=Or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vg(e,t,n,r){return(e.children.some(function(s){return Rg(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Dg(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}xl.peek=Og;function xl(e,t,n,r){const i=Dg(n),a=n.enter("strong"),s=n.createTracker(r),o=s.move(i+i);let u=s.move(n.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),d=Cr(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Yn(l)+u.slice(1));const h=u.charCodeAt(u.length-1),p=Cr(r.after.charCodeAt(0),h,i);p.inside&&(u=u.slice(0,-1)+Yn(h));const m=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:d.outside},o+u+m}function Og(e,t,n){return n.options.strong||"*"}function Pg(e,t,n,r){return n.safe(e.value,r)}function Mg(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 Bg(e,t,n){const r=(Tl(n)+(n.options.ruleSpaces?" ":"")).repeat(Mg(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kl={blockquote:ig,break:Ps,code:cg,definition:hg,emphasis:cl,hardBreak:Ps,heading:Eg,html:hl,image:fl,imageReference:ml,inlineCode:pl,link:bl,linkReference:El,list:wg,listItem:Ig,paragraph:Lg,root:vg,strong:xl,text:Pg,thematicBreak:Bg},Bs={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
|
|
121
|
+
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Fg={}.hasOwnProperty;function ya(e){return Fg.call(Bs,e)?Bs[e]:!1}function yl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Hg=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ug(e){return e.replace(Hg,jg)}function jg(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return yl(n.slice(a?2:1),a?16:10)}return ya(n)||e}function qg(){return{enter:{table:zg,tableData:Fs,tableHeader:Fs,tableRow:Vg},exit:{codeText:Yg,table:$g,tableData:ci,tableHeader:ci,tableRow:ci}}}function zg(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 $g(e){this.exit(e),this.data.inTable=void 0}function Vg(e){this.enter({type:"tableRow",children:[]},e)}function ci(e){this.exit(e)}function Fs(e){this.enter({type:"tableCell",children:[]},e)}function Yg(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Wg));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Wg(e,t){return t==="|"?t:e}function Gg(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
122
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:s,tableCell:u,tableRow:o}};function s(m,g,y,S){return l(d(m,y,S),m.align)}function o(m,g,y,S){const k=h(m,y,S),C=l([k]);return C.slice(0,C.indexOf(`
|
|
123
|
+
`))}function u(m,g,y,S){const k=y.enter("tableCell"),C=y.enter("phrasing"),w=y.containerPhrasing(m,{...S,before:a,after:a});return C(),k(),w}function l(m,g){return ng(m,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(m,g,y){const S=m.children;let k=-1;const C=[],w=g.enter("table");for(;++k<S.length;)C[k]=h(S[k],g,y);return w(),C}function h(m,g,y){const S=m.children;let k=-1;const C=[],w=g.enter("tableRow");for(;++k<S.length;)C[k]=u(S[k],m,g,y);return w(),C}function p(m,g,y){let S=kl.inlineCode(m,g,y);return y.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Qg(){return{exit:{taskListCheckValueChecked:Hs,taskListCheckValueUnchecked:Hs,paragraph:Xg}}}function Kg(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Zg}}}function Hs(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Xg(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Zg(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);a&&o.move(s);let u=kl.listItem(e,t,n,{...r,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+s}}function Jg(){return[_0(),Y0(),K0(),qg(),Qg()]}function e1(e){return{extensions:[S0(),W0(e),X0(),Gg(e),Kg()]}}function Ke(e,t,n,r){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);a<r.length;)s=r.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function tt(e,t){return e.length>0?(Ke(e,e.length,0,t),e):t}const Us={}.hasOwnProperty;function Al(e){const t={};let n=-1;for(;++n<e.length;)t1(t,e[n]);return t}function t1(e,t){let n;for(n in t){const i=(Us.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Us.call(i,s)||(i[s]=[]);const o=a[s];n1(i[s],Array.isArray(o)?o:o?[o]:[])}}}function n1(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Ke(e,0,0,r)}const r1={tokenize:l1,partial:!0},Cl={tokenize:c1,partial:!0},_l={tokenize:d1,partial:!0},Sl={tokenize:h1,partial:!0},i1={tokenize:f1,partial:!0},wl={name:"wwwAutolink",tokenize:u1,previous:Il},Nl={name:"protocolAutolink",tokenize:o1,previous:Ll},Ct={name:"emailAutolink",tokenize:s1,previous:Rl},pt={};function a1(){return{text:pt}}let Ut=48;for(;Ut<123;)pt[Ut]=Ct,Ut++,Ut===58?Ut=65:Ut===91&&(Ut=97);pt[43]=Ct;pt[45]=Ct;pt[46]=Ct;pt[95]=Ct;pt[72]=[Ct,Nl];pt[104]=[Ct,Nl];pt[87]=[Ct,wl];pt[119]=[Ct,wl];function s1(e,t,n){const r=this;let i,a;return s;function s(h){return!Bi(h)||!Rl.call(r,r.previous)||Aa(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return Bi(h)?(e.consume(h),o):h===64?(e.consume(h),u):n(h)}function u(h){return h===46?e.check(i1,d,l)(h):h===45||h===95||Me(h)?(a=!0,e.consume(h),u):d(h)}function l(h){return e.consume(h),i=!0,u}function d(h){return a&&i&&je(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function u1(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Il.call(r,r.previous)||Aa(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(r1,e.attempt(Cl,e.attempt(_l,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function o1(e,t,n){const r=this;let i="",a=!1;return s;function s(h){return(h===72||h===104)&&Ll.call(r,r.previous)&&!Aa(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),o):n(h)}function o(h){if(je(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(h),u}return n(h)}function u(h){return h===47?(e.consume(h),a?l:(a=!0,u)):n(h)}function l(h){return h===null||Ar(h)||Te(h)||Kt(h)||$r(h)?n(h):e.attempt(Cl,e.attempt(_l,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function l1(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),a):n(s)}function a(s){return s===null?n(s):t(s)}}function c1(e,t,n){let r,i,a;return s;function s(l){return l===46||l===95?e.check(Sl,u,o)(l):l===null||Te(l)||Kt(l)||l!==45&&$r(l)?u(l):(a=!0,e.consume(l),s)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function u(l){return i||r||!a?n(l):t(l)}}function d1(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Sl,t,a)(s):s===null||Te(s)||Kt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function h1(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Te(o)||Kt(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Te(o)||Kt(o)?t(o):r(o)}function a(o){return je(o)?s(o):n(o)}function s(o){return o===59?(e.consume(o),r):je(o)?(e.consume(o),s):n(o)}}function f1(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Me(a)?n(a):t(a)}}function Il(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Te(e)}function Ll(e){return!je(e)}function Rl(e){return!(e===47||Bi(e))}function Bi(e){return e===43||e===45||e===46||e===95||Me(e)}function Aa(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function gn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&Me(e.charCodeAt(n+1))&&Me(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(n+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Vr(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Fi={name:"attention",resolveAll:m1,tokenize:p1};function m1(e,t){let n=-1,r,i,a,s,o,u,l,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};js(h,-u),js(p,u),s={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},e[r][1].end={...s.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=tt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=tt(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),l=tt(l,Vr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=tt(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,l=tt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Ke(e,r-1,n-r+3,l),n=r+l.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function p1(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=dn(r);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const l=e.exit("attentionSequence"),d=dn(u),h=!d||d===2&&i||n.includes(u),p=!i||i===2&&d||n.includes(r);return l._open=!!(a===42?h:h&&(i||!p)),l._close=!!(a===42?p:p&&(d||!h)),t(u)}}function js(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const g1={name:"autolink",tokenize:b1};function b1(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(m){return je(m)?(e.consume(m),s):m===64?n(m):l(m)}function s(m){return m===43||m===45||m===46||Me(m)?(r=1,o(m)):l(m)}function o(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||Me(m))&&r++<32?(e.consume(m),o):(r=0,l(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Ar(m)?n(m):(e.consume(m),u)}function l(m){return m===64?(e.consume(m),d):b0(m)?(e.consume(m),l):n(m)}function d(m){return Me(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||Me(m))&&r++<63){const g=m===45?p:h;return e.consume(m),g}return n(m)}}function de(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return ue(u)?(e.enter(n),o(u)):t(u)}function o(u){return ue(u)&&a++<i?(e.consume(u),o):(e.exit(n),t(u))}}const Jn={partial:!0,tokenize:E1};function E1(e,t,n){return r;function r(a){return ue(a)?de(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Z(a)?t(a):n(a)}}const vl={continuation:{tokenize:x1},exit:k1,name:"blockQuote",tokenize:T1};function T1(e,t,n){const r=this;return i;function i(s){if(s===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return ue(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function x1(e,t,n){const r=this;return i;function i(s){return ue(s)?de(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(vl,t,n)(s)}}function k1(e){e.exit("blockQuote")}const Dl={name:"characterEscape",tokenize:y1};function y1(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return T0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Ol={name:"characterReference",tokenize:A1};function A1(e,t,n){const r=this;let i=0,a,s;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),u}function u(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,s=Me,d(h))}function l(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=E0,d):(e.enter("characterReferenceValue"),a=7,s=Mi,d(h))}function d(h){if(h===59&&i){const p=e.exit("characterReferenceValue");return s===Me&&!ya(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&i++<a?(e.consume(h),d):n(h)}}const qs={partial:!0,tokenize:_1},zs={concrete:!0,name:"codeFenced",tokenize:C1};function C1(e,t,n){const r=this,i={partial:!0,tokenize:M};let a=0,s=0,o;return u;function u(N){return l(N)}function l(N){const v=r.events[r.events.length-1];return a=v&&v[1].type==="linePrefix"?v[2].sliceSerialize(v[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===o?(s++,e.consume(N),d):s<3?n(N):(e.exit("codeFencedFenceSequence"),ue(N)?de(e,h,"whitespace")(N):h(N))}function h(N){return N===null||Z(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(qs,y,R)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||Z(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(N)):ue(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),de(e,m,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),p)}function m(N){return N===null||Z(N)?h(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(N))}function g(N){return N===null||Z(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(N)):N===96&&N===o?n(N):(e.consume(N),g)}function y(N){return e.attempt(i,R,S)(N)}function S(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),k}function k(N){return a>0&&ue(N)?de(e,C,"linePrefix",a+1)(N):C(N)}function C(N){return N===null||Z(N)?e.check(qs,y,R)(N):(e.enter("codeFlowValue"),w(N))}function w(N){return N===null||Z(N)?(e.exit("codeFlowValue"),C(N)):(e.consume(N),w)}function R(N){return e.exit("codeFenced"),t(N)}function M(N,v,D){let j=0;return I;function I(F){return N.enter("lineEnding"),N.consume(F),N.exit("lineEnding"),H}function H(F){return N.enter("codeFencedFence"),ue(F)?de(N,z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):z(F)}function z(F){return F===o?(N.enter("codeFencedFenceSequence"),Q(F)):D(F)}function Q(F){return F===o?(j++,N.consume(F),Q):j>=s?(N.exit("codeFencedFenceSequence"),ue(F)?de(N,W,"whitespace")(F):W(F)):D(F)}function W(F){return F===null||Z(F)?(N.exit("codeFencedFence"),v(F)):D(F)}}}function _1(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const di={name:"codeIndented",tokenize:w1},S1={partial:!0,tokenize:N1};function w1(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),de(e,a,"linePrefix",5)(l)}function a(l){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?u(l):Z(l)?e.attempt(S1,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||Z(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function N1(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):de(e,a,"linePrefix",5)(s)}function a(s){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):Z(s)?i(s):n(s)}}const I1={name:"codeText",previous:R1,resolve:L1,tokenize:v1};function L1(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function R1(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function v1(e,t,n){let r=0,i,a;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),r++,o):(e.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),u):h===96?(a=e.enter("codeTextSequence"),i=0,d(h)):Z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(h))}function l(h){return h===null||h===32||h===96||Z(h)?(e.exit("codeTextData"),u(h)):(e.consume(h),l)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",l(h))}}class D1{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Cn(this.left,r),a.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),Cn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Cn(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);Cn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Cn(this.left,n.reverse())}}}function Cn(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 Pl(e){const t={};let n=-1,r,i,a,s,o,u,l;const d=new D1(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,O1(d,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=d.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Ke(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}function O1(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,u=[],l={};let d,h,p=-1,m=n,g=0,y=0;const S=[y];for(;m;){for(;e.get(++i)[1]!==m;);a.push(i),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),h&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(y=p+1,S.push(y),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):S.pop(),p=S.length;p--;){const k=o.slice(S[p],S[p+1]),C=a.pop();u.push([C,C+k.length-1]),e.splice(C,2,k)}for(u.reverse(),p=-1;++p<u.length;)l[g+u[p][0]]=g+u[p][1],g+=u[p][1]-u[p][0]-1;return l}const P1={resolve:B1,tokenize:F1},M1={partial:!0,tokenize:H1};function B1(e){return Pl(e),e}function F1(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):Z(o)?e.check(M1,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function H1(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),de(e,a,"linePrefix")}function a(s){if(s===null||Z(s))return n(s);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ml(e,t,n,r,i,a,s,o,u){const l=u||Number.POSITIVE_INFINITY;let d=0;return h;function h(k){return k===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(k),e.exit(a),p):k===null||k===32||k===41||Ar(k)?n(k):(e.enter(r),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(k))}function p(k){return k===62?(e.enter(a),e.consume(k),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(k))}function m(k){return k===62?(e.exit("chunkString"),e.exit(o),p(k)):k===null||k===60||Z(k)?n(k):(e.consume(k),k===92?g:m)}function g(k){return k===60||k===62||k===92?(e.consume(k),m):m(k)}function y(k){return!d&&(k===null||k===41||Te(k))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(r),t(k)):d<l&&k===40?(e.consume(k),d++,y):k===41?(e.consume(k),d--,y):k===null||k===32||k===40||Ar(k)?n(k):(e.consume(k),k===92?S:y)}function S(k){return k===40||k===41||k===92?(e.consume(k),y):y(k)}}function Bl(e,t,n,r,i,a){const s=this;let o=0,u;return l;function l(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(a),d}function d(m){return o>999||m===null||m===91||m===93&&!u||m===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):Z(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||Z(m)||o++>999?(e.exit("chunkString"),d(m)):(e.consume(m),u||(u=!ue(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function Fl(e,t,n,r,i,a){let s;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,u):n(p)}function u(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),l(p))}function l(p){return p===s?(e.exit(a),u(s)):p===null?n(p):Z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),de(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||Z(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?h:d)}function h(p){return p===s||p===92?(e.consume(p),d):d(p)}}function jn(e,t){let n;return r;function r(i){return Z(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ue(i)?de(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const U1={name:"definition",tokenize:q1},j1={partial:!0,tokenize:z1};function q1(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),s(m)}function s(m){return Bl.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return i=st(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return Te(m)?jn(e,l)(m):l(m)}function l(m){return Ml(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(j1,h,h)(m)}function h(m){return ue(m)?de(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Z(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function z1(e,t,n){return r;function r(o){return Te(o)?jn(e,i)(o):n(o)}function i(o){return Fl(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return ue(o)?de(e,s,"whitespace")(o):s(o)}function s(o){return o===null||Z(o)?t(o):n(o)}}const $1={name:"hardBreakEscape",tokenize:V1};function V1(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Z(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Y1={name:"headingAtx",resolve:W1,tokenize:G1};function W1(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Ke(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function G1(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||Te(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||Z(d)?(e.exit("atxHeading"),t(d)):ue(d)?de(e,o,"whitespace")(d):(e.enter("atxHeadingText"),l(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function l(d){return d===null||d===35||Te(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),l)}}const Q1=["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"],$s=["pre","script","style","textarea"],K1={concrete:!0,name:"htmlFlow",resolveTo:J1,tokenize:eb},X1={partial:!0,tokenize:nb},Z1={partial:!0,tokenize:tb};function J1(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 eb(e,t,n){const r=this;let i,a,s,o,u;return l;function l(_){return d(_)}function d(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),p):_===47?(e.consume(_),a=!0,y):_===63?(e.consume(_),i=3,r.interrupt?t:T):je(_)?(e.consume(_),s=String.fromCharCode(_),S):n(_)}function p(_){return _===45?(e.consume(_),i=2,m):_===91?(e.consume(_),i=5,o=0,g):je(_)?(e.consume(_),i=4,r.interrupt?t:T):n(_)}function m(_){return _===45?(e.consume(_),r.interrupt?t:T):n(_)}function g(_){const we="CDATA[";return _===we.charCodeAt(o++)?(e.consume(_),o===we.length?r.interrupt?t:z:g):n(_)}function y(_){return je(_)?(e.consume(_),s=String.fromCharCode(_),S):n(_)}function S(_){if(_===null||_===47||_===62||Te(_)){const we=_===47,ce=s.toLowerCase();return!we&&!a&&$s.includes(ce)?(i=1,r.interrupt?t(_):z(_)):Q1.includes(s.toLowerCase())?(i=6,we?(e.consume(_),k):r.interrupt?t(_):z(_)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(_):a?C(_):w(_))}return _===45||Me(_)?(e.consume(_),s+=String.fromCharCode(_),S):n(_)}function k(_){return _===62?(e.consume(_),r.interrupt?t:z):n(_)}function C(_){return ue(_)?(e.consume(_),C):I(_)}function w(_){return _===47?(e.consume(_),I):_===58||_===95||je(_)?(e.consume(_),R):ue(_)?(e.consume(_),w):I(_)}function R(_){return _===45||_===46||_===58||_===95||Me(_)?(e.consume(_),R):M(_)}function M(_){return _===61?(e.consume(_),N):ue(_)?(e.consume(_),M):w(_)}function N(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),u=_,v):ue(_)?(e.consume(_),N):D(_)}function v(_){return _===u?(e.consume(_),u=null,j):_===null||Z(_)?n(_):(e.consume(_),v)}function D(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Te(_)?M(_):(e.consume(_),D)}function j(_){return _===47||_===62||ue(_)?w(_):n(_)}function I(_){return _===62?(e.consume(_),H):n(_)}function H(_){return _===null||Z(_)?z(_):ue(_)?(e.consume(_),H):n(_)}function z(_){return _===45&&i===2?(e.consume(_),G):_===60&&i===1?(e.consume(_),V):_===62&&i===4?(e.consume(_),Ce):_===63&&i===3?(e.consume(_),T):_===93&&i===5?(e.consume(_),ke):Z(_)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(X1,pe,Q)(_)):_===null||Z(_)?(e.exit("htmlFlowData"),Q(_)):(e.consume(_),z)}function Q(_){return e.check(Z1,W,pe)(_)}function W(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),F}function F(_){return _===null||Z(_)?Q(_):(e.enter("htmlFlowData"),z(_))}function G(_){return _===45?(e.consume(_),T):z(_)}function V(_){return _===47?(e.consume(_),s="",re):z(_)}function re(_){if(_===62){const we=s.toLowerCase();return $s.includes(we)?(e.consume(_),Ce):z(_)}return je(_)&&s.length<8?(e.consume(_),s+=String.fromCharCode(_),re):z(_)}function ke(_){return _===93?(e.consume(_),T):z(_)}function T(_){return _===62?(e.consume(_),Ce):_===45&&i===2?(e.consume(_),T):z(_)}function Ce(_){return _===null||Z(_)?(e.exit("htmlFlowData"),pe(_)):(e.consume(_),Ce)}function pe(_){return e.exit("htmlFlow"),t(_)}}function tb(e,t,n){const r=this;return i;function i(s){return Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):n(s)}function a(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function nb(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jn,t,n)}}const rb={name:"htmlText",tokenize:ib};function ib(e,t,n){const r=this;let i,a,s;return o;function o(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),u}function u(T){return T===33?(e.consume(T),l):T===47?(e.consume(T),M):T===63?(e.consume(T),w):je(T)?(e.consume(T),D):n(T)}function l(T){return T===45?(e.consume(T),d):T===91?(e.consume(T),a=0,g):je(T)?(e.consume(T),C):n(T)}function d(T){return T===45?(e.consume(T),m):n(T)}function h(T){return T===null?n(T):T===45?(e.consume(T),p):Z(T)?(s=h,V(T)):(e.consume(T),h)}function p(T){return T===45?(e.consume(T),m):h(T)}function m(T){return T===62?G(T):T===45?p(T):h(T)}function g(T){const Ce="CDATA[";return T===Ce.charCodeAt(a++)?(e.consume(T),a===Ce.length?y:g):n(T)}function y(T){return T===null?n(T):T===93?(e.consume(T),S):Z(T)?(s=y,V(T)):(e.consume(T),y)}function S(T){return T===93?(e.consume(T),k):y(T)}function k(T){return T===62?G(T):T===93?(e.consume(T),k):y(T)}function C(T){return T===null||T===62?G(T):Z(T)?(s=C,V(T)):(e.consume(T),C)}function w(T){return T===null?n(T):T===63?(e.consume(T),R):Z(T)?(s=w,V(T)):(e.consume(T),w)}function R(T){return T===62?G(T):w(T)}function M(T){return je(T)?(e.consume(T),N):n(T)}function N(T){return T===45||Me(T)?(e.consume(T),N):v(T)}function v(T){return Z(T)?(s=v,V(T)):ue(T)?(e.consume(T),v):G(T)}function D(T){return T===45||Me(T)?(e.consume(T),D):T===47||T===62||Te(T)?j(T):n(T)}function j(T){return T===47?(e.consume(T),G):T===58||T===95||je(T)?(e.consume(T),I):Z(T)?(s=j,V(T)):ue(T)?(e.consume(T),j):G(T)}function I(T){return T===45||T===46||T===58||T===95||Me(T)?(e.consume(T),I):H(T)}function H(T){return T===61?(e.consume(T),z):Z(T)?(s=H,V(T)):ue(T)?(e.consume(T),H):j(T)}function z(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),i=T,Q):Z(T)?(s=z,V(T)):ue(T)?(e.consume(T),z):(e.consume(T),W)}function Q(T){return T===i?(e.consume(T),i=void 0,F):T===null?n(T):Z(T)?(s=Q,V(T)):(e.consume(T),Q)}function W(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||Te(T)?j(T):(e.consume(T),W)}function F(T){return T===47||T===62||Te(T)?j(T):n(T)}function G(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function V(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),re}function re(T){return ue(T)?de(e,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ke(T)}function ke(T){return e.enter("htmlTextData"),s(T)}}const Ca={name:"labelEnd",resolveAll:ob,resolveTo:lb,tokenize:cb},ab={tokenize:db},sb={tokenize:hb},ub={tokenize:fb};function ob(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Ke(e,0,e.length,n),e}function lb(e,t){let n=e.length,r=0,i,a,s,o;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=tt(o,e.slice(a+1,a+r+3)),o=tt(o,[["enter",d,t]]),o=tt(o,Vr(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),o=tt(o,[["exit",d,t],e[s-2],e[s-1],["exit",l,t]]),o=tt(o,e.slice(s+1)),o=tt(o,[["exit",u,t]]),Ke(e,a,e.length,o),e}function cb(e,t,n){const r=this;let i=r.events.length,a,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return o;function o(p){return a?a._inactive?h(p):(s=r.parser.defined.includes(st(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(ab,d,s?d:h)(p):p===91?e.attempt(sb,d,s?l:h)(p):s?d(p):h(p)}function l(p){return e.attempt(ub,d,h)(p)}function d(p){return t(p)}function h(p){return a._balanced=!0,n(p)}}function db(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Te(h)?jn(e,a)(h):a(h)}function a(h){return h===41?d(h):Ml(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return Te(h)?jn(e,u)(h):d(h)}function o(h){return n(h)}function u(h){return h===34||h===39||h===40?Fl(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function l(h){return Te(h)?jn(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function hb(e,t,n){const r=this;return i;function i(o){return Bl.call(r,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return r.parser.defined.includes(st(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function s(o){return n(o)}}function fb(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const mb={name:"labelStartImage",resolveAll:Ca.resolveAll,tokenize:pb};function pb(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):n(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const gb={name:"labelStartLink",resolveAll:Ca.resolveAll,tokenize:bb};function bb(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const hi={name:"lineEnding",tokenize:Eb};function Eb(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),de(e,t,"linePrefix")}}const br={name:"thematicBreak",tokenize:Tb};function Tb(e,t,n){let r=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||Z(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),ue(l)?de(e,o,"whitespace")(l):o(l))}}const Ve={continuation:{tokenize:Ab},exit:_b,name:"list",tokenize:yb},xb={partial:!0,tokenize:Sb},kb={partial:!0,tokenize:Cb};function yb(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Mi(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(br,n,l)(m):l(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return Mi(m)&&++s<10?(e.consume(m),u):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),l(m)):n(m)}function l(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(Jn,r.interrupt?n:d,e.attempt(xb,p,h))}function d(m){return r.containerState.initialBlankLine=!0,a++,p(m)}function h(m){return ue(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function Ab(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jn,i,a);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,de(e,t,"listItemIndent",r.containerState.size+1)(o)}function a(o){return r.containerState.furtherBlankLines||!ue(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(kb,t,s)(o))}function s(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,de(e,e.attempt(Ve,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Cb(e,t,n){const r=this;return de(e,i,"listItemIndent",r.containerState.size+1);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(a):n(a)}}function _b(e){e.exit(this.containerState.type)}function Sb(e,t,n){const r=this;return de(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=r.events[r.events.length-1];return!ue(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Vs={name:"setextUnderline",resolveTo:wb,tokenize:Nb};function wb(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",s,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function Nb(e,t,n){const r=this;let i;return a;function a(l){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),ue(l)?de(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||Z(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Ib={tokenize:Bb,partial:!0};function Lb(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ob,continuation:{tokenize:Pb},exit:Mb}},text:{91:{name:"gfmFootnoteCall",tokenize:Db},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Rb,resolveTo:vb}}}}function Rb(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return n(u);const l=st(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function vb(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Db(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(h){if(a>999||h===93&&!s||h===null||h===91||Te(h))return n(h);if(h===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(st(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Te(h)||(s=!0),a++,e.consume(h),h===92?d:l}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,l):l(h)}}function Ob(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,o;return u;function u(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(g)}function d(g){if(s>999||g===93&&!o||g===null||g===91||Te(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return a=st(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Te(g)||(o=!0),s++,e.consume(g),g===92?h:d}function h(g){return g===91||g===92||g===93?(e.consume(g),s++,d):d(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(a)||i.push(a),de(e,m,"gfmFootnoteDefinitionWhitespace")):n(g)}function m(g){return t(g)}}function Pb(e,t,n){return e.check(Jn,t,e.attempt(Ib,t,n))}function Mb(e){e.exit("gfmFootnoteDefinition")}function Bb(e,t,n){const r=this;return de(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):n(a)}}function Fb(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},h={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},p=[["enter",d,o],["enter",s[l][1],o],["exit",s[l][1],o],["enter",h,o]],m=o.parser.constructs.insideSpan.null;m&&Ke(p,p.length,0,Vr(m,s.slice(l+1,u),o)),Ke(p,p.length,0,[["exit",h,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",d,o]]),Ke(s,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,u){const l=this.previous,d=this.events;let h=0;return p;function p(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(s.enter("strikethroughSequenceTemporary"),m(g))}function m(g){const y=dn(l);if(g===126)return h>1?u(g):(s.consume(g),h++,m);if(h<2&&!n)return u(g);const S=s.exit("strikethroughSequenceTemporary"),k=dn(g);return S._open=!k||k===2&&!!y,S._close=!y||y===2&&!!k,o(g)}}}class Hb{constructor(){this.map=[]}add(t,n,r){Ub(this,t,n,r)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function Ub(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function jb(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function qb(){return{flow:{null:{name:"table",tokenize:zb,resolveAll:$b}}}}function zb(e,t,n){const r=this;let i=0,a=0,s;return o;function o(I){let H=r.events.length-1;for(;H>-1;){const W=r.events[H][1].type;if(W==="lineEnding"||W==="linePrefix")H--;else break}const z=H>-1?r.events[H][1].type:null,Q=z==="tableHead"||z==="tableRow"?N:u;return Q===N&&r.parser.lazy[r.now().line]?n(I):Q(I)}function u(I){return e.enter("tableHead"),e.enter("tableRow"),l(I)}function l(I){return I===124||(s=!0,a+=1),d(I)}function d(I){return I===null?n(I):Z(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),m):n(I):ue(I)?de(e,d,"whitespace")(I):(a+=1,s&&(s=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),h(I)))}function h(I){return I===null||I===124||Te(I)?(e.exit("data"),d(I)):(e.consume(I),I===92?p:h)}function p(I){return I===92||I===124?(e.consume(I),h):h(I)}function m(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),s=!1,ue(I)?de(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?S(I):I===124?(s=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),y):M(I)}function y(I){return ue(I)?de(e,S,"whitespace")(I):S(I)}function S(I){return I===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),k):I===45?(a+=1,k(I)):I===null||Z(I)?R(I):M(I)}function k(I){return I===45?(e.enter("tableDelimiterFiller"),C(I)):M(I)}function C(I){return I===45?(e.consume(I),C):I===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return ue(I)?de(e,R,"whitespace")(I):R(I)}function R(I){return I===124?g(I):I===null||Z(I)?!s||i!==a?M(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):M(I)}function M(I){return n(I)}function N(I){return e.enter("tableRow"),v(I)}function v(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),v):I===null||Z(I)?(e.exit("tableRow"),t(I)):ue(I)?de(e,v,"whitespace")(I):(e.enter("data"),D(I))}function D(I){return I===null||I===124||Te(I)?(e.exit("data"),v(I)):(e.consume(I),I===92?j:D)}function j(I){return I===92||I===124?(e.consume(I),D):D(I)}}function $b(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,l,d,h;const p=new Hb;for(;++n<e.length;){const m=e[n],g=m[1];m[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(Ys(p,t,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],s=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",d,t]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],h=ur(p,t,a,i,void 0,h),a=[0,0,0,0]),s[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],h=ur(p,t,a,i,void 0,h)),a=s,s=[a[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,a[1]!==0?(s[0]=s[1],h=ur(p,t,a,i,n,h)):s[1]!==0&&(h=ur(p,t,s,i,n,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(s[3]=n)}for(u!==0&&Ys(p,t,u,l,d),p.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=jb(t.events,n))}return e}function ur(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(a.end=Object.assign({},sn(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=sn(t.events,n[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=sn(t.events,n[2]),d=sn(t.events,n[3]),h={type:o,start:Object.assign({},l),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const p=t.events[n[2]],m=t.events[n[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,y=n[3]-n[2]-1;e.add(g,y,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},sn(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Ys(e,t,n,r,i){const a=[],s=sn(t.events,n);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),r.end=Object.assign({},s),a.push(["exit",r,t]),e.add(n+1,0,a)}function sn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Vb={name:"tasklistCheck",tokenize:Wb};function Yb(){return{text:{91:Vb}}}function Wb(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return Te(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):n(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return Z(u)?t(u):ue(u)?e.check({tokenize:Gb},t,n)(u):n(u)}}function Gb(e,t,n){return de(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Qb(e){return Al([a1(),Lb(),Fb(e),qb(),Yb()])}const Kb={};function Xb(e){const t=this,n=e||Kb,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Qb(n)),a.push(Jg()),s.push(e1(n))}var Zb=Object.defineProperty,Jb=Object.defineProperties,eE=Object.getOwnPropertyDescriptors,Ws=Object.getOwnPropertySymbols,tE=Object.prototype.hasOwnProperty,nE=Object.prototype.propertyIsEnumerable,Gs=(e,t,n)=>t in e?Zb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hl=(e,t)=>{for(var n in t||(t={}))tE.call(t,n)&&Gs(e,n,t[n]);if(Ws)for(var n of Ws(t))nE.call(t,n)&&Gs(e,n,t[n]);return e},Ul=(e,t)=>Jb(e,eE(t)),rE=e=>{let t=new Uint8Array(e.length+1),n=!1,r=!1,i=0;for(;i<e.length;){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){let a=n||r?1:0;t[i+1]=a,t[i+2]=a,i+=2;continue}if(e.substring(i,i+3)==="```"){r=!r;let a=n||r?1:0,s=Math.min(i+3,e.length);for(let o=i+1;o<=s;o+=1)t[o]=a;i=s;continue}!r&&e[i]==="`"&&(n=!n),t[i+1]=n||r?1:0,i+=1}return t},Qs=null,ze=(e,t)=>{let n=Qs;return(n===null||n.text!==e)&&(n={text:e,lookup:rE(e)},Qs=n),n.lookup[Math.min(t,e.length)]===1},iE=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},aE=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!iE(e,n)&&(t+=1)}return t},Ot=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},sE=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,uE=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(sE,(t,n,r,i)=>ze(e,i)?t:`${n}\\>${r}`),oE=/(\*\*)([^*]*\*?)$/,lE=/(__)([^_]*?)$/,cE=/(\*\*\*)([^*]*?)$/,dE=/(\*)([^*]*?)$/,hE=/(_)([^_]*?)$/,fE=/(`)([^`]*?)$/,mE=/(~~)([^~]*?)$/,en=/^[\s_~*`]*$/,jl=/^[\s]*[-*+][\s]+$/,pE=/[\p{L}\p{N}_]/u,gE=/^```[^`\n]*```?$/,bE=/^\*{4,}$/,EE=/(__)([^_]+)_$/,TE=/(~~)([^~]+)~$/,Ks=/~~/g,yt=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:pE.test(e)},xE=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},ql=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},kE=e=>e==="inlineLatex"||e==="blockLatex",yE=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,AE=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",Yr=(e,t)=>{let n="none";for(let r=0;r<e.length&&r<t;r+=1){if(e[r]==="\\"&&e[r+1]==="$"){r+=1;continue}if(e[r]==="\\"){let i=yE(n,e[r+1]);if(i!==null){n=i,r+=1;continue}}if(e[r]==="$"&&!kE(n)){let i=e[r+1]==="$";n=AE(n,i),i&&(r+=1)}}return n!=="none"},CE=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
124
|
+
`)return!1}return!1},zl=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?CE(e,t):!1;if(e[n]===`
|
|
125
|
+
`)return!1}return!1},_E=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
126
|
+
`)return!1}return!1},_a=(e,t,n)=>{let r=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
|
|
127
|
+
`){r=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
|
|
128
|
+
`){i=u;break}let a=e.substring(r,i),s=0,o=!1;for(let u of a)if(u===n)s+=1;else if(u!==" "&&u!==" "){o=!0;break}return s>=3&&!o},$l=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),SE=(e,t,n,r)=>n==="\\"||$l(e)&&Yr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":n==="*"||(!n||n===" "||n===" "||n===`
|
|
129
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
130
|
+
`),_r=e=>e===" "||e===" "||e===`
|
|
131
|
+
`,wE=(e,t)=>!!(e&&t&&yt(e)&&yt(t)),NE=(e,t,n,r)=>{let i=wE(e,t),a=!!t&&!_r(t),s=!!e&&!_r(e);return i&&n%2===0&&!r?{count:!1}:s&&n%2===1||a?{count:!0,inWordAsteriskChain:i}:{count:!1}},Vl=e=>{let t=0,n=!1,r=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]==="`"&&a+2<i&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}if(n)continue;if(e[a]!=="*"){yt(e[a])||(r=!1);continue}let s=a>0?e[a-1]:"",o=a<i-1?e[a+1]:"";if(SE(e,a,s,o))continue;let u=NE(s,o,t,r);u.count&&(t+=1,r=u.inWordAsteriskChain)}return t},IE=(e,t,n,r)=>!!(n==="\\"||$l(e)&&Yr(e,t)||zl(e,t)||_E(e,t)||n==="_"||r==="_"||n&&r&&yt(n)&&yt(r)),LE=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let a=i>0?e[i-1]:"",s=i<r-1?e[i+1]:"";IE(e,i,a,s)||(t+=1)}return t},RE=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Sa=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},Xs=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},vE=(e,t,n)=>{if(!t||en.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
132
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return jl.test(a)&&t.includes(`
|
|
133
|
+
`)?!0:_a(e,n,"*")},DE=e=>{let t=e.match(oE);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return ze(e,r)||Ot(e,r)||vE(e,n,r)?e:Sa(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},OE=(e,t,n)=>{if(!t||en.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
134
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return jl.test(a)&&t.includes(`
|
|
135
|
+
`)?!0:_a(e,n,"_")},PE=e=>{let t=e.match(lE);if(!t){let i=e.match(EE);if(i){let a=e.lastIndexOf(i[1]);if(!(ze(e,a)||Ot(e,a))&&Xs(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return ze(e,r)||Ot(e,r)||OE(e,n,r)?e:Xs(e)%2===1?`${e}__`:e},ME=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Yr(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"",a=!r||_r(r),s=!i||_r(i);if(a&&s||r&&i&&yt(r)&&yt(i)||s)continue;return n}}return-1},BE=e=>{if(!e.match(dE))return e;let t=ME(e);if(t===-1||ze(e,t)||Ot(e,t))return e;let n=e.substring(t+1);return!n||en.test(n)?e:Vl(e)%2===1?`${e}*`:e},Yl=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Yr(e,n)&&!zl(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&yt(r)&&yt(i))continue;return n}}return-1},FE=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
136
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},HE=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Sa(t)%2!==1)return null;let n=t.indexOf("**"),r=Yl(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},UE=e=>{if(!e.match(hE))return e;let t=Yl(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||en.test(n)||ze(e,t)||Ot(e,t))return e;if(LE(e)%2===1){let r=HE(e);return r!==null?r:FE(e)}return e},jE=e=>{let t=Sa(e),n=Vl(e);return t%2===0&&n%2===0},qE=(e,t,n)=>!t||en.test(t)||ze(e,n)||Ot(e,n)?!0:_a(e,n,"*"),zE=e=>{if(bE.test(e))return e;let t=e.match(cE);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return qE(e,n,r)?e:RE(e)%2===1?jE(e)?e:`${e}***`:e},$E=/<[a-zA-Z/][^>]*$/,VE=e=>{let t=e.match($E);return!t||t.index===void 0||ze(e,t.index)?e:e.substring(0,t.index).trimEnd()},YE=e=>!e.match(gE)||e.includes(`
|
|
137
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,WE=e=>(e.match(/```/g)||[]).length%2===1,GE=e=>{let t=YE(e);if(t!==null)return t;let n=e.match(fE);if(n&&!WE(e)){let r=n[2];if(!r||en.test(r))return e;if(aE(e)%2===1)return`${e}\``}return e},Wl=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",QE=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Wl(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},KE=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Wl(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},XE=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
138
|
+
`,t)!==-1&&!e.endsWith(`
|
|
139
|
+
`)?`${e}
|
|
140
|
+
$$`:`${e}$$`},ZE=e=>QE(e)%2===0?e:XE(e),JE=e=>KE(e)%2===1?`${e}$`:e,eT=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=xE(e,t);if(r===-1||ze(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,s=e.substring(0,a);if(i)return s;let o=e.substring(r+1,t);return n==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},Zs=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!ze(e,n)){if(n>0&&e[n-1]==="!")continue;let r=ql(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},tT=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Zs(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(ql(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let s=Zs(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},Gl=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!ze(e,n)){let r=eT(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!ze(e,r)){let i=tT(e,r,t);if(i!==null)return i}return e},nT=/^-{1,2}$/,rT=/^[\s]*-{1,2}[\s]+$/,iT=/^={1,2}$/,aT=/^[\s]*={1,2}[\s]+$/,sT=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
141
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(nT.test(i)&&!n.match(rT)){let a=r.split(`
|
|
142
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(iT.test(i)&&!n.match(aT)){let a=r.split(`
|
|
143
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},uT=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,oT=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(uT,(t,n,r)=>{let i=r+n.length;return ze(e,i)?t:`${n}\\~`}),lT=e=>{var t,n;let r=e.match(mE);if(r){let i=r[2];if(!i||en.test(i))return e;let a=e.lastIndexOf(r[1]);if(ze(e,a)||Ot(e,a))return e;if(((t=e.match(Ks))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(TE);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(ze(e,a)||Ot(e,a))return e;if(((n=e.match(Ks))==null?void 0:n.length)%2===1)return`${e}~`}}return e},fi=e=>e!==!1,cT=e=>e===!0,Ue={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},dT=[{handler:{name:"singleTilde",handle:oT,priority:Ue.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:uE,priority:Ue.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:VE,priority:Ue.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:sT,priority:Ue.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Gl,priority:Ue.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:zE,priority:Ue.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:DE,priority:Ue.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:PE,priority:Ue.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:BE,priority:Ue.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:UE,priority:Ue.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:GE,priority:Ue.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:lT,priority:Ue.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:ZE,priority:Ue.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:JE,priority:Ue.INLINE_KATEX},optionKey:"inlineKatex"}],hT=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return dT.filter(({handler:r,optionKey:i})=>r.name==="links"?fi(e?.links)||fi(e?.images):r.name==="inlineKatex"?cT(e?.inlineKatex):fi(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Ul(Hl({},r),{handle:a=>Gl(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},fT=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=hT(t),a=((n=t?.handlers)!=null?n:[]).map(o=>{var u;return{handler:Ul(Hl({},o),{priority:(u=o.priority)!=null?u:Ue.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((o,u)=>{var l,d;return((l=o.handler.priority)!=null?l:0)-((d=u.handler.priority)!=null?d:0)});for(let{handler:o,earlyReturn:u}of s)if(r=o.handle(r),u!=null&&u(r))return r;return r},mT=fT;function Ql(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ql(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Kl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ql(e))&&(r&&(r+=" "),r+=t);return r}const pT=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},gT=(e,t)=>({classGroupId:e,validator:t}),Xl=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Sr="-",Js=[],bT="arbitrary..",ET=e=>{const t=xT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return TT(s);const o=s.split(Sr),u=o[0]===""&&o.length>1?1:0;return Zl(o,u,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const u=r[s],l=n[s];return u?l?pT(l,u):u:l||Js}return n[s]||Js}}},Zl=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const l=Zl(e,t+1,a);if(l)return l}const s=n.validators;if(s===null)return;const o=t===0?e.join(Sr):e.slice(t).join(Sr),u=s.length;for(let l=0;l<u;l++){const d=s[l];if(d.validator(o))return d.classGroupId}},TT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?bT+r:void 0})(),xT=e=>{const{theme:t,classGroups:n}=e;return kT(n,t)},kT=(e,t)=>{const n=Xl();for(const r in e){const i=e[r];wa(i,n,r,t)}return n},wa=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];yT(s,t,n,r)}},yT=(e,t,n,r)=>{if(typeof e=="string"){AT(e,t,n);return}if(typeof e=="function"){CT(e,t,n,r);return}_T(e,t,n,r)},AT=(e,t,n)=>{const r=e===""?t:Jl(t,e);r.classGroupId=n},CT=(e,t,n,r)=>{if(ST(e)){wa(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gT(n,e))},_T=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,u]=i[s];wa(u,Jl(t,o),n,r)}},Jl=(e,t)=>{let n=e;const r=t.split(Sr),i=r.length;for(let a=0;a<i;a++){const s=r[a];let o=n.nextPart.get(s);o||(o=Xl(),n.nextPart.set(s,o)),n=o}return n},ST=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,wT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,s)=>{n[a]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let s=n[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return i(a,s),s},set(a,s){a in n?n[a]=s:i(a,s)}}},Hi="!",eu=":",NT=[],tu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),IT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let s=0,o=0,u=0,l;const d=i.length;for(let y=0;y<d;y++){const S=i[y];if(s===0&&o===0){if(S===eu){a.push(i.slice(u,y)),u=y+1;continue}if(S==="/"){l=y;continue}}S==="["?s++:S==="]"?s--:S==="("?o++:S===")"&&o--}const h=a.length===0?i:i.slice(u);let p=h,m=!1;h.endsWith(Hi)?(p=h.slice(0,-1),m=!0):h.startsWith(Hi)&&(p=h.slice(1),m=!0);const g=l&&l>u?l-u:void 0;return tu(a,m,p,g)};if(t){const i=t+eu,a=r;r=s=>s.startsWith(i)?a(s.slice(i.length)):tu(NT,!1,s,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},LT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const s=n[a],o=s[0]==="[",u=t.has(s);o||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},RT=e=>({cache:wT(e.cacheSize),parseClassName:IT(e),sortModifiers:LT(e),postfixLookupClassGroupIds:vT(e),...ET(e)}),vT=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},DT=/\s+/,OT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:s}=t,o=[],u=e.trim().split(DT);let l="";for(let d=u.length-1;d>=0;d-=1){const h=u[d],{isExternal:p,modifiers:m,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:S}=n(h);if(p){l=h+(l.length>0?" "+l:l);continue}let k=!!S,C;if(k){const v=y.substring(0,S);C=r(v);const D=C&&s[C]?r(y):void 0;D&&D!==C&&(C=D,k=!1)}else C=r(y);if(!C){if(!k){l=h+(l.length>0?" "+l:l);continue}if(C=r(y),!C){l=h+(l.length>0?" "+l:l);continue}k=!1}const w=m.length===0?"":m.length===1?m[0]:a(m).join(":"),R=g?w+Hi:w,M=R+C;if(o.indexOf(M)>-1)continue;o.push(M);const N=i(C,k);for(let v=0;v<N.length;++v){const D=N[v];o.push(R+D)}l=h+(l.length>0?" "+l:l)}return l},PT=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=ec(n))&&(i&&(i+=" "),i+=r);return i},ec=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ec(e[r]))&&(n&&(n+=" "),n+=t);return n},MT=(e,...t)=>{let n,r,i,a;const s=u=>{const l=t.reduce((d,h)=>h(d),e());return n=RT(l),r=n.cache.get,i=n.cache.set,a=o,o(u)},o=u=>{const l=r(u);if(l)return l;const d=OT(u,n);return i(u,d),d};return a=s,(...u)=>a(PT(...u))},BT=[],Le=e=>{const t=n=>n[e]||BT;return t.isThemeGetter=!0,t},tc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,HT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wt=e=>FT.test(e),ie=e=>!!e&&!Number.isNaN(Number(e)),ct=e=>!!e&&Number.isInteger(Number(e)),mi=e=>e.endsWith("%")&&ie(e.slice(0,-1)),xt=e=>HT.test(e),rc=()=>!0,$T=e=>UT.test(e)&&!jT.test(e),Na=()=>!1,VT=e=>qT.test(e),YT=e=>zT.test(e),WT=e=>!K(e)&&!X(e),GT=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),QT=e=>Bt(e,sc,Na),K=e=>tc.test(e),jt=e=>Bt(e,uc,$T),nu=e=>Bt(e,rx,ie),KT=e=>Bt(e,lc,rc),XT=e=>Bt(e,oc,Na),ru=e=>Bt(e,ic,Na),ZT=e=>Bt(e,ac,YT),or=e=>Bt(e,cc,VT),X=e=>nc.test(e),_n=e=>tn(e,uc),JT=e=>tn(e,oc),iu=e=>tn(e,ic),ex=e=>tn(e,sc),tx=e=>tn(e,ac),lr=e=>tn(e,cc,!0),nx=e=>tn(e,lc,!0),Bt=(e,t,n)=>{const r=tc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},tn=(e,t,n=!1)=>{const r=nc.exec(e);return r?r[1]?t(r[1]):n:!1},ic=e=>e==="position"||e==="percentage",ac=e=>e==="image"||e==="url",sc=e=>e==="length"||e==="size"||e==="bg-size",uc=e=>e==="length",rx=e=>e==="number",oc=e=>e==="family-name",lc=e=>e==="number"||e==="weight",cc=e=>e==="shadow",ix=()=>{const e=Le("color"),t=Le("font"),n=Le("text"),r=Le("font-weight"),i=Le("tracking"),a=Le("leading"),s=Le("breakpoint"),o=Le("container"),u=Le("spacing"),l=Le("radius"),d=Le("shadow"),h=Le("inset-shadow"),p=Le("text-shadow"),m=Le("drop-shadow"),g=Le("blur"),y=Le("perspective"),S=Le("aspect"),k=Le("ease"),C=Le("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),X,K],N=()=>["auto","hidden","clip","visible","scroll"],v=()=>["auto","contain","none"],D=()=>[X,K,u],j=()=>[wt,"full","auto",...D()],I=()=>[ct,"none","subgrid",X,K],H=()=>["auto",{span:["full",ct,X,K]},ct,X,K],z=()=>[ct,"auto",X,K],Q=()=>["auto","min","max","fr",X,K],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...D()],V=()=>[wt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],re=()=>[wt,"screen","full","dvw","lvw","svw","min","max","fit",...D()],ke=()=>[wt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],T=()=>[e,X,K],Ce=()=>[...R(),iu,ru,{position:[X,K]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",ex,QT,{size:[X,K]}],we=()=>[mi,_n,jt],ce=()=>["","none","full",l,X,K],J=()=>["",ie,_n,jt],xe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[ie,mi,iu,ru],Re=()=>["","none",g,X,K],_e=()=>["none",ie,X,K],Ze=()=>["none",ie,X,K],bt=()=>[ie,X,K],rt=()=>[wt,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xt],breakpoint:[xt],color:[rc],container:[xt],"drop-shadow":[xt],ease:["in","out","in-out"],font:[WT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xt],shadow:[xt],spacing:["px",ie],text:[xt],"text-shadow":[xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wt,K,X,S]}],container:["container"],"container-type":[{"@container":["","normal","size",X,K]}],"container-named":[GT],columns:[{columns:[ie,K,X,o]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:v()}],"overscroll-x":[{"overscroll-x":v()}],"overscroll-y":[{"overscroll-y":v()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ct,"auto",X,K]}],basis:[{basis:[wt,"full","auto",o,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ie,wt,"auto","initial","none",K]}],grow:[{grow:["",ie,X,K]}],shrink:[{shrink:["",ie,X,K]}],order:[{order:[ct,"first","last","none",X,K]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mbs:[{mbs:G()}],mbe:[{mbe:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...ke()]}],"min-block-size":[{"min-block":["auto",...ke()]}],"max-block-size":[{"max-block":["none",...ke()]}],w:[{w:[o,"screen",...V()]}],"min-w":[{"min-w":[o,"screen","none",...V()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,_n,jt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,nx,KT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mi,K]}],"font-family":[{font:[JT,XT,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,X,K]}],"line-clamp":[{"line-clamp":[ie,"none",X,nu]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",X,K]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",X,K]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ie,"from-font","auto",X,jt]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[ie,"auto",X,K]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"tab-size":[{tab:[ct,X,K]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",X,K]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",X,K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Ce()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ct,X,K],radial:["",X,K],conic:[ct,X,K]},tx,ZT]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:we()}],"gradient-via-pos":[{via:we()}],"gradient-to-pos":[{to:we()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ie,X,K]}],"outline-w":[{outline:["",ie,_n,jt]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,lr,or]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",h,lr,or]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[ie,jt]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,lr,or]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[ie,X,K]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[X,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Ce()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",X,K]}],filter:[{filter:["","none",X,K]}],blur:[{blur:Re()}],brightness:[{brightness:[ie,X,K]}],contrast:[{contrast:[ie,X,K]}],"drop-shadow":[{"drop-shadow":["","none",m,lr,or]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",ie,X,K]}],"hue-rotate":[{"hue-rotate":[ie,X,K]}],invert:[{invert:["",ie,X,K]}],saturate:[{saturate:[ie,X,K]}],sepia:[{sepia:["",ie,X,K]}],"backdrop-filter":[{"backdrop-filter":["","none",X,K]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[ie,X,K]}],"backdrop-contrast":[{"backdrop-contrast":[ie,X,K]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ie,X,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ie,X,K]}],"backdrop-invert":[{"backdrop-invert":["",ie,X,K]}],"backdrop-opacity":[{"backdrop-opacity":[ie,X,K]}],"backdrop-saturate":[{"backdrop-saturate":[ie,X,K]}],"backdrop-sepia":[{"backdrop-sepia":["",ie,X,K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",X,K]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ie,"initial",X,K]}],ease:[{ease:["linear","initial",k,X,K]}],delay:[{delay:[ie,X,K]}],animate:[{animate:["none",C,X,K]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,X,K]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:Ze()}],"scale-x":[{"scale-x":Ze()}],"scale-y":[{"scale-y":Ze()}],"scale-z":[{"scale-z":Ze()}],"scale-3d":["scale-3d"],skew:[{skew:bt()}],"skew-x":[{"skew-x":bt()}],"skew-y":[{"skew-y":bt()}],transform:[{transform:[X,K,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:rt()}],"translate-x":[{"translate-x":rt()}],"translate-y":[{"translate-y":rt()}],"translate-z":[{"translate-z":rt()}],"translate-none":["translate-none"],zoom:[{zoom:[ct,X,K]}],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",X,K]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":T()}],"scrollbar-track-color":[{"scrollbar-track":T()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",X,K]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[ie,_n,jt,nu]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},dc=MT(ix),ax=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ux={};function au(e,t){return(ux.jsx?sx:ax).test(e)}const ox=/[ \t\n\f\r]/g;function lx(e){return typeof e=="object"?e.type==="text"?su(e.value):!1:su(e)}function su(e){return e.replace(ox,"")===""}var an={},pi,uu;function cx(){if(uu)return pi;uu=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
144
|
+
`,l="/",d="*",h="",p="comment",m="declaration";function g(S,k){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];k=k||{};var C=1,w=1;function R(W){var F=W.match(t);F&&(C+=F.length);var G=W.lastIndexOf(u);w=~G?W.length-G:w+W.length}function M(){var W={line:C,column:w};return function(F){return F.position=new N(W),j(),F}}function N(W){this.start=W,this.end={line:C,column:w},this.source=k.source}N.prototype.content=S;function v(W){var F=new Error(k.source+":"+C+":"+w+": "+W);if(F.reason=W,F.filename=k.source,F.line=C,F.column=w,F.source=S,!k.silent)throw F}function D(W){var F=W.exec(S);if(F){var G=F[0];return R(G),S=S.slice(G.length),F}}function j(){D(n)}function I(W){var F;for(W=W||[];F=H();)F!==!1&&W.push(F);return W}function H(){var W=M();if(!(l!=S.charAt(0)||d!=S.charAt(1))){for(var F=2;h!=S.charAt(F)&&(d!=S.charAt(F)||l!=S.charAt(F+1));)++F;if(F+=2,h===S.charAt(F-1))return v("End of comment missing");var G=S.slice(2,F-2);return w+=2,R(G),S=S.slice(F),w+=2,W({type:p,comment:G})}}function z(){var W=M(),F=D(r);if(F){if(H(),!D(i))return v("property missing ':'");var G=D(a),V=W({type:m,property:y(F[0].replace(e,h)),value:G?y(G[0].replace(e,h)):h});return D(s),V}}function Q(){var W=[];I(W);for(var F;F=z();)F!==!1&&(W.push(F),I(W));return W}return j(),Q()}function y(S){return S?S.replace(o,h):h}return pi=g,pi}var ou;function dx(){if(ou)return an;ou=1;var e=an&&an.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(an,"__esModule",{value:!0}),an.default=n;const t=e(cx());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),o=typeof i=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:d}=u;o?i(l,d,u):d&&(a=a||{},a[l]=d)}),a}return an}var Sn={},lu;function hx(){if(lu)return Sn;lu=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||n.test(l)||e.test(l)},s=function(l,d){return d.toUpperCase()},o=function(l,d){return"".concat(d,"-")},u=function(l,d){return d===void 0&&(d={}),a(l)?l:(l=l.toLowerCase(),d.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,s))};return Sn.camelCase=u,Sn}var wn,cu;function fx(){if(cu)return wn;cu=1;var e=wn&&wn.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(dx()),n=hx();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(s[(0,n.camelCase)(o,a)]=u)}),s}return r.default=r,wn=r,wn}var mx=fx();const px=ra(mx);function qn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?du(e.position):"start"in e||"end"in e?du(e):"line"in e||"column"in e?Ui(e):""}function Ui(e){return hu(e&&e.line)+":"+hu(e&&e.column)}function du(e){return Ui(e&&e.start)+"-"+Ui(e&&e.end)}function hu(e){return e&&typeof e=="number"?e:1}class Fe extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},s=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(s=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?a.ruleId=r:(a.source=r.slice(0,u),a.ruleId=r.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=qn(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Fe.prototype.file="";Fe.prototype.name="";Fe.prototype.reason="";Fe.prototype.message="";Fe.prototype.stack="";Fe.prototype.column=void 0;Fe.prototype.line=void 0;Fe.prototype.ancestors=void 0;Fe.prototype.cause=void 0;Fe.prototype.fatal=void 0;Fe.prototype.place=void 0;Fe.prototype.ruleId=void 0;Fe.prototype.source=void 0;const Ia={}.hasOwnProperty,gx=new Map,bx=/[A-Z]/g,Ex=new Set(["table","tbody","thead","tfoot","tr"]),Tx=new Set(["td","th"]),hc="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Nx(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=wx(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Pt:Qn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=fc(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function fc(e,t,n){if(t.type==="element")return kx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return yx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Cx(e,t,n);if(t.type==="mdxjsEsm")return Ax(e,t);if(t.type==="root")return _x(e,t,n);if(t.type==="text")return Sx(e,t)}function kx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Pt,e.schema=i),e.ancestors.push(t);const a=pc(e,t.tagName,!1),s=Ix(e,t);let o=Ra(e,t);return Ex.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!lx(u):!0})),mc(e,s,a,t),La(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function yx(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wn(e,t.position)}function Ax(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wn(e,t.position)}function Cx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Pt,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:pc(e,t.name,!0),s=Lx(e,t),o=Ra(e,t);return mc(e,s,a,t),La(s,o),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function _x(e,t,n){const r={};return La(r,Ra(e,t)),e.create(t,e.Fragment,r,n)}function Sx(e,t){return t.value}function mc(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function La(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function wx(e,t,n){return r;function r(i,a,s,o){const l=Array.isArray(s.children)?n:t;return o?l(a,s,o):l(a,s)}}function Nx(e,t){return n;function n(r,i,a,s){const o=Array.isArray(a.children),u=mt(r);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Ix(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ia.call(t.properties,i)){const a=Rx(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&Tx.has(t.tagName)?r=o:n[s]=o}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Wn(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else Wn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ra(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:gx;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;s=u+"-"+l,i.set(u,l+1)}}const o=fc(e,a,s);o!==void 0&&n.push(o)}return n}function Rx(e,t,n){const r=Fr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?go(n):bo(n)),r.property==="style"){let i=typeof n=="object"?n:vx(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Dx(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Vh[r.property]||r.property:r.attribute,n]}}function vx(e,t){try{return px(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Fe("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=hc+"#cannot-parse-style-attribute",i}}function pc(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=au(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}r=s}else r=au(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ia.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wn(e)}function Wn(e,t){const n=new Fe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=hc+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Dx(e){const t={};let n;for(n in e)Ia.call(e,n)&&(t[Ox(n)]=e[n]);return t}function Ox(e){let t=e.replace(bx,Px);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Px(e){return"-"+e.toLowerCase()}const gi={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"]},Mx={tokenize:Bx};function Bx(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),de(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Z(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const Fx={tokenize:Hx},fu={tokenize:Ux};function Hx(e){const t=this,n=[];let r=0,i,a,s;return o;function o(w){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,u,l)(w)}return l(w)}function u(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&C();const R=t.events.length;let M=R,N;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){N=t.events[M][1].end;break}k(r);let v=R;for(;v<t.events.length;)t.events[v][1].end={...N},v++;return Ke(t.events,M+1,0,t.events.slice(R)),t.events.length=v,l(w)}return o(w)}function l(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return g(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fu,d,h)(w)}function d(w){return i&&C(),k(r),p(w)}function h(w){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(w)}function p(w){return t.containerState={},e.attempt(fu,m,g)(w)}function m(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function g(w){if(w===null){i&&C(),k(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),y(w)}function y(w){if(w===null){S(e.exit("chunkFlow"),!0),k(0),e.consume(w);return}return Z(w)?(e.consume(w),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(w),y)}function S(w,R){const M=t.sliceStream(w);if(R&&M.push(null),w.previous=a,a&&(a.next=w),a=w,i.defineSkip(w.start),i.write(M),t.parser.lazy[w.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<s&&(!i.events[N][1].end||i.events[N][1].end.offset>s))return;const v=t.events.length;let D=v,j,I;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(j){I=t.events[D][1].end;break}j=!0}for(k(r),N=v;N<t.events.length;)t.events[N][1].end={...I},N++;Ke(t.events,D+1,0,t.events.slice(v)),t.events.length=N}}function k(w){let R=n.length;for(;R-- >w;){const M=n[R];t.containerState=M[1],M[0].exit.call(t,e)}n.length=w}function C(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ux(e,t,n){return de(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const jx={tokenize:qx};function qx(e){const t=this,n=e.attempt(Jn,r,e.attempt(this.parser.constructs.flowInitial,i,de(e,e.attempt(this.parser.constructs.flow,i,e.attempt(P1,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zx={resolveAll:bc()},$x=gc("string"),Vx=gc("text");function gc(e){return{resolveAll:bc(e==="text"?Yx:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,o);return s;function s(d){return l(d)?a(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return l(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function l(d){if(d===null)return!0;const h=i[d];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function bc(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function Yx(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,s=-1,o=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(l===-2)u=!0,o++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const Wx={42:Ve,43:Ve,45:Ve,48:Ve,49:Ve,50:Ve,51:Ve,52:Ve,53:Ve,54:Ve,55:Ve,56:Ve,57:Ve,62:vl},Gx={91:U1},Qx={[-2]:di,[-1]:di,32:di},Kx={35:Y1,42:br,45:[Vs,br],60:K1,61:Vs,95:br,96:zs,126:zs},Xx={38:Ol,92:Dl},Zx={[-5]:hi,[-4]:hi,[-3]:hi,33:mb,38:Ol,42:Fi,60:[g1,rb],91:gb,92:[$1,Dl],93:Ca,95:Fi,96:I1},Jx={null:[Fi,zx]},e2={null:[42,95]},t2={null:[]},n2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:e2,contentInitial:Gx,disable:t2,document:Wx,flow:Kx,flowInitial:Qx,insideSpan:Jx,string:Xx,text:Zx},Symbol.toStringTag,{value:"Module"}));function r2(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let s=[],o=[];const u={attempt:v(M),check:v(N),consume:C,enter:w,exit:R,interrupt:v(N,{interrupt:!0})},l={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let d=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function h(H){return s=tt(s,H),S(),s[s.length-1]!==null?[]:(D(t,0),l.events=Vr(a,l.events,l),l.events)}function p(H,z){return a2(m(H),z)}function m(H){return i2(s,H)}function g(){const{_bufferIndex:H,_index:z,line:Q,column:W,offset:F}=r;return{_bufferIndex:H,_index:z,line:Q,column:W,offset:F}}function y(H){i[H.line]=H.column,I()}function S(){let H;for(;r._index<s.length;){const z=s[r._index];if(typeof z=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<z.length;)k(z.charCodeAt(r._bufferIndex));else k(z)}}function k(H){d=d(H)}function C(H){Z(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,I()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=H}function w(H,z){const Q=z||{};return Q.type=H,Q.start=g(),l.events.push(["enter",Q,l]),o.push(Q),Q}function R(H){const z=o.pop();return z.end=g(),l.events.push(["exit",z,l]),z}function M(H,z){D(H,z.from)}function N(H,z){z.restore()}function v(H,z){return Q;function Q(W,F,G){let V,re,ke,T;return Array.isArray(W)?pe(W):"tokenize"in W?pe([W]):Ce(W);function Ce(J){return xe;function xe(ye){const fe=ye!==null&&J[ye],Re=ye!==null&&J.null,_e=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return pe(_e)(ye)}}function pe(J){return V=J,re=0,J.length===0?G:_(J[re])}function _(J){return xe;function xe(ye){return T=j(),ke=J,J.partial||(l.currentConstruct=J),J.name&&l.parser.constructs.disable.null.includes(J.name)?ce():J.tokenize.call(z?Object.assign(Object.create(l),z):l,u,we,ce)(ye)}}function we(J){return H(ke,T),F}function ce(J){return T.restore(),++re<V.length?_(V[re]):G}}}function D(H,z){H.resolveAll&&!a.includes(H)&&a.push(H),H.resolve&&Ke(l.events,z,l.events.length-z,H.resolve(l.events.slice(z),l)),H.resolveTo&&(l.events=H.resolveTo(l.events,l))}function j(){const H=g(),z=l.previous,Q=l.currentConstruct,W=l.events.length,F=Array.from(o);return{from:W,restore:G};function G(){r=H,l.previous=z,l.currentConstruct=Q,l.events.length=W,o=F,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function i2(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,a)];else{if(s=e.slice(n,i),r>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function a2(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
|
|
145
|
+
`;break}case-3:{s=`\r
|
|
146
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,r.push(s)}return r.join("")}function s2(e){const r={constructs:Al([n2,...(e||{}).extensions||[]]),content:i(Mx),defined:[],document:i(Fx),flow:i(jx),lazy:{},string:i($x),text:i(Vx)};return r;function i(a){return s;function s(o){return r2(r,a,o)}}}function u2(e){for(;!Pl(e););return e}const mu=/[\0\t\n\r]/g;function o2(){let e=1,t="",n=!0,r;return i;function i(a,s,o){const u=[];let l,d,h,p,m;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(mu.lastIndex=h,l=mu.exec(a),p=l&&l.index!==void 0?l.index:a.length,m=a.charCodeAt(p),!l){t=a.slice(h);break}if(m===10&&h===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),h<p&&(u.push(a.slice(h,p)),e+=p-h),m){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Ec={}.hasOwnProperty;function l2(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),c2(n)(u2(s2(n).document().write(o2()(e,t,!0))))}function c2(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ir),autolinkProtocol:j,autolinkEmail:j,atxHeading:a(oe),blockQuote:a(Re),characterEscape:j,characterReference:j,codeFenced:a(_e),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(_e,s),codeText:a(Ze,s),codeTextData:j,data:j,codeFlowValue:j,definition:a(bt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(rt),hardBreakEscape:a(Pe),hardBreakTrailing:a(Pe),htmlFlow:a(_t,s),htmlFlowData:j,htmlText:a(_t,s),htmlTextData:j,image:a(ti),label:s,link:a(ir),listItem:a(me),listItemValue:p,listOrdered:a(ee,h),listUnordered:a(ee),paragraph:a(He),reference:_,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(oe),strong:a(Je),thematicBreak:a(En)},exit:{atxHeading:u(),atxHeadingSequence:M,autolink:u(),autolinkEmail:fe,autolinkProtocol:ye,blockQuote:u(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:J,characterReference:xe,codeFenced:u(S),codeFencedFence:y,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:u(k),codeText:u(F),codeTextData:I,data:I,definition:u(),definitionDestinationString:R,definitionLabelString:C,definitionTitleString:w,emphasis:u(),hardBreakEscape:u(z),hardBreakTrailing:u(z),htmlFlow:u(Q),htmlFlowData:I,htmlText:u(W),htmlTextData:I,image:u(V),label:ke,labelText:re,lineEnding:H,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:we,resourceDestinationString:T,resourceTitleString:Ce,resource:pe,setextHeading:u(D),setextHeadingLineSequence:v,setextHeadingText:N,strong:u(),thematicBreak:u()}};Tc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let Y={type:"root",children:[]};const ne={stack:[Y],tokenStack:[],config:t,enter:o,exit:l,buffer:s,resume:d,data:n},le=[];let be=-1;for(;++be<B.length;)if(B[be][1].type==="listOrdered"||B[be][1].type==="listUnordered")if(B[be][0]==="enter")le.push(be);else{const it=le.pop();be=i(B,it,be)}for(be=-1;++be<B.length;){const it=t[B[be][0]];Ec.call(it,B[be][1].type)&&it[B[be][1].type].call(Object.assign({sliceSerialize:B[be][2].sliceSerialize},ne),B[be][1])}if(ne.tokenStack.length>0){const it=ne.tokenStack[ne.tokenStack.length-1];(it[1]||pu).call(ne,void 0,it[0])}for(Y.position={start:Nt(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Nt(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)Y=t.transforms[be](Y)||Y;return Y}function i(B,Y,ne){let le=Y-1,be=-1,it=!1,Ft,Et,Tn,xn;for(;++le<=ne;){const Ge=B[le];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?be++:be--,xn=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Ft&&!xn&&!be&&!Tn&&(Tn=le),xn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:xn=void 0}if(!be&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||be===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Ft){let rn=le;for(Et=void 0;rn--;){const Tt=B[rn];if(Tt[1].type==="lineEnding"||Tt[1].type==="lineEndingBlank"){if(Tt[0]==="exit")continue;Et&&(B[Et][1].type="lineEndingBlank",it=!0),Tt[1].type="lineEnding",Et=rn}else if(!(Tt[1].type==="linePrefix"||Tt[1].type==="blockQuotePrefix"||Tt[1].type==="blockQuotePrefixWhitespace"||Tt[1].type==="blockQuoteMarker"||Tt[1].type==="listItemIndent"))break}Tn&&(!Et||Tn<Et)&&(Ft._spread=!0),Ft.end=Object.assign({},Et?B[Et][1].start:Ge[1].end),B.splice(Et||le,0,["exit",Ft,Ge[2]]),le++,ne++}if(Ge[1].type==="listItemPrefix"){const rn={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Ft=rn,B.splice(le,0,["enter",rn,Ge[2]]),le++,ne++,Tn=void 0,xn=!0}}}return B[Y][1]._spread=it,ne}function a(B,Y){return ne;function ne(le){o.call(this,B(le),le),Y&&Y.call(this,le)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(B,Y,ne){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([Y,ne||void 0]),B.position={start:Nt(Y.start),end:void 0}}function u(B){return Y;function Y(ne){B&&B.call(this,ne),l.call(this,ne)}}function l(B,Y){const ne=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==B.type&&(Y?Y.call(this,B,le[0]):(le[1]||pu).call(this,B,le[0]));else throw new Error("Cannot close `"+B.type+"` ("+qn({start:B.start,end:B.end})+"): it’s not open");ne.position.end=Nt(B.end)}function d(){return xa(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(B){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function m(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=B}function g(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=B}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.value=B.replace(/(\r?\n|\r)$/g,"")}function C(B){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.label=Y,ne.identifier=st(this.sliceSerialize(B)).toLowerCase()}function w(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.title=B}function R(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.url=B}function M(B){const Y=this.stack[this.stack.length-1];if(!Y.depth){const ne=this.sliceSerialize(B).length;Y.depth=ne}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function v(B){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function j(B){const ne=this.stack[this.stack.length-1].children;let le=ne[ne.length-1];(!le||le.type!=="text")&&(le=St(),le.position={start:Nt(B.start),end:void 0},ne.push(le)),this.stack.push(le)}function I(B){const Y=this.stack.pop();Y.value+=this.sliceSerialize(B),Y.position.end=Nt(B.end)}function H(B){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ne=Y.children[Y.children.length-1];ne.position.end=Nt(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(j.call(this,B),I.call(this,B))}function z(){this.data.atHardBreak=!0}function Q(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.value=B}function W(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.value=B}function F(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.value=B}function G(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=Y,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function V(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=Y,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function re(B){const Y=this.sliceSerialize(B),ne=this.stack[this.stack.length-2];ne.label=Ug(Y),ne.identifier=st(Y).toLowerCase()}function ke(){const B=this.stack[this.stack.length-1],Y=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){const le=B.children;ne.children=le}else ne.alt=Y}function T(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.url=B}function Ce(){const B=this.resume(),Y=this.stack[this.stack.length-1];Y.title=B}function pe(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function we(B){const Y=this.resume(),ne=this.stack[this.stack.length-1];ne.label=Y,ne.identifier=st(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function ce(B){this.data.characterReferenceType=B.type}function J(B){const Y=this.sliceSerialize(B),ne=this.data.characterReferenceType;let le;ne?(le=yl(Y,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=ya(Y);const be=this.stack[this.stack.length-1];be.value+=le}function xe(B){const Y=this.stack.pop();Y.position.end=Nt(B.end)}function ye(B){I.call(this,B);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(B)}function fe(B){I.call(this,B);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(B)}function Re(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function Ze(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function rt(){return{type:"emphasis",children:[]}}function oe(){return{type:"heading",depth:0,children:[]}}function Pe(){return{type:"break"}}function _t(){return{type:"html",value:""}}function ti(){return{type:"image",title:null,url:"",alt:null}}function ir(){return{type:"link",title:null,url:"",children:[]}}function ee(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function me(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function He(){return{type:"paragraph",children:[]}}function Je(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function En(){return{type:"thematicBreak"}}}function Nt(e){return{line:e.line,column:e.column,offset:e.offset}}function Tc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Tc(e,r):d2(e,r)}}function d2(e,t){let n;for(n in t)if(Ec.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function pu(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qn({start:t.start,end:t.end})+") is still open")}function h2(e){const t=this;t.parser=n;function n(r){return l2(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function f2(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 m2(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
147
|
+
`}]}function p2(e,t){const n=t.value?t.value+`
|
|
148
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function g2(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function b2(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E2(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=gn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function T2(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 x2(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xc(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function k2(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xc(e,t);const i={src:gn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function y2(e,t){const n={src:gn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function A2(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function C2(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xc(e,t);const i={href:gn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function _2(e,t){const n={href:gn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function S2(e,t,n){const r=e.all(t),i=n?w2(n):kc(t),a={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
|
|
149
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?s.push(...d.children):s.push(d)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
150
|
+
`});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,l),e.applyData(t,l)}function w2(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=kc(n[r])}return t}function kc(e){const t=e.spread;return t??e.children.length>1}function N2(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function I2(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L2(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function R2(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function v2(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=mt(t.children[1]),u=zr(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function D2(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,o=s?s.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const h=t.children[u],p={},m=s?s[u]:void 0;m&&(p.align=m);let g={type:"element",tagName:a,properties:p,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),l.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,d),e.applyData(t,d)}function O2(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const gu=9,bu=32;function P2(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(Eu(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Eu(t.slice(i),i>0,!1)),a.join("")}function Eu(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===gu||a===bu;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===gu||a===bu;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function M2(e,t){const n={type:"text",value:P2(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function B2(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const F2={blockquote:f2,break:m2,code:p2,delete:g2,emphasis:b2,footnoteReference:E2,heading:T2,html:x2,imageReference:k2,image:y2,inlineCode:A2,linkReference:C2,link:_2,listItem:S2,list:N2,paragraph:I2,root:L2,strong:R2,table:v2,tableCell:O2,tableRow:D2,text:M2,thematicBreak:B2,toml:cr,yaml:cr,definition:cr,footnoteDefinition:cr};function cr(){}function H2(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 U2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function j2(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||H2,r=e.options.footnoteBackLabel||U2,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const d=e.all(l),h=String(l.identifier).toUpperCase(),p=gn(h.toLowerCase());let m=0;const g=[],y=e.footnoteCounts.get(h);for(;y!==void 0&&++m<=y;){g.length>0&&g.push({type:"text",value:" "});let C=typeof n=="string"?n:n(u,m);typeof C=="string"&&(C={type:"text",value:C}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,m),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const S=d[d.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const C=S.children[S.children.length-1];C&&C.type==="text"?C.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...g)}else d.push(...g);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(l,k),o.push(k)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Qt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
151
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
152
|
+
`}]}}const ji={}.hasOwnProperty,q2={};function z2(e,t){const n=t||q2,r=new Map,i=new Map,a=new Map,s={...F2,...n.handlers},o={all:l,applyData:V2,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:n,patch:$2,wrap:W2};return ut(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),o;function u(d,h){const p=d.type,m=o.handlers[p];if(ji.call(o.handlers,p)&&m)return m(o,d,h);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in d){const{children:y,...S}=d,k=Qt(S);return k.children=o.all(d),k}return Qt(d)}return(o.options.unknownHandler||Y2)(o,d,h)}function l(d){const h=[];if("children"in d){const p=d.children;let m=-1;for(;++m<p.length;){const g=o.one(p[m],d);if(g){if(m&&p[m-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Tu(g.value)),!Array.isArray(g)&&g.type==="element")){const y=g.children[0];y&&y.type==="text"&&(y.value=Tu(y.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function $2(e,t){e.position&&(t.position=Xo(e))}function V2(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&a&&Object.assign(n.properties,Qt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Y2(e,t){const n=t.data||{},r="value"in t&&!(ji.call(n,"hProperties")||ji.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function W2(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
153
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
154
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
155
|
+
`}),n}function Tu(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xu(e,t){const n=z2(e,t),r=n.one(e,void 0),i=j2(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
156
|
+
`},i),a}function G2(e,t){return e&&"run"in e?async function(n,r){const i=xu(n,{file:r,...t});await e.run(i,r)}:function(n,r){return xu(n,{file:r,...e||t})}}function ku(e){if(e)throw e}var bi,yu;function Q2(){if(yu)return bi;yu=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},a=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var d=e.call(l,"constructor"),h=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!d&&!h)return!1;var p;for(p in l);return typeof p>"u"||e.call(l,p)},s=function(l,d){n&&d.name==="__proto__"?n(l,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):l[d.name]=d.newValue},o=function(l,d){if(d==="__proto__")if(e.call(l,d)){if(r)return r(l,d).value}else return;return l[d]};return bi=function u(){var l,d,h,p,m,g,y=arguments[0],S=1,k=arguments.length,C=!1;for(typeof y=="boolean"&&(C=y,y=arguments[1]||{},S=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});S<k;++S)if(l=arguments[S],l!=null)for(d in l)h=o(y,d),p=o(l,d),y!==p&&(C&&p&&(a(p)||(m=i(p)))?(m?(m=!1,g=h&&i(h)?h:[]):g=h&&a(h)?h:{},s(y,{name:d,newValue:u(C,g,p)})):typeof p<"u"&&s(y,{name:d,newValue:p}));return y},bi}var K2=Q2();const Ei=ra(K2);function qi(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 X2(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...l){const d=e[++a];let h=-1;if(u){s(u);return}for(;++h<i.length;)(l[h]===null||l[h]===void 0)&&(l[h]=i[h]);i=l,d?Z2(d,o)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Z2(e,t){let n;return r;function r(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(l){const d=l;if(o&&n)throw d;return i(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){n||(n=!0,t(s,...o))}function a(s){i(null,s)}}const ht={basename:J2,dirname:ek,extname:tk,join:nk,sep:"/"};function J2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');er(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function ek(e){if(er(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tk(e){er(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),o===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function nk(...e){let t=-1,n;for(;++t<e.length;)er(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rk(n)}function rk(e){er(e);const t=e.codePointAt(0)===47;let n=ik(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ik(e,t){let n="",r=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=s,a=0;continue}}else if(n.length>0){n="",r=0,i=s,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return n}function er(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ak={cwd:sk};function sk(){return"/"}function zi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uk(e){if(typeof e=="string")e=new URL(e);else if(!zi(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 ok(e)}function ok(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Ti=["history","path","basename","stem","extname","dirname"];class lk{constructor(t){let n;t?zi(t)?n={path:t}:typeof t=="string"||ck(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ak.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ti.length;){const a=Ti[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Ti.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ht.basename(this.path):void 0}set basename(t){ki(t,"basename"),xi(t,"basename"),this.path=ht.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ht.dirname(this.path):void 0}set dirname(t){Au(this.basename,"dirname"),this.path=ht.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ht.extname(this.path):void 0}set extname(t){if(xi(t,"extname"),Au(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=ht.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){zi(t)&&(t=uk(t)),ki(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ht.basename(this.path,this.extname):void 0}set stem(t){ki(t,"stem"),xi(t,"stem"),this.path=ht.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Fe(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xi(e,t){if(e&&e.includes(ht.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ht.sep+"`")}function ki(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Au(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ck(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dk=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),hk={}.hasOwnProperty;class va extends dk{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=X2()}copy(){const t=new va;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ei(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ci("data",this.frozen),this.namespace[t]=n,this):hk.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ci("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=dr(t),r=this.parser||this.Parser;return yi("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),yi("process",this.parser||this.Parser),Ai("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const o=dr(t),u=r.parse(o);r.run(u,o,function(d,h,p){if(d||!h||!p)return l(d);const m=h,g=r.stringify(m,p);pk(g)?p.value=g:p.result=g,l(d,p)});function l(d,h){d||!h?s(d):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),yi("processSync",this.parser||this.Parser),Ai("processSync",this.compiler||this.Compiler),this.process(t,i),_u("processSync","process",n),r;function i(a,s){n=!0,ku(a),r=s}}run(t,n,r){Cu(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(s,o){const u=dr(n);i.run(t,u,l);function l(d,h,p){const m=h||t;d?o(d):s?s(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),_u("runSync","run",r),i;function a(s,o){ku(s),i=o,r=!0}}stringify(t,n){this.freeze();const r=dr(n),i=this.compiler||this.Compiler;return Ai("stringify",i),Cu(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ci("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[d,...h]=l;u(d,h)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(l.plugins),l.settings&&(i.settings=Ei(!0,i.settings,l.settings))}function o(l){let d=-1;if(l!=null)if(Array.isArray(l))for(;++d<l.length;){const h=l[d];a(h)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===l){p=h;break}if(p===-1)r.push([l,...d]);else if(d.length>0){let[m,...g]=d;const y=r[p][1];qi(y)&&qi(m)&&(m=Ei(!0,y,m)),r[p]=[l,m,...g]}}}}const fk=new va().freeze();function yi(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ai(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ci(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 Cu(e){if(!qi(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function _u(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function dr(e){return mk(e)?e:new lk(e)}function mk(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pk(e){return typeof e=="string"||gk(e)}function gk(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Da(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var nn=Da();function yc(e){nn=e}var $t={exec:()=>null};function he(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(qe.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var bk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),qe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Ek=/^(?:[ \t]*(?:\n|$))+/,Tk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,tr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oa=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ac=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cc=he(Ac).replace(/bull/g,Oa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),yk=he(Ac).replace(/bull/g,Oa).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Pa=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ak=/^[^\n]+/,Ma=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ck=he(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ma).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_k=he(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oa).getRegex(),Wr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ba=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sk=he("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ba).replace("tag",Wr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_c=he(Pa).replace("hr",tr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wr).getRegex(),wk=he(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_c).getRegex(),Fa={blockquote:wk,code:Tk,def:Ck,fences:xk,heading:kk,hr:tr,html:Sk,lheading:Cc,list:_k,newline:Ek,paragraph:_c,table:$t,text:Ak},Su=he("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",tr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wr).getRegex(),Nk={...Fa,lheading:yk,table:Su,paragraph:he(Pa).replace("hr",tr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Su).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wr).getRegex()},Ik={...Fa,html:he(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ba).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$t,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:he(Pa).replace("hr",tr).replace("heading",` *#{1,6} *[^
|
|
157
|
+
]`).replace("lheading",Cc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Lk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sc=/^( {2,}|\\)\n(?!\s*$)/,vk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,bn=/[\p{P}\p{S}]/u,Gr=/[\s\p{P}\p{S}]/u,Ha=/[^\s\p{P}\p{S}]/u,Dk=he(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Gr).getRegex(),wc=/(?!~)[\p{P}\p{S}]/u,Ok=/(?!~)[\s\p{P}\p{S}]/u,Pk=/(?:[^\s\p{P}\p{S}]|~)/u,Mk=he(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",bk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Nc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bk=he(Nc,"u").replace(/punct/g,bn).getRegex(),Fk=he(Nc,"u").replace(/punct/g,wc).getRegex(),Ic="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hk=he(Ic,"gu").replace(/notPunctSpace/g,Ha).replace(/punctSpace/g,Gr).replace(/punct/g,bn).getRegex(),Uk=he(Ic,"gu").replace(/notPunctSpace/g,Pk).replace(/punctSpace/g,Ok).replace(/punct/g,wc).getRegex(),jk=he("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ha).replace(/punctSpace/g,Gr).replace(/punct/g,bn).getRegex(),qk=he(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,bn).getRegex(),zk="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",$k=he(zk,"gu").replace(/notPunctSpace/g,Ha).replace(/punctSpace/g,Gr).replace(/punct/g,bn).getRegex(),Vk=he(/\\(punct)/,"gu").replace(/punct/g,bn).getRegex(),Yk=he(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Wk=he(Ba).replace("(?:-->|$)","-->").getRegex(),Gk=he("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Wk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),wr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Qk=he(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",wr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lc=he(/^!?\[(label)\]\[(ref)\]/).replace("label",wr).replace("ref",Ma).getRegex(),Rc=he(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ma).getRegex(),Kk=he("reflink|nolink(?!\\()","g").replace("reflink",Lc).replace("nolink",Rc).getRegex(),wu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ua={_backpedal:$t,anyPunctuation:Vk,autolink:Yk,blockSkip:Mk,br:Sc,code:Rk,del:$t,delLDelim:$t,delRDelim:$t,emStrongLDelim:Bk,emStrongRDelimAst:Hk,emStrongRDelimUnd:jk,escape:Lk,link:Qk,nolink:Rc,punctuation:Dk,reflink:Lc,reflinkSearch:Kk,tag:Gk,text:vk,url:$t},Xk={...Ua,link:he(/^!?\[(label)\]\((.*?)\)/).replace("label",wr).getRegex(),reflink:he(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wr).getRegex()},$i={...Ua,emStrongRDelimAst:Uk,emStrongLDelim:Fk,delLDelim:qk,delRDelim:$k,url:he(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wu).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:he(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wu).getRegex()},Zk={...$i,br:he(Sc).replace("{2,}","*").getRegex(),text:he($i.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},hr={normal:Fa,gfm:Nk,pedantic:Ik},Nn={normal:Ua,gfm:$i,breaks:Zk,pedantic:Xk},Jk={"&":"&","<":"<",">":">",'"':""","'":"'"},Nu=e=>Jk[e];function dt(e,t){if(t){if(qe.escapeTest.test(e))return e.replace(qe.escapeReplace,Nu)}else if(qe.escapeTestNoEncode.test(e))return e.replace(qe.escapeReplaceNoEncode,Nu);return e}function Iu(e){try{e=encodeURI(e).replace(qe.percentDecode,"%")}catch{return null}return e}function Lu(e,t){let n=e.replace(qe.findPipe,(a,s,o)=>{let u=!1,l=s;for(;--l>=0&&o[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(qe.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(qe.slashPipe,"|");return r}function In(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function ey(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function ty(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function Ru(e,t,n,r,i){let a=t.href,s=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,u}function ny(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
158
|
+
`).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
|
|
159
|
+
`)}var Nr=class{options;rules;lexer;constructor(e){this.options=e||nn}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:In(n,`
|
|
160
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=ny(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=In(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:In(t[0],`
|
|
161
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=In(t[0],`
|
|
162
|
+
`).split(`
|
|
163
|
+
`),r="",i="",a=[];for(;n.length>0;){let s=!1,o=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))o.push(n[u]),s=!0;else if(!s)o.push(n[u]);else break;n=n.slice(u);let l=o.join(`
|
|
164
|
+
`),d=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
165
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
166
|
+
${l}`:l,i=i?`${i}
|
|
167
|
+
${d}`:d;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=h,n.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let m=p,g=m.raw+`
|
|
168
|
+
`+n.join(`
|
|
169
|
+
`),y=this.blockquote(g);a[a.length-1]=y,r=r.substring(0,r.length-m.raw.length)+y.raw,i=i.substring(0,i.length-m.text.length)+y.text;break}else if(p?.type==="list"){let m=p,g=m.raw+`
|
|
170
|
+
`+n.join(`
|
|
171
|
+
`),y=this.list(g);a[a.length-1]=y,r=r.substring(0,r.length-p.raw.length)+y.raw,i=i.substring(0,i.length-m.raw.length)+y.raw,n=g.substring(a.at(-1).raw.length).split(`
|
|
172
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:a,text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),s=!1;for(;e;){let u=!1,l="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let h=ty(t[2].split(`
|
|
173
|
+
`,1)[0],t[1].length),p=e.split(`
|
|
174
|
+
`,1)[0],m=!h.trim(),g=0;if(this.options.pedantic?(g=2,d=h.trimStart()):m?g=t[1].length+1:(g=h.search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=h.slice(g),g+=t[1].length),m&&this.rules.other.blankLine.test(p)&&(l+=p+`
|
|
175
|
+
`,e=e.substring(p.length+1),u=!0),!u){let y=this.rules.other.nextBulletRegex(g),S=this.rules.other.hrRegex(g),k=this.rules.other.fencesBeginRegex(g),C=this.rules.other.headingBeginRegex(g),w=this.rules.other.htmlBeginRegex(g),R=this.rules.other.blockquoteBeginRegex(g);for(;e;){let M=e.split(`
|
|
176
|
+
`,1)[0],N;if(p=M,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),N=p):N=p.replace(this.rules.other.tabCharGlobal," "),k.test(p)||C.test(p)||w.test(p)||R.test(p)||y.test(p)||S.test(p))break;if(N.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=`
|
|
177
|
+
`+N.slice(g);else{if(m||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(h)||C.test(h)||S.test(h))break;d+=`
|
|
178
|
+
`+p}m=!p.trim(),l+=M+`
|
|
179
|
+
`,e=e.substring(M.length+1),h=N.slice(g)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(s=!0)),i.items.push({type:"list_item",raw:l,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=l}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let u of i.items){if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),u.task){if(u.text=u.text.replace(this.rules.other.listReplaceTask,""),u.tokens[0]?.type==="text"||u.tokens[0]?.type==="paragraph"){u.tokens[0].raw=u.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),u.tokens[0].text=u.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}}let l=this.rules.other.listTaskCheckbox.exec(u.raw);if(l){let d={type:"checkbox",raw:l[0]+" ",checked:l[0]!=="[ ]"};u.checked=d.checked,i.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=d.raw+u.tokens[0].raw,u.tokens[0].text=d.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(d)):u.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):u.tokens.unshift(d)}}if(!i.loose){let l=u.tokens.filter(h=>h.type==="space"),d=l.length>0&&l.some(h=>this.rules.other.anyLine.test(h.raw));i.loose=d}}if(i.loose)for(let u of i.items){u.loose=!0;for(let l of u.tokens)l.type==="text"&&(l.type="paragraph")}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:i}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Lu(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
180
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?a.align.push("right"):this.rules.other.tableAlignCenter.test(s)?a.align.push("center"):this.rules.other.tableAlignLeft.test(s)?a.align.push("left"):a.align.push(null);for(let s=0;s<n.length;s++)a.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:a.align[s]});for(let s of i)a.rows.push(Lu(s,a.header.length).map((o,u)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:a.align[u]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
181
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=In(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=ey(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Ru(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Ru(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,o=i,u=0,l=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);(r=l.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(s=[...a].length,r[3]||r[4]){o+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){u+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o+u);let d=[...r[0]][0].length,h=e.slice(0,i+r.index+d+s);if(Math.min(i,s)%2){let m=h.slice(1,-1);return{type:"em",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}let p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,o=i,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(r=u.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a||(s=[...a].length,s!==i))continue;if(r[3]||r[4]){o+=s;continue}if(o-=s,o>0)continue;s=Math.min(s,s+o);let l=[...r[0]][0].length,d=e.slice(0,i+r.index+l+s),h=d.slice(i,-i);return{type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},nt=class Vi{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||nn,this.options.tokenizer=this.options.tokenizer||new Nr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:qe,block:hr.normal,inline:Nn.normal};this.options.pedantic?(n.block=hr.pedantic,n.inline=Nn.pedantic):this.options.gfm&&(n.block=hr.gfm,this.options.breaks?n.inline=Nn.breaks:n.inline=Nn.gfm),this.tokenizer.rules=n}static get rules(){return{block:hr,inline:Nn}}static lex(t,n){return new Vi(n).lex(t)}static lexInline(t,n){return new Vi(n).inlineTokens(t)}lex(t){t=t.replace(qe.carriageReturn,`
|
|
182
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(qe.tabCharGlobal," ").replace(qe.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let s=n.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
|
|
183
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
184
|
+
`)?"":`
|
|
185
|
+
`)+i.raw,s.text+=`
|
|
186
|
+
`+i.text,this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
187
|
+
`)?"":`
|
|
188
|
+
`)+i.raw,s.text+=`
|
|
189
|
+
`+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),u;this.options.extensions.startBlock.forEach(l=>{u=l.call({lexer:this},o),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=n.at(-1);r&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
190
|
+
`)?"":`
|
|
191
|
+
`)+i.raw,s.text+=`
|
|
192
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i),r=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let s=n.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
193
|
+
`)?"":`
|
|
194
|
+
`)+i.raw,s.text+=`
|
|
195
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let s=!1,o="";for(;t;){s||(o=""),s=!1;let u;if(this.options.extensions?.inline?.some(d=>(u=d.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let d=n.at(-1);u.type==="text"&&d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,o)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t,r,o)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let l=t;if(this.options.extensions?.startInline){let d=1/0,h=t.slice(1),p;this.options.extensions.startInline.forEach(m=>{p=m.call({lexer:this},h),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(l=t.substring(0,d+1))}if(u=this.tokenizer.inlineText(l)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(o=u.raw.slice(-1)),s=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=u.raw,d.text+=u.text):n.push(u);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},Ir=class{options;parser;constructor(e){this.options=e||nn}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(qe.notSpaceStart)?.[0],i=e.replace(qe.endingNewline,"")+`
|
|
196
|
+
`;return r?'<pre><code class="language-'+dt(r)+'">'+(n?i:dt(i,!0))+`</code></pre>
|
|
197
|
+
`:"<pre><code>"+(n?i:dt(i,!0))+`</code></pre>
|
|
198
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
199
|
+
${this.parser.parse(e)}</blockquote>
|
|
200
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
201
|
+
`}hr(e){return`<hr>
|
|
202
|
+
`}list(e){let t=e.ordered,n=e.start,r="";for(let s=0;s<e.items.length;s++){let o=e.items[s];r+=this.listitem(o)}let i=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+i+a+`>
|
|
203
|
+
`+r+"</"+i+`>
|
|
204
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
205
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
206
|
+
`}table(e){let t="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);t+=this.tablerow({text:n});let r="";for(let i=0;i<e.rows.length;i++){let a=e.rows[i];n="";for(let s=0;s<a.length;s++)n+=this.tablecell(a[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
207
|
+
<thead>
|
|
208
|
+
`+t+`</thead>
|
|
209
|
+
`+r+`</table>
|
|
210
|
+
`}tablerow({text:e}){return`<tr>
|
|
211
|
+
${e}</tr>
|
|
212
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
213
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${dt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Iu(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+dt(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Iu(e);if(i===null)return dt(n);e=i;let a=`<img src="${e}" alt="${dt(n)}"`;return t&&(a+=` title="${dt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:dt(e.text)}},ja=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},at=class Yi{options;renderer;textRenderer;constructor(t){this.options=t||nn,this.options.renderer=this.options.renderer||new Ir,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ja}static parse(t,n){return new Yi(n).parse(t)}static parseInline(t,n){return new Yi(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=o||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=o||"";continue}}let s=a;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},vn=class{options;block;constructor(e){this.options=e||nn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?nt.lex:nt.lexInline}provideParser(e=this.block){return e?at.parse:at.parseInline}},ry=class{defaults=Da();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=at;Renderer=Ir;TextRenderer=ja;Lexer=nt;Tokenizer=Nr;Hooks=vn;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let s of a.header)r=r.concat(this.walkTokens(s.tokens,n));for(let s of a.rows)for(let o of s)r=r.concat(this.walkTokens(o.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);r=r.concat(this.walkTokens(o,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=n.renderers[a.name];s?n.renderers[a.name]=function(...o){let u=a.renderer.apply(this,o);return u===!1&&(u=s.apply(this,o)),u}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[a.level];s?s.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new Ir(this.defaults);for(let s in r.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,u=r.renderer[o],l=a[o];a[o]=(...d)=>{let h=u.apply(a,d);return h===!1&&(h=l.apply(a,d)),h||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new Nr(this.defaults);for(let s in r.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,u=r.tokenizer[o],l=a[o];a[o]=(...d)=>{let h=u.apply(a,d);return h===!1&&(h=l.apply(a,d)),h}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new vn;for(let s in r.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,u=r.hooks[o],l=a[o];vn.passThroughHooks.has(s)?a[o]=d=>{if(this.defaults.async&&vn.passThroughHooksRespectAsync.has(s))return(async()=>{let p=await u.call(a,d);return l.call(a,p)})();let h=u.call(a,d);return l.call(a,h)}:a[o]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await u.apply(a,d);return p===!1&&(p=await l.apply(a,d)),p})();let h=u.apply(a,d);return h===!1&&(h=l.apply(a,d)),h}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(o){let u=[];return u.push(s.call(this,o)),a&&(u=u.concat(a.call(this,o))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return nt.lex(t,n??this.defaults)}parser(t,n){return at.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(n):n,u=await(a.hooks?await a.hooks.provideLexer(t):t?nt.lex:nt.lexInline)(o,a),l=a.hooks?await a.hooks.processAllTokens(u):u;a.walkTokens&&await Promise.all(this.walkTokens(l,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser(t):t?at.parse:at.parseInline)(l,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let o=(a.hooks?a.hooks.provideLexer(t):t?nt.lex:nt.lexInline)(n,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let u=(a.hooks?a.hooks.provideParser(t):t?at.parse:at.parseInline)(o,a);return a.hooks&&(u=a.hooks.postprocess(u)),u}catch(o){return s(o)}}}onError(t,n){return r=>{if(r.message+=`
|
|
214
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+dt(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Xt=new ry;function ge(e,t){return Xt.parse(e,t)}ge.options=ge.setOptions=function(e){return Xt.setOptions(e),ge.defaults=Xt.defaults,yc(ge.defaults),ge};ge.getDefaults=Da;ge.defaults=nn;ge.use=function(...e){return Xt.use(...e),ge.defaults=Xt.defaults,yc(ge.defaults),ge};ge.walkTokens=function(e,t){return Xt.walkTokens(e,t)};ge.parseInline=Xt.parseInline;ge.Parser=at;ge.parser=at.parse;ge.Renderer=Ir;ge.TextRenderer=ja;ge.Lexer=nt;ge.lexer=nt.lex;ge.Tokenizer=Nr;ge.Hooks=vn;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;at.parse;nt.lex;var iy=300,ay="300px",sy=500;function uy(e={}){let{immediate:t=!1,debounceDelay:n=iy,rootMargin:r=ay,idleTimeout:i=sy}=e,[a,s]=b.useState(!1),o=b.useRef(null),u=b.useRef(null),l=b.useRef(null),d=b.useMemo(()=>m=>{let g=Date.now();return window.setTimeout(()=>{m({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),h=b.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(m,g)=>window.requestIdleCallback(m,g):d,[d]),p=b.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?m=>window.cancelIdleCallback(m):m=>{clearTimeout(m)},[]);return b.useEffect(()=>{if(t){s(!0);return}let m=o.current;if(!m)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null);let g=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null)},y=w=>{l.current=h(R=>{R.timeRemaining()>0||R.didTimeout?(s(!0),w.disconnect()):l.current=h(()=>{s(!0),w.disconnect()},{timeout:i/2})},{timeout:i})},S=w=>{g(),u.current=window.setTimeout(()=>{var R,M;let N=w.takeRecords();(N.length===0||(M=(R=N.at(-1))==null?void 0:R.isIntersecting)!=null&&M)&&y(w)},n)},k=(w,R)=>{w.isIntersecting?S(R):g()},C=new IntersectionObserver(w=>{for(let R of w)k(R,C)},{rootMargin:r,threshold:0});return C.observe(m),()=>{u.current&&clearTimeout(u.current),l.current&&p(l.current),C.disconnect()}},[t,n,r,i,p,h]),{shouldRender:a,containerRef:o}}var oy=320,ly=4,vc=()=>typeof performance>"u"?Date.now():performance.now();function vu(e){var t,n;let r=(t=e?.now)!=null?t:vc,i=(n=e?.maxBacklogMs)!=null?n:oy,a=0,s=0;return{now:r,beginPass(o){s=Math.min(Math.max(a,o),o+i)},mark(){return s},rewind(o){s=o},take(o,u,l){if(o<=0)return{baseDelay:0,step:Math.max(0,u)};let d=Math.max(0,u),h=d===0?0:Math.min(d,ly),p=Math.max(s,l),m=l+i,g=p+Math.max(0,o-1)*d,y=d;if(g>m&&o>1)if(p<m){let k=m-p;y=Math.max(h,k/(o-1))}else y=h;let S=Math.max(0,Math.round(p-l));return s=p+o*y,{baseDelay:S,step:y}},commitPass(){a=s}}}var Dc=/\s/,qa=/^\s+$/,cy=new Set(["pre","svg","math","annotation"]),dy=new Set(["img","hr"]),nr=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",za=e=>e.some(t=>nr(t)&&cy.has(t.tagName)),hy=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(nr(n)&&n.tagName==="li")return n}},fy=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate-marker"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(n)}ms;--sd-marker-easing:${r}`},my=new Set(["ul","ol","li"]),Oc=e=>{for(let t of e.children)if(nr(t)){if(t.tagName==="input")return t;if(my.has(t.tagName))continue;let n=Oc(t);if(n)return n}},Pc=(e,t,n,r)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate"]=!0;let i=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${n}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(r)}ms`},py=(e,t,n,r)=>{let i=Oc(e);i&&Pc(i,t,n,r)},gy=(e,t,n,r,i,a)=>{if(za(t))return;let s=r.prevContentLength,o=i.count;i.count+=1;let u=s>0&&o<s,l=u?0:a.baseDelay+i.newIndex++*a.step;Pc(e,n,u?0:n.duration,l)},by=e=>{var t;for(let n=e.length-1;n>=0;n-=1){let r=e[n];if(nr(r)){if((t=r.properties)!=null&&t["data-sd-animated"])break;r.properties={...r.properties,"data-sd-animated":!0}}}},Mc=e=>{let t=[],n="",r=!1;for(let i of e){let a=Dc.test(i);if(a!==r&&n){if(a){n+=i,r=!0;continue}t.push(n),n=""}n+=i,r=a}return n&&t.push(n),t},Bc=e=>{let t=[],n="";for(let r of e)Dc.test(r)?t.length>0&&!qa.test(t.at(-1))?t[t.length-1]+=r:n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&(t.length>0?t[t.length-1]+=n:t.push(n)),t},Ey=(e,t,n,r,i,a)=>{let s=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(s+=`;--sd-delay:${Math.round(a)}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s},children:[{type:"text",value:e}]}},Du=(e,t)=>!(e>0&&t<e),Wi=e=>nr(e)&&dy.has(e.tagName),Ty=(e,t,n)=>{let r=0,i=0;return Mr(e,a=>a.type==="text"||Wi(a),(a,s)=>{if(za(s))return Vt;if(Wi(a)){Du(n,i)&&(r+=1),i+=1;return}let o=a.value;if(!o.trim()){i+=o.length;return}let u=t.sep==="char"?Bc(o):Mc(o);for(let l of u){let d=i;i+=l.length,!qa.test(l)&&Du(n,d)&&(r+=1)}}),r},xy=(e,t,n,r,i,a)=>{var s;let o=t.at(-1);if(!(o&&"children"in o))return;if(za(t))return Vt;let u=o,l=u.children.indexOf(e);if(l===-1)return;let d=e.value;if(!d.trim()){i.count+=d.length;return}let h=n.sep==="char"?Bc(d):Mc(d),p=r.prevContentLength,m=!1,g=hy(t),y=!!(g&&!((s=g.properties)!=null&&s["data-sd-animate-marker"])),S=!1,k=h.map(C=>{let w=i.count;if(i.count+=C.length,qa.test(C))return{type:"text",value:C};let R=p>0&&w<p,M=R?0:a.baseDelay+i.newIndex++*a.step;if(m=!0,g&&y&&!S){let N=R?0:n.duration;fy(g,N,M,n.easing),py(g,n,N,M),S=!0}return Ey(C,n.animation,n.duration,n.easing,R,M)});return m&&by(t),u.children.splice(l,1,...k),l+k.length},ky=0;function Fc(e){var t,n,r,i,a;let s={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(a=e?.stagger)!=null?a:40,timeline:e?.timeline},o={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},u=ky++,l=()=>d=>{var h;let p={count:0,newIndex:0};o.prevContentLength=o.committedCharCount;let m=s.timeline,g=(h=m?.now())!=null?h:vc();m&&(o.pendingMark===null?o.pendingMark=m.mark():m.rewind(o.pendingMark));let y=m?m.take(Ty(d,s,o.prevContentLength),s.stagger,g):{baseDelay:0,step:s.stagger};Mr(d,S=>S.type==="text"||Wi(S),(S,k)=>{if(S.type==="text")return xy(S,k,s,o,p,y);gy(S,k,s,o,p,y)}),o.lastRenderCharCount=p.count,o.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(d){o.committedCharCount=d,o.prevContentLength=d},getLastRenderCharCount(){return o.lastRenderCharCount},commit(){o.committedCharCount=o.lastRenderCharCount,o.pendingMark=null}}}Fc();var Hc=b.createContext(!1),yy=()=>b.useContext(Hc),Qr=(...e)=>dc(Kl(e)),Ay=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},Cy=e=>e?(...t)=>Ay(e,dc(Kl(t))):Qr,on=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},Gi=b.createContext(Qr),se=()=>b.useContext(Gi),_y=8,Uc=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},jc=(e,t,n)=>{let r=b.useRef(null),i=b.useRef(!0),a=b.useRef(!1);return b.useEffect(()=>{let s=r.current;if(!(s&&t))return;let o=()=>{let u=s.scrollHeight-s.scrollTop-s.clientHeight<_y;i.current=u};return s.addEventListener("scroll",o,{passive:!0}),()=>s.removeEventListener("scroll",o)},[t]),b.useEffect(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),b.useEffect(()=>{let s=r.current;s&&t&&e&&i.current&&s.scrollTo({top:s.scrollHeight,behavior:"instant"})},[e,t,n]),r},Sy=Qr("block"),wy=Qr("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Ny=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},qc=b.memo(({children:e,result:t,language:n,className:r,maxHeight:i,startLine:a,lineNumbers:s=!0,...o})=>{let u=se(),{isAnimating:l}=b.useContext(Oe),d=Uc(i),h=jc(l,!!d,t),p=b.useMemo(()=>u(wy),[u]),m=b.useMemo(()=>u(Sy),[u]),g=b.useMemo(()=>{let y={};return t.bg&&(y["--sdm-bg"]=t.bg),t.fg&&(y["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(y,Ny(t.rootStyle)),y},[t.bg,t.fg,t.rootStyle]);return f.jsx("div",{className:u(r,d?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",ref:h,style:d?{maxHeight:d}:void 0,...o,children:f.jsx("pre",{className:u(r,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:g,children:f.jsx("code",{className:s?u("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((y,S)=>f.jsx("span",{className:s?p:m,children:y.length===0||y.length===1&&y[0].content===""?`
|
|
215
|
+
`:y.map((k,C)=>{let w={},R=!!k.bgColor;if(k.color&&(w["--sdm-c"]=k.color),k.bgColor&&(w["--sdm-tbg"]=k.bgColor),k.htmlStyle)for(let[M,N]of Object.entries(k.htmlStyle))M==="color"?w["--sdm-c"]=N:M==="background-color"?(w["--sdm-tbg"]=N,R=!0):w[M]=N;return f.jsx("span",{className:u("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",R&&"bg-[var(--sdm-tbg)]",R&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:w,...k.htmlAttrs,children:k.content},C)})},S))})})})}),Iy=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=se();return f.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},zc=b.createContext({code:""}),$c=()=>b.useContext(zc),Ly=({language:e})=>{let t=se();return f.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:f.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},Ry=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
216
|
+
`;)t--;return e.slice(0,t)},vy=b.lazy(()=>Promise.resolve().then(()=>require("./highlighted-body-KPVGNVTW-CSL27xRm.cjs")).then(e=>({default:e.HighlightedCodeBlockBody}))),Dy=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:s,...o})=>{let u=se(),{codeBlockMaxHeight:l}=b.useContext(Oe),d=b.useMemo(()=>Ry(e),[e]),h=b.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:d.split(`
|
|
217
|
+
`).map(p=>[{content:p,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[d]);return f.jsx(zc.Provider,{value:{code:e},children:f.jsxs(Iy,{dir:"ltr",isIncomplete:i,language:t,children:[f.jsx(Ly,{language:t}),r?f.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:f.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,f.jsx(b.Suspense,{fallback:f.jsx(qc,{className:n,language:t,lineNumbers:s,maxHeight:l,result:h,startLine:a,...o}),children:f.jsx(vy,{className:n,code:d,language:t,lineNumbers:s,maxHeight:l,raw:h,startLine:a,...o})})]})})},Oy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Py=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),My=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),By=e=>f.jsxs("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[f.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Fy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),Hy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Uy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),jy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),qy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),zy=e=>f.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:f.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Dn={CheckIcon:Oy,CopyIcon:Py,DownloadIcon:My,ExternalLinkIcon:jy,Loader2Icon:By,Maximize2Icon:Fy,RotateCcwIcon:Hy,XIcon:Uy,ZoomInIcon:qy,ZoomOutIcon:zy},Vc=b.createContext(Dn),$y=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},Ou=({icons:e,children:t})=>{let n=b.useRef(e),r=b.useRef(e?{...Dn,...e}:Dn);$y(n.current,e)||(n.current=e,r.current=e?{...Dn,...e}:Dn);let i=r.current;return f.jsx(Vc.Provider,{value:i,children:t})},lt=()=>b.useContext(Vc),Yc={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Qi=b.createContext(Yc),gt=()=>b.useContext(Qi),Ki=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let o=se(),[u,l]=b.useState(!1),d=b.useRef(0),{code:h}=$c(),{isAnimating:p}=b.useContext(Oe),m=gt(),g=a??h,y=async()=>{var C;if(typeof window>"u"||!((C=navigator?.clipboard)!=null&&C.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(g),l(!0),e?.(),d.current=window.setTimeout(()=>l(!1),n))}catch(w){t?.(w)}};b.useEffect(()=>()=>{window.clearTimeout(d.current)},[]);let S=lt(),k=u?S.CheckIcon:S.CopyIcon;return f.jsxs(f.Fragment,{children:[f.jsx("button",{"aria-label":m.copyCode,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:p,onClick:y,title:m.copyCode,type:"button",...s,children:r??f.jsx(k,{"aria-hidden":"true",size:14})}),u&&f.jsx("output",{"aria-live":"polite",className:"sr-only",children:m.copied})]})},$a=(e,t,n)=>{if(typeof e=="boolean")return n;let r=e[t];if(typeof r!="object")return n;let i=r.download;return typeof i!="object"?n:i.filename||n},Pu={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Vy=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let o=se(),{code:u}=$c(),{isAnimating:l,controls:d}=b.useContext(Oe),h=gt(),p=lt(),m=a??u,g=n&&n in Pu?Pu[n]:"txt",y=`${$a(d,"code","file")}.${g}`,S="text/plain",k=()=>{try{on(y,m,S),e?.()}catch(C){t?.(C)}};return f.jsx("button",{"aria-label":h.downloadFile,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:k,title:h.downloadFile,type:"button",...s,children:r??f.jsx(p.DownloadIcon,{size:14})})},Mu=()=>{let{Loader2Icon:e}=lt(),t=se();return f.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[f.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),f.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:f.jsx(e,{className:t("size-4 animate-spin")})})]})},Yy=/\.[^/.]+$/,Wy=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,showControls:s=!0,showDownloadControl:o=!0,...u})=>{let{DownloadIcon:l}=lt(),d=se(),h=b.useRef(null),[p,m]=b.useState(!1),[g,y]=b.useState(!1),S=gt(),k=u.width!=null||u.height!=null,C=(p||k)&&!g&&s&&o,w=g&&!k;b.useEffect(()=>{let v=h.current;if(v!=null&&v.complete){let D=v.naturalWidth>0;m(D),y(!D)}},[]);let R=b.useCallback(v=>{m(!0),y(!1),i?.(v)},[i]),M=b.useCallback(v=>{m(!1),y(!0),a?.(v)},[a]),N=async()=>{if(n)try{let v=await(await fetch(n)).blob(),D=new URL(n,window.location.origin).pathname.split("/").pop()||"",j=D.split(".").pop(),I=D.includes(".")&&j!==void 0&&j.length<=4,H="";if(I)H=D;else{let z=v.type,Q="png";z.includes("jpeg")||z.includes("jpg")?Q="jpg":z.includes("png")?Q="png":z.includes("svg")?Q="svg":z.includes("gif")?Q="gif":z.includes("webp")&&(Q="webp"),H=`${(r||D||"image").replace(Yy,"")}.${Q}`}on(H,v,v.type)}catch{window.open(n,"_blank")}};return n?f.jsxs("div",{className:d("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[f.jsx("img",{alt:r,className:d("max-w-full rounded-lg",w&&"hidden",t),"data-streamdown":"image",onError:M,onLoad:R,ref:h,src:n,...u}),w&&f.jsx("span",{className:d("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:S.imageNotAvailable}),s&&f.jsx("div",{className:d("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),C&&f.jsx("button",{className:d("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:N,title:S.downloadImage,type:"button",children:f.jsx(l,{size:14})})]}):null},zn=0,Va=()=>{zn+=1,zn===1&&(document.body.style.overflow="hidden")},Ya=()=>{zn=Math.max(0,zn-1),zn===0&&(document.body.style.overflow="")},Gy=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:o}=lt(),u=se(),[l,d]=b.useState(!1),h=gt(),p=b.useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)}catch{}},[e]),m=b.useCallback(()=>{r(),n()},[r,n]);if(b.useEffect(()=>{if(t){Va();let y=S=>{S.key==="Escape"&&n()};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),Ya()}}},[t,n]),!t||typeof document>"u")return null;let g=f.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:y=>{y.key==="Escape"&&n()},role:"button",tabIndex:0,children:f.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[f.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:h.close,type:"button",children:f.jsx(o,{size:16})}),f.jsxs("div",{className:u("flex flex-col gap-2"),children:[f.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[f.jsx(s,{size:20}),f.jsx("span",{children:h.openExternalLink})]}),f.jsx("p",{className:u("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),f.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),f.jsxs("div",{className:u("flex gap-2"),children:[f.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:p,type:"button",children:l?f.jsxs(f.Fragment,{children:[f.jsx(i,{size:14}),f.jsx("span",{children:h.copied})]}):f.jsxs(f.Fragment,{children:[f.jsx(a,{size:14}),f.jsx("span",{children:h.copyLink})]})}),f.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:m,type:"button",children:[f.jsx(s,{size:14}),f.jsx("span",{children:h.openLink})]})]})]})});return na.createPortal(g,document.body)},Xi=b.createContext(null),Wa=()=>b.useContext(Xi),Qy=()=>{var e;let t=Wa();return(e=t?.code)!=null?e:null},Ga=()=>{var e;let t=Wa();return(e=t?.mermaid)!=null?e:null},Ky=e=>{var t;let n=Wa();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},Xy=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},Zy=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,d=o.height*r;u.width=l,u.height=d;let h=u.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(o,0,0,l,d),u.toBlob(p=>{if(!p){a(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},Wc=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let s=se(),[o,u]=b.useState(!1),l=b.useRef(null),{isAnimating:d,controls:h}=b.useContext(Oe),p=lt(),m=Ga(),g=gt(),y=$a(h,"mermaid","diagram"),S=async k=>{try{if(k==="mmd"){let v=`${y}.mmd`;on(v,e,"text/plain"),u(!1),r?.(k);return}if(!m){a?.(new Error("Mermaid plugin not available"));return}let C=m.getMermaid(i),w=e.split("").reduce((v,D)=>(v<<5)-v+D.charCodeAt(0)|0,0),R=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:M}=await C.render(R,e);if(!M){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}let N=Xy(M);if(k==="svg"){let v=`${y}.svg`;on(v,N,"image/svg+xml"),u(!1),r?.(k);return}if(k==="png"){let v=await Zy(N);on(`${y}.png`,v,"image/png"),r?.(k),u(!1);return}}catch(C){a?.(C)}};return b.useEffect(()=>{let k=C=>{let w=C.composedPath();l.current&&!w.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),f.jsxs("div",{className:s("relative"),ref:l,children:[f.jsx("button",{"aria-label":g.downloadDiagram,className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:d,onClick:()=>u(!o),title:g.downloadDiagram,type:"button",children:t??f.jsx(p.DownloadIcon,{"aria-hidden":"true",size:14})}),o?f.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[f.jsx("button",{"aria-label":g.downloadDiagramAsSvg,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>S("svg"),title:g.downloadDiagramAsSvg,type:"button",children:g.mermaidFormatSvg}),f.jsx("button",{"aria-label":g.downloadDiagramAsPng,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>S("png"),title:g.downloadDiagramAsPng,type:"button",children:g.mermaidFormatPng}),f.jsx("button",{"aria-label":g.downloadDiagramAsMmd,className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>S("mmd"),title:g.downloadDiagramAsMmd,type:"button",children:g.mermaidFormatMmd})]}):null]})},Jy=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:s,XIcon:o}=lt(),u=se(),[l,d]=b.useState(!1),{isAnimating:h,controls:p}=b.useContext(Oe),m=gt(),g=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),y=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.download!==!1})(),S=(()=>{if(typeof p=="boolean")return p;let C=p.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.copy!==!1})(),k=()=>{d(!l)};return b.useEffect(()=>{if(l){Va();let C=w=>{w.key==="Escape"&&d(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),Ya()}}},[l]),b.useEffect(()=>{l?n?.():r&&r()},[l,n,r]),f.jsxs(f.Fragment,{children:[f.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:h,onClick:k,title:m.viewFullscreen,type:"button",...a,"aria-label":m.viewFullscreen,children:f.jsx(s,{"aria-hidden":"true",size:14})}),l?na.createPortal(f.jsxs("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:k,onKeyDown:C=>{C.key==="Escape"&&k()},role:"dialog",children:[f.jsxs("div",{className:u("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:[y?f.jsx(Wc,{chart:e,config:t}):null,S?f.jsx(Ki,{code:e}):null,f.jsx("button",{"aria-label":m.exitFullscreen,className:u("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:k,title:m.exitFullscreen,type:"button",children:f.jsx(o,{"aria-hidden":"true",size:20})})]}),f.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:f.jsx(Dd,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:g})})]}),document.body):null]})};function Zi(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let n=e;return n.tagName==="BR"?`
|
|
218
|
+
`:Array.from(n.childNodes).map(Zi).join("")}var Gc=e=>{let t=[],n=[],r=e.querySelectorAll("thead th");for(let a of r)t.push(Zi(a).trim());let i=e.querySelectorAll("tbody tr");for(let a of i){let s=[],o=a.querySelectorAll("td");for(let u of o)s.push(Zi(u).trim());n.push(s)}return{headers:t,rows:n}},Qc=e=>{var t;if(typeof e!="object")return",";let n=e.table;return typeof n!="object"?",":(t=n.csvSeparator)!=null?t:","},Kc=(e,t=",")=>{let n;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?n=";":n=",":n=t;let{headers:r,rows:i}=e,a=l=>{let d=!1;for(let h of l)if(h===n||h==='"'||h===`
|
|
219
|
+
`||h==="\r"){d=!0;break}return d?`"${l.replace(/"/g,'""')}"`:l},s=r.length>0?i.length+1:i.length,o=new Array(s),u=0;r.length>0&&(o[u]=r.map(a).join(n),u+=1);for(let l of i)o[u]=l.map(a).join(n),u+=1;return o.join(`
|
|
220
|
+
`)},e3=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let d of o)if(d===" "||d===`
|
|
221
|
+
`||d==="\r"){u=!0;break}if(!u)return o;let l=[];for(let d of o)d===" "?l.push("\\t"):d===`
|
|
222
|
+
`?l.push("\\n"):d==="\r"?l.push("\\r"):l.push(d);return l.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let o of n)a[s]=o.map(r).join(" "),s+=1;return a.join(`
|
|
223
|
+
`)},_i=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"||r===`
|
|
224
|
+
`){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):r===`
|
|
225
|
+
`?n.push("<br>"):n.push(r);return n.join("")},Xc=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>_i(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?_i(o[l]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>_i(l));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
|
|
226
|
+
`)},Zc=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=se(),[s,o]=b.useState(!1),[u,l]=b.useState(!1),d=b.useRef(null),h=b.useRef(0),{isAnimating:p,controls:m}=b.useContext(Oe),g=gt(),y=Qc(m),S=async w=>{var R,M;if(typeof window>"u"||!((R=navigator?.clipboard)!=null&&R.write)){r?.(new Error("Clipboard API not available"));return}try{let N=(M=d.current)==null?void 0:M.closest('[data-streamdown="table-wrapper"]'),v=N?.querySelector("table");if(!v){r?.(new Error("Table not found"));return}let D=Gc(v),j="";w==="csv"?j=Kc(D,y):w==="tsv"?j=e3(D):j=Xc(D);let I=new ClipboardItem({"text/plain":new Blob([j],{type:"text/plain"}),"text/html":new Blob([v.outerHTML],{type:"text/html"})});await navigator.clipboard.write([I]),l(!0),o(!1),n?.(w),h.current=window.setTimeout(()=>l(!1),i)}catch(N){r?.(N)}};b.useEffect(()=>{let w=R=>{let M=R.composedPath();d.current&&!M.includes(d.current)&&o(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w),window.clearTimeout(h.current)}},[]);let k=lt(),C=u?k.CheckIcon:k.CopyIcon;return f.jsxs("div",{className:a("relative"),ref:d,children:[f.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!s),title:g.copyTable,type:"button",children:e??f.jsx(C,{height:14,width:14})}),s?f.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[f.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>S("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),f.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>S("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),f.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>S("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},Jc=({children:e,className:t,onDownload:n,onError:r})=>{let i=se(),[a,s]=b.useState(!1),o=b.useRef(null),{isAnimating:u,controls:l}=b.useContext(Oe),d=gt(),h=lt(),p=Qc(l),m=g=>{var y;try{let S=(y=o.current)==null?void 0:y.closest('[data-streamdown="table-wrapper"]'),k=S?.querySelector("table");if(!k){r?.(new Error("Table not found"));return}let C=Gc(k),w=g==="csv"?Kc(C,p):Xc(C),R=g==="csv"?"csv":"md",M=`${$a(l,"table","table")}.${R}`;on(M,w,g==="csv"?"text/csv":"text/markdown"),s(!1),n?.(g)}catch(S){r?.(S)}};return b.useEffect(()=>{let g=y=>{let S=y.composedPath();o.current&&!S.includes(o.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),f.jsxs("div",{className:i("relative"),ref:o,children:[f.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>s(!a),title:d.downloadTable,type:"button",children:e??f.jsx(h.DownloadIcon,{size:14})}),a?f.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[f.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:d.downloadTableAsCsv,type:"button",children:d.tableFormatCsv}),f.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("markdown"),title:d.downloadTableAsMarkdown,type:"button",children:d.tableFormatMarkdown})]}):null]})},t3=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=lt(),s=se(),[o,u]=b.useState(!1),{isAnimating:l}=b.useContext(Oe),d=gt(),h=()=>{u(!0)},p=()=>{u(!1)};return b.useEffect(()=>{if(o){Va();let m=g=>{g.key==="Escape"&&u(!1)};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),Ya()}}},[o]),f.jsxs(f.Fragment,{children:[f.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:h,title:d.viewFullscreen,type:"button",children:f.jsx(i,{size:14})}),o?na.createPortal(f.jsx("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:s("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:m=>{m.key==="Escape"&&p()},role:"dialog",children:f.jsxs("div",{className:s("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[f.jsxs("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[n?f.jsx(Zc,{}):null,r?f.jsx(Jc,{}):null,f.jsx("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:d.exitFullscreen,type:"button",children:f.jsx(a,{size:20})})]}),f.jsx("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:f.jsx("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},n3=({children:e,className:t,maxHeight:n,showControls:r,showCopy:i=!0,showDownload:a=!0,showFullscreen:s=!0,...o})=>{let u=se(),{isAnimating:l}=b.useContext(Oe),d=Uc(n),h=jc(l,!!d,e),p=r&&i,m=r&&a,g=r&&s,y=p||m||g;return f.jsxs("div",{className:u("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[y?f.jsxs("div",{className:u("flex items-center justify-end gap-1"),children:[p?f.jsx(Zc,{}):null,m?f.jsx(Jc,{}):null,g?f.jsx(t3,{showCopy:p,showDownload:m,children:e}):null]}):null,f.jsx("div",{className:u("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:h,style:d?{maxHeight:d}:void 0,children:f.jsx("table",{className:u("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},r3=/startLine=(\d+)/,i3=/\bnoLineNumbers\b/,a3=b.lazy(()=>Promise.resolve().then(()=>require("./mermaid-HWGCJPDP-CssnmrD3.cjs")).then(e=>({default:e.Mermaid}))),s3=/language-([^\s]+)/,u3="node";function Ae(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=e,i=t;for(let a of n)if(a!==u3&&!Object.is(r[a],i[a]))return!1;return!0}function o3(e,t){var n,r;return((n=e?.properties)==null?void 0:n.metastring)===((r=t?.properties)==null?void 0:r.metastring)}var Lr=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Si=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Bu=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},fr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},l3=(e,t)=>{if(typeof e=="boolean")return e;let n=e.image;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Qa=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>Ae(e,t));Qa.displayName="MarkdownOl";var ed=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>Ae(e,t));ed.displayName="MarkdownLi";var td=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>Ae(e,t));td.displayName="MarkdownUl";var nd=b.memo(({className:e,node:t,...n})=>{let r=se();return f.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>Ae(e,t));nd.displayName="MarkdownHr";var rd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>Ae(e,t));rd.displayName="MarkdownStrong";var c3=({children:e,className:t,href:n,node:r,...i})=>{let a=se(),{linkSafety:s}=b.useContext(Oe),[o,u]=b.useState(!1),l=n==="streamdown:incomplete-link",d=b.useCallback(async g=>{if(!(!(s!=null&&s.enabled&&n)||l)){if(g.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[s,n,l]),h=b.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=b.useCallback(()=>{u(!1)},[]),m={url:n??"",isOpen:o,onClose:p,onConfirm:h};return s!=null&&s.enabled&&n?f.jsxs(f.Fragment,{children:[f.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:d,type:"button",children:e}),s.renderModal?s.renderModal(m):f.jsx(Gy,{...m})]}):f.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},id=b.memo(c3,(e,t)=>Ae(e,t));id.displayName="MarkdownA";var ad=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>Ae(e,t));ad.displayName="MarkdownH1";var sd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>Ae(e,t));sd.displayName="MarkdownH2";var ud=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>Ae(e,t));ud.displayName="MarkdownH3";var od=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>Ae(e,t));od.displayName="MarkdownH4";var ld=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>Ae(e,t));ld.displayName="MarkdownH5";var cd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>Ae(e,t));cd.displayName="MarkdownH6";var dd=b.memo(({children:e,className:t,node:n,...r})=>{let{controls:i,tableMaxHeight:a}=b.useContext(Oe),s=Lr(i,"table"),o=Si(i,"copy"),u=Si(i,"download"),l=Si(i,"fullscreen");return f.jsx(n3,{className:t,maxHeight:a,showControls:s,showCopy:o,showDownload:u,showFullscreen:l,...r,children:e})},(e,t)=>Ae(e,t));dd.displayName="MarkdownTable";var hd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>Ae(e,t));hd.displayName="MarkdownThead";var fd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>Ae(e,t));fd.displayName="MarkdownTbody";var md=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>Ae(e,t));md.displayName="MarkdownTr";var pd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>Ae(e,t));pd.displayName="MarkdownTh";var gd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>Ae(e,t));gd.displayName="MarkdownTd";var bd=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>Ae(e,t));bd.displayName="MarkdownBlockquote";var Ed=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>Ae(e,t));Ed.displayName="MarkdownSup";var Td=b.memo(({children:e,className:t,node:n,...r})=>{let i=se();return f.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>Ae(e,t));Td.displayName="MarkdownSub";var xd=b.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!b.isValidElement(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.props.children],d=!1,h=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(d=!0);else if(b.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)h=!0;else{let m=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let g of m){if(typeof g=="string"&&g.trim()!==""){d=!0;break}if(b.isValidElement(g)&&((u=g.props)==null?void 0:u["data-footnote-backref"])===void 0){d=!0;break}}}}return h&&!d},a=Array.isArray(e)?e.map(s=>{if(!b.isValidElement(s))return s;if(s.type===Qa){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?f.jsx("section",{className:t,...r,children:a}):null}return f.jsx("section",{className:t,...r,children:e})},(e,t)=>Ae(e,t));xd.displayName="MarkdownSection";var d3=({node:e,className:t,children:n,...r})=>{var i,a;let s=se(),o=!("data-block"in r),{mermaid:u,controls:l,lineNumbers:d}=b.useContext(Oe),h=Ga(),p=yy(),m=t?.match(s3),g=(i=m?.at(1))!=null?i:"",y=Ky(g);if(o)return f.jsx("code",{className:s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let S=(a=e?.properties)==null?void 0:a.metastring,k=S?.match(r3),C=k?Number.parseInt(k[1],10):void 0,w=C!==void 0&&C>=1?C:void 0,R=!(S&&i3.test(S))&&d!==!1,M="";if(b.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?M=n.props.children:typeof n=="string"&&(M=n),y){let H=y.component;return f.jsx(b.Suspense,{fallback:f.jsx(Mu,{}),children:f.jsx(H,{code:M,isIncomplete:p,language:g,meta:S})})}if(g==="mermaid"&&h){let H=Lr(l,"mermaid"),z=fr(l,"download"),Q=fr(l,"copy"),W=fr(l,"fullscreen"),F=fr(l,"panZoom"),G=H&&(z||Q||W);return f.jsx(b.Suspense,{fallback:f.jsx(Mu,{}),children:f.jsxs("div",{className:s("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[f.jsx("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:f.jsx("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),G?f.jsx("div",{className:s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:f.jsxs("div",{className:s("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[z?f.jsx(Wc,{chart:M,config:u?.config}):null,Q?f.jsx(Ki,{code:M}):null,W?f.jsx(Jy,{chart:M,config:u?.config}):null]})}):null,f.jsx("div",{className:s("rounded-md border border-border bg-background"),children:f.jsx(a3,{chart:M,config:u?.config,showControls:F})})]})})}let N=Lr(l,"code"),v=Bu(l,"download"),D=Bu(l,"copy"),{"data-block":j,...I}=r;return f.jsx(Dy,{className:t,code:M,isIncomplete:p,language:g,lineNumbers:R,startLine:w,...I,children:N?f.jsxs(f.Fragment,{children:[v?f.jsx(Vy,{code:M,language:g}):null,D?f.jsx(Ki,{}):null]}):null})},kd=b.memo(d3,(e,t)=>Ae(e,t)&&o3(e.node,t.node));kd.displayName="MarkdownCode";var h3=({node:e,className:t,...n})=>{let{controls:r}=b.useContext(Oe),i=Lr(r,"image"),a=i&&l3(r,"download");return f.jsx(Wy,{className:t,node:e,showControls:i,showDownloadControl:a,...n})},yd=b.memo(h3,(e,t)=>Ae(e,t));yd.displayName="MarkdownImg";var Ad=b.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&b.isValidElement(r[0])){let i=r[0].props.node,a=i?.tagName;if(a==="img")return f.jsx(f.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return f.jsx(f.Fragment,{children:e})}return f.jsx("p",{...n,children:e})},(e,t)=>Ae(e,t));Ad.displayName="MarkdownParagraph";var f3={ol:Qa,li:ed,ul:td,hr:nd,strong:rd,a:id,h1:ad,h2:sd,h3:ud,h4:od,h5:ld,h6:cd,table:dd,thead:hd,tbody:fd,tr:md,th:pd,td:gd,blockquote:bd,code:kd,img:yd,pre:({children:e})=>b.isValidElement(e)?b.cloneElement(e,{"data-block":"true"}):e,sup:Ed,sub:Td,p:Ad,section:xd},m3=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,p3=/\p{L}/u;function Cd(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),n,r=0,i=0;for(let a of t){if(m3.test(a)){n!=null||(n="rtl"),i+=1;continue}p3.test(a)&&(n!=null||(n="ltr"),r+=1)}return i>r?"rtl":r>i?"ltr":n??"ltr"}var g3=/^[ \t]{0,3}(`{3,}|~{3,})/,b3=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Fu=e=>{let t=e.split(`
|
|
227
|
+
`),n=null,r=0;for(let i of t){let a=g3.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],o=s[0],u=s.length;o===n&&u>=r&&(n=null,r=0)}}return n!==null},E3=e=>{let t=e.split(`
|
|
228
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&b3.test(r))return!0}return!1},T3=()=>e=>{ut(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Hu=[],Uu={allowDangerousHtml:!0},mr=new WeakMap,x3=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let d="default";return this.keyCache.set(e,d),d}let a=d=>{if(!d||d.length===0)return"";let h="";for(let p=0;p<d.length;p+=1){let m=d[p];if(p>0&&(h+=","),Array.isArray(m)){let[g,y]=m;if(typeof g=="function"){let S=mr.get(g);S||(S=g.name,mr.set(g,S)),h+=S}else h+=String(g);h+=":",h+=JSON.stringify(y)}else if(typeof m=="function"){let g=mr.get(m);g||(g=m.name,mr.set(m,g)),h+=g}else h+=String(m)}return h},s=a(n),o=a(r),u=i?JSON.stringify(i):"",l=`${o}::${s}::${u}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},ju=new x3,_d=e=>{let t=k3(e),n=e.children||"",r=t.runSync(t.parse(n),n);return N3(r,e)},k3=e=>{let t=ju.get(e);if(t)return t;let n=A3(e);return ju.set(e,n),n},y3=e=>e.some(t=>Array.isArray(t)?t[0]===Pi:t===Pi),A3=e=>{let t=e.rehypePlugins||Hu,n=e.remarkPlugins||Hu,r=y3(t)?n:[...n,T3],i=e.remarkRehypeOptions?{...Uu,...e.remarkRehypeOptions}:Uu;return fk().use(h2).use(r).use(G2,i).use(t)},C3=e=>e,_3=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},S3=(e,t)=>{var n;for(let r in gi)if(Object.hasOwn(gi,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=gi[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},w3=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},N3=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(n||r||i||a||o){let u=o||C3;ut(e,(l,d,h)=>{if(l.type==="raw"&&h&&typeof d=="number")return _3(h,d,a,l.value),d;if(l.type==="element"&&(S3(l,u),w3(l,d,h,r,i,n)&&h&&typeof d=="number"))return s&&l.children?h.children.splice(d,1,...l.children):h.children.splice(d,1),d})}return xx(e,{Fragment:f.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0})},I3=/\[\^[\w-]{1,200}\](?!:)/,L3=/\[\^[\w-]{1,200}\]:/,R3=/<([A-Za-z][\w:-]*)[\s>/]/,v3=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),qu=new Map,zu=new Map,D3=e=>{let t=e.toLowerCase(),n=qu.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return qu.set(t,r),r},O3=e=>{let t=e.toLowerCase(),n=zu.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return zu.set(t,r),r},$u=(e,t)=>{if(v3.has(t.toLowerCase()))return 0;let n=e.match(D3(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Vu=(e,t)=>{let n=e.match(O3(t));return n?n.length:0},P3=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},M3=e=>{let t=I3.test(e),n=L3.test(e);if(t||n)return[e];let r=nt.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of r){let u=o.raw,l=i.length;if(a.length>0){i[l-1]+=u;let d=a.at(-1),h=$u(u,d),p=Vu(u,d);for(let m=0;m<h;m+=1)a.push(d);for(let m=0;m<p;m+=1)a.length>0&&a.at(-1)===d&&a.pop();continue}if(o.type==="html"&&o.block){let d=u.match(R3);if(d){let h=d[1],p=$u(u,h),m=Vu(u,h);p>m&&a.push(h)}}if(l>0&&!s){let d=i[l-1];if(P3(d)%2===1){i[l-1]=d+u;continue}}i.push(u),o.type!=="space"&&(s=o.type==="code")}return i},B3=/^\n*/,F3=/\n*$/,Ji=/\n\n/g,H3=(e,t,n)=>{if(!t.includes(`
|
|
229
|
+
`))return e+t+n;let r=t.replace(Ji,`
|
|
230
|
+
<!---->
|
|
231
|
+
`).replace(B3,`
|
|
232
|
+
|
|
233
|
+
`).replace(F3,`
|
|
234
|
+
|
|
235
|
+
`);return`${e}${r}${n}
|
|
236
|
+
|
|
237
|
+
`},U3=(e,t)=>{let n=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),r="",i=0,a=n.exec(e);for(;a;){let s=a[0],o=a[1],u=a.index+s.length,l=e.slice(u);if(new RegExp(`</${o}\\s*>`,"i").test(l)){a=n.exec(e);continue}if(r+=e.slice(i,a.index),l.length===0){r+=s,i=u,a=n.exec(e);continue}if(l.startsWith(`
|
|
238
|
+
|
|
239
|
+
`)){let p=l.slice(2).replace(Ji,`
|
|
240
|
+
<!---->
|
|
241
|
+
`);r+=`${s}
|
|
242
|
+
|
|
243
|
+
${p}`,i=e.length;break}if(!l.startsWith(`
|
|
244
|
+
`)){r+=s,i=u,a=n.exec(e);continue}let d=l.slice(1);if(d.trim().length===0){r+=s,i=u,a=n.exec(e);continue}let h=d.replace(Ji,`
|
|
245
|
+
<!---->
|
|
246
|
+
`);r+=`${s}
|
|
247
|
+
|
|
248
|
+
${h}`,i=e.length;break}return i===0?e:r+e.slice(i)},j3=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,o,u)=>H3(s,o,u)),n=U3(n,r)}return n},q3=/([\\`*_~[\]|])/g,z3=e=>e.replace(q3,"\\$1"),$3=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,o,u)=>{let l=z3(o).replace(/\n\n/g," ");return s+l+u})}return n},V3=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),Sd=new Set(["code","kbd","pre","samp","var"]);function wd(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!Sd.has(t.tagName)?wd(t):"").join("")}function Y3(){return e=>{ut(e,"element",t=>{if(Sd.has(t.tagName)){t.properties!=null||(t.properties={}),t.properties.dir="ltr";return}V3.has(t.tagName)&&(t.properties!=null||(t.properties={}),typeof t.properties.dir!="string"&&(t.properties.dir=Cd(wd(t))))})}}var Nd=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Nd).join(""):"",W3=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));ut(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Nd(r);r.children=i?[{type:"text",value:i}]:[]}})},G3=()=>e=>{ut(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},Q3=/^[ \t]*<[\w!/?-]/,K3=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,X3=e=>typeof e!="string"||e.length===0||!Q3.test(e)?e:e.replace(K3,"$1"),Yu,Wu,Gu,Qu,Er={...zt,clobberPrefix:"",protocols:{...zt.protocols,href:[...(Wu=(Yu=zt.protocols)==null?void 0:Yu.href)!=null?Wu:[],"tel","streamdown"]},attributes:{...zt.attributes,code:[...(Qu=(Gu=zt.attributes)==null?void 0:Gu.code)!=null?Qu:[],"metastring"]}},ea={raw:Pi,sanitize:[al,Er],harden:[Ih,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Z3={gfm:[Xb,{}],codeMeta:G3},Ku=Object.values(ea),J3=Object.values(Z3),eA={block:" ▋",circle:" ●"},Id=["github-light","github-dark"],Ld={enabled:!0},tA={codeBlockMaxHeight:400,shikiTheme:Id,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Ld,tableMaxHeight:300},Oe=b.createContext(tA),Rd=b.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:s,...o})=>{b.useLayoutEffect(()=>{s?.commit()});let u=typeof e=="string"&&n?X3(e):e,l=f.jsx(_d,{...o,children:u});return f.jsx(Hc.Provider,{value:i,children:a?f.jsx("div",{dir:a,style:{display:"contents"},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});Rd.displayName="Block";var vd=b.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=Ku,remarkPlugins:o=J3,className:u,shikiTheme:l,mermaid:d,codeBlockMaxHeight:h=400,controls:p=!0,isAnimating:m=!1,tableMaxHeight:g=300,animated:y,BlockComponent:S=Rd,parseMarkdownIntoBlocksFn:k=M3,caret:C,plugins:w,remend:R,linkSafety:M=Ld,lineNumbers:N=!0,allowedTags:v,literalTagContent:D,translations:j,icons:I,prefix:H,onAnimationStart:z,onAnimationEnd:Q,...W})=>{let F=b.useId(),G=b.useMemo(()=>Cy(H),[H]),V=b.useRef(null),re=b.useRef(z),ke=b.useRef(Q);re.current=z,ke.current=Q,b.useEffect(()=>{var ee,me,He;if(t==="static")return;let Je=V.current;if(V.current=m,Je===null){m&&((ee=re.current)==null||ee.call(re));return}m&&!Je?(me=re.current)==null||me.call(re):!m&&Je&&((He=ke.current)==null||He.call(ke))},[m,t]);let T=b.useMemo(()=>v?Object.keys(v):[],[v]),Ce=b.useMemo(()=>{if(typeof e!="string")return"";let ee=t==="streaming"&&r?mT(e,R):e;return D&&D.length>0&&(ee=$3(ee,D)),T.length>0&&(ee=j3(ee,T)),ee},[e,t,r,R,T,D]),pe=b.useMemo(()=>k(Ce),[Ce,k]),_=b.useMemo(()=>n==="auto"?pe.map(Cd):void 0,[pe,n]),we=b.useMemo(()=>pe.map((ee,me)=>`${F}-${me}`),[pe.length,F]),ce=b.useMemo(()=>y===!0?"true":y?JSON.stringify(y):"",[y]),J=b.useRef(null),xe=b.useRef([]),ye=b.useRef([]),fe=b.useRef(null),Re=b.useRef("");if(ce){if(Re.current!==ce){Re.current=ce;let ee=ce!=="true"?y.maxBacklogMs:void 0;J.current=vu({maxBacklogMs:ee}),xe.current=[],ye.current=[]}else J.current||(J.current=vu());m&&J.current&&J.current.beginPass(J.current.now())}else J.current=null,xe.current=[],ye.current=[],Re.current="";b.useLayoutEffect(()=>{var ee;m&&((ee=J.current)==null||ee.commitPass())});let _e=b.useMemo(()=>{var ee,me;return{codeBlockMaxHeight:h,shikiTheme:(me=l??((ee=w?.code)==null?void 0:ee.getThemes()))!=null?me:Id,controls:p,isAnimating:m,lineNumbers:N,mode:t,mermaid:d,linkSafety:M,tableMaxHeight:g}},[h,l,p,m,N,t,d,M,w?.code,g]),Ze=b.useMemo(()=>j?JSON.stringify(j):"",[j]),bt=b.useMemo(()=>({...Yc,...j}),[Ze]),rt=b.useMemo(()=>{let{inlineCode:ee,...me}=a??{},He={...f3,...me};if(ee){let Je=He.code;He.code=St=>"data-block"in St?Je?b.createElement(Je,St):null:b.createElement(ee,St)}return He},[a]),oe=b.useMemo(()=>{let ee=[];return w!=null&&w.cjk&&(ee=[...ee,...w.cjk.remarkPluginsBefore]),ee=[...ee,...o],w!=null&&w.cjk&&(ee=[...ee,...w.cjk.remarkPluginsAfter]),w!=null&&w.math&&(ee=[...ee,w.math.remarkPlugin]),ee},[o,w?.math,w?.cjk]),Pe=b.useMemo(()=>{var ee;let me=s;if(v&&Object.keys(v).length>0&&s===Ku){let He={...Er,tagNames:[...(ee=Er.tagNames)!=null?ee:[],...Object.keys(v)],attributes:{...Er.attributes,...v}};me=[ea.raw,[al,He],ea.harden]}return D&&D.length>0&&(me=[...me,[W3,D]]),w!=null&&w.math&&(me=[...me,w.math.rehypePlugin]),n==="auto"&&t==="static"&&(me=[...me,Y3]),me},[s,w?.math,v,D,n,t]),_t=b.useMemo(()=>{if(!m||pe.length===0)return!1;let ee=pe.at(-1);return Fu(ee)||E3(ee)},[m,pe]),ti=b.useMemo(()=>C&&m&&!_t?{"--streamdown-caret":`"${eA[C]}"`}:void 0,[C,m,_t]),ir=ee=>{let me=null;if(J.current&&m){if(!xe.current[ee]){let Je=ce&&ce!=="true"?y:{},{maxBacklogMs:St,...En}=Je;xe.current[ee]=Fc({...En,timeline:J.current})}me=xe.current[ee]}fe.current!==Pe&&(ye.current=[],fe.current=Pe),me&&!ye.current[ee]&&(ye.current[ee]=[...Pe,me.rehypePlugin]);let He=me&&ye.current[ee]?ye.current[ee]:Pe;return{blockAnimatePlugin:me,blockRehypePlugins:He}};return t==="static"?f.jsx(Qi.Provider,{value:bt,children:f.jsx(Xi.Provider,{value:w??null,children:f.jsx(Oe.Provider,{value:_e,children:f.jsx(Ou,{icons:I,children:f.jsx(Gi.Provider,{value:G,children:f.jsx("div",{className:G("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",u),dir:n==="auto"?void 0:n,children:f.jsx(_d,{components:rt,rehypePlugins:Pe,remarkPlugins:oe,...W,children:Ce})})})})})})}):f.jsx(Qi.Provider,{value:bt,children:f.jsx(Xi.Provider,{value:w??null,children:f.jsx(Oe.Provider,{value:_e,children:f.jsx(Ou,{icons:I,children:f.jsx(Gi.Provider,{value:G,children:f.jsxs("div",{className:G("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!_t?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,u),style:ti,children:[pe.length===0&&C&&m&&f.jsx("span",{}),pe.map((ee,me)=>{var He;let Je=me===pe.length-1,St=m&&Je&&Fu(ee),{blockAnimatePlugin:En,blockRehypePlugins:B}=ir(me);return f.jsx(S,{animatePlugin:En,components:rt,content:ee,dir:(He=_?.[me])!=null?He:n!=="auto"?n:void 0,index:me,isIncomplete:St,rehypePlugins:B,remarkPlugins:oe,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...W},we[me])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);vd.displayName="Streamdown";var nA=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:l,ZoomOutIcon:d}=lt(),h=se(),p=gt(),m=b.useRef(null),g=b.useRef(null),[y,S]=b.useState(s),[k,C]=b.useState({x:0,y:0}),[w,R]=b.useState(!1),[M,N]=b.useState({x:0,y:0}),[v,D]=b.useState({x:0,y:0}),j=b.useCallback(V=>{S(re=>Math.max(n,Math.min(r,re+V)))},[n,r]),I=b.useCallback(()=>{j(i)},[j,i]),H=b.useCallback(()=>{j(-i)},[j,i]),z=b.useCallback(()=>{S(s),C({x:0,y:0})},[s]),Q=b.useCallback(V=>{V.preventDefault();let re=V.deltaY>0?-i:i;j(re)},[j,i]),W=b.useCallback(V=>{if(V.button!==0||V.isPrimary===!1)return;R(!0),N({x:V.clientX,y:V.clientY}),D(k);let re=V.currentTarget;re instanceof HTMLElement&&re.setPointerCapture(V.pointerId)},[k]),F=b.useCallback(V=>{if(!w)return;V.preventDefault();let re=V.clientX-M.x,ke=V.clientY-M.y;C({x:v.x+re,y:v.y+ke})},[w,M,v]),G=b.useCallback(V=>{R(!1);let re=V.currentTarget;re instanceof HTMLElement&&re.releasePointerCapture(V.pointerId)},[]);return b.useEffect(()=>{let V=m.current;if(V)return V.addEventListener("wheel",Q,{passive:!1}),()=>{V.removeEventListener("wheel",Q)}},[Q]),b.useEffect(()=>{let V=g.current;if(V&&w)return document.body.style.userSelect="none",V.addEventListener("pointermove",F,{passive:!1}),V.addEventListener("pointerup",G),V.addEventListener("pointercancel",G),()=>{document.body.style.userSelect="",V.removeEventListener("pointermove",F),V.removeEventListener("pointerup",G),V.removeEventListener("pointercancel",G)}},[w,F,G]),f.jsxs("div",{className:h("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:m,style:{cursor:w?"grabbing":"grab"},children:[a?f.jsxs("div",{className:h("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[f.jsx("button",{"aria-label":p.zoomIn,className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:y>=r,onClick:I,title:p.zoomIn,type:"button",children:f.jsx(l,{"aria-hidden":"true",size:16})}),f.jsx("button",{"aria-label":p.zoomOut,className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:y<=n,onClick:H,title:p.zoomOut,type:"button",children:f.jsx(d,{"aria-hidden":"true",size:16})}),f.jsx("button",{"aria-label":p.resetView,className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:z,title:p.resetView,type:"button",children:f.jsx(u,{"aria-hidden":"true",size:16})})]}):null,f.jsx("div",{className:h("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:W,ref:g,role:"application",style:{transform:`translate(${k.x}px, ${k.y}px) scale(${y})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Dd=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=se(),[s,o]=b.useState(null),[u,l]=b.useState(!1),[d,h]=b.useState(""),[p,m]=b.useState(""),[g,y]=b.useState(0),{mermaid:S}=b.useContext(Oe),k=Ga(),C=S?.errorComponent,{shouldRender:w,containerRef:R}=uy({immediate:r});if(b.useEffect(()=>{if(w){if(!k){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),l(!0);let N=k.getMermaid(n),v=e.split("").reduce((I,H)=>(I<<5)-I+H.charCodeAt(0)|0,0),D=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:j}=await N.render(D,e);h(j),m(j)}catch(N){if(!(p||d)){let v=N instanceof Error?N.message:"Failed to render Mermaid chart";o(v)}}finally{l(!1)}})()}},[e,n,g,w,k]),!(w||d||p))return f.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:R});if(u&&!d&&!p)return f.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:R,children:f.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[f.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),f.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!d&&!p){let N=()=>y(v=>v+1);return C?f.jsx("div",{ref:R,children:f.jsx(C,{chart:e,error:s,retry:N})}):f.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:R,children:[f.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),f.jsxs("details",{className:a("mt-2"),children:[f.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),f.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let M=d||p;return f.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:R,children:f.jsx(nA,{className:a(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:f.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:M},role:"img"})})})};function rA(e){if(!e)return"";let t=e;return t.includes("\\n")&&!t.includes(`
|
|
249
|
+
`)&&(t=t.replace(/\\n/g,`
|
|
250
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ")),t=t.replace(/```([a-zA-Z0-9_-]+)[ \t]+([^\n`]+)/g,"```$1\n$2"),t}const Xu={a:({href:e,children:t,target:n="_blank",rel:r="noopener noreferrer",node:i,...a})=>f.jsx("a",{href:e,target:n,rel:r,...a,children:t})};function iA({content:e,children:t,className:n="",isAnimating:r,mode:i,dir:a,lineNumbers:s=!1,codeBlockMaxHeight:o=320,animated:u=!0,controls:l={code:{copy:!0},table:{copy:!0}},linkSafety:d={enabled:!1},components:h,...p}){const m=(e!==void 0?e:t)||"";if(!m||!m.trim())return null;const g=rA(m),y=i??(r?"streaming":"static"),S=h?{...Xu,...h}:Xu;return f.jsx("div",{className:O.cx("rqmii-response",n),children:f.jsx(vd,{mode:y,isAnimating:r,animated:u,dir:a,lineNumbers:s,codeBlockMaxHeight:o,controls:l,linkSafety:d,components:S,...p,children:g})})}const Kr=b.memo(iA),aA=Kr;function sA({role:e,from:t,variant:n="contained",dir:r,isPartial:i=!1,className:a="",children:s}){const o=t||e||"assistant",u=o==="user";return f.jsx("div",{className:O.cx("rqmii-chat-message-row","rqmii-message",u?"is-user rqmii-message--user":"rqmii-message--assistant",n==="flat"&&"rqmii-message--flat",i&&"is-partial",a),"data-role":o,dir:r,children:s})}const Xr=b.memo(sA),uA=Xr;function oA({variant:e="contained",dir:t,className:n="",children:r}){return f.jsx("div",{className:O.cx("rqmii-chat-message","rqmii-message-content",e==="flat"&&"rqmii-message-content--flat",n),dir:t,children:r})}const Zr=b.memo(oA),lA=Zr;function cA({agent:e,src:t,name:n,size:r="small",active:i=!1,className:a=""}){if(e)return f.jsx(O.RqmiiAgentAvatar,{agent:e,size:r,active:i,className:a});if(t)return f.jsx("div",{className:O.cx("rqmii-agent-avatar",`rqmii-agent-avatar--${r}`,i&&"is-active",a),children:f.jsx("img",{src:t,alt:n||"Avatar"})});if(n){const s=n.split(" ").map(o=>o[0]).slice(0,2).join("").toUpperCase();return f.jsx("div",{className:O.cx("rqmii-agent-avatar",`rqmii-agent-avatar--${r}`,"rqmii-avatar-fallback",a),children:f.jsx("span",{children:s})})}return null}const Od=b.memo(cA),dA=Od,Ka=b.memo(function({language:t,languages:n,onChange:r}){const[i,a]=b.useState(!1),s=b.useRef(null),o=O.getChatLanguage(t),u=O.normalizeChatLanguages(n,t).map(l=>O.getChatLanguage(l)).filter(Boolean);return b.useEffect(()=>{if(!i)return;const l=d=>{s.current?.contains(d.target)||a(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[i]),f.jsxs("div",{className:"rqmii-chat-language",ref:s,children:[f.jsxs("button",{type:"button",className:"rqmii-chat-pill",onClick:()=>a(l=>!l),children:[f.jsx("span",{children:o?.label||t}),f.jsx(to,{size:16})]}),i&&u.length>1&&f.jsx("div",{className:"rqmii-chat-language-menu",children:u.map(l=>f.jsx("button",{type:"button",className:O.cx("rqmii-chat-language-item",l.value===t&&"is-selected"),onClick:()=>{r(l.value),a(!1)},children:l.label},l.value))})]})}),At=b.memo(function({language:t="en",brand:n="rqmii",agent:r}){const i=r?.widget?.appearance,a=i?.show_branding!==!1,s=i?.footer_content?.[t],o=!!s?.trim();if(!a&&!o)return f.jsx("div",{style:{padding:11}});const u=O.getChatText(t,"poweredBy"),l=O.languageTextDirection(t),d=()=>{if(u.includes("{brand}")){const h=u.split("{brand}");return f.jsxs("p",{dir:l,children:[h[0],f.jsx("strong",{children:n}),h[1]]})}return f.jsxs("p",{dir:l,children:[u," ",f.jsx("strong",{children:n})]})};return f.jsxs("div",{className:"rqmii-chat-footer",dir:l,children:[a&&d(),o&&f.jsx("p",{dir:l,children:s})]})}),Jr=b.memo(function({language:t,placeholder:n,onSend:r,disabled:i=!1,variant:a="text"}){const[s,o]=b.useState(""),u=b.useRef(null),l=168;let d;try{d=Xe.useRqmiiAgentContext().sendPing}catch{}const h=()=>{const p=s.trim();!p||i||(r(p),o(""),u.current&&(u.current.style.height="auto"))};return f.jsxs("div",{className:O.cx("rqmii-chat-input",O.languageFontClass(),a==="voice"&&"is-voice"),children:[f.jsx("textarea",{ref:u,value:s,disabled:i,rows:a==="compact"?2:3,dir:O.languageTextDirection(t),placeholder:n||O.getChatText(t,"sendMessage"),onChange:p=>{o(p.target.value),d?.();const m=u.current;m&&(m.style.height="auto",m.style.height=`${Math.min(m.scrollHeight,l)}px`)},onFocus:()=>{d?.()},onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),h())}}),f.jsx("button",{type:"button",onClick:h,disabled:!s.trim()||i,"aria-label":O.getChatText(t,"send"),children:f.jsx(ih,{size:20})})]})});b.memo(function({text:t,streaming:n}){const r=O.useStreamingText(t,n);return f.jsx(f.Fragment,{children:r})});const ta=133,hA=ta+44,fA=767,On=36,mA=8,Zu=On+mA;function pA(){return typeof window>"u"?ta:window.innerWidth<=fA?hA:ta}function gA(e){return e==="rtl"?"right":"left"}function bA(e,t,n,r){if(!e.length)return null;const i=Math.max(...e.map(s=>s.offsetTop)),a=e.filter(s=>s.offsetTop>=i-.5);return n==="right"?a.find(s=>s.offsetLeft+s.offsetWidth>t-r)||null:a.find(s=>s.offsetLeft<r)||null}function Ju(e,t,n,r){for(let i=0;i<2;i++){const a=bA(e,t,n,r);if(!a)break;n==="right"?a.style.marginRight=`${r}px`:a.style.marginLeft=`${r}px`,a.style.maxWidth=`calc(100% - ${r}px)`}}const EA=b.memo(function({suggestions:t,language:n,onClick:r}){const[i,a]=b.useState(!1),[s,o]=b.useState(!1),[u,l]=b.useState(null),[d,h]=b.useState(null),p=b.useRef(null),m=b.useRef([]),g=O.languageTextDirection(n||"en"),y=gA(g),S=k=>{k.forEach(C=>{C&&(C.style.maxWidth="",C.style.marginRight="",C.style.marginLeft="")})};return b.useLayoutEffect(()=>{const k=p.current;if(!k||i)return;const C=()=>{const R=m.current;S(R);const M=k.clientWidth,N=pA(),v=()=>{for(let j=0;j<R.length;j++){const I=R[j];if(I&&I.offsetTop+I.offsetHeight>N+.5)return j}return null};let D=v();if(D!==null)for(let j=0;j<=R.length;j++){S(R);const I=R.slice(0,D).filter(z=>!!z);Ju(I,M,y,Zu);const H=v();if(H===null||H>=D)break;D=H}if(l(D),o(D!==null),D!==null){const j=R.slice(0,D).filter(H=>!!H),I=j.length?Math.max(...j.map(H=>H.offsetTop+H.offsetHeight)):On;h(I-On)}else h(null)};C();const w=typeof ResizeObserver<"u"?new ResizeObserver(C):null;return w?.observe(k),()=>{w?.disconnect(),S(m.current)}},[t,i,y]),b.useLayoutEffect(()=>{const k=p.current;if(!k||!i)return;const C=m.current.filter(R=>!!R);S(m.current),Ju(C,k.clientWidth,y,Zu);const w=C.length?Math.max(...C.map(R=>R.offsetTop+R.offsetHeight)):On;return h(w-On),()=>{S(m.current)}},[i,t,y]),t.length?f.jsx("div",{className:O.cx("rqmii-suggested-messages",i&&"is-expanded",s&&"has-overflow"),dir:g,children:f.jsxs("div",{ref:p,className:O.cx("rqmii-suggested-messages-inner",i?"is-expanded":"is-collapsed"),children:[t.map((k,C)=>{const w=!i&&u!==null&&C>=u;return f.jsx("button",{ref:R=>{m.current[C]=R},type:"button",className:"rqmii-suggested-message",onClick:()=>r(k),style:w?{visibility:"hidden"}:void 0,"aria-hidden":w||void 0,tabIndex:w?-1:void 0,children:k},C)}),s&&f.jsx("button",{type:"button",className:O.cx("rqmii-suggested-messages-toggle",y==="left"&&"is-start-left"),style:d!=null?{top:d,bottom:"auto"}:void 0,onClick:()=>a(k=>(k&&p.current&&(p.current.scrollTop=0),!k)),"aria-label":i?"Show less":"Show more","aria-expanded":i,children:i?f.jsx(lh,{size:14}):f.jsx(to,{size:14})})]})}):null}),TA=b.memo(function({language:t}){const n=O.languageTextDirection(t||"en");return f.jsx("div",{className:"rqmii-chat-message-row",children:f.jsxs("div",{className:"rqmii-chat-message rqmii-chat-typing-indicator",dir:n,children:[f.jsx("span",{className:"rqmii-chat-typing-dot"}),f.jsx("span",{className:"rqmii-chat-typing-dot"}),f.jsx("span",{className:"rqmii-chat-typing-dot"})]})})});function xA(e){return e==="message"}const kA={name:"leadFormName",email:"leadFormEmail",phone:"leadFormPhone",message:"leadFormMessage"},yA=b.memo(function({messageId:t,form:n,language:r,textDirection:i,formSubmitted:a}){const s=Xe.useRqmiiAgentContext(),[o,u]=b.useState({}),[l,d]=b.useState(!1),[h,p]=b.useState(!!a),[m,g]=b.useState(null),y=n.title||O.getChatText(r,"leadFormTitle"),S=R=>{const M=kA[R.key?.toLowerCase()];return`${M?O.getChatText(r,M):R.label||R.key}${R.required?"*":""}`},k=(R,M)=>{u(N=>({...N,[R]:M})),s.sendPing(),m&&g(null)},C=()=>{s.sendPing()},w=async R=>{if(R.preventDefault(),l||h)return;if(n.fields.some(v=>v.required&&!o[v.key]?.trim())){g(O.getChatText(r,"leadFormRequiredError"));return}const N={};for(const v of n.fields){const D=o[v.key]?.trim();D&&(N[v.key]=D)}d(!0),g(null);try{await s.submitLead({agentId:n.agentId,collectedData:N}),p(!0),s.setMessages(s.messages.map(v=>v.id===t?{...v,formSubmitted:!0}:v))}catch(v){g(v?.message||O.getChatText(r,"leadFormGenericError"))}finally{d(!1)}};return h?f.jsx("div",{className:"rqmii-chat-message-row rqmii-chat-lead-form-row",children:f.jsx("div",{className:"rqmii-chat-lead-form rqmii-chat-lead-form--done",dir:i,children:f.jsx("div",{className:"rqmii-chat-lead-form-success",children:O.getChatText(r,"leadFormSuccess")})})}):f.jsx("div",{className:"rqmii-chat-message-row rqmii-chat-lead-form-row",children:f.jsxs("form",{className:"rqmii-chat-lead-form",dir:i,onSubmit:w,children:[f.jsx("div",{className:"rqmii-chat-lead-form-title",children:y}),n.fields.map(R=>{const M=S(R),N=R.type==="email"?"email":R.type==="date"?"date":"text";return xA(R.key)?f.jsx("textarea",{className:"rqmii-chat-lead-form-input rqmii-chat-lead-form-textarea",placeholder:M,value:o[R.key]||"",onChange:v=>k(R.key,v.target.value),onFocus:C,disabled:l,rows:4},R.key):f.jsx("input",{className:"rqmii-chat-lead-form-input",type:N,placeholder:M,value:o[R.key]||"",onChange:v=>k(R.key,v.target.value),onFocus:C,disabled:l},R.key)}),m&&f.jsx("div",{className:"rqmii-chat-lead-form-error",children:m}),f.jsx("button",{type:"submit",className:"rqmii-chat-lead-form-submit",disabled:l,children:l?O.getChatText(r,"loading"):O.getChatText(r,"submit")})]})})}),AA=b.memo(function({message:t,textDirection:n,language:r}){if(t.role==="lead_form"&&t.form)return f.jsx(yA,{messageId:t.id,form:t.form,language:r,textDirection:n,formSubmitted:t.formSubmitted});const i=t.role==="user"||t.sender==="user";return f.jsx(Xr,{role:i?"user":t.role||"assistant",children:f.jsx(Zr,{dir:n,children:i?t.text:f.jsx(Kr,{content:t.text,isAnimating:!!t.streaming,mode:t.streaming?"streaming":"static",dir:n})})})}),ei=b.memo(function({messages:t,partialTranscript:n,language:r,showTypingIndicator:i}){const a=b.useRef(null),s=O.languageTextDirection(r||"en"),o=b.useRef(t.length);return b.useEffect(()=>{if(!a.current)return;const u=t.length!==o.current;o.current=t.length,a.current.scrollIntoView({behavior:u?"smooth":"instant",block:"end"})},[t,n]),f.jsxs("div",{className:"rqmii-chat-messages",children:[t.map(u=>f.jsx(AA,{message:u,textDirection:s,language:r||"en"},u.id||`${u.role}-${u.text}`)),i&&f.jsx(TA,{language:r}),n&&f.jsx(Xr,{role:"user",isPartial:!0,children:f.jsx(Zr,{dir:s,children:n})}),f.jsx("div",{ref:a})]})}),Pd=b.memo(function({message:t,onRetry:n,onClose:r,language:i="en"}){return f.jsxs("div",{className:"rqmii-chat-panel rqmii-chat-panel--error",children:[r&&f.jsx("button",{type:"button",className:"rqmii-error-close",onClick:r,children:"×"}),f.jsx("p",{children:t||O.getChatText(i,"connectionFailed")}),n&&f.jsxs("button",{type:"button",className:"rqmii-chat-retry",onClick:n,children:[f.jsx(Th,{size:16}),f.jsx("span",{children:O.getChatText(i,"retry")})]})]})}),CA=5;function Md({rating:e,onRate:t,readonly:n,size:r=28}){const[i,a]=b.useState(0),s=i||e;return f.jsx("div",{className:"rqmii-chat-rating-stars",role:"radiogroup",children:Array.from({length:CA},(o,u)=>{const l=u+1,d=l<=s;return f.jsx("button",{type:"button",className:O.cx("rqmii-chat-star",d&&"is-filled",n&&"is-readonly"),disabled:n,"aria-label":`${l}`,"aria-checked":l===e,role:"radio",onMouseEnter:()=>!n&&a(l),onMouseLeave:()=>!n&&a(0),onClick:()=>!n&&t?.(l),children:f.jsx(kh,{size:r,fill:d?"currentColor":"none"})},l)})})}function Bd({language:e,rating:t,endedBy:n,sessionId:r,interactive:i,showTellUsMore:a,showRating:s=!0,showConversationId:o=!0,onRate:u,onTellUsMore:l}){const d=t>0?O.getChatText(e,"ratingThankYou"):O.getChatText(e,"ratingQuestion"),h=n==="user"?O.getChatText(e,"youEnded"):O.getChatText(e,"agentEnded");return f.jsxs("div",{className:O.cx("rqmii-chat-rating",!s&&"rqmii-chat-rating--unrated",O.languageFontClass()),dir:O.languageTextDirection(e),children:[s&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"rqmii-chat-rating-header",children:d}),f.jsx(Md,{rating:t,onRate:u,readonly:!i}),a&&f.jsx("button",{type:"button",className:"rqmii-chat-rating-more",onClick:l,children:O.getChatText(e,"tellUsMore")})]}),f.jsxs("div",{className:"rqmii-chat-rating-meta",children:[f.jsx("div",{children:h}),o&&r&&f.jsxs("div",{children:[O.getChatText(e,"sessionIdLabel")," ",f.jsx("span",{children:r})]})]})]})}function Xa({agent:e,language:t,rating:n,onBack:r,onMinimize:i,onSubmit:a}){const[s,o]=b.useState(""),[u,l]=b.useState(!1),d=s.trim().length>0&&!u,h=async()=>{if(d){l(!0);try{await a(s.trim())}finally{l(!1)}}},p=b.useMemo(()=>O.resolveWidgetThemeStyles(e.widget?.appearance),[e.widget?.appearance]);return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--feedback",O.languageFontClass()),dir:O.languageTextDirection(t),style:p,children:[f.jsxs("div",{className:"rqmii-chat-topbar",children:[f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:r,"aria-label":"Back",children:f.jsx(sh,{size:20})}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,"aria-label":O.getChatText(t,"minimize"),children:f.jsx(Dr,{size:20})})]}),f.jsxs("div",{className:"rqmii-chat-feedback-body",children:[f.jsx(O.RqmiiAgentAvatar,{agent:e,size:"hero"}),f.jsx(Md,{rating:n,readonly:!0}),f.jsx("div",{className:"rqmii-chat-feedback-title",children:O.getChatText(t,"ratingThankYou")}),f.jsx("div",{className:"rqmii-chat-feedback-subtitle",children:O.getChatText(t,"feedbackSubtitle")}),f.jsx("textarea",{className:"rqmii-chat-feedback-input",value:s,dir:O.languageTextDirection(t),placeholder:O.getChatText(t,"feedbackPlaceholder"),onChange:m=>o(m.target.value)}),f.jsx("div",{className:"rqmii-chat-feedback-actions",children:f.jsx("button",{type:"button",className:"rqmii-chat-feedback-submit",onClick:h,disabled:!d,children:u?f.jsx(Rr,{className:"rqmii-chat-spin",size:18}):O.getChatText(t,"submit")})})]}),f.jsx(At,{language:t,agent:e})]})}const _A=b.lazy(()=>Promise.resolve().then(()=>require("./RqmiiCloudAvatarPlayer-CmovoCKk.cjs")).then(e=>e.RqmiiCloudAvatarPlayer$1).then(e=>({default:e.RqmiiCloudAvatarPlayer})));function rr(e){if(!(e==null||typeof window>"u"||window.innerWidth>=768))return{top:`${window.innerHeight-e}px`,bottom:0}}const SA=b.memo(function({agent:t,language:n,languages:r,onLanguageChange:i,onClose:a,onSend:s,isVoiceEnabled:o=!1,isAudioPlaying:u=!1,isVoiceSetupLoading:l=!1,onStartVoice:d,visualViewportHeight:h,disabled:p=!1,error:m,suggestions:g,onSuggestionClick:y,compact:S=!1}){const k=rr(h),[C,w]=b.useState(O.isMobileViewport);b.useEffect(()=>{const v=()=>w(O.isMobileViewport());return window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const R=S&&!C,M=R?"start":"hero",N=g&&g.length>0;return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--start",R&&"rqmii-chat-panel--start-compact",O.languageFontClass()),style:k,children:[f.jsxs("div",{className:"rqmii-chat-topbar",children:[f.jsx("span",{}),f.jsxs("div",{className:"rqmii-chat-topbar-actions",children:[f.jsx(Ka,{language:n,languages:r,onChange:i}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,children:f.jsx(ua,{size:20})})]})]}),f.jsxs("div",{className:"rqmii-chat-start-body",children:[o?f.jsxs("div",{className:O.cx("rqmii-chat-call-avatar-wrap",R&&"is-compact"),children:[f.jsx(O.RqmiiAgentAvatar,{agent:t,size:M,active:u}),f.jsx("button",{type:"button",className:O.cx("rqmii-chat-call-button",R&&"is-compact"),onClick:d,disabled:l,"aria-label":O.getChatText(n,"startVoice"),children:l?f.jsx(Rr,{className:"rqmii-chat-spin",size:R?18:24}):f.jsx(sa,{size:R?18:24})})]}):f.jsx(O.RqmiiAgentAvatar,{agent:t,size:M}),f.jsx("div",{className:"rqmii-chat-agent-name",children:t.name}),m&&f.jsx("div",{className:"rqmii-chat-error-text",children:m})]}),N&&f.jsx("div",{className:"rqmii-chat-start-suggestions",children:f.jsx(EA,{suggestions:g,language:n,onClick:v=>y?.(v)})}),f.jsx(Jr,{language:n,onSend:s,disabled:p}),f.jsx(At,{language:n,agent:t})]})}),wA=b.memo(function({agent:t,language:n,languages:r,onLanguageChange:i,onClose:a,onStartVoice:s,isVoiceSetupLoading:o=!1,isAudioPlaying:u,visualViewportHeight:l}){const d=rr(l);return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--voice-start",O.languageFontClass()),style:d,children:[f.jsxs("div",{className:"rqmii-chat-topbar",children:[f.jsx("span",{}),f.jsxs("div",{className:"rqmii-chat-topbar-actions",children:[f.jsx(Ka,{language:n,languages:r,onChange:i}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:a,children:f.jsx(ua,{size:20})})]})]}),f.jsxs("div",{className:"rqmii-chat-call-body",children:[f.jsxs("div",{className:"rqmii-chat-call-avatar-wrap",children:[f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"hero",active:u}),f.jsx("button",{type:"button",className:"rqmii-chat-call-button",onClick:s,disabled:o,"aria-label":O.getChatText(n,"startVoice"),children:o?f.jsx(Rr,{className:"rqmii-chat-spin",size:24}):f.jsx(sa,{size:24})})]}),f.jsxs("div",{className:"rqmii-chat-agent-name",children:[O.getChatText(n,"call")," ",t.name]})]}),f.jsx(At,{language:n,agent:t})]})}),NA=b.memo(function({agent:t,language:n,onEndSession:r,onMinimize:i,messages:a,partialTranscript:s,onSend:o,isAudioPlaying:u,isVoiceEnabled:l,onToggleVoice:d,isListening:h,isSpeaking:p,isLoading:m,isAgentThinking:g,isAgentSpeaking:y,onStartVoice:S,elapsed:k,visualViewportHeight:C,waitingForResponse:w}){const R=Fd({language:n,isListening:h,isLoading:m,isSpeaking:p,isAudioPlaying:u,isAgentThinking:g,isAgentSpeaking:y,persistentListening:!1}),M=rr(C),N=t.widget?.appearance?.show_topbar_avatar_image!==!1;return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--conversation",O.languageFontClass()),style:M,children:[f.jsxs("div",{className:"rqmii-chat-header",children:[N&&f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"header",active:u}),l&&R&&f.jsx("div",{className:O.cx("rqmii-chat-header-status",!N&&"is-expanded"),children:f.jsx("span",{children:R})}),f.jsx("div",{className:"rqmii-chat-header-spacer"}),f.jsxs("div",{className:"rqmii-chat-header-actions",children:[i&&f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,"aria-label":O.getChatText(n,"minimize"),children:f.jsx(Dr,{size:20})}),l&&f.jsx("button",{type:"button",className:O.cx("rqmii-chat-circle-button",p&&"is-active"),onClick:d,"aria-label":h?O.getChatText(n,"stopVoice"):O.getChatText(n,"startVoice"),children:h?f.jsx(vr,{size:20}):f.jsx(ia,{size:20})}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:r,"aria-label":O.getChatText(n,"endCall"),children:f.jsx(aa,{size:20})})]})]}),f.jsx(ei,{messages:a,partialTranscript:s,language:n,showTypingIndicator:w}),l&&f.jsx("div",{className:"rqmii-chat-session-counter",children:O.formatTime(k)}),f.jsx(Jr,{language:n,onSend:o}),f.jsx(At,{language:n,agent:t})]})}),IA=b.memo(function({agent:t,language:n,onEndSession:r,onMinimize:i,isListening:a,isLoading:s,isSpeaking:o,isAudioPlaying:u,isAgentThinking:l,isAgentSpeaking:d,onToggleVoice:h,elapsed:p,visualViewportHeight:m}){const g=Fd({language:n,isListening:a,isLoading:s,isSpeaking:o,isAudioPlaying:u,isAgentThinking:l,isAgentSpeaking:d,persistentListening:!0}),y=rr(m);return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--voice-call",O.languageFontClass()),style:y,children:[f.jsxs("div",{className:"rqmii-chat-call-status",children:[f.jsx("span",{className:O.cx("rqmii-chat-live-dot",a&&"is-live")}),f.jsx("span",{children:O.formatTime(p)}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:i,children:f.jsx(Dr,{size:20})})]}),f.jsxs("div",{className:"rqmii-chat-voice-frame",children:[f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"hero",active:u}),f.jsx("div",{className:"rqmii-chat-agent-name",children:t.name}),f.jsx("div",{className:O.cx("rqmii-chat-status-pill",!g&&"is-empty"),children:g||O.getChatText(n,"listening")}),f.jsxs("div",{className:"rqmii-chat-voice-actions",children:[f.jsx("button",{type:"button",className:O.cx("rqmii-chat-circle-button",o&&"is-active"),onClick:h,children:a?f.jsx(vr,{size:20}):f.jsx(ia,{size:20})}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:r,"aria-label":O.getChatText(n,"endCall"),children:f.jsx(aa,{size:20})})]})]}),f.jsx(At,{language:n,agent:t})]})});function Fd({language:e,isListening:t,isLoading:n,isSpeaking:r,isAudioPlaying:i,isAgentThinking:a,isAgentSpeaking:s,persistentListening:o=!1}){return n?O.getChatText(e,"loading"):r?O.getChatText(e,"listening"):i||s?O.getChatText(e,"talkToInterrupt"):a?O.getChatText(e,"processing"):t&&o?O.getChatText(e,"listening"):null}const LA=b.memo(function({agent:t,language:n,onRestore:r,onClose:i,isListening:a,isAudioPlaying:s,isSpeaking:o,onToggleVoice:u,elapsed:l,variant:d="voice"}){const h=d==="text";return f.jsxs("div",{className:O.cx("rqmii-chat-minimized",O.languageFontClass()),children:[f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"minimized",active:s}),!h&&f.jsx("span",{className:"rqmii-chat-minimized-time",children:O.formatTime(l)}),f.jsxs("div",{className:"rqmii-chat-minimized-actions",children:[f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:r,"aria-label":O.getChatText(n,"maximize"),children:f.jsx(hh,{size:20})}),!h&&f.jsx("button",{type:"button",className:O.cx("rqmii-chat-circle-button",o&&"is-active"),onClick:u,"aria-label":a?O.getChatText(n,"stopVoice"):O.getChatText(n,"startVoice"),children:a?f.jsx(vr,{size:20}):f.jsx(ia,{size:20})}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:i,"aria-label":O.getChatText(n,"endCall"),children:f.jsx(aa,{size:20})})]})]})}),Za=b.memo(function({agent:t,language:n,languages:r,chatKind:i,messages:a,onLanguageChange:s,onMinimize:o,onStartNewVoice:u,onStartNewText:l,isVoiceSetupLoading:d=!1,visualViewportHeight:h,rating:p,endedBy:m,sessionId:g,ratingInteractive:y,showTellUsMore:S,onRate:k,onTellUsMore:C}){const w=rr(h),R=t.widget?.behavior?.conversation_ended_screen,M=!!R?.post_chat_rating_enabled,N=R?.show_conversation_id??!0,v=f.jsx(Bd,{language:n,rating:p,endedBy:m,sessionId:g,interactive:y,showTellUsMore:S,showRating:M,showConversationId:N,onRate:k,onTellUsMore:C}),D=i==="voice"||i==="text_and_voice",j=i==="text"||i==="text_and_voice",I=f.jsxs("div",{className:"rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended",children:[f.jsx(Ka,{language:n,languages:r,onChange:s}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",onClick:o,"aria-label":O.getChatText(n,"minimize"),children:f.jsx(Dr,{size:20})}),D&&f.jsx("button",{type:"button",className:"rqmii-chat-circle-button rqmii-chat-circle-button--call-start",onClick:u,disabled:d,"aria-label":O.getChatText(n,"startVoice"),children:d?f.jsx(Rr,{className:"rqmii-chat-spin",size:20}):f.jsx(sa,{size:20})})]});if(i==="voice")return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--voice-call",O.languageFontClass()),style:w,children:[f.jsxs("div",{className:"rqmii-chat-topbar",children:[f.jsx("span",{}),I]}),f.jsxs("div",{className:"rqmii-chat-voice-frame",children:[f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"hero"}),f.jsx("div",{className:"rqmii-chat-agent-name",children:t.name}),v]}),f.jsx(At,{language:n,agent:t})]});const H=t.widget?.appearance?.show_topbar_avatar_image!==!1;return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--conversation",O.languageFontClass()),style:w,children:[f.jsxs("div",{className:"rqmii-chat-topbar",children:[H?f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"header"}):f.jsx("span",{}),I]}),f.jsx(ei,{messages:a,language:n}),v,j&&f.jsx(Jr,{language:n,onSend:l}),f.jsx(At,{language:n,agent:t})]})}),Hd=b.memo(function({agent:t,language:n,onClose:r}){const{streamingUrl:i,isCloudStreamConnected:a,cloudStreamError:s}=Dt.useRqmiiAvatar(),{isAvatarSpeaking:o}=Dt.useRqmiiAvatar(),{messages:u,sendTextMessage:l}=Xe.useRqmiiMessages();return f.jsxs("div",{className:O.cx("rqmii-avatar-panel",O.languageFontClass()),children:[f.jsxs("div",{className:"rqmii-avatar-stream",children:[f.jsx(b.Suspense,{fallback:f.jsx("div",{className:"rqmii-avatar-overlay",children:O.getChatText(n,"loading")}),children:f.jsx(_A,{autoConnect:!0,muted:!1})}),!i&&f.jsx("div",{className:"rqmii-avatar-overlay",children:O.getChatText(n,"loading")}),s&&f.jsx("div",{className:"rqmii-avatar-overlay",children:O.getChatText(n,"connectionFailed")}),f.jsxs("div",{className:"rqmii-avatar-controls",children:[f.jsx(O.RqmiiAgentAvatar,{agent:t,size:"header",active:o}),f.jsx("div",{className:"rqmii-chat-header-spacer"}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button",disabled:!a,children:f.jsx(vr,{size:20})}),f.jsx("button",{type:"button",className:"rqmii-chat-circle-button is-danger",onClick:r,children:f.jsx(ua,{size:20})})]})]}),t.useText&&f.jsxs("div",{className:"rqmii-avatar-sidebar",children:[f.jsx(ei,{messages:u,language:n}),f.jsx(Jr,{language:n,onSend:l,variant:"compact"}),f.jsx(At,{language:n,agent:t})]})]})});function Ud({content:e,children:t,className:n="",...r}){const i=(e!==void 0?e:t)||"";return!i||!i.trim()?null:f.jsx(Kr,{className:`rqmii-markdown ${n}`.trim(),content:i,...r})}const jd=b.memo(Ud);function qd({language:e,content:t,config:n,agent:r,onAccept:i,onDecline:a}){const s=t||n?.body?.[e]||O.getChatText(e,"consentBody")||"",o=n?.acceptLabel?.[e]||O.getChatText(e,"consentAccept"),u=n?.declineLabel?.[e]||O.getChatText(e,"consentDecline");return f.jsxs("div",{className:O.cx("rqmii-chat-panel rqmii-chat-panel--consent",O.languageFontClass()),dir:O.languageTextDirection(e),children:[f.jsx("div",{className:"rqmii-chat-consent-body",children:f.jsx(jd,{content:s})}),f.jsxs("div",{className:"rqmii-chat-consent-actions",children:[f.jsx("button",{type:"button",className:"rqmii-chat-consent-button rqmii-chat-consent-button--decline",onClick:a,children:u}),f.jsx("button",{type:"button",className:"rqmii-chat-consent-button rqmii-chat-consent-button--accept",onClick:i,children:o})]})]})}function RA(e){return e?typeof e=="string"?e:typeof e=="object"&&typeof e.text=="string"?e.text:"":""}function vA(e){return e==="text"||e==="voice"||e==="text_and_voice"}const Ja=b.memo(function({agent:t,language:n,languages:r,onLanguageChange:i=O.noop,onEndSession:a=O.noop,onMinimize:s,messages:o,onSendMessage:u,isPreview:l=!1,chatKind:d,sdk:h,renderPanel:p,messagesRef:m,initialText:g,autoStartVoice:y}){const S=t.widget?.consent||t.consent,k=!!S?.enabled,C=S?.content?.[n]||S?.body?.[n]||"",w=S?.one_time!==!1,R=t.id?`rqmii_consent_${t.id}`:null,[M,N]=b.useState(()=>{if(!k||!C)return!0;if(w&&R&&typeof window<"u")try{return window.localStorage.getItem(R)==="true"}catch{return!1}return!1}),v=d||O.resolveChatKind(t),[D,j]=b.useState(()=>v==="voice"&&h.isSessionReady||v==="voice"&&!!y),[I,H]=b.useState(()=>(v==="text"||v==="text_and_voice")&&h.isSessionReady||!!g||v==="text_and_voice"&&!!y),[z,Q]=b.useState(!1),[W,F]=b.useState(!1),[G,V]=b.useState(null),re=v==="voice"&&D||v==="text_and_voice"&&I,ke=O.useElapsed(re),T=O.useVisualViewportHeight(),Ce=k&&!!C&&!M&&!l,pe=vA(v),{events:_}=Xe.useRqmiiConnection();b.useEffect(()=>{if(!_)return;const _e=()=>{pe&&O.isMobileViewport()&&Q(!0)},Ze=()=>{pe&&Q(!1)};return _.on("minimize_chat",_e),_.on("maximize_chat",Ze),()=>{_.off("minimize_chat",_e),_.off("maximize_chat",Ze)}},[_,pe]);const we=b.useCallback(()=>{if(w&&R&&typeof window<"u")try{window.localStorage.setItem(R,"true")}catch{}N(!0)},[w,R]),ce=b.useCallback(()=>{s?s():a()},[s,a]),J=_e=>{i(_e),l||h.changeSessionLanguage(_e)},xe=b.useCallback(_e=>{if(V(null),F(!0),u){u(_e);return}h.sendTextMessage(_e)},[u,h]);b.useEffect(()=>{m&&(m.current=h.messages)});const ye=b.useRef(!1);b.useEffect(()=>{ye.current||(g?(ye.current=!0,xe(g)):y&&(ye.current=!0,V(null),F(!0),h.isVoiceActive||h.startVoice()))},[]),b.useEffect(()=>{W&&h.isSessionReady&&(F(!1),v==="voice"?j(!0):H(!0))},[W,h.isSessionReady,v]),b.useEffect(()=>{W&&h.error&&(F(!1),V(h.error))},[W,h.error]);const fe=b.useCallback(()=>{V(null),F(!0),h.isVoiceActive||h.startVoice()},[h]);if(h.error&&!l&&(I||D))return f.jsx(Pd,{message:h.error,language:n,onClose:a});if(Ce)return f.jsx(qd,{language:n,content:C,config:t.consent,agent:t,onAccept:we,onDecline:ce});const Re={agent:t,language:n,languages:r,chatKind:v,sdk:h,isPreview:l,onLanguageChange:J,onClose:a,onMinimize:pe?()=>Q(!0):void 0,onRestore:pe?()=>Q(!1):void 0,onSend:xe,voiceStarted:D,conversationStarted:I,isMinimized:z,elapsed:ke,setVoiceStarted:j,setConversationStarted:H};return p?f.jsx(f.Fragment,{children:p(Re)}):f.jsx(DA,{...Re,connecting:W,connectError:G,visualViewportHeight:T,onCloseWidget:s??a,initiateVoice:fe,onSendSuggestion:_e=>{V(null),F(!0),h.sendSuggestion?.(_e)}})}),DA=b.memo(function({agent:t,language:n,languages:r,chatKind:i,sdk:a,onLanguageChange:s,onClose:o,onMinimize:u,onRestore:l,onSend:d,voiceStarted:h,conversationStarted:p,isMinimized:m,elapsed:g,setVoiceStarted:y,setConversationStarted:S,visualViewportHeight:k,connecting:C=!1,connectError:w=null,onCloseWidget:R,initiateVoice:M,onSendSuggestion:N}){const v=t.widget?.behavior?.typing_indicator_enabled??!0,D=i==="text"?a.waitingForResponse&&v:!1,j=a.messages;if(i==="avatar")return f.jsx(Hd,{agent:t,language:n,onClose:o});if(m)return f.jsx(LA,{agent:t,language:n,onRestore:l,onClose:o,isListening:a.isVoiceActive,isAudioPlaying:a.isAudioPlaying,isSpeaking:a.vad.isSpeaking,onToggleVoice:a.toggleVoice,elapsed:g,variant:i==="text"?"text":"voice"});if(i==="voice"&&h)return f.jsx(IA,{agent:t,language:n,onEndSession:o,onMinimize:u,isListening:a.isVoiceActive,isLoading:a.vad.isLoading,isSpeaking:a.vad.isSpeaking,isAudioPlaying:a.isAudioPlaying,isAgentThinking:a.isAgentThinking,isAgentSpeaking:a.isAgentSpeaking,onToggleVoice:a.toggleVoice,elapsed:g,visualViewportHeight:k});if(i==="voice")return f.jsx(wA,{agent:t,language:n,languages:r,onLanguageChange:s,onClose:R,isAudioPlaying:a.isAudioPlaying,isVoiceSetupLoading:a.isVoiceSetupLoading||C,onStartVoice:M,visualViewportHeight:k});if(!p&&(a.messages.length===0||C)){const I=(t.widget?.behavior?.suggested_messages?.[n]||t.conversation?.suggested_messages?.[n])?.filter(Q=>Q.trim())||void 0,H=Q=>{a.sendSuggestion?N(Q):d?.(Q)},z=i==="text_and_voice"||O.resolveChatKind(t)==="text_and_voice";return f.jsx(SA,{agent:t,language:n,languages:r,onLanguageChange:s,onClose:R,onSend:d,isVoiceEnabled:z,isAudioPlaying:a.isAudioPlaying,isVoiceSetupLoading:a.isVoiceSetupLoading||C,onStartVoice:M,visualViewportHeight:k,disabled:C,error:w||void 0,suggestions:I,onSuggestionClick:H,compact:!!I})}return f.jsx(NA,{agent:t,language:n,onEndSession:o,messages:j,partialTranscript:RA(a.partialTranscript),onSend:d,isAudioPlaying:a.isAudioPlaying,isVoiceEnabled:i==="text_and_voice",isListening:a.isVoiceActive,isSpeaking:a.vad.isSpeaking,isLoading:a.vad.isLoading,isAgentThinking:a.isAgentThinking,isAgentSpeaking:a.isAgentSpeaking,onToggleVoice:a.toggleVoice,onStartVoice:a.startVoice,onMinimize:u,elapsed:g,visualViewportHeight:k,waitingForResponse:D})}),OA={isListening:!1,isLoading:!1,isSpeaking:!1,toggle:async()=>!1};function zd({isSessionReady:e,sendTextMessage:t,messages:n}){const[r,i]=b.useState(null),[a,s]=b.useState(null),o=b.useCallback(()=>{i(u=>(u&&(e?t(u):s(u)),null))},[e,t]);return b.useEffect(()=>{r&&n.length!==0&&o()},[n,r,o]),b.useEffect(()=>{if(!r)return;const u=setTimeout(o,5e3);return()=>clearTimeout(u)},[r,o]),b.useEffect(()=>{!a||!e||(t(a),s(null))},[e,a,t]),{pendingWelcomeText:r,pendingMessage:a,setPendingWelcomeText:i,setPendingMessage:s,sendPendingWelcomeText:o}}function es({isSessionReady:e,signalClientReady:t}){const[n,r]=b.useState(!1),[i,a]=b.useState(void 0),s=b.useRef(!1);return b.useEffect(()=>{!e||s.current||!n||(s.current=!0,t(i),r(!1))},[e,n,i,t]),{emitClientReady:b.useCallback(u=>{e?(s.current=!0,t(u)):(a(u),r(!0))},[e,t])}}const PA=300;function $d(e){const{isPreview:t=!1,...n}=e,{messages:r,sendTextMessage:i,emitUserMessage:a,addLocalMessage:s,clearMessages:o}=Xe.useRqmiiMessages(),{changeSessionLanguage:u,clearSessionHistory:l,signalClientReady:d,error:h,isSessionReady:p,isAgentThinking:m,isAgentSpeaking:g}=Xe.useRqmiiConnection(),y=b.useRef(!1),S=b.useRef(null),k=b.useRef(!1),[C,w]=b.useState(!1),[R,M]=b.useState(null),[N,v]=b.useState(!1),D=b.useRef(r.length);b.useEffect(()=>{if(r.length>D.current){const F=r[r.length-1];F.role==="assistant"&&F.streaming&&v(!1)}D.current=r.length},[r]),Dt.useRqmiiEvents("message_rate_limited",b.useCallback(()=>{v(!1)},[])),b.useEffect(()=>{if(!p||!C||k.current)return;const F=S.current;if(F===null)return;k.current=!0,S.current=null,s("user",F),M(null);const G=e.agent.welcomeMessages?.[e.language];d(G?{welcomeMessage:G}:void 0);const V=setTimeout(()=>{a(F),v(!0)},PA);return()=>clearTimeout(V)},[p,C,d,a,s]);const j=b.useMemo(()=>R?[{id:"first-user",role:"user",text:R},...r]:r,[R,r]),I=b.useCallback(()=>{M(null),o()},[o]),H={emitClientReady:d,sendMessage:F=>{i(F)},queueForWelcome:O.noop,enableVoice:O.noop,disableVoice:O.noop,language:e.language,isSessionReady:p,supportsVoice:!1,isVoiceActive:!1,chatKind:"text"},z=(F,G)=>{e.onSessionStart?.(),y.current?(v(!0),G.sendMessage(F)):(y.current=!0,M(F),S.current=F,w(!0),v(!0))},Q=F=>{e.onTextSend?e.onTextSend(F,H):z(F,H)},W={messages:j,sendTextMessage:Q,clearMessages:I,clearSessionHistory:l,isAudioPlaying:!1,partialTranscript:null,changeSessionLanguage:u,error:h,isAgentThinking:m,isAgentSpeaking:g,isVoiceSetupLoading:!1,isVoiceActive:!1,isSessionReady:p,vad:OA,startVoice:O.noop,prepareVoice:O.noop,toggleVoice:O.noop,signalClientReady:d,waitingForResponse:N,sendSuggestion:Q};return f.jsx(Ja,{...n,isPreview:t,chatKind:"text",sdk:W})}const Vd=()=>Promise.resolve().then(()=>zA),Yd=()=>Promise.resolve().then(()=>VA),Wd=()=>Promise.resolve().then(()=>YA),MA=b.lazy(()=>Vd().then(e=>({default:e.RqmiiVoiceChatBox}))),BA=b.lazy(()=>Yd().then(e=>({default:e.RqmiiTextAndVoiceChatBox}))),FA=b.lazy(()=>Wd().then(e=>({default:e.RqmiiAvatarChatBox})));function HA(e){(e==="voice"?Vd:e==="text_and_voice"?Yd:e==="avatar"?Wd:null)?.().catch(()=>{})}function ts({agent:e,language:t,languages:n,onLanguageChange:r,onEndSession:i,onMinimize:a,onStartText:s,onStartVoice:o,textOnly:u,messages:l,onSendMessage:d,isPreview:h,onSessionStart:p,initialText:m,autoStartVoice:g}){const y=O.resolveChatKind(e),S={agent:e,language:t,languages:n,onLanguageChange:r,onEndSession:i,onMinimize:a,messages:l,onSendMessage:d,isPreview:h,onSessionStart:p,initialText:m,autoStartVoice:g};switch(y){case"avatar":return f.jsx(b.Suspense,{fallback:null,children:f.jsx(FA,{...S})});case"voice":return f.jsx(b.Suspense,{fallback:null,children:f.jsx(MA,{...S})});case"text_and_voice":return f.jsx(b.Suspense,{fallback:null,children:f.jsx(BA,{...S,onStartText:s,onStartVoice:o,textOnly:u})});case"text":default:return f.jsx($d,{...S})}}function UA(e){switch(e.view){case"feedback":return f.jsx(Xa,{...e.feedback});case"ended":return f.jsx(Za,{...e.ended});case"chat":default:return f.jsx(ts,{...e.chat})}}const jA=Object.freeze(Object.defineProperty({__proto__:null,ChatBoxDispatcher:ts,EndedChatPanel:Za,FeedbackPanel:Xa,OpenChatView:UA,preloadChatBox:HA},Symbol.toStringTag,{value:"Module"}));function qA(e){const{agent:t,language:n,open:r=!0,className:i="",messages:a,onSendMessage:s,onClose:o}=e,u=b.useMemo(()=>O.normalizePublicAgent(t),[t]),[l,d]=b.useState(r),[h,p]=b.useState(n||u.defaultLanguage),m=b.useMemo(()=>O.normalizeChatLanguages(u.languages,u.defaultLanguage),[u.defaultLanguage,u.languages]),g=u.widget?.appearance?.theme?.mode==="light"?"light":"dark",y=b.useMemo(()=>O.resolveWidgetThemeStyles(u.widget?.appearance),[u.widget?.appearance]);return b.useEffect(()=>{n&&p(n)},[n]),b.useEffect(()=>{d(r)},[r]),b.useEffect(()=>{O.ensureGoogleFontLoaded(u.widget?.appearance?.font)},[u.widget?.appearance?.font]),f.jsx(Xe.RqmiiAgentProvider,{wsUrl:"",restUrl:"",enableAudio:!1,children:f.jsx("div",{className:O.cx("rqmii-chat-surface is-preview",`rqmii-theme-${g}`,u.widget?.appearance?.position==="left"&&"rqmii-position-left",i),"data-theme":g,style:y,dir:"ltr",children:l?f.jsx(ts,{agent:u,language:h,languages:m,onLanguageChange:p,onEndSession:()=>{d(!1),o?.()},onMinimize:()=>{d(!1),o?.()},messages:a,onSendMessage:s,isPreview:!0}):null})})}function Gd(e){const{isPreview:t=!1,...n}=e,{messages:r,sendTextMessage:i,clearMessages:a}=Xe.useRqmiiMessages(),{isAudioPlaying:s,partialTranscript:o}=Dt.useRqmiiVoice(),{changeSessionLanguage:u,clearSessionHistory:l,signalClientReady:d,error:h,isSessionReady:p,isAgentThinking:m,isAgentSpeaking:g}=Xe.useRqmiiConnection(),{setPendingWelcomeText:y,setPendingMessage:S}=zd({isSessionReady:p,sendTextMessage:i,messages:r}),{emitClientReady:k}=es({isSessionReady:p,signalClientReady:d}),[C,w]=b.useState(!1),R=Dt.useRqmiiVAD({enabled:!0,preloadStream:!1}),{isLoading:M,isListening:N,toggle:v}=R,D=M,j=N||C;b.useEffect(()=>{!C||!p||M||N||v()},[C,p,M,N,v]);const I=()=>{e.onSessionStart?.()},H={emitClientReady:k,sendMessage:V=>{p?i(V):S(V)},queueForWelcome:V=>y(V),enableVoice:()=>w(!0),disableVoice:()=>{w(!1),N&&v()},language:e.language,isSessionReady:p,supportsVoice:!0,isVoiceActive:j,chatKind:"voice"},z=V=>{I(),V.enableVoice();const re=e.agent.welcomeMessages?.[e.language];V.emitClientReady(re?{welcomeMessage:re}:void 0)},Q=V=>{V.isVoiceActive?V.disableVoice():V.enableVoice()},G={messages:r,sendTextMessage:()=>{},clearMessages:a,clearSessionHistory:l,isAudioPlaying:s,partialTranscript:o,changeSessionLanguage:u,error:h,isAgentThinking:m,isAgentSpeaking:g,isVoiceSetupLoading:D,isVoiceActive:j,isSessionReady:p,vad:R,startVoice:()=>{e.onVoiceStart?e.onVoiceStart(H):z(H)},prepareVoice:()=>{},toggleVoice:()=>{e.onVoiceToggle?e.onVoiceToggle(H):Q(H)},signalClientReady:d};return f.jsx(Ja,{...n,isPreview:t,chatKind:"voice",sdk:G})}const zA=Object.freeze(Object.defineProperty({__proto__:null,RqmiiVoiceChatBox:Gd},Symbol.toStringTag,{value:"Module"})),$A=300;function Qd(e){const{isPreview:t=!1,...n}=e,{messages:r,sendTextMessage:i,emitUserMessage:a,addLocalMessage:s,clearMessages:o}=Xe.useRqmiiMessages(),{isAudioPlaying:u,partialTranscript:l}=Dt.useRqmiiVoice(),{changeSessionLanguage:d,clearSessionHistory:h,signalClientReady:p,error:m,isSessionReady:g,isAgentThinking:y,isAgentSpeaking:S}=Xe.useRqmiiConnection(),{emitClientReady:k}=es({isSessionReady:g,signalClientReady:p}),[C,w]=b.useState(!1),R=b.useRef(null),[M,N]=b.useState(!1),v=b.useRef(null),[D,j]=b.useState(!1),I=b.useRef(!1),H=b.useRef(!1),z=b.useRef(!1),[Q,W]=b.useState(null),[F,G]=b.useState(!1),V=b.useRef(r.length);b.useEffect(()=>{if(r.length>V.current){const oe=r[r.length-1];oe.role==="assistant"&&oe.streaming&&G(!1)}V.current=r.length},[r]),Dt.useRqmiiEvents("message_rate_limited",b.useCallback(()=>{G(!1)},[]));const re=Dt.useRqmiiVAD({enabled:!0,preloadStream:!1}),{isLoading:ke,isListening:T,toggle:Ce}=re,pe=ke,_=T||C;b.useEffect(()=>{!C||!g||ke||T||Ce()},[C,g,ke,T,Ce]),b.useEffect(()=>{if(!g||!M||z.current)return;const oe=R.current;if(oe===null)return;z.current=!0,R.current=null,s("user",oe),W(null);const Pe=e.agent.welcomeMessages?.[e.language];p(Pe?{welcomeMessage:Pe}:void 0);const _t=setTimeout(()=>{a(oe),G(!0)},$A);return()=>clearTimeout(_t)},[g,M,p,a,s]),b.useEffect(()=>{if(!g||!D||I.current)return;const oe=v.current;oe!==null&&(I.current=!0,v.current=null,s("user",oe),a(oe),G(!0),j(!1))},[g,D,a,s]);const we=b.useMemo(()=>Q?[{id:"first-user",role:"user",text:Q},...r]:r,[Q,r]),ce=b.useCallback(()=>{W(null),H.current=!1,z.current=!1,o()},[o]),J=()=>{e.onSessionStart?.()},xe={emitClientReady:oe=>{z.current=!0,H.current=!0,k(oe)},sendMessage:oe=>{i(oe)},queueForWelcome:()=>{},enableVoice:()=>w(!0),disableVoice:()=>{w(!1),T&&Ce()},language:e.language,isSessionReady:g,supportsVoice:!0,isVoiceActive:_,chatKind:"text_and_voice"},ye=(oe,Pe)=>{J(),!H.current&&!z.current?(H.current=!0,e.onStartText?.(),W(oe),R.current=oe,N(!0),G(!0)):(H.current=!0,G(!0),Pe.sendMessage(oe))},fe=oe=>{J(),H.current=!0,z.current=!0,e.onStartVoice?.(),oe.enableVoice();const Pe=e.agent.welcomeMessages?.[e.language];oe.emitClientReady(Pe?{welcomeMessage:Pe}:void 0)},Re=oe=>{oe.isVoiceActive?oe.disableVoice():oe.enableVoice()},rt={messages:we,sendTextMessage:oe=>{e.onTextSend?e.onTextSend(oe,xe):ye(oe,xe)},clearMessages:ce,clearSessionHistory:h,isAudioPlaying:u,partialTranscript:l,changeSessionLanguage:d,error:m,isAgentThinking:y,isAgentSpeaking:S,isVoiceSetupLoading:pe,isVoiceActive:_,isSessionReady:g,vad:re,startVoice:()=>{e.onVoiceStart?e.onVoiceStart(xe):fe(xe)},prepareVoice:()=>{},toggleVoice:()=>{e.onVoiceToggle?e.onVoiceToggle(xe):Re(xe)},signalClientReady:p,waitingForResponse:F,sendSuggestion:oe=>{J(),H.current=!0,z.current=!0,e.onStartVoice?.(),w(!0),v.current=oe,j(!0)}};return f.jsx(Ja,{...n,isPreview:t,chatKind:e.textOnly?"text":"text_and_voice",sdk:rt})}const VA=Object.freeze(Object.defineProperty({__proto__:null,RqmiiTextAndVoiceChatBox:Qd},Symbol.toStringTag,{value:"Module"}));function Kd(e){const{isPreview:t=!1,agent:n,language:r,languages:i,onLanguageChange:a,onEndSession:s,onMinimize:o,messages:u,onSendMessage:l}=e,d=s||o||O.noop,{messages:h,sendTextMessage:p,clearMessages:m}=Xe.useRqmiiMessages(),{changeSessionLanguage:g,clearSessionHistory:y,signalClientReady:S,error:k,isSessionReady:C,isAgentThinking:w,isAgentSpeaking:R}=Xe.useRqmiiConnection();return zd({isSessionReady:C,sendTextMessage:p,messages:h}),es({isSessionReady:C,signalClientReady:S}),k&&!t?f.jsx(Pd,{message:k,language:r,onClose:d}):f.jsx(Hd,{agent:n,language:r,onClose:d})}const YA=Object.freeze(Object.defineProperty({__proto__:null,RqmiiAvatarChatBox:Kd},Symbol.toStringTag,{value:"Module"}));function WA({agent:e,defaultOpen:t,className:n="",preview:r=!1,ChatBoxComponent:i}){const a=t!==void 0?t:e.widget?.behavior?.default_open??!1,[s,o]=b.useState(a),[u,l]=b.useState(e.defaultLanguage),d=b.useMemo(()=>O.normalizeChatLanguages(e.languages,e.defaultLanguage),[e.defaultLanguage,e.languages]);b.useEffect(()=>{l(e.defaultLanguage)},[e.defaultLanguage]),b.useEffect(()=>{o(a)},[a]);const h=e.widget?.appearance?.theme?.mode==="light"?"light":"dark",p=b.useMemo(()=>O.resolveWidgetThemeStyles(e.widget?.appearance),[e.widget?.appearance]);return f.jsxs("div",{className:O.cx("rqmii-chat-surface",`rqmii-theme-${h}`,r&&"is-preview",n),"data-theme":h,style:p,children:[!s&&f.jsx(O.RqmiiChatOpenButton,{agent:e,onClick:()=>o(!0),position:r?"static":"fixed"}),s&&f.jsx(i,{agent:e,language:u,languages:d,onLanguageChange:l,onClose:()=>o(!1),isPreview:r})]})}exports.ChatPanels=jA;exports.ConsentDialog=qd;exports.El=Qy;exports.EndedChatPanel=Za;exports.FeedbackPanel=Xa;exports.Message=uA;exports.MessageAvatar=dA;exports.MessageContent=lA;exports.MessageList=ei;exports.RatingBar=Bd;exports.Response=aA;exports.RqmiiAgentChatPreview=qA;exports.RqmiiAvatarChatBox=Kd;exports.RqmiiChatFooter=At;exports.RqmiiChatSurface=WA;exports.RqmiiMarkdown=jd;exports.RqmiiMarkdownComponent=Ud;exports.RqmiiMessage=Xr;exports.RqmiiMessageAvatar=Od;exports.RqmiiMessageContent=Zr;exports.RqmiiResponse=Kr;exports.RqmiiTextAndVoiceChatBox=Qd;exports.RqmiiTextChatBox=$d;exports.RqmiiVoiceChatBox=Gd;exports.S=Oe;exports.Vo=Dd;exports.co=qc;exports.getDefaultExportFromCjs=ra;
|
|
251
|
+
//# sourceMappingURL=ui-1UzY5QCI.cjs.map
|