agent-tower 0.4.12-beta.0 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/core/event-bus.d.ts +1 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/executors/claude-code.executor.d.ts +1 -1
- package/dist/executors/claude-code.executor.d.ts.map +1 -1
- package/dist/git/worktree.manager.d.ts.map +1 -1
- package/dist/git/worktree.manager.js +21 -2
- package/dist/git/worktree.manager.js.map +1 -1
- package/dist/output/msg-store.d.ts +5 -3
- package/dist/output/msg-store.d.ts.map +1 -1
- package/dist/output/msg-store.js +14 -5
- package/dist/output/msg-store.js.map +1 -1
- package/dist/output/types.d.ts +4 -0
- package/dist/output/types.d.ts.map +1 -1
- package/dist/output/types.js.map +1 -1
- package/dist/pipeline/agent-pipeline.js +2 -2
- package/dist/pipeline/agent-pipeline.js.map +1 -1
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +7 -3
- package/dist/routes/sessions.js.map +1 -1
- package/dist/services/hibernation-scheduler.d.ts.map +1 -1
- package/dist/services/hibernation-scheduler.js +1 -0
- package/dist/services/hibernation-scheduler.js.map +1 -1
- package/dist/services/session-manager.js +2 -2
- package/dist/services/session-manager.js.map +1 -1
- package/dist/services/workspace.service.d.ts.map +1 -1
- package/dist/services/workspace.service.js +16 -4
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/socket/socket-gateway.js +2 -2
- package/dist/socket/socket-gateway.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-BFrnOvUV.js → AgentDemoPage-BskuObus.js} +1 -1
- package/dist/web/assets/{DemoPage-DzKv8uDU.js → DemoPage-DM2NLFlQ.js} +1 -1
- package/dist/web/assets/{GeneralSettingsPage-Co-8z-sL.js → GeneralSettingsPage-DggKcdQM.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-Do3Og7G9.js → NotificationSettingsPage-fDjeTfPh.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-7rYry6Ql.js → ProfileSettingsPage-CWVSxzJw.js} +1 -1
- package/dist/web/assets/{ProjectKanbanPage-wvZc6KmL.js → ProjectKanbanPage-DHNpmw-4.js} +3 -3
- package/dist/web/assets/{ProjectSettingsPage-7-FUoyM2.js → ProjectSettingsPage-Cf4D6UFs.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-DZsll4Bu.js → ProviderSettingsPage-A_AoWMBp.js} +7 -7
- package/dist/web/assets/{button-BCWr6Rvd.js → button-5iX1e_fm.js} +1 -1
- package/dist/web/assets/{chevron-down-DanWbYmL.js → chevron-down-BXQh2Wxh.js} +1 -1
- package/dist/web/assets/{chevron-right-DF-6zN98.js → chevron-right-Cpp4WiwB.js} +1 -1
- package/dist/web/assets/{circle-alert-CFdGx6uD.js → circle-alert-B4o7LpBN.js} +1 -1
- package/dist/web/assets/{circle-check-iVKaVABv.js → circle-check-0QrYHY8C.js} +1 -1
- package/dist/web/assets/{code-block-OCS4YCEC-CC5lCZW2.js → code-block-OCS4YCEC-CyOCA4DG.js} +1 -1
- package/dist/web/assets/{confirm-dialog-B6ScE3zf.js → confirm-dialog-DnYr0-iE.js} +1 -1
- package/dist/web/assets/{folder-picker-CmwjQXjK.js → folder-picker-CTcrs_BC.js} +1 -1
- package/dist/web/assets/{index-bUdBNiUV.js → index-BLRui4ck.js} +2 -2
- package/dist/web/assets/{loader-circle-CdakhgnX.js → loader-circle-DvZK36Ga.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-DlkW-f-_.js → mermaid-NOHMQCX5-xPQ5tFq8.js} +42 -42
- package/dist/web/assets/{modal-DjFx0vpU.js → modal-CvoxLn2x.js} +1 -1
- package/dist/web/assets/{pencil-BTHTFDLJ.js → pencil-CNuySmPC.js} +1 -1
- package/dist/web/assets/{rotate-ccw-DfJiT691.js → rotate-ccw-BusOGXw0.js} +1 -1
- package/dist/web/assets/{select-6YNbjKSC.js → select-DOJOMQ5p.js} +1 -1
- package/dist/web/assets/{use-profiles-cjE3ZHLR.js → use-profiles-CGAx71Yx.js} +1 -1
- package/dist/web/assets/{use-providers-CRsJrkvm.js → use-providers-RzfgfeZ2.js} +1 -1
- package/dist/web/index.html +1 -1
- package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +1 -0
- package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-
|
|
2
|
-
import{h as Ut,j as g,W as Zs,r as C,_ as Js,u as cc,R as Mn,s as Ke,S as Te,C as mt,g as hc}from"./index-bUdBNiUV.js";import{L as He,n as dc,c as fc,S as Ar}from"./log-adapter-CeKrvZcz.js";import{C as sr}from"./chevron-right-DF-6zN98.js";import{C as _i,a as pc}from"./chevron-down-DanWbYmL.js";import{b as mc,a as gc}from"./utils-CkSf8FUe.js";const Ec=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],bc=Ut("circle-dot",Ec);const Tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fa=Ut("circle",Tc);const xc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],jx=Ut("globe",xc);const kc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],zx=Ut("paperclip",kc);const _c=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$x=Ut("settings",_c);const Ac=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Yx=Ut("square",Ac),qx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1z",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 1a7 7 0 0 0 0 14V1z",fill:"currentColor"})]}),Vx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),g.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor"})]}),Wx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"})}),Gx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M13.5 4.5L6.5 11.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Qx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M5.5 5.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ur=(function(e){if(e==null)return Nc;if(typeof e=="function")return or(e);if(typeof e=="object")return Array.isArray(e)?yc(e):Cc(e);if(typeof e=="string")return Sc(e);throw new Error("Expected function, string, or object as test")});function yc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ur(e[n]);return or(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Cc(e){const t=e;return or(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Sc(e){return or(t);function t(n){return n&&n.type===e}}function or(e){return t;function t(n,r,i){return!!(Ic(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Nc(){return!0}function Ic(e){return e!==null&&typeof e=="object"&&"type"in e}const eu=[],rn=!0,Wr=!1,Gn="skip";function Ai(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=ur(i),s=r?-1:1;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=eu,b,_,N;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=wc(n(o,h)),p[0]===Wr))return p;if("children"in o&&o.children){const A=o;if(A.children&&p[0]!==Gn)for(_=(r?A.children.length:-1)+s,N=h.concat(A);_>-1&&_<A.children.length;){const O=A.children[_];if(b=u(O,_,N)(),b[0]===Wr)return b;_=typeof b[1]=="number"?b[1]:_+s}}return p}}}function wc(e){return Array.isArray(e)?e:typeof e=="number"?[rn,e]:e==null?eu:[e]}function st(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),Ai(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Lc({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"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Pc(e,t,n,r,i,a,s);st(c,h)}}function pa(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 Oc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Rc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Dc=new Set(["javascript:","data:","file:","vbscript:"]);function ma(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 h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=pa(e,n);if(!s||Dc.has(s.protocol)||!(Rc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Oc(e);return s&&t.some(c=>{const h=pa(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const yr=Symbol("node-seen"),Pc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[yr])return rn;if(o.tagName==="a"){const d=ma(o.properties.href,t,e,!1,!1,i);return d===null?(o[yr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Gn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",rn)}if(o.tagName==="img"){const d=ma(o.properties.src,n,e,r,!0,i);return d===null?(o[yr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Gn):(o.properties.src=d,rn)}return rn};return u},tu=-1,lr=0,un=1,Qn=2,yi=3,Ci=4,Si=5,Ni=6,nu=7,ru=8,ga=typeof self=="object"?self:globalThis,Mc=(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 lr:case tu:return n(s,i);case un:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Qn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case yi:return n(new Date(s),i);case Ci:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Si:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case Ni:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case nu:{const{name:u,message:o}=s;return n(new ga[u](o),i)}case ru: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:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new ga[a](s),i)};return r},Ea=e=>Mc(new Map,e)(0),Ot="",{toString:vc}={},{keys:Bc}=Object,Qt=e=>{const t=typeof e;if(t!=="object"||!e)return[lr,t];const n=vc.call(e).slice(8,-1);switch(n){case"Array":return[un,Ot];case"Object":return[Qn,Ot];case"Date":return[yi,Ot];case"RegExp":return[Ci,Ot];case"Map":return[Si,Ot];case"Set":return[Ni,Ot];case"DataView":return[un,n]}return n.includes("Array")?[un,n]:n.includes("Error")?[nu,n]:[Qn,n]},vn=([e,t])=>e===lr&&(t==="function"||t==="symbol"),Fc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Qt(s);switch(u){case lr:{let h=s;switch(o){case"bigint":u=ru,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([tu],s)}return i([u,h],s)}case un:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case Qn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Bc(s))(e||!vn(Qt(s[f])))&&h.push([a(f),a(s[f])]);return d}case yi:return i([u,s.toISOString()],s);case Ci:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Si:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(vn(Qt(f))||vn(Qt(p))))&&h.push([a(f),a(p)]);return d}case Ni:{const h=[],d=i([u,h],s);for(const f of s)(e||!vn(Qt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},ba=(e,{json:t,lossy:n}={})=>{const r=[];return Fc(!(t||n),!!t,new Map,r)(e),r},xt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ea(ba(e,t)):structuredClone(e):(e,t)=>Ea(ba(e,t));class Cn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Cn.prototype.normal={};Cn.prototype.property={};Cn.prototype.space=void 0;function iu(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Cn(n,r,t)}function Tn(e){return e.toLowerCase()}class Ie{constructor(t,n){this.attribute=n,this.property=t}}Ie.prototype.attribute="";Ie.prototype.booleanish=!1;Ie.prototype.boolean=!1;Ie.prototype.commaOrSpaceSeparated=!1;Ie.prototype.commaSeparated=!1;Ie.prototype.defined=!1;Ie.prototype.mustUseProperty=!1;Ie.prototype.number=!1;Ie.prototype.overloadedBoolean=!1;Ie.prototype.property="";Ie.prototype.spaceSeparated=!1;Ie.prototype.space=void 0;let Hc=0;const X=yt(),pe=yt(),Gr=yt(),B=yt(),le=yt(),vt=yt(),Le=yt();function yt(){return 2**++Hc}const Qr=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:pe,commaOrSpaceSeparated:Le,commaSeparated:vt,number:B,overloadedBoolean:Gr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Cr=Object.keys(Qr);class Ii extends Ie{constructor(t,n,r,i){let a=-1;if(super(t,n),Ta(this,"space",i),typeof r=="number")for(;++a<Cr.length;){const s=Cr[a];Ta(this,Cr[a],(r&Qr[s])===Qr[s])}}}Ii.prototype.defined=!0;function Ta(e,t,n){n&&(e[t]=n)}function jt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ii(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Tn(r)]=r,n[Tn(a.attribute)]=r}return new Cn(t,n,e.space)}const au=jt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:le,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:B,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:le,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:pe,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function su(e,t){return t in e?e[t]:t}function uu(e,t){return su(e,t.toLowerCase())}const Uc=jt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vt,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:le,autoFocus:X,autoPlay:X,blocking:le,capture:null,charSet:null,checked:X,cite:null,className:le,cols:B,colSpan:null,content:null,contentEditable:pe,controls:X,controlsList:le,coords:B|vt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Gr,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:le,height:B,hidden:Gr,high:B,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:le,itemRef:le,itemScope:X,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,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:X,optimum:B,pattern:null,ping:le,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:le,required:X,reversed:X,rows:B,rowSpan:B,sandbox:le,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:pe,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:B,security:null,unselectable:null},space:"html",transform:uu}),jc=jt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Le,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,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:vt,g2:vt,glyphName:vt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:Le,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,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:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Le,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Le,rev:Le,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Le,requiredFeatures:Le,requiredFonts:Le,requiredFormats:Le,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:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:Le,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Le,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Le,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:su}),ou=jt({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()}}),lu=jt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:uu}),cu=jt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zc={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"},$c=/[A-Z]/g,xa=/-[a-z]/g,Yc=/^data[-\w.:]+$/i;function cr(e,t){const n=Tn(t);let r=t,i=Ie;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Yc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(xa,Vc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!xa.test(a)){let s=a.replace($c,qc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ii}return new i(r,t)}function qc(e){return"-"+e.toLowerCase()}function Vc(e){return e.charAt(1).toUpperCase()}const Sn=iu([au,Uc,ou,lu,cu],"html"),ot=iu([au,jc,ou,lu,cu],"svg");function ka(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 hu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _a=/[#.]/g;function Wc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){_a.lastIndex=i;const u=_a.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Aa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function du(e){return e.join(" ").trim()}function fu(e,t,n){const r=n?Kc(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Wc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Gc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))Qc(e,o.properties,d,f)}for(const c of u)Xr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Gc(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 Qc(e,t,n,r){const i=cr(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=Aa(r):i.commaSeparated?a=ka(r):i.commaOrSpaceSeparated?a=Aa(ka(r).join(" ")):a=ya(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Xc(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(ya(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Xr(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)Xr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Xr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ya(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Tn(n)===Tn(t)))return!0}return n}function Xc(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Kc(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Zc=["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"],Jc=fu(Sn,"div"),eh=fu(ot,"g",Zc);function th(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 u=n[s];if(u===void 0){const o=Ca(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>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 u=n[n.length-1],o=Ca(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ca(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Et={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/"},pu={}.hasOwnProperty,nh=Object.prototype;function rh(e,t){const n=t||{};return wi({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:Sn,verbose:n.verbose||!1},e)}function wi(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Yn(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:mu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=th(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Yn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Yn(e,r,n),n}default:return n=ih(e,t),n}}function mu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=wi(e,t[n]);r.push(i)}return r}function ih(e,t){const n=e.schema;e.schema=t.namespaceURI===Et.svg?ot:Sn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;pu.call(nh,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?eh:Jc)(t.tagName,i,mu(e,t.childNodes));if(Yn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Pt(o.startTag),h=o&&o.endTag&&Pt(o.endTag),d=wi(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function Yn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ah(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ah(e,t,n){const r=Pt(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)pu.call(n.attrs,s)&&(a[cr(e.schema,s).property]=Pt(n.attrs[s]));n.startTag;const u=Pt(n.startTag),o=n.endTag?Pt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Pt(e){const t=Sa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sa(e){return e.line&&e.column?e:void 0}const Na={}.hasOwnProperty;function gu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Na.call(i,e)){const o=String(i[e]);s=Na.call(u,o)?u[o]: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 sh={},uh={}.hasOwnProperty,Eu=gu("type",{handlers:{root:lh,element:ph,text:dh,comment:fh,doctype:hh}});function oh(e,t){const r=(t||sh).space;return Eu(e,r==="svg"?ot:Sn)}function lh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Li(e.children,n,t),zt(e,n),n}function ch(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Li(e.children,n,t),zt(e,n),n}function hh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return zt(e,t),t}function dh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return zt(e,t),t}function fh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return zt(e,t),t}function ph(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&uh.call(e.properties,a)){const o=mh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Et[s],childNodes:[],parentNode:null};return u.childNodes=Li(e.children,u,r),zt(e,u),e.tagName==="template"&&e.content&&(u.content=ch(e.content,r)),u}function mh(e,t,n){const r=cr(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?hu(n):du(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=Et[r.space]}return i}function Li(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Eu(e[r],n);a.parentNode=t,i.push(a)}return i}function zt(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 gh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Eh=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]),ce="�";var m;(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"})(m||(m={}));const Se={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function bu(e){return e>=55296&&e<=57343}function bh(e){return e>=56320&&e<=57343}function Th(e,t){return(e-55296)*1024+9216+t}function Tu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function xu(e){return e>=64976&&e<=65007||Eh.has(e)}var I;(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"})(I||(I={}));const xh=65536;class kh{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=xh,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,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(bh(n))return this.pos++,this._addGap(),Th(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(I.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,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.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,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,bu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Tu(t)?this._err(I.controlCharacterInInputStream):xu(t)&&this._err(I.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Z;(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"})(Z||(Z={}));function ku(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 _h=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))),Ah=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 yh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ah.get(e))!==null&&t!==void 0?t:e}var Ee;(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"})(Ee||(Ee={}));const Ch=32;var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(at||(at={}));function Kr(e){return e>=Ee.ZERO&&e<=Ee.NINE}function Sh(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_F||e>=Ee.LOWER_A&&e<=Ee.LOWER_F}function Nh(e){return e>=Ee.UPPER_A&&e<=Ee.UPPER_Z||e>=Ee.LOWER_A&&e<=Ee.LOWER_Z||Kr(e)}function Ih(e){return e===Ee.EQUALS||Nh(e)}var ge;(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"})(ge||(ge={}));var Ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ze||(Ze={}));class wh{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ge.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ze.Strict}startEntity(t){this.decodeMode=t,this.state=ge.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ge.EntityStart:return t.charCodeAt(n)===Ee.NUM?(this.state=ge.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ge.NamedEntity,this.stateNamedEntity(t,n));case ge.NumericStart:return this.stateNumericStart(t,n);case ge.NumericDecimal:return this.stateNumericDecimal(t,n);case ge.NumericHex:return this.stateNumericHex(t,n);case ge.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Ch)===Ee.LOWER_X?(this.state=ge.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ge.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(Kr(i)||Sh(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(Kr(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===Ee.SEMI)this.consumed+=1;else if(this.decodeMode===Ze.Strict)return 0;return this.emitCodePoint(yh(this.result),this.consumed),this.errors&&(t!==Ee.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&at.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Lh(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(a===0||Ih(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14,a!==0){if(s===Ee.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ze.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]&at.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]&~at.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case ge.NamedEntity:return this.result!==0&&(this.decodeMode!==Ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ge.NumericDecimal:return this.emitNumericEntity(0,2);case ge.NumericHex:return this.emitNumericEntity(0,3);case ge.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ge.EntityStart:return 0}}}function Lh(e,t,n,r){const i=(t&at.BRANCH_LENGTH)>>7,a=t&at.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var M;(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/"})(M||(M={}));var bt;(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"})(bt||(bt={}));var De;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(De||(De={}));var y;(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"})(y||(y={}));var l;(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"})(l||(l={}));const Oh=new Map([[y.A,l.A],[y.ADDRESS,l.ADDRESS],[y.ANNOTATION_XML,l.ANNOTATION_XML],[y.APPLET,l.APPLET],[y.AREA,l.AREA],[y.ARTICLE,l.ARTICLE],[y.ASIDE,l.ASIDE],[y.B,l.B],[y.BASE,l.BASE],[y.BASEFONT,l.BASEFONT],[y.BGSOUND,l.BGSOUND],[y.BIG,l.BIG],[y.BLOCKQUOTE,l.BLOCKQUOTE],[y.BODY,l.BODY],[y.BR,l.BR],[y.BUTTON,l.BUTTON],[y.CAPTION,l.CAPTION],[y.CENTER,l.CENTER],[y.CODE,l.CODE],[y.COL,l.COL],[y.COLGROUP,l.COLGROUP],[y.DD,l.DD],[y.DESC,l.DESC],[y.DETAILS,l.DETAILS],[y.DIALOG,l.DIALOG],[y.DIR,l.DIR],[y.DIV,l.DIV],[y.DL,l.DL],[y.DT,l.DT],[y.EM,l.EM],[y.EMBED,l.EMBED],[y.FIELDSET,l.FIELDSET],[y.FIGCAPTION,l.FIGCAPTION],[y.FIGURE,l.FIGURE],[y.FONT,l.FONT],[y.FOOTER,l.FOOTER],[y.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[y.FORM,l.FORM],[y.FRAME,l.FRAME],[y.FRAMESET,l.FRAMESET],[y.H1,l.H1],[y.H2,l.H2],[y.H3,l.H3],[y.H4,l.H4],[y.H5,l.H5],[y.H6,l.H6],[y.HEAD,l.HEAD],[y.HEADER,l.HEADER],[y.HGROUP,l.HGROUP],[y.HR,l.HR],[y.HTML,l.HTML],[y.I,l.I],[y.IMG,l.IMG],[y.IMAGE,l.IMAGE],[y.INPUT,l.INPUT],[y.IFRAME,l.IFRAME],[y.KEYGEN,l.KEYGEN],[y.LABEL,l.LABEL],[y.LI,l.LI],[y.LINK,l.LINK],[y.LISTING,l.LISTING],[y.MAIN,l.MAIN],[y.MALIGNMARK,l.MALIGNMARK],[y.MARQUEE,l.MARQUEE],[y.MATH,l.MATH],[y.MENU,l.MENU],[y.META,l.META],[y.MGLYPH,l.MGLYPH],[y.MI,l.MI],[y.MO,l.MO],[y.MN,l.MN],[y.MS,l.MS],[y.MTEXT,l.MTEXT],[y.NAV,l.NAV],[y.NOBR,l.NOBR],[y.NOFRAMES,l.NOFRAMES],[y.NOEMBED,l.NOEMBED],[y.NOSCRIPT,l.NOSCRIPT],[y.OBJECT,l.OBJECT],[y.OL,l.OL],[y.OPTGROUP,l.OPTGROUP],[y.OPTION,l.OPTION],[y.P,l.P],[y.PARAM,l.PARAM],[y.PLAINTEXT,l.PLAINTEXT],[y.PRE,l.PRE],[y.RB,l.RB],[y.RP,l.RP],[y.RT,l.RT],[y.RTC,l.RTC],[y.RUBY,l.RUBY],[y.S,l.S],[y.SCRIPT,l.SCRIPT],[y.SEARCH,l.SEARCH],[y.SECTION,l.SECTION],[y.SELECT,l.SELECT],[y.SOURCE,l.SOURCE],[y.SMALL,l.SMALL],[y.SPAN,l.SPAN],[y.STRIKE,l.STRIKE],[y.STRONG,l.STRONG],[y.STYLE,l.STYLE],[y.SUB,l.SUB],[y.SUMMARY,l.SUMMARY],[y.SUP,l.SUP],[y.TABLE,l.TABLE],[y.TBODY,l.TBODY],[y.TEMPLATE,l.TEMPLATE],[y.TEXTAREA,l.TEXTAREA],[y.TFOOT,l.TFOOT],[y.TD,l.TD],[y.TH,l.TH],[y.THEAD,l.THEAD],[y.TITLE,l.TITLE],[y.TR,l.TR],[y.TRACK,l.TRACK],[y.TT,l.TT],[y.U,l.U],[y.UL,l.UL],[y.SVG,l.SVG],[y.VAR,l.VAR],[y.WBR,l.WBR],[y.XMP,l.XMP]]);function $t(e){var t;return(t=Oh.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const v=l,Rh={[M.HTML]:new Set([v.ADDRESS,v.APPLET,v.AREA,v.ARTICLE,v.ASIDE,v.BASE,v.BASEFONT,v.BGSOUND,v.BLOCKQUOTE,v.BODY,v.BR,v.BUTTON,v.CAPTION,v.CENTER,v.COL,v.COLGROUP,v.DD,v.DETAILS,v.DIR,v.DIV,v.DL,v.DT,v.EMBED,v.FIELDSET,v.FIGCAPTION,v.FIGURE,v.FOOTER,v.FORM,v.FRAME,v.FRAMESET,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HEADER,v.HGROUP,v.HR,v.HTML,v.IFRAME,v.IMG,v.INPUT,v.LI,v.LINK,v.LISTING,v.MAIN,v.MARQUEE,v.MENU,v.META,v.NAV,v.NOEMBED,v.NOFRAMES,v.NOSCRIPT,v.OBJECT,v.OL,v.P,v.PARAM,v.PLAINTEXT,v.PRE,v.SCRIPT,v.SECTION,v.SELECT,v.SOURCE,v.STYLE,v.SUMMARY,v.TABLE,v.TBODY,v.TD,v.TEMPLATE,v.TEXTAREA,v.TFOOT,v.TH,v.THEAD,v.TITLE,v.TR,v.TRACK,v.UL,v.WBR,v.XMP]),[M.MATHML]:new Set([v.MI,v.MO,v.MN,v.MS,v.MTEXT,v.ANNOTATION_XML]),[M.SVG]:new Set([v.TITLE,v.FOREIGN_OBJECT,v.DESC]),[M.XLINK]:new Set,[M.XML]:new Set,[M.XMLNS]:new Set},Zr=new Set([v.H1,v.H2,v.H3,v.H4,v.H5,v.H6]);y.STYLE,y.SCRIPT,y.XMP,y.IFRAME,y.NOEMBED,y.NOFRAMES,y.PLAINTEXT;var E;(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"})(E||(E={}));const fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Dh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function an(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Ph(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function nt(e){return Ph(e)||an(e)}function Ia(e){return nt(e)||Dh(e)}function Bn(e){return e+32}function _u(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function wa(e){return _u(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Mh(e){return e===m.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:bu(e)?I.surrogateCharacterReference:xu(e)?I.noncharacterCharacterReference:Tu(e)||e===m.CARRIAGE_RETURN?I.controlCharacterReference:null}class vh{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new wh(_h,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(I.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(I.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Mh(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:Z.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Z.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Z.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Z.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(ku(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(I.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=$t(t.tagName),t.type===Z.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(I.endTagWithAttributes),t.selfClosing&&this._err(I.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 Z.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Z.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Z.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:Z.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=_u(t)?Z.WHITESPACE_CHARACTER:t===m.NULL?Z.NULL_CHARACTER:Z.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Z.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ze.Attribute:Ze.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(I.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(I.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(I.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(I.missingEndTagName),this.state=E.DATA;break}case m.EOF:{this._err(I.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(I.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.tagName+=ce;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(an(t)?Bn(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Se.SCRIPT,!1)&&wa(this.preprocessor.peek(Se.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Se.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Se.SCRIPT,!1)&&wa(this.preprocessor.peek(Se.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Se.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(I.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(I.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.name+=ce;break}default:this.currentAttr.name+=String.fromCodePoint(an(t)?Bn(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(I.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._err(I.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.data+=ce;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Se.DASH_DASH,!0)?(this._createCommentToken(Se.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Se.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Se.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Se.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(I.cdataInHtmlContent),this._createCommentToken(Se.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(I.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.data+=ce;break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(I.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(I.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(an(t))this._createDoctypeToken(String.fromCharCode(Bn(t))),this.state=E.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(I.unexpectedNullCharacter),this._createDoctypeToken(ce),this.state=E.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.name+=ce;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(an(t)?Bn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Se.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Se.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(I.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.publicId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.publicId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.systemId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.systemId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.NULL:{this._err(I.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(I.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ia(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ia(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Au=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),La=new Set([...Au,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Xn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Bh=new Set([...Xn,l.OL,l.UL]),Fh=new Set([...Xn,l.BUTTON]),Oa=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ra=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Hh=new Set([l.TR,l.TEMPLATE,l.HTML]),Uh=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),jh=new Set([l.TABLE,l.TEMPLATE,l.HTML]),zh=new Set([l.TD,l.TH]);class $h{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=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===M.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])!==M.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(Zr,M.HTML)}popUntilTableCellPopped(){this.popUntilPopped(zh,M.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(jh,M.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Uh,M.HTML)}clearBackToTableRowContext(){this.clearBackTo(Hh,M.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]===l.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]===l.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 M.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case M.SVG:{if(Ra.has(i))return!1;break}case M.MATHML:{if(Oa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Bh)}hasInButtonScope(t){return this.hasInDynamicScope(t,Fh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case M.HTML:{if(Zr.has(n))return!0;if(Xn.has(n))return!1;break}case M.SVG:{if(Ra.has(n))return!1;break}case M.MATHML:{if(Oa.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===M.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===M.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Au.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&La.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&La.has(this.currentTagId);)this.pop()}}const Sr=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const Da={type:qe.Marker};class Yh{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 u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===qe.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Sr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Sr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=Sr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Da)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:qe.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:qe.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(Da);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===qe.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===qe.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===qe.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:De.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};rt.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(rt.isTextNode(n)){n.value+=t;return}}rt.appendChild(e,rt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rt.isTextNode(r)?r.value+=t:rt.insertBefore(e,rt.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}}},yu="html",qh="about:legacy-compat",Vh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Cu=["+//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//"],Wh=[...Cu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Gh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Su=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Qh=[...Su,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Pa(e,t){return t.some(n=>e.startsWith(n))}function Xh(e){return e.name===yu&&e.publicId===null&&(e.systemId===null||e.systemId===qh)}function Kh(e){if(e.name!==yu)return De.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Vh)return De.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Gh.has(n))return De.QUIRKS;let r=t===null?Wh:Cu;if(Pa(n,r))return De.QUIRKS;if(r=t===null?Su:Qh,Pa(n,r))return De.LIMITED_QUIRKS}return De.NO_QUIRKS}const Ma={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Zh="definitionurl",Jh="definitionURL",ed=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])),td=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:M.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:M.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:M.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:M.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:M.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:M.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:M.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:M.XML}],["xml:space",{prefix:"xml",name:"space",namespace:M.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:M.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:M.XMLNS}]]),nd=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])),rd=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function id(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===bt.COLOR||r===bt.SIZE||r===bt.FACE)||rd.has(t)}function Nu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Zh){e.attrs[t].name=Jh;break}}function Iu(e){for(let t=0;t<e.attrs.length;t++){const n=ed.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Oi(e){for(let t=0;t<e.attrs.length;t++){const n=td.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 ad(e){const t=nd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=$t(e.tagName))}function sd(e,t){return t===M.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function ud(e,t,n){if(t===M.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===bt.ENCODING){const i=n[r].value.toLowerCase();return i===Ma.TEXT_HTML||i===Ma.APPLICATION_XML}}return t===M.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function od(e,t,n,r){return(!r||r===M.HTML)&&ud(e,t,n)||(!r||r===M.MATHML)&&sd(e,t)}const ld="hidden",cd=8,hd=3;var T;(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"})(T||(T={}));const dd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wu=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),va={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Ba{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.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={...va,...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 vh(this.options,this),this.activeFormattingElements=new Yh(this.treeAdapter),this.fragmentContextID=r?$t(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new $h(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={...va,...n};t??(t=r.treeAdapter.createElement(y.TEMPLATE,M.HTML,[]));const i=r.treeAdapter.createElement("documentmock",M.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.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:dd,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)===M.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,M.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=fe.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)===y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==M.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=fe.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,M.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,M.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(y.HTML,M.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.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:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}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===Z.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===l.SVG&&this.treeAdapter.getTagName(n)===y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===M.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,M.HTML)}_processToken(t){switch(t.type){case Z.CHARACTER:{this.onCharacter(t);break}case Z.NULL_CHARACTER:{this.onNullCharacter(t);break}case Z.COMMENT:{this.onComment(t);break}case Z.DOCTYPE:{this.onDoctype(t);break}case Z.START_TAG:{this._processStartTag(t);break}case Z.END_TAG:{this.onEndTag(t);break}case Z.EOF:{this.onEof(t);break}case Z.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return od(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===qe.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=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return wu.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 l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===M.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.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 Rh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){$f(this,t);return}switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{on(this,t);break}case T.BEFORE_HEAD:{ln(this,t);break}case T.IN_HEAD:{cn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{hn(this,t);break}case T.AFTER_HEAD:{dn(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Ou(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_TABLE_TEXT:{Bu(this,t);break}case T.IN_COLUMN_GROUP:{Kn(this,t);break}case T.AFTER_BODY:{Zn(this,t);break}case T.AFTER_AFTER_BODY:{qn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{on(this,t);break}case T.BEFORE_HEAD:{ln(this,t);break}case T.IN_HEAD:{cn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{hn(this,t);break}case T.AFTER_HEAD:{dn(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_COLUMN_GROUP:{Kn(this,t);break}case T.AFTER_BODY:{Zn(this,t);break}case T.AFTER_AFTER_BODY:{qn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Jr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Jr(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.AFTER_BODY:{Td(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{xd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{kd(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,I.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,I.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Yf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{_d(this,t);break}case T.BEFORE_HEAD:{yd(this,t);break}case T.IN_HEAD:{ze(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Nd(this,t);break}case T.AFTER_HEAD:{wd(this,t);break}case T.IN_BODY:{ke(this,t);break}case T.IN_TABLE:{Ft(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_CAPTION:{Sf(this,t);break}case T.IN_COLUMN_GROUP:{Pi(this,t);break}case T.IN_TABLE_BODY:{fr(this,t);break}case T.IN_ROW:{pr(this,t);break}case T.IN_CELL:{wf(this,t);break}case T.IN_SELECT:{Uu(this,t);break}case T.IN_SELECT_IN_TABLE:{Of(this,t);break}case T.IN_TEMPLATE:{Df(this,t);break}case T.AFTER_BODY:{Mf(this,t);break}case T.IN_FRAMESET:{vf(this,t);break}case T.AFTER_FRAMESET:{Ff(this,t);break}case T.AFTER_AFTER_BODY:{Uf(this,t);break}case T.AFTER_AFTER_FRAMESET:{jf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?qf(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{Ad(this,t);break}case T.BEFORE_HEAD:{Cd(this,t);break}case T.IN_HEAD:{Sd(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Id(this,t);break}case T.AFTER_HEAD:{Ld(this,t);break}case T.IN_BODY:{dr(this,t);break}case T.TEXT:{gf(this,t);break}case T.IN_TABLE:{xn(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_CAPTION:{Nf(this,t);break}case T.IN_COLUMN_GROUP:{If(this,t);break}case T.IN_TABLE_BODY:{ei(this,t);break}case T.IN_ROW:{Hu(this,t);break}case T.IN_CELL:{Lf(this,t);break}case T.IN_SELECT:{ju(this,t);break}case T.IN_SELECT_IN_TABLE:{Rf(this,t);break}case T.IN_TEMPLATE:{Pf(this,t);break}case T.AFTER_BODY:{$u(this,t);break}case T.IN_FRAMESET:{Bf(this,t);break}case T.AFTER_FRAMESET:{Hf(this,t);break}case T.AFTER_AFTER_BODY:{qn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{on(this,t);break}case T.BEFORE_HEAD:{ln(this,t);break}case T.IN_HEAD:{cn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{hn(this,t);break}case T.AFTER_HEAD:{dn(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Mu(this,t);break}case T.TEXT:{Ef(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_TEMPLATE:{zu(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Di(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.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 T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Lu(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Nr(this,t);break}case T.IN_TABLE_TEXT:{vu(this,t);break}}}}function fd(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):Pu(e,t),n}function pd(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 md(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 u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=hd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=gd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function gd(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 Ed(e,t,n){const r=e.treeAdapter.getTagName(t),i=$t(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===M.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function bd(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 Ri(e,t){for(let n=0;n<cd;n++){const r=fd(e,t);if(!r)break;const i=pd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=md(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Ed(e,s,a),bd(e,i,r)}}function Jr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Td(e,t){e._appendCommentNode(t,e.openElements.items[0])}function xd(e,t){e._appendCommentNode(t,e.document)}function Di(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 kd(e,t){e._setDocumentType(t);const n=t.forceQuirks?De.QUIRKS:Kh(t);Xh(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Xt(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,De.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function _d(e,t){t.tagID===l.HTML?(e._insertElement(t,M.HTML),e.insertionMode=T.BEFORE_HEAD):on(e,t)}function Ad(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&on(e,t)}function on(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function yd(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.HEAD:{e._insertElement(t,M.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:ln(e,t)}}function Cd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?ln(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function ln(e,t){e._insertFakeElement(y.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function ze(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fe.RAWTEXT):(e._insertElement(t,M.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,fe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,I.misplacedStartTagForHeadElement);break}default:cn(e,t)}}function Sd(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{cn(e,t);break}case l.TEMPLATE:{Ct(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Ct(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,I.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,I.endTagWithoutMatchingOpenElement)}function cn(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Nd(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{ze(e,t);break}case l.NOSCRIPT:{e._err(t,I.nestedNoscriptInHead);break}default:hn(e,t)}}function Id(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{hn(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function hn(e,t){const n=t.type===Z.EOF?I.openElementsLeftAfterEof:I.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function wd(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.BODY:{e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,M.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,I.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),ze(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,I.misplacedStartTagForHeadElement);break}default:dn(e,t)}}function Ld(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{dn(e,t);break}case l.TEMPLATE:{Ct(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function dn(e,t){e._insertFakeElement(y.BODY,l.BODY),e.insertionMode=T.IN_BODY,hr(e,t)}function hr(e,t){switch(t.type){case Z.CHARACTER:{Ou(e,t);break}case Z.WHITESPACE_CHARACTER:{Lu(e,t);break}case Z.COMMENT:{Jr(e,t);break}case Z.START_TAG:{ke(e,t);break}case Z.END_TAG:{dr(e,t);break}case Z.EOF:{Mu(e,t);break}}}function Lu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ou(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Od(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Rd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Dd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,M.HTML),e.insertionMode=T.IN_FRAMESET)}function Pd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function Md(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Zr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,M.HTML)}function vd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Bd(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),n||(e.formElement=e.openElements.current))}function Fd(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===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML)}function Hd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.tokenizer.state=fe.PLAINTEXT}function Ud(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1}function jd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(y.A);n&&(Ri(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $d(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Ri(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,M.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Yd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function qd(e,t){e.treeAdapter.getDocumentMode(e.document)!==De.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Ru(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Du(e){const t=ku(e,bt.TYPE);return t!=null&&t.toLowerCase()===ld}function Vd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,M.HTML),Du(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Wd(e,t){e._appendElement(t,M.HTML),t.ackSelfClosing=!0}function Gd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,M.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qd(e,t){t.tagName=y.IMG,t.tagID=l.IMG,Ru(e,t)}function Xd(e,t){e._insertElement(t,M.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Kd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Zd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Fa(e,t){e._switchToTextParsing(t,fe.RAWTEXT)}function Jd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function ef(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function tf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,M.HTML)}function nf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,M.HTML)}function rf(e,t){e._reconstructActiveFormattingElements(),Nu(t),Oi(t),t.selfClosing?e._appendElement(t,M.MATHML):e._insertElement(t,M.MATHML),t.ackSelfClosing=!0}function af(e,t){e._reconstructActiveFormattingElements(),Iu(t),Oi(t),t.selfClosing?e._appendElement(t,M.SVG):e._insertElement(t,M.SVG),t.ackSelfClosing=!0}function Ha(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,M.HTML)}function ke(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{zd(e,t);break}case l.A:{jd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Md(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Pd(e,t);break}case l.LI:case l.DD:case l.DT:{Fd(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Ru(e,t);break}case l.HR:{Gd(e,t);break}case l.RB:case l.RTC:{tf(e,t);break}case l.RT:case l.RP:{nf(e,t);break}case l.PRE:case l.LISTING:{vd(e,t);break}case l.XMP:{Kd(e,t);break}case l.SVG:{af(e,t);break}case l.HTML:{Od(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{ze(e,t);break}case l.BODY:{Rd(e,t);break}case l.FORM:{Bd(e,t);break}case l.NOBR:{$d(e,t);break}case l.MATH:{rf(e,t);break}case l.TABLE:{qd(e,t);break}case l.INPUT:{Vd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Wd(e,t);break}case l.IMAGE:{Qd(e,t);break}case l.BUTTON:{Ud(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Yd(e,t);break}case l.IFRAME:{Zd(e,t);break}case l.SELECT:{Jd(e,t);break}case l.OPTION:case l.OPTGROUP:{ef(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Fa(e,t);break}case l.FRAMESET:{Dd(e,t);break}case l.TEXTAREA:{Xd(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Fa(e,t):Ha(e,t);break}case l.PLAINTEXT:{Hd(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Ha(e,t)}}function sf(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function uf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,$u(e,t))}function of(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function lf(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function cf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(y.P,l.P),e._closePElement()}function hf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function df(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ff(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function pf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function mf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(y.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Pu(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!==l.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 dr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Ri(e,t);break}case l.P:{cf(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{of(e,t);break}case l.LI:{hf(e);break}case l.DD:case l.DT:{df(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{ff(e);break}case l.BR:{mf(e);break}case l.BODY:{sf(e,t);break}case l.HTML:{uf(e,t);break}case l.FORM:{lf(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{pf(e,t);break}case l.TEMPLATE:{Ct(e,t);break}default:Pu(e,t)}}function Mu(e,t){e.tmplInsertionModeStack.length>0?zu(e,t):Di(e,t)}function gf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ef(e,t){e._err(t,I.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nr(e,t){if(e.openElements.currentTagId!==void 0&&wu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case Z.CHARACTER:{Bu(e,t);break}case Z.WHITESPACE_CHARACTER:{vu(e,t);break}}else Nn(e,t)}function bf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,M.HTML),e.insertionMode=T.IN_CAPTION}function Tf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function xf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Pi(e,t)}function kf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,M.HTML),e.insertionMode=T.IN_TABLE_BODY}function _f(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,fr(e,t)}function Af(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function yf(e,t){Du(t)?e._appendElement(t,M.HTML):Nn(e,t),t.ackSelfClosing=!0}function Cf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,M.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ft(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{_f(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{ze(e,t);break}case l.COL:{xf(e,t);break}case l.FORM:{Cf(e,t);break}case l.TABLE:{Af(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{kf(e,t);break}case l.INPUT:{yf(e,t);break}case l.CAPTION:{bf(e,t);break}case l.COLGROUP:{Tf(e,t);break}default:Nn(e,t)}}function xn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{Ct(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:Nn(e,t)}}function Nn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hr(e,t),e.fosterParentingEnabled=n}function vu(e,t){e.pendingCharacterTokens.push(t)}function Bu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Kt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Nn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Fu=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Sf(e,t){const n=t.tagID;Fu.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,Ft(e,t)):ke(e,t)}function Nf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&xn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:dr(e,t)}}function Pi(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.COL:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{ze(e,t);break}default:Kn(e,t)}}function If(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{Ct(e,t);break}case l.COL:break;default:Kn(e,t)}}function Kn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function fr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,M.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(y.TR,l.TR),e.insertionMode=T.IN_ROW,pr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,Ft(e,t));break}default:Ft(e,t)}}function ei(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,xn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:xn(e,t)}}function pr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,M.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,fr(e,t));break}default:Ft(e,t)}}function Hu(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ei(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ei(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:xn(e,t)}}function wf(e,t){const n=t.tagID;Fu.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),pr(e,t)):ke(e,t)}function Lf(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Hu(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:dr(e,t)}}function Uu(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,M.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{ze(e,t);break}}}function ju(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{Ct(e,t);break}}}function Of(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Uu(e,t)}function Rf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ju(e,t)}function Df(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{ze(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,Ft(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Pi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,fr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,pr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,ke(e,t)}}function Pf(e,t){t.tagID===l.TEMPLATE&&Ct(e,t)}function zu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Di(e,t)}function Mf(e,t){t.tagID===l.HTML?ke(e,t):Zn(e,t)}function $u(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.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 Zn(e,t)}function Zn(e,t){e.insertionMode=T.IN_BODY,hr(e,t)}function vf(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.FRAMESET:{e._insertElement(t,M.HTML);break}case l.FRAME:{e._appendElement(t,M.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{ze(e,t);break}}}function Bf(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function Ff(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function Hf(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function Uf(e,t){t.tagID===l.HTML?ke(e,t):qn(e,t)}function qn(e,t){e.insertionMode=T.IN_BODY,hr(e,t)}function jf(e,t){switch(t.tagID){case l.HTML:{ke(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function zf(e,t){t.chars=ce,e._insertCharacters(t)}function $f(e,t){e._insertCharacters(t),e.framesetOk=!1}function Yu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==M.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Yf(e,t){if(id(t))Yu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===M.MATHML?Nu(t):r===M.SVG&&(ad(t),Iu(t)),Oi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function qf(e,t){if(t.tagID===l.P||t.tagID===l.BR){Yu(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)===M.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}y.AREA,y.BASE,y.BASEFONT,y.BGSOUND,y.BR,y.COL,y.EMBED,y.FRAME,y.HR,y.IMG,y.INPUT,y.KEYGEN,y.LINK,y.META,y.PARAM,y.SOURCE,y.TRACK,y.WBR;const mr=qu("end"),Ve=qu("start");function qu(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 Vu(e){const t=Ve(e),n=mr(e);if(t&&n)return{start:t,end:n}}const Vf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Wf=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ua={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Wu(e,t){const n=r0(e),r=gu("type",{handlers:{root:Gf,element:Qf,text:Xf,comment:Qu,doctype:Kf,raw:Jf},unknown:e0}),i={parser:n?new Ba(Ua):Ba.getFragmentParser(void 0,Ua),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),Yt(i,Ve());const a=n?i.parser.document:i.parser.getFragment(),s=rh(a,{file:i.options.file});return i.stitches&&st(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Gu(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Gf(e,t){Gu(e.children,t)}function Qf(e,t){t0(e,t),Gu(e.children,t),n0(e,t)}function Xf(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Z.CHARACTER,chars:e.value,location:In(e)};Yt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Kf(e,t){const n={type:Z.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:In(e)};Yt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Zf(e,t){t.stitches=!0;const n=i0(e);if("children"in e&&"children"in n){const r=Wu({type:"root",children:e.children},t.options);n.children=r.children}Qu({type:"comment",value:{stitch:n}},t)}function Qu(e,t){const n=e.value,r={type:Z.COMMENT,data:n,location:In(e)};Yt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Jf(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,Xu(t,Ve(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Vf,"<$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 e0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Zf(n,t);else{let r="";throw Wf.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 Yt(e,t){Xu(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=fe.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 Xu(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 t0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fe.PLAINTEXT)return;Yt(t,Ve(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Et.html;i===Et.html&&n==="svg"&&(i=Et.svg);const a=oh({...e,children:[]},{space:i===Et.svg?"svg":"html"}),s={type:Z.START_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:In(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function n0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&gh.includes(n)||t.parser.tokenizer.state===fe.PLAINTEXT)return;Yt(t,mr(e));const r={type:Z.END_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:In(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fe.RCDATA||t.parser.tokenizer.state===fe.RAWTEXT||t.parser.tokenizer.state===fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=fe.DATA)}function r0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function In(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=mr(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 i0(e){return"children"in e?xt({...e,children:[]}):xt(e)}function ti(e){return function(t,n){return Wu(t,{...e,file:n})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],fn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...dt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...dt],h2:[["className","sr-only"]],img:[...dt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...dt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...dt],table:[...dt],ul:[...dt,["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"]},it={}.hasOwnProperty;function a0(e,t){let n={type:"root",children:[]};const r={schema:t?{...fn,...t}:fn,stack:[]},i=Ku(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Ku(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return s0(e,n);case"doctype":return u0(e,n);case"element":return o0(e,n);case"root":return l0(e,n);case"text":return c0(e,n)}}}function s0(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 wn(a,t),a}}function u0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wn(n,t),n}}function o0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Zu(e,t.children),i=h0(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&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(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 wn(s,t),s}function l0(e,t){const r={type:"root",children:Zu(e,t.children)};return wn(r,t),r}function c0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return wn(r,t),r}function Zu(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Ku(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function h0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&it.call(r,n)?r[n]:void 0,s=r&&it.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(it.call(u,c)){const h=u[c];let d=ja(e,za(a,c),c,h);d==null&&(d=ja(e,za(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&it.call(i,n)){const h=i[n];for(c in h)it.call(h,c)&&!it.call(o,c)&&(o[c]=h[c])}return o}function ja(e,t,n,r){return t?Array.isArray(r)?d0(e,t,n,r):Ju(e,t,n,r):void 0}function d0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=Ju(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Ju(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&f0(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 f0(e,t,n){const r=e.schema.protocols&&it.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("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function wn(e,t){const n=Vu(t);t.data&&(e.data=xt(t.data)),n&&(e.position=n)}function za(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 eo(e){return function(t){return a0(t,e)}}function $a(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 ye=lt(/[A-Za-z]/),xe=lt(/[\dA-Za-z]/),p0=lt(/[#-'*+\--9=?A-Z^-~]/);function Jn(e){return e!==null&&(e<32||e===127)}const ni=lt(/\d/),m0=lt(/[\dA-Fa-f]/),g0=lt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const gr=lt(new RegExp("\\p{P}|\\p{S}","u")),kt=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function E0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function b0(e,t,n){const i=ur((n||{}).ignore||[]),a=T0(t);let s=-1;for(;++s<a.length;)Ai(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],b=f?f.children:void 0;if(i(p,b?b.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let b=0;const N=d.children.indexOf(c);let A=!1,O=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const U=L.index,j={index:L.index,input:L.input,stack:[...h,c]};let w=p(...L,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=U+1:(b!==U&&O.push({type:"text",value:c.value.slice(b,U)}),Array.isArray(w)?O.push(...w):w&&O.push(w),b=U+L[0].length,A=!0),!f.global)break;L=f.exec(c.value)}return A?(b<c.value.length&&O.push({type:"text",value:c.value.slice(b)}),d.children.splice(N,1,...O)):O=[c],N+O.length}}function T0(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([x0(i[0]),k0(i[1])])}return t}function x0(e){return typeof e=="string"?new RegExp(E0(e),"g"):e}function k0(e){return typeof e=="function"?e:function(){return e}}const Ir="phrasing",wr=["autolink","link","image","label"];function _0(){return{transforms:[w0],enter:{literalAutolink:y0,literalAutolinkEmail:Lr,literalAutolinkHttp:Lr,literalAutolinkWww:Lr},exit:{literalAutolink:I0,literalAutolinkEmail:N0,literalAutolinkHttp:C0,literalAutolinkWww:S0}}}function A0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:wr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ir,notInConstruct:wr},{character:":",before:"[ps]",after:"\\/",inConstruct:Ir,notInConstruct:wr}]}}function y0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lr(e){this.config.enter.autolinkProtocol.call(this,e)}function C0(e){this.config.exit.autolinkProtocol.call(this,e)}function S0(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 N0(e){this.config.exit.autolinkEmail.call(this,e)}function I0(e){this.exit(e)}function w0(e){b0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,L0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),O0]],{ignore:["link","linkReference"]})}function L0(e,t,n,r,i){let a="";if(!to(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!R0(n)))return!1;const s=D0(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function O0(e,t,n,r){return!to(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function R0(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 D0(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=$a(e,"(");let a=$a(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 to(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||kt(n)||gr(n))&&(!t||n!==47)}function je(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}no.peek=z0;function P0(){this.buffer()}function M0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function v0(){this.buffer()}function B0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function F0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function H0(e){this.exit(e)}function U0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=je(this.sliceSerialize(e)).toLowerCase(),n.label=t}function j0(e){this.exit(e)}function z0(){return"["}function no(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function $0(){return{enter:{gfmFootnoteCallString:P0,gfmFootnoteCall:M0,gfmFootnoteDefinitionLabelString:v0,gfmFootnoteDefinition:B0},exit:{gfmFootnoteCallString:F0,gfmFootnoteCall:H0,gfmFootnoteDefinitionLabelString:U0,gfmFootnoteDefinition:j0}}}function Y0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:no},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
|
|
4
|
-
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?ro:q0))),c(),o}}function q0(e,t,n){return t===0?e:ro(e,t,n)}function ro(e,t,n){return(n?"":" ")+e}const V0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];io.peek=K0;function W0(){return{canContainEols:["delete"],enter:{strikethrough:Q0},exit:{strikethrough:X0}}}function G0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:V0}],handlers:{delete:io}}}function Q0(e){this.enter({type:"delete",children:[]},e)}function X0(e){this.exit(e)}function io(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 K0(){return"~"}function Z0(e){return e.length}function J0(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Z0,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-CyOCA4DG.js","assets/index-BLRui4ck.js","assets/index-BGvfX18x.css","assets/log-adapter-CeKrvZcz.js","assets/chevron-right-Cpp4WiwB.js","assets/chevron-down-BXQh2Wxh.js","assets/utils-CkSf8FUe.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{h as Ut,j as g,W as Zs,r as C,_ as Js,u as cc,R as vn,s as Ke,S as xe,C as mt,g as hc}from"./index-BLRui4ck.js";import{L as Ue,n as dc,c as fc,S as yr}from"./log-adapter-CeKrvZcz.js";import{C as ur}from"./chevron-right-Cpp4WiwB.js";import{C as _i,a as pc}from"./chevron-down-BXQh2Wxh.js";import{b as mc,a as gc}from"./utils-CkSf8FUe.js";const Ec=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],bc=Ut("circle-dot",Ec);const Tc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],fa=Ut("circle",Tc);const xc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],jx=Ut("globe",xc);const kc=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],zx=Ut("paperclip",kc);const _c=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$x=Ut("settings",_c);const Ac=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Yx=Ut("square",Ac),qx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("path",{d:"M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1z",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 1a7 7 0 0 0 0 14V1z",fill:"currentColor"})]}),Vx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.4"}),g.jsx("circle",{cx:"8",cy:"8",r:"3",fill:"currentColor"})]}),Wx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"})}),Gx=({className:e})=>g.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M13.5 4.5L6.5 11.5L2.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Qx=({className:e})=>g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M5.5 5.5L10.5 10.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),or=(function(e){if(e==null)return Nc;if(typeof e=="function")return lr(e);if(typeof e=="object")return Array.isArray(e)?yc(e):Cc(e);if(typeof e=="string")return Sc(e);throw new Error("Expected function, string, or object as test")});function yc(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=or(e[n]);return lr(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function Cc(e){const t=e;return lr(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Sc(e){return lr(t);function t(n){return n&&n.type===e}}function lr(e){return t;function t(n,r,i){return!!(Ic(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Nc(){return!0}function Ic(e){return e!==null&&typeof e=="object"&&"type"in e}const eu=[],an=!0,Wr=!1,Qn="skip";function Ai(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;u(e,void 0,[])();function u(o,c,h){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=eu,b,A,N;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=wc(n(o,h)),p[0]===Wr))return p;if("children"in o&&o.children){const _=o;if(_.children&&p[0]!==Qn)for(A=(r?_.children.length:-1)+s,N=h.concat(_);A>-1&&A<_.children.length;){const R=_.children[A];if(b=u(R,A,N)(),b[0]===Wr)return b;A=typeof b[1]=="number"?b[1]:A+s}}return p}}}function wc(e){return Array.isArray(e)?e:typeof e=="number"?[an,e]:e==null?eu:[e]}function st(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),Ai(e,a,u,i);function u(o,c){const h=c[c.length-1],d=h?h.children.indexOf(o):void 0;return s(o,d,h)}}function Lc({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"}){const u=t.length&&!t.every(c=>c==="*"),o=n.length&&!n.every(c=>c==="*");if(!e&&(u||o))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const h=Pc(e,t,n,r,i,a,s);st(c,h)}}function pa(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 Oc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Rc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Dc=new Set(["javascript:","data:","file:","vbscript:"]);function ma(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 h=e.substring(5);if(h&&h.length>0&&h!=="invalid")return e}}catch{return null}return null}const s=pa(e,n);if(!s||Dc.has(s.protocol)||!(Rc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Oc(e);return s&&t.some(c=>{const h=pa(c,n);return!h||h.origin!==s.origin?!1:s.href.startsWith(h.href)})?o?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:o?s.pathname+s.search+s.hash:s.href:null}const Cr=Symbol("node-seen"),Pc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[Cr])return an;if(o.tagName==="a"){const d=ma(o.properties.href,t,e,!1,!1,i);return d===null?(o[Cr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(o.properties.href),class:s},children:[...o.children,{type:"text",value:" [blocked]"}]}),Qn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",an)}if(o.tagName==="img"){const d=ma(o.properties.src,n,e,r,!0,i);return d===null?(o[Cr]=!0,st(o,u),h&&typeof c=="number"&&(h.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(o.properties.alt||"No description")+"]"}]}),Qn):(o.properties.src=d,an)}return an};return u},tu=-1,cr=0,on=1,Xn=2,yi=3,Ci=4,Si=5,Ni=6,nu=7,ru=8,ga=typeof self=="object"?self:globalThis,Mc=(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 cr:case tu:return n(s,i);case on:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Xn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case yi:return n(new Date(s),i);case Ci:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Si:{const u=n(new Map,i);for(const[o,c]of s)u.set(r(o),r(c));return u}case Ni:{const u=n(new Set,i);for(const o of s)u.add(r(o));return u}case nu:{const{name:u,message:o}=s;return n(new ga[u](o),i)}case ru: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:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new ga[a](s),i)};return r},Ea=e=>Mc(new Map,e)(0),Ot="",{toString:vc}={},{keys:Bc}=Object,Qt=e=>{const t=typeof e;if(t!=="object"||!e)return[cr,t];const n=vc.call(e).slice(8,-1);switch(n){case"Array":return[on,Ot];case"Object":return[Xn,Ot];case"Date":return[yi,Ot];case"RegExp":return[Ci,Ot];case"Map":return[Si,Ot];case"Set":return[Ni,Ot];case"DataView":return[on,n]}return n.includes("Array")?[on,n]:n.includes("Error")?[nu,n]:[Xn,n]},Bn=([e,t])=>e===cr&&(t==="function"||t==="symbol"),Fc=(e,t,n,r)=>{const i=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},a=s=>{if(n.has(s))return n.get(s);let[u,o]=Qt(s);switch(u){case cr:{let h=s;switch(o){case"bigint":u=ru,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([tu],s)}return i([u,h],s)}case on:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),i([o,[...f]],s)}const h=[],d=i([u,h],s);for(const f of s)h.push(a(f));return d}case Xn:{if(o)switch(o){case"BigInt":return i([o,s.toString()],s);case"Boolean":case"Number":case"String":return i([o,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const h=[],d=i([u,h],s);for(const f of Bc(s))(e||!Bn(Qt(s[f])))&&h.push([a(f),a(s[f])]);return d}case yi:return i([u,s.toISOString()],s);case Ci:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Si:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Bn(Qt(f))||Bn(Qt(p))))&&h.push([a(f),a(p)]);return d}case Ni:{const h=[],d=i([u,h],s);for(const f of s)(e||!Bn(Qt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},ba=(e,{json:t,lossy:n}={})=>{const r=[];return Fc(!(t||n),!!t,new Map,r)(e),r},xt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ea(ba(e,t)):structuredClone(e):(e,t)=>Ea(ba(e,t));class Sn{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Sn.prototype.normal={};Sn.prototype.property={};Sn.prototype.space=void 0;function iu(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sn(n,r,t)}function xn(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 Hc=0;const X=yt(),pe=yt(),Gr=yt(),v=yt(),le=yt(),vt=yt(),Oe=yt();function yt(){return 2**++Hc}const Qr=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:pe,commaOrSpaceSeparated:Oe,commaSeparated:vt,number:v,overloadedBoolean:Gr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),Sr=Object.keys(Qr);class Ii extends we{constructor(t,n,r,i){let a=-1;if(super(t,n),Ta(this,"space",i),typeof r=="number")for(;++a<Sr.length;){const s=Sr[a];Ta(this,Sr[a],(r&Qr[s])===Qr[s])}}}Ii.prototype.defined=!0;function Ta(e,t,n){n&&(e[t]=n)}function jt(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Ii(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[xn(r)]=r,n[xn(a.attribute)]=r}return new Sn(t,n,e.space)}const au=jt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:le,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:v,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:le,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:pe,ariaSetSize:v,ariaSort:null,ariaValueMax:v,ariaValueMin:v,ariaValueNow:v,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function su(e,t){return t in e?e[t]:t}function uu(e,t){return su(e,t.toLowerCase())}const Uc=jt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:vt,acceptCharset:le,accessKey:le,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:le,autoFocus:X,autoPlay:X,blocking:le,capture:null,charSet:null,checked:X,cite:null,className:le,cols:v,colSpan:null,content:null,contentEditable:pe,controls:X,controlsList:le,coords:v|vt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Gr,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:le,height:v,hidden:Gr,high:v,href:null,hrefLang:null,htmlFor:le,httpEquiv:le,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:le,itemRef:le,itemScope:X,itemType:le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:v,manifest:null,max:null,maxLength:v,media:null,method:null,min:null,minLength:v,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,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:X,optimum:v,pattern:null,ping:le,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:le,required:X,reversed:X,rows:v,rowSpan:v,sandbox:le,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:v,sizes:null,slot:null,span:v,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:v,step:null,style:null,tabIndex:v,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:pe,width:v,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:le,axis:null,background:null,bgColor:null,border:v,borderColor:null,bottomMargin:v,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:v,leftMargin:v,link:null,longDesc:null,lowSrc:null,marginHeight:v,marginWidth:v,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:v,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:v,valueType:null,version:null,vAlign:null,vLink:null,vSpace:v,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:v,security:null,unselectable:null},space:"html",transform:uu}),jc=jt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Oe,accentHeight:v,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:v,amplitude:v,arabicForm:null,ascent:v,attributeName:null,attributeType:null,azimuth:v,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:v,by:null,calcMode:null,capHeight:v,className:le,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:v,diffuseConstant:v,direction:null,display:null,dur:null,divisor:v,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:v,enableBackground:null,end:null,event:null,exponent:v,externalResourcesRequired:null,fill:null,fillOpacity:v,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:vt,g2:vt,glyphName:vt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:v,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:v,horizOriginX:v,horizOriginY:v,id:null,ideographic:v,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:v,k:v,k1:v,k2:v,k3:v,k4:v,kernelMatrix:Oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:v,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:v,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:v,overlineThickness:v,paintOrder:null,panose1:null,path:null,pathLength:v,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:v,pointsAtY:v,pointsAtZ:v,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Oe,rev:Oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Oe,requiredFeatures:Oe,requiredFonts:Oe,requiredFormats:Oe,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:v,specularExponent:v,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:v,strikethroughThickness:v,string:null,stroke:null,strokeDashArray:Oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:v,strokeOpacity:v,strokeWidth:null,style:null,surfaceScale:v,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Oe,tabIndex:v,tableValues:null,target:null,targetX:v,targetY:v,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:v,underlineThickness:v,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:v,values:null,vAlphabetic:v,vMathematical:v,vectorEffect:null,vHanging:v,vIdeographic:v,version:null,vertAdvY:v,vertOriginX:v,vertOriginY:v,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:v,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:su}),ou=jt({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()}}),lu=jt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:uu}),cu=jt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),zc={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"},$c=/[A-Z]/g,xa=/-[a-z]/g,Yc=/^data[-\w.:]+$/i;function hr(e,t){const n=xn(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"&&Yc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(xa,Vc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!xa.test(a)){let s=a.replace($c,qc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ii}return new i(r,t)}function qc(e){return"-"+e.toLowerCase()}function Vc(e){return e.charAt(1).toUpperCase()}const Nn=iu([au,Uc,ou,lu,cu],"html"),ot=iu([au,jc,ou,lu,cu],"svg");function ka(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 hu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _a=/[#.]/g;function Wc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){_a.lastIndex=i;const u=_a.exec(n),o=n.slice(i,u?u.index:n.length);o&&(a?a==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,i+=o.length),u&&(a=u[0],i++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Aa(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function du(e){return e.join(" ").trim()}function fu(e,t,n){const r=n?Kc(n):void 0;function i(a,s,...u){let o;if(a==null){o={type:"root",children:[]};const c=s;u.unshift(c)}else{o=Wc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Gc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))Qc(e,o.properties,d,f)}for(const c of u)Xr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Gc(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 Qc(e,t,n,r){const i=hr(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=Aa(r):i.commaSeparated?a=ka(r):i.commaOrSpaceSeparated?a=Aa(ka(r).join(" ")):a=ya(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?Xc(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(ya(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Xr(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)Xr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Xr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ya(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||xn(n)===xn(t)))return!0}return n}function Xc(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Kc(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Zc=["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"],Jc=fu(Nn,"div"),eh=fu(ot,"g",Zc);function th(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 u=n[s];if(u===void 0){const o=Ca(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>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 u=n[n.length-1],o=Ca(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const s=(a.line>1?n[a.line-2]:0)+a.column-1;if(s<n[a.line-1])return s}}}function Ca(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
3
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Et={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/"},pu={}.hasOwnProperty,nh=Object.prototype;function rh(e,t){const n=t||{};return wi({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:Nn,verbose:n.verbose||!1},e)}function wi(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},qn(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:mu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=th(a),u=s.toPoint(0),o=s.toPoint(a.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},qn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},qn(e,r,n),n}default:return n=ih(e,t),n}}function mu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=wi(e,t[n]);r.push(i)}return r}function ih(e,t){const n=e.schema;e.schema=t.namespaceURI===Et.svg?ot:Nn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;pu.call(nh,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?eh:Jc)(t.tagName,i,mu(e,t.childNodes));if(qn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Pt(o.startTag),h=o&&o.endTag&&Pt(o.endTag),d=wi(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function qn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ah(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ah(e,t,n){const r=Pt(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)pu.call(n.attrs,s)&&(a[hr(e.schema,s).property]=Pt(n.attrs[s]));n.startTag;const u=Pt(n.startTag),o=n.endTag?Pt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Pt(e){const t=Sa({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Sa({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Sa(e){return e.line&&e.column?e:void 0}const Na={}.hasOwnProperty;function gu(e,t){const n=t||{};function r(i,...a){let s=r.invalid;const u=r.handlers;if(i&&Na.call(i,e)){const o=String(i[e]);s=Na.call(u,o)?u[o]: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 sh={},uh={}.hasOwnProperty,Eu=gu("type",{handlers:{root:lh,element:ph,text:dh,comment:fh,doctype:hh}});function oh(e,t){const r=(t||sh).space;return Eu(e,r==="svg"?ot:Nn)}function lh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Li(e.children,n,t),zt(e,n),n}function ch(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Li(e.children,n,t),zt(e,n),n}function hh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return zt(e,t),t}function dh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return zt(e,t),t}function fh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return zt(e,t),t}function ph(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ot);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&uh.call(e.properties,a)){const o=mh(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Et[s],childNodes:[],parentNode:null};return u.childNodes=Li(e.children,u,r),zt(e,u),e.tagName==="template"&&e.content&&(u.content=ch(e.content,r)),u}function mh(e,t,n){const r=hr(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?hu(n):du(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=Et[r.space]}return i}function Li(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Eu(e[r],n);a.parentNode=t,i.push(a)}return i}function zt(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 gh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Eh=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]),ce="�";var m;(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"})(m||(m={}));const Ne={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function bu(e){return e>=55296&&e<=57343}function bh(e){return e>=56320&&e<=57343}function Th(e,t){return(e-55296)*1024+9216+t}function Tu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function xu(e){return e>=64976&&e<=65007||Eh.has(e)}var I;(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"})(I||(I={}));const xh=65536;class kh{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=xh,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,u=a+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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(bh(n))return this.pos++,this._addGap(),Th(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,m.EOF;return this._err(I.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,m.EOF;const r=this.html.charCodeAt(n);return r===m.CARRIAGE_RETURN?m.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,m.EOF;let t=this.html.charCodeAt(this.pos);return t===m.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,m.LINE_FEED):t===m.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,bu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===m.LINE_FEED||t===m.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Tu(t)?this._err(I.controlCharacterInInputStream):xu(t)&&this._err(I.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var K;(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"})(K||(K={}));function ku(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 _h=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))),Ah=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 yh(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Ah.get(e))!==null&&t!==void 0?t:e}var be;(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"})(be||(be={}));const Ch=32;var at;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(at||(at={}));function Kr(e){return e>=be.ZERO&&e<=be.NINE}function Sh(e){return e>=be.UPPER_A&&e<=be.UPPER_F||e>=be.LOWER_A&&e<=be.LOWER_F}function Nh(e){return e>=be.UPPER_A&&e<=be.UPPER_Z||e>=be.LOWER_A&&e<=be.LOWER_Z||Kr(e)}function Ih(e){return e===be.EQUALS||Nh(e)}var Ee;(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"})(Ee||(Ee={}));var Ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ze||(Ze={}));class wh{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Ee.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ze.Strict}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===be.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Ch)===be.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.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(Kr(i)||Sh(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(Kr(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===be.SEMI)this.consumed+=1;else if(this.decodeMode===Ze.Strict)return 0;return this.emitCodePoint(yh(this.result),this.consumed),this.errors&&(t!==be.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&at.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Lh(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ze.Attribute&&(a===0||Ih(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14,a!==0){if(s===be.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ze.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]&at.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]&~at.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==Ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function Lh(e,t,n,r){const i=(t&at.BRANCH_LENGTH)>>7,a=t&at.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const o=r-a;return o<0||o>=i?-1:e[n+o]-1}let s=n,u=s+i-1;for(;s<=u;){const o=s+u>>>1,c=e[o];if(c<r)s=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var P;(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/"})(P||(P={}));var bt;(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"})(bt||(bt={}));var Me;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Me||(Me={}));var y;(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"})(y||(y={}));var l;(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"})(l||(l={}));const Oh=new Map([[y.A,l.A],[y.ADDRESS,l.ADDRESS],[y.ANNOTATION_XML,l.ANNOTATION_XML],[y.APPLET,l.APPLET],[y.AREA,l.AREA],[y.ARTICLE,l.ARTICLE],[y.ASIDE,l.ASIDE],[y.B,l.B],[y.BASE,l.BASE],[y.BASEFONT,l.BASEFONT],[y.BGSOUND,l.BGSOUND],[y.BIG,l.BIG],[y.BLOCKQUOTE,l.BLOCKQUOTE],[y.BODY,l.BODY],[y.BR,l.BR],[y.BUTTON,l.BUTTON],[y.CAPTION,l.CAPTION],[y.CENTER,l.CENTER],[y.CODE,l.CODE],[y.COL,l.COL],[y.COLGROUP,l.COLGROUP],[y.DD,l.DD],[y.DESC,l.DESC],[y.DETAILS,l.DETAILS],[y.DIALOG,l.DIALOG],[y.DIR,l.DIR],[y.DIV,l.DIV],[y.DL,l.DL],[y.DT,l.DT],[y.EM,l.EM],[y.EMBED,l.EMBED],[y.FIELDSET,l.FIELDSET],[y.FIGCAPTION,l.FIGCAPTION],[y.FIGURE,l.FIGURE],[y.FONT,l.FONT],[y.FOOTER,l.FOOTER],[y.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[y.FORM,l.FORM],[y.FRAME,l.FRAME],[y.FRAMESET,l.FRAMESET],[y.H1,l.H1],[y.H2,l.H2],[y.H3,l.H3],[y.H4,l.H4],[y.H5,l.H5],[y.H6,l.H6],[y.HEAD,l.HEAD],[y.HEADER,l.HEADER],[y.HGROUP,l.HGROUP],[y.HR,l.HR],[y.HTML,l.HTML],[y.I,l.I],[y.IMG,l.IMG],[y.IMAGE,l.IMAGE],[y.INPUT,l.INPUT],[y.IFRAME,l.IFRAME],[y.KEYGEN,l.KEYGEN],[y.LABEL,l.LABEL],[y.LI,l.LI],[y.LINK,l.LINK],[y.LISTING,l.LISTING],[y.MAIN,l.MAIN],[y.MALIGNMARK,l.MALIGNMARK],[y.MARQUEE,l.MARQUEE],[y.MATH,l.MATH],[y.MENU,l.MENU],[y.META,l.META],[y.MGLYPH,l.MGLYPH],[y.MI,l.MI],[y.MO,l.MO],[y.MN,l.MN],[y.MS,l.MS],[y.MTEXT,l.MTEXT],[y.NAV,l.NAV],[y.NOBR,l.NOBR],[y.NOFRAMES,l.NOFRAMES],[y.NOEMBED,l.NOEMBED],[y.NOSCRIPT,l.NOSCRIPT],[y.OBJECT,l.OBJECT],[y.OL,l.OL],[y.OPTGROUP,l.OPTGROUP],[y.OPTION,l.OPTION],[y.P,l.P],[y.PARAM,l.PARAM],[y.PLAINTEXT,l.PLAINTEXT],[y.PRE,l.PRE],[y.RB,l.RB],[y.RP,l.RP],[y.RT,l.RT],[y.RTC,l.RTC],[y.RUBY,l.RUBY],[y.S,l.S],[y.SCRIPT,l.SCRIPT],[y.SEARCH,l.SEARCH],[y.SECTION,l.SECTION],[y.SELECT,l.SELECT],[y.SOURCE,l.SOURCE],[y.SMALL,l.SMALL],[y.SPAN,l.SPAN],[y.STRIKE,l.STRIKE],[y.STRONG,l.STRONG],[y.STYLE,l.STYLE],[y.SUB,l.SUB],[y.SUMMARY,l.SUMMARY],[y.SUP,l.SUP],[y.TABLE,l.TABLE],[y.TBODY,l.TBODY],[y.TEMPLATE,l.TEMPLATE],[y.TEXTAREA,l.TEXTAREA],[y.TFOOT,l.TFOOT],[y.TD,l.TD],[y.TH,l.TH],[y.THEAD,l.THEAD],[y.TITLE,l.TITLE],[y.TR,l.TR],[y.TRACK,l.TRACK],[y.TT,l.TT],[y.U,l.U],[y.UL,l.UL],[y.SVG,l.SVG],[y.VAR,l.VAR],[y.WBR,l.WBR],[y.XMP,l.XMP]]);function $t(e){var t;return(t=Oh.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const M=l,Rh={[P.HTML]:new Set([M.ADDRESS,M.APPLET,M.AREA,M.ARTICLE,M.ASIDE,M.BASE,M.BASEFONT,M.BGSOUND,M.BLOCKQUOTE,M.BODY,M.BR,M.BUTTON,M.CAPTION,M.CENTER,M.COL,M.COLGROUP,M.DD,M.DETAILS,M.DIR,M.DIV,M.DL,M.DT,M.EMBED,M.FIELDSET,M.FIGCAPTION,M.FIGURE,M.FOOTER,M.FORM,M.FRAME,M.FRAMESET,M.H1,M.H2,M.H3,M.H4,M.H5,M.H6,M.HEAD,M.HEADER,M.HGROUP,M.HR,M.HTML,M.IFRAME,M.IMG,M.INPUT,M.LI,M.LINK,M.LISTING,M.MAIN,M.MARQUEE,M.MENU,M.META,M.NAV,M.NOEMBED,M.NOFRAMES,M.NOSCRIPT,M.OBJECT,M.OL,M.P,M.PARAM,M.PLAINTEXT,M.PRE,M.SCRIPT,M.SECTION,M.SELECT,M.SOURCE,M.STYLE,M.SUMMARY,M.TABLE,M.TBODY,M.TD,M.TEMPLATE,M.TEXTAREA,M.TFOOT,M.TH,M.THEAD,M.TITLE,M.TR,M.TRACK,M.UL,M.WBR,M.XMP]),[P.MATHML]:new Set([M.MI,M.MO,M.MN,M.MS,M.MTEXT,M.ANNOTATION_XML]),[P.SVG]:new Set([M.TITLE,M.FOREIGN_OBJECT,M.DESC]),[P.XLINK]:new Set,[P.XML]:new Set,[P.XMLNS]:new Set},Zr=new Set([M.H1,M.H2,M.H3,M.H4,M.H5,M.H6]);y.STYLE,y.SCRIPT,y.XMP,y.IFRAME,y.NOEMBED,y.NOFRAMES,y.PLAINTEXT;var E;(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"})(E||(E={}));const fe={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Dh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function sn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Ph(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function nt(e){return Ph(e)||sn(e)}function Ia(e){return nt(e)||Dh(e)}function Fn(e){return e+32}function _u(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function wa(e){return _u(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Mh(e){return e===m.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:bu(e)?I.surrogateCharacterReference:xu(e)?I.noncharacterCharacterReference:Tu(e)||e===m.CARRIAGE_RETURN?I.controlCharacterReference:null}class vh{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=E.DATA,this.returnState=E.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kh(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new wh(_h,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(I.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(I.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=Mh(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:K.START_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:K.END_TAG,tagName:"",tagID:l.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:K.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:K.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(ku(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(I.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=$t(t.tagName),t.type===K.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(I.endTagWithAttributes),t.selfClosing&&this._err(I.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 K.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case K.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case K.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:K.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=_u(t)?K.WHITESPACE_CHARACTER:t===m.NULL?K.NULL_CHARACTER:K.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(K.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=E.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ze.Attribute:Ze.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===E.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===E.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case E.DATA:{this._stateData(t);break}case E.RCDATA:{this._stateRcdata(t);break}case E.RAWTEXT:{this._stateRawtext(t);break}case E.SCRIPT_DATA:{this._stateScriptData(t);break}case E.PLAINTEXT:{this._statePlaintext(t);break}case E.TAG_OPEN:{this._stateTagOpen(t);break}case E.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case E.TAG_NAME:{this._stateTagName(t);break}case E.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case E.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case E.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case E.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case E.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case E.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case E.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case E.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case E.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case E.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case E.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case E.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case E.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case E.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case E.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case E.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case E.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case E.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case E.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case E.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case E.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case E.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case E.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case E.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case E.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case E.BOGUS_COMMENT:{this._stateBogusComment(t);break}case E.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case E.COMMENT_START:{this._stateCommentStart(t);break}case E.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case E.COMMENT:{this._stateComment(t);break}case E.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case E.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case E.COMMENT_END:{this._stateCommentEnd(t);break}case E.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case E.DOCTYPE:{this._stateDoctype(t);break}case E.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case E.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case E.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case E.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case E.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case E.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case E.CDATA_SECTION:{this._stateCdataSection(t);break}case E.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case E.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case E.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case E.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.TAG_OPEN;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitCodePoint(t);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case m.AMPERSAND:{this._startCharacterReference();break}case m.LESS_THAN_SIGN:{this.state=E.RCDATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.RAWTEXT_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(nt(t))this._createStartTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.EXCLAMATION_MARK:{this.state=E.MARKUP_DECLARATION_OPEN;break}case m.SOLIDUS:{this.state=E.END_TAG_OPEN;break}case m.QUESTION_MARK:{this._err(I.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t);break}case m.EOF:{this._err(I.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(I.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=E.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(nt(t))this._createEndTagToken(),this.state=E.TAG_NAME,this._stateTagName(t);else switch(t){case m.GREATER_THAN_SIGN:{this._err(I.missingEndTagName),this.state=E.DATA;break}case m.EOF:{this._err(I.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(I.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.tagName+=ce;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(sn(t)?Fn(t):t)}}_stateRcdataLessThanSign(t){t===m.SOLIDUS?this.state=E.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){nt(t)?(this.state=E.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=E.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=E.BEFORE_ATTRIBUTE_NAME,!1;case m.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=E.SELF_CLOSING_START_TAG,!1;case m.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=E.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===m.SOLIDUS?this.state=E.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){nt(t)?(this.state=E.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case m.SOLIDUS:{this.state=E.SCRIPT_DATA_END_TAG_OPEN;break}case m.EXCLAMATION_MARK:{this.state=E.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=E.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){nt(t)?(this.state=E.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===m.HYPHEN_MINUS?(this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=E.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===m.SOLIDUS?this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:nt(t)?(this._emitChars("<"),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){nt(t)?(this.state=E.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&wa(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case m.HYPHEN_MINUS:{this._emitChars("-");break}case m.LESS_THAN_SIGN:{this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case m.GREATER_THAN_SIGN:{this.state=E.SCRIPT_DATA,this._emitChars(">");break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ce);break}case m.EOF:{this._err(I.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===m.SOLIDUS?(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ne.SCRIPT,!1)&&wa(this.preprocessor.peek(Ne.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ne.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=E.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=E.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._err(I.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=E.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:case m.SOLIDUS:case m.GREATER_THAN_SIGN:case m.EOF:{this._leaveAttrName(),this.state=E.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case m.EQUALS_SIGN:{this._leaveAttrName(),this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:{this._err(I.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.name+=ce;break}default:this.currentAttr.name+=String.fromCodePoint(sn(t)?Fn(t):t)}}_stateAfterAttributeName(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.SOLIDUS:{this.state=E.SELF_CLOSING_START_TAG;break}case m.EQUALS_SIGN:{this.state=E.BEFORE_ATTRIBUTE_VALUE;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=E.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{this.state=E.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this.state=E.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingAttributeValue),this.state=E.DATA,this.emitCurrentTagToken();break}default:this.state=E.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case m.APOSTROPHE:{this.state=E.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.AMPERSAND:{this._startCharacterReference();break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),this.currentAttr.value+=ce;break}case m.QUOTATION_MARK:case m.APOSTROPHE:case m.LESS_THAN_SIGN:case m.EQUALS_SIGN:case m.GRAVE_ACCENT:{this._err(I.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this._leaveAttrValue(),this.state=E.BEFORE_ATTRIBUTE_NAME;break}case m.SOLIDUS:{this._leaveAttrValue(),this.state=E.SELF_CLOSING_START_TAG;break}case m.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBetweenAttributes),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case m.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=E.DATA,this.emitCurrentTagToken();break}case m.EOF:{this._err(I.eofInTag),this._emitEOFToken();break}default:this._err(I.unexpectedSolidusInTag),this.state=E.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.data+=ce;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ne.DASH_DASH,!0)?(this._createCommentToken(Ne.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Ne.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ne.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Ne.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(I.cdataInHtmlContent),this._createCommentToken(Ne.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=E.BOGUS_COMMENT):this._ensureHibernation()||(this._err(I.incorrectlyOpenedComment),this._createCommentToken(2),this.state=E.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_START_DASH;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=E.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptClosingOfEmptyComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END_DASH;break}case m.LESS_THAN_SIGN:{n.data+="<",this.state=E.COMMENT_LESS_THAN_SIGN;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.data+=ce;break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case m.EXCLAMATION_MARK:{n.data+="!",this.state=E.COMMENT_LESS_THAN_SIGN_BANG;break}case m.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=E.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=E.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===m.HYPHEN_MINUS?this.state=E.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=E.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==m.GREATER_THAN_SIGN&&t!==m.EOF&&this._err(I.nestedComment),this.state=E.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{this.state=E.COMMENT_END;break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentComment(n);break}case m.EXCLAMATION_MARK:{this.state=E.COMMENT_END_BANG;break}case m.HYPHEN_MINUS:{n.data+="-";break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=E.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case m.HYPHEN_MINUS:{n.data+="--!",this.state=E.COMMENT_END_DASH;break}case m.GREATER_THAN_SIGN:{this._err(I.incorrectlyClosedComment),this.state=E.DATA,this.emitCurrentComment(n);break}case m.EOF:{this._err(I.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=E.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case m.EOF:{this._err(I.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingWhitespaceBeforeDoctypeName),this.state=E.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(sn(t))this._createDoctypeToken(String.fromCharCode(Fn(t))),this.state=E.DOCTYPE_NAME;else switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.NULL:{this._err(I.unexpectedNullCharacter),this._createDoctypeToken(ce),this.state=E.DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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=E.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.AFTER_DOCTYPE_NAME;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.name+=ce;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(sn(t)?Fn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ne.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ne.SYSTEM,!1)?this.state=E.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(I.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.publicId="",this.state=E.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.publicId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.publicId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case m.GREATER_THAN_SIGN:{this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:{this.state=E.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.QUOTATION_MARK:{this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{this._err(I.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.QUOTATION_MARK:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case m.APOSTROPHE:{n.systemId="",this.state=E.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case m.GREATER_THAN_SIGN:{this._err(I.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.DATA,this.emitCurrentDoctype(n);break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case m.QUOTATION_MARK:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.systemId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.APOSTROPHE:{this.state=E.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case m.NULL:{this._err(I.unexpectedNullCharacter),n.systemId+=ce;break}case m.GREATER_THAN_SIGN:{this._err(I.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.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 m.SPACE:case m.LINE_FEED:case m.TABULATION:case m.FORM_FEED:break;case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.EOF:{this._err(I.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(I.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=E.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case m.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=E.DATA;break}case m.NULL:{this._err(I.unexpectedNullCharacter);break}case m.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case m.RIGHT_SQUARE_BRACKET:{this.state=E.CDATA_SECTION_BRACKET;break}case m.EOF:{this._err(I.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===m.RIGHT_SQUARE_BRACKET?this.state=E.CDATA_SECTION_END:(this._emitChars("]"),this.state=E.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case m.GREATER_THAN_SIGN:{this.state=E.DATA;break}case m.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=E.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(m.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ia(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ia(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Au=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),La=new Set([...Au,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Kn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),Bh=new Set([...Kn,l.OL,l.UL]),Fh=new Set([...Kn,l.BUTTON]),Oa=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Ra=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),Hh=new Set([l.TR,l.TEMPLATE,l.HTML]),Uh=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),jh=new Set([l.TABLE,l.TEMPLATE,l.HTML]),zh=new Set([l.TD,l.TH]);class $h{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=l.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===l.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===P.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])!==P.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(Zr,P.HTML)}popUntilTableCellPopped(){this.popUntilPopped(zh,P.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(jh,P.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Uh,P.HTML)}clearBackToTableRowContext(){this.clearBackTo(Hh,P.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]===l.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]===l.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 P.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case P.SVG:{if(Ra.has(i))return!1;break}case P.MATHML:{if(Oa.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Kn)}hasInListItemScope(t){return this.hasInDynamicScope(t,Bh)}hasInButtonScope(t){return this.hasInDynamicScope(t,Fh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case P.HTML:{if(Zr.has(n))return!0;if(Kn.has(n))return!1;break}case P.SVG:{if(Ra.has(n))return!1;break}case P.MATHML:{if(Oa.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===P.HTML)switch(this.tagIDs[t]){case l.TBODY:case l.THEAD:case l.TFOOT:return!0;case l.TABLE:case l.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===P.HTML)switch(this.tagIDs[n]){case t:return!0;case l.OPTION:case l.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Au.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&La.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&La.has(this.currentTagId);)this.pop()}}const Nr=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const Da={type:qe.Marker};class Yh{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 u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===qe.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const h=this.treeAdapter.getAttrList(c);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Nr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Nr)return;const i=new Map(n.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>i.get(o.name)===o.value)&&(a+=1,a>=Nr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Da)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:qe.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:qe.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(Da);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===qe.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===qe.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===qe.Element&&n.element===t)}}const rt={createDocument(){return{nodeName:"#document",mode:Me.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};rt.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(rt.isTextNode(n)){n.value+=t;return}}rt.appendChild(e,rt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&rt.isTextNode(r)?r.value+=t:rt.insertBefore(e,rt.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}}},yu="html",qh="about:legacy-compat",Vh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Cu=["+//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//"],Wh=[...Cu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Gh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Su=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Qh=[...Su,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Pa(e,t){return t.some(n=>e.startsWith(n))}function Xh(e){return e.name===yu&&e.publicId===null&&(e.systemId===null||e.systemId===qh)}function Kh(e){if(e.name!==yu)return Me.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Vh)return Me.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Gh.has(n))return Me.QUIRKS;let r=t===null?Wh:Cu;if(Pa(n,r))return Me.QUIRKS;if(r=t===null?Su:Qh,Pa(n,r))return Me.LIMITED_QUIRKS}return Me.NO_QUIRKS}const Ma={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Zh="definitionurl",Jh="definitionURL",ed=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])),td=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:P.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:P.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:P.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:P.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:P.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:P.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:P.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:P.XML}],["xml:space",{prefix:"xml",name:"space",namespace:P.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:P.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:P.XMLNS}]]),nd=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])),rd=new Set([l.B,l.BIG,l.BLOCKQUOTE,l.BODY,l.BR,l.CENTER,l.CODE,l.DD,l.DIV,l.DL,l.DT,l.EM,l.EMBED,l.H1,l.H2,l.H3,l.H4,l.H5,l.H6,l.HEAD,l.HR,l.I,l.IMG,l.LI,l.LISTING,l.MENU,l.META,l.NOBR,l.OL,l.P,l.PRE,l.RUBY,l.S,l.SMALL,l.SPAN,l.STRONG,l.STRIKE,l.SUB,l.SUP,l.TABLE,l.TT,l.U,l.UL,l.VAR]);function id(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===bt.COLOR||r===bt.SIZE||r===bt.FACE)||rd.has(t)}function Nu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Zh){e.attrs[t].name=Jh;break}}function Iu(e){for(let t=0;t<e.attrs.length;t++){const n=ed.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Oi(e){for(let t=0;t<e.attrs.length;t++){const n=td.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 ad(e){const t=nd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=$t(e.tagName))}function sd(e,t){return t===P.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function ud(e,t,n){if(t===P.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===bt.ENCODING){const i=n[r].value.toLowerCase();return i===Ma.TEXT_HTML||i===Ma.APPLICATION_XML}}return t===P.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function od(e,t,n,r){return(!r||r===P.HTML)&&ud(e,t,n)||(!r||r===P.MATHML)&&sd(e,t)}const ld="hidden",cd=8,hd=3;var T;(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"})(T||(T={}));const dd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wu=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),va={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class Ba{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=T.INITIAL,this.originalInsertionMode=T.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={...va,...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 vh(this.options,this),this.activeFormattingElements=new Yh(this.treeAdapter),this.fragmentContextID=r?$t(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new $h(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={...va,...n};t??(t=r.treeAdapter.createElement(y.TEMPLATE,P.HTML,[]));const i=r.treeAdapter.createElement("documentmock",P.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===l.TEMPLATE&&a.tmplInsertionModeStack.unshift(T.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:dd,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)===P.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,P.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=T.TEXT}switchToPlaintextParsing(){this.insertionMode=T.TEXT,this.originalInsertionMode=T.IN_BODY,this.tokenizer.state=fe.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)===y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==P.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=fe.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=fe.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=fe.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=fe.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(u=>this.treeAdapter.isDocumentTypeNode(u));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,P.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,P.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(y.HTML,P.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,l.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:o,endCol:c,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:c,endOffset:h})}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===K.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===l.SVG&&this.treeAdapter.getTagName(n)===y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===P.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,P.HTML)}_processToken(t){switch(t.type){case K.CHARACTER:{this.onCharacter(t);break}case K.NULL_CHARACTER:{this.onNullCharacter(t);break}case K.COMMENT:{this.onComment(t);break}case K.DOCTYPE:{this.onDoctype(t);break}case K.START_TAG:{this._processStartTag(t);break}case K.END_TAG:{this.onEndTag(t);break}case K.EOF:{this.onEof(t);break}case K.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return od(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===qe.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=T.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(l.P),this.openElements.popUntilTagNamePopped(l.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case l.TR:{this.insertionMode=T.IN_ROW;return}case l.TBODY:case l.THEAD:case l.TFOOT:{this.insertionMode=T.IN_TABLE_BODY;return}case l.CAPTION:{this.insertionMode=T.IN_CAPTION;return}case l.COLGROUP:{this.insertionMode=T.IN_COLUMN_GROUP;return}case l.TABLE:{this.insertionMode=T.IN_TABLE;return}case l.BODY:{this.insertionMode=T.IN_BODY;return}case l.FRAMESET:{this.insertionMode=T.IN_FRAMESET;return}case l.SELECT:{this._resetInsertionModeForSelect(t);return}case l.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case l.HTML:{this.insertionMode=this.headElement?T.AFTER_HEAD:T.BEFORE_HEAD;return}case l.TD:case l.TH:{if(t>0){this.insertionMode=T.IN_CELL;return}break}case l.HEAD:{if(t>0){this.insertionMode=T.IN_HEAD;return}break}}this.insertionMode=T.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===l.TEMPLATE)break;if(r===l.TABLE){this.insertionMode=T.IN_SELECT_IN_TABLE;return}}this.insertionMode=T.IN_SELECT}_isElementCausesFosterParenting(t){return wu.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 l.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===P.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case l.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 Rh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){$f(this,t);return}switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{ln(this,t);break}case T.BEFORE_HEAD:{cn(this,t);break}case T.IN_HEAD:{hn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{dn(this,t);break}case T.AFTER_HEAD:{fn(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Ou(this,t);break}case T.TEXT:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ir(this,t);break}case T.IN_TABLE_TEXT:{Bu(this,t);break}case T.IN_COLUMN_GROUP:{Zn(this,t);break}case T.AFTER_BODY:{Jn(this,t);break}case T.AFTER_AFTER_BODY:{Vn(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{ln(this,t);break}case T.BEFORE_HEAD:{cn(this,t);break}case T.IN_HEAD:{hn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{dn(this,t);break}case T.AFTER_HEAD:{fn(this,t);break}case T.TEXT:{this._insertCharacters(t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ir(this,t);break}case T.IN_COLUMN_GROUP:{Zn(this,t);break}case T.AFTER_BODY:{Jn(this,t);break}case T.AFTER_AFTER_BODY:{Vn(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Jr(this,t);return}switch(this.insertionMode){case T.INITIAL:case T.BEFORE_HTML:case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_TEMPLATE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{Jr(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.AFTER_BODY:{Td(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{xd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{kd(this,t);break}case T.BEFORE_HEAD:case T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:{this._err(t,I.misplacedDoctype);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,I.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Yf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{_d(this,t);break}case T.BEFORE_HEAD:{yd(this,t);break}case T.IN_HEAD:{$e(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Nd(this,t);break}case T.AFTER_HEAD:{wd(this,t);break}case T.IN_BODY:{_e(this,t);break}case T.IN_TABLE:{Ft(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_CAPTION:{Sf(this,t);break}case T.IN_COLUMN_GROUP:{Pi(this,t);break}case T.IN_TABLE_BODY:{pr(this,t);break}case T.IN_ROW:{mr(this,t);break}case T.IN_CELL:{wf(this,t);break}case T.IN_SELECT:{Uu(this,t);break}case T.IN_SELECT_IN_TABLE:{Of(this,t);break}case T.IN_TEMPLATE:{Df(this,t);break}case T.AFTER_BODY:{Mf(this,t);break}case T.IN_FRAMESET:{vf(this,t);break}case T.AFTER_FRAMESET:{Ff(this,t);break}case T.AFTER_AFTER_BODY:{Uf(this,t);break}case T.AFTER_AFTER_FRAMESET:{jf(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?qf(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{Ad(this,t);break}case T.BEFORE_HEAD:{Cd(this,t);break}case T.IN_HEAD:{Sd(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Id(this,t);break}case T.AFTER_HEAD:{Ld(this,t);break}case T.IN_BODY:{fr(this,t);break}case T.TEXT:{gf(this,t);break}case T.IN_TABLE:{kn(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_CAPTION:{Nf(this,t);break}case T.IN_COLUMN_GROUP:{If(this,t);break}case T.IN_TABLE_BODY:{ei(this,t);break}case T.IN_ROW:{Hu(this,t);break}case T.IN_CELL:{Lf(this,t);break}case T.IN_SELECT:{ju(this,t);break}case T.IN_SELECT_IN_TABLE:{Rf(this,t);break}case T.IN_TEMPLATE:{Pf(this,t);break}case T.AFTER_BODY:{$u(this,t);break}case T.IN_FRAMESET:{Bf(this,t);break}case T.AFTER_FRAMESET:{Hf(this,t);break}case T.AFTER_AFTER_BODY:{Vn(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Xt(this,t);break}case T.BEFORE_HTML:{ln(this,t);break}case T.BEFORE_HEAD:{cn(this,t);break}case T.IN_HEAD:{hn(this,t);break}case T.IN_HEAD_NO_SCRIPT:{dn(this,t);break}case T.AFTER_HEAD:{fn(this,t);break}case T.IN_BODY:case T.IN_TABLE:case T.IN_CAPTION:case T.IN_COLUMN_GROUP:case T.IN_TABLE_BODY:case T.IN_ROW:case T.IN_CELL:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:{Mu(this,t);break}case T.TEXT:{Ef(this,t);break}case T.IN_TABLE_TEXT:{Kt(this,t);break}case T.IN_TEMPLATE:{zu(this,t);break}case T.AFTER_BODY:case T.IN_FRAMESET:case T.AFTER_FRAMESET:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Di(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===m.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 T.IN_HEAD:case T.IN_HEAD_NO_SCRIPT:case T.AFTER_HEAD:case T.TEXT:case T.IN_COLUMN_GROUP:case T.IN_SELECT:case T.IN_SELECT_IN_TABLE:case T.IN_FRAMESET:case T.AFTER_FRAMESET:{this._insertCharacters(t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:case T.AFTER_BODY:case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{Lu(this,t);break}case T.IN_TABLE:case T.IN_TABLE_BODY:case T.IN_ROW:{Ir(this,t);break}case T.IN_TABLE_TEXT:{vu(this,t);break}}}}function fd(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):Pu(e,t),n}function pd(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 md(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 u=e.activeFormattingElements.getElementEntry(s),o=u&&a>=hd;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=gd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function gd(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 Ed(e,t,n){const r=e.treeAdapter.getTagName(t),i=$t(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===P.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function bd(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 Ri(e,t){for(let n=0;n<cd;n++){const r=fd(e,t);if(!r)break;const i=pd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=md(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&Ed(e,s,a),bd(e,i,r)}}function Jr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Td(e,t){e._appendCommentNode(t,e.openElements.items[0])}function xd(e,t){e._appendCommentNode(t,e.document)}function Di(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 kd(e,t){e._setDocumentType(t);const n=t.forceQuirks?Me.QUIRKS:Kh(t);Xh(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Xt(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Me.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function _d(e,t){t.tagID===l.HTML?(e._insertElement(t,P.HTML),e.insertionMode=T.BEFORE_HEAD):ln(e,t)}function Ad(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&ln(e,t)}function ln(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function yd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.HEAD:{e._insertElement(t,P.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:cn(e,t)}}function Cd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?cn(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function cn(e,t){e._insertFakeElement(y.HEAD,l.HEAD),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD,e._processToken(t)}function $e(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,fe.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fe.RAWTEXT):(e._insertElement(t,P.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,fe.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,fe.SCRIPT_DATA);break}case l.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=T.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(T.IN_TEMPLATE);break}case l.HEAD:{e._err(t,I.misplacedStartTagForHeadElement);break}default:hn(e,t)}}function Sd(e,t){switch(t.tagID){case l.HEAD:{e.openElements.pop(),e.insertionMode=T.AFTER_HEAD;break}case l.BODY:case l.BR:case l.HTML:{hn(e,t);break}case l.TEMPLATE:{Ct(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function Ct(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==l.TEMPLATE&&e._err(t,I.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,I.endTagWithoutMatchingOpenElement)}function hn(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Nd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BASEFONT:case l.BGSOUND:case l.HEAD:case l.LINK:case l.META:case l.NOFRAMES:case l.STYLE:{$e(e,t);break}case l.NOSCRIPT:{e._err(t,I.nestedNoscriptInHead);break}default:dn(e,t)}}function Id(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{dn(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function dn(e,t){const n=t.type===K.EOF?I.openElementsLeftAfterEof:I.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=T.IN_HEAD,e._processToken(t)}function wd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BODY:{e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,P.HTML),e.insertionMode=T.IN_FRAMESET;break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{e._err(t,I.abandonedHeadElementChild),e.openElements.push(e.headElement,l.HEAD),$e(e,t),e.openElements.remove(e.headElement);break}case l.HEAD:{e._err(t,I.misplacedStartTagForHeadElement);break}default:fn(e,t)}}function Ld(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{fn(e,t);break}case l.TEMPLATE:{Ct(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function fn(e,t){e._insertFakeElement(y.BODY,l.BODY),e.insertionMode=T.IN_BODY,dr(e,t)}function dr(e,t){switch(t.type){case K.CHARACTER:{Ou(e,t);break}case K.WHITESPACE_CHARACTER:{Lu(e,t);break}case K.COMMENT:{Jr(e,t);break}case K.START_TAG:{_e(e,t);break}case K.END_TAG:{fr(e,t);break}case K.EOF:{Mu(e,t);break}}}function Lu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Ou(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Od(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Rd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Dd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,P.HTML),e.insertionMode=T.IN_FRAMESET)}function Pd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function Md(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Zr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,P.HTML)}function vd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Bd(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),n||(e.formElement=e.openElements.current))}function Fd(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===l.LI&&i===l.LI||(n===l.DD||n===l.DT)&&(i===l.DD||i===l.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==l.ADDRESS&&i!==l.DIV&&i!==l.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML)}function Hd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.tokenizer.state=fe.PLAINTEXT}function Ud(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1}function jd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(y.A);n&&(Ri(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $d(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Ri(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,P.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Yd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function qd(e,t){e.treeAdapter.getDocumentMode(e.document)!==Me.QUIRKS&&e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Ru(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Du(e){const t=ku(e,bt.TYPE);return t!=null&&t.toLowerCase()===ld}function Vd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,P.HTML),Du(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Wd(e,t){e._appendElement(t,P.HTML),t.ackSelfClosing=!0}function Gd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,P.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Qd(e,t){t.tagName=y.IMG,t.tagID=l.IMG,Ru(e,t)}function Xd(e,t){e._insertElement(t,P.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function Kd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Zd(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fe.RAWTEXT)}function Fa(e,t){e._switchToTextParsing(t,fe.RAWTEXT)}function Jd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===T.IN_TABLE||e.insertionMode===T.IN_CAPTION||e.insertionMode===T.IN_TABLE_BODY||e.insertionMode===T.IN_ROW||e.insertionMode===T.IN_CELL?T.IN_SELECT_IN_TABLE:T.IN_SELECT}function ef(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function tf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,P.HTML)}function nf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,P.HTML)}function rf(e,t){e._reconstructActiveFormattingElements(),Nu(t),Oi(t),t.selfClosing?e._appendElement(t,P.MATHML):e._insertElement(t,P.MATHML),t.ackSelfClosing=!0}function af(e,t){e._reconstructActiveFormattingElements(),Iu(t),Oi(t),t.selfClosing?e._appendElement(t,P.SVG):e._insertElement(t,P.SVG),t.ackSelfClosing=!0}function Ha(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,P.HTML)}function _e(e,t){switch(t.tagID){case l.I:case l.S:case l.B:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.SMALL:case l.STRIKE:case l.STRONG:{zd(e,t);break}case l.A:{jd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Md(e,t);break}case l.P:case l.DL:case l.OL:case l.UL:case l.DIV:case l.DIR:case l.NAV:case l.MAIN:case l.MENU:case l.ASIDE:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.DETAILS:case l.ADDRESS:case l.ARTICLE:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{Pd(e,t);break}case l.LI:case l.DD:case l.DT:{Fd(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Ru(e,t);break}case l.HR:{Gd(e,t);break}case l.RB:case l.RTC:{tf(e,t);break}case l.RT:case l.RP:{nf(e,t);break}case l.PRE:case l.LISTING:{vd(e,t);break}case l.XMP:{Kd(e,t);break}case l.SVG:{af(e,t);break}case l.HTML:{Od(e,t);break}case l.BASE:case l.LINK:case l.META:case l.STYLE:case l.TITLE:case l.SCRIPT:case l.BGSOUND:case l.BASEFONT:case l.TEMPLATE:{$e(e,t);break}case l.BODY:{Rd(e,t);break}case l.FORM:{Bd(e,t);break}case l.NOBR:{$d(e,t);break}case l.MATH:{rf(e,t);break}case l.TABLE:{qd(e,t);break}case l.INPUT:{Vd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Wd(e,t);break}case l.IMAGE:{Qd(e,t);break}case l.BUTTON:{Ud(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Yd(e,t);break}case l.IFRAME:{Zd(e,t);break}case l.SELECT:{Jd(e,t);break}case l.OPTION:case l.OPTGROUP:{ef(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Fa(e,t);break}case l.FRAMESET:{Dd(e,t);break}case l.TEXTAREA:{Xd(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Fa(e,t):Ha(e,t);break}case l.PLAINTEXT:{Hd(e,t);break}case l.COL:case l.TH:case l.TD:case l.TR:case l.HEAD:case l.FRAME:case l.TBODY:case l.TFOOT:case l.THEAD:case l.CAPTION:case l.COLGROUP:break;default:Ha(e,t)}}function sf(e,t){if(e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function uf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,$u(e,t))}function of(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function lf(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(l.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(l.FORM):n&&e.openElements.remove(n))}function cf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(y.P,l.P),e._closePElement()}function hf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function df(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ff(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function pf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function mf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(y.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function Pu(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!==l.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 fr(e,t){switch(t.tagID){case l.A:case l.B:case l.I:case l.S:case l.U:case l.EM:case l.TT:case l.BIG:case l.CODE:case l.FONT:case l.NOBR:case l.SMALL:case l.STRIKE:case l.STRONG:{Ri(e,t);break}case l.P:{cf(e);break}case l.DL:case l.UL:case l.OL:case l.DIR:case l.DIV:case l.NAV:case l.PRE:case l.MAIN:case l.MENU:case l.ASIDE:case l.BUTTON:case l.CENTER:case l.FIGURE:case l.FOOTER:case l.HEADER:case l.HGROUP:case l.DIALOG:case l.ADDRESS:case l.ARTICLE:case l.DETAILS:case l.SEARCH:case l.SECTION:case l.SUMMARY:case l.LISTING:case l.FIELDSET:case l.BLOCKQUOTE:case l.FIGCAPTION:{of(e,t);break}case l.LI:{hf(e);break}case l.DD:case l.DT:{df(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{ff(e);break}case l.BR:{mf(e);break}case l.BODY:{sf(e,t);break}case l.HTML:{uf(e,t);break}case l.FORM:{lf(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{pf(e,t);break}case l.TEMPLATE:{Ct(e,t);break}default:Pu(e,t)}}function Mu(e,t){e.tmplInsertionModeStack.length>0?zu(e,t):Di(e,t)}function gf(e,t){var n;t.tagID===l.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Ef(e,t){e._err(t,I.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ir(e,t){if(e.openElements.currentTagId!==void 0&&wu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=T.IN_TABLE_TEXT,t.type){case K.CHARACTER:{Bu(e,t);break}case K.WHITESPACE_CHARACTER:{vu(e,t);break}}else In(e,t)}function bf(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,P.HTML),e.insertionMode=T.IN_CAPTION}function Tf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function xf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Pi(e,t)}function kf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,P.HTML),e.insertionMode=T.IN_TABLE_BODY}function _f(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(y.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,pr(e,t)}function Af(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function yf(e,t){Du(t)?e._appendElement(t,P.HTML):In(e,t),t.ackSelfClosing=!0}function Cf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,P.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ft(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{_f(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}case l.COL:{xf(e,t);break}case l.FORM:{Cf(e,t);break}case l.TABLE:{Af(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{kf(e,t);break}case l.INPUT:{yf(e,t);break}case l.CAPTION:{bf(e,t);break}case l.COLGROUP:{Tf(e,t);break}default:In(e,t)}}function kn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{Ct(e,t);break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:In(e,t)}}function In(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,dr(e,t),e.fosterParentingEnabled=n}function vu(e,t){e.pendingCharacterTokens.push(t)}function Bu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Kt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)In(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Fu=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Sf(e,t){const n=t.tagID;Fu.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,Ft(e,t)):_e(e,t)}function Nf(e,t){const n=t.tagID;switch(n){case l.CAPTION:case l.TABLE:{e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,n===l.TABLE&&kn(e,t));break}case l.BODY:case l.COL:case l.COLGROUP:case l.HTML:case l.TBODY:case l.TD:case l.TFOOT:case l.TH:case l.THEAD:case l.TR:break;default:fr(e,t)}}function Pi(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.COL:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{$e(e,t);break}default:Zn(e,t)}}function If(e,t){switch(t.tagID){case l.COLGROUP:{e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TEMPLATE:{Ct(e,t);break}case l.COL:break;default:Zn(e,t)}}function Zn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function pr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,P.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(y.TR,l.TR),e.insertionMode=T.IN_ROW,mr(e,t);break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,Ft(e,t));break}default:Ft(e,t)}}function ei(e,t){const n=t.tagID;switch(t.tagID){case l.TBODY:case l.TFOOT:case l.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE);break}case l.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE,kn(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:case l.TR:break;default:kn(e,t)}}function mr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,P.HTML),e.insertionMode=T.IN_CELL,e.activeFormattingElements.insertMarker();break}case l.CAPTION:case l.COL:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,pr(e,t));break}default:Ft(e,t)}}function Hu(e,t){switch(t.tagID){case l.TR:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY);break}case l.TABLE:{e.openElements.hasInTableScope(l.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ei(e,t));break}case l.TBODY:case l.TFOOT:case l.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(l.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=T.IN_TABLE_BODY,ei(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:case l.TD:case l.TH:break;default:kn(e,t)}}function wf(e,t){const n=t.tagID;Fu.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),mr(e,t)):_e(e,t)}function Lf(e,t){const n=t.tagID;switch(n){case l.TD:case l.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_ROW);break}case l.TABLE:case l.TBODY:case l.TFOOT:case l.THEAD:case l.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Hu(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:fr(e,t)}}function Uu(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,P.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.INPUT:case l.KEYGEN:case l.TEXTAREA:case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),t.tagID!==l.SELECT&&e._processStartTag(t));break}case l.SCRIPT:case l.TEMPLATE:{$e(e,t);break}}}function ju(e,t){switch(t.tagID){case l.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===l.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===l.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop();break}case l.OPTION:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop();break}case l.SELECT:{e.openElements.hasInSelectScope(l.SELECT)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode());break}case l.TEMPLATE:{Ct(e,t);break}}}function Of(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Uu(e,t)}function Rf(e,t){const n=t.tagID;n===l.CAPTION||n===l.TABLE||n===l.TBODY||n===l.TFOOT||n===l.THEAD||n===l.TR||n===l.TD||n===l.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(l.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ju(e,t)}function Df(e,t){switch(t.tagID){case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:case l.NOFRAMES:case l.SCRIPT:case l.STYLE:case l.TEMPLATE:case l.TITLE:{$e(e,t);break}case l.CAPTION:case l.COLGROUP:case l.TBODY:case l.TFOOT:case l.THEAD:{e.tmplInsertionModeStack[0]=T.IN_TABLE,e.insertionMode=T.IN_TABLE,Ft(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Pi(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,pr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,mr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,_e(e,t)}}function Pf(e,t){t.tagID===l.TEMPLATE&&Ct(e,t)}function zu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Di(e,t)}function Mf(e,t){t.tagID===l.HTML?_e(e,t):Jn(e,t)}function $u(e,t){var n;if(t.tagID===l.HTML){if(e.fragmentContext||(e.insertionMode=T.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===l.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 Jn(e,t)}function Jn(e,t){e.insertionMode=T.IN_BODY,dr(e,t)}function vf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.FRAMESET:{e._insertElement(t,P.HTML);break}case l.FRAME:{e._appendElement(t,P.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{$e(e,t);break}}}function Bf(e,t){t.tagID===l.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==l.FRAMESET&&(e.insertionMode=T.AFTER_FRAMESET))}function Ff(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function Hf(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function Uf(e,t){t.tagID===l.HTML?_e(e,t):Vn(e,t)}function Vn(e,t){e.insertionMode=T.IN_BODY,dr(e,t)}function jf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{$e(e,t);break}}}function zf(e,t){t.chars=ce,e._insertCharacters(t)}function $f(e,t){e._insertCharacters(t),e.framesetOk=!1}function Yu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==P.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Yf(e,t){if(id(t))Yu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===P.MATHML?Nu(t):r===P.SVG&&(ad(t),Iu(t)),Oi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function qf(e,t){if(t.tagID===l.P||t.tagID===l.BR){Yu(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)===P.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}y.AREA,y.BASE,y.BASEFONT,y.BGSOUND,y.BR,y.COL,y.EMBED,y.FRAME,y.HR,y.IMG,y.INPUT,y.KEYGEN,y.LINK,y.META,y.PARAM,y.SOURCE,y.TRACK,y.WBR;const gr=qu("end"),Ve=qu("start");function qu(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 Vu(e){const t=Ve(e),n=gr(e);if(t&&n)return{start:t,end:n}}const Vf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Wf=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ua={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Wu(e,t){const n=r0(e),r=gu("type",{handlers:{root:Gf,element:Qf,text:Xf,comment:Qu,doctype:Kf,raw:Jf},unknown:e0}),i={parser:n?new Ba(Ua):Ba.getFragmentParser(void 0,Ua),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),Yt(i,Ve());const a=n?i.parser.document:i.parser.getFragment(),s=rh(a,{file:i.options.file});return i.stitches&&st(s,"comment",function(u,o,c){const h=u;if(h.value.stitch&&c&&o!==void 0){const d=c.children;return d[o]=h.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Gu(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Gf(e,t){Gu(e.children,t)}function Qf(e,t){t0(e,t),Gu(e.children,t),n0(e,t)}function Xf(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:K.CHARACTER,chars:e.value,location:wn(e)};Yt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Kf(e,t){const n={type:K.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:wn(e)};Yt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Zf(e,t){t.stitches=!0;const n=i0(e);if("children"in e&&"children"in n){const r=Wu({type:"root",children:e.children},t.options);n.children=r.children}Qu({type:"comment",value:{stitch:n}},t)}function Qu(e,t){const n=e.value,r={type:K.COMMENT,data:n,location:wn(e)};Yt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Jf(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,Xu(t,Ve(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Vf,"<$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 e0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Zf(n,t);else{let r="";throw Wf.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 Yt(e,t){Xu(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=fe.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 Xu(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 t0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fe.PLAINTEXT)return;Yt(t,Ve(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Et.html;i===Et.html&&n==="svg"&&(i=Et.svg);const a=oh({...e,children:[]},{space:i===Et.svg?"svg":"html"}),s={type:K.START_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:wn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function n0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&gh.includes(n)||t.parser.tokenizer.state===fe.PLAINTEXT)return;Yt(t,gr(e));const r={type:K.END_TAG,tagName:n,tagID:$t(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:wn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fe.RCDATA||t.parser.tokenizer.state===fe.RAWTEXT||t.parser.tokenizer.state===fe.SCRIPT_DATA)&&(t.parser.tokenizer.state=fe.DATA)}function r0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function wn(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=gr(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 i0(e){return"children"in e?xt({...e,children:[]}):xt(e)}function ti(e){return function(t,n){return Wu(t,{...e,file:n})}}const dt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],pn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...dt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...dt],h2:[["className","sr-only"]],img:[...dt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...dt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...dt],table:[...dt],ul:[...dt,["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"]},it={}.hasOwnProperty;function a0(e,t){let n={type:"root",children:[]};const r={schema:t?{...pn,...t}:pn,stack:[]},i=Ku(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Ku(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return s0(e,n);case"doctype":return u0(e,n);case"element":return o0(e,n);case"root":return l0(e,n);case"text":return c0(e,n)}}}function s0(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 Ln(a,t),a}}function u0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ln(n,t),n}}function o0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Zu(e,t.children),i=h0(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&&it.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(a=!1;++o<u.length;)e.stack.includes(u[o])&&(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 Ln(s,t),s}function l0(e,t){const r={type:"root",children:Zu(e,t.children)};return Ln(r,t),r}function c0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ln(r,t),r}function Zu(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Ku(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function h0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&it.call(r,n)?r[n]:void 0,s=r&&it.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let c;for(c in u)if(it.call(u,c)){const h=u[c];let d=ja(e,za(a,c),c,h);d==null&&(d=ja(e,za(s,c),c,h)),d!=null&&(o[c]=d)}if(i&&it.call(i,n)){const h=i[n];for(c in h)it.call(h,c)&&!it.call(o,c)&&(o[c]=h[c])}return o}function ja(e,t,n,r){return t?Array.isArray(r)?d0(e,t,n,r):Ju(e,t,n,r):void 0}function d0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=Ju(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function Ju(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&f0(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 f0(e,t,n){const r=e.schema.protocols&&it.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("?"),u=i.indexOf("#"),o=i.indexOf("/");if(a<0||o>-1&&a>o||s>-1&&a>s||u>-1&&a>u)return!0;let c=-1;for(;++c<r.length;){const h=r[c];if(a===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Ln(e,t){const n=Vu(t);t.data&&(e.data=xt(t.data)),n&&(e.position=n)}function za(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 eo(e){return function(t){return a0(t,e)}}function $a(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 Ce=lt(/[A-Za-z]/),ke=lt(/[\dA-Za-z]/),p0=lt(/[#-'*+\--9=?A-Z^-~]/);function er(e){return e!==null&&(e<32||e===127)}const ni=lt(/\d/),m0=lt(/[\dA-Fa-f]/),g0=lt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function oe(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}const Er=lt(new RegExp("\\p{P}|\\p{S}","u")),kt=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function E0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function b0(e,t,n){const i=or((n||{}).ignore||[]),a=T0(t);let s=-1;for(;++s<a.length;)Ai(e,"text",u);function u(c,h){let d=-1,f;for(;++d<h.length;){const p=h[d],b=f?f.children:void 0;if(i(p,b?b.indexOf(p):void 0,f))return;f=p}if(f)return o(c,h)}function o(c,h){const d=h[h.length-1],f=a[s][0],p=a[s][1];let b=0;const N=d.children.indexOf(c);let _=!1,R=[];f.lastIndex=0;let O=f.exec(c.value);for(;O;){const H=O.index,j={index:O.index,input:O.input,stack:[...h,c]};let w=p(...O,j);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?f.lastIndex=H+1:(b!==H&&R.push({type:"text",value:c.value.slice(b,H)}),Array.isArray(w)?R.push(...w):w&&R.push(w),b=H+O[0].length,_=!0),!f.global)break;O=f.exec(c.value)}return _?(b<c.value.length&&R.push({type:"text",value:c.value.slice(b)}),d.children.splice(N,1,...R)):R=[c],N+R.length}}function T0(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([x0(i[0]),k0(i[1])])}return t}function x0(e){return typeof e=="string"?new RegExp(E0(e),"g"):e}function k0(e){return typeof e=="function"?e:function(){return e}}const wr="phrasing",Lr=["autolink","link","image","label"];function _0(){return{transforms:[w0],enter:{literalAutolink:y0,literalAutolinkEmail:Or,literalAutolinkHttp:Or,literalAutolinkWww:Or},exit:{literalAutolink:I0,literalAutolinkEmail:N0,literalAutolinkHttp:C0,literalAutolinkWww:S0}}}function A0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wr,notInConstruct:Lr},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wr,notInConstruct:Lr},{character:":",before:"[ps]",after:"\\/",inConstruct:wr,notInConstruct:Lr}]}}function y0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Or(e){this.config.enter.autolinkProtocol.call(this,e)}function C0(e){this.config.exit.autolinkProtocol.call(this,e)}function S0(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 N0(e){this.config.exit.autolinkEmail.call(this,e)}function I0(e){this.exit(e)}function w0(e){b0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,L0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),O0]],{ignore:["link","linkReference"]})}function L0(e,t,n,r,i){let a="";if(!to(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!R0(n)))return!1;const s=D0(n+r);if(!s[0])return!1;const u={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[u,{type:"text",value:s[1]}]:u}function O0(e,t,n,r){return!to(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function R0(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 D0(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=$a(e,"(");let a=$a(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 to(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||kt(n)||Er(n))&&(!t||n!==47)}function ze(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}no.peek=z0;function P0(){this.buffer()}function M0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function v0(){this.buffer()}function B0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function F0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ze(this.sliceSerialize(e)).toLowerCase(),n.label=t}function H0(e){this.exit(e)}function U0(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ze(this.sliceSerialize(e)).toLowerCase(),n.label=t}function j0(e){this.exit(e)}function z0(){return"["}function no(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const s=n.enter("footnoteReference"),u=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),u(),s(),a+=i.move("]"),a}function $0(){return{enter:{gfmFootnoteCallString:P0,gfmFootnoteCall:M0,gfmFootnoteDefinitionLabelString:v0,gfmFootnoteDefinition:B0},exit:{gfmFootnoteCallString:F0,gfmFootnoteCall:H0,gfmFootnoteDefinitionLabelString:U0,gfmFootnoteDefinition:j0}}}function Y0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:no},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,s){const u=a.createTracker(s);let o=u.move("[^");const c=a.enter("footnoteDefinition"),h=a.enter("label");return o+=u.move(a.safe(a.associationId(r),{before:o,after:"]"})),h(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
|
|
4
|
+
`:" ")+a.indentLines(a.containerFlow(r,u.current()),t?ro:q0))),c(),o}}function q0(e,t,n){return t===0?e:ro(e,t,n)}function ro(e,t,n){return(n?"":" ")+e}const V0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];io.peek=K0;function W0(){return{canContainEols:["delete"],enter:{strikethrough:Q0},exit:{strikethrough:X0}}}function G0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:V0}],handlers:{delete:io}}}function Q0(e){this.enter({type:"delete",children:[]},e)}function X0(e){this.exit(e)}function io(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 K0(){return"~"}function Z0(e){return e.length}function J0(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Z0,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const A=[],N=[];let _=-1;for(e[h].length>c&&(c=e[h].length);++_<e[h].length;){const R=ep(e[h][_]);if(n.alignDelimiters!==!1){const O=i(R);N[_]=O,(o[_]===void 0||O>o[_])&&(o[_]=O)}A.push(R)}s[h]=A,u[h]=N}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=Ya(r[d]);else{const A=Ya(r);for(;++d<c;)a[d]=A}d=-1;const f=[],p=[];for(;++d<c;){const A=a[d];let N="",_="";A===99?(N=":",_=":"):A===108?N=":":A===114&&(_=":");let R=n.alignDelimiters===!1?1:Math.max(1,o[d]-N.length-_.length);const O=N+"-".repeat(R)+_;n.alignDelimiters!==!1&&(R=N.length+R+_.length,R>o[d]&&(o[d]=R),p[d]=R),f[d]=O}s.splice(1,0,f),u.splice(1,0,p),h=-1;const b=[];for(;++h<s.length;){const A=s[h],N=u[h];d=-1;const _=[];for(;++d<c;){const R=A[d]||"";let O="",H="";if(n.alignDelimiters!==!1){const j=o[d]-(N[d]||0),w=a[d];w===114?O=" ".repeat(j):w===99?j%2?(O=" ".repeat(j/2+.5),H=" ".repeat(j/2-.5)):(O=" ".repeat(j/2),H=O):H=" ".repeat(j)}n.delimiterStart!==!1&&!d&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&R==="")&&(n.delimiterStart!==!1||d)&&_.push(" "),n.alignDelimiters!==!1&&_.push(O),_.push(R),n.alignDelimiters!==!1&&_.push(H),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||d!==c-1)&&_.push("|")}b.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return b.join(`
|
|
5
5
|
`)}function ep(e){return e==null?"":String(e)}function Ya(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 tp(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()),np);return i(),s}function np(e,t,n){return">"+(n?"":" ")+e}function rp(e,t){return qa(e,t.inConstruct,!0)&&!qa(e,t.notInConstruct,!1)}function qa(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 Va(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
6
6
|
`&&rp(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
7
7
|
`}function ip(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 ap(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 sp(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 up(e,t,n,r){const i=sp(n),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(ap(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(a,op);return d(),f}const u=n.createTracker(r),o=i.repeat(Math.max(ip(a,i)+1,3)),c=n.enter("codeFenced");let h=u.move(o);if(e.lang){const d=n.enter(`codeFencedLang${s}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${s}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
|
|
8
8
|
`,encode:["`"],...u.current()})),d()}return h+=u.move(`
|
|
9
9
|
`),a&&(h+=u.move(a+`
|
|
10
10
|
`)),h+=u.move(o),c(),h}function op(e,t,n){return(n?"":" ")+e}function Mi(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 lp(e,t,n,r){const i=Mi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
11
|
-
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function cp(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
|
|
11
|
+
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),s(),c}function cp(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 _n(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ht(e){if(e===null||oe(e)||kt(e))return 1;if(Er(e))return 2}function tr(e,t,n){const r=Ht(e),i=Ht(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}}ao.peek=hp;function ao(e,t,n,r){const i=cp(n),a=n.enter("emphasis"),s=n.createTracker(r),u=s.move(i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=tr(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=_n(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=tr(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+_n(d));const p=s.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function hp(e,t,n){return n.options.emphasis||"*"}const dp={};function vi(e,t){const n=dp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return so(e,r,i)}function so(e,t,n){if(fp(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 Wa(e.children,t,n)}return Array.isArray(e)?Wa(e,t,n):""}function Wa(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=so(e[i],t,n);return r.join("")}function fp(e){return!!(e&&typeof e=="object")}function pp(e,t){let n=!1;return st(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Wr}),!!((!e.depth||e.depth<3)&&vi(e)&&(t.options.setext||n))}function mp(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(pp(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
|
|
12
12
|
`,after:`
|
|
13
13
|
`});return d(),h(),f+`
|
|
14
14
|
`+(i===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
15
15
|
`))+1))}const s="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");a.move(s+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
16
|
-
`,...a.current()});return/^[\t ]/.test(c)&&(c=
|
|
17
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:u}};function s(p,b,
|
|
18
|
-
`))}function o(p,b,_,N){const A=_.enter("tableCell"),O=_.enter("phrasing"),L=_.containerPhrasing(p,{...N,before:a,after:a});return O(),A(),L}function c(p,b){return J0(p,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(p,b,_){const N=p.children;let A=-1;const O=[],L=b.enter("table");for(;++A<N.length;)O[A]=d(N[A],b,_);return L(),O}function d(p,b,_){const N=p.children;let A=-1;const O=[],L=b.enter("tableRow");for(;++A<N.length;)O[A]=o(N[A],p,b,_);return L(),O}function f(p,b,_){let N=Eo.inlineCode(p,b,_);return _.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function qp(){return{exit:{taskListCheckValueChecked:Xa,taskListCheckValueUnchecked:Xa,paragraph:Wp}}}function Vp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Gp}}}function Xa(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Wp(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 u=i[a];if(u.type==="paragraph"){s=u;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 Gp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=Eo.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function Qp(){return[_0(),$0(),W0(),Fp(),qp()]}function Xp(e){return{extensions:[A0(),Y0(e),G0(),Yp(e),Vp()]}}function Re(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 Pe(e,t){return e.length>0?(Re(e,e.length,0,t),e):t}const Ka={}.hasOwnProperty;function To(e){const t={};let n=-1;for(;++n<e.length;)Kp(t,e[n]);return t}function Kp(e,t){let n;for(n in t){const i=(Ka.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Ka.call(i,s)||(i[s]=[]);const u=a[s];Zp(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Zp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Re(e,0,0,r)}const Jp={tokenize:am,partial:!0},xo={tokenize:sm,partial:!0},ko={tokenize:um,partial:!0},_o={tokenize:om,partial:!0},em={tokenize:lm,partial:!0},Ao={name:"wwwAutolink",tokenize:rm,previous:Co},yo={name:"protocolAutolink",tokenize:im,previous:So},Je={name:"emailAutolink",tokenize:nm,previous:No},We={};function tm(){return{text:We}}let ft=48;for(;ft<123;)We[ft]=Je,ft++,ft===58?ft=65:ft===91&&(ft=97);We[43]=Je;We[45]=Je;We[46]=Je;We[95]=Je;We[72]=[Je,yo];We[104]=[Je,yo];We[87]=[Je,Ao];We[119]=[Je,Ao];function nm(e,t,n){const r=this;let i,a;return s;function s(d){return!ri(d)||!No.call(r,r.previous)||Hi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return ri(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(em,h,c)(d):d===45||d===95||xe(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&ye(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function rm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Co.call(r,r.previous)||Hi(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Jp,e.attempt(xo,e.attempt(ko,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function im(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&So.call(r,r.previous)&&!Hi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(ye(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||Jn(d)||oe(d)||kt(d)||gr(d)?n(d):e.attempt(xo,e.attempt(ko,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function am(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 sm(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(_o,o,u)(c):c===null||oe(c)||kt(c)||c!==45&&gr(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function um(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(_o,t,a)(s):s===null||oe(s)||kt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function om(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||oe(u)||kt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||oe(u)||kt(u)?t(u):r(u)}function a(u){return ye(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):ye(u)?(e.consume(u),s):n(u)}}function lm(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return xe(a)?n(a):t(a)}}function Co(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function So(e){return!ye(e)}function No(e){return!(e===47||ri(e))}function ri(e){return e===43||e===45||e===46||e===95||xe(e)}function Hi(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 qt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&xe(e.charCodeAt(n+1))&&xe(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 u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),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 Er(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 ii={name:"attention",resolveAll:cm,tokenize:hm};function cm(e,t){let n=-1,r,i,a,s,u,o,c,h;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;o=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 d={...e[r][1].end},f={...e[n][1].start};Za(d,-o),Za(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Pe(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Pe(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=Pe(c,Er(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Pe(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=Pe(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Re(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function hm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ht(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Ht(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!f)),c._close=!!(a===42?f:f&&(h||!d)),t(o)}}function Za(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dm={name:"autolink",tokenize:fm};function fm(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return ye(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||xe(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||xe(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Jn(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),h):p0(p)?(e.consume(p),c):n(p)}function h(p){return xe(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||xe(p))&&r++<63){const b=p===45?f:d;return e.consume(p),b}return n(p)}}function te(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return J(o)?(e.enter(n),u(o)):t(o)}function u(o){return J(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const Ln={partial:!0,tokenize:pm};function pm(e,t,n){return r;function r(a){return J(a)?te(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Y(a)?t(a):n(a)}}const Io={continuation:{tokenize:gm},exit:Em,name:"blockQuote",tokenize:mm};function mm(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return J(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function gm(e,t,n){const r=this;return i;function i(s){return J(s)?te(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Io,t,n)(s)}}function Em(e){e.exit("blockQuote")}const wo={name:"characterEscape",tokenize:bm};function bm(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 g0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Lo={name:"characterReference",tokenize:Tm};function Tm(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=xe,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=m0,h):(e.enter("characterReferenceValue"),a=7,s=ni,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===xe&&!Fi(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const Ja={partial:!0,tokenize:km},es={concrete:!0,name:"codeFenced",tokenize:xm};function xm(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),J(w)?te(e,d,"whitespace")(w):d(w))}function d(w){return w===null||Y(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Ja,_,U)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):J(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),te(e,p,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),f)}function p(w){return w===null||Y(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),b)}function _(w){return e.attempt(i,U,N)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),A}function A(w){return a>0&&J(w)?te(e,O,"linePrefix",a+1)(w):O(w)}function O(w){return w===null||Y(w)?e.check(Ja,_,U)(w):(e.enter("codeFlowValue"),L(w))}function L(w){return w===null||Y(w)?(e.exit("codeFlowValue"),O(w)):(e.consume(w),L)}function U(w){return e.exit("codeFenced"),t(w)}function j(w,V,q){let Q=0;return S;function S(F){return w.enter("lineEnding"),w.consume(F),w.exit("lineEnding"),D}function D(F){return w.enter("codeFencedFence"),J(F)?te(w,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):P(F)}function P(F){return F===u?(w.enter("codeFencedFenceSequence"),$(F)):q(F)}function $(F){return F===u?(Q++,w.consume(F),$):Q>=s?(w.exit("codeFencedFenceSequence"),J(F)?te(w,z,"whitespace")(F):z(F)):q(F)}function z(F){return F===null||Y(F)?(w.exit("codeFencedFence"),V(F)):q(F)}}}function km(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 Rr={name:"codeIndented",tokenize:Am},_m={partial:!0,tokenize:ym};function Am(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),te(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):Y(c)?e.attempt(_m,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||Y(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function ym(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):te(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const Cm={name:"codeText",previous:Nm,resolve:Sm,tokenize:Im};function Sm(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 Nm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Im(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class wm{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&&Zt(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),Zt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zt(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);Zt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zt(this.left,n.reverse())}}}function Zt(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 Oo(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new wm(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Lm(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.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={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Re(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Lm(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 u=s.events,o=[],c={};let h,d,f=-1,p=n,b=0,_=0;const N=[_];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(_=f+1,N.push(_),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):N.pop(),f=N.length;f--;){const A=u.slice(N[f],N[f+1]),O=a.pop();o.push([O,O+A.length-1]),e.splice(O,2,A)}for(o.reverse(),f=-1;++f<o.length;)c[b+o[f][0]]=b+o[f][1],b+=o[f][1]-o[f][0]-1;return c}const Om={resolve:Dm,tokenize:Pm},Rm={partial:!0,tokenize:Mm};function Dm(e){return Oo(e),e}function Pm(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Y(u)?e.check(Rm,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Mm(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),te(e,a,"linePrefix")}function a(s){if(s===null||Y(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ro(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(A){return A===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(A),e.exit(a),f):A===null||A===32||A===41||Jn(A)?n(A):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),_(A))}function f(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===62?(e.exit("chunkString"),e.exit(u),f(A)):A===null||A===60||Y(A)?n(A):(e.consume(A),A===92?b:p)}function b(A){return A===60||A===62||A===92?(e.consume(A),p):p(A)}function _(A){return!h&&(A===null||A===41||oe(A))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(A)):h<c&&A===40?(e.consume(A),h++,_):A===41?(e.consume(A),h--,_):A===null||A===32||A===40||Jn(A)?n(A):(e.consume(A),A===92?N:_)}function N(A){return A===40||A===41||A===92?(e.consume(A),_):_(A)}}function Do(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),h}function h(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Y(p)||u++>999?(e.exit("chunkString"),h(p)):(e.consume(p),o||(o=!J(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),u++,d):d(p)}}function Po(e,t,n,r,i,a){let s;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),o(s)):f===null?n(f):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),te(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===s||f===null||Y(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===s||f===92?(e.consume(f),h):h(f)}}function pn(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):J(i)?te(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const vm={name:"definition",tokenize:Fm},Bm={partial:!0,tokenize:Hm};function Fm(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return Do.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=je(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return oe(p)?pn(e,c)(p):c(p)}function c(p){return Ro(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(Bm,d,d)(p)}function d(p){return J(p)?te(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Y(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Hm(e,t,n){return r;function r(u){return oe(u)?pn(e,i)(u):n(u)}function i(u){return Po(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return J(u)?te(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Y(u)?t(u):n(u)}}const Um={name:"hardBreakEscape",tokenize:jm};function jm(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Y(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const zm={name:"headingAtx",resolve:$m,tokenize:Ym};function $m(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"},Re(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Ym(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||oe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||Y(h)?(e.exit("atxHeading"),t(h)):J(h)?te(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const qm=["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"],ts=["pre","script","style","textarea"],Vm={concrete:!0,name:"htmlFlow",resolveTo:Qm,tokenize:Xm},Wm={partial:!0,tokenize:Zm},Gm={partial:!0,tokenize:Km};function Qm(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 Xm(e,t,n){const r=this;let i,a,s,u,o;return c;function c(k){return h(k)}function h(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),a=!0,_):k===63?(e.consume(k),i=3,r.interrupt?t:x):ye(k)?(e.consume(k),s=String.fromCharCode(k),N):n(k)}function f(k){return k===45?(e.consume(k),i=2,p):k===91?(e.consume(k),i=5,u=0,b):ye(k)?(e.consume(k),i=4,r.interrupt?t:x):n(k)}function p(k){return k===45?(e.consume(k),r.interrupt?t:x):n(k)}function b(k){const Be="CDATA[";return k===Be.charCodeAt(u++)?(e.consume(k),u===Be.length?r.interrupt?t:P:b):n(k)}function _(k){return ye(k)?(e.consume(k),s=String.fromCharCode(k),N):n(k)}function N(k){if(k===null||k===47||k===62||oe(k)){const Be=k===47,ct=s.toLowerCase();return!Be&&!a&&ts.includes(ct)?(i=1,r.interrupt?t(k):P(k)):qm.includes(s.toLowerCase())?(i=6,Be?(e.consume(k),A):r.interrupt?t(k):P(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):a?O(k):L(k))}return k===45||xe(k)?(e.consume(k),s+=String.fromCharCode(k),N):n(k)}function A(k){return k===62?(e.consume(k),r.interrupt?t:P):n(k)}function O(k){return J(k)?(e.consume(k),O):S(k)}function L(k){return k===47?(e.consume(k),S):k===58||k===95||ye(k)?(e.consume(k),U):J(k)?(e.consume(k),L):S(k)}function U(k){return k===45||k===46||k===58||k===95||xe(k)?(e.consume(k),U):j(k)}function j(k){return k===61?(e.consume(k),w):J(k)?(e.consume(k),j):L(k)}function w(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,V):J(k)?(e.consume(k),w):q(k)}function V(k){return k===o?(e.consume(k),o=null,Q):k===null||Y(k)?n(k):(e.consume(k),V)}function q(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||oe(k)?j(k):(e.consume(k),q)}function Q(k){return k===47||k===62||J(k)?L(k):n(k)}function S(k){return k===62?(e.consume(k),D):n(k)}function D(k){return k===null||Y(k)?P(k):J(k)?(e.consume(k),D):n(k)}function P(k){return k===45&&i===2?(e.consume(k),K):k===60&&i===1?(e.consume(k),se):k===62&&i===4?(e.consume(k),ie):k===63&&i===3?(e.consume(k),x):k===93&&i===5?(e.consume(k),re):Y(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wm,$e,$)(k)):k===null||Y(k)?(e.exit("htmlFlowData"),$(k)):(e.consume(k),P)}function $(k){return e.check(Gm,z,$e)(k)}function z(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),F}function F(k){return k===null||Y(k)?$(k):(e.enter("htmlFlowData"),P(k))}function K(k){return k===45?(e.consume(k),x):P(k)}function se(k){return k===47?(e.consume(k),s="",me):P(k)}function me(k){if(k===62){const Be=s.toLowerCase();return ts.includes(Be)?(e.consume(k),ie):P(k)}return ye(k)&&s.length<8?(e.consume(k),s+=String.fromCharCode(k),me):P(k)}function re(k){return k===93?(e.consume(k),x):P(k)}function x(k){return k===62?(e.consume(k),ie):k===45&&i===2?(e.consume(k),x):P(k)}function ie(k){return k===null||Y(k)?(e.exit("htmlFlowData"),$e(k)):(e.consume(k),ie)}function $e(k){return e.exit("htmlFlow"),t(k)}}function Km(e,t,n){const r=this;return i;function i(s){return Y(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 Zm(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ln,t,n)}}const Jm={name:"htmlText",tokenize:e1};function e1(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),L):ye(x)?(e.consume(x),q):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,b):ye(x)?(e.consume(x),O):n(x)}function h(x){return x===45?(e.consume(x),p):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):Y(x)?(s=d,se(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),p):d(x)}function p(x){return x===62?K(x):x===45?f(x):d(x)}function b(x){const ie="CDATA[";return x===ie.charCodeAt(a++)?(e.consume(x),a===ie.length?_:b):n(x)}function _(x){return x===null?n(x):x===93?(e.consume(x),N):Y(x)?(s=_,se(x)):(e.consume(x),_)}function N(x){return x===93?(e.consume(x),A):_(x)}function A(x){return x===62?K(x):x===93?(e.consume(x),A):_(x)}function O(x){return x===null||x===62?K(x):Y(x)?(s=O,se(x)):(e.consume(x),O)}function L(x){return x===null?n(x):x===63?(e.consume(x),U):Y(x)?(s=L,se(x)):(e.consume(x),L)}function U(x){return x===62?K(x):L(x)}function j(x){return ye(x)?(e.consume(x),w):n(x)}function w(x){return x===45||xe(x)?(e.consume(x),w):V(x)}function V(x){return Y(x)?(s=V,se(x)):J(x)?(e.consume(x),V):K(x)}function q(x){return x===45||xe(x)?(e.consume(x),q):x===47||x===62||oe(x)?Q(x):n(x)}function Q(x){return x===47?(e.consume(x),K):x===58||x===95||ye(x)?(e.consume(x),S):Y(x)?(s=Q,se(x)):J(x)?(e.consume(x),Q):K(x)}function S(x){return x===45||x===46||x===58||x===95||xe(x)?(e.consume(x),S):D(x)}function D(x){return x===61?(e.consume(x),P):Y(x)?(s=D,se(x)):J(x)?(e.consume(x),D):Q(x)}function P(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,$):Y(x)?(s=P,se(x)):J(x)?(e.consume(x),P):(e.consume(x),z)}function $(x){return x===i?(e.consume(x),i=void 0,F):x===null?n(x):Y(x)?(s=$,se(x)):(e.consume(x),$)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||oe(x)?Q(x):(e.consume(x),z)}function F(x){return x===47||x===62||oe(x)?Q(x):n(x)}function K(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function se(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),me}function me(x){return J(x)?te(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):re(x)}function re(x){return e.enter("htmlTextData"),s(x)}}const Ui={name:"labelEnd",resolveAll:i1,resolveTo:a1,tokenize:s1},t1={tokenize:u1},n1={tokenize:o1},r1={tokenize:l1};function i1(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&&Re(e,0,e.length,n),e}function a1(e,t){let n=e.length,r=0,i,a,s,u;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 o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=Pe(u,e.slice(a+1,a+r+3)),u=Pe(u,[["enter",h,t]]),u=Pe(u,Er(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=Pe(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=Pe(u,e.slice(s+1)),u=Pe(u,[["exit",o,t]]),Re(e,a,e.length,u),e}function s1(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 u;function u(f){return a?a._inactive?d(f):(s=r.parser.defined.includes(je(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(t1,h,s?h:d)(f):f===91?e.attempt(n1,h,s?c:d)(f):s?h(f):d(f)}function c(f){return e.attempt(r1,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function u1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return oe(d)?pn(e,a)(d):a(d)}function a(d){return d===41?h(d):Ro(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return oe(d)?pn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Po(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return oe(d)?pn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function o1(e,t,n){const r=this;return i;function i(u){return Do.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(je(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function l1(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 c1={name:"labelStartImage",resolveAll:Ui.resolveAll,tokenize:h1};function h1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const d1={name:"labelStartLink",resolveAll:Ui.resolveAll,tokenize:f1};function f1(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 Dr={name:"lineEnding",tokenize:p1};function p1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),te(e,t,"linePrefix")}}const Vn={name:"thematicBreak",tokenize:m1};function m1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),J(c)?te(e,u,"whitespace")(c):u(c))}}const Ne={continuation:{tokenize:T1},exit:k1,name:"list",tokenize:b1},g1={partial:!0,tokenize:_1},E1={partial:!0,tokenize:x1};function b1(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 u;function u(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ni(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Vn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return ni(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ln,r.interrupt?n:h,e.attempt(g1,f,d))}function h(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return J(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function T1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ln,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,te(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!J(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(E1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,te(e,e.attempt(Ne,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function x1(e,t,n){const r=this;return te(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 k1(e){e.exit(this.containerState.type)}function _1(e,t,n){const r=this;return te(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!J(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ns={name:"setextUnderline",resolveTo:A1,tokenize:y1};function A1(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 y1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),J(c)?te(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C1={tokenize:D1,partial:!0};function S1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:L1,continuation:{tokenize:O1},exit:R1}},text:{91:{name:"gfmFootnoteCall",tokenize:w1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:N1,resolveTo:I1}}}}function N1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=je(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function I1(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)},u=[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,...u),e}function w1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||oe(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(je(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return oe(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function L1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!u||b===null||b===91||oe(b))return n(b);if(b===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return a=je(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return oe(b)||(u=!0),s++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),te(e,p,"gfmFootnoteDefinitionWhitespace")):n(b)}function p(b){return t(b)}}function O1(e,t,n){return e.check(Ln,t,e.attempt(C1,t,n))}function R1(e){e.exit("gfmFootnoteDefinition")}function D1(e,t,n){const r=this;return te(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 P1(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,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],p=u.parser.constructs.insideSpan.null;p&&Re(f,f.length,0,Er(p,s.slice(c+1,o),u)),Re(f,f.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),Re(s,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(b){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(b):(s.enter("strikethroughSequenceTemporary"),p(b))}function p(b){const _=Ht(c);if(b===126)return d>1?o(b):(s.consume(b),d++,p);if(d<2&&!n)return o(b);const N=s.exit("strikethroughSequenceTemporary"),A=Ht(b);return N._open=!A||A===2&&!!_,N._close=!_||_===2&&!!A,u(b)}}}class M1{constructor(){this.map=[]}add(t,n,r){v1(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 v1(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 B1(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 F1(){return{flow:{null:{name:"table",tokenize:H1,resolveAll:U1}}}}function H1(e,t,n){const r=this;let i=0,a=0,s;return u;function u(S){let D=r.events.length-1;for(;D>-1;){const z=r.events[D][1].type;if(z==="lineEnding"||z==="linePrefix")D--;else break}const P=D>-1?r.events[D][1].type:null,$=P==="tableHead"||P==="tableRow"?w:o;return $===w&&r.parser.lazy[r.now().line]?n(S):$(S)}function o(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(s=!0,a+=1),h(S)}function h(S){return S===null?n(S):Y(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p):n(S):J(S)?te(e,h,"whitespace")(S):(a+=1,s&&(s=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||oe(S)?(e.exit("data"),h(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function p(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),s=!1,J(S)?te(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):b(S))}function b(S){return S===45||S===58?N(S):S===124?(s=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),_):j(S)}function _(S){return J(S)?te(e,N,"whitespace")(S):N(S)}function N(S){return S===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),A):S===45?(a+=1,A(S)):S===null||Y(S)?U(S):j(S)}function A(S){return S===45?(e.enter("tableDelimiterFiller"),O(S)):j(S)}function O(S){return S===45?(e.consume(S),O):S===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(S))}function L(S){return J(S)?te(e,U,"whitespace")(S):U(S)}function U(S){return S===124?b(S):S===null||Y(S)?!s||i!==a?j(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):j(S)}function j(S){return n(S)}function w(S){return e.enter("tableRow"),V(S)}function V(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),V):S===null||Y(S)?(e.exit("tableRow"),t(S)):J(S)?te(e,V,"whitespace")(S):(e.enter("data"),q(S))}function q(S){return S===null||S===124||oe(S)?(e.exit("data"),V(S)):(e.consume(S),S===92?Q:q)}function Q(S){return S===92||S===124?(e.consume(S),q):q(S)}}function U1(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const f=new M1;for(;++n<e.length;){const p=e[n],b=p[1];p[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(rs(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=Fn(f,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=Fn(f,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=Fn(f,t,a,i,n,d)):s[1]!==0&&(d=Fn(f,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&rs(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=B1(t.events,n))}return e}function Fn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Dt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Dt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Dt(t.events,n[2]),h=Dt(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,_=n[3]-n[2]-1;e.add(b,_,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Dt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function rs(e,t,n,r,i){const a=[],s=Dt(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 Dt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const j1={name:"tasklistCheck",tokenize:$1};function z1(){return{text:{91:j1}}}function $1(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return oe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return Y(o)?t(o):J(o)?e.check({tokenize:Y1},t,n)(o):n(o)}}function Y1(e,t,n){return te(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function q1(e){return To([tm(),S1(),P1(e),F1(),z1()])}const V1={};function W1(e){const t=this,n=e||V1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(q1(n)),a.push(Qp()),s.push(Xp(n))}var G1=Object.defineProperty,Q1=Object.defineProperties,X1=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,K1=Object.prototype.hasOwnProperty,Z1=Object.prototype.propertyIsEnumerable,as=(e,t,n)=>t in e?G1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mo=(e,t)=>{for(var n in t||(t={}))K1.call(t,n)&&as(e,n,t[n]);if(is)for(var n of is(t))Z1.call(t,n)&&as(e,n,t[n]);return e},vo=(e,t)=>Q1(e,X1(t)),J1=/(\*\*)([^*]*\*?)$/,eg=/(__)([^_]*?)$/,tg=/(\*\*\*)([^*]*?)$/,ng=/(\*)([^*]*?)$/,rg=/(_)([^_]*?)$/,ig=/(`)([^`]*?)$/,ag=/(~~)([^~]*?)$/,St=/^[\s_~*`]*$/,Bo=/^[\s]*[-*+][\s]+$/,sg=/[\p{L}\p{N}_]/u,ug=/^```[^`\n]*```?$/,og=/^\*{4,}$/,lg=/(__)([^_]+)_$/,cg=/(~~)([^~]+)~$/,hg=/__/g,ss=/~~/g,ut=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:sg.test(e)},_t=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},dg=(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},Fo=(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},br=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},fg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
16
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c=_n(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,n.options.closeAtx&&(c+=" "+s),o(),u(),c}uo.peek=gp;function uo(e){return e.value||""}function gp(){return"<"}oo.peek=Ep;function oo(e,t,n,r){const i=Mi(n),a=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),s(),c}function Ep(){return"!"}lo.peek=bp;function lo(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function bp(){return"!"}co.peek=Tp;function co(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],u=n.compilePattern(s);let o;if(s.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function Tp(){return"`"}function ho(e,t){const n=vi(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))}fo.peek=xp;function fo(e,t,n,r){const i=Mi(n),a=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let u,o;if(ho(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let d=s.move("<");return d+=s.move(n.containerPhrasing(e,{before:d,after:">",...s.current()})),d+=s.move(">"),u(),n.stack=h,d}u=n.enter("link"),o=n.enter("label");let c=s.move("[");return c+=s.move(n.containerPhrasing(e,{before:c,after:"](",...s.current()})),c+=s.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(n.safe(e.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(o=n.enter("destinationRaw"),c+=s.move(n.safe(e.url,{before:c,after:e.title?" ":")",...s.current()}))),o(),e.title&&(o=n.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(n.safe(e.title,{before:c,after:i,...s.current()})),c+=s.move(i),o()),c+=s.move(")"),u(),c}function xp(e,t,n){return ho(e,n)?"<":"["}po.peek=kp;function po(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let s=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),s();const h=n.stack;n.stack=[],s=n.enter("reference");const d=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return s(),n.stack=h,a(),i==="full"||!c||c!==d?o+=u.move(d+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function kp(){return"["}function Bi(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 _p(e){const t=Bi(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 Ap(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 mo(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 yp(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let s=e.ordered?Ap(n):Bi(n);const u=e.ordered?s==="."?")":".":_p(n);let o=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&h&&(!h.children||!h.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&&(o=!0),mo(n)===s&&h){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(s=u),n.bulletCurrent=s;const c=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=a,i(),c}function Cp(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 Sp(e,t,n,r){const i=Cp(n);let a=n.bulletCurrent||Bi(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 u=n.createTracker(r);u.move(a+" ".repeat(s-a.length)),u.shift(s);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),h);return o(),c;function h(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?a:a+" ".repeat(s-a.length))+d}}function Np(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),s=n.containerPhrasing(e,r);return a(),i(),s}const Ip=or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function wp(e,t,n,r){return(e.children.some(function(s){return Ip(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Lp(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}go.peek=Op;function go(e,t,n,r){const i=Lp(n),a=n.enter("strong"),s=n.createTracker(r),u=s.move(i+i);let o=s.move(n.containerPhrasing(e,{after:i,before:u,...s.current()}));const c=o.charCodeAt(0),h=tr(r.before.charCodeAt(r.before.length-1),c,i);h.inside&&(o=_n(c)+o.slice(1));const d=o.charCodeAt(o.length-1),f=tr(r.after.charCodeAt(0),d,i);f.inside&&(o=o.slice(0,-1)+_n(d));const p=s.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},u+o+p}function Op(e,t,n){return n.options.strong||"*"}function Rp(e,t,n,r){return n.safe(e.value,r)}function Dp(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 Pp(e,t,n){const r=(mo(n)+(n.options.ruleSpaces?" ":"")).repeat(Dp(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Eo={blockquote:tp,break:Va,code:up,definition:lp,emphasis:ao,hardBreak:Va,heading:mp,html:uo,image:oo,imageReference:lo,inlineCode:co,link:fo,linkReference:po,list:yp,listItem:Sp,paragraph:Np,root:wp,strong:go,text:Rp,thematicBreak:Pp},Ga=document.createElement("i");function Fi(e){const t="&"+e+";";Ga.innerHTML=t;const n=Ga.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function bo(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 Mp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vp(e){return e.replace(Mp,Bp)}function Bp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return bo(n.slice(a?2:1),a?16:10)}return Fi(n)||e}function Fp(){return{enter:{table:Hp,tableData:Qa,tableHeader:Qa,tableRow:jp},exit:{codeText:zp,table:Up,tableData:Rr,tableHeader:Rr,tableRow:Rr}}}function Hp(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 Up(e){this.exit(e),this.data.inTable=void 0}function jp(e){this.enter({type:"tableRow",children:[]},e)}function Rr(e){this.exit(e)}function Qa(e){this.enter({type:"tableCell",children:[]},e)}function zp(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$p));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $p(e,t){return t==="|"?t:e}function Yp(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
17
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:o,tableRow:u}};function s(p,b,A,N){return c(h(p,A,N),p.align)}function u(p,b,A,N){const _=d(p,A,N),R=c([_]);return R.slice(0,R.indexOf(`
|
|
18
|
+
`))}function o(p,b,A,N){const _=A.enter("tableCell"),R=A.enter("phrasing"),O=A.containerPhrasing(p,{...N,before:a,after:a});return R(),_(),O}function c(p,b){return J0(p,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(p,b,A){const N=p.children;let _=-1;const R=[],O=b.enter("table");for(;++_<N.length;)R[_]=d(N[_],b,A);return O(),R}function d(p,b,A){const N=p.children;let _=-1;const R=[],O=b.enter("tableRow");for(;++_<N.length;)R[_]=o(N[_],p,b,A);return O(),R}function f(p,b,A){let N=Eo.inlineCode(p,b,A);return A.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function qp(){return{exit:{taskListCheckValueChecked:Xa,taskListCheckValueUnchecked:Xa,paragraph:Wp}}}function Vp(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Gp}}}function Xa(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Wp(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 u=i[a];if(u.type==="paragraph"){s=u;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 Gp(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);a&&u.move(s);let o=Eo.listItem(e,t,n,{...r,...u.current()});return a&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(h){return h+s}}function Qp(){return[_0(),$0(),W0(),Fp(),qp()]}function Xp(e){return{extensions:[A0(),Y0(e),G0(),Yp(e),Vp()]}}function De(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 ve(e,t){return e.length>0?(De(e,e.length,0,t),e):t}const Ka={}.hasOwnProperty;function To(e){const t={};let n=-1;for(;++n<e.length;)Kp(t,e[n]);return t}function Kp(e,t){let n;for(n in t){const i=(Ka.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let s;if(a)for(s in a){Ka.call(i,s)||(i[s]=[]);const u=a[s];Zp(i[s],Array.isArray(u)?u:u?[u]:[])}}}function Zp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);De(e,0,0,r)}const Jp={tokenize:am,partial:!0},xo={tokenize:sm,partial:!0},ko={tokenize:um,partial:!0},_o={tokenize:om,partial:!0},em={tokenize:lm,partial:!0},Ao={name:"wwwAutolink",tokenize:rm,previous:Co},yo={name:"protocolAutolink",tokenize:im,previous:So},Je={name:"emailAutolink",tokenize:nm,previous:No},We={};function tm(){return{text:We}}let ft=48;for(;ft<123;)We[ft]=Je,ft++,ft===58?ft=65:ft===91&&(ft=97);We[43]=Je;We[45]=Je;We[46]=Je;We[95]=Je;We[72]=[Je,yo];We[104]=[Je,yo];We[87]=[Je,Ao];We[119]=[Je,Ao];function nm(e,t,n){const r=this;let i,a;return s;function s(d){return!ri(d)||!No.call(r,r.previous)||Hi(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(d))}function u(d){return ri(d)?(e.consume(d),u):d===64?(e.consume(d),o):n(d)}function o(d){return d===46?e.check(em,h,c)(d):d===45||d===95||ke(d)?(a=!0,e.consume(d),o):h(d)}function c(d){return e.consume(d),i=!0,o}function h(d){return a&&i&&Ce(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function rm(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Co.call(r,r.previous)||Hi(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Jp,e.attempt(xo,e.attempt(ko,a),n),n)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function im(e,t,n){const r=this;let i="",a=!1;return s;function s(d){return(d===72||d===104)&&So.call(r,r.previous)&&!Hi(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),u):n(d)}function u(d){if(Ce(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),u;if(d===58){const f=i.toLowerCase();if(f==="http"||f==="https")return e.consume(d),o}return n(d)}function o(d){return d===47?(e.consume(d),a?c:(a=!0,o)):n(d)}function c(d){return d===null||er(d)||oe(d)||kt(d)||Er(d)?n(d):e.attempt(xo,e.attempt(ko,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function am(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 sm(e,t,n){let r,i,a;return s;function s(c){return c===46||c===95?e.check(_o,o,u)(c):c===null||oe(c)||kt(c)||c!==45&&Er(c)?o(c):(a=!0,e.consume(c),s)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),s}function o(c){return i||r||!a?n(c):t(c)}}function um(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(_o,t,a)(s):s===null||oe(s)||kt(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&r++,e.consume(s),i}}function om(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),a):u===93?(e.consume(u),i):u===60||u===null||oe(u)||kt(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||oe(u)||kt(u)?t(u):r(u)}function a(u){return Ce(u)?s(u):n(u)}function s(u){return u===59?(e.consume(u),r):Ce(u)?(e.consume(u),s):n(u)}}function lm(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return ke(a)?n(a):t(a)}}function Co(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||oe(e)}function So(e){return!Ce(e)}function No(e){return!(e===47||ri(e))}function ri(e){return e===43||e===45||e===46||e===95||ke(e)}function Hi(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 qt(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let s="";if(a===37&&ke(e.charCodeAt(n+1))&&ke(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 u=e.charCodeAt(n+1);a<56320&&u>56319&&u<57344?(s=String.fromCharCode(a,u),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 br(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 ii={name:"attention",resolveAll:cm,tokenize:hm};function cm(e,t){let n=-1,r,i,a,s,u,o,c,h;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;o=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 d={...e[r][1].end},f={...e[n][1].start};Za(d,-o),Za(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=ve(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=ve(c,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),c=ve(c,br(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=ve(c,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,c=ve(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,De(e,r-1,n-r+3,c),n=r+c.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function hm(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ht(r);let a;return s;function s(o){return a=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===a)return e.consume(o),u;const c=e.exit("attentionSequence"),h=Ht(o),d=!h||h===2&&i||n.includes(o),f=!i||i===2&&h||n.includes(r);return c._open=!!(a===42?d:d&&(i||!f)),c._close=!!(a===42?f:f&&(h||!d)),t(o)}}function Za(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const dm={name:"autolink",tokenize:fm};function fm(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return Ce(p)?(e.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||ke(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||ke(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||er(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),h):p0(p)?(e.consume(p),c):n(p)}function h(p){return ke(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||ke(p))&&r++<63){const b=p===45?f:d;return e.consume(p),b}return n(p)}}function ne(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(o){return Z(o)?(e.enter(n),u(o)):t(o)}function u(o){return Z(o)&&a++<i?(e.consume(o),u):(e.exit(n),t(o))}}const On={partial:!0,tokenize:pm};function pm(e,t,n){return r;function r(a){return Z(a)?ne(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Y(a)?t(a):n(a)}}const Io={continuation:{tokenize:gm},exit:Em,name:"blockQuote",tokenize:mm};function mm(e,t,n){const r=this;return i;function i(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return n(s)}function a(s){return Z(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function gm(e,t,n){const r=this;return i;function i(s){return Z(s)?ne(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(Io,t,n)(s)}}function Em(e){e.exit("blockQuote")}const wo={name:"characterEscape",tokenize:bm};function bm(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 g0(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Lo={name:"characterReference",tokenize:Tm};function Tm(e,t,n){const r=this;let i=0,a,s;return u;function u(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),o}function o(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,s=ke,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=m0,h):(e.enter("characterReferenceValue"),a=7,s=ni,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return s===ke&&!Fi(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<a?(e.consume(d),h):n(d)}}const Ja={partial:!0,tokenize:km},es={concrete:!0,name:"codeFenced",tokenize:xm};function xm(e,t,n){const r=this,i={partial:!0,tokenize:j};let a=0,s=0,u;return o;function o(w){return c(w)}function c(w){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,u=w,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(w)}function h(w){return w===u?(s++,e.consume(w),h):s<3?n(w):(e.exit("codeFencedFenceSequence"),Z(w)?ne(e,d,"whitespace")(w):d(w))}function d(w){return w===null||Y(w)?(e.exit("codeFencedFence"),r.interrupt?t(w):e.check(Ja,A,H)(w)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(w))}function f(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(w)):Z(w)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ne(e,p,"whitespace")(w)):w===96&&w===u?n(w):(e.consume(w),f)}function p(w){return w===null||Y(w)?d(w):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===null||Y(w)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(w)):w===96&&w===u?n(w):(e.consume(w),b)}function A(w){return e.attempt(i,H,N)(w)}function N(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),_}function _(w){return a>0&&Z(w)?ne(e,R,"linePrefix",a+1)(w):R(w)}function R(w){return w===null||Y(w)?e.check(Ja,A,H)(w):(e.enter("codeFlowValue"),O(w))}function O(w){return w===null||Y(w)?(e.exit("codeFlowValue"),R(w)):(e.consume(w),O)}function H(w){return e.exit("codeFenced"),t(w)}function j(w,V,q){let Q=0;return S;function S(B){return w.enter("lineEnding"),w.consume(B),w.exit("lineEnding"),U}function U(B){return w.enter("codeFencedFence"),Z(B)?ne(w,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):L(B)}function L(B){return B===u?(w.enter("codeFencedFenceSequence"),$(B)):q(B)}function $(B){return B===u?(Q++,w.consume(B),$):Q>=s?(w.exit("codeFencedFenceSequence"),Z(B)?ne(w,z,"whitespace")(B):z(B)):q(B)}function z(B){return B===null||Y(B)?(w.exit("codeFencedFence"),V(B)):q(B)}}}function km(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 Dr={name:"codeIndented",tokenize:Am},_m={partial:!0,tokenize:ym};function Am(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ne(e,a,"linePrefix",5)(c)}function a(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):Y(c)?e.attempt(_m,s,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||Y(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function ym(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Y(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ne(e,a,"linePrefix",5)(s)}function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Y(s)?i(s):n(s)}}const Cm={name:"codeText",previous:Nm,resolve:Sm,tokenize:Im};function Sm(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 Nm(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Im(e,t,n){let r=0,i,a;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),u(d)}function u(d){return d===96?(e.consume(d),r++,u):(e.exit("codeTextSequence"),o(d))}function o(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),o):d===96?(a=e.enter("codeTextSequence"),i=0,h(d)):Y(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Y(d)?(e.exit("codeTextData"),o(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",c(d))}}class wm{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&&Zt(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),Zt(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zt(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);Zt(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zt(this.left,n.reverse())}}}function Zt(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 Oo(e){const t={};let n=-1,r,i,a,s,u,o,c;const h=new wm(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,a=0,a<o.length&&o[a][1].type==="lineEndingBlank"&&(a+=2),a<o.length&&o[a][1].type==="content"))for(;++a<o.length&&o[a][1].type!=="content";)o[a][1].type==="chunkText"&&(o[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Lm(h,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(s=h.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.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={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return De(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function Lm(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 u=s.events,o=[],c={};let h,d,f=-1,p=n,b=0,A=0;const N=[A];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<u.length;)u[f][0]==="exit"&&u[f-1][0]==="enter"&&u[f][1].type===u[f-1][1].type&&u[f][1].start.line!==u[f][1].end.line&&(A=f+1,N.push(A),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):N.pop(),f=N.length;f--;){const _=u.slice(N[f],N[f+1]),R=a.pop();o.push([R,R+_.length-1]),e.splice(R,2,_)}for(o.reverse(),f=-1;++f<o.length;)c[b+o[f][0]]=b+o[f][1],b+=o[f][1]-o[f][0]-1;return c}const Om={resolve:Dm,tokenize:Pm},Rm={partial:!0,tokenize:Mm};function Dm(e){return Oo(e),e}function Pm(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?a(u):Y(u)?e.check(Rm,s,a)(u):(e.consume(u),i)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Mm(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ne(e,a,"linePrefix")}function a(s){if(s===null||Y(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Ro(e,t,n,r,i,a,s,u,o){const c=o||Number.POSITIVE_INFINITY;let h=0;return d;function d(_){return _===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(_),e.exit(a),f):_===null||_===32||_===41||er(_)?n(_):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),A(_))}function f(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(_))}function p(_){return _===62?(e.exit("chunkString"),e.exit(u),f(_)):_===null||_===60||Y(_)?n(_):(e.consume(_),_===92?b:p)}function b(_){return _===60||_===62||_===92?(e.consume(_),p):p(_)}function A(_){return!h&&(_===null||_===41||oe(_))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(_)):h<c&&_===40?(e.consume(_),h++,A):_===41?(e.consume(_),h--,A):_===null||_===32||_===40||er(_)?n(_):(e.consume(_),_===92?N:A)}function N(_){return _===40||_===41||_===92?(e.consume(_),A):A(_)}}function Do(e,t,n,r,i,a){const s=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),h}function h(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Y(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||Y(p)||u++>999?(e.exit("chunkString"),h(p)):(e.consume(p),o||(o=!Z(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),u++,d):d(p)}}function Po(e,t,n,r,i,a){let s;return u;function u(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(a),c(f))}function c(f){return f===s?(e.exit(a),o(s)):f===null?n(f):Y(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ne(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===s||f===null||Y(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===s||f===92?(e.consume(f),h):h(f)}}function mn(e,t){let n;return r;function r(i){return Y(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?ne(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const vm={name:"definition",tokenize:Fm},Bm={partial:!0,tokenize:Hm};function Fm(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),s(p)}function s(p){return Do.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return oe(p)?mn(e,c)(p):c(p)}function c(p){return Ro(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(Bm,d,d)(p)}function d(p){return Z(p)?ne(e,f,"whitespace")(p):f(p)}function f(p){return p===null||Y(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Hm(e,t,n){return r;function r(u){return oe(u)?mn(e,i)(u):n(u)}function i(u){return Po(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return Z(u)?ne(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Y(u)?t(u):n(u)}}const Um={name:"hardBreakEscape",tokenize:jm};function jm(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Y(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const zm={name:"headingAtx",resolve:$m,tokenize:Ym};function $m(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"},De(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Ym(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||oe(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),o(h)):h===null||Y(h)?(e.exit("atxHeading"),t(h)):Z(h)?ne(e,u,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function o(h){return h===35?(e.consume(h),o):(e.exit("atxHeadingSequence"),u(h))}function c(h){return h===null||h===35||oe(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),c)}}const qm=["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"],ts=["pre","script","style","textarea"],Vm={concrete:!0,name:"htmlFlow",resolveTo:Qm,tokenize:Xm},Wm={partial:!0,tokenize:Zm},Gm={partial:!0,tokenize:Km};function Qm(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 Xm(e,t,n){const r=this;let i,a,s,u,o;return c;function c(k){return h(k)}function h(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),a=!0,A):k===63?(e.consume(k),i=3,r.interrupt?t:x):Ce(k)?(e.consume(k),s=String.fromCharCode(k),N):n(k)}function f(k){return k===45?(e.consume(k),i=2,p):k===91?(e.consume(k),i=5,u=0,b):Ce(k)?(e.consume(k),i=4,r.interrupt?t:x):n(k)}function p(k){return k===45?(e.consume(k),r.interrupt?t:x):n(k)}function b(k){const Pe="CDATA[";return k===Pe.charCodeAt(u++)?(e.consume(k),u===Pe.length?r.interrupt?t:L:b):n(k)}function A(k){return Ce(k)?(e.consume(k),s=String.fromCharCode(k),N):n(k)}function N(k){if(k===null||k===47||k===62||oe(k)){const Pe=k===47,ct=s.toLowerCase();return!Pe&&!a&&ts.includes(ct)?(i=1,r.interrupt?t(k):L(k)):qm.includes(s.toLowerCase())?(i=6,Pe?(e.consume(k),_):r.interrupt?t(k):L(k)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):a?R(k):O(k))}return k===45||ke(k)?(e.consume(k),s+=String.fromCharCode(k),N):n(k)}function _(k){return k===62?(e.consume(k),r.interrupt?t:L):n(k)}function R(k){return Z(k)?(e.consume(k),R):S(k)}function O(k){return k===47?(e.consume(k),S):k===58||k===95||Ce(k)?(e.consume(k),H):Z(k)?(e.consume(k),O):S(k)}function H(k){return k===45||k===46||k===58||k===95||ke(k)?(e.consume(k),H):j(k)}function j(k){return k===61?(e.consume(k),w):Z(k)?(e.consume(k),j):O(k)}function w(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,V):Z(k)?(e.consume(k),w):q(k)}function V(k){return k===o?(e.consume(k),o=null,Q):k===null||Y(k)?n(k):(e.consume(k),V)}function q(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||oe(k)?j(k):(e.consume(k),q)}function Q(k){return k===47||k===62||Z(k)?O(k):n(k)}function S(k){return k===62?(e.consume(k),U):n(k)}function U(k){return k===null||Y(k)?L(k):Z(k)?(e.consume(k),U):n(k)}function L(k){return k===45&&i===2?(e.consume(k),J):k===60&&i===1?(e.consume(k),re):k===62&&i===4?(e.consume(k),ge):k===63&&i===3?(e.consume(k),x):k===93&&i===5?(e.consume(k),ee):Y(k)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wm,ae,$)(k)):k===null||Y(k)?(e.exit("htmlFlowData"),$(k)):(e.consume(k),L)}function $(k){return e.check(Gm,z,ae)(k)}function z(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),B}function B(k){return k===null||Y(k)?$(k):(e.enter("htmlFlowData"),L(k))}function J(k){return k===45?(e.consume(k),x):L(k)}function re(k){return k===47?(e.consume(k),s="",me):L(k)}function me(k){if(k===62){const Pe=s.toLowerCase();return ts.includes(Pe)?(e.consume(k),ge):L(k)}return Ce(k)&&s.length<8?(e.consume(k),s+=String.fromCharCode(k),me):L(k)}function ee(k){return k===93?(e.consume(k),x):L(k)}function x(k){return k===62?(e.consume(k),ge):k===45&&i===2?(e.consume(k),x):L(k)}function ge(k){return k===null||Y(k)?(e.exit("htmlFlowData"),ae(k)):(e.consume(k),ge)}function ae(k){return e.exit("htmlFlow"),t(k)}}function Km(e,t,n){const r=this;return i;function i(s){return Y(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 Zm(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(On,t,n)}}const Jm={name:"htmlText",tokenize:e1};function e1(e,t,n){const r=this;let i,a,s;return u;function u(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),o}function o(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),j):x===63?(e.consume(x),O):Ce(x)?(e.consume(x),q):n(x)}function c(x){return x===45?(e.consume(x),h):x===91?(e.consume(x),a=0,b):Ce(x)?(e.consume(x),R):n(x)}function h(x){return x===45?(e.consume(x),p):n(x)}function d(x){return x===null?n(x):x===45?(e.consume(x),f):Y(x)?(s=d,re(x)):(e.consume(x),d)}function f(x){return x===45?(e.consume(x),p):d(x)}function p(x){return x===62?J(x):x===45?f(x):d(x)}function b(x){const ge="CDATA[";return x===ge.charCodeAt(a++)?(e.consume(x),a===ge.length?A:b):n(x)}function A(x){return x===null?n(x):x===93?(e.consume(x),N):Y(x)?(s=A,re(x)):(e.consume(x),A)}function N(x){return x===93?(e.consume(x),_):A(x)}function _(x){return x===62?J(x):x===93?(e.consume(x),_):A(x)}function R(x){return x===null||x===62?J(x):Y(x)?(s=R,re(x)):(e.consume(x),R)}function O(x){return x===null?n(x):x===63?(e.consume(x),H):Y(x)?(s=O,re(x)):(e.consume(x),O)}function H(x){return x===62?J(x):O(x)}function j(x){return Ce(x)?(e.consume(x),w):n(x)}function w(x){return x===45||ke(x)?(e.consume(x),w):V(x)}function V(x){return Y(x)?(s=V,re(x)):Z(x)?(e.consume(x),V):J(x)}function q(x){return x===45||ke(x)?(e.consume(x),q):x===47||x===62||oe(x)?Q(x):n(x)}function Q(x){return x===47?(e.consume(x),J):x===58||x===95||Ce(x)?(e.consume(x),S):Y(x)?(s=Q,re(x)):Z(x)?(e.consume(x),Q):J(x)}function S(x){return x===45||x===46||x===58||x===95||ke(x)?(e.consume(x),S):U(x)}function U(x){return x===61?(e.consume(x),L):Y(x)?(s=U,re(x)):Z(x)?(e.consume(x),U):Q(x)}function L(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,$):Y(x)?(s=L,re(x)):Z(x)?(e.consume(x),L):(e.consume(x),z)}function $(x){return x===i?(e.consume(x),i=void 0,B):x===null?n(x):Y(x)?(s=$,re(x)):(e.consume(x),$)}function z(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||oe(x)?Q(x):(e.consume(x),z)}function B(x){return x===47||x===62||oe(x)?Q(x):n(x)}function J(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function re(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),me}function me(x){return Z(x)?ne(e,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):ee(x)}function ee(x){return e.enter("htmlTextData"),s(x)}}const Ui={name:"labelEnd",resolveAll:i1,resolveTo:a1,tokenize:s1},t1={tokenize:u1},n1={tokenize:o1},r1={tokenize:l1};function i1(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&&De(e,0,e.length,n),e}function a1(e,t){let n=e.length,r=0,i,a,s,u;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 o={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=ve(u,e.slice(a+1,a+r+3)),u=ve(u,[["enter",h,t]]),u=ve(u,br(t.parser.constructs.insideSpan.null,e.slice(a+r+4,s-3),t)),u=ve(u,[["exit",h,t],e[s-2],e[s-1],["exit",c,t]]),u=ve(u,e.slice(s+1)),u=ve(u,[["exit",o,t]]),De(e,a,e.length,u),e}function s1(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 u;function u(f){return a?a._inactive?d(f):(s=r.parser.defined.includes(ze(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(t1,h,s?h:d)(f):f===91?e.attempt(n1,h,s?c:d)(f):s?h(f):d(f)}function c(f){return e.attempt(r1,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function u1(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return oe(d)?mn(e,a)(d):a(d)}function a(d){return d===41?h(d):Ro(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return oe(d)?mn(e,o)(d):h(d)}function u(d){return n(d)}function o(d){return d===34||d===39||d===40?Po(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return oe(d)?mn(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function o1(e,t,n){const r=this;return i;function i(u){return Do.call(r,e,a,s,"reference","referenceMarker","referenceString")(u)}function a(u){return r.parser.defined.includes(ze(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function l1(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 c1={name:"labelStartImage",resolveAll:Ui.resolveAll,tokenize:h1};function h1(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const d1={name:"labelStartLink",resolveAll:Ui.resolveAll,tokenize:f1};function f1(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 Pr={name:"lineEnding",tokenize:p1};function p1(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ne(e,t,"linePrefix")}}const Wn={name:"thematicBreak",tokenize:m1};function m1(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),s(c)}function s(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||Y(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),Z(c)?ne(e,u,"whitespace")(c):u(c))}}const Ie={continuation:{tokenize:T1},exit:k1,name:"list",tokenize:b1},g1={partial:!0,tokenize:_1},E1={partial:!0,tokenize:x1};function b1(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 u;function u(p){const b=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ni(p)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Wn,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return ni(p)&&++s<10?(e.consume(p),o):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(On,r.interrupt?n:h,e.attempt(g1,f,d))}function h(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return Z(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function T1(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(On,i,a);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ne(e,t,"listItemIndent",r.containerState.size+1)(u)}function a(u){return r.containerState.furtherBlankLines||!Z(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(E1,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ne(e,e.attempt(Ie,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function x1(e,t,n){const r=this;return ne(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 k1(e){e.exit(this.containerState.type)}function _1(e,t,n){const r=this;return ne(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!Z(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ns={name:"setextUnderline",resolveTo:A1,tokenize:y1};function A1(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 y1(e,t,n){const r=this;let i;return a;function a(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),Z(c)?ne(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||Y(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const C1={tokenize:D1,partial:!0};function S1(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:L1,continuation:{tokenize:O1},exit:R1}},text:{91:{name:"gfmFootnoteCall",tokenize:w1},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:N1,resolveTo:I1}}}}function N1(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){s=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!s||!s._balanced)return n(o);const c=ze(r.sliceSerialize({start:s.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function I1(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)},u=[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,...u),e}function w1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,s;return u;function u(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),o}function o(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(a>999||d===93&&!s||d===null||d===91||oe(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return i.includes(ze(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return oe(d)||(s=!0),a++,e.consume(d),d===92?h:c}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,c):c(d)}}function L1(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,s=0,u;return o;function o(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(s>999||b===93&&!u||b===null||b===91||oe(b))return n(b);if(b===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=ze(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return oe(b)||(u=!0),s++,e.consume(b),b===92?d:h}function d(b){return b===91||b===92||b===93?(e.consume(b),s++,h):h(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(a)||i.push(a),ne(e,p,"gfmFootnoteDefinitionWhitespace")):n(b)}function p(b){return t(b)}}function O1(e,t,n){return e.check(On,t,e.attempt(C1,t,n))}function R1(e){e.exit("gfmFootnoteDefinition")}function D1(e,t,n){const r=this;return ne(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 P1(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,u){let o=-1;for(;++o<s.length;)if(s[o][0]==="enter"&&s[o][1].type==="strikethroughSequenceTemporary"&&s[o][1]._close){let c=o;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[o][1].end.offset-s[o][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[o][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[o][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[o][1].start)},f=[["enter",h,u],["enter",s[c][1],u],["exit",s[c][1],u],["enter",d,u]],p=u.parser.constructs.insideSpan.null;p&&De(f,f.length,0,br(p,s.slice(c+1,o),u)),De(f,f.length,0,[["exit",d,u],["enter",s[o][1],u],["exit",s[o][1],u],["exit",h,u]]),De(s,c-1,o-c+3,f),o=c+f.length-2;break}}for(o=-1;++o<s.length;)s[o][1].type==="strikethroughSequenceTemporary"&&(s[o][1].type="data");return s}function a(s,u,o){const c=this.previous,h=this.events;let d=0;return f;function f(b){return c===126&&h[h.length-1][1].type!=="characterEscape"?o(b):(s.enter("strikethroughSequenceTemporary"),p(b))}function p(b){const A=Ht(c);if(b===126)return d>1?o(b):(s.consume(b),d++,p);if(d<2&&!n)return o(b);const N=s.exit("strikethroughSequenceTemporary"),_=Ht(b);return N._open=!_||_===2&&!!A,N._close=!A||A===2&&!!_,u(b)}}}class M1{constructor(){this.map=[]}add(t,n,r){v1(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 v1(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 B1(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 F1(){return{flow:{null:{name:"table",tokenize:H1,resolveAll:U1}}}}function H1(e,t,n){const r=this;let i=0,a=0,s;return u;function u(S){let U=r.events.length-1;for(;U>-1;){const z=r.events[U][1].type;if(z==="lineEnding"||z==="linePrefix")U--;else break}const L=U>-1?r.events[U][1].type:null,$=L==="tableHead"||L==="tableRow"?w:o;return $===w&&r.parser.lazy[r.now().line]?n(S):$(S)}function o(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(s=!0,a+=1),h(S)}function h(S){return S===null?n(S):Y(S)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p):n(S):Z(S)?ne(e,h,"whitespace")(S):(a+=1,s&&(s=!1,i+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),s=!0,h):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||oe(S)?(e.exit("data"),h(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function p(S){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(S):(e.enter("tableDelimiterRow"),s=!1,Z(S)?ne(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):b(S))}function b(S){return S===45||S===58?N(S):S===124?(s=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),A):j(S)}function A(S){return Z(S)?ne(e,N,"whitespace")(S):N(S)}function N(S){return S===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),_):S===45?(a+=1,_(S)):S===null||Y(S)?H(S):j(S)}function _(S){return S===45?(e.enter("tableDelimiterFiller"),R(S)):j(S)}function R(S){return S===45?(e.consume(S),R):S===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(S))}function O(S){return Z(S)?ne(e,H,"whitespace")(S):H(S)}function H(S){return S===124?b(S):S===null||Y(S)?!s||i!==a?j(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):j(S)}function j(S){return n(S)}function w(S){return e.enter("tableRow"),V(S)}function V(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),V):S===null||Y(S)?(e.exit("tableRow"),t(S)):Z(S)?ne(e,V,"whitespace")(S):(e.enter("data"),q(S))}function q(S){return S===null||S===124||oe(S)?(e.exit("data"),V(S)):(e.consume(S),S===92?Q:q)}function Q(S){return S===92||S===124?(e.consume(S),q):q(S)}}function U1(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],u=!1,o=0,c,h,d;const f=new M1;for(;++n<e.length;){const p=e[n],b=p[1];p[0]==="enter"?b.type==="tableHead"?(u=!1,o!==0&&(rs(f,t,o,c,h),h=void 0,o=0),c={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",c,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],s=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},f.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],d=Hn(f,t,a,i,void 0,d),a=[0,0,0,0]),s[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(s[0]=s[1],d=Hn(f,t,a,i,void 0,d)),a=s,s=[a[1],n,0,0])):b.type==="tableHead"?(u=!0,o=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(o=n,a[1]!==0?(s[0]=s[1],d=Hn(f,t,a,i,n,d)):s[1]!==0&&(d=Hn(f,t,s,i,n,d)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(s[3]=n)}for(o!==0&&rs(f,t,o,c,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=B1(t.events,n))}return e}function Hn(e,t,n,r,i,a){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(a.end=Object.assign({},Dt(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const o=Dt(t.events,n[1]);if(a={type:s,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Dt(t.events,n[2]),h=Dt(t.events,n[3]),d={type:u,start:Object.assign({},c),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,A=n[3]-n[2]-1;e.add(b,A,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(a.end=Object.assign({},Dt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function rs(e,t,n,r,i){const a=[],s=Dt(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 Dt(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const j1={name:"tasklistCheck",tokenize:$1};function z1(){return{text:{91:j1}}}function $1(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return oe(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),s):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),s):n(o)}function s(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return Y(o)?t(o):Z(o)?e.check({tokenize:Y1},t,n)(o):n(o)}}function Y1(e,t,n){return ne(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function q1(e){return To([tm(),S1(),P1(e),F1(),z1()])}const V1={};function W1(e){const t=this,n=e||V1,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(q1(n)),a.push(Qp()),s.push(Xp(n))}var G1=Object.defineProperty,Q1=Object.defineProperties,X1=Object.getOwnPropertyDescriptors,is=Object.getOwnPropertySymbols,K1=Object.prototype.hasOwnProperty,Z1=Object.prototype.propertyIsEnumerable,as=(e,t,n)=>t in e?G1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mo=(e,t)=>{for(var n in t||(t={}))K1.call(t,n)&&as(e,n,t[n]);if(is)for(var n of is(t))Z1.call(t,n)&&as(e,n,t[n]);return e},vo=(e,t)=>Q1(e,X1(t)),J1=/(\*\*)([^*]*\*?)$/,eg=/(__)([^_]*?)$/,tg=/(\*\*\*)([^*]*?)$/,ng=/(\*)([^*]*?)$/,rg=/(_)([^_]*?)$/,ig=/(`)([^`]*?)$/,ag=/(~~)([^~]*?)$/,St=/^[\s_~*`]*$/,Bo=/^[\s]*[-*+][\s]+$/,sg=/[\p{L}\p{N}_]/u,ug=/^```[^`\n]*```?$/,og=/^\*{4,}$/,lg=/(__)([^_]+)_$/,cg=/(~~)([^~]+)~$/,hg=/__/g,ss=/~~/g,ut=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:sg.test(e)},_t=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},dg=(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},Fo=(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},Tr=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},fg=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
19
19
|
`)return!1}return!1},Ho=(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]==="]"?fg(e,t):!1;if(e[n]===`
|
|
20
20
|
`)return!1}return!1},ji=(e,t,n)=>{let r=0;for(let o=t-1;o>=0;o-=1)if(e[o]===`
|
|
21
21
|
`){r=o+1;break}let i=e.length;for(let o=t;o<e.length;o+=1)if(e[o]===`
|
|
22
22
|
`){i=o;break}let a=e.substring(r,i),s=0,u=!1;for(let o of a)if(o===n)s+=1;else if(o!==" "&&o!==" "){u=!0;break}return s>=3&&!u},pg=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,mg=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(pg,(t,n,r,i)=>_t(e,i)?t:`${n}\\>${r}`),gg=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let i=t-1;i>=0;i-=1)if(e[i]===`
|
|
23
|
-
`){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},Eg=(e,t,n,r)=>n==="\\"||e.includes("$")&&
|
|
23
|
+
`){r=i+1;break}for(let i=r;i<t;i+=1)if(e[i]!==" "&&e[i]!==" ")return!1;return!0},Eg=(e,t,n,r)=>n==="\\"||e.includes("$")&&Tr(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ut(n)&&ut(r)||(!n||n===" "||n===" "||n===`
|
|
24
24
|
`)&&(!r||r===" "||r===" "||r===`
|
|
25
|
-
`)||gg(e,t,r)),Uo=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";Eg(e,r,i,a)||(t+=1)}return t},bg=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&
|
|
25
|
+
`)||gg(e,t,r)),Uo=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";Eg(e,r,i,a)||(t+=1)}return t},bg=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&Tr(e,t)||Ho(e,t)||n==="_"||r==="_"||n&&r&&ut(n)&&ut(r)),Tg=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";bg(e,r,i,a)||(t+=1)}return t},xg=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},kg=(e,t,n)=>{if(!t||St.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
26
26
|
`),i=r===-1?0:r+1,a=e.substring(i,n);return Bo.test(a)&&t.includes(`
|
|
27
27
|
`)?!0:ji(e,n,"*")},_g=e=>{let t=e.match(J1);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return _t(e,r)||kg(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Ag=(e,t,n)=>{if(!t||St.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
28
28
|
`),i=r===-1?0:r+1,a=e.substring(i,n);return Bo.test(a)&&t.includes(`
|
|
29
|
-
`)?!0:ji(e,n,"_")},yg=e=>{let t=e.match(eg);if(!t){let i=e.match(lg);if(i){let a=e.lastIndexOf(i[1]);if(!_t(e,a)&&(e.match(hg)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return _t(e,r)||Ag(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Cg=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!
|
|
29
|
+
`)?!0:ji(e,n,"_")},yg=e=>{let t=e.match(eg);if(!t){let i=e.match(lg);if(i){let a=e.lastIndexOf(i[1]);if(!_t(e,a)&&(e.match(hg)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return _t(e,r)||Ag(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Cg=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!Tr(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if((!n||n===" "||n===" "||n===`
|
|
30
30
|
`)&&(!r||r===" "||r===" "||r===`
|
|
31
|
-
`)||n&&r&&ut(n)&&ut(r))continue;return t}return-1},Sg=e=>{if(!e.match(ng))return e;let t=Cg(e);if(t===-1||_t(e,t))return e;let n=e.substring(t+1);return!n||St.test(n)?e:Uo(e)%2===1?`${e}*`:e},jo=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!
|
|
32
|
-
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Ig=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=jo(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},wg=e=>{if(!e.match(rg))return e;let t=jo(e);if(t===-1||_t(e,t))return e;let n=e.substring(t+1);if(!n||St.test(n))return e;if(Tg(e)%2===1){let r=Ig(e);return r!==null?r:Ng(e)}return e},Lg=e=>{let t=(e.match(/\*\*/g)||[]).length,n=Uo(e);return t%2===0&&n%2===0},Og=(e,t,n)=>!t||St.test(t)||_t(e,n)?!0:ji(e,n,"*"),Rg=e=>{if(og.test(e))return e;let t=e.match(tg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Og(e,n,r)?e:xg(e)%2===1?Lg(e)?e:`${e}***`:e},
|
|
31
|
+
`)||n&&r&&ut(n)&&ut(r))continue;return t}return-1},Sg=e=>{if(!e.match(ng))return e;let t=Cg(e);if(t===-1||_t(e,t))return e;let n=e.substring(t+1);return!n||St.test(n)?e:Uo(e)%2===1?`${e}*`:e},jo=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!Tr(e,t)&&!Ho(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ut(n)&&ut(r))continue;return t}return-1},Ng=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
32
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Ig=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=jo(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},wg=e=>{if(!e.match(rg))return e;let t=jo(e);if(t===-1||_t(e,t))return e;let n=e.substring(t+1);if(!n||St.test(n))return e;if(Tg(e)%2===1){let r=Ig(e);return r!==null?r:Ng(e)}return e},Lg=e=>{let t=(e.match(/\*\*/g)||[]).length,n=Uo(e);return t%2===0&&n%2===0},Og=(e,t,n)=>!t||St.test(t)||_t(e,n)?!0:ji(e,n,"*"),Rg=e=>{if(og.test(e))return e;let t=e.match(tg);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Og(e,n,r)?e:xg(e)%2===1?Lg(e)?e:`${e}***`:e},An=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},Dg=(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},Pg=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!Dg(e,n)&&(t+=1);return t},Mg=/<[a-zA-Z/][^>]*$/,vg=e=>{let t=e.match(Mg);return!t||t.index===void 0||An(e,t.index)?e:e.substring(0,t.index).trimEnd()},Bg=e=>!e.match(ug)||e.includes(`
|
|
33
33
|
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Fg=e=>(e.match(/```/g)||[]).length%2===1,Hg=e=>{let t=Bg(e);if(t!==null)return t;let n=e.match(ig);if(n&&!Fg(e)){let r=n[2];if(!r||St.test(r))return e;if(Pg(e)%2===1)return`${e}\``}return e},Ug=(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)==="```",jg=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Ug(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},zg=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
34
34
|
`,t)!==-1&&!e.endsWith(`
|
|
35
35
|
`)?`${e}
|
|
36
|
-
$$`:`${e}$$`},$g=e=>jg(e)%2===0?e:zg(e),Yg=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=dg(e,t);if(r===-1||
|
|
36
|
+
$$`:`${e}$$`},$g=e=>jg(e)%2===0?e:zg(e),Yg=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=dg(e,t);if(r===-1||An(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 u=e.substring(r+1,t);return n==="text-only"?`${s}${u}`:`${s}[${u}](streamdown:incomplete-link)`},us=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!An(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Fo(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-1},qg=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t,a=e.substring(t+1);if(!a.includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=us(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${s}${a}`}return`${e}](streamdown:incomplete-link)`}if(Fo(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let u=us(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let o=e.substring(t+1);return`${s}${o}`}return`${e}](streamdown:incomplete-link)`}return null},zo=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!An(e,n)){let r=Yg(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!An(e,r)){let i=qg(e,r,t);if(i!==null)return i}return e},Vg=/^-{1,2}$/,Wg=/^[\s]*-{1,2}[\s]+$/,Gg=/^={1,2}$/,Qg=/^[\s]*={1,2}[\s]+$/,Xg=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
37
37
|
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(Vg.test(i)&&!n.match(Wg)){let a=r.split(`
|
|
38
38
|
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(Gg.test(i)&&!n.match(Qg)){let a=r.split(`
|
|
39
|
-
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},Kg=e=>{let t=e.match(ag);if(t){let n=t[2];if(!n||St.test(n))return e;if((e.match(ss)||[]).length%2===1)return`${e}~~`}else if(e.match(cg)&&(e.match(ss)||[]).length%2===1)return`${e}~`;return e},
|
|
40
|
-
`,c="/",h="*",d="",f="comment",p="declaration";function b(N,A){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];A=A||{};var O=1,L=1;function U(z){var F=z.match(t);F&&(O+=F.length);var K=z.lastIndexOf(o);L=~K?z.length-K:L+z.length}function j(){var z={line:O,column:L};return function(F){return F.position=new w(z),Q(),F}}function w(z){this.start=z,this.end={line:O,column:L},this.source=A.source}w.prototype.content=N;function V(z){var F=new Error(A.source+":"+O+":"+L+": "+z);if(F.reason=z,F.filename=A.source,F.line=O,F.column=L,F.source=N,!A.silent)throw F}function q(z){var F=z.exec(N);if(F){var K=F[0];return U(K),N=N.slice(K.length),F}}function Q(){q(n)}function S(z){var F;for(z=z||[];F=D();)F!==!1&&z.push(F);return z}function D(){var z=j();if(!(c!=N.charAt(0)||h!=N.charAt(1))){for(var F=2;d!=N.charAt(F)&&(h!=N.charAt(F)||c!=N.charAt(F+1));)++F;if(F+=2,d===N.charAt(F-1))return V("End of comment missing");var K=N.slice(2,F-2);return L+=2,U(K),N=N.slice(F),L+=2,z({type:f,comment:K})}}function P(){var z=j(),F=q(r);if(F){if(D(),!q(i))return V("property missing ':'");var K=q(a),se=z({type:p,property:_(F[0].replace(e,d)),value:K?_(K[0].replace(e,d)):d});return q(s),se}}function $(){var z=[];S(z);for(var F;F=P();)F!==!1&&(z.push(F),S(z));return z}return Q(),$()}function _(N){return N?N.replace(u,d):d}return Mr=b,Mr}var hs;function oE(){if(hs)return Rt;hs=1;var e=Rt&&Rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.default=n;const t=e(uE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return Rt}var Jt={},ds;function lE(){if(ds)return Jt;ds=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Jt.camelCase=o,Jt}var en,fs;function cE(){if(fs)return en;fs=1;var e=en&&en.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(oE()),n=lE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,en=r,en}var hE=cE();const dE=Zs(hE);function mn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ps(e.position):"start"in e||"end"in e?ps(e):"line"in e||"column"in e?ai(e):""}function ai(e){return ms(e&&e.line)+":"+ms(e&&e.column)}function ps(e){return ai(e&&e.start)+"-"+ai(e&&e.end)}function ms(e){return e&&typeof e=="number"?e:1}class _e 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 o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=mn(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}}_e.prototype.file="";_e.prototype.name="";_e.prototype.reason="";_e.prototype.message="";_e.prototype.stack="";_e.prototype.column=void 0;_e.prototype.line=void 0;_e.prototype.ancestors=void 0;_e.prototype.cause=void 0;_e.prototype.fatal=void 0;_e.prototype.place=void 0;_e.prototype.ruleId=void 0;_e.prototype.source=void 0;const zi={}.hasOwnProperty,fE=new Map,pE=/[A-Z]/g,mE=new Set(["table","tbody","thead","tfoot","tr"]),gE=new Set(["td","th"]),$o="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function EE(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=CE(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=yE(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"?ot:Sn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Yo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Yo(e,t,n){if(t.type==="element")return bE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kE(e,t,n);if(t.type==="mdxjsEsm")return xE(e,t);if(t.type==="root")return _E(e,t,n);if(t.type==="text")return AE(e,t)}function bE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=Vo(e,t.tagName,!1),s=SE(e,t);let u=Yi(e,t);return mE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!sE(o):!0})),qo(e,s,a,t),$i(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function TE(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)}An(e,t.position)}function xE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);An(e,t.position)}function kE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Vo(e,t.name,!0),s=NE(e,t),u=Yi(e,t);return qo(e,s,a,t),$i(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function _E(e,t,n){const r={};return $i(r,Yi(e,t)),e.create(t,e.Fragment,r,n)}function AE(e,t){return t.value}function qo(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $i(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function yE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function CE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=Ve(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function SE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&zi.call(t.properties,i)){const a=IE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&gE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function NE(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 u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else An(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 u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else An(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Yi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=Yo(e,a,s);u!==void 0&&n.push(u)}return n}function IE(e,t,n){const r=cr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hu(n):du(n)),r.property==="style"){let i=typeof n=="object"?n:wE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=LE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?zc[r.property]||r.property:r.attribute,n]}}function wE(e,t){try{return dE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new _e("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=$o+"#cannot-parse-style-attribute",i}}function Vo(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 u=os(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=os(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return zi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);An(e)}function An(e,t){const n=new _e("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=$o+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LE(e){const t={};let n;for(n in e)zi.call(e,n)&&(t[OE(n)]=e[n]);return t}function OE(e){let t=e.replace(pE,RE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RE(e){return"-"+e.toLowerCase()}const vr={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"]},DE={tokenize:PE};function PE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),te(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Y(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const ME={tokenize:vE},gs={tokenize:BE};function vE(e){const t=this,n=[];let r=0,i,a,s;return u;function u(L){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,o,c)(L)}return c(L)}function o(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&O();const U=t.events.length;let j=U,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}A(r);let V=U;for(;V<t.events.length;)t.events[V][1].end={...w},V++;return Re(t.events,j+1,0,t.events.slice(U)),t.events.length=V,c(L)}return u(L)}function c(L){if(r===n.length){if(!i)return f(L);if(i.currentConstruct&&i.currentConstruct.concrete)return b(L);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gs,h,d)(L)}function h(L){return i&&O(),A(r),f(L)}function d(L){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(L)}function f(L){return t.containerState={},e.attempt(gs,p,b)(L)}function p(L){return r++,n.push([t.currentConstruct,t.containerState]),f(L)}function b(L){if(L===null){i&&O(),A(0),e.consume(L);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),_(L)}function _(L){if(L===null){N(e.exit("chunkFlow"),!0),A(0),e.consume(L);return}return Y(L)?(e.consume(L),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(L),_)}function N(L,U){const j=t.sliceStream(L);if(U&&j.push(null),L.previous=a,a&&(a.next=L),a=L,i.defineSkip(L.start),i.write(j),t.parser.lazy[L.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const V=t.events.length;let q=V,Q,S;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(Q){S=t.events[q][1].end;break}Q=!0}for(A(r),w=V;w<t.events.length;)t.events[w][1].end={...S},w++;Re(t.events,q+1,0,t.events.slice(V)),t.events.length=w}}function A(L){let U=n.length;for(;U-- >L;){const j=n[U];t.containerState=j[1],j[0].exit.call(t,e)}n.length=L}function O(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function BE(e,t,n){return te(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const FE={tokenize:HE};function HE(e){const t=this,n=e.attempt(Ln,r,e.attempt(this.parser.constructs.flowInitial,i,te(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Om,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 UE={resolveAll:Go()},jE=Wo("string"),zE=Wo("text");function Wo(e){return{resolveAll:Go(e==="text"?$E:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Go(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 $E(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,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const YE={42:Ne,43:Ne,45:Ne,48:Ne,49:Ne,50:Ne,51:Ne,52:Ne,53:Ne,54:Ne,55:Ne,56:Ne,57:Ne,62:Io},qE={91:vm},VE={[-2]:Rr,[-1]:Rr,32:Rr},WE={35:zm,42:Vn,45:[ns,Vn],60:Vm,61:ns,95:Vn,96:es,126:es},GE={38:Lo,92:wo},QE={[-5]:Dr,[-4]:Dr,[-3]:Dr,33:c1,38:Lo,42:ii,60:[dm,Jm],91:d1,92:[Um,wo],93:Ui,95:ii,96:Cm},XE={null:[ii,UE]},KE={null:[42,95]},ZE={null:[]},JE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:KE,contentInitial:qE,disable:ZE,document:YE,flow:WE,flowInitial:VE,insideSpan:XE,string:GE,text:QE},Symbol.toStringTag,{value:"Module"}));function eb(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=[],u=[];const o={attempt:V(j),check:V(w),consume:O,enter:L,exit:U,interrupt:V(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:_,events:[],now:b,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(D){return s=Pe(s,D),N(),s[s.length-1]!==null?[]:(q(t,0),c.events=Er(a,c.events,c),c.events)}function f(D,P){return nb(p(D),P)}function p(D){return tb(s,D)}function b(){const{_bufferIndex:D,_index:P,line:$,column:z,offset:F}=r;return{_bufferIndex:D,_index:P,line:$,column:z,offset:F}}function _(D){i[D.line]=D.column,S()}function N(){let D;for(;r._index<s.length;){const P=s[r._index];if(typeof P=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<P.length;)A(P.charCodeAt(r._bufferIndex));else A(P)}}function A(D){h=h(D)}function O(D){Y(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,S()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=D}function L(D,P){const $=P||{};return $.type=D,$.start=b(),c.events.push(["enter",$,c]),u.push($),$}function U(D){const P=u.pop();return P.end=b(),c.events.push(["exit",P,c]),P}function j(D,P){q(D,P.from)}function w(D,P){P.restore()}function V(D,P){return $;function $(z,F,K){let se,me,re,x;return Array.isArray(z)?$e(z):"tokenize"in z?$e([z]):ie(z);function ie(be){return Vt;function Vt(et){const It=et!==null&&be[et],wt=et!==null&&be.null,Pn=[...Array.isArray(It)?It:It?[It]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return $e(Pn)(et)}}function $e(be){return se=be,me=0,be.length===0?K:k(be[me])}function k(be){return Vt;function Vt(et){return x=Q(),re=be,be.partial||(c.currentConstruct=be),be.name&&c.parser.constructs.disable.null.includes(be.name)?ct():be.tokenize.call(P?Object.assign(Object.create(c),P):c,o,Be,ct)(et)}}function Be(be){return D(re,x),F}function ct(be){return x.restore(),++me<se.length?k(se[me]):K}}}function q(D,P){D.resolveAll&&!a.includes(D)&&a.push(D),D.resolve&&Re(c.events,P,c.events.length-P,D.resolve(c.events.slice(P),c)),D.resolveTo&&(c.events=D.resolveTo(c.events,c))}function Q(){const D=b(),P=c.previous,$=c.currentConstruct,z=c.events.length,F=Array.from(u);return{from:z,restore:K};function K(){r=D,c.previous=P,c.currentConstruct=$,c.events.length=z,u=F,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tb(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function nb(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=`
|
|
39
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},Kg=e=>{let t=e.match(ag);if(t){let n=t[2];if(!n||St.test(n))return e;if((e.match(ss)||[]).length%2===1)return`${e}~~`}else if(e.match(cg)&&(e.match(ss)||[]).length%2===1)return`${e}~`;return e},Mr=e=>e!==!1,ye={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},Zg=[{handler:{name:"comparisonOperators",handle:mg,priority:ye.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:vg,priority:ye.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Xg,priority:ye.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:zo,priority:ye.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Rg,priority:ye.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:_g,priority:ye.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:yg,priority:ye.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Sg,priority:ye.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:wg,priority:ye.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Hg,priority:ye.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Kg,priority:ye.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:$g,priority:ye.KATEX},optionKey:"katex"}],Jg=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return Zg.filter(({handler:r,optionKey:i})=>r.name==="links"?Mr(e?.links)||Mr(e?.images):Mr(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:vo(Mo({},r),{handle:a=>zo(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},eE=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=Jg(t),a=((n=t?.handlers)!=null?n:[]).map(u=>{var o;return{handler:vo(Mo({},u),{priority:(o=u.priority)!=null?o:ye.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((u,o)=>{var c,h;return((c=u.handler.priority)!=null?c:ye.DEFAULT)-((h=o.handler.priority)!=null?h:ye.DEFAULT)});for(let{handler:u,earlyReturn:o}of s)if(r=u.handle(r),o!=null&&o(r))return r;return r},tE=eE;const nE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iE={};function os(e,t){return(iE.jsx?rE:nE).test(e)}const aE=/[ \t\n\f\r]/g;function sE(e){return typeof e=="object"?e.type==="text"?ls(e.value):!1:ls(e)}function ls(e){return e.replace(aE,"")===""}var Rt={},vr,cs;function uE(){if(cs)return vr;cs=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
40
|
+
`,c="/",h="*",d="",f="comment",p="declaration";function b(N,_){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];_=_||{};var R=1,O=1;function H(z){var B=z.match(t);B&&(R+=B.length);var J=z.lastIndexOf(o);O=~J?z.length-J:O+z.length}function j(){var z={line:R,column:O};return function(B){return B.position=new w(z),Q(),B}}function w(z){this.start=z,this.end={line:R,column:O},this.source=_.source}w.prototype.content=N;function V(z){var B=new Error(_.source+":"+R+":"+O+": "+z);if(B.reason=z,B.filename=_.source,B.line=R,B.column=O,B.source=N,!_.silent)throw B}function q(z){var B=z.exec(N);if(B){var J=B[0];return H(J),N=N.slice(J.length),B}}function Q(){q(n)}function S(z){var B;for(z=z||[];B=U();)B!==!1&&z.push(B);return z}function U(){var z=j();if(!(c!=N.charAt(0)||h!=N.charAt(1))){for(var B=2;d!=N.charAt(B)&&(h!=N.charAt(B)||c!=N.charAt(B+1));)++B;if(B+=2,d===N.charAt(B-1))return V("End of comment missing");var J=N.slice(2,B-2);return O+=2,H(J),N=N.slice(B),O+=2,z({type:f,comment:J})}}function L(){var z=j(),B=q(r);if(B){if(U(),!q(i))return V("property missing ':'");var J=q(a),re=z({type:p,property:A(B[0].replace(e,d)),value:J?A(J[0].replace(e,d)):d});return q(s),re}}function $(){var z=[];S(z);for(var B;B=L();)B!==!1&&(z.push(B),S(z));return z}return Q(),$()}function A(N){return N?N.replace(u,d):d}return vr=b,vr}var hs;function oE(){if(hs)return Rt;hs=1;var e=Rt&&Rt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.default=n;const t=e(uE());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const s=(0,t.default)(r),u=typeof i=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:c,value:h}=o;u?i(c,h,o):h&&(a=a||{},a[c]=h)}),a}return Rt}var Jt={},ds;function lE(){if(ds)return Jt;ds=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(c){return!c||n.test(c)||e.test(c)},s=function(c,h){return h.toUpperCase()},u=function(c,h){return"".concat(h,"-")},o=function(c,h){return h===void 0&&(h={}),a(c)?c:(c=c.toLowerCase(),h.reactCompat?c=c.replace(i,u):c=c.replace(r,u),c.replace(t,s))};return Jt.camelCase=o,Jt}var en,fs;function cE(){if(fs)return en;fs=1;var e=en&&en.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(oE()),n=lE();function r(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(u,o){u&&o&&(s[(0,n.camelCase)(u,a)]=o)}),s}return r.default=r,en=r,en}var hE=cE();const dE=Zs(hE);function gn(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ps(e.position):"start"in e||"end"in e?ps(e):"line"in e||"column"in e?ai(e):""}function ai(e){return ms(e&&e.line)+":"+ms(e&&e.column)}function ps(e){return ai(e&&e.start)+"-"+ai(e&&e.end)}function ms(e){return e&&typeof e=="number"?e:1}class Ae 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 o=r.indexOf(":");o===-1?a.ruleId=r:(a.source=r.slice(0,o),a.ruleId=r.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=gn(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}}Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;const zi={}.hasOwnProperty,fE=new Map,pE=/[A-Z]/g,mE=new Set(["table","tbody","thead","tfoot","tr"]),gE=new Set(["td","th"]),$o="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function EE(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=CE(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=yE(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"?ot:Nn,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Yo(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Yo(e,t,n){if(t.type==="element")return bE(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TE(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kE(e,t,n);if(t.type==="mdxjsEsm")return xE(e,t);if(t.type==="root")return _E(e,t,n);if(t.type==="text")return AE(e,t)}function bE(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=Vo(e,t.tagName,!1),s=SE(e,t);let u=Yi(e,t);return mE.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!sE(o):!0})),qo(e,s,a,t),$i(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function TE(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)}yn(e,t.position)}function xE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yn(e,t.position)}function kE(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ot,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Vo(e,t.name,!0),s=NE(e,t),u=Yi(e,t);return qo(e,s,a,t),$i(s,u),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function _E(e,t,n){const r={};return $i(r,Yi(e,t)),e.create(t,e.Fragment,r,n)}function AE(e,t){return t.value}function qo(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function $i(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function yE(e,t,n){return r;function r(i,a,s,u){const c=Array.isArray(s.children)?n:t;return u?c(a,s,u):c(a,s)}}function CE(e,t){return n;function n(r,i,a,s){const u=Array.isArray(a.children),o=Ve(r);return t(i,a,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function SE(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&zi.call(t.properties,i)){const a=IE(e,i,t.properties[i]);if(a){const[s,u]=a;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&gE.has(t.tagName)?r=u:n[s]=u}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function NE(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 u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else yn(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 u=r.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else yn(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Yi(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:fE;for(;++r<t.children.length;){const a=t.children[r];let s;if(e.passKeys){const o=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(o){const c=i.get(o)||0;s=o+"-"+c,i.set(o,c+1)}}const u=Yo(e,a,s);u!==void 0&&n.push(u)}return n}function IE(e,t,n){const r=hr(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hu(n):du(n)),r.property==="style"){let i=typeof n=="object"?n:wE(e,String(n));return e.stylePropertyNameCase==="css"&&(i=LE(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?zc[r.property]||r.property:r.attribute,n]}}function wE(e,t){try{return dE(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ae("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=$o+"#cannot-parse-style-attribute",i}}function Vo(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 u=os(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}r=s}else r=os(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return zi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);yn(e)}function yn(e,t){const n=new Ae("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=$o+"#cannot-handle-mdx-estrees-without-createevaluater",n}function LE(e){const t={};let n;for(n in e)zi.call(e,n)&&(t[OE(n)]=e[n]);return t}function OE(e){let t=e.replace(pE,RE);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function RE(e){return"-"+e.toLowerCase()}const Br={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"]},DE={tokenize:PE};function PE(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ne(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),a(u)}function a(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Y(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),s)}}const ME={tokenize:vE},gs={tokenize:BE};function vE(e){const t=this,n=[];let r=0,i,a,s;return u;function u(O){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,o,c)(O)}return c(O)}function o(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const H=t.events.length;let j=H,w;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){w=t.events[j][1].end;break}_(r);let V=H;for(;V<t.events.length;)t.events[V][1].end={...w},V++;return De(t.events,j+1,0,t.events.slice(H)),t.events.length=V,c(O)}return u(O)}function c(O){if(r===n.length){if(!i)return f(O);if(i.currentConstruct&&i.currentConstruct.concrete)return b(O);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gs,h,d)(O)}function h(O){return i&&R(),_(r),f(O)}function d(O){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,b(O)}function f(O){return t.containerState={},e.attempt(gs,p,b)(O)}function p(O){return r++,n.push([t.currentConstruct,t.containerState]),f(O)}function b(O){if(O===null){i&&R(),_(0),e.consume(O);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),A(O)}function A(O){if(O===null){N(e.exit("chunkFlow"),!0),_(0),e.consume(O);return}return Y(O)?(e.consume(O),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(O),A)}function N(O,H){const j=t.sliceStream(O);if(H&&j.push(null),O.previous=a,a&&(a.next=O),a=O,i.defineSkip(O.start),i.write(j),t.parser.lazy[O.start.line]){let w=i.events.length;for(;w--;)if(i.events[w][1].start.offset<s&&(!i.events[w][1].end||i.events[w][1].end.offset>s))return;const V=t.events.length;let q=V,Q,S;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(Q){S=t.events[q][1].end;break}Q=!0}for(_(r),w=V;w<t.events.length;)t.events[w][1].end={...S},w++;De(t.events,q+1,0,t.events.slice(V)),t.events.length=w}}function _(O){let H=n.length;for(;H-- >O;){const j=n[H];t.containerState=j[1],j[0].exit.call(t,e)}n.length=O}function R(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function BE(e,t,n){return ne(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const FE={tokenize:HE};function HE(e){const t=this,n=e.attempt(On,r,e.attempt(this.parser.constructs.flowInitial,i,ne(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Om,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 UE={resolveAll:Go()},jE=Wo("string"),zE=Wo("text");function Wo(e){return{resolveAll:Go(e==="text"?$E:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,s,u);return s;function s(h){return c(h)?a(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),o}function o(h){return c(h)?(n.exit("data"),a(h)):(n.consume(h),o)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Go(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 $E(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,u=0,o;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(c===-2)o=!0,u++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const YE={42:Ie,43:Ie,45:Ie,48:Ie,49:Ie,50:Ie,51:Ie,52:Ie,53:Ie,54:Ie,55:Ie,56:Ie,57:Ie,62:Io},qE={91:vm},VE={[-2]:Dr,[-1]:Dr,32:Dr},WE={35:zm,42:Wn,45:[ns,Wn],60:Vm,61:ns,95:Wn,96:es,126:es},GE={38:Lo,92:wo},QE={[-5]:Pr,[-4]:Pr,[-3]:Pr,33:c1,38:Lo,42:ii,60:[dm,Jm],91:d1,92:[Um,wo],93:Ui,95:ii,96:Cm},XE={null:[ii,UE]},KE={null:[42,95]},ZE={null:[]},JE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:KE,contentInitial:qE,disable:ZE,document:YE,flow:WE,flowInitial:VE,insideSpan:XE,string:GE,text:QE},Symbol.toStringTag,{value:"Module"}));function eb(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=[],u=[];const o={attempt:V(j),check:V(w),consume:R,enter:O,exit:H,interrupt:V(w,{interrupt:!0})},c={code:null,containerState:{},defineSkip:A,events:[],now:b,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(c,o);return t.resolveAll&&a.push(t),c;function d(U){return s=ve(s,U),N(),s[s.length-1]!==null?[]:(q(t,0),c.events=br(a,c.events,c),c.events)}function f(U,L){return nb(p(U),L)}function p(U){return tb(s,U)}function b(){const{_bufferIndex:U,_index:L,line:$,column:z,offset:B}=r;return{_bufferIndex:U,_index:L,line:$,column:z,offset:B}}function A(U){i[U.line]=U.column,S()}function N(){let U;for(;r._index<s.length;){const L=s[r._index];if(typeof L=="string")for(U=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===U&&r._bufferIndex<L.length;)_(L.charCodeAt(r._bufferIndex));else _(L)}}function _(U){h=h(U)}function R(U){Y(U)?(r.line++,r.column=1,r.offset+=U===-3?2:1,S()):U!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=U}function O(U,L){const $=L||{};return $.type=U,$.start=b(),c.events.push(["enter",$,c]),u.push($),$}function H(U){const L=u.pop();return L.end=b(),c.events.push(["exit",L,c]),L}function j(U,L){q(U,L.from)}function w(U,L){L.restore()}function V(U,L){return $;function $(z,B,J){let re,me,ee,x;return Array.isArray(z)?ae(z):"tokenize"in z?ae([z]):ge(z);function ge(Te){return Vt;function Vt(et){const It=et!==null&&Te[et],wt=et!==null&&Te.null,Mn=[...Array.isArray(It)?It:It?[It]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return ae(Mn)(et)}}function ae(Te){return re=Te,me=0,Te.length===0?J:k(Te[me])}function k(Te){return Vt;function Vt(et){return x=Q(),ee=Te,Te.partial||(c.currentConstruct=Te),Te.name&&c.parser.constructs.disable.null.includes(Te.name)?ct():Te.tokenize.call(L?Object.assign(Object.create(c),L):c,o,Pe,ct)(et)}}function Pe(Te){return U(ee,x),B}function ct(Te){return x.restore(),++me<re.length?k(re[me]):J}}}function q(U,L){U.resolveAll&&!a.includes(U)&&a.push(U),U.resolve&&De(c.events,L,c.events.length-L,U.resolve(c.events.slice(L),c)),U.resolveTo&&(c.events=U.resolveTo(c.events,c))}function Q(){const U=b(),L=c.previous,$=c.currentConstruct,z=c.events.length,B=Array.from(u);return{from:z,restore:J};function J(){r=U,c.previous=L,c.currentConstruct=$,c.events.length=z,u=B,S()}}function S(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function tb(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 u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function nb(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=`
|
|
41
41
|
`;break}case-3:{s=`\r
|
|
42
|
-
`;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 rb(e){const r={constructs:To([JE,...(e||{}).extensions||[]]),content:i(DE),defined:[],document:i(ME),flow:i(FE),lazy:{},string:i(jE),text:i(zE)};return r;function i(a){return s;function s(u){return eb(r,a,u)}}}function ib(e){for(;!Oo(e););return e}const Es=/[\0\t\n\r]/g;function ab(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Es.lastIndex=d,c=Es.exec(a),f=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(f),!c){t=a.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(a.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Qo={}.hasOwnProperty;function sb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ub(n)(ib(rb(n).document().write(ab()(e,t,!0))))}function ub(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ha),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:a(oa),blockQuote:a(wt),characterEscape:Q,characterReference:Q,codeFenced:a(Pn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Pn,s),codeText:a(tc,s),codeTextData:Q,data:Q,codeFlowValue:Q,definition:a(nc),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(rc),hardBreakEscape:a(la),hardBreakTrailing:a(la),htmlFlow:a(ca,s),htmlFlowData:Q,htmlText:a(ca,s),htmlTextData:Q,image:a(ic),label:s,link:a(ha),listItem:a(ac),listItemValue:f,listOrdered:a(da,d),listUnordered:a(da),paragraph:a(sc),reference:k,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(oa),strong:a(uc),thematicBreak:a(lc)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:It,autolinkProtocol:et,blockQuote:o(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:ct,characterReferenceMarkerNumeric:ct,characterReferenceValue:be,characterReference:Vt,codeFenced:o(N),codeFencedFence:_,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:S,codeIndented:o(A),codeText:o(F),codeTextData:S,data:S,definition:o(),definitionDestinationString:U,definitionLabelString:O,definitionTitleString:L,emphasis:o(),hardBreakEscape:o(P),hardBreakTrailing:o(P),htmlFlow:o($),htmlFlowData:S,htmlText:o(z),htmlTextData:S,image:o(se),label:re,labelText:me,lineEnding:D,link:o(K),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Be,resourceDestinationString:x,resourceTitleString:ie,resource:$e,setextHeading:o(q),setextHeadingLineSequence:V,setextHeadingText:w,strong:o(),thematicBreak:o()}};Xo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(R){let H={type:"root",children:[]};const G={stack:[H],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},ee=[];let ue=-1;for(;++ue<R.length;)if(R[ue][1].type==="listOrdered"||R[ue][1].type==="listUnordered")if(R[ue][0]==="enter")ee.push(ue);else{const Fe=ee.pop();ue=i(R,Fe,ue)}for(ue=-1;++ue<R.length;){const Fe=t[R[ue][0]];Qo.call(Fe,R[ue][1].type)&&Fe[R[ue][1].type].call(Object.assign({sliceSerialize:R[ue][2].sliceSerialize},G),R[ue][1])}if(G.tokenStack.length>0){const Fe=G.tokenStack[G.tokenStack.length-1];(Fe[1]||bs).call(G,void 0,Fe[0])}for(H.position={start:tt(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:tt(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)H=t.transforms[ue](H)||H;return H}function i(R,H,G){let ee=H-1,ue=-1,Fe=!1,ht,Ge,Wt,Gt;for(;++ee<=G;){const we=R[ee];switch(we[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{we[0]==="enter"?ue++:ue--,Gt=void 0;break}case"lineEndingBlank":{we[0]==="enter"&&(ht&&!Gt&&!ue&&!Wt&&(Wt=ee),Gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gt=void 0}if(!ue&&we[0]==="enter"&&we[1].type==="listItemPrefix"||ue===-1&&we[0]==="exit"&&(we[1].type==="listUnordered"||we[1].type==="listOrdered")){if(ht){let Lt=ee;for(Ge=void 0;Lt--;){const Qe=R[Lt];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ge&&(R[Ge][1].type="lineEndingBlank",Fe=!0),Qe[1].type="lineEnding",Ge=Lt}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}Wt&&(!Ge||Wt<Ge)&&(ht._spread=!0),ht.end=Object.assign({},Ge?R[Ge][1].start:we[1].end),R.splice(Ge||ee,0,["exit",ht,we[2]]),ee++,G++}if(we[1].type==="listItemPrefix"){const Lt={type:"listItem",_spread:!1,start:Object.assign({},we[1].start),end:void 0};ht=Lt,R.splice(ee,0,["enter",Lt,we[2]]),ee++,G++,Wt=void 0,Gt=!0}}}return R[H][1]._spread=Fe,G}function a(R,H){return G;function G(ee){u.call(this,R(ee),ee),H&&H.call(this,ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(R,H,G){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([H,G||void 0]),R.position={start:tt(H.start),end:void 0}}function o(R){return H;function H(G){R&&R.call(this,G),c.call(this,G)}}function c(R,H){const G=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==R.type&&(H?H.call(this,R,ee[0]):(ee[1]||bs).call(this,R,ee[0]));else throw new Error("Cannot close `"+R.type+"` ("+mn({start:R.start,end:R.end})+"): it’s not open");G.position.end=tt(R.end)}function h(){return vi(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(R){if(this.data.expectingFirstListItemValue){const H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function p(){const R=this.resume(),H=this.stack[this.stack.length-1];H.lang=R}function b(){const R=this.resume(),H=this.stack[this.stack.length-1];H.meta=R}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/(\r?\n|\r)$/g,"")}function O(R){const H=this.resume(),G=this.stack[this.stack.length-1];G.label=H,G.identifier=je(this.sliceSerialize(R)).toLowerCase()}function L(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function U(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function j(R){const H=this.stack[this.stack.length-1];if(!H.depth){const G=this.sliceSerialize(R).length;H.depth=G}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function V(R){const H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(R){const G=this.stack[this.stack.length-1].children;let ee=G[G.length-1];(!ee||ee.type!=="text")&&(ee=oc(),ee.position={start:tt(R.start),end:void 0},G.push(ee)),this.stack.push(ee)}function S(R){const H=this.stack.pop();H.value+=this.sliceSerialize(R),H.position.end=tt(R.end)}function D(R){const H=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=H.children[H.children.length-1];G.position.end=tt(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(H.type)&&(Q.call(this,R),S.call(this,R))}function P(){this.data.atHardBreak=!0}function $(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function z(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function F(){const R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function K(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function se(){const R=this.stack[this.stack.length-1];if(this.data.inReference){const H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function me(R){const H=this.sliceSerialize(R),G=this.stack[this.stack.length-2];G.label=vp(H),G.identifier=je(H).toLowerCase()}function re(){const R=this.stack[this.stack.length-1],H=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const ee=R.children;G.children=ee}else G.alt=H}function x(){const R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function ie(){const R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function $e(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Be(R){const H=this.resume(),G=this.stack[this.stack.length-1];G.label=H,G.identifier=je(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function ct(R){this.data.characterReferenceType=R.type}function be(R){const H=this.sliceSerialize(R),G=this.data.characterReferenceType;let ee;G?(ee=bo(H,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=Fi(H);const ue=this.stack[this.stack.length-1];ue.value+=ee}function Vt(R){const H=this.stack.pop();H.position.end=tt(R.end)}function et(R){S.call(this,R);const H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(R)}function It(R){S.call(this,R);const H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(R)}function wt(){return{type:"blockquote",children:[]}}function Pn(){return{type:"code",lang:null,meta:null,value:""}}function tc(){return{type:"inlineCode",value:""}}function nc(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function rc(){return{type:"emphasis",children:[]}}function oa(){return{type:"heading",depth:0,children:[]}}function la(){return{type:"break"}}function ca(){return{type:"html",value:""}}function ic(){return{type:"image",title:null,url:"",alt:null}}function ha(){return{type:"link",title:null,url:"",children:[]}}function da(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function ac(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function sc(){return{type:"paragraph",children:[]}}function uc(){return{type:"strong",children:[]}}function oc(){return{type:"text",value:""}}function lc(){return{type:"thematicBreak"}}}function tt(e){return{line:e.line,column:e.column,offset:e.offset}}function Xo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xo(e,r):ob(e,r)}}function ob(e,t){let n;for(n in t)if(Qo.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 bs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+mn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+mn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+mn({start:t.start,end:t.end})+") is still open")}function lb(e){const t=this;t.parser=n;function n(r){return sb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cb(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 hb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
42
|
+
`;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 rb(e){const r={constructs:To([JE,...(e||{}).extensions||[]]),content:i(DE),defined:[],document:i(ME),flow:i(FE),lazy:{},string:i(jE),text:i(zE)};return r;function i(a){return s;function s(u){return eb(r,a,u)}}}function ib(e){for(;!Oo(e););return e}const Es=/[\0\t\n\r]/g;function ab(){let e=1,t="",n=!0,r;return i;function i(a,s,u){const o=[];let c,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Es.lastIndex=d,c=Es.exec(a),f=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(f),!c){t=a.slice(d);break}if(p===10&&d===f&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),d<f&&(o.push(a.slice(d,f)),e+=f-d),p){case 0:{o.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,o.push(-2);e++<h;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const Qo={}.hasOwnProperty;function sb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ub(n)(ib(rb(n).document().write(ab()(e,t,!0))))}function ub(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ha),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:a(oa),blockQuote:a(wt),characterEscape:Q,characterReference:Q,codeFenced:a(Mn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(Mn,s),codeText:a(tc,s),codeTextData:Q,data:Q,codeFlowValue:Q,definition:a(nc),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(rc),hardBreakEscape:a(la),hardBreakTrailing:a(la),htmlFlow:a(ca,s),htmlFlowData:Q,htmlText:a(ca,s),htmlTextData:Q,image:a(ic),label:s,link:a(ha),listItem:a(ac),listItemValue:f,listOrdered:a(da,d),listUnordered:a(da),paragraph:a(sc),reference:k,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(oa),strong:a(uc),thematicBreak:a(lc)},exit:{atxHeading:o(),atxHeadingSequence:j,autolink:o(),autolinkEmail:It,autolinkProtocol:et,blockQuote:o(),characterEscapeValue:S,characterReferenceMarkerHexadecimal:ct,characterReferenceMarkerNumeric:ct,characterReferenceValue:Te,characterReference:Vt,codeFenced:o(N),codeFencedFence:A,codeFencedFenceInfo:p,codeFencedFenceMeta:b,codeFlowValue:S,codeIndented:o(_),codeText:o(B),codeTextData:S,data:S,definition:o(),definitionDestinationString:H,definitionLabelString:R,definitionTitleString:O,emphasis:o(),hardBreakEscape:o(L),hardBreakTrailing:o(L),htmlFlow:o($),htmlFlowData:S,htmlText:o(z),htmlTextData:S,image:o(re),label:ee,labelText:me,lineEnding:U,link:o(J),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Pe,resourceDestinationString:x,resourceTitleString:ge,resource:ae,setextHeading:o(q),setextHeadingLineSequence:V,setextHeadingText:w,strong:o(),thematicBreak:o()}};Xo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(D){let F={type:"root",children:[]};const G={stack:[F],tokenStack:[],config:t,enter:u,exit:c,buffer:s,resume:h,data:n},te=[];let ue=-1;for(;++ue<D.length;)if(D[ue][1].type==="listOrdered"||D[ue][1].type==="listUnordered")if(D[ue][0]==="enter")te.push(ue);else{const He=te.pop();ue=i(D,He,ue)}for(ue=-1;++ue<D.length;){const He=t[D[ue][0]];Qo.call(He,D[ue][1].type)&&He[D[ue][1].type].call(Object.assign({sliceSerialize:D[ue][2].sliceSerialize},G),D[ue][1])}if(G.tokenStack.length>0){const He=G.tokenStack[G.tokenStack.length-1];(He[1]||bs).call(G,void 0,He[0])}for(F.position={start:tt(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:tt(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)F=t.transforms[ue](F)||F;return F}function i(D,F,G){let te=F-1,ue=-1,He=!1,ht,Ge,Wt,Gt;for(;++te<=G;){const Le=D[te];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?ue++:ue--,Gt=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(ht&&!Gt&&!ue&&!Wt&&(Wt=te),Gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Gt=void 0}if(!ue&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||ue===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(ht){let Lt=te;for(Ge=void 0;Lt--;){const Qe=D[Lt];if(Qe[1].type==="lineEnding"||Qe[1].type==="lineEndingBlank"){if(Qe[0]==="exit")continue;Ge&&(D[Ge][1].type="lineEndingBlank",He=!0),Qe[1].type="lineEnding",Ge=Lt}else if(!(Qe[1].type==="linePrefix"||Qe[1].type==="blockQuotePrefix"||Qe[1].type==="blockQuotePrefixWhitespace"||Qe[1].type==="blockQuoteMarker"||Qe[1].type==="listItemIndent"))break}Wt&&(!Ge||Wt<Ge)&&(ht._spread=!0),ht.end=Object.assign({},Ge?D[Ge][1].start:Le[1].end),D.splice(Ge||te,0,["exit",ht,Le[2]]),te++,G++}if(Le[1].type==="listItemPrefix"){const Lt={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};ht=Lt,D.splice(te,0,["enter",Lt,Le[2]]),te++,G++,Wt=void 0,Gt=!0}}}return D[F][1]._spread=He,G}function a(D,F){return G;function G(te){u.call(this,D(te),te),F&&F.call(this,te)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(D,F,G){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([F,G||void 0]),D.position={start:tt(F.start),end:void 0}}function o(D){return F;function F(G){D&&D.call(this,G),c.call(this,G)}}function c(D,F){const G=this.stack.pop(),te=this.tokenStack.pop();if(te)te[0].type!==D.type&&(F?F.call(this,D,te[0]):(te[1]||bs).call(this,D,te[0]));else throw new Error("Cannot close `"+D.type+"` ("+gn({start:D.start,end:D.end})+"): it’s not open");G.position.end=tt(D.end)}function h(){return vi(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){const F=this.stack[this.stack.length-2];F.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function p(){const D=this.resume(),F=this.stack[this.stack.length-1];F.lang=D}function b(){const D=this.resume(),F=this.stack[this.stack.length-1];F.meta=D}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const D=this.resume(),F=this.stack[this.stack.length-1];F.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const D=this.resume(),F=this.stack[this.stack.length-1];F.value=D.replace(/(\r?\n|\r)$/g,"")}function R(D){const F=this.resume(),G=this.stack[this.stack.length-1];G.label=F,G.identifier=ze(this.sliceSerialize(D)).toLowerCase()}function O(){const D=this.resume(),F=this.stack[this.stack.length-1];F.title=D}function H(){const D=this.resume(),F=this.stack[this.stack.length-1];F.url=D}function j(D){const F=this.stack[this.stack.length-1];if(!F.depth){const G=this.sliceSerialize(D).length;F.depth=G}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function V(D){const F=this.stack[this.stack.length-1];F.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(D){const G=this.stack[this.stack.length-1].children;let te=G[G.length-1];(!te||te.type!=="text")&&(te=oc(),te.position={start:tt(D.start),end:void 0},G.push(te)),this.stack.push(te)}function S(D){const F=this.stack.pop();F.value+=this.sliceSerialize(D),F.position.end=tt(D.end)}function U(D){const F=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=F.children[F.children.length-1];G.position.end=tt(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(F.type)&&(Q.call(this,D),S.call(this,D))}function L(){this.data.atHardBreak=!0}function $(){const D=this.resume(),F=this.stack[this.stack.length-1];F.value=D}function z(){const D=this.resume(),F=this.stack[this.stack.length-1];F.value=D}function B(){const D=this.resume(),F=this.stack[this.stack.length-1];F.value=D}function J(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=F,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function re(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const F=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=F,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function me(D){const F=this.sliceSerialize(D),G=this.stack[this.stack.length-2];G.label=vp(F),G.identifier=ze(F).toLowerCase()}function ee(){const D=this.stack[this.stack.length-1],F=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const te=D.children;G.children=te}else G.alt=F}function x(){const D=this.resume(),F=this.stack[this.stack.length-1];F.url=D}function ge(){const D=this.resume(),F=this.stack[this.stack.length-1];F.title=D}function ae(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Pe(D){const F=this.resume(),G=this.stack[this.stack.length-1];G.label=F,G.identifier=ze(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function ct(D){this.data.characterReferenceType=D.type}function Te(D){const F=this.sliceSerialize(D),G=this.data.characterReferenceType;let te;G?(te=bo(F,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):te=Fi(F);const ue=this.stack[this.stack.length-1];ue.value+=te}function Vt(D){const F=this.stack.pop();F.position.end=tt(D.end)}function et(D){S.call(this,D);const F=this.stack[this.stack.length-1];F.url=this.sliceSerialize(D)}function It(D){S.call(this,D);const F=this.stack[this.stack.length-1];F.url="mailto:"+this.sliceSerialize(D)}function wt(){return{type:"blockquote",children:[]}}function Mn(){return{type:"code",lang:null,meta:null,value:""}}function tc(){return{type:"inlineCode",value:""}}function nc(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function rc(){return{type:"emphasis",children:[]}}function oa(){return{type:"heading",depth:0,children:[]}}function la(){return{type:"break"}}function ca(){return{type:"html",value:""}}function ic(){return{type:"image",title:null,url:"",alt:null}}function ha(){return{type:"link",title:null,url:"",children:[]}}function da(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function ac(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function sc(){return{type:"paragraph",children:[]}}function uc(){return{type:"strong",children:[]}}function oc(){return{type:"text",value:""}}function lc(){return{type:"thematicBreak"}}}function tt(e){return{line:e.line,column:e.column,offset:e.offset}}function Xo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xo(e,r):ob(e,r)}}function ob(e,t){let n;for(n in t)if(Qo.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 bs(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+gn({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+gn({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+gn({start:t.start,end:t.end})+") is still open")}function lb(e){const t=this;t.parser=n;function n(r){return sb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cb(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 hb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
43
43
|
`}]}function db(e,t){const n=t.value?t.value+`
|
|
44
44
|
`:"",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 fb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qt(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=a+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function gb(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 Eb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ko(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 bb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ko(e,t);const i={src:qt(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 Tb(e,t){const n={src:qt(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 xb(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 kb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ko(e,t);const i={href:qt(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 _b(e,t){const n={href:qt(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 Ab(e,t,n){const r=e.all(t),i=n?yb(n):Zo(t),a={},s=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&s.push({type:"text",value:`
|
|
45
45
|
`}),h.type==="element"&&h.tagName==="p"&&!i?s.push(...h.children):s.push(h)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
46
|
-
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function yb(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=Zo(n[r])}return t}function Zo(e){const t=e.spread;return t??e.children.length>1}function Cb(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 Sb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ib(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wb(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)},u=Ve(t.children[1]),o=
|
|
46
|
+
`});const c={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,c),e.applyData(t,c)}function yb(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=Zo(n[r])}return t}function Zo(e){const t=e.spread;return t??e.children.length>1}function Cb(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 Sb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ib(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wb(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)},u=Ve(t.children[1]),o=gr(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),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 Lb(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,u=s?s.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const d=t.children[o],f={},p=s?s[o]:void 0;p&&(f.align=p);let b={type:"element",tagName:a,properties:f,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),c.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,h),e.applyData(t,h)}function Ob(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ts=9,xs=32;function Rb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(ks(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ks(t.slice(i),i>0,!1)),a.join("")}function ks(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===Ts||a===xs;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===Ts||a===xs;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Db(e,t){const n={type:"text",value:Rb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Mb={blockquote:cb,break:hb,code:db,delete:fb,emphasis:pb,footnoteReference:mb,heading:gb,html:Eb,imageReference:bb,image:Tb,inlineCode:xb,linkReference:kb,link:_b,listItem:Ab,list:Cb,paragraph:Sb,root:Nb,strong:Ib,table:wb,tableCell:Ob,tableRow:Lb,text:Db,thematicBreak:Pb,toml:Un,yaml:Un,definition:Un,footnoteDefinition:Un};function Un(){}function vb(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 Bb(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Fb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vb,r=e.options.footnoteBackLabel||Bb,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const h=e.all(c),d=String(c.identifier).toUpperCase(),f=qt(d.toLowerCase());let p=0;const b=[],A=e.footnoteCounts.get(d);for(;A!==void 0&&++p<=A;){b.length>0&&b.push({type:"text",value:" "});let R=typeof n=="string"?n:n(o,p);typeof R=="string"&&(R={type:"text",value:R}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const N=h[h.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const R=N.children[N.children.length-1];R&&R.type==="text"?R.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...b)}else h.push(...b);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(h,!0)};e.patch(c,_),u.push(_)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...xt(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
47
47
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
48
|
-
`}]}}const si={}.hasOwnProperty,Hb={};function Ub(e,t){const n=t||Hb,r=new Map,i=new Map,a=new Map,s={...Mb,...n.handlers},u={all:c,applyData:zb,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:jb,wrap:Yb};return st(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,p=u.handlers[f];if(si.call(u.handlers,f)&&p)return p(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:
|
|
48
|
+
`}]}}const si={}.hasOwnProperty,Hb={};function Ub(e,t){const n=t||Hb,r=new Map,i=new Map,a=new Map,s={...Mb,...n.handlers},u={all:c,applyData:zb,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:o,options:n,patch:jb,wrap:Yb};return st(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:i,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),u;function o(h,d){const f=h.type,p=u.handlers[f];if(si.call(u.handlers,f)&&p)return p(u,h,d);if(u.options.passThrough&&u.options.passThrough.includes(f)){if("children"in h){const{children:A,...N}=h,_=xt(N);return _.children=u.all(h),_}return xt(h)}return(u.options.unknownHandler||$b)(u,h,d)}function c(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const b=u.one(f[p],h);if(b){if(p&&f[p-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=_s(b.value)),!Array.isArray(b)&&b.type==="element")){const A=b.children[0];A&&A.type==="text"&&(A.value=_s(A.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function jb(e,t){e.position&&(t.position=Vu(e))}function zb(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,xt(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function $b(e,t){const n=t.data||{},r="value"in t&&!(si.call(n,"hProperties")||si.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 Yb(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
49
49
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
50
50
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
51
51
|
`}),n}function _s(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function As(e,t){const n=Ub(e,t),r=n.one(e,void 0),i=Fb(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
52
|
-
`},i),a}function qb(e,t){return e&&"run"in e?async function(n,r){const i=As(n,{file:r,...t});await e.run(i,r)}:function(n,r){return As(n,{file:r,...e||t})}}function ys(e){if(e)throw e}var Br,Cs;function Vb(){if(Cs)return Br;Cs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return Br=function o(){var c,h,d,f,p,b,_=arguments[0],N=1,A=arguments.length,O=!1;for(typeof _=="boolean"&&(O=_,_=arguments[1]||{},N=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});N<A;++N)if(c=arguments[N],c!=null)for(h in c)d=u(_,h),f=u(c,h),_!==f&&(O&&f&&(a(f)||(p=i(f)))?(p?(p=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(_,{name:h,newValue:o(O,b,f)})):typeof f<"u"&&s(_,{name:h,newValue:f}));return _},Br}var Wb=Vb();const Fr=Zs(Wb);function ui(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 Gb(){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);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?Qb(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Qb(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const Ye={basename:Xb,dirname:Kb,extname:Zb,join:Jb,sep:"/"};function Xb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');On(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,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Kb(e){if(On(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 Zb(e){On(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 Jb(...e){let t=-1,n;for(;++t<e.length;)On(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":eT(n)}function eT(e){On(e);const t=e.codePointAt(0)===47;let n=tT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function tT(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),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 u===46&&a>-1?a++:a=-1}return n}function On(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const nT={cwd:rT};function rT(){return"/"}function oi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iT(e){if(typeof e=="string")e=new URL(e);else if(!oi(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 aT(e)}function aT(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 Hr=["history","path","basename","stem","extname","dirname"];class sT{constructor(t){let n;t?oi(t)?n={path:t}:typeof t=="string"||uT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":nT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Hr.length;){const a=Hr[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)Hr.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){jr(t,"basename"),Ur(t,"basename"),this.path=Ye.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(t){Ss(this.basename,"dirname"),this.path=Ye.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(t){if(Ur(t,"extname"),Ss(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=Ye.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){oi(t)&&(t=iT(t)),jr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(t){jr(t,"stem"),Ur(t,"stem"),this.path=Ye.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 _e(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 Ur(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function jr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ss(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function uT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lT={}.hasOwnProperty;class qi extends oT{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=Gb()}copy(){const t=new qi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Fr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Yr("data",this.frozen),this.namespace[t]=n,this):lT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Yr("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=Un(t),r=this.parser||this.Parser;return zr("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),zr("process",this.parser||this.Parser),$r("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=Un(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const p=d,b=r.stringify(p,f);dT(b)?f.value=b:f.result=b,c(h,f)});function c(h,d){h||!d?s(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),zr("processSync",this.parser||this.Parser),$r("processSync",this.compiler||this.Compiler),this.process(t,i),Is("processSync","process",n),r;function i(a,s){n=!0,ys(a),r=s}}run(t,n,r){Ns(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,u){const o=Un(n);i.run(t,o,c);function c(h,d,f){const p=d||t;h?u(h):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Is("runSync","run",r),i;function a(s,u){ys(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=Un(n),i=this.compiler||this.Compiler;return $r("stringify",i),Ns(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Yr("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");u(c.plugins),c.settings&&(i.settings=Fr(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[p,...b]=h;const _=r[f][1];ui(_)&&ui(p)&&(p=Fr(!0,_,p)),r[f]=[c,p,...b]}}}}const cT=new qi().freeze();function zr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Yr(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 Ns(e){if(!ui(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Is(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Un(e){return hT(e)?e:new sT(e)}function hT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dT(e){return typeof e=="string"||fT(e)}function fT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=Vi();function Jo(e){Nt=e}var gn={exec:()=>null};function ne(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(Ce.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var pT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ce={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,listReplaceTabs:/^\t+/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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")},mT=/^(?:[ \t]*(?:\n|$))+/,gT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ET=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wi=/(?:[*+-]|\d{1,9}[.)])/,el=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tl=ne(el).replace(/bull/g,Wi).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(),TT=ne(el).replace(/bull/g,Wi).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(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xT=/^[^\n]+/,Qi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,kT=ne(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_T=ne(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wi).getRegex(),Tr="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",Xi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,AT=ne("^ {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",Xi).replace("tag",Tr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nl=ne(Gi).replace("hr",Rn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Tr).getRegex(),yT=ne(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nl).getRegex(),Ki={blockquote:yT,code:gT,def:kT,fences:ET,heading:bT,hr:Rn,html:AT,lheading:tl,list:_T,newline:mT,paragraph:nl,table:gn,text:xT},ws=ne("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Tr).getRegex(),CT={...Ki,lheading:TT,table:ws,paragraph:ne(Gi).replace("hr",Rn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ws).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Tr).getRegex()},ST={...Ki,html:ne(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xi).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:gn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ne(Gi).replace("hr",Rn).replace("heading",` *#{1,6} *[^
|
|
53
|
-
]`).replace("lheading",tl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},NT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rl=/^( {2,}|\\)\n(?!\s*$)/,wT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
|
|
52
|
+
`},i),a}function qb(e,t){return e&&"run"in e?async function(n,r){const i=As(n,{file:r,...t});await e.run(i,r)}:function(n,r){return As(n,{file:r,...e||t})}}function ys(e){if(e)throw e}var Fr,Cs;function Vb(){if(Cs)return Fr;Cs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},a=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var h=e.call(c,"constructor"),d=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!h&&!d)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},s=function(c,h){n&&h.name==="__proto__"?n(c,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):c[h.name]=h.newValue},u=function(c,h){if(h==="__proto__")if(e.call(c,h)){if(r)return r(c,h).value}else return;return c[h]};return Fr=function o(){var c,h,d,f,p,b,A=arguments[0],N=1,_=arguments.length,R=!1;for(typeof A=="boolean"&&(R=A,A=arguments[1]||{},N=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});N<_;++N)if(c=arguments[N],c!=null)for(h in c)d=u(A,h),f=u(c,h),A!==f&&(R&&f&&(a(f)||(p=i(f)))?(p?(p=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},s(A,{name:h,newValue:o(R,b,f)})):typeof f<"u"&&s(A,{name:h,newValue:f}));return A},Fr}var Wb=Vb();const Hr=Zs(Wb);function ui(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 Gb(){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);u(null,...i);function u(o,...c){const h=e[++a];let d=-1;if(o){s(o);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,h?Qb(h,u)(...c):s(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Qb(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(i);try{o=e.apply(this,s)}catch(c){const h=c;if(u&&n)throw h;return i(h)}u||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(s,...u){n||(n=!0,t(s,...u))}function a(s){i(null,s)}}const Ye={basename:Xb,dirname:Kb,extname:Zb,join:Jb,sep:"/"};function Xb(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Rn(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,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else s<0&&(a=!0,s=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Kb(e){if(Rn(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 Zb(e){Rn(e);let t=e.length,n=-1,r=0,i=-1,a=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===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 Jb(...e){let t=-1,n;for(;++t<e.length;)Rn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":eT(n)}function eT(e){Rn(e);const t=e.codePointAt(0)===47;let n=tT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function tT(e,t){let n="",r=0,i=-1,a=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===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(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),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 u===46&&a>-1?a++:a=-1}return n}function Rn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const nT={cwd:rT};function rT(){return"/"}function oi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iT(e){if(typeof e=="string")e=new URL(e);else if(!oi(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 aT(e)}function aT(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 Ur=["history","path","basename","stem","extname","dirname"];class sT{constructor(t){let n;t?oi(t)?n={path:t}:typeof t=="string"||uT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":nT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ur.length;){const a=Ur[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)Ur.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(t){zr(t,"basename"),jr(t,"basename"),this.path=Ye.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(t){Ss(this.basename,"dirname"),this.path=Ye.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(t){if(jr(t,"extname"),Ss(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=Ye.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){oi(t)&&(t=iT(t)),zr(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(t){zr(t,"stem"),jr(t,"stem"),this.path=Ye.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 Ae(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 jr(e,t){if(e&&e.includes(Ye.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ye.sep+"`")}function zr(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ss(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function uT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oT=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lT={}.hasOwnProperty;class qi extends oT{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=Gb()}copy(){const t=new qi;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Hr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qr("data",this.frozen),this.namespace[t]=n,this):lT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qr("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=jn(t),r=this.parser||this.Parser;return $r("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$r("process",this.parser||this.Parser),Yr("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,s){const u=jn(t),o=r.parse(u);r.run(o,u,function(h,d,f){if(h||!d||!f)return c(h);const p=d,b=r.stringify(p,f);dT(b)?f.value=b:f.result=b,c(h,f)});function c(h,d){h||!d?s(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),$r("processSync",this.parser||this.Parser),Yr("processSync",this.compiler||this.Compiler),this.process(t,i),Is("processSync","process",n),r;function i(a,s){n=!0,ys(a),r=s}}run(t,n,r){Ns(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,u){const o=jn(n);i.run(t,o,c);function c(h,d,f){const p=d||t;h?u(h):s?s(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Is("runSync","run",r),i;function a(s,u){ys(s),i=u,r=!0}}stringify(t,n){this.freeze();const r=jn(n),i=this.compiler||this.Compiler;return Yr("stringify",i),Ns(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(qr("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[h,...d]=c;o(h,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");u(c.plugins),c.settings&&(i.settings=Hr(!0,i.settings,c.settings))}function u(c){let h=-1;if(c!=null)if(Array.isArray(c))for(;++h<c.length;){const d=c[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...h]);else if(h.length>0){let[p,...b]=h;const A=r[f][1];ui(A)&&ui(p)&&(p=Hr(!0,A,p)),r[f]=[c,p,...b]}}}}const cT=new qi().freeze();function $r(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yr(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qr(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 Ns(e){if(!ui(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Is(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jn(e){return hT(e)?e:new sT(e)}function hT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function dT(e){return typeof e=="string"||fT(e)}function fT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Vi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=Vi();function Jo(e){Nt=e}var En={exec:()=>null};function ie(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(Se.caret,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,t)};return r}var pT=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Se={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,listReplaceTabs:/^\t+/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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")},mT=/^(?:[ \t]*(?:\n|$))+/,gT=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ET=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,bT=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wi=/(?:[*+-]|\d{1,9}[.)])/,el=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tl=ie(el).replace(/bull/g,Wi).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(),TT=ie(el).replace(/bull/g,Wi).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(),Gi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,xT=/^[^\n]+/,Qi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,kT=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Qi).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_T=ie(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wi).getRegex(),xr="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",Xi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,AT=ie("^ {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",Xi).replace("tag",xr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),nl=ie(Gi).replace("hr",Dn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex(),yT=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",nl).getRegex(),Ki={blockquote:yT,code:gT,def:kT,fences:ET,heading:bT,hr:Dn,html:AT,lheading:tl,list:_T,newline:mT,paragraph:nl,table:En,text:xT},ws=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dn).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex(),CT={...Ki,lheading:TT,table:ws,paragraph:ie(Gi).replace("hr",Dn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ws).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex()},ST={...Ki,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xi).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:En,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Gi).replace("hr",Dn).replace("heading",` *#{1,6} *[^
|
|
53
|
+
]`).replace("lheading",tl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},NT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rl=/^( {2,}|\\)\n(?!\s*$)/,wT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,kr=/[\p{P}\p{S}]/u,Zi=/[\s\p{P}\p{S}]/u,il=/[^\s\p{P}\p{S}]/u,LT=ie(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zi).getRegex(),al=/(?!~)[\p{P}\p{S}]/u,OT=/(?!~)[\s\p{P}\p{S}]/u,RT=/(?:[^\s\p{P}\p{S}]|~)/u,DT=ie(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",pT?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sl=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,PT=ie(sl,"u").replace(/punct/g,kr).getRegex(),MT=ie(sl,"u").replace(/punct/g,al).getRegex(),ul="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",vT=ie(ul,"gu").replace(/notPunctSpace/g,il).replace(/punctSpace/g,Zi).replace(/punct/g,kr).getRegex(),BT=ie(ul,"gu").replace(/notPunctSpace/g,RT).replace(/punctSpace/g,OT).replace(/punct/g,al).getRegex(),FT=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,il).replace(/punctSpace/g,Zi).replace(/punct/g,kr).getRegex(),HT=ie(/\\(punct)/,"gu").replace(/punct/g,kr).getRegex(),UT=ie(/^<(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(),jT=ie(Xi).replace("(?:-->|$)","-->").getRegex(),zT=ie("^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",jT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,$T=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",nr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ol=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",nr).replace("ref",Qi).getRegex(),ll=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Qi).getRegex(),YT=ie("reflink|nolink(?!\\()","g").replace("reflink",ol).replace("nolink",ll).getRegex(),Ls=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ji={_backpedal:En,anyPunctuation:HT,autolink:UT,blockSkip:DT,br:rl,code:IT,del:En,emStrongLDelim:PT,emStrongRDelimAst:vT,emStrongRDelimUnd:FT,escape:NT,link:$T,nolink:ll,punctuation:LT,reflink:ol,reflinkSearch:YT,tag:zT,text:wT,url:En},qT={...Ji,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",nr).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nr).getRegex()},li={...Ji,emStrongRDelimAst:BT,emStrongLDelim:MT,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ls).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:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ls).getRegex()},VT={...li,br:ie(rl).replace("{2,}","*").getRegex(),text:ie(li.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},zn={normal:Ki,gfm:CT,pedantic:ST},tn={normal:Ji,gfm:li,breaks:VT,pedantic:qT},WT={"&":"&","<":"<",">":">",'"':""","'":"'"},Os=e=>WT[e];function Xe(e,t){if(t){if(Se.escapeTest.test(e))return e.replace(Se.escapeReplace,Os)}else if(Se.escapeTestNoEncode.test(e))return e.replace(Se.escapeReplaceNoEncode,Os);return e}function Rs(e){try{e=encodeURI(e).replace(Se.percentDecode,"%")}catch{return null}return e}function Ds(e,t){let n=e.replace(Se.findPipe,(a,s,u)=>{let o=!1,c=s;for(;--c>=0&&u[c]==="\\";)o=!o;return o?"|":" |"}),r=n.split(Se.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(Se.slashPipe,"|");return r}function nn(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 GT(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 Ps(e,t,n,r,i){let a=t.href,s=t.title||null,u=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:s,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,o}function QT(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
54
54
|
`).map(a=>{let s=a.match(n.other.beginningSpace);if(s===null)return a;let[u]=s;return u.length>=i.length?a.slice(i.length):a}).join(`
|
|
55
|
-
`)}var
|
|
55
|
+
`)}var rr=class{options;rules;lexer;constructor(e){this.options=e||Nt}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:nn(n,`
|
|
56
56
|
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=QT(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=nn(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:nn(t[0],`
|
|
57
57
|
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=nn(t[0],`
|
|
58
58
|
`).split(`
|
|
@@ -62,20 +62,20 @@ $$`:`${e}$$`},$g=e=>jg(e)%2===0?e:zg(e),Yg=(e,t,n)=>{if(e.substring(t+2).include
|
|
|
62
62
|
${c}`:c,i=i?`${i}
|
|
63
63
|
${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=d,n.length===0)break;let f=a.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let p=f,b=p.raw+`
|
|
64
64
|
`+n.join(`
|
|
65
|
-
`),
|
|
65
|
+
`),A=this.blockquote(b);a[a.length-1]=A,r=r.substring(0,r.length-p.raw.length)+A.raw,i=i.substring(0,i.length-p.text.length)+A.text;break}else if(f?.type==="list"){let p=f,b=p.raw+`
|
|
66
66
|
`+n.join(`
|
|
67
|
-
`),
|
|
67
|
+
`),A=this.list(b);a[a.length-1]=A,r=r.substring(0,r.length-f.raw.length)+A.raw,i=i.substring(0,i.length-p.raw.length)+A.raw,n=b.substring(a.at(-1).raw.length).split(`
|
|
68
68
|
`);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 o=!1,c="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let d=t[2].split(`
|
|
69
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,
|
|
69
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),f=e.split(`
|
|
70
70
|
`,1)[0],p=!d.trim(),b=0;if(this.options.pedantic?(b=2,h=d.trimStart()):p?b=t[1].length+1:(b=t[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,h=d.slice(b),b+=t[1].length),p&&this.rules.other.blankLine.test(f)&&(c+=f+`
|
|
71
|
-
`,e=e.substring(f.length+1),o=!0),!o){let
|
|
72
|
-
`,1)[0],j;if(f=
|
|
73
|
-
`+j.slice(b);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||
|
|
74
|
-
`+f}!p&&!f.trim()&&(p=!0),c+=
|
|
75
|
-
`,e=e.substring(
|
|
71
|
+
`,e=e.substring(f.length+1),o=!0),!o){let A=this.rules.other.nextBulletRegex(b),N=this.rules.other.hrRegex(b),_=this.rules.other.fencesBeginRegex(b),R=this.rules.other.headingBeginRegex(b),O=this.rules.other.htmlBeginRegex(b);for(;e;){let H=e.split(`
|
|
72
|
+
`,1)[0],j;if(f=H,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),j=f):j=f.replace(this.rules.other.tabCharGlobal," "),_.test(f)||R.test(f)||O.test(f)||A.test(f)||N.test(f))break;if(j.search(this.rules.other.nonSpaceChar)>=b||!f.trim())h+=`
|
|
73
|
+
`+j.slice(b);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(d)||R.test(d)||N.test(d))break;h+=`
|
|
74
|
+
`+f}!p&&!f.trim()&&(p=!0),c+=H+`
|
|
75
|
+
`,e=e.substring(H.length+1),d=j.slice(b)}}i.loose||(s?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),i.raw+=c}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let o of i.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(o.raw);if(c){let h={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};o.checked=h.checked,i.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=h.raw+o.tokens[0].raw,o.tokens[0].text=h.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(h)):o.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):o.tokens.unshift(h)}}if(!i.loose){let c=o.tokens.filter(d=>d.type==="space"),h=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=h}}if(i.loose)for(let o of i.items){o.loose=!0;for(let c of o.tokens)c.type==="text"&&(c.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=Ds(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
76
76
|
`):[],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(Ds(s,a.header.length).map((u,o)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[o]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
77
|
-
`?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=nn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=GT(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)),Ps(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 Ps(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.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]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+s);if(Math.min(i,s)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}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){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}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}}}},
|
|
78
|
-
`),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.options.pedantic&&(t=t.replace(
|
|
77
|
+
`?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=nn(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=GT(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)),Ps(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 Ps(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,s,u=i,o=0,c=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+i);(r=c.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]){u+=s;continue}else if((r[5]||r[6])&&i%3&&!((i+s)%3)){o+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+o);let h=[...r[0]][0].length,d=e.slice(0,i+r.index+h+s);if(Math.min(i,s)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}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){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}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}}}},Be=class ci{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Nt,this.options.tokenizer=this.options.tokenizer||new rr,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:Se,block:zn.normal,inline:tn.normal};this.options.pedantic?(n.block=zn.pedantic,n.inline=tn.pedantic):this.options.gfm&&(n.block=zn.gfm,this.options.breaks?n.inline=tn.breaks:n.inline=tn.gfm),this.tokenizer.rules=n}static get rules(){return{block:zn,inline:tn}}static lex(t,n){return new ci(n).lex(t)}static lexInline(t,n){return new ci(n).inlineTokens(t)}lex(t){t=t.replace(Se.carriageReturn,`
|
|
78
|
+
`),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.options.pedantic&&(t=t.replace(Se.tabCharGlobal," ").replace(Se.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+=`
|
|
79
79
|
`: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(`
|
|
80
80
|
`)?"":`
|
|
81
81
|
`)+i.raw,s.text+=`
|
|
@@ -88,7 +88,7 @@ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
88
88
|
`+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(`
|
|
89
89
|
`)?"":`
|
|
90
90
|
`)+i.raw,s.text+=`
|
|
91
|
-
`+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=[]){let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)o.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,u="";for(;t;){s||(u=""),s=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,u)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(u=o.raw.slice(-1)),s=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},
|
|
91
|
+
`+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=[]){let r=t,i=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)o.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,u="";for(;t;){s||(u=""),s=!1;let o;if(this.options.extensions?.inline?.some(h=>(o=h.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(o.raw.length);let h=n.at(-1);o.type==="text"&&h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(t,r,u)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(t)){t=t.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(t))){t=t.substring(o.raw.length),n.push(o);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(o=this.tokenizer.inlineText(c)){t=t.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(u=o.raw.slice(-1)),s=!0;let h=n.at(-1);h?.type==="text"?(h.raw+=o.raw,h.text+=o.text):n.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},ir=class{options;parser;constructor(e){this.options=e||Nt}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(Se.notSpaceStart)?.[0],i=e.replace(Se.endingNewline,"")+`
|
|
92
92
|
`;return r?'<pre><code class="language-'+Xe(r)+'">'+(n?i:Xe(i,!0))+`</code></pre>
|
|
93
93
|
`:"<pre><code>"+(n?i:Xe(i,!0))+`</code></pre>
|
|
94
94
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
@@ -106,17 +106,17 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
106
106
|
`}tablerow({text:e}){return`<tr>
|
|
107
107
|
${e}</tr>
|
|
108
108
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
109
|
-
`}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>${Xe(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=Rs(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Xe(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=Rs(e);if(i===null)return Xe(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Xe(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},ea=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}},
|
|
110
|
-
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Xe(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},At=new XT;function ae(e,t){return At.parse(e,t)}ae.options=ae.setOptions=function(e){return At.setOptions(e),ae.defaults=At.defaults,Jo(ae.defaults),ae};ae.getDefaults=Vi;ae.defaults=Nt;ae.use=function(...e){return At.use(...e),ae.defaults=At.defaults,Jo(ae.defaults),ae};ae.walkTokens=function(e,t){return At.walkTokens(e,t)};ae.parseInline=At.parseInline;ae.Parser=Ue;ae.parser=Ue.parse;ae.Renderer=rr;ae.TextRenderer=ea;ae.Lexer=Me;ae.lexer=Me.lex;ae.Tokenizer=nr;ae.Hooks=sn;ae.parse=ae;ae.options;ae.setOptions;ae.use;ae.walkTokens;ae.parseInline;Ue.parse;Me.lex;var KT=300,ZT="300px",JT=500;function e2(e={}){let{immediate:t=!1,debounceDelay:n=KT,rootMargin:r=ZT,idleTimeout:i=JT}=e,[a,s]=C.useState(!1),u=C.useRef(null),o=C.useRef(null),c=C.useRef(null),h=C.useMemo(()=>p=>{let b=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=C.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,b)=>window.requestIdleCallback(p,b):h,[h]),f=C.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return C.useEffect(()=>{if(t){s(!0);return}let p=u.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let b=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},_=L=>{c.current=d(U=>{U.timeRemaining()>0||U.didTimeout?(s(!0),L.disconnect()):c.current=d(()=>{s(!0),L.disconnect()},{timeout:i/2})},{timeout:i})},N=L=>{b(),o.current=window.setTimeout(()=>{var U,j;let w=L.takeRecords();(w.length===0||(j=(U=w.at(-1))==null?void 0:U.isIntersecting)!=null&&j)&&_(L)},n)},A=(L,U)=>{L.isIntersecting?N(U):b()},O=new IntersectionObserver(L=>{for(let U of L)A(U,O)},{rootMargin:r,threshold:0});return O.observe(p),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),O.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:u}}var cl=/\s/,t2=/^\s+$/,n2=new Set(["code","pre","svg","math","annotation"]),r2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",i2=e=>e.some(t=>r2(t)&&n2.has(t.tagName)),a2=e=>{let t=[],n="",r=!1;for(let i of e){let a=cl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},s2=e=>{let t=[],n="";for(let r of e)cl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},u2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),o2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(i2(t))return Gn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?s2(s):a2(s)).map(o=>t2.test(o)?{type:"text",value:o}:u2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function di(e){var t,n,r,i;let a={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"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ai(s,"text",(u,o)=>o2(u,o,a))}}}di();var ta=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),na=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),kr=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),l2=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),c2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),h2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),hl=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Ms=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),d2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),f2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),W=(...e)=>mc(gc(e)),Bt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},p2=C.createContext({code:""}),dl=()=>C.useContext(p2),vs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=C.useState(!1),c=C.useRef(0),{code:h}=dl(),{isAnimating:d}=C.useContext(ve),f=a??h,p=async()=>{var _;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(f),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(N){t?.(N)}};C.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=u?ta:na;return g.jsx("button",{className:W("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:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??g.jsx(b,{size:14})})},Bs={"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"},m2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=dl(),{isAnimating:o}=C.useContext(ve),c=a??u,h=`file.${n&&n in Bs?Bs[n]:"txt"}`,d="text/plain",f=()=>{try{Bt(h,c,d),e?.()}catch(p){t?.(p)}};return g.jsx("button",{className:W("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:o,onClick:f,title:"Download file",type:"button",...s,children:r??g.jsx(kr,{size:14})})},Fs=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(l2,{className:"size-4 animate-spin"})})]}),g2=/\.[^/.]+$/,E2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),h=`${(r||u||"image").replace(g2,"")}.${f}`}Bt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:W("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.jsx("button",{className:W("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:a,title:"Download image",type:"button",children:g.jsx(kr,{size:14})})]}):null},En=0,b2=()=>{En+=1,En===1&&(document.body.style.overflow="hidden")},T2=()=>{En=Math.max(0,En-1),En===0&&(document.body.style.overflow="")},x2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=C.useState(!1),s=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=C.useCallback(()=>{r(),n()},[r,n]);return C.useEffect(()=>{if(t){b2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),T2()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:o=>{o.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(hl,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Ms,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:W("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"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:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(ta,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(na,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"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:u,type:"button",children:[g.jsx(Ms,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},fi=C.createContext(null),fl=()=>C.useContext(fi),Kx=()=>{var e;let t=fl();return(e=t?.code)!=null?e:null},ra=()=>{var e;let t=fl();return(e=t?.mermaid)!=null?e:null},k2=(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))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},_2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=C.useState(!1),o=C.useRef(null),{isAnimating:c}=C.useContext(ve),h=ra(),d=async f=>{try{if(f==="mmd"){Bt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),b=e.split("").reduce((A,O)=>(A<<5)-A+O.charCodeAt(0)|0,0),_=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await p.render(_,e);if(!N){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Bt("diagram.svg",N,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let A=await k2(N);Bt("diagram.png",A,"image/png"),r?.(f),u(!1);return}}catch(p){a?.(p)}};return C.useEffect(()=>{let f=p=>{let b=p.composedPath();o.current&&!b.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),g.jsxs("div",{className:"relative",ref:o,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??g.jsx(kr,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},bn=0,A2=()=>{bn+=1,bn===1&&(document.body.style.overflow="hidden")},y2=()=>{bn=Math.max(0,bn-1),bn===0&&(document.body.style.overflow="")},C2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=C.useState(!1),{isAnimating:o,controls:c}=C.useContext(ve),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{u(!s)};return C.useEffect(()=>{if(s){A2();let f=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),y2()}}},[s]),C.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:g.jsx(c2,{size:14})}),s?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:g.jsx(hl,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:g.jsx(zl,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},pl=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},ml=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
|
|
109
|
+
`}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>${Xe(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=Rs(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+Xe(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=Rs(e);if(i===null)return Xe(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Xe(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Xe(e.text)}},ea=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}},je=class hi{options;renderer;textRenderer;constructor(t){this.options=t||Nt,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 ea}static parse(t,n){return new hi(n).parse(t)}static parseInline(t,n){return new hi(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let s=i,u=this.options.extensions.renderers[s.type].call({parser:this},s);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){n+=u||"";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){let r="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";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 u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},un=class{options;block;constructor(e){this.options=e||Nt}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(){return this.block?Be.lex:Be.lexInline}provideParser(){return this.block?je.parse:je.parseInline}},XT=class{defaults=Vi();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=je;Renderer=ir;TextRenderer=ea;Lexer=Be;Tokenizer=rr;Hooks=un;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 u of s)r=r.concat(this.walkTokens(u.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 u=a[s].flat(1/0);r=r.concat(this.walkTokens(u,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(...u){let o=a.renderer.apply(this,u);return o===!1&&(o=s.apply(this,u)),o}: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 u=s,o=r.renderer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new rr(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 u=s,o=r.tokenizer[u],c=a[u];a[u]=(...h)=>{let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new un;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 u=s,o=r.hooks[u],c=a[u];un.passThroughHooks.has(s)?a[u]=h=>{if(this.defaults.async&&un.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await o.call(a,h);return c.call(a,f)})();let d=o.call(a,h);return c.call(a,d)}:a[u]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let d=o.apply(a,h);return d===!1&&(d=c.apply(a,h)),d}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,s=r.walkTokens;i.walkTokens=function(u){let o=[];return o.push(s.call(this,u)),a&&(o=o.concat(a.call(this,u))),o}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Be.lex(t,n??this.defaults)}parser(t,n){return je.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 u=a.hooks?await a.hooks.preprocess(n):n,o=await(a.hooks?await a.hooks.provideLexer():t?Be.lex:Be.lexInline)(u,a),c=a.hooks?await a.hooks.processAllTokens(o):o;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?je.parse:je.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(n=a.hooks.preprocess(n));let u=(a.hooks?a.hooks.provideLexer():t?Be.lex:Be.lexInline)(n,a);a.hooks&&(u=a.hooks.processAllTokens(u)),a.walkTokens&&this.walkTokens(u,a.walkTokens);let o=(a.hooks?a.hooks.provideParser():t?je.parse:je.parseInline)(u,a);return a.hooks&&(o=a.hooks.postprocess(o)),o}catch(u){return s(u)}}}onError(t,n){return r=>{if(r.message+=`
|
|
110
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Xe(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},At=new XT;function se(e,t){return At.parse(e,t)}se.options=se.setOptions=function(e){return At.setOptions(e),se.defaults=At.defaults,Jo(se.defaults),se};se.getDefaults=Vi;se.defaults=Nt;se.use=function(...e){return At.use(...e),se.defaults=At.defaults,Jo(se.defaults),se};se.walkTokens=function(e,t){return At.walkTokens(e,t)};se.parseInline=At.parseInline;se.Parser=je;se.parser=je.parse;se.Renderer=ir;se.TextRenderer=ea;se.Lexer=Be;se.lexer=Be.lex;se.Tokenizer=rr;se.Hooks=un;se.parse=se;se.options;se.setOptions;se.use;se.walkTokens;se.parseInline;je.parse;Be.lex;var KT=300,ZT="300px",JT=500;function e2(e={}){let{immediate:t=!1,debounceDelay:n=KT,rootMargin:r=ZT,idleTimeout:i=JT}=e,[a,s]=C.useState(!1),u=C.useRef(null),o=C.useRef(null),c=C.useRef(null),h=C.useMemo(()=>p=>{let b=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-b))})},1)},[]),d=C.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(p,b)=>window.requestIdleCallback(p,b):h,[h]),f=C.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return C.useEffect(()=>{if(t){s(!0);return}let p=u.current;if(!p)return;o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null);let b=()=>{o.current&&(clearTimeout(o.current),o.current=null),c.current&&(f(c.current),c.current=null)},A=O=>{c.current=d(H=>{H.timeRemaining()>0||H.didTimeout?(s(!0),O.disconnect()):c.current=d(()=>{s(!0),O.disconnect()},{timeout:i/2})},{timeout:i})},N=O=>{b(),o.current=window.setTimeout(()=>{var H,j;let w=O.takeRecords();(w.length===0||(j=(H=w.at(-1))==null?void 0:H.isIntersecting)!=null&&j)&&A(O)},n)},_=(O,H)=>{O.isIntersecting?N(H):b()},R=new IntersectionObserver(O=>{for(let H of O)_(H,R)},{rootMargin:r,threshold:0});return R.observe(p),()=>{o.current&&clearTimeout(o.current),c.current&&f(c.current),R.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:u}}var cl=/\s/,t2=/^\s+$/,n2=new Set(["code","pre","svg","math","annotation"]),r2=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",i2=e=>e.some(t=>r2(t)&&n2.has(t.tagName)),a2=e=>{let t=[],n="",r=!1;for(let i of e){let a=cl.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},s2=e=>{let t=[],n="";for(let r of e)cl.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},u2=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),o2=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(i2(t))return Qn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let u=(n.sep==="char"?s2(s):a2(s)).map(o=>t2.test(o)?{type:"text",value:o}:u2(o,n.animation,n.duration,n.easing));return i.children.splice(a,1,...u),a+u.length};function di(e){var t,n,r,i;let a={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"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ai(s,"text",(u,o)=>o2(u,o,a))}}}di();var ta=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),na=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),_r=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),l2=e=>g.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[g.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),g.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),c2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),h2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),hl=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),Ms=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),d2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),f2=e=>g.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:g.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"})}),W=(...e)=>mc(gc(e)),Bt=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},p2=C.createContext({code:""}),dl=()=>C.useContext(p2),vs=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[u,o]=C.useState(!1),c=C.useRef(0),{code:h}=dl(),{isAnimating:d}=C.useContext(Fe),f=a??h,p=async()=>{var A;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(f),o(!0),e?.(),c.current=window.setTimeout(()=>o(!1),n))}catch(N){t?.(N)}};C.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=u?ta:na;return g.jsx("button",{className:W("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:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??g.jsx(b,{size:14})})},Bs={"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"},m2=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:u}=dl(),{isAnimating:o}=C.useContext(Fe),c=a??u,h=`file.${n&&n in Bs?Bs[n]:"txt"}`,d="text/plain",f=()=>{try{Bt(h,c,d),e?.()}catch(p){t?.(p)}};return g.jsx("button",{className:W("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:o,onClick:f,title:"Download file",type:"button",...s,children:r??g.jsx(_r,{size:14})})},Fs=()=>g.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[g.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),g.jsx("div",{className:"flex w-full items-center justify-center p-4",children:g.jsx(l2,{className:"size-4 animate-spin"})})]}),g2=/\.[^/.]+$/,E2=({node:e,className:t,src:n,alt:r,...i})=>{let a=async()=>{if(n)try{let s=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",o=u.split(".").pop(),c=u.includes(".")&&o!==void 0&&o.length<=4,h="";if(c)h=u;else{let d=s.type,f="png";d.includes("jpeg")||d.includes("jpg")?f="jpg":d.includes("png")?f="png":d.includes("svg")?f="svg":d.includes("gif")?f="gif":d.includes("webp")&&(f="webp"),h=`${(r||u||"image").replace(g2,"")}.${f}`}Bt(h,s,s.type)}catch{window.open(n,"_blank")}};return n?g.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[g.jsx("img",{alt:r,className:W("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...i}),g.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),g.jsx("button",{className:W("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:a,title:"Download image",type:"button",children:g.jsx(_r,{size:14})})]}):null},bn=0,b2=()=>{bn+=1,bn===1&&(document.body.style.overflow="hidden")},T2=()=>{bn=Math.max(0,bn-1),bn===0&&(document.body.style.overflow="")},x2=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=C.useState(!1),s=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),u=C.useCallback(()=>{r(),n()},[r,n]);return C.useEffect(()=>{if(t){b2();let o=c=>{c.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),T2()}}},[t,n]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:o=>{o.key==="Escape"&&n()},role:"button",tabIndex:0,children:g.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:o=>o.stopPropagation(),onKeyDown:o=>o.stopPropagation(),role:"presentation",children:[g.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:g.jsx(hl,{size:16})}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[g.jsx(Ms,{size:20}),g.jsx("span",{children:"Open external link?"})]}),g.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),g.jsx("div",{className:W("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{className:"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:s,type:"button",children:i?g.jsxs(g.Fragment,{children:[g.jsx(ta,{size:14}),g.jsx("span",{children:"Copied"})]}):g.jsxs(g.Fragment,{children:[g.jsx(na,{size:14}),g.jsx("span",{children:"Copy link"})]})}),g.jsxs("button",{className:"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:u,type:"button",children:[g.jsx(Ms,{size:14}),g.jsx("span",{children:"Open link"})]})]})]})}):null},fi=C.createContext(null),fl=()=>C.useContext(fi),Kx=()=>{var e;let t=fl();return(e=t?.code)!=null?e:null},ra=()=>{var e;let t=fl();return(e=t?.mermaid)!=null?e:null},k2=(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))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let o=document.createElement("canvas"),c=u.width*r,h=u.height*r;o.width=c,o.height=h;let d=o.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(u,0,0,c,h),o.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},u.onerror=()=>a(new Error("Failed to load SVG image")),u.src=s})},_2=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,u]=C.useState(!1),o=C.useRef(null),{isAnimating:c}=C.useContext(Fe),h=ra(),d=async f=>{try{if(f==="mmd"){Bt("diagram.mmd",e,"text/plain"),u(!1),r?.(f);return}if(!h){a?.(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),b=e.split("").reduce((_,R)=>(_<<5)-_+R.charCodeAt(0)|0,0),A=`mermaid-${Math.abs(b)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await p.render(A,e);if(!N){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){Bt("diagram.svg",N,"image/svg+xml"),u(!1),r?.(f);return}if(f==="png"){let _=await k2(N);Bt("diagram.png",_,"image/png"),r?.(f),u(!1);return}}catch(p){a?.(p)}};return C.useEffect(()=>{let f=p=>{let b=p.composedPath();o.current&&!b.includes(o.current)&&u(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),g.jsxs("div",{className:"relative",ref:o,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!s),title:"Download diagram",type:"button",children:t??g.jsx(_r,{size:14})}),s?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},Tn=0,A2=()=>{Tn+=1,Tn===1&&(document.body.style.overflow="hidden")},y2=()=>{Tn=Math.max(0,Tn-1),Tn===0&&(document.body.style.overflow="")},C2=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,u]=C.useState(!1),{isAnimating:o,controls:c}=C.useContext(Fe),h=(()=>{if(typeof c=="boolean")return c;let f=c.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{u(!s)};return C.useEffect(()=>{if(s){A2();let f=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),y2()}}},[s]),C.useEffect(()=>{s?n?.():r&&r()},[s,n,r]),g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:o,onClick:d,title:"View fullscreen",type:"button",...a,children:g.jsx(c2,{size:14})}),s?g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[g.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:g.jsx(hl,{size:20})}),g.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:g.jsx(zl,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}):null]})},pl=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let u of a)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let u of s){let o=[],c=u.querySelectorAll("td");for(let h of c)o.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(o)}return{headers:r,rows:i}},ml=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1,c=!1;for(let h of u){if(h==='"'){o=!0,c=!0;break}(h===","||h===`
|
|
111
111
|
`)&&(o=!0)}return o?c?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},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 u of n)a[s]=u.map(r).join(","),s+=1;return a.join(`
|
|
112
112
|
`)},S2=e=>{let{headers:t,rows:n}=e,r=u=>{let o=!1;for(let h of u)if(h===" "||h===`
|
|
113
113
|
`||h==="\r"){o=!0;break}if(!o)return u;let c=[];for(let h of u)h===" "?c.push("\\t"):h===`
|
|
114
114
|
`?c.push("\\n"):h==="\r"?c.push("\\r"):c.push(h);return c.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 u of n)a[s]=u.map(r).join(" "),s+=1;return a.join(`
|
|
115
|
-
`)},
|
|
116
|
-
`)},I2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=C.useState(!1),[u,o]=C.useState(!1),c=C.useRef(null),h=C.useRef(0),{isAnimating:d}=C.useContext(ve),f=async b=>{var _,N;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.write)){r?.(new Error("Clipboard API not available"));return}try{let A=(N=c.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),O=A?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let L=pl(O),U=b==="csv"?ml(L):S2(L),j=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(A){r?.(A)}};C.useEffect(()=>{let b=_=>{let N=_.composedPath();c.current&&!N.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?ta:na;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},w2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=C.useState(!1),s=C.useRef(null),{isAnimating:u}=C.useContext(ve),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=pl(f),b=c==="csv"?ml(p):N2(p);Bt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return C.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(kr,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},L2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(I2,{}),g.jsx(w2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:W("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),O2=C.lazy(()=>Js(()=>import("./code-block-OCS4YCEC-CC5lCZW2.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlock}))),R2=C.lazy(()=>Js(()=>Promise.resolve().then(()=>Mx),void 0).then(e=>({default:e.Mermaid}))),D2=/language-([^\s]+)/;function _r(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function de(e,t){return e.className===t.className&&_r(e.node,t.node)}var pi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,zn=(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},ia=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:W("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>de(e,t));ia.displayName="MarkdownOl";var gl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:W("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&_r(e.node,t.node));gl.displayName="MarkdownLi";var El=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:W("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>de(e,t));El.displayName="MarkdownUl";var bl=C.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:W("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>de(e,t));bl.displayName="MarkdownHr";var Tl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:W("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>de(e,t));Tl.displayName="MarkdownStrong";var P2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=C.useContext(ve),[s,u]=C.useState(!1),o=n==="streamdown:incomplete-link",c=C.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=C.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=C.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(x2,{...f})]}):g.jsx("a",{className:W("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},xl=C.memo(P2,(e,t)=>de(e,t)&&e.href===t.href);xl.displayName="MarkdownA";var kl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:W("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>de(e,t));kl.displayName="MarkdownH1";var _l=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:W("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>de(e,t));_l.displayName="MarkdownH2";var Al=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:W("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>de(e,t));Al.displayName="MarkdownH3";var yl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:W("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>de(e,t));yl.displayName="MarkdownH4";var Cl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:W("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>de(e,t));Cl.displayName="MarkdownH5";var Sl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:W("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>de(e,t));Sl.displayName="MarkdownH6";var Nl=C.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=C.useContext(ve),a=pi(i,"table");return g.jsx(L2,{className:t,showControls:a,...r,children:e})},(e,t)=>de(e,t));Nl.displayName="MarkdownTable";var Il=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:W("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>de(e,t));Il.displayName="MarkdownThead";var wl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:W("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>de(e,t));wl.displayName="MarkdownTbody";var Ll=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:W("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>de(e,t));Ll.displayName="MarkdownTr";var Ol=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:W("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>de(e,t));Ol.displayName="MarkdownTh";var Rl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:W("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>de(e,t));Rl.displayName="MarkdownTd";var Dl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:W("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>de(e,t));Dl.displayName="MarkdownBlockquote";var Pl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:W("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>de(e,t));Pl.displayName="MarkdownSup";var Ml=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:W("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>de(e,t));Ml.displayName="MarkdownSub";var vl=C.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!C.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(C.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(C.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!C.isValidElement(s))return s;if(s.type===ia){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>de(e,t));vl.displayName="MarkdownSection";var M2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=C.useContext(ve),o=ra();if(a)return g.jsx("code",{className:W("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(D2),h=(i=c?.at(1))!=null?i:"",d="";if(C.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=pi(u,"mermaid"),b=zn(u,"download"),_=zn(u,"copy"),N=zn(u,"fullscreen"),A=zn(u,"panZoom"),O=p&&(b||_||N);return g.jsx(C.Suspense,{fallback:g.jsx(Fs,{}),children:g.jsxs("div",{className:W("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[O?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(_2,{chart:d,config:s?.config}):null,_?g.jsx(vs,{code:d}):null,N?g.jsx(C2,{chart:d,config:s?.config}):null]}):null,g.jsx(R2,{chart:d,config:s?.config,showControls:A})]})})}let f=pi(u,"code");return g.jsx(C.Suspense,{fallback:g.jsx(Fs,{}),children:g.jsx(O2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(m2,{code:d,language:h}),g.jsx(vs,{})]}):null})})},Bl=C.memo(M2,(e,t)=>e.className===t.className&&_r(e.node,t.node));Bl.displayName="MarkdownCode";var Fl=C.memo(E2,(e,t)=>e.className===t.className&&_r(e.node,t.node));Fl.displayName="MarkdownImg";var Hl=C.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&C.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>de(e,t));Hl.displayName="MarkdownParagraph";var v2={ol:ia,li:gl,ul:El,hr:bl,strong:Tl,a:xl,h1:kl,h2:_l,h3:Al,h4:yl,h5:Cl,h6:Sl,table:Nl,thead:Il,tbody:wl,tr:Ll,th:Ol,td:Rl,blockquote:Dl,code:Bl,img:Fl,pre:({children:e})=>C.isValidElement(e)?C.cloneElement(e,{"data-block":"true"}):e,sup:Pl,sub:Ml,p:Hl,section:vl},B2=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Hs=[],Us={allowDangerousHtml:!0},$n=new WeakMap,F2=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 h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,_]=p;if(typeof b=="function"){let N=$n.get(b);N||(N=b.name,$n.set(b,N)),d+=N}else d+=String(b);d+=":",d+=JSON.stringify(_)}else if(typeof p=="function"){let b=$n.get(p);b||(b=p.name,$n.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}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()}},js=new F2,Ul=e=>{let t=H2(e),n=e.children||"";return V2(t.runSync(t.parse(n),n),e)},H2=e=>{let t=js.get(e);if(t)return t;let n=j2(e);return js.set(e,n),n},U2=e=>e.some(t=>Array.isArray(t)?t[0]===ti:t===ti),j2=e=>{let t=e.rehypePlugins||Hs,n=e.remarkPlugins||Hs,r=U2(t)?n:[...n,B2],i=e.remarkRehypeOptions?{...Us,...e.remarkRehypeOptions}:Us;return cT().use(lb).use(r).use(qb,i).use(t)},z2=e=>e,$2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},Y2=(e,t)=>{var n;for(let r in vr)if(Object.hasOwn(vr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=vr[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},q2=(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},V2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||z2;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return $2(d,h,a,c.value),h;if(c.type==="element"&&(Y2(c,o),q2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return EE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},W2=/\[\^[\w-]{1,200}\](?!:)/,G2=/\[\^[\w-]{1,200}\]:/,Q2=/<\/(\w+)>/,X2=/<(\w+)[\s>]/,K2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Z2=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},J2=e=>{let t=W2.test(e),n=G2.test(e);if(t||n)return[e];let r=Me.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(Q2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(X2);if(h){let d=h[1];o.includes(`</${d}>`)||K2.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(Z2(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},zs,$s,Wn={...fn,protocols:{...fn.protocols,href:[...($s=(zs=fn.protocols)==null?void 0:zs.href)!=null?$s:[],"tel"]}},mi={raw:ti,sanitize:[eo,Wn],harden:[Lc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},ex={gfm:[W1,{}]},Ys=Object.values(mi),tx=Object.values(ex),nx={block:" ▋",circle:" ●"},rx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},ve=C.createContext(rx),jl=C.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(Ul,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)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)});jl.displayName="Block";var ix=["github-light","github-dark"],aa=C.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=Ys,remarkPlugins:a=tx,className:s,shikiTheme:u=ix,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=jl,parseMarkdownIntoBlocksFn:p=J2,caret:b,plugins:_,remend:N,linkSafety:A={enabled:!0},allowedTags:O,...L})=>{let U=C.useId(),[j,w]=C.useTransition(),V=C.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?tE(e,N):e,[e,t,n,N]),q=C.useMemo(()=>p(V),[V,p]),[Q,S]=C.useState(q);C.useEffect(()=>{t==="streaming"?w(()=>{S(q)}):S(q)},[q,t]);let D=t==="streaming"?Q:q,P=C.useMemo(()=>D.map((re,x)=>`${U}-${x}`),[D.length,U]),$=C.useMemo(()=>d?d===!0?di():di(d):null,[d]),z=C.useMemo(()=>{var re,x;return{shikiTheme:(x=(re=_?.code)==null?void 0:re.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:A}},[u,c,h,t,o,A,_?.code]),F=C.useMemo(()=>({...v2,...r}),[r]),K=C.useMemo(()=>{let re=[];return _!=null&&_.cjk&&(re=[...re,..._.cjk.remarkPluginsBefore]),re=[...re,...a],_!=null&&_.cjk&&(re=[...re,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(re=[...re,_.math.remarkPlugin]),re},[a,_?.math,_?.cjk]),se=C.useMemo(()=>{var re;let x=i;if(O&&Object.keys(O).length>0&&i===Ys){let ie={...Wn,tagNames:[...(re=Wn.tagNames)!=null?re:[],...Object.keys(O)],attributes:{...Wn.attributes,...O}};x=[mi.raw,[eo,ie],mi.harden]}return _!=null&&_.math&&(x=[...x,_.math.rehypePlugin]),$&&h&&(x=[...x,$.rehypePlugin]),x},[i,_?.math,$,h,O]),me=C.useMemo(()=>b&&h?{"--streamdown-caret":`"${nx[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(fi.Provider,{value:_??null,children:g.jsx(ve.Provider,{value:z,children:g.jsx("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx(Ul,{components:F,rehypePlugins:se,remarkPlugins:K,...L,children:e})})})}):g.jsx(fi.Provider,{value:_??null,children:g.jsx(ve.Provider,{value:z,children:g.jsxs("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:me,children:[D.length===0&&b&&h&&g.jsx("span",{}),D.map((re,x)=>g.jsx(f,{components:F,content:re,index:x,rehypePlugins:se,remarkPlugins:K,shouldParseIncompleteMarkdown:n,...L},P[x]))]})})})},(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);aa.displayName="Streamdown";var ax=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=C.useRef(null),c=C.useRef(null),[h,d]=C.useState(s),[f,p]=C.useState({x:0,y:0}),[b,_]=C.useState(!1),[N,A]=C.useState({x:0,y:0}),[O,L]=C.useState({x:0,y:0}),U=C.useCallback(P=>{d($=>Math.max(n,Math.min(r,$+P)))},[n,r]),j=C.useCallback(()=>{U(i)},[U,i]),w=C.useCallback(()=>{U(-i)},[U,i]),V=C.useCallback(()=>{d(s),p({x:0,y:0})},[s]),q=C.useCallback(P=>{P.preventDefault();let $=P.deltaY>0?-i:i;U($)},[U,i]),Q=C.useCallback(P=>{if(P.button!==0||P.isPrimary===!1)return;_(!0),A({x:P.clientX,y:P.clientY}),L(f);let $=P.currentTarget;$ instanceof HTMLElement&&$.setPointerCapture(P.pointerId)},[f]),S=C.useCallback(P=>{if(!b)return;P.preventDefault();let $=P.clientX-N.x,z=P.clientY-N.y;p({x:O.x+$,y:O.y+z})},[b,N,O]),D=C.useCallback(P=>{_(!1);let $=P.currentTarget;$ instanceof HTMLElement&&$.releasePointerCapture(P.pointerId)},[]);return C.useEffect(()=>{let P=o.current;if(P)return P.addEventListener("wheel",q,{passive:!1}),()=>{P.removeEventListener("wheel",q)}},[q]),C.useEffect(()=>{let P=c.current;if(P&&b)return document.body.style.userSelect="none",P.addEventListener("pointermove",S,{passive:!1}),P.addEventListener("pointerup",D),P.addEventListener("pointercancel",D),()=>{document.body.style.userSelect="",P.removeEventListener("pointermove",S),P.removeEventListener("pointerup",D),P.removeEventListener("pointercancel",D)}},[b,S,D]),g.jsxs("div",{className:W("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:W("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"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:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(d2,{size:16})}),g.jsx("button",{className:"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:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(f2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:g.jsx(h2,{size:16})})]}):null,g.jsx("div",{className:W("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Q,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},zl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=C.useState(null),[u,o]=C.useState(!1),[c,h]=C.useState(""),[d,f]=C.useState(""),[p,b]=C.useState(0),{mermaid:_}=C.useContext(ve),N=ra(),A=_?.errorComponent,{shouldRender:O,containerRef:L}=e2({immediate:r});if(C.useEffect(()=>{if(O){if(!N){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=N.getMermaid(n),w=e.split("").reduce((Q,S)=>(Q<<5)-Q+S.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:q}=await j.render(V,e);h(q),f(q)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,O,N]),!(O||c||d))return g.jsx("div",{className:W("my-4 min-h-[200px]",t),ref:L});if(u&&!c&&!d)return g.jsx("div",{className:W("my-4 flex justify-center p-4",t),ref:L,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return A?g.jsx("div",{ref:L,children:g.jsx(A,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:W("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:L,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let U=c||d;return g.jsx("div",{className:W("size-full",t),"data-streamdown":"mermaid",ref:L,children:g.jsx(ax,{className:W(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:W("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:U},role:"img"})})})};function qs(e){return e.replace(/\s*[✓✗]$/,"").replace(/\s*\(.*\)$/,"").trim()}function sx(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type===He.Tool&&r.title){const i=qs(r.title),a=[r];let s=n+1;for(;s<e.length;){const u=e[s];if(u.type===He.Tool&&u.title&&qs(u.title)===i)a.push(u),s++;else break}if(a.length>=2)t.push({kind:"group",label:i,logs:a,key:a[0].id});else for(const u of a)t.push({kind:"single",log:u,key:u.id});n=s}else t.push({kind:"single",log:r,key:r.id}),n++}return t}const ux="/api",$l=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${ux}/attachments/by-path?path=${encodeURIComponent(e)}`:e,ox=({src:e,alt:t,...n})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...n,className:"max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 transition-opacity"})}),Yl={img:ox},ql=C.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:g.jsx(aa,{urlTransform:$l,components:Yl,children:e})})}));ql.displayName="UserMessage";const Vl=C.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=C.useState(t),i=C.useRef(null),[a,s]=C.useState(0);C.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=C.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
|
|
117
|
-
`)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return g.jsxs("div",{className:"my-1.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(
|
|
118
|
-
`)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&g.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?g.jsx(_i,{size:10}):g.jsx(
|
|
119
|
-
`)[0]||"",c=o.match(/([^/\\]+\.[a-zA-Z0-9]+)/);return c?c[1]:o.slice(0,40)}),a=t.filter(u=>u.title?.endsWith("✓")).length,s=t.filter(u=>u.title?.endsWith("✗")).length;return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(
|
|
115
|
+
`)},Vr=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},N2=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(u=>Vr(u));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let u=0;u<t.length;u+=1)s[u]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let u of n)if(u.length<t.length){let o=new Array(t.length);for(let c=0;c<t.length;c+=1)o[c]=c<u.length?Vr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>Vr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
|
|
116
|
+
`)},I2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=C.useState(!1),[u,o]=C.useState(!1),c=C.useRef(null),h=C.useRef(0),{isAnimating:d}=C.useContext(Fe),f=async b=>{var A,N;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let _=(N=c.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),R=_?.querySelector("table");if(!R){r?.(new Error("Table not found"));return}let O=pl(R),H=b==="csv"?ml(O):S2(O),j=new ClipboardItem({"text/plain":new Blob([H],{type:"text/plain"}),"text/html":new Blob([R.outerHTML],{type:"text/html"})});await navigator.clipboard.write([j]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(_){r?.(_)}};C.useEffect(()=>{let b=A=>{let N=A.composedPath();c.current&&!N.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?ta:na;return g.jsxs("div",{className:"relative",ref:c,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??g.jsx(p,{size:14})}),a?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},w2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=C.useState(!1),s=C.useRef(null),{isAnimating:u}=C.useContext(Fe),o=c=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d?.querySelector("table");if(!f){r?.(new Error("Table not found"));return}let p=pl(f),b=c==="csv"?ml(p):N2(p);Bt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return C.useEffect(()=>{let c=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),g.jsxs("div",{className:"relative",ref:s,children:[g.jsx("button",{className:W("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>a(!i),title:"Download table",type:"button",children:e??g.jsx(_r,{size:14})}),i?g.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),g.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>o("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},L2=({children:e,className:t,showControls:n,...r})=>g.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?g.jsxs("div",{className:"flex items-center justify-end gap-1",children:[g.jsx(I2,{}),g.jsx(w2,{})]}):null,g.jsx("div",{className:"overflow-x-auto overscroll-y-auto",children:g.jsx("table",{className:W("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),O2=C.lazy(()=>Js(()=>import("./code-block-OCS4YCEC-CyOCA4DG.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlock}))),R2=C.lazy(()=>Js(()=>Promise.resolve().then(()=>Mx),void 0).then(e=>({default:e.Mermaid}))),D2=/language-([^\s]+)/;function Ar(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function de(e,t){return e.className===t.className&&Ar(e.node,t.node)}var pi=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,$n=(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},ia=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ol",{className:W("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>de(e,t));ia.displayName="MarkdownOl";var gl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("li",{className:W("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Ar(e.node,t.node));gl.displayName="MarkdownLi";var El=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("ul",{className:W("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>de(e,t));El.displayName="MarkdownUl";var bl=C.memo(({className:e,node:t,...n})=>g.jsx("hr",{className:W("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>de(e,t));bl.displayName="MarkdownHr";var Tl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("span",{className:W("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>de(e,t));Tl.displayName="MarkdownStrong";var P2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=C.useContext(Fe),[s,u]=C.useState(!1),o=n==="streamdown:incomplete-link",c=C.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&n)||o)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,o]),h=C.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=C.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?g.jsxs(g.Fragment,{children:[g.jsx("button",{className:W("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):g.jsx(x2,{...f})]}):g.jsx("a",{className:W("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":o,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},xl=C.memo(P2,(e,t)=>de(e,t)&&e.href===t.href);xl.displayName="MarkdownA";var kl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h1",{className:W("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>de(e,t));kl.displayName="MarkdownH1";var _l=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h2",{className:W("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>de(e,t));_l.displayName="MarkdownH2";var Al=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h3",{className:W("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>de(e,t));Al.displayName="MarkdownH3";var yl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h4",{className:W("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>de(e,t));yl.displayName="MarkdownH4";var Cl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h5",{className:W("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>de(e,t));Cl.displayName="MarkdownH5";var Sl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("h6",{className:W("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>de(e,t));Sl.displayName="MarkdownH6";var Nl=C.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=C.useContext(Fe),a=pi(i,"table");return g.jsx(L2,{className:t,showControls:a,...r,children:e})},(e,t)=>de(e,t));Nl.displayName="MarkdownTable";var Il=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("thead",{className:W("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>de(e,t));Il.displayName="MarkdownThead";var wl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tbody",{className:W("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>de(e,t));wl.displayName="MarkdownTbody";var Ll=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("tr",{className:W("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>de(e,t));Ll.displayName="MarkdownTr";var Ol=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("th",{className:W("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>de(e,t));Ol.displayName="MarkdownTh";var Rl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("td",{className:W("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>de(e,t));Rl.displayName="MarkdownTd";var Dl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("blockquote",{className:W("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>de(e,t));Dl.displayName="MarkdownBlockquote";var Pl=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sup",{className:W("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>de(e,t));Pl.displayName="MarkdownSup";var Ml=C.memo(({children:e,className:t,node:n,...r})=>g.jsx("sub",{className:W("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>de(e,t));Ml.displayName="MarkdownSub";var vl=C.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!C.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(C.isValidElement(f))if(((u=f.props)==null?void 0:u["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let b of p){if(typeof b=="string"&&b.trim()!==""){h=!0;break}if(C.isValidElement(b)&&((o=b.props)==null?void 0:o["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!C.isValidElement(s))return s;if(s.type===ia){let u=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(o=>!i(o));return u.length===0?null:{...s,props:{...s.props,children:u}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?g.jsx("section",{className:t,...r,children:a}):null}return g.jsx("section",{className:t,...r,children:e})},(e,t)=>de(e,t));vl.displayName="MarkdownSection";var M2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=C.useContext(Fe),o=ra();if(a)return g.jsx("code",{className:W("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let c=t?.match(D2),h=(i=c?.at(1))!=null?i:"",d="";if(C.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?d=n.props.children:typeof n=="string"&&(d=n),h==="mermaid"&&o){let p=pi(u,"mermaid"),b=$n(u,"download"),A=$n(u,"copy"),N=$n(u,"fullscreen"),_=$n(u,"panZoom"),R=p&&(b||A||N);return g.jsx(C.Suspense,{fallback:g.jsx(Fs,{}),children:g.jsxs("div",{className:W("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?g.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b?g.jsx(_2,{chart:d,config:s?.config}):null,A?g.jsx(vs,{code:d}):null,N?g.jsx(C2,{chart:d,config:s?.config}):null]}):null,g.jsx(R2,{chart:d,config:s?.config,showControls:_})]})})}let f=pi(u,"code");return g.jsx(C.Suspense,{fallback:g.jsx(Fs,{}),children:g.jsx(O2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(m2,{code:d,language:h}),g.jsx(vs,{})]}):null})})},Bl=C.memo(M2,(e,t)=>e.className===t.className&&Ar(e.node,t.node));Bl.displayName="MarkdownCode";var Fl=C.memo(E2,(e,t)=>e.className===t.className&&Ar(e.node,t.node));Fl.displayName="MarkdownImg";var Hl=C.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&C.isValidElement(i[0])){let a=i[0].props.node,s=a?.tagName;if(s==="img")return g.jsx(g.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return g.jsx(g.Fragment,{children:e})}return g.jsx("p",{className:t,...r,children:e})},(e,t)=>de(e,t));Hl.displayName="MarkdownParagraph";var v2={ol:ia,li:gl,ul:El,hr:bl,strong:Tl,a:xl,h1:kl,h2:_l,h3:Al,h4:yl,h5:Cl,h6:Sl,table:Nl,thead:Il,tbody:wl,tr:Ll,th:Ol,td:Rl,blockquote:Dl,code:Bl,img:Fl,pre:({children:e})=>C.isValidElement(e)?C.cloneElement(e,{"data-block":"true"}):e,sup:Pl,sub:Ml,p:Hl,section:vl},B2=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Hs=[],Us={allowDangerousHtml:!0},Yn=new WeakMap,F2=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 h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[b,A]=p;if(typeof b=="function"){let N=Yn.get(b);N||(N=b.name,Yn.set(b,N)),d+=N}else d+=String(b);d+=":",d+=JSON.stringify(A)}else if(typeof p=="function"){let b=Yn.get(p);b||(b=p.name,Yn.set(p,b)),d+=b}else d+=String(p)}return d},s=a(n),u=a(r),o=i?JSON.stringify(i):"",c=`${u}::${s}::${o}`;return this.keyCache.set(e,c),c}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()}},js=new F2,Ul=e=>{let t=H2(e),n=e.children||"";return V2(t.runSync(t.parse(n),n),e)},H2=e=>{let t=js.get(e);if(t)return t;let n=j2(e);return js.set(e,n),n},U2=e=>e.some(t=>Array.isArray(t)?t[0]===ti:t===ti),j2=e=>{let t=e.rehypePlugins||Hs,n=e.remarkPlugins||Hs,r=U2(t)?n:[...n,B2],i=e.remarkRehypeOptions?{...Us,...e.remarkRehypeOptions}:Us;return cT().use(lb).use(r).use(qb,i).use(t)},z2=e=>e,$2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},Y2=(e,t)=>{var n;for(let r in Br)if(Object.hasOwn(Br,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Br[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},q2=(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},V2=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:u}=t;if(n||r||i||a||u){let o=u||z2;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return $2(d,h,a,c.value),h;if(c.type==="element"&&(Y2(c,o),q2(c,h,d,r,i,n)&&d&&typeof h=="number"))return s&&c.children?d.children.splice(h,1,...c.children):d.children.splice(h,1),h})}return EE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},W2=/\[\^[\w-]{1,200}\](?!:)/,G2=/\[\^[\w-]{1,200}\]:/,Q2=/<\/(\w+)>/,X2=/<(\w+)[\s>]/,K2=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Z2=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},J2=e=>{let t=W2.test(e),n=G2.test(e);if(t||n)return[e];let r=Be.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let u of r){let o=u.raw,c=i.length;if(a.length>0){if(i[c-1]+=o,u.type==="html"){let h=o.match(Q2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(X2);if(h){let d=h[1];o.includes(`</${d}>`)||K2.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(Z2(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},zs,$s,Gn={...pn,protocols:{...pn.protocols,href:[...($s=(zs=pn.protocols)==null?void 0:zs.href)!=null?$s:[],"tel"]}},mi={raw:ti,sanitize:[eo,Gn],harden:[Lc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},ex={gfm:[W1,{}]},Ys=Object.values(mi),tx=Object.values(ex),nx={block:" ▋",circle:" ●"},rx={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Fe=C.createContext(rx),jl=C.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(Ul,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)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)});jl.displayName="Block";var ix=["github-light","github-dark"],aa=C.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=Ys,remarkPlugins:a=tx,className:s,shikiTheme:u=ix,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=jl,parseMarkdownIntoBlocksFn:p=J2,caret:b,plugins:A,remend:N,linkSafety:_={enabled:!0},allowedTags:R,...O})=>{let H=C.useId(),[j,w]=C.useTransition(),V=C.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?tE(e,N):e,[e,t,n,N]),q=C.useMemo(()=>p(V),[V,p]),[Q,S]=C.useState(q);C.useEffect(()=>{t==="streaming"?w(()=>{S(q)}):S(q)},[q,t]);let U=t==="streaming"?Q:q,L=C.useMemo(()=>U.map((ee,x)=>`${H}-${x}`),[U.length,H]),$=C.useMemo(()=>d?d===!0?di():di(d):null,[d]),z=C.useMemo(()=>{var ee,x;return{shikiTheme:(x=(ee=A?.code)==null?void 0:ee.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:_}},[u,c,h,t,o,_,A?.code]),B=C.useMemo(()=>({...v2,...r}),[r]),J=C.useMemo(()=>{let ee=[];return A!=null&&A.cjk&&(ee=[...ee,...A.cjk.remarkPluginsBefore]),ee=[...ee,...a],A!=null&&A.cjk&&(ee=[...ee,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(ee=[...ee,A.math.remarkPlugin]),ee},[a,A?.math,A?.cjk]),re=C.useMemo(()=>{var ee;let x=i;if(R&&Object.keys(R).length>0&&i===Ys){let ge={...Gn,tagNames:[...(ee=Gn.tagNames)!=null?ee:[],...Object.keys(R)],attributes:{...Gn.attributes,...R}};x=[mi.raw,[eo,ge],mi.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),$&&h&&(x=[...x,$.rehypePlugin]),x},[i,A?.math,$,h,R]),me=C.useMemo(()=>b&&h?{"--streamdown-caret":`"${nx[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(fi.Provider,{value:A??null,children:g.jsx(Fe.Provider,{value:z,children:g.jsx("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:g.jsx(Ul,{components:B,rehypePlugins:re,remarkPlugins:J,...O,children:e})})})}):g.jsx(fi.Provider,{value:A??null,children:g.jsx(Fe.Provider,{value:z,children:g.jsxs("div",{className:W("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",b?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,s),style:me,children:[U.length===0&&b&&h&&g.jsx("span",{}),U.map((ee,x)=>g.jsx(f,{components:B,content:ee,index:x,rehypePlugins:re,remarkPlugins:J,shouldParseIncompleteMarkdown:n,...O},L[x]))]})})})},(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);aa.displayName="Streamdown";var ax=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=C.useRef(null),c=C.useRef(null),[h,d]=C.useState(s),[f,p]=C.useState({x:0,y:0}),[b,A]=C.useState(!1),[N,_]=C.useState({x:0,y:0}),[R,O]=C.useState({x:0,y:0}),H=C.useCallback(L=>{d($=>Math.max(n,Math.min(r,$+L)))},[n,r]),j=C.useCallback(()=>{H(i)},[H,i]),w=C.useCallback(()=>{H(-i)},[H,i]),V=C.useCallback(()=>{d(s),p({x:0,y:0})},[s]),q=C.useCallback(L=>{L.preventDefault();let $=L.deltaY>0?-i:i;H($)},[H,i]),Q=C.useCallback(L=>{if(L.button!==0||L.isPrimary===!1)return;A(!0),_({x:L.clientX,y:L.clientY}),O(f);let $=L.currentTarget;$ instanceof HTMLElement&&$.setPointerCapture(L.pointerId)},[f]),S=C.useCallback(L=>{if(!b)return;L.preventDefault();let $=L.clientX-N.x,z=L.clientY-N.y;p({x:R.x+$,y:R.y+z})},[b,N,R]),U=C.useCallback(L=>{A(!1);let $=L.currentTarget;$ instanceof HTMLElement&&$.releasePointerCapture(L.pointerId)},[]);return C.useEffect(()=>{let L=o.current;if(L)return L.addEventListener("wheel",q,{passive:!1}),()=>{L.removeEventListener("wheel",q)}},[q]),C.useEffect(()=>{let L=c.current;if(L&&b)return document.body.style.userSelect="none",L.addEventListener("pointermove",S,{passive:!1}),L.addEventListener("pointerup",U),L.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",L.removeEventListener("pointermove",S),L.removeEventListener("pointerup",U),L.removeEventListener("pointercancel",U)}},[b,S,U]),g.jsxs("div",{className:W("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:o,style:{cursor:b?"grabbing":"grab"},children:[a?g.jsxs("div",{className:W("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[g.jsx("button",{className:"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:h>=r,onClick:j,title:"Zoom in",type:"button",children:g.jsx(d2,{size:16})}),g.jsx("button",{className:"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:h<=n,onClick:w,title:"Zoom out",type:"button",children:g.jsx(f2,{size:16})}),g.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:V,title:"Reset zoom and pan",type:"button",children:g.jsx(h2,{size:16})})]}):null,g.jsx("div",{className:W("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Q,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},zl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=C.useState(null),[u,o]=C.useState(!1),[c,h]=C.useState(""),[d,f]=C.useState(""),[p,b]=C.useState(0),{mermaid:A}=C.useContext(Fe),N=ra(),_=A?.errorComponent,{shouldRender:R,containerRef:O}=e2({immediate:r});if(C.useEffect(()=>{if(R){if(!N){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let j=N.getMermaid(n),w=e.split("").reduce((Q,S)=>(Q<<5)-Q+S.charCodeAt(0)|0,0),V=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:q}=await j.render(V,e);h(q),f(q)}catch(j){if(!(d||c)){let w=j instanceof Error?j.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,R,N]),!(R||c||d))return g.jsx("div",{className:W("my-4 min-h-[200px]",t),ref:O});if(u&&!c&&!d)return g.jsx("div",{className:W("my-4 flex justify-center p-4",t),ref:O,children:g.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[g.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),g.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d){let j=()=>b(w=>w+1);return _?g.jsx("div",{ref:O,children:g.jsx(_,{chart:e,error:a,retry:j})}):g.jsxs("div",{className:W("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:O,children:[g.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),g.jsxs("details",{className:"mt-2",children:[g.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),g.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let H=c||d;return g.jsx("div",{className:W("size-full",t),"data-streamdown":"mermaid",ref:O,children:g.jsx(ax,{className:W(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:g.jsx("div",{"aria-label":"Mermaid chart",className:W("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:H},role:"img"})})})};function qs(e){return e.replace(/\s*[✓✗]$/,"").replace(/\s*\(.*\)$/,"").trim()}function sx(e){const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.type===Ue.Tool&&r.title){const i=qs(r.title),a=[r];let s=n+1;for(;s<e.length;){const u=e[s];if(u.type===Ue.Tool&&u.title&&qs(u.title)===i)a.push(u),s++;else break}if(a.length>=2)t.push({kind:"group",label:i,logs:a,key:a[0].id});else for(const u of a)t.push({kind:"single",log:u,key:u.id});n=s}else t.push({kind:"single",log:r,key:r.id}),n++}return t}const ux="/api",$l=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${ux}/attachments/by-path?path=${encodeURIComponent(e)}`:e,ox=({src:e,alt:t,...n})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...n,className:"max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 transition-opacity"})}),Yl={img:ox},ql=C.memo(({content:e,compact:t})=>g.jsx("div",{className:t?"flex justify-end mb-4 mt-2":"flex justify-end mb-8 mt-4",children:g.jsx("div",{className:`relative bg-neutral-200 text-neutral-900 rounded-2xl rounded-tr-sm max-w-[85%] min-w-0 leading-relaxed ${t?"px-3.5 py-2.5 text-[13px]":"px-5 py-3.5 text-sm"}`,children:g.jsx(aa,{urlTransform:$l,components:Yl,children:e})})}));ql.displayName="UserMessage";const Vl=C.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=C.useState(t),i=C.useRef(null),[a,s]=C.useState(0);C.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=C.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
|
|
117
|
+
`)[0]||"";return c.length>80?c.slice(0,80)+"…":c},[e]);return g.jsxs("div",{className:"my-1.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs text-neutral-400 hover:text-neutral-500 transition-colors select-none w-full text-left",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(ur,{size:11,strokeWidth:2})}),g.jsx("span",{className:"font-medium",children:"Thinking"}),!n&&u&&g.jsx("span",{className:"truncate text-neutral-300 ml-1 font-normal",children:u})]}),g.jsx("div",{className:"overflow-hidden relative",style:{maxHeight:n?a+16:0},children:g.jsx("div",{ref:i,className:"pl-5 pt-1 pb-2 before:absolute before:left-[7px] before:top-1 before:bottom-2 before:w-px before:bg-neutral-100",children:g.jsx("div",{className:"text-xs text-neutral-400 leading-relaxed whitespace-pre-wrap min-w-0",children:e.replace(/^Thinking:\s*/i,"").trim()})})})]})});Vl.displayName="ThinkingBlock";const gi=C.memo(({title:e,content:t,type:n})=>{const[r,i]=C.useState(!1);if(n===Ue.Action)return g.jsxs("div",{className:"flex items-center gap-1.5 py-0.5 text-xs text-neutral-400",children:[g.jsx("span",{className:"shrink-0 w-1 h-1 rounded-full bg-neutral-300"}),g.jsx("span",{children:t})]});const s=e.endsWith("✓"),u=e.endsWith("✗"),o=u?"text-red-400":s?"text-emerald-400":"text-neutral-400",c=t?.split(`
|
|
118
|
+
`)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>i(!r),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:`shrink-0 w-3.5 h-3.5 flex items-center justify-center ${o}`,children:u?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}):s?g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e.replace(/\s*[✓✗]$/,"")}),h&&g.jsx("span",{className:"truncate text-neutral-300 font-mono",children:h}),t&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:r?g.jsx(_i,{size:10}):g.jsx(ur,{size:10})})]}),r&&t&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:t})})]})});gi.displayName="ToolBlock";const Wl=C.memo(({label:e,logs:t})=>{const[n,r]=C.useState(!1),i=t.map(u=>{const o=u.content.split(`
|
|
119
|
+
`)[0]||"",c=o.match(/([^/\\]+\.[a-zA-Z0-9]+)/);return c?c[1]:o.slice(0,40)}),a=t.filter(u=>u.title?.endsWith("✓")).length,s=t.filter(u=>u.title?.endsWith("✗")).length;return g.jsxs("div",{className:"my-0.5",children:[g.jsxs("button",{onClick:()=>r(!n),className:"group flex items-center gap-1.5 py-1 text-xs w-full text-left transition-colors",children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center transition-transform duration-200",style:{transform:n?"rotate(90deg)":"rotate(0deg)"},children:g.jsx(ur,{size:11,strokeWidth:2,className:"text-neutral-400"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:e}),g.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1",children:[g.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 rounded-full bg-neutral-100 text-neutral-400 text-[10px] font-medium leading-none tabular-nums",children:t.length}),a>0&&g.jsxs("span",{className:"text-emerald-400 text-[10px]",children:[a,"✓"]}),s>0&&g.jsxs("span",{className:"text-red-400 text-[10px]",children:[s,"✗"]})]}),!n&&g.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[i.slice(0,3).join(", "),t.length>3?" …":""]})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:t.map(u=>{const o=u.content.split(`
|
|
120
120
|
`)[0]||"";return g.jsx(Gl,{log:u,firstLine:o},u.id)})})]})});Wl.displayName="ToolGroup";const Gl=C.memo(({log:e,firstLine:t})=>{const[n,r]=C.useState(!1),i=e.content.includes(`
|
|
121
|
-
`),a=e.title?.endsWith("✓"),s=e.title?.endsWith("✗");return g.jsxs("div",{children:[g.jsxs("button",{onClick:()=>i&&r(!n),className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${i?"cursor-pointer":"cursor-default"}`,children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:s?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):a?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?g.jsx(_i,{size:10}):g.jsx(
|
|
122
|
-
`)}var Jl=(function(e){hx(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,Ws(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=Ws(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),he=Jl,fx=Oe,Mt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=ir(n,this.path);r&&(r=Oe(r));var i=Tt(n,{op:"remove",path:this.from}).removed;return Tt(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=ir(n,this.from);return Tt(n,{op:"add",path:this.path,value:Oe(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:yn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},px={add:function(e,t,n){return Ti(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Mt.move,copy:Mt.copy,test:Mt.test,_get:Mt._get};function ir(e,t){if(t=="")return e;var n={op:"_get",path:t};return Tt(e,n),n.value}function Tt(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):ar(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=ir(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=yn(e,t.value),s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=Oe(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,f=void 0,p=void 0,b=void 0;for(typeof n=="function"?b=n:b=ar;;){if(p=o[h],p&&p.indexOf("~")!=-1&&(p=Zl(p)),i&&(p=="__proto__"||p=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&f===void 0&&(c[p]===void 0?f=o.slice(0,h).join("/"):h==d-1&&(f=t.path),f!==void 0&&b(t,0,e,f)),h++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!Ti(p))throw new he("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);Ti(p)&&(p=~~p)}if(h>=d){if(n&&t.op==="add"&&p>c.length)throw new he("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=px[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Mt[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[p],n&&h<d&&(!c||typeof c!="object"))throw new he("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Dn(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Oe(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=Tt(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function mx(e,t,n){var r=Tt(e,t);if(r.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function ar(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new he("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Mt[e.op]){if(typeof e.path!="string")throw new he("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new he('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new he("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&xi(e.value))throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new he("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new he("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=ec([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new he("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function ec(e,t,n){try{if(!Array.isArray(e))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Dn(Oe(t),Oe(e),n||!0);else{n=n||ar;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof he)return i;throw i}}function yn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!yn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!yn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const gx=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:he,_areEquals:yn,applyOperation:Tt,applyPatch:Dn,applyReducer:mx,deepClone:fx,getValueByPointer:ir,validate:ec,validator:ar},Symbol.toStringTag,{value:"Module"}));var sa=new WeakMap,Ex=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),bx=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function Tx(e){return sa.get(e)}function xx(e,t){return e.observers.get(t)}function kx(e,t){e.observers.delete(t.callback)}function _x(e,t){t.unobserve()}function Ax(e,t){var n=[],r,i=Tx(e);if(!i)i=new Ex(e),sa.set(e,i);else{var a=xx(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=Oe(e),t){r.callback=t,r.next=null;var s=function(){ki(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){ki(r),clearTimeout(r.next),kx(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new bx(t,r)),r}function ki(e,t){t===void 0&&(t=!1);var n=sa.get(e.object);ua(n.value,e.object,e.patches,"",t),e.patches.length&&Dn(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ua(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=bi(t),s=bi(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(Ei(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?ua(h,d,n,r+"/"+pt(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+pt(c),value:Oe(h)}),n.push({op:"replace",path:r+"/"+pt(c),value:Oe(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+pt(c),value:Oe(h)}),n.push({op:"remove",path:r+"/"+pt(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!Ei(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+pt(c),value:Oe(t[c])})}}}function yx(e,t,n){n===void 0&&(n=!1);var r=[];return ua(e,t,r,"",n),r}const Cx=Object.freeze(Object.defineProperty({__proto__:null,compare:yx,generate:ki,observe:Ax,unobserve:_x},Symbol.toStringTag,{value:"Module"}));Object.assign({},gx,Cx,{JsonPatchError:Jl,deepClone:Oe,escapePathComponent:pt,unescapePathComponent:Zl});const Gs=e=>{let t;const n=new Set,r=(c,h)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=h??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>o,subscribe:c=>(n.add(c),()=>n.delete(c))},o=t=e(r,i,u);return u},Sx=(e=>e?Gs(e):Gs),Nx=e=>e;function Ix(e,t=Nx){const n=Mn.useSyncExternalStore(e.subscribe,Mn.useCallback(()=>t(e.getState()),[e,t]),Mn.useCallback(()=>t(e.getInitialState()),[e,t]));return Mn.useDebugValue(n),n}const Qs=e=>{const t=Sx(e),n=r=>Ix(t,r);return Object.assign(n,t),n},wx=(e=>e?Qs(e):Qs),Lx={entries:[]},Ox=50,Xs=500;function Rx(e,t){for(;t.length>Ox;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const gt=wx((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const a=i.accessOrder.filter(u=>u!==n);a.push(n);const s={...i.conversations,[n]:r};return Rx(s,a)})},applyPatch:(n,r)=>{const i=t().conversations[n];if(!i)return!1;try{const a=Dn(i,r,!0,!1);return e(s=>({conversations:{...s.conversations,[n]:a.newDocument}})),!0}catch(a){return console.error("[sessionLogStore] applyPatch failed:",a),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const a=[...r.accessOrder];return a.splice(i,1),a.push(n),{accessOrder:a}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=Xs?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-Xs)}}}})},removeSession:n=>{e(r=>{const{[n]:i,...a}=r.conversations;return{conversations:a,accessOrder:r.accessOrder.filter(s=>s!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}}));class Dx{handlers=new Map;reconnectBound=null;startSync(t){if(this.handlers.has(t))return;const n=Ke.getSocket(),r=a=>{if(a.sessionId!==t)return;gt.getState().applyPatch(t,a.patch)||this.stopSync(t)},i=a=>{if(a.sessionId!==t)return;gt.getState().truncateSession(t),this.stopSync(t)};n.on(Te.SESSION_PATCH,r),n.on(Te.SESSION_EXIT,i),this.handlers.set(t,{patch:r,exit:i}),this.ensureReconnectHandler()}stopSync(t,n=!1){const r=this.handlers.get(t);if(!r)return;const i=Ke.getSocket();i.off(Te.SESSION_PATCH,r.patch),i.off(Te.SESSION_EXIT,r.exit),n||i.emit(mt.UNSUBSCRIBE,{topic:"session",id:t}),this.handlers.delete(t)}isSyncing(t){return this.handlers.has(t)}stopAll(){for(const t of[...this.handlers.keys()])this.stopSync(t)}ensureReconnectHandler(){this.reconnectBound||(this.reconnectBound=()=>{const t=Ke.getSocket();for(const n of this.handlers.keys())t.emit(mt.SUBSCRIBE,{topic:"session",id:n},()=>{})},Ke.getSocket().on("connect",this.reconnectBound))}}const Vr=new Dx,Px=!1;function Ks(e){return e===Ar.COMPLETED||e===Ar.FAILED||e===Ar.CANCELLED}function e3(e){const{sessionId:t,sessionStatus:n,onAgentSessionId:r,onExit:i,onError:a}=e,[s,u]=C.useState(()=>Ke.isConnected()),[o,c]=C.useState(!1),[h,d]=C.useState(!1),[f,p]=C.useState(null),[b,_]=C.useState(!1),N=gt(C.useCallback(D=>D.conversations[t]??Lx,[t])),A=C.useRef(!1),O=C.useRef([]),L=C.useRef({onAgentSessionId:r,onExit:i,onError:a});L.current={onAgentSessionId:r,onExit:i,onError:a};const U=C.useRef(n);U.current=n,C.useEffect(()=>{if(!t)return;const D=Ke.getSocket();u(D.connected);let P=!Ks(n);const $=()=>u(!0),z=()=>{u(!1),c(!1),A.current=!1,O.current=[]},F=ie=>{if(ie.sessionId!==t)return;if(!A.current){O.current.push(ie);return}gt.getState().applyPatch(t,ie.patch),_(!0)},K=ie=>{ie.sessionId===t&&(p(ie.agentSessionId),L.current.onAgentSessionId?.(ie.agentSessionId))},se=ie=>{ie.sessionId===t&&(P=!1,c(!1),_(!1),L.current.onExit?.(ie.exitCode))},me=ie=>{ie.sessionId===t&&L.current.onError?.(ie.message)},re=ie=>{ie.sessionId===t&&c(!0)},x=ie=>{ie.sessionId===t&&c(!1)};return D.on("connect",$),D.on("disconnect",z),D.on(Te.SESSION_PATCH,F),D.on(Te.SESSION_ID,K),D.on(Te.SESSION_EXIT,se),D.on(Te.SESSION_ERROR,me),D.on(Te.SESSION_SUBSCRIBED,re),D.on(Te.SESSION_UNSUBSCRIBED,x),u(D.connected),()=>{D.off("connect",$),D.off("disconnect",z),D.off(Te.SESSION_PATCH,F),D.off(Te.SESSION_ID,K),D.off(Te.SESSION_EXIT,se),D.off(Te.SESSION_ERROR,me),D.off(Te.SESSION_SUBSCRIBED,re),D.off(Te.SESSION_UNSUBSCRIBED,x),A.current=!1,O.current=[],p(null),_(!1),P?Vr.startSync(t):(gt.getState().truncateSession(t),D.emit(mt.UNSUBSCRIBE,{topic:"session",id:t}))}},[t]);const j=C.useCallback(async()=>{if(!t)return;const D=gt.getState();if(Vr.isSyncing(t)){Vr.stopSync(t,!0),A.current=!0;const z=O.current;O.current=[];for(const F of z)D.applyPatch(t,F.patch);D.conversations[t]?.entries.length&&_(!0);return}const P=D.conversations[t];if(P&&P.entries.length>0&&Ks(U.current)){D.touchAccess(t),A.current=!0,O.current=[],_(!0);return}P&&P.entries.length>0||d(!0);try{const z=await hc.get(`/sessions/${t}/logs`,{cache:"no-store"}),F=O.current;O.current=[],A.current=!0;let K=z;for(const se of F)try{K=Dn(K,se.patch,!0,!1).newDocument}catch(me){console.error("Failed to replay buffered patch:",me)}D.setConversation(t,K),K.entries.length>0&&_(!0)}catch(z){console.error("[useNormalizedLogs:loadSnapshot] Failed to load snapshot:",z),A.current=!0,O.current=[]}finally{d(!1)}},[t]),w=C.useCallback(()=>new Promise(D=>{const P=Ke.getSocket();if(!P.connected){D(!1);return}if(A.current){P.emit(mt.SUBSCRIBE,{topic:"session",id:t},$=>{D($.success)});return}P.emit(mt.SUBSCRIBE,{topic:"session",id:t},$=>{j(),D($.success)})}),[t,j]),V=C.useCallback(()=>{Ke.getSocket().emit(mt.UNSUBSCRIBE,{topic:"session",id:t})},[t]),q=C.useCallback(D=>{Ke.getSocket().emit(mt.INPUT,{sessionId:t,data:D})},[t]),Q=C.useCallback(()=>{gt.getState().removeSession(t),p(null),_(!1),A.current=!1,O.current=[]},[t]),S=C.useMemo(()=>{const D=dc(N.entries);return b&&o&&D.push(fc()),D},[N.entries,b,o]);return{isConnected:s,isAttached:o,isLoadingSnapshot:h,logs:S,entries:N.entries,agentSessionId:f,attach:w,detach:V,sendInput:q,clearLogs:Q}}function t3(e){return C.useMemo(()=>{let t=[],n=0;for(const i of e)if(i.entryType==="tool_use"&&i.metadata?.action==="todo_management"&&i.metadata.todos&&i.metadata.todos.length>0){const a=i.metadata.todos;a.every(u=>u.content&&u.content.trim().length>0&&u.status)&&i.timestamp>=n&&(t=a,n=i.timestamp)}const r=t.find(i=>{const a=i.status?.toLowerCase();return a==="in_progress"||a==="in-progress"})??null;return{todos:t,inProgressTodo:r}},[e])}const Mx=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:zl},Symbol.toStringTag,{value:"Module"}));export{jx as G,p2 as I,ve as L,zx as P,aa as Q,$x as S,Jx as T,Kx as Z,t3 as a,Vx as b,Gx as c,Wx as d,Zx as e,Yx as f,W as g,qx as h,Qx as i,e3 as u};
|
|
121
|
+
`),a=e.title?.endsWith("✓"),s=e.title?.endsWith("✗");return g.jsxs("div",{children:[g.jsxs("button",{onClick:()=>i&&r(!n),className:`group flex items-center gap-1.5 py-0.5 text-xs w-full text-left ${i?"cursor-pointer":"cursor-default"}`,children:[g.jsx("span",{className:"shrink-0 w-3.5 h-3.5 flex items-center justify-center",children:s?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 2l6 6M8 2l-6 6",stroke:"rgb(248 113 113)",strokeWidth:"1.5",strokeLinecap:"round"})}):a?g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 10 10",fill:"none",children:g.jsx("path",{d:"M2 5.5l2 2 4-4.5",stroke:"rgb(52 211 153)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):g.jsx("span",{className:"w-1 h-1 rounded-full bg-neutral-300"})}),g.jsx("span",{className:"truncate text-neutral-400 font-mono",children:t}),i&&g.jsx("span",{className:"ml-auto shrink-0 opacity-0 group-hover:opacity-100 transition-opacity text-neutral-300",children:n?g.jsx(_i,{size:10}):g.jsx(ur,{size:10})})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1 rounded-md bg-neutral-50 border border-neutral-100 overflow-x-auto",children:g.jsx("code",{className:"block p-2.5 text-[11px] font-mono text-neutral-500 leading-relaxed whitespace-pre-wrap break-all",children:e.content})})]})});Gl.displayName="ToolGroupItem";const Ql=C.memo(({content:e,compact:t})=>g.jsx("div",{className:`text-neutral-800 whitespace-pre-wrap min-w-0 ${t?"text-[13px] leading-6 mb-1":"text-sm leading-7 mb-2"}`,children:e}));Ql.displayName="AgentText";const Xl=C.memo(({content:e,compact:t})=>g.jsx("div",{className:`text-neutral-800 min-w-0 ${t?"text-[13px] leading-6 mb-1":"text-sm leading-7 mb-2"}`,children:g.jsx(aa,{urlTransform:$l,components:Yl,children:e})}));Xl.displayName="AssistantMessage";const Kl=C.memo(({content:e})=>g.jsx("div",{className:"my-2 rounded-lg border border-red-200 bg-red-50 px-4 py-3",children:g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx("svg",{className:"shrink-0 mt-0.5 w-4 h-4 text-red-500",viewBox:"0 0 16 16",fill:"currentColor",children:g.jsx("path",{fillRule:"evenodd",d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 5a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0V5zm.75 6.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})}),g.jsx("pre",{className:"text-xs text-red-700 leading-relaxed whitespace-pre-wrap break-all min-w-0",children:e})]})}));Kl.displayName="ErrorMessage";function lx(e,t){if(e.kind==="group")return g.jsx(Wl,{label:e.label,logs:e.logs});const n=e.log;if(!n.content&&n.type!==Ue.Cursor)return null;if(n.title==="Thinking"||n.content.startsWith("Thinking:"))return g.jsx(Vl,{content:n.content,isOpenDefault:!0});switch(n.type){case Ue.User:return g.jsx(ql,{content:n.content,compact:t});case Ue.Tool:return g.jsx(gi,{type:n.type,title:n.title||"Tool",content:n.content});case Ue.Action:return g.jsx(gi,{type:n.type,title:"Action",content:n.content});case Ue.Assistant:return g.jsx(Xl,{content:n.content,compact:t});case Ue.Info:return n.tokenUsage?null:g.jsx(Ql,{content:n.content,compact:t});case Ue.Error:return g.jsx(Kl,{content:n.content});case Ue.Cursor:return g.jsx("div",{className:"h-4 w-1.5 bg-neutral-400 animate-pulse rounded-sm mt-1 inline-block align-middle"});default:return null}}const Zx=C.forwardRef(function({logs:t,scrollElementRef:n},r){const i=C.useMemo(()=>sx(t),[t]);return C.useImperativeHandle(r,()=>({scrollToBottom:(a="instant")=>{n?.current&&n.current.scrollTo({top:n.current.scrollHeight,behavior:a})}}),[n]),g.jsx("div",{className:"w-full mx-auto pb-4 min-w-0",style:{overflowWrap:"anywhere"},children:i.map(a=>g.jsx("div",{children:lx(a)},a.key))})}),Vs="agent-tower-todo-panel-open";function cx(e,t){const n=t?"h-3 w-3":"h-3.5 w-3.5",r=(e||"").toLowerCase();return r==="completed"?g.jsx(pc,{"aria-hidden":!0,className:`${n} text-emerald-500`}):r==="in_progress"||r==="in-progress"?g.jsx(bc,{"aria-hidden":!0,className:`${n} text-blue-500`}):r==="cancelled"?g.jsx(fa,{"aria-hidden":!0,className:`${n} text-neutral-300`}):g.jsx(fa,{"aria-hidden":!0,className:`${n} text-neutral-400`})}function Jx({todos:e,compact:t}){const{t:n}=cc(),[r,i]=C.useState(()=>{if(t)return!1;const u=localStorage.getItem(Vs);return u===null?!0:u==="true"});if(C.useEffect(()=>{localStorage.setItem(Vs,String(r))},[r]),!e||e.length===0)return null;const a=e.filter(u=>u.status?.toLowerCase()==="completed").length,s=e.length>0?a/e.length*100:0;return g.jsxs("details",{className:"group",open:r,onToggle:u=>i(u.target.open),children:[g.jsx("summary",{className:"list-none cursor-pointer select-none [&::-webkit-details-marker]:hidden",children:g.jsxs("div",{className:`bg-neutral-50/80 border border-neutral-100 rounded-lg flex items-center justify-between hover:bg-neutral-100/80 transition-colors ${t?"px-3 py-1.5":"px-3 py-2"}`,children:[g.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[g.jsx("span",{className:"text-neutral-500 font-medium text-xs",children:n("待办")}),g.jsxs("span",{className:"text-neutral-400 tabular-nums text-xs",children:[a,"/",e.length]}),g.jsx("div",{className:"w-12 h-1 bg-neutral-200/60 rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-emerald-400 rounded-full transition-all duration-300",style:{width:`${s}%`}})})]}),g.jsx(_i,{"aria-hidden":!0,className:`text-neutral-400 transition-transform group-open:rotate-180 ${t?"h-3 w-3":"h-3.5 w-3.5"}`})]})}),g.jsx("div",{className:`pt-1.5 pb-0.5 ${t?"max-h-28 overflow-y-auto px-1":"px-1"}`,children:g.jsx("ul",{className:"space-y-px",role:"list","aria-label":"Agent todo list",children:e.map((u,o)=>{const c=u.status?.toLowerCase()==="cancelled",h=u.status?.toLowerCase()==="completed";return g.jsxs("li",{className:`flex items-center gap-1.5 rounded-md px-2 ${t?"py-0.5":"py-[3px]"} ${h?"opacity-60":""}`,children:[g.jsx("span",{className:`flex items-center justify-center shrink-0 ${t?"h-3 w-3":"h-3.5 w-3.5"}`,children:cx(u.status,t)}),g.jsx("span",{className:`${t?"text-[11px] leading-[14px]":"text-xs leading-4"} text-neutral-600 wrap-break-word truncate ${c?"line-through text-neutral-400":""} ${h?"text-neutral-400":""}`,children:u.content})]},`${u.content}-${o}`)})})})]})}var hx=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),dx=Object.prototype.hasOwnProperty;function Ei(e,t){return dx.call(e,t)}function bi(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)Ei(e,i)&&r.push(i);return r}function Re(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function Ti(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function pt(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Zl(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function xi(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(xi(e[t]))return!0}else if(typeof e=="object"){for(var r=bi(e),i=r.length,a=0;a<i;a++)if(xi(e[r[a]]))return!0}}return!1}function Ws(e,t){var n=[e];for(var r in t){var i=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof i<"u"&&n.push(r+": "+i)}return n.join(`
|
|
122
|
+
`)}var Jl=(function(e){hx(t,e);function t(n,r,i,a,s){var u=this.constructor,o=e.call(this,Ws(n,{name:r,index:i,operation:a,tree:s}))||this;return o.name=r,o.index=i,o.operation=a,o.tree=s,Object.setPrototypeOf(o,u.prototype),o.message=Ws(n,{name:r,index:i,operation:a,tree:s}),o}return t})(Error),he=Jl,fx=Re,Mt={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=ar(n,this.path);r&&(r=Re(r));var i=Tt(n,{op:"remove",path:this.from}).removed;return Tt(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=ar(n,this.from);return Tt(n,{op:"add",path:this.path,value:Re(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Cn(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},px={add:function(e,t,n){return Ti(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Mt.move,copy:Mt.copy,test:Mt.test,_get:Mt._get};function ar(e,t){if(t=="")return e;var n={op:"_get",path:t};return Tt(e,n),n.value}function Tt(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n=="function"?n(t,0,e,t.path):sr(t,0)),t.path===""){var s={newDocument:e};if(t.op==="add")return s.newDocument=t.value,s;if(t.op==="replace")return s.newDocument=t.value,s.removed=e,s;if(t.op==="move"||t.op==="copy")return s.newDocument=ar(e,t.from),t.op==="move"&&(s.removed=e),s;if(t.op==="test"){if(s.test=Cn(e,t.value),s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else{if(t.op==="remove")return s.removed=e,s.newDocument=null,s;if(t.op==="_get")return t.value=e,s;if(n)throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e);return s}}else{r||(e=Re(e));var u=t.path||"",o=u.split("/"),c=e,h=1,d=o.length,f=void 0,p=void 0,b=void 0;for(typeof n=="function"?b=n:b=sr;;){if(p=o[h],p&&p.indexOf("~")!=-1&&(p=Zl(p)),i&&(p=="__proto__"||p=="prototype"&&h>0&&o[h-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&f===void 0&&(c[p]===void 0?f=o.slice(0,h).join("/"):h==d-1&&(f=t.path),f!==void 0&&b(t,0,e,f)),h++,Array.isArray(c)){if(p==="-")p=c.length;else{if(n&&!Ti(p))throw new he("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);Ti(p)&&(p=~~p)}if(h>=d){if(n&&t.op==="add"&&p>c.length)throw new he("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=px[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(h>=d){var s=Mt[t.op].call(t,c,p,e);if(s.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(c=c[p],n&&h<d&&(!c||typeof c!="object"))throw new he("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}}function Pn(e,t,n,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),n&&!Array.isArray(t))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Re(e));for(var a=new Array(t.length),s=0,u=t.length;s<u;s++)a[s]=Tt(e,t[s],n,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function mx(e,t,n){var r=Tt(e,t);if(r.test===!1)throw new he("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function sr(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new he("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(Mt[e.op]){if(typeof e.path!="string")throw new he("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new he('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new he("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&xi(e.value))throw new he("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new he("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new he("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},u=ec([s],n);if(u&&u.name==="OPERATION_PATH_UNRESOLVABLE")throw new he("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new he("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function ec(e,t,n){try{if(!Array.isArray(e))throw new he("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Pn(Re(t),Re(e),n||!0);else{n=n||sr;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(i){if(i instanceof he)return i;throw i}}function Cn(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),i,a,s;if(n&&r){if(a=e.length,a!=t.length)return!1;for(i=a;i--!==0;)if(!Cn(e[i],t[i]))return!1;return!0}if(n!=r)return!1;var u=Object.keys(e);if(a=u.length,a!==Object.keys(t).length)return!1;for(i=a;i--!==0;)if(!t.hasOwnProperty(u[i]))return!1;for(i=a;i--!==0;)if(s=u[i],!Cn(e[s],t[s]))return!1;return!0}return e!==e&&t!==t}const gx=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:he,_areEquals:Cn,applyOperation:Tt,applyPatch:Pn,applyReducer:mx,deepClone:fx,getValueByPointer:ar,validate:ec,validator:sr},Symbol.toStringTag,{value:"Module"}));var sa=new WeakMap,Ex=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),bx=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function Tx(e){return sa.get(e)}function xx(e,t){return e.observers.get(t)}function kx(e,t){e.observers.delete(t.callback)}function _x(e,t){t.unobserve()}function Ax(e,t){var n=[],r,i=Tx(e);if(!i)i=new Ex(e),sa.set(e,i);else{var a=xx(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=Re(e),t){r.callback=t,r.next=null;var s=function(){ki(r)},u=function(){clearTimeout(r.next),r.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",u),window.addEventListener("keyup",u),window.addEventListener("mousedown",u),window.addEventListener("keydown",u),window.addEventListener("change",u))}return r.patches=n,r.object=e,r.unobserve=function(){ki(r),clearTimeout(r.next),kx(i,r),typeof window<"u"&&(window.removeEventListener("mouseup",u),window.removeEventListener("keyup",u),window.removeEventListener("mousedown",u),window.removeEventListener("keydown",u),window.removeEventListener("change",u))},i.observers.set(t,new bx(t,r)),r}function ki(e,t){t===void 0&&(t=!1);var n=sa.get(e.object);ua(n.value,e.object,e.patches,"",t),e.patches.length&&Pn(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ua(e,t,n,r,i){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var a=bi(t),s=bi(e),u=!1,o=s.length-1;o>=0;o--){var c=s[o],h=e[c];if(Ei(t,c)&&!(t[c]===void 0&&h!==void 0&&Array.isArray(t)===!1)){var d=t[c];typeof h=="object"&&h!=null&&typeof d=="object"&&d!=null&&Array.isArray(h)===Array.isArray(d)?ua(h,d,n,r+"/"+pt(c),i):h!==d&&(i&&n.push({op:"test",path:r+"/"+pt(c),value:Re(h)}),n.push({op:"replace",path:r+"/"+pt(c),value:Re(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+pt(c),value:Re(h)}),n.push({op:"remove",path:r+"/"+pt(c)}),u=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!u&&a.length==s.length))for(var o=0;o<a.length;o++){var c=a[o];!Ei(e,c)&&t[c]!==void 0&&n.push({op:"add",path:r+"/"+pt(c),value:Re(t[c])})}}}function yx(e,t,n){n===void 0&&(n=!1);var r=[];return ua(e,t,r,"",n),r}const Cx=Object.freeze(Object.defineProperty({__proto__:null,compare:yx,generate:ki,observe:Ax,unobserve:_x},Symbol.toStringTag,{value:"Module"}));Object.assign({},gx,Cx,{JsonPatchError:Jl,deepClone:Re,escapePathComponent:pt,unescapePathComponent:Zl});const Gs=e=>{let t;const n=new Set,r=(c,h)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const f=t;t=h??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>o,subscribe:c=>(n.add(c),()=>n.delete(c))},o=t=e(r,i,u);return u},Sx=(e=>e?Gs(e):Gs),Nx=e=>e;function Ix(e,t=Nx){const n=vn.useSyncExternalStore(e.subscribe,vn.useCallback(()=>t(e.getState()),[e,t]),vn.useCallback(()=>t(e.getInitialState()),[e,t]));return vn.useDebugValue(n),n}const Qs=e=>{const t=Sx(e),n=r=>Ix(t,r);return Object.assign(n,t),n},wx=(e=>e?Qs(e):Qs),Lx={entries:[]},Ox=50,Xs=500;function Rx(e,t){for(;t.length>Ox;){const n=t[0];t=t.slice(1);const{[n]:r,...i}=e;e=i}return{conversations:e,accessOrder:t}}const gt=wx((e,t)=>({conversations:{},accessOrder:[],setConversation:(n,r)=>{e(i=>{const a=i.accessOrder.filter(u=>u!==n);a.push(n);const s={...i.conversations,[n]:r};return Rx(s,a)})},applyPatch:(n,r,i)=>{const a=t().conversations[n];if(!a)return!1;if(typeof i=="number"&&typeof a.seq=="number"&&i<=a.seq)return!0;try{const u={...Pn(a,r,!0,!1).newDocument,seq:typeof i=="number"?i:a.seq};return e(o=>({conversations:{...o.conversations,[n]:u}})),!0}catch(s){return console.error("[sessionLogStore] applyPatch failed:",s),!1}},touchAccess:n=>{e(r=>{const i=r.accessOrder.indexOf(n);if(i===-1||i===r.accessOrder.length-1)return r;const a=[...r.accessOrder];return a.splice(i,1),a.push(n),{accessOrder:a}})},truncateSession:n=>{e(r=>{const i=r.conversations[n];return!i||i.entries.length<=Xs?r:{conversations:{...r.conversations,[n]:{...i,entries:i.entries.slice(-Xs)}}}})},removeSession:n=>{e(r=>{const{[n]:i,...a}=r.conversations;return{conversations:a,accessOrder:r.accessOrder.filter(s=>s!==n)}})},getConversation:n=>t().conversations[n],clear:()=>{e({conversations:{},accessOrder:[]})}}));class Dx{handlers=new Map;reconnectBound=null;startSync(t){if(this.handlers.has(t))return;const n=Ke.getSocket(),r=a=>{if(a.sessionId!==t)return;gt.getState().applyPatch(t,a.patch,a.seq)||this.stopSync(t)},i=a=>{if(a.sessionId!==t)return;gt.getState().truncateSession(t),this.stopSync(t)};n.on(xe.SESSION_PATCH,r),n.on(xe.SESSION_EXIT,i),this.handlers.set(t,{patch:r,exit:i}),this.ensureReconnectHandler()}stopSync(t,n=!1){const r=this.handlers.get(t);if(!r)return;const i=Ke.getSocket();i.off(xe.SESSION_PATCH,r.patch),i.off(xe.SESSION_EXIT,r.exit),n||i.emit(mt.UNSUBSCRIBE,{topic:"session",id:t}),this.handlers.delete(t)}isSyncing(t){return this.handlers.has(t)}stopAll(){for(const t of[...this.handlers.keys()])this.stopSync(t)}ensureReconnectHandler(){this.reconnectBound||(this.reconnectBound=()=>{const t=Ke.getSocket();for(const n of this.handlers.keys())t.emit(mt.SUBSCRIBE,{topic:"session",id:n},()=>{})},Ke.getSocket().on("connect",this.reconnectBound))}}const rn=new Dx,Px=!1;function Ks(e){return e===yr.COMPLETED||e===yr.FAILED||e===yr.CANCELLED}function e3(e){const{sessionId:t,sessionStatus:n,onAgentSessionId:r,onExit:i,onError:a}=e,[s,u]=C.useState(()=>Ke.isConnected()),[o,c]=C.useState(!1),[h,d]=C.useState(!1),[f,p]=C.useState(null),[b,A]=C.useState(!1),N=gt(C.useCallback(L=>L.conversations[t]??Lx,[t])),_=C.useRef(!1),R=C.useRef([]),O=C.useRef(null),H=C.useRef({onAgentSessionId:r,onExit:i,onError:a});H.current={onAgentSessionId:r,onExit:i,onError:a};const j=C.useRef(n);j.current=n,C.useEffect(()=>{if(!t)return;const L=Ke.getSocket();u(L.connected);let $=!Ks(n);rn.isSyncing(t)&&(rn.stopSync(t,!0),_.current=!0);const z=()=>u(!0),B=()=>{u(!1),c(!1),_.current=!1,R.current=[]},J=ae=>{if(ae.sessionId!==t)return;if(!_.current){R.current.push(ae);return}if(!gt.getState().applyPatch(t,ae.patch,ae.seq)){_.current=!1,R.current=[],O.current?.();return}A(!0)},re=ae=>{ae.sessionId===t&&(p(ae.agentSessionId),H.current.onAgentSessionId?.(ae.agentSessionId))},me=ae=>{ae.sessionId===t&&($=!1,c(!1),A(!1),H.current.onExit?.(ae.exitCode))},ee=ae=>{ae.sessionId===t&&H.current.onError?.(ae.message)},x=ae=>{ae.sessionId===t&&c(!0)},ge=ae=>{ae.sessionId===t&&c(!1)};return L.on("connect",z),L.on("disconnect",B),L.on(xe.SESSION_PATCH,J),L.on(xe.SESSION_ID,re),L.on(xe.SESSION_EXIT,me),L.on(xe.SESSION_ERROR,ee),L.on(xe.SESSION_SUBSCRIBED,x),L.on(xe.SESSION_UNSUBSCRIBED,ge),u(L.connected),()=>{L.off("connect",z),L.off("disconnect",B),L.off(xe.SESSION_PATCH,J),L.off(xe.SESSION_ID,re),L.off(xe.SESSION_EXIT,me),L.off(xe.SESSION_ERROR,ee),L.off(xe.SESSION_SUBSCRIBED,x),L.off(xe.SESSION_UNSUBSCRIBED,ge),_.current=!1,R.current=[],p(null),A(!1),$?rn.startSync(t):(gt.getState().truncateSession(t),L.emit(mt.UNSUBSCRIBE,{topic:"session",id:t}))}},[t]);const w=C.useCallback(async()=>{if(!t)return;const L=gt.getState();if(rn.isSyncing(t)){rn.stopSync(t,!0),_.current=!0,R.current=[],L.conversations[t]?.entries.length&&A(!0);return}const $=L.conversations[t];if($&&$.entries.length>0&&Ks(j.current)){L.touchAccess(t),_.current=!0,R.current=[],A(!0);return}$&&$.entries.length>0||d(!0);try{const B=await hc.get(`/sessions/${t}/logs`,{cache:"no-store"}),J=R.current;R.current=[],_.current=!0;let re=B;const me=typeof B.seq=="number"?B.seq:0;let ee=me;for(const x of J)if(!(typeof x.seq=="number"&&x.seq<=me))try{re=Pn(re,x.patch,!0,!1).newDocument,typeof x.seq=="number"&&x.seq>ee&&(ee=x.seq)}catch(ge){console.error("Failed to replay buffered patch:",ge)}re={...re,seq:ee},L.setConversation(t,re),re.entries.length>0&&A(!0)}catch(B){console.error("[useNormalizedLogs:loadSnapshot] Failed to load snapshot:",B),_.current=!0,R.current=[]}finally{d(!1)}},[t]);O.current=w;const V=C.useCallback(()=>new Promise(L=>{const $=Ke.getSocket();if(!$.connected){L(!1);return}if(_.current){$.emit(mt.SUBSCRIBE,{topic:"session",id:t},z=>{L(z.success)});return}$.emit(mt.SUBSCRIBE,{topic:"session",id:t},z=>{w(),L(z.success)})}),[t,w]),q=C.useCallback(()=>{Ke.getSocket().emit(mt.UNSUBSCRIBE,{topic:"session",id:t})},[t]),Q=C.useCallback(L=>{Ke.getSocket().emit(mt.INPUT,{sessionId:t,data:L})},[t]),S=C.useCallback(()=>{gt.getState().removeSession(t),p(null),A(!1),_.current=!1,R.current=[]},[t]),U=C.useMemo(()=>{const L=dc(N.entries);return b&&o&&L.push(fc()),L},[N.entries,b,o]);return{isConnected:s,isAttached:o,isLoadingSnapshot:h,logs:U,entries:N.entries,agentSessionId:f,attach:V,detach:q,sendInput:Q,clearLogs:S}}function t3(e){return C.useMemo(()=>{let t=[],n=0;for(const i of e)if(i.entryType==="tool_use"&&i.metadata?.action==="todo_management"&&i.metadata.todos&&i.metadata.todos.length>0){const a=i.metadata.todos;a.every(u=>u.content&&u.content.trim().length>0&&u.status)&&i.timestamp>=n&&(t=a,n=i.timestamp)}const r=t.find(i=>{const a=i.status?.toLowerCase();return a==="in_progress"||a==="in-progress"})??null;return{todos:t,inProgressTodo:r}},[e])}const Mx=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:zl},Symbol.toStringTag,{value:"Module"}));export{jx as G,p2 as I,Fe as L,zx as P,aa as Q,$x as S,Jx as T,Kx as Z,t3 as a,Vx as b,Gx as c,Wx as d,Zx as e,Yx as f,W as g,qx as h,Qx as i,e3 as u};
|