agent-tower 0.5.2-beta.1 → 0.5.2-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/mcp/http-client.d.ts +8 -2
  2. package/dist/mcp/http-client.d.ts.map +1 -1
  3. package/dist/mcp/http-client.js +4 -4
  4. package/dist/mcp/http-client.js.map +1 -1
  5. package/dist/mcp/server.d.ts.map +1 -1
  6. package/dist/mcp/server.js +48 -5
  7. package/dist/mcp/server.js.map +1 -1
  8. package/dist/routes/team-runs.d.ts.map +1 -1
  9. package/dist/routes/team-runs.js +92 -2
  10. package/dist/routes/team-runs.js.map +1 -1
  11. package/dist/services/__tests__/team-reconciler.service.test.js +171 -3
  12. package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
  13. package/dist/services/__tests__/team-run.service.test.js +87 -0
  14. package/dist/services/__tests__/team-run.service.test.js.map +1 -1
  15. package/dist/services/__tests__/team-scheduler.service.test.js +131 -0
  16. package/dist/services/__tests__/team-scheduler.service.test.js.map +1 -1
  17. package/dist/services/session-manager.d.ts.map +1 -1
  18. package/dist/services/session-manager.js +11 -0
  19. package/dist/services/session-manager.js.map +1 -1
  20. package/dist/services/team-run.service.d.ts +16 -0
  21. package/dist/services/team-run.service.d.ts.map +1 -1
  22. package/dist/services/team-run.service.js +196 -4
  23. package/dist/services/team-run.service.js.map +1 -1
  24. package/dist/services/team-scheduler.service.d.ts +8 -4
  25. package/dist/services/team-scheduler.service.d.ts.map +1 -1
  26. package/dist/services/team-scheduler.service.js +26 -9
  27. package/dist/services/team-scheduler.service.js.map +1 -1
  28. package/dist/utils/process-launch.d.ts.map +1 -1
  29. package/dist/utils/process-launch.js +52 -9
  30. package/dist/utils/process-launch.js.map +1 -1
  31. package/dist/utils/process-launch.test.js +65 -1
  32. package/dist/utils/process-launch.test.js.map +1 -1
  33. package/dist/web/assets/{AgentDemoPage-CkhVcgZo.js → AgentDemoPage-Co63rtls.js} +1 -1
  34. package/dist/web/assets/{DemoPage-dkmp8Vvn.js → DemoPage-PD8AX5pI.js} +1 -1
  35. package/dist/web/assets/{GeneralSettingsPage-B4DH6g3D.js → GeneralSettingsPage-C5eiEeTZ.js} +1 -1
  36. package/dist/web/assets/{MemberAvatar-pwugXGL4.js → MemberAvatar-BDXmryjB.js} +1 -1
  37. package/dist/web/assets/{NotificationSettingsPage-C-bPU_ZE.js → NotificationSettingsPage-BjjPan2M.js} +1 -1
  38. package/dist/web/assets/{ProfileSettingsPage-Dlr6BmHb.js → ProfileSettingsPage-BRpeNq6u.js} +1 -1
  39. package/dist/web/assets/ProjectKanbanPage-DUUu2EYy.js +89 -0
  40. package/dist/web/assets/{ProjectSettingsPage-DZZksq5G.js → ProjectSettingsPage-avctMKfk.js} +1 -1
  41. package/dist/web/assets/{ProviderSettingsPage-BWN7CEG6.js → ProviderSettingsPage-BIUYN2e0.js} +1 -1
  42. package/dist/web/assets/{SettingsSection-C-sMhXpf.js → SettingsSection-pLJ3msrT.js} +1 -1
  43. package/dist/web/assets/{TeamSettingsPage-924xpocx.js → TeamSettingsPage-BjKW9nT8.js} +1 -1
  44. package/dist/web/assets/{arrow-left-UHjQiY5K.js → arrow-left-lFz8nyZM.js} +1 -1
  45. package/dist/web/assets/{button-CUTjpRqw.js → button-BUA8P726.js} +1 -1
  46. package/dist/web/assets/check-BYuuXc71.js +1 -0
  47. package/dist/web/assets/{chevron-down-Bby7sJEv.js → chevron-down-B931AgE2.js} +1 -1
  48. package/dist/web/assets/{chevron-right-DCC0lyoB.js → chevron-right-F9i4wey6.js} +1 -1
  49. package/dist/web/assets/{chevron-up-BnCoaejn.js → chevron-up-BEHjZ-SB.js} +1 -1
  50. package/dist/web/assets/{circle-check-BscClK07.js → circle-check-C7xXtl8B.js} +1 -1
  51. package/dist/web/assets/{code-block-OCS4YCEC-DkMlYSza.js → code-block-OCS4YCEC-6FHTyCN2.js} +1 -1
  52. package/dist/web/assets/{confirm-dialog-wsb35VpE.js → confirm-dialog-B_wk_zqm.js} +1 -1
  53. package/dist/web/assets/{folder-picker-B-X_nrS1.js → folder-picker-BEHS3b2Q.js} +1 -1
  54. package/dist/web/assets/index-DEQhT5sD.css +1 -0
  55. package/dist/web/assets/{index-CUJoWIuo.js → index-RxbHMWXV.js} +7 -7
  56. package/dist/web/assets/{loader-circle-Cul4BuAa.js → loader-circle-stJcjnm-.js} +1 -1
  57. package/dist/web/assets/{mermaid-NOHMQCX5-DoPzf-UA.js → mermaid-NOHMQCX5-fubZbKyF.js} +3 -3
  58. package/dist/web/assets/{message-square-C7Q71jFj.js → message-square-C8lb-TDo.js} +1 -1
  59. package/dist/web/assets/{modal-25-qs8P5.js → modal-UGrjU63G.js} +1 -1
  60. package/dist/web/assets/{pencil-CaJR6Dqm.js → pencil-uRBgB4qA.js} +1 -1
  61. package/dist/web/assets/{rotate-ccw-Bvz7590n.js → rotate-ccw-CWaMrTz4.js} +1 -1
  62. package/dist/web/assets/{select-CzeTYLO4.js → select-BMlH2AuL.js} +1 -1
  63. package/dist/web/assets/{upload-_2T21rVP.js → upload-B-Mpvu9j.js} +1 -1
  64. package/dist/web/assets/{use-profiles-BaCwGP06.js → use-profiles-D6cZwU1R.js} +1 -1
  65. package/dist/web/assets/{use-providers-Bwl7R5Ql.js → use-providers-DVP6emIi.js} +1 -1
  66. package/dist/web/index.html +2 -2
  67. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +1 -1
  68. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -1
  69. package/node_modules/@agent-tower/shared/dist/types.d.ts +4 -1
  70. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  71. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  72. package/node_modules/@prisma/client/.prisma/client/edge.js +6 -5
  73. package/node_modules/@prisma/client/.prisma/client/index-browser.js +1 -0
  74. package/node_modules/@prisma/client/.prisma/client/index.d.ts +43 -0
  75. package/node_modules/@prisma/client/.prisma/client/index.js +6 -5
  76. package/node_modules/@prisma/client/.prisma/client/package.json +1 -1
  77. package/node_modules/@prisma/client/.prisma/client/schema.prisma +2 -0
  78. package/node_modules/@prisma/client/.prisma/client/wasm.js +1 -0
  79. package/package.json +1 -1
  80. package/prisma/migrations/20260609000000_add_team_member_membership_status/migration.sql +3 -0
  81. package/prisma/schema.prisma +2 -0
  82. package/dist/web/assets/ProjectKanbanPage-7oEfjjWV.js +0 -89
  83. package/dist/web/assets/check-CPkZgPjx.js +0 -1
  84. package/dist/web/assets/index-4hNWw0yi.css +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-DkMlYSza.js","assets/index-CUJoWIuo.js","assets/index-4hNWw0yi.css","assets/log-adapter-CtvxzS4j.js","assets/chevron-right-DCC0lyoB.js","assets/chevron-down-Bby7sJEv.js","assets/check-CPkZgPjx.js"])))=>i.map(i=>d[i]);
2
- import{e as Ft,j as g,ai as Zs,r as y,aj as fc,D as pc,ak as Js,d as eu,u as tu,al as mc,w as Dn,S as et,i as gc,C as Ec}from"./index-CUJoWIuo.js";import{L as Ee,n as bc,c as Tc,S as _r}from"./log-adapter-CtvxzS4j.js";import{C as ar}from"./chevron-right-DCC0lyoB.js";import{C as ki}from"./chevron-down-Bby7sJEv.js";import{C as xc}from"./check-CPkZgPjx.js";const kc=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],Zx=Ft("at-sign",kc);const _c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Ac=Ft("circle-dot",_c);const yc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],da=Ft("circle",yc);const Cc=[["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=Ft("globe",Cc);const Nc=[["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"}]],e3=Ft("paperclip",Nc);const Sc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],t3=Ft("square",Sc),n3=({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"})]}),r3=({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"})]}),i3=({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"})}),a3=({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"})}),s3=({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"})]}),sr=(function(e){if(e==null)return Oc;if(typeof e=="function")return ur(e);if(typeof e=="object")return Array.isArray(e)?Ic(e):wc(e);if(typeof e=="string")return Lc(e);throw new Error("Expected function, string, or object as test")});function Ic(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sr(e[n]);return ur(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function wc(e){const t=e;return ur(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Lc(e){return ur(t);function t(n){return n&&n.type===e}}function ur(e){return t;function t(n,r,i){return!!(Rc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Oc(){return!0}function Rc(e){return e!==null&&typeof e=="object"&&"type"in e}const nu=[],tn=!0,qr=!1,Wn="skip";function _i(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=sr(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=nu,b,A,S;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=Dc(n(o,h)),p[0]===qr))return p;if("children"in o&&o.children){const _=o;if(_.children&&p[0]!==Wn)for(A=(r?_.children.length:-1)+s,S=h.concat(_);A>-1&&A<_.children.length;){const O=_.children[A];if(b=u(O,A,S)(),b[0]===qr)return b;A=typeof b[1]=="number"?b[1]:A+s}}return p}}}function Dc(e){return Array.isArray(e)?e:typeof e=="number"?[tn,e]:e==null?nu:[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),_i(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 Pc({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=Fc(e,t,n,r,i,a,s);st(c,h)}}function fa(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 Mc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const vc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Bc=new Set(["javascript:","data:","file:","vbscript:"]);function pa(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=fa(e,n);if(!s||Bc.has(s.protocol)||!(vc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Mc(e);return s&&t.some(c=>{const h=fa(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 Ar=Symbol("node-seen"),Fc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[Ar])return tn;if(o.tagName==="a"){const d=pa(o.properties.href,t,e,!1,!1,i);return d===null?(o[Ar]=!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]"}]}),Wn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",tn)}if(o.tagName==="img"){const d=pa(o.properties.src,n,e,r,!0,i);return d===null?(o[Ar]=!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")+"]"}]}),Wn):(o.properties.src=d,tn)}return tn};return u},ru=-1,or=0,an=1,Gn=2,Ai=3,yi=4,Ci=5,Ni=6,iu=7,au=8,ma=typeof self=="object"?self:globalThis,Hc=(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 or:case ru:return n(s,i);case an:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Gn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case Ai:return n(new Date(s),i);case yi:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Ci:{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 iu:{const{name:u,message:o}=s;return n(new ma[u](o),i)}case au: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 ma[a](s),i)};return r},ga=e=>Hc(new Map,e)(0),wt="",{toString:Uc}={},{keys:jc}=Object,Wt=e=>{const t=typeof e;if(t!=="object"||!e)return[or,t];const n=Uc.call(e).slice(8,-1);switch(n){case"Array":return[an,wt];case"Object":return[Gn,wt];case"Date":return[Ai,wt];case"RegExp":return[yi,wt];case"Map":return[Ci,wt];case"Set":return[Ni,wt];case"DataView":return[an,n]}return n.includes("Array")?[an,n]:n.includes("Error")?[iu,n]:[Gn,n]},Pn=([e,t])=>e===or&&(t==="function"||t==="symbol"),zc=(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]=Wt(s);switch(u){case or:{let h=s;switch(o){case"bigint":u=au,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([ru],s)}return i([u,h],s)}case an:{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 Gn:{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 jc(s))(e||!Pn(Wt(s[f])))&&h.push([a(f),a(s[f])]);return d}case Ai:return i([u,s.toISOString()],s);case yi:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Ci:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Pn(Wt(f))||Pn(Wt(p))))&&h.push([a(f),a(p)]);return d}case Ni:{const h=[],d=i([u,h],s);for(const f of s)(e||!Pn(Wt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},Ea=(e,{json:t,lossy:n}={})=>{const r=[];return zc(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ga(Ea(e,t)):structuredClone(e):(e,t)=>ga(Ea(e,t));class An{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}An.prototype.normal={};An.prototype.property={};An.prototype.space=void 0;function su(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new An(n,r,t)}function En(e){return e.toLowerCase()}class Le{constructor(t,n){this.attribute=n,this.property=t}}Le.prototype.attribute="";Le.prototype.booleanish=!1;Le.prototype.boolean=!1;Le.prototype.commaOrSpaceSeparated=!1;Le.prototype.commaSeparated=!1;Le.prototype.defined=!1;Le.prototype.mustUseProperty=!1;Le.prototype.number=!1;Le.prototype.overloadedBoolean=!1;Le.prototype.property="";Le.prototype.spaceSeparated=!1;Le.prototype.space=void 0;let $c=0;const X=_t(),ge=_t(),Vr=_t(),v=_t(),le=_t(),Pt=_t(),Re=_t();function _t(){return 2**++$c}const Wr=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:ge,commaOrSpaceSeparated:Re,commaSeparated:Pt,number:v,overloadedBoolean:Vr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),yr=Object.keys(Wr);class Si extends Le{constructor(t,n,r,i){let a=-1;if(super(t,n),ba(this,"space",i),typeof r=="number")for(;++a<yr.length;){const s=yr[a];ba(this,yr[a],(r&Wr[s])===Wr[s])}}}Si.prototype.defined=!0;function ba(e,t,n){n&&(e[t]=n)}function Ht(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Si(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[En(r)]=r,n[En(a.attribute)]=r}return new An(t,n,e.space)}const uu=Ht({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:le,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:v,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:le,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:ge,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 ou(e,t){return t in e?e[t]:t}function lu(e,t){return ou(e,t.toLowerCase())}const Yc=Ht({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,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:ge,controls:X,controlsList:le,coords:v|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Vr,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:le,height:v,hidden:Vr,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:ge,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:ge,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:ge,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:lu}),qc=Ht({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:Re,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:Pt,g2:Pt,glyphName:Pt,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:Re,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:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,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:Re,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:Re,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:Re,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:ou}),cu=Ht({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()}}),hu=Ht({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lu}),du=Ht({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vc={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"},Wc=/[A-Z]/g,Ta=/-[a-z]/g,Gc=/^data[-\w.:]+$/i;function lr(e,t){const n=En(t);let r=t,i=Le;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Gc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ta,Xc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ta.test(a)){let s=a.replace(Wc,Qc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Si}return new i(r,t)}function Qc(e){return"-"+e.toLowerCase()}function Xc(e){return e.charAt(1).toUpperCase()}const yn=su([uu,Yc,cu,hu,du],"html"),ot=su([uu,qc,cu,hu,du],"svg");function xa(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 fu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ka=/[#.]/g;function Kc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){ka.lastIndex=i;const u=ka.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 _a(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pu(e){return e.join(" ").trim()}function mu(e,t,n){const r=n?th(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=Kc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Zc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))Jc(e,o.properties,d,f)}for(const c of u)Gr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Zc(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 Jc(e,t,n,r){const i=lr(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=_a(r):i.commaSeparated?a=xa(r):i.commaOrSpaceSeparated?a=_a(xa(r).join(" ")):a=Aa(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?eh(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(Aa(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Gr(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)Gr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Aa(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||En(n)===En(t)))return!0}return n}function eh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function th(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const nh=["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"],rh=mu(yn,"div"),ih=mu(ot,"g",nh);function ah(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=ya(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=ya(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 ya(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-block-OCS4YCEC-6FHTyCN2.js","assets/index-RxbHMWXV.js","assets/index-DEQhT5sD.css","assets/log-adapter-CtvxzS4j.js","assets/chevron-right-F9i4wey6.js","assets/chevron-down-B931AgE2.js","assets/check-BYuuXc71.js"])))=>i.map(i=>d[i]);
2
+ import{e as Ft,j as g,al as Zs,r as y,am as fc,D as pc,an as Js,d as eu,u as tu,ao as mc,w as Dn,S as et,i as gc,C as Ec}from"./index-RxbHMWXV.js";import{L as Ee,n as bc,c as Tc,S as _r}from"./log-adapter-CtvxzS4j.js";import{C as ar}from"./chevron-right-F9i4wey6.js";import{C as ki}from"./chevron-down-B931AgE2.js";import{C as xc}from"./check-BYuuXc71.js";const kc=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],Zx=Ft("at-sign",kc);const _c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Ac=Ft("circle-dot",_c);const yc=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],da=Ft("circle",yc);const Cc=[["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=Ft("globe",Cc);const Nc=[["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"}]],e3=Ft("paperclip",Nc);const Sc=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],t3=Ft("square",Sc),n3=({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"})]}),r3=({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"})]}),i3=({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"})}),a3=({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"})}),s3=({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"})]}),sr=(function(e){if(e==null)return Oc;if(typeof e=="function")return ur(e);if(typeof e=="object")return Array.isArray(e)?Ic(e):wc(e);if(typeof e=="string")return Lc(e);throw new Error("Expected function, string, or object as test")});function Ic(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sr(e[n]);return ur(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function wc(e){const t=e;return ur(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function Lc(e){return ur(t);function t(n){return n&&n.type===e}}function ur(e){return t;function t(n,r,i){return!!(Rc(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Oc(){return!0}function Rc(e){return e!==null&&typeof e=="object"&&"type"in e}const nu=[],tn=!0,qr=!1,Wn="skip";function _i(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=sr(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=nu,b,A,S;if((!t||a(o,c,h[h.length-1]||void 0))&&(p=Dc(n(o,h)),p[0]===qr))return p;if("children"in o&&o.children){const _=o;if(_.children&&p[0]!==Wn)for(A=(r?_.children.length:-1)+s,S=h.concat(_);A>-1&&A<_.children.length;){const O=_.children[A];if(b=u(O,A,S)(),b[0]===qr)return b;A=typeof b[1]=="number"?b[1]:A+s}}return p}}}function Dc(e){return Array.isArray(e)?e:typeof e=="number"?[tn,e]:e==null?nu:[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),_i(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 Pc({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=Fc(e,t,n,r,i,a,s);st(c,h)}}function fa(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 Mc(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const vc=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Bc=new Set(["javascript:","data:","file:","vbscript:"]);function pa(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=fa(e,n);if(!s||Bc.has(s.protocol)||!(vc.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const o=Mc(e);return s&&t.some(c=>{const h=fa(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 Ar=Symbol("node-seen"),Fc=(e,t,n,r,i,a,s)=>{const u=(o,c,h)=>{if(o.type!=="element"||o[Ar])return tn;if(o.tagName==="a"){const d=pa(o.properties.href,t,e,!1,!1,i);return d===null?(o[Ar]=!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]"}]}),Wn):(o.properties.href=d,o.properties.target="_blank",o.properties.rel="noopener noreferrer",tn)}if(o.tagName==="img"){const d=pa(o.properties.src,n,e,r,!0,i);return d===null?(o[Ar]=!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")+"]"}]}),Wn):(o.properties.src=d,tn)}return tn};return u},ru=-1,or=0,an=1,Gn=2,Ai=3,yi=4,Ci=5,Ni=6,iu=7,au=8,ma=typeof self=="object"?self:globalThis,Hc=(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 or:case ru:return n(s,i);case an:{const u=n([],i);for(const o of s)u.push(r(o));return u}case Gn:{const u=n({},i);for(const[o,c]of s)u[r(o)]=r(c);return u}case Ai:return n(new Date(s),i);case yi:{const{source:u,flags:o}=s;return n(new RegExp(u,o),i)}case Ci:{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 iu:{const{name:u,message:o}=s;return n(new ma[u](o),i)}case au: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 ma[a](s),i)};return r},ga=e=>Hc(new Map,e)(0),wt="",{toString:Uc}={},{keys:jc}=Object,Wt=e=>{const t=typeof e;if(t!=="object"||!e)return[or,t];const n=Uc.call(e).slice(8,-1);switch(n){case"Array":return[an,wt];case"Object":return[Gn,wt];case"Date":return[Ai,wt];case"RegExp":return[yi,wt];case"Map":return[Ci,wt];case"Set":return[Ni,wt];case"DataView":return[an,n]}return n.includes("Array")?[an,n]:n.includes("Error")?[iu,n]:[Gn,n]},Pn=([e,t])=>e===or&&(t==="function"||t==="symbol"),zc=(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]=Wt(s);switch(u){case or:{let h=s;switch(o){case"bigint":u=au,h=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);h=null;break;case"undefined":return i([ru],s)}return i([u,h],s)}case an:{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 Gn:{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 jc(s))(e||!Pn(Wt(s[f])))&&h.push([a(f),a(s[f])]);return d}case Ai:return i([u,s.toISOString()],s);case yi:{const{source:h,flags:d}=s;return i([u,{source:h,flags:d}],s)}case Ci:{const h=[],d=i([u,h],s);for(const[f,p]of s)(e||!(Pn(Wt(f))||Pn(Wt(p))))&&h.push([a(f),a(p)]);return d}case Ni:{const h=[],d=i([u,h],s);for(const f of s)(e||!Pn(Wt(f)))&&h.push(a(f));return d}}const{message:c}=s;return i([u,{name:o,message:c}],s)};return a},Ea=(e,{json:t,lossy:n}={})=>{const r=[];return zc(!(t||n),!!t,new Map,r)(e),r},bt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ga(Ea(e,t)):structuredClone(e):(e,t)=>ga(Ea(e,t));class An{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}An.prototype.normal={};An.prototype.property={};An.prototype.space=void 0;function su(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new An(n,r,t)}function En(e){return e.toLowerCase()}class Le{constructor(t,n){this.attribute=n,this.property=t}}Le.prototype.attribute="";Le.prototype.booleanish=!1;Le.prototype.boolean=!1;Le.prototype.commaOrSpaceSeparated=!1;Le.prototype.commaSeparated=!1;Le.prototype.defined=!1;Le.prototype.mustUseProperty=!1;Le.prototype.number=!1;Le.prototype.overloadedBoolean=!1;Le.prototype.property="";Le.prototype.spaceSeparated=!1;Le.prototype.space=void 0;let $c=0;const X=_t(),ge=_t(),Vr=_t(),v=_t(),le=_t(),Pt=_t(),Re=_t();function _t(){return 2**++$c}const Wr=Object.freeze(Object.defineProperty({__proto__:null,boolean:X,booleanish:ge,commaOrSpaceSeparated:Re,commaSeparated:Pt,number:v,overloadedBoolean:Vr,spaceSeparated:le},Symbol.toStringTag,{value:"Module"})),yr=Object.keys(Wr);class Si extends Le{constructor(t,n,r,i){let a=-1;if(super(t,n),ba(this,"space",i),typeof r=="number")for(;++a<yr.length;){const s=yr[a];ba(this,yr[a],(r&Wr[s])===Wr[s])}}}Si.prototype.defined=!0;function ba(e,t,n){n&&(e[t]=n)}function Ht(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new Si(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[En(r)]=r,n[En(a.attribute)]=r}return new An(t,n,e.space)}const uu=Ht({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:v,ariaColIndex:v,ariaColSpan:v,ariaControls:le,ariaCurrent:null,ariaDescribedBy:le,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:le,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:le,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:le,ariaLevel:v,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:le,ariaPlaceholder:null,ariaPosInSet:v,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:le,ariaRowCount:v,ariaRowIndex:v,ariaRowSpan:v,ariaSelected:ge,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 ou(e,t){return t in e?e[t]:t}function lu(e,t){return ou(e,t.toLowerCase())}const Yc=Ht({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pt,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:ge,controls:X,controlsList:le,coords:v|Pt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Vr,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:le,height:v,hidden:Vr,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:ge,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:ge,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:ge,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:lu}),qc=Ht({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:Re,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:Pt,g2:Pt,glyphName:Pt,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:Re,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:Re,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Re,rev:Re,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Re,requiredFeatures:Re,requiredFonts:Re,requiredFormats:Re,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:Re,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:Re,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:Re,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:ou}),cu=Ht({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()}}),hu=Ht({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lu}),du=Ht({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Vc={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"},Wc=/[A-Z]/g,Ta=/-[a-z]/g,Gc=/^data[-\w.:]+$/i;function lr(e,t){const n=En(t);let r=t,i=Le;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Gc.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ta,Xc);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ta.test(a)){let s=a.replace(Wc,Qc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Si}return new i(r,t)}function Qc(e){return"-"+e.toLowerCase()}function Xc(e){return e.charAt(1).toUpperCase()}const yn=su([uu,Yc,cu,hu,du],"html"),ot=su([uu,qc,cu,hu,du],"svg");function xa(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 fu(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ka=/[#.]/g;function Kc(e,t){const n=e||"",r={};let i=0,a,s;for(;i<n.length;){ka.lastIndex=i;const u=ka.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 _a(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function pu(e){return e.join(" ").trim()}function mu(e,t,n){const r=n?th(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=Kc(a,t);const c=o.tagName.toLowerCase(),h=r?r.get(c):void 0;if(o.tagName=h||c,Zc(s))u.unshift(s);else for(const[d,f]of Object.entries(s))Jc(e,o.properties,d,f)}for(const c of u)Gr(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function Zc(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 Jc(e,t,n,r){const i=lr(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=_a(r):i.commaSeparated?a=xa(r):i.commaOrSpaceSeparated?a=_a(xa(r).join(" ")):a=Aa(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?eh(r):String(r);if(Array.isArray(a)){const s=[];for(const u of a)s.push(Aa(i,i.property,u));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Gr(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)Gr(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Gr(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Aa(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||En(n)===En(t)))return!0}return n}function eh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function th(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const nh=["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"],rh=mu(yn,"div"),ih=mu(ot,"g",nh);function ah(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=ya(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=ya(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 ya(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
3
  `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const mt={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/"},gu={}.hasOwnProperty,sh=Object.prototype;function uh(e,t){const n=t||{};return Ii({file:n.file||void 0,location:!1,schema:n.space==="svg"?ot:yn,verbose:n.verbose||!1},e)}function Ii(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},zn(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:Eu(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=ah(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"},zn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},zn(e,r,n),n}default:return n=oh(e,t),n}}function Eu(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ii(e,t[n]);r.push(i)}return r}function oh(e,t){const n=e.schema;e.schema=t.namespaceURI===mt.svg?ot:yn;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;gu.call(sh,o)||(i[o]=u.value)}const s=(e.schema.space==="svg"?ih:rh)(t.tagName,i,Eu(e,t.childNodes));if(zn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&Rt(o.startTag),h=o&&o.endTag&&Rt(o.endTag),d=Ii(e,u.content);c&&h&&e.file&&(d.position={start:c.end,end:h.start}),s.content=d}return e.schema=n,s}function zn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=lh(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function lh(e,t,n){const r=Rt(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)gu.call(n.attrs,s)&&(a[lr(e.schema,s).property]=Rt(n.attrs[s]));n.startTag;const u=Rt(n.startTag),o=n.endTag?Rt(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=a,t.data={position:c}}}return r}function Rt(e){const t=Ca({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ca({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ca(e){return e.line&&e.column?e:void 0}const Na={}.hasOwnProperty;function bu(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 ch={},hh={}.hasOwnProperty,Tu=bu("type",{handlers:{root:fh,element:bh,text:gh,comment:Eh,doctype:mh}});function dh(e,t){const r=(t||ch).space;return Tu(e,r==="svg"?ot:yn)}function fh(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=wi(e.children,n,t),Ut(e,n),n}function ph(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=wi(e.children,n,t),Ut(e,n),n}function mh(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ut(e,t),t}function gh(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ut(e,t),t}function Eh(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ut(e,t),t}function bh(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"&&hh.call(e.properties,a)){const o=Th(r,a,e.properties[a]);o&&i.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:mt[s],childNodes:[],parentNode:null};return u.childNodes=wi(e.children,u,r),Ut(e,u),e.tagName==="template"&&e.content&&(u.content=ph(e.content,r)),u}function Th(e,t,n){const r=lr(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?fu(n):pu(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=mt[r.space]}return i}function wi(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=Tu(e[r],n);a.parentNode=t,i.push(a)}return i}function Ut(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 xh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],kh=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 Ie={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function xu(e){return e>=55296&&e<=57343}function _h(e){return e>=56320&&e<=57343}function Ah(e,t){return(e-55296)*1024+9216+t}function ku(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _u(e){return e>=64976&&e<=65007||kh.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 yh=65536;class Ch{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=yh,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(_h(n))return this.pos++,this._addGap(),Ah(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,xu(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){ku(t)?this._err(I.controlCharacterInInputStream):_u(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 Au(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 Nh=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),Sh=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 Ih(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Sh.get(e))!==null&&t!==void 0?t:e}var Te;(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"})(Te||(Te={}));const wh=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 Qr(e){return e>=Te.ZERO&&e<=Te.NINE}function Lh(e){return e>=Te.UPPER_A&&e<=Te.UPPER_F||e>=Te.LOWER_A&&e<=Te.LOWER_F}function Oh(e){return e>=Te.UPPER_A&&e<=Te.UPPER_Z||e>=Te.LOWER_A&&e<=Te.LOWER_Z||Qr(e)}function Rh(e){return e===Te.EQUALS||Oh(e)}var be;(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"})(be||(be={}));var Ke;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ke||(Ke={}));class Dh{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=be.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ke.Strict}startEntity(t){this.decodeMode=t,this.state=be.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case be.EntityStart:return t.charCodeAt(n)===Te.NUM?(this.state=be.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=be.NamedEntity,this.stateNamedEntity(t,n));case be.NumericStart:return this.stateNumericStart(t,n);case be.NumericDecimal:return this.stateNumericDecimal(t,n);case be.NumericHex:return this.stateNumericHex(t,n);case be.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|wh)===Te.LOWER_X?(this.state=be.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=be.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(Qr(i)||Lh(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(Qr(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===Te.SEMI)this.consumed+=1;else if(this.decodeMode===Ke.Strict)return 0;return this.emitCodePoint(Ih(this.result),this.consumed),this.errors&&(t!==Te.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=Ph(r,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Ke.Attribute&&(a===0||Rh(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&at.VALUE_LENGTH)>>14,a!==0){if(s===Te.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ke.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 be.NamedEntity:return this.result!==0&&(this.decodeMode!==Ke.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case be.NumericDecimal:return this.emitNumericEntity(0,2);case be.NumericHex:return this.emitNumericEntity(0,3);case be.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case be.EntityStart:return 0}}}function Ph(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 D;(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/"})(D||(D={}));var gt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(gt||(gt={}));var Me;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Me||(Me={}));var C;(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"})(C||(C={}));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 Mh=new Map([[C.A,l.A],[C.ADDRESS,l.ADDRESS],[C.ANNOTATION_XML,l.ANNOTATION_XML],[C.APPLET,l.APPLET],[C.AREA,l.AREA],[C.ARTICLE,l.ARTICLE],[C.ASIDE,l.ASIDE],[C.B,l.B],[C.BASE,l.BASE],[C.BASEFONT,l.BASEFONT],[C.BGSOUND,l.BGSOUND],[C.BIG,l.BIG],[C.BLOCKQUOTE,l.BLOCKQUOTE],[C.BODY,l.BODY],[C.BR,l.BR],[C.BUTTON,l.BUTTON],[C.CAPTION,l.CAPTION],[C.CENTER,l.CENTER],[C.CODE,l.CODE],[C.COL,l.COL],[C.COLGROUP,l.COLGROUP],[C.DD,l.DD],[C.DESC,l.DESC],[C.DETAILS,l.DETAILS],[C.DIALOG,l.DIALOG],[C.DIR,l.DIR],[C.DIV,l.DIV],[C.DL,l.DL],[C.DT,l.DT],[C.EM,l.EM],[C.EMBED,l.EMBED],[C.FIELDSET,l.FIELDSET],[C.FIGCAPTION,l.FIGCAPTION],[C.FIGURE,l.FIGURE],[C.FONT,l.FONT],[C.FOOTER,l.FOOTER],[C.FOREIGN_OBJECT,l.FOREIGN_OBJECT],[C.FORM,l.FORM],[C.FRAME,l.FRAME],[C.FRAMESET,l.FRAMESET],[C.H1,l.H1],[C.H2,l.H2],[C.H3,l.H3],[C.H4,l.H4],[C.H5,l.H5],[C.H6,l.H6],[C.HEAD,l.HEAD],[C.HEADER,l.HEADER],[C.HGROUP,l.HGROUP],[C.HR,l.HR],[C.HTML,l.HTML],[C.I,l.I],[C.IMG,l.IMG],[C.IMAGE,l.IMAGE],[C.INPUT,l.INPUT],[C.IFRAME,l.IFRAME],[C.KEYGEN,l.KEYGEN],[C.LABEL,l.LABEL],[C.LI,l.LI],[C.LINK,l.LINK],[C.LISTING,l.LISTING],[C.MAIN,l.MAIN],[C.MALIGNMARK,l.MALIGNMARK],[C.MARQUEE,l.MARQUEE],[C.MATH,l.MATH],[C.MENU,l.MENU],[C.META,l.META],[C.MGLYPH,l.MGLYPH],[C.MI,l.MI],[C.MO,l.MO],[C.MN,l.MN],[C.MS,l.MS],[C.MTEXT,l.MTEXT],[C.NAV,l.NAV],[C.NOBR,l.NOBR],[C.NOFRAMES,l.NOFRAMES],[C.NOEMBED,l.NOEMBED],[C.NOSCRIPT,l.NOSCRIPT],[C.OBJECT,l.OBJECT],[C.OL,l.OL],[C.OPTGROUP,l.OPTGROUP],[C.OPTION,l.OPTION],[C.P,l.P],[C.PARAM,l.PARAM],[C.PLAINTEXT,l.PLAINTEXT],[C.PRE,l.PRE],[C.RB,l.RB],[C.RP,l.RP],[C.RT,l.RT],[C.RTC,l.RTC],[C.RUBY,l.RUBY],[C.S,l.S],[C.SCRIPT,l.SCRIPT],[C.SEARCH,l.SEARCH],[C.SECTION,l.SECTION],[C.SELECT,l.SELECT],[C.SOURCE,l.SOURCE],[C.SMALL,l.SMALL],[C.SPAN,l.SPAN],[C.STRIKE,l.STRIKE],[C.STRONG,l.STRONG],[C.STYLE,l.STYLE],[C.SUB,l.SUB],[C.SUMMARY,l.SUMMARY],[C.SUP,l.SUP],[C.TABLE,l.TABLE],[C.TBODY,l.TBODY],[C.TEMPLATE,l.TEMPLATE],[C.TEXTAREA,l.TEXTAREA],[C.TFOOT,l.TFOOT],[C.TD,l.TD],[C.TH,l.TH],[C.THEAD,l.THEAD],[C.TITLE,l.TITLE],[C.TR,l.TR],[C.TRACK,l.TRACK],[C.TT,l.TT],[C.U,l.U],[C.UL,l.UL],[C.SVG,l.SVG],[C.VAR,l.VAR],[C.WBR,l.WBR],[C.XMP,l.XMP]]);function jt(e){var t;return(t=Mh.get(e))!==null&&t!==void 0?t:l.UNKNOWN}const P=l,vh={[D.HTML]:new Set([P.ADDRESS,P.APPLET,P.AREA,P.ARTICLE,P.ASIDE,P.BASE,P.BASEFONT,P.BGSOUND,P.BLOCKQUOTE,P.BODY,P.BR,P.BUTTON,P.CAPTION,P.CENTER,P.COL,P.COLGROUP,P.DD,P.DETAILS,P.DIR,P.DIV,P.DL,P.DT,P.EMBED,P.FIELDSET,P.FIGCAPTION,P.FIGURE,P.FOOTER,P.FORM,P.FRAME,P.FRAMESET,P.H1,P.H2,P.H3,P.H4,P.H5,P.H6,P.HEAD,P.HEADER,P.HGROUP,P.HR,P.HTML,P.IFRAME,P.IMG,P.INPUT,P.LI,P.LINK,P.LISTING,P.MAIN,P.MARQUEE,P.MENU,P.META,P.NAV,P.NOEMBED,P.NOFRAMES,P.NOSCRIPT,P.OBJECT,P.OL,P.P,P.PARAM,P.PLAINTEXT,P.PRE,P.SCRIPT,P.SECTION,P.SELECT,P.SOURCE,P.STYLE,P.SUMMARY,P.TABLE,P.TBODY,P.TD,P.TEMPLATE,P.TEXTAREA,P.TFOOT,P.TH,P.THEAD,P.TITLE,P.TR,P.TRACK,P.UL,P.WBR,P.XMP]),[D.MATHML]:new Set([P.MI,P.MO,P.MN,P.MS,P.MTEXT,P.ANNOTATION_XML]),[D.SVG]:new Set([P.TITLE,P.FOREIGN_OBJECT,P.DESC]),[D.XLINK]:new Set,[D.XML]:new Set,[D.XMLNS]:new Set},Xr=new Set([P.H1,P.H2,P.H3,P.H4,P.H5,P.H6]);C.STYLE,C.SCRIPT,C.XMP,C.IFRAME,C.NOEMBED,C.NOFRAMES,C.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 me={DATA:E.DATA,RCDATA:E.RCDATA,RAWTEXT:E.RAWTEXT,SCRIPT_DATA:E.SCRIPT_DATA,PLAINTEXT:E.PLAINTEXT,CDATA_SECTION:E.CDATA_SECTION};function Bh(e){return e>=m.DIGIT_0&&e<=m.DIGIT_9}function nn(e){return e>=m.LATIN_CAPITAL_A&&e<=m.LATIN_CAPITAL_Z}function Fh(e){return e>=m.LATIN_SMALL_A&&e<=m.LATIN_SMALL_Z}function nt(e){return Fh(e)||nn(e)}function Sa(e){return nt(e)||Bh(e)}function Mn(e){return e+32}function yu(e){return e===m.SPACE||e===m.LINE_FEED||e===m.TABULATION||e===m.FORM_FEED}function Ia(e){return yu(e)||e===m.SOLIDUS||e===m.GREATER_THAN_SIGN}function Hh(e){return e===m.NULL?I.nullCharacterReference:e>1114111?I.characterReferenceOutsideUnicodeRange:xu(e)?I.surrogateCharacterReference:_u(e)?I.noncharacterCharacterReference:ku(e)||e===m.CARRIAGE_RETURN?I.controlCharacterReference:null}class Uh{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 Ch(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Dh(Nh,(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=Hh(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(Au(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=jt(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=yu(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()?Ke.Attribute:Ke.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(nn(t)?Mn(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(Ie.SCRIPT,!1)&&Ia(this.preprocessor.peek(Ie.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ie.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(Ie.SCRIPT,!1)&&Ia(this.preprocessor.peek(Ie.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ie.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(nn(t)?Mn(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(Ie.DASH_DASH,!0)?(this._createCommentToken(Ie.DASH_DASH.length+1),this.state=E.COMMENT_START):this._consumeSequenceIfMatch(Ie.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ie.DOCTYPE.length+1),this.state=E.DOCTYPE):this._consumeSequenceIfMatch(Ie.CDATA_START,!0)?this.inForeignNode?this.state=E.CDATA_SECTION:(this._err(I.cdataInHtmlContent),this._createCommentToken(Ie.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(nn(t))this._createDoctypeToken(String.fromCharCode(Mn(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(nn(t)?Mn(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(Ie.PUBLIC,!1)?this.state=E.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ie.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()&&Sa(this.preprocessor.peek(1))?E.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Sa(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===m.SEMICOLON&&this._err(I.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Cu=new Set([l.DD,l.DT,l.LI,l.OPTGROUP,l.OPTION,l.P,l.RB,l.RP,l.RT,l.RTC]),wa=new Set([...Cu,l.CAPTION,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]),Qn=new Set([l.APPLET,l.CAPTION,l.HTML,l.MARQUEE,l.OBJECT,l.TABLE,l.TD,l.TEMPLATE,l.TH]),jh=new Set([...Qn,l.OL,l.UL]),zh=new Set([...Qn,l.BUTTON]),La=new Set([l.ANNOTATION_XML,l.MI,l.MN,l.MO,l.MS,l.MTEXT]),Oa=new Set([l.DESC,l.FOREIGN_OBJECT,l.TITLE]),$h=new Set([l.TR,l.TEMPLATE,l.HTML]),Yh=new Set([l.TBODY,l.TFOOT,l.THEAD,l.TEMPLATE,l.HTML]),qh=new Set([l.TABLE,l.TEMPLATE,l.HTML]),Vh=new Set([l.TD,l.TH]);class Wh{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)===D.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])!==D.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(Xr,D.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Vh,D.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(qh,D.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Yh,D.HTML)}clearBackToTableRowContext(){this.clearBackTo($h,D.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 D.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case D.SVG:{if(Oa.has(i))return!1;break}case D.MATHML:{if(La.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Qn)}hasInListItemScope(t){return this.hasInDynamicScope(t,jh)}hasInButtonScope(t){return this.hasInDynamicScope(t,zh)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case D.HTML:{if(Xr.has(n))return!0;if(Qn.has(n))return!1;break}case D.SVG:{if(Oa.has(n))return!1;break}case D.MATHML:{if(La.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===D.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])===D.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])===D.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&&Cu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&wa.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&wa.has(this.currentTagId);)this.pop()}}const Cr=3;var qe;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(qe||(qe={}));const Ra={type:qe.Marker};class Gh{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<Cr)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Cr)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>=Cr&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(Ra)}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(Ra);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}}},Nu="html",Qh="about:legacy-compat",Xh="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Su=["+//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//"],Kh=[...Su,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Zh=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Iu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Jh=[...Iu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Da(e,t){return t.some(n=>e.startsWith(n))}function ed(e){return e.name===Nu&&e.publicId===null&&(e.systemId===null||e.systemId===Qh)}function td(e){if(e.name!==Nu)return Me.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===Xh)return Me.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Zh.has(n))return Me.QUIRKS;let r=t===null?Kh:Su;if(Da(n,r))return Me.QUIRKS;if(r=t===null?Iu:Jh,Da(n,r))return Me.LIMITED_QUIRKS}return Me.NO_QUIRKS}const Pa={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},nd="definitionurl",rd="definitionURL",id=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])),ad=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:D.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:D.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:D.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:D.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:D.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:D.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:D.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:D.XML}],["xml:space",{prefix:"xml",name:"space",namespace:D.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:D.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:D.XMLNS}]]),sd=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])),ud=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 od(e){const t=e.tagID;return t===l.FONT&&e.attrs.some(({name:r})=>r===gt.COLOR||r===gt.SIZE||r===gt.FACE)||ud.has(t)}function wu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===nd){e.attrs[t].name=rd;break}}function Lu(e){for(let t=0;t<e.attrs.length;t++){const n=id.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Li(e){for(let t=0;t<e.attrs.length;t++){const n=ad.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 ld(e){const t=sd.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=jt(e.tagName))}function cd(e,t){return t===D.MATHML&&(e===l.MI||e===l.MO||e===l.MN||e===l.MS||e===l.MTEXT)}function hd(e,t,n){if(t===D.MATHML&&e===l.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===gt.ENCODING){const i=n[r].value.toLowerCase();return i===Pa.TEXT_HTML||i===Pa.APPLICATION_XML}}return t===D.SVG&&(e===l.FOREIGN_OBJECT||e===l.DESC||e===l.TITLE)}function dd(e,t,n,r){return(!r||r===D.HTML)&&hd(e,t,n)||(!r||r===D.MATHML)&&cd(e,t)}const fd="hidden",pd=8,md=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 gd={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ou=new Set([l.TABLE,l.TBODY,l.TFOOT,l.THEAD,l.TR]),Ma={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:rt,onParseError:null};class va{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={...Ma,...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 Uh(this.options,this),this.activeFormattingElements=new Gh(this.treeAdapter),this.fragmentContextID=r?jt(this.treeAdapter.getTagName(r)):l.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new Wh(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={...Ma,...n};t??(t=r.treeAdapter.createElement(C.TEMPLATE,D.HTML,[]));const i=r.treeAdapter.createElement("documentmock",D.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:gd,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)===D.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,D.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=me.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)===C.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==D.HTML))switch(this.fragmentContextID){case l.TITLE:case l.TEXTAREA:{this.tokenizer.state=me.RCDATA;break}case l.STYLE:case l.XMP:case l.IFRAME:case l.NOEMBED:case l.NOFRAMES:case l.NOSCRIPT:{this.tokenizer.state=me.RAWTEXT;break}case l.SCRIPT:{this.tokenizer.state=me.SCRIPT_DATA;break}case l.PLAINTEXT:{this.tokenizer.state=me.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,D.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,D.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(C.HTML,D.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)===C.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===D.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===l.MGLYPH||t.tagID===l.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,D.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 dd(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 Ou.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)===D.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 vh[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Wf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Gt(this,t);break}case T.BEFORE_HTML:{sn(this,t);break}case T.BEFORE_HEAD:{un(this,t);break}case T.IN_HEAD:{on(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ln(this,t);break}case T.AFTER_HEAD:{cn(this,t);break}case T.IN_BODY:case T.IN_CAPTION:case T.IN_CELL:case T.IN_TEMPLATE:{Du(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:{Hu(this,t);break}case T.IN_COLUMN_GROUP:{Xn(this,t);break}case T.AFTER_BODY:{Kn(this,t);break}case T.AFTER_AFTER_BODY:{$n(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Vf(this,t);return}switch(this.insertionMode){case T.INITIAL:{Gt(this,t);break}case T.BEFORE_HTML:{sn(this,t);break}case T.BEFORE_HEAD:{un(this,t);break}case T.IN_HEAD:{on(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ln(this,t);break}case T.AFTER_HEAD:{cn(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:{Xn(this,t);break}case T.AFTER_BODY:{Kn(this,t);break}case T.AFTER_AFTER_BODY:{$n(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kr(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:{Kr(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.AFTER_BODY:{Ad(this,t);break}case T.AFTER_AFTER_BODY:case T.AFTER_AFTER_FRAMESET:{yd(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case T.INITIAL:{Cd(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:{Qt(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)?Gf(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case T.INITIAL:{Gt(this,t);break}case T.BEFORE_HTML:{Nd(this,t);break}case T.BEFORE_HEAD:{Id(this,t);break}case T.IN_HEAD:{ze(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Od(this,t);break}case T.AFTER_HEAD:{Dd(this,t);break}case T.IN_BODY:{_e(this,t);break}case T.IN_TABLE:{vt(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.IN_CAPTION:{Lf(this,t);break}case T.IN_COLUMN_GROUP:{Di(this,t);break}case T.IN_TABLE_BODY:{dr(this,t);break}case T.IN_ROW:{fr(this,t);break}case T.IN_CELL:{Df(this,t);break}case T.IN_SELECT:{zu(this,t);break}case T.IN_SELECT_IN_TABLE:{Mf(this,t);break}case T.IN_TEMPLATE:{Bf(this,t);break}case T.AFTER_BODY:{Hf(this,t);break}case T.IN_FRAMESET:{Uf(this,t);break}case T.AFTER_FRAMESET:{zf(this,t);break}case T.AFTER_AFTER_BODY:{Yf(this,t);break}case T.AFTER_AFTER_FRAMESET:{qf(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:{Gt(this,t);break}case T.BEFORE_HTML:{Sd(this,t);break}case T.BEFORE_HEAD:{wd(this,t);break}case T.IN_HEAD:{Ld(this,t);break}case T.IN_HEAD_NO_SCRIPT:{Rd(this,t);break}case T.AFTER_HEAD:{Pd(this,t);break}case T.IN_BODY:{hr(this,t);break}case T.TEXT:{xf(this,t);break}case T.IN_TABLE:{bn(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.IN_CAPTION:{Of(this,t);break}case T.IN_COLUMN_GROUP:{Rf(this,t);break}case T.IN_TABLE_BODY:{Zr(this,t);break}case T.IN_ROW:{ju(this,t);break}case T.IN_CELL:{Pf(this,t);break}case T.IN_SELECT:{$u(this,t);break}case T.IN_SELECT_IN_TABLE:{vf(this,t);break}case T.IN_TEMPLATE:{Ff(this,t);break}case T.AFTER_BODY:{qu(this,t);break}case T.IN_FRAMESET:{jf(this,t);break}case T.AFTER_FRAMESET:{$f(this,t);break}case T.AFTER_AFTER_BODY:{$n(this,t);break}}}onEof(t){switch(this.insertionMode){case T.INITIAL:{Gt(this,t);break}case T.BEFORE_HTML:{sn(this,t);break}case T.BEFORE_HEAD:{un(this,t);break}case T.IN_HEAD:{on(this,t);break}case T.IN_HEAD_NO_SCRIPT:{ln(this,t);break}case T.AFTER_HEAD:{cn(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:{Bu(this,t);break}case T.TEXT:{kf(this,t);break}case T.IN_TABLE_TEXT:{Qt(this,t);break}case T.IN_TEMPLATE:{Yu(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:{Ri(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:{Ru(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:{Fu(this,t);break}}}}function Ed(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):vu(e,t),n}function bd(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 Td(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>=md;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=xd(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function xd(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 kd(e,t,n){const r=e.treeAdapter.getTagName(t),i=jt(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===l.TEMPLATE&&a===D.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function _d(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 Oi(e,t){for(let n=0;n<pd;n++){const r=Ed(e,t);if(!r)break;const i=bd(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=Td(e,i,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),s&&kd(e,s,a),_d(e,i,r)}}function Kr(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ad(e,t){e._appendCommentNode(t,e.openElements.items[0])}function yd(e,t){e._appendCommentNode(t,e.document)}function Ri(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 Cd(e,t){e._setDocumentType(t);const n=t.forceQuirks?Me.QUIRKS:td(t);ed(t)||e._err(t,I.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=T.BEFORE_HTML}function Gt(e,t){e._err(t,I.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Me.QUIRKS),e.insertionMode=T.BEFORE_HTML,e._processToken(t)}function Nd(e,t){t.tagID===l.HTML?(e._insertElement(t,D.HTML),e.insertionMode=T.BEFORE_HEAD):sn(e,t)}function Sd(e,t){const n=t.tagID;(n===l.HTML||n===l.HEAD||n===l.BODY||n===l.BR)&&sn(e,t)}function sn(e,t){e._insertFakeRootElement(),e.insertionMode=T.BEFORE_HEAD,e._processToken(t)}function Id(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.HEAD:{e._insertElement(t,D.HTML),e.headElement=e.openElements.current,e.insertionMode=T.IN_HEAD;break}default:un(e,t)}}function wd(e,t){const n=t.tagID;n===l.HEAD||n===l.BODY||n===l.HTML||n===l.BR?un(e,t):e._err(t,I.endTagWithoutMatchingOpenElement)}function un(e,t){e._insertFakeElement(C.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:{_e(e,t);break}case l.BASE:case l.BASEFONT:case l.BGSOUND:case l.LINK:case l.META:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TITLE:{e._switchToTextParsing(t,me.RCDATA);break}case l.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,me.RAWTEXT):(e._insertElement(t,D.HTML),e.insertionMode=T.IN_HEAD_NO_SCRIPT);break}case l.NOFRAMES:case l.STYLE:{e._switchToTextParsing(t,me.RAWTEXT);break}case l.SCRIPT:{e._switchToTextParsing(t,me.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:on(e,t)}}function Ld(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:{on(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function At(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 on(e,t){e.openElements.pop(),e.insertionMode=T.AFTER_HEAD,e._processToken(t)}function Od(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:{ze(e,t);break}case l.NOSCRIPT:{e._err(t,I.nestedNoscriptInHead);break}default:ln(e,t)}}function Rd(e,t){switch(t.tagID){case l.NOSCRIPT:{e.openElements.pop(),e.insertionMode=T.IN_HEAD;break}case l.BR:{ln(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function ln(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 Dd(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.BODY:{e._insertElement(t,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_BODY;break}case l.FRAMESET:{e._insertElement(t,D.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:cn(e,t)}}function Pd(e,t){switch(t.tagID){case l.BODY:case l.HTML:case l.BR:{cn(e,t);break}case l.TEMPLATE:{At(e,t);break}default:e._err(t,I.endTagWithoutMatchingOpenElement)}}function cn(e,t){e._insertFakeElement(C.BODY,l.BODY),e.insertionMode=T.IN_BODY,cr(e,t)}function cr(e,t){switch(t.type){case Z.CHARACTER:{Du(e,t);break}case Z.WHITESPACE_CHARACTER:{Ru(e,t);break}case Z.COMMENT:{Kr(e,t);break}case Z.START_TAG:{_e(e,t);break}case Z.END_TAG:{hr(e,t);break}case Z.EOF:{Bu(e,t);break}}}function Ru(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Du(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Md(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function vd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Bd(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_FRAMESET)}function Fd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML)}function Hd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Xr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,D.HTML)}function Ud(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function jd(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),n||(e.formElement=e.openElements.current))}function zd(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,D.HTML)}function $d(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._insertElement(t,D.HTML),e.tokenizer.state=me.PLAINTEXT}function Yd(e,t){e.openElements.hasInScope(l.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.framesetOk=!1}function qd(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(C.A);n&&(Oi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Vd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Wd(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(l.NOBR)&&(Oi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,D.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Gd(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.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,D.HTML),e.framesetOk=!1,e.insertionMode=T.IN_TABLE}function Pu(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mu(e){const t=Au(e,gt.TYPE);return t!=null&&t.toLowerCase()===fd}function Xd(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,D.HTML),Mu(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Kd(e,t){e._appendElement(t,D.HTML),t.ackSelfClosing=!0}function Zd(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._appendElement(t,D.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Jd(e,t){t.tagName=C.IMG,t.tagID=l.IMG,Pu(e,t)}function ef(e,t){e._insertElement(t,D.HTML),e.skipNextNewLine=!0,e.tokenizer.state=me.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=T.TEXT}function tf(e,t){e.openElements.hasInButtonScope(l.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function nf(e,t){e.framesetOk=!1,e._switchToTextParsing(t,me.RAWTEXT)}function Ba(e,t){e._switchToTextParsing(t,me.RAWTEXT)}function rf(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.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 af(e,t){e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,D.HTML)}function sf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,D.HTML)}function uf(e,t){e.openElements.hasInScope(l.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(l.RTC),e._insertElement(t,D.HTML)}function of(e,t){e._reconstructActiveFormattingElements(),wu(t),Li(t),t.selfClosing?e._appendElement(t,D.MATHML):e._insertElement(t,D.MATHML),t.ackSelfClosing=!0}function lf(e,t){e._reconstructActiveFormattingElements(),Lu(t),Li(t),t.selfClosing?e._appendElement(t,D.SVG):e._insertElement(t,D.SVG),t.ackSelfClosing=!0}function Fa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,D.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:{Vd(e,t);break}case l.A:{qd(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Hd(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:{Fd(e,t);break}case l.LI:case l.DD:case l.DT:{zd(e,t);break}case l.BR:case l.IMG:case l.WBR:case l.AREA:case l.EMBED:case l.KEYGEN:{Pu(e,t);break}case l.HR:{Zd(e,t);break}case l.RB:case l.RTC:{sf(e,t);break}case l.RT:case l.RP:{uf(e,t);break}case l.PRE:case l.LISTING:{Ud(e,t);break}case l.XMP:{tf(e,t);break}case l.SVG:{lf(e,t);break}case l.HTML:{Md(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:{vd(e,t);break}case l.FORM:{jd(e,t);break}case l.NOBR:{Wd(e,t);break}case l.MATH:{of(e,t);break}case l.TABLE:{Qd(e,t);break}case l.INPUT:{Xd(e,t);break}case l.PARAM:case l.TRACK:case l.SOURCE:{Kd(e,t);break}case l.IMAGE:{Jd(e,t);break}case l.BUTTON:{Yd(e,t);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{Gd(e,t);break}case l.IFRAME:{nf(e,t);break}case l.SELECT:{rf(e,t);break}case l.OPTION:case l.OPTGROUP:{af(e,t);break}case l.NOEMBED:case l.NOFRAMES:{Ba(e,t);break}case l.FRAMESET:{Bd(e,t);break}case l.TEXTAREA:{ef(e,t);break}case l.NOSCRIPT:{e.options.scriptingEnabled?Ba(e,t):Fa(e,t);break}case l.PLAINTEXT:{$d(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:Fa(e,t)}}function cf(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 hf(e,t){e.openElements.hasInScope(l.BODY)&&(e.insertionMode=T.AFTER_BODY,qu(e,t))}function df(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ff(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 pf(e){e.openElements.hasInButtonScope(l.P)||e._insertFakeElement(C.P,l.P),e._closePElement()}function mf(e){e.openElements.hasInListItemScope(l.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(l.LI),e.openElements.popUntilTagNamePopped(l.LI))}function gf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ef(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function bf(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Tf(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(C.BR,l.BR),e.openElements.pop(),e.framesetOk=!1}function vu(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 hr(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:{Oi(e,t);break}case l.P:{pf(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:{df(e,t);break}case l.LI:{mf(e);break}case l.DD:case l.DT:{gf(e,t);break}case l.H1:case l.H2:case l.H3:case l.H4:case l.H5:case l.H6:{Ef(e);break}case l.BR:{Tf(e);break}case l.BODY:{cf(e,t);break}case l.HTML:{hf(e,t);break}case l.FORM:{ff(e);break}case l.APPLET:case l.OBJECT:case l.MARQUEE:{bf(e,t);break}case l.TEMPLATE:{At(e,t);break}default:vu(e,t)}}function Bu(e,t){e.tmplInsertionModeStack.length>0?Yu(e,t):Ri(e,t)}function xf(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 kf(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&&Ou.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:{Hu(e,t);break}case Z.WHITESPACE_CHARACTER:{Fu(e,t);break}}else Cn(e,t)}function _f(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_CAPTION}function Af(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_COLUMN_GROUP}function yf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.COLGROUP,l.COLGROUP),e.insertionMode=T.IN_COLUMN_GROUP,Di(e,t)}function Cf(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_TABLE_BODY}function Nf(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(C.TBODY,l.TBODY),e.insertionMode=T.IN_TABLE_BODY,dr(e,t)}function Sf(e,t){e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function If(e,t){Mu(t)?e._appendElement(t,D.HTML):Cn(e,t),t.ackSelfClosing=!0}function wf(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,D.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function vt(e,t){switch(t.tagID){case l.TD:case l.TH:case l.TR:{Nf(e,t);break}case l.STYLE:case l.SCRIPT:case l.TEMPLATE:{ze(e,t);break}case l.COL:{yf(e,t);break}case l.FORM:{wf(e,t);break}case l.TABLE:{Sf(e,t);break}case l.TBODY:case l.TFOOT:case l.THEAD:{Cf(e,t);break}case l.INPUT:{If(e,t);break}case l.CAPTION:{_f(e,t);break}case l.COLGROUP:{Af(e,t);break}default:Cn(e,t)}}function bn(e,t){switch(t.tagID){case l.TABLE:{e.openElements.hasInTableScope(l.TABLE)&&(e.openElements.popUntilTagNamePopped(l.TABLE),e._resetInsertionMode());break}case l.TEMPLATE:{At(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:Cn(e,t)}}function Cn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cr(e,t),e.fosterParentingEnabled=n}function Fu(e,t){e.pendingCharacterTokens.push(t)}function Hu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Qt(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Cn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Uu=new Set([l.CAPTION,l.COL,l.COLGROUP,l.TBODY,l.TD,l.TFOOT,l.TH,l.THEAD,l.TR]);function Lf(e,t){const n=t.tagID;Uu.has(n)?e.openElements.hasInTableScope(l.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(l.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=T.IN_TABLE,vt(e,t)):_e(e,t)}function Of(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&&bn(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:hr(e,t)}}function Di(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.COL:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.TEMPLATE:{ze(e,t);break}default:Xn(e,t)}}function Rf(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:{At(e,t);break}case l.COL:break;default:Xn(e,t)}}function Xn(e,t){e.openElements.currentTagId===l.COLGROUP&&(e.openElements.pop(),e.insertionMode=T.IN_TABLE,e._processToken(t))}function dr(e,t){switch(t.tagID){case l.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,D.HTML),e.insertionMode=T.IN_ROW;break}case l.TH:case l.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(C.TR,l.TR),e.insertionMode=T.IN_ROW,fr(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,vt(e,t));break}default:vt(e,t)}}function Zr(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,bn(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:bn(e,t)}}function fr(e,t){switch(t.tagID){case l.TH:case l.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,D.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,dr(e,t));break}default:vt(e,t)}}function ju(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,Zr(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,Zr(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:bn(e,t)}}function Df(e,t){const n=t.tagID;Uu.has(n)?(e.openElements.hasInTableScope(l.TD)||e.openElements.hasInTableScope(l.TH))&&(e._closeTableCell(),fr(e,t)):_e(e,t)}function Pf(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(),ju(e,t));break}case l.BODY:case l.CAPTION:case l.COL:case l.COLGROUP:case l.HTML:break;default:hr(e,t)}}function zu(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,D.HTML);break}case l.OPTGROUP:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._insertElement(t,D.HTML);break}case l.HR:{e.openElements.currentTagId===l.OPTION&&e.openElements.pop(),e.openElements.currentTagId===l.OPTGROUP&&e.openElements.pop(),e._appendElement(t,D.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 $u(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:{At(e,t);break}}}function Mf(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)):zu(e,t)}function vf(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)):$u(e,t)}function Bf(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,vt(e,t);break}case l.COL:{e.tmplInsertionModeStack[0]=T.IN_COLUMN_GROUP,e.insertionMode=T.IN_COLUMN_GROUP,Di(e,t);break}case l.TR:{e.tmplInsertionModeStack[0]=T.IN_TABLE_BODY,e.insertionMode=T.IN_TABLE_BODY,dr(e,t);break}case l.TD:case l.TH:{e.tmplInsertionModeStack[0]=T.IN_ROW,e.insertionMode=T.IN_ROW,fr(e,t);break}default:e.tmplInsertionModeStack[0]=T.IN_BODY,e.insertionMode=T.IN_BODY,_e(e,t)}}function Ff(e,t){t.tagID===l.TEMPLATE&&At(e,t)}function Yu(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(l.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Ri(e,t)}function Hf(e,t){t.tagID===l.HTML?_e(e,t):Kn(e,t)}function qu(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 Kn(e,t)}function Kn(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function Uf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.FRAMESET:{e._insertElement(t,D.HTML);break}case l.FRAME:{e._appendElement(t,D.HTML),t.ackSelfClosing=!0;break}case l.NOFRAMES:{ze(e,t);break}}}function jf(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 zf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function $f(e,t){t.tagID===l.HTML&&(e.insertionMode=T.AFTER_AFTER_FRAMESET)}function Yf(e,t){t.tagID===l.HTML?_e(e,t):$n(e,t)}function $n(e,t){e.insertionMode=T.IN_BODY,cr(e,t)}function qf(e,t){switch(t.tagID){case l.HTML:{_e(e,t);break}case l.NOFRAMES:{ze(e,t);break}}}function Vf(e,t){t.chars=ce,e._insertCharacters(t)}function Wf(e,t){e._insertCharacters(t),e.framesetOk=!1}function Vu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==D.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Gf(e,t){if(od(t))Vu(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===D.MATHML?wu(t):r===D.SVG&&(ld(t),Lu(t)),Li(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){Vu(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)===D.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}C.AREA,C.BASE,C.BASEFONT,C.BGSOUND,C.BR,C.COL,C.EMBED,C.FRAME,C.HR,C.IMG,C.INPUT,C.KEYGEN,C.LINK,C.META,C.PARAM,C.SOURCE,C.TRACK,C.WBR;const pr=Wu("end"),Ve=Wu("start");function Wu(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 Gu(e){const t=Ve(e),n=pr(e);if(t&&n)return{start:t,end:n}}const Xf=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Kf=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ha={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Qu(e,t){const n=u0(e),r=bu("type",{handlers:{root:Zf,element:Jf,text:e0,comment:Ku,doctype:t0,raw:r0},unknown:i0}),i={parser:n?new va(Ha):va.getFragmentParser(void 0,Ha),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),zt(i,Ve());const a=n?i.parser.document:i.parser.getFragment(),s=uh(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 Xu(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Zf(e,t){Xu(e.children,t)}function Jf(e,t){a0(e,t),Xu(e.children,t),s0(e,t)}function e0(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Z.CHARACTER,chars:e.value,location:Nn(e)};zt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function t0(e,t){const n={type:Z.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Nn(e)};zt(t,Ve(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function n0(e,t){t.stitches=!0;const n=o0(e);if("children"in e&&"children"in n){const r=Qu({type:"root",children:e.children},t.options);n.children=r.children}Ku({type:"comment",value:{stitch:n}},t)}function Ku(e,t){const n=e.value,r={type:Z.COMMENT,data:n,location:Nn(e)};zt(t,Ve(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function r0(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,Zu(t,Ve(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Xf,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function i0(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))n0(n,t);else{let r="";throw Kf.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 zt(e,t){Zu(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=me.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 Zu(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 a0(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===me.PLAINTEXT)return;zt(t,Ve(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:mt.html;i===mt.html&&n==="svg"&&(i=mt.svg);const a=dh({...e,children:[]},{space:i===mt.svg?"svg":"html"}),s={type:Z.START_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Nn(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function s0(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&xh.includes(n)||t.parser.tokenizer.state===me.PLAINTEXT)return;zt(t,pr(e));const r={type:Z.END_TAG,tagName:n,tagID:jt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Nn(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===me.RCDATA||t.parser.tokenizer.state===me.RAWTEXT||t.parser.tokenizer.state===me.SCRIPT_DATA)&&(t.parser.tokenizer.state=me.DATA)}function u0(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Nn(e){const t=Ve(e)||{line:void 0,column:void 0,offset:void 0},n=pr(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 o0(e){return"children"in e?bt({...e,children:[]}):bt(e)}function Jr(e){return function(t,n){return Qu(t,{...e,file:n})}}const ht=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],hn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ht,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ht],h2:[["className","sr-only"]],img:[...ht,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ht,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ht],table:[...ht],ul:[...ht,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},it={}.hasOwnProperty;function l0(e,t){let n={type:"root",children:[]};const r={schema:t?{...hn,...t}:hn,stack:[]},i=Ju(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Ju(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return c0(e,n);case"doctype":return h0(e,n);case"element":return d0(e,n);case"root":return f0(e,n);case"text":return p0(e,n)}}}function c0(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 Sn(a,t),a}}function h0(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Sn(n,t),n}}function d0(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=eo(e,t.children),i=m0(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&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 Sn(s,t),s}function f0(e,t){const r={type:"root",children:eo(e,t.children)};return Sn(r,t),r}function p0(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Sn(r,t),r}function eo(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=Ju(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function m0(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&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=Ua(e,ja(a,c),c,h);d==null&&(d=Ua(e,ja(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 Ua(e,t,n,r){return t?Array.isArray(r)?g0(e,t,n,r):to(e,t,n,r):void 0}function g0(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const s=to(e,t,n,r[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function to(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&E0(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 E0(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 Sn(e,t){const n=Gu(t);t.data&&(e.data=bt(t.data)),n&&(e.position=n)}function ja(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 no(e){return function(t){return l0(t,e)}}function za(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]/),b0=lt(/[#-'*+\--9=?A-Z^-~]/);function Zn(e){return e!==null&&(e<32||e===127)}const ei=lt(/\d/),T0=lt(/[\dA-Fa-f]/),x0=lt(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function ue(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}const mr=lt(new RegExp("\\p{P}|\\p{S}","u")),Tt=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function k0(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _0(e,t,n){const i=sr((n||{}).ignore||[]),a=A0(t);let s=-1;for(;++s<a.length;)_i(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 S=d.children.indexOf(c);let _=!1,O=[];f.lastIndex=0;let L=f.exec(c.value);for(;L;){const U=L.index,$={index:L.index,input:L.input,stack:[...h,c]};let w=p(...L,$);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,_=!0),!f.global)break;L=f.exec(c.value)}return _?(b<c.value.length&&O.push({type:"text",value:c.value.slice(b)}),d.children.splice(S,1,...O)):O=[c],S+O.length}}function A0(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([y0(i[0]),C0(i[1])])}return t}function y0(e){return typeof e=="string"?new RegExp(k0(e),"g"):e}function C0(e){return typeof e=="function"?e:function(){return e}}const Sr="phrasing",Ir=["autolink","link","image","label"];function N0(){return{transforms:[D0],enter:{literalAutolink:I0,literalAutolinkEmail:wr,literalAutolinkHttp:wr,literalAutolinkWww:wr},exit:{literalAutolink:R0,literalAutolinkEmail:O0,literalAutolinkHttp:w0,literalAutolinkWww:L0}}}function S0(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Sr,notInConstruct:Ir},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Sr,notInConstruct:Ir},{character:":",before:"[ps]",after:"\\/",inConstruct:Sr,notInConstruct:Ir}]}}function I0(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wr(e){this.config.enter.autolinkProtocol.call(this,e)}function w0(e){this.config.exit.autolinkProtocol.call(this,e)}function L0(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 O0(e){this.config.exit.autolinkEmail.call(this,e)}function R0(e){this.exit(e)}function D0(e){_0(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,P0],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M0]],{ignore:["link","linkReference"]})}function P0(e,t,n,r,i){let a="";if(!ro(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!v0(n)))return!1;const s=B0(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 M0(e,t,n,r){return!ro(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function v0(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 B0(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=za(e,"(");let a=za(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 ro(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Tt(n)||mr(n))&&(!t||n!==47)}function je(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}io.peek=V0;function F0(){this.buffer()}function H0(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function U0(){this.buffer()}function j0(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function z0(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 $0(e){this.exit(e)}function Y0(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 q0(e){this.exit(e)}function V0(){return"["}function io(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 W0(){return{enter:{gfmFootnoteCallString:F0,gfmFootnoteCall:H0,gfmFootnoteDefinitionLabelString:U0,gfmFootnoteDefinition:j0},exit:{gfmFootnoteCallString:z0,gfmFootnoteCall:$0,gfmFootnoteDefinitionLabelString:Y0,gfmFootnoteDefinition:q0}}}function G0(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:io},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
4
  `:" ")+a.indentLines(a.containerFlow(r,u.current()),t?ao:Q0))),c(),o}}function Q0(e,t,n){return t===0?e:ao(e,t,n)}function ao(e,t,n){return(n?"":" ")+e}const X0=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];so.peek=tp;function K0(){return{canContainEols:["delete"],enter:{strikethrough:J0},exit:{strikethrough:ep}}}function Z0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:X0}],handlers:{delete:so}}}function J0(e){this.enter({type:"delete",children:[]},e)}function ep(e){this.exit(e)}function so(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 tp(){return"~"}function np(e){return e.length}function rp(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||np,a=[],s=[],u=[],o=[];let c=0,h=-1;for(;++h<e.length;){const A=[],S=[];let _=-1;for(e[h].length>c&&(c=e[h].length);++_<e[h].length;){const O=ip(e[h][_]);if(n.alignDelimiters!==!1){const L=i(O);S[_]=L,(o[_]===void 0||L>o[_])&&(o[_]=L)}A.push(O)}s[h]=A,u[h]=S}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<c;)a[d]=$a(r[d]);else{const A=$a(r);for(;++d<c;)a[d]=A}d=-1;const f=[],p=[];for(;++d<c;){const A=a[d];let S="",_="";A===99?(S=":",_=":"):A===108?S=":":A===114&&(_=":");let O=n.alignDelimiters===!1?1:Math.max(1,o[d]-S.length-_.length);const L=S+"-".repeat(O)+_;n.alignDelimiters!==!1&&(O=S.length+O+_.length,O>o[d]&&(o[d]=O),p[d]=O),f[d]=L}s.splice(1,0,f),u.splice(1,0,p),h=-1;const b=[];for(;++h<s.length;){const A=s[h],S=u[h];d=-1;const _=[];for(;++d<c;){const O=A[d]||"";let L="",U="";if(n.alignDelimiters!==!1){const $=o[d]-(S[d]||0),w=a[d];w===114?L=" ".repeat($):w===99?$%2?(L=" ".repeat($/2+.5),U=" ".repeat($/2-.5)):(L=" ".repeat($/2),U=L):U=" ".repeat($)}n.delimiterStart!==!1&&!d&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&O==="")&&(n.delimiterStart!==!1||d)&&_.push(" "),n.alignDelimiters!==!1&&_.push(L),_.push(O),n.alignDelimiters!==!1&&_.push(U),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 ip(e){return e==null?"":String(e)}function $a(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 ap(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()),sp);return i(),s}function sp(e,t,n){return">"+(n?"":" ")+e}function up(e,t){return Ya(e,t.inConstruct,!0)&&!Ya(e,t.notInConstruct,!1)}function Ya(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 qa(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
@@ -113,7 +113,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error
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
115
  `)},Yr=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("")},O2=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=>Yr(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?Yr(u[c]):"";r[i]=`| ${o.join(" | ")} |`,i+=1}else{let o=u.map(c=>Yr(c));r[i]=`| ${o.join(" | ")} |`,i+=1}return r.join(`
116
- `)},R2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=y.useState(!1),[u,o]=y.useState(!1),c=y.useRef(null),h=y.useRef(0),{isAnimating:d}=y.useContext(Fe),f=async b=>{var A,S;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let _=(S=c.current)==null?void 0:S.closest('[data-streamdown="table-wrapper"]'),O=_?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let L=gl(O),U=b==="csv"?El(L):L2(L),$=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([$]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(_){r?.(_)}};y.useEffect(()=>{let b=A=>{let S=A.composedPath();c.current&&!S.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?ea:ta;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]})},D2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=y.useState(!1),s=y.useRef(null),{isAnimating:u}=y.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=gl(f),b=c==="csv"?El(p):O2(p);Mt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return y.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(xr,{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]})},P2=({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(R2,{}),g.jsx(D2,{})]}):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})})]}),M2=y.lazy(()=>Js(()=>import("./code-block-OCS4YCEC-DkMlYSza.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlock}))),v2=y.lazy(()=>Js(()=>Promise.resolve().then(()=>Vx),void 0).then(e=>({default:e.Mermaid}))),B2=/language-([^\s]+)/;function kr(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&&kr(e.node,t.node)}var di=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(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},ra=y.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));ra.displayName="MarkdownOl";var bl=y.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&&kr(e.node,t.node));bl.displayName="MarkdownLi";var Tl=y.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));Tl.displayName="MarkdownUl";var xl=y.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));xl.displayName="MarkdownHr";var kl=y.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));kl.displayName="MarkdownStrong";var F2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=y.useContext(Fe),[s,u]=y.useState(!1),o=n==="streamdown:incomplete-link",c=y.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=y.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=y.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(y2,{...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})},_l=y.memo(F2,(e,t)=>de(e,t)&&e.href===t.href);_l.displayName="MarkdownA";var Al=y.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));Al.displayName="MarkdownH1";var yl=y.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));yl.displayName="MarkdownH2";var Cl=y.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));Cl.displayName="MarkdownH3";var Nl=y.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));Nl.displayName="MarkdownH4";var Sl=y.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));Sl.displayName="MarkdownH5";var Il=y.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));Il.displayName="MarkdownH6";var wl=y.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=y.useContext(Fe),a=di(i,"table");return g.jsx(P2,{className:t,showControls:a,...r,children:e})},(e,t)=>de(e,t));wl.displayName="MarkdownTable";var Ll=y.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));Ll.displayName="MarkdownThead";var Ol=y.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));Ol.displayName="MarkdownTbody";var Rl=y.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));Rl.displayName="MarkdownTr";var Dl=y.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));Dl.displayName="MarkdownTh";var Pl=y.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));Pl.displayName="MarkdownTd";var Ml=y.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));Ml.displayName="MarkdownBlockquote";var vl=y.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));vl.displayName="MarkdownSup";var Bl=y.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));Bl.displayName="MarkdownSub";var Fl=y.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!y.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(y.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(y.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(!y.isValidElement(s))return s;if(s.type===ra){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));Fl.displayName="MarkdownSection";var H2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=y.useContext(Fe),o=na();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(B2),h=(i=c?.at(1))!=null?i:"",d="";if(y.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=di(u,"mermaid"),b=Un(u,"download"),A=Un(u,"copy"),S=Un(u,"fullscreen"),_=Un(u,"panZoom"),O=p&&(b||A||S);return g.jsx(y.Suspense,{fallback:g.jsx(Bs,{}),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(N2,{chart:d,config:s?.config}):null,A?g.jsx(Ms,{code:d}):null,S?g.jsx(w2,{chart:d,config:s?.config}):null]}):null,g.jsx(v2,{chart:d,config:s?.config,showControls:_})]})})}let f=di(u,"code");return g.jsx(y.Suspense,{fallback:g.jsx(Bs,{}),children:g.jsx(M2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(T2,{code:d,language:h}),g.jsx(Ms,{})]}):null})})},Hl=y.memo(H2,(e,t)=>e.className===t.className&&kr(e.node,t.node));Hl.displayName="MarkdownCode";var Ul=y.memo(k2,(e,t)=>e.className===t.className&&kr(e.node,t.node));Ul.displayName="MarkdownImg";var jl=y.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&y.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));jl.displayName="MarkdownParagraph";var U2={ol:ra,li:bl,ul:Tl,hr:xl,strong:kl,a:_l,h1:Al,h2:yl,h3:Cl,h4:Nl,h5:Sl,h6:Il,table:wl,thead:Ll,tbody:Ol,tr:Rl,th:Dl,td:Pl,blockquote:Ml,code:Hl,img:Ul,pre:({children:e})=>y.isValidElement(e)?y.cloneElement(e,{"data-block":"true"}):e,sup:vl,sub:Bl,p:jl,section:Fl},j2=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Fs=[],Hs={allowDangerousHtml:!0},jn=new WeakMap,z2=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 S=jn.get(b);S||(S=b.name,jn.set(b,S)),d+=S}else d+=String(b);d+=":",d+=JSON.stringify(A)}else if(typeof p=="function"){let b=jn.get(p);b||(b=p.name,jn.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()}},Us=new z2,zl=e=>{let t=$2(e),n=e.children||"";return X2(t.runSync(t.parse(n),n),e)},$2=e=>{let t=Us.get(e);if(t)return t;let n=q2(e);return Us.set(e,n),n},Y2=e=>e.some(t=>Array.isArray(t)?t[0]===Jr:t===Jr),q2=e=>{let t=e.rehypePlugins||Fs,n=e.remarkPlugins||Fs,r=Y2(t)?n:[...n,j2],i=e.remarkRehypeOptions?{...Hs,...e.remarkRehypeOptions}:Hs;return pT().use(fb).use(r).use(Qb,i).use(t)},V2=e=>e,W2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},G2=(e,t)=>{var n;for(let r in Mr)if(Object.hasOwn(Mr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Mr[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},X2=(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||V2;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return W2(d,h,a,c.value),h;if(c.type==="element"&&(G2(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 kE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},K2=/\[\^[\w-]{1,200}\](?!:)/,Z2=/\[\^[\w-]{1,200}\]:/,J2=/<\/(\w+)>/,ex=/<(\w+)[\s>]/,tx=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),nx=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},rx=e=>{let t=K2.test(e),n=Z2.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(J2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(ex);if(h){let d=h[1];o.includes(`</${d}>`)||tx.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(nx(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},js,zs,qn={...hn,protocols:{...hn.protocols,href:[...(zs=(js=hn.protocols)==null?void 0:js.href)!=null?zs:[],"tel"]}},fi={raw:Jr,sanitize:[no,qn],harden:[Pc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},ix={gfm:[K1,{}]},$s=Object.values(fi),ax=Object.values(ix),sx={block:" ▋",circle:" ●"},ux={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Fe=y.createContext(ux),$l=y.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(zl,{...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)});$l.displayName="Block";var ox=["github-light","github-dark"],ia=y.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=$s,remarkPlugins:a=ax,className:s,shikiTheme:u=ox,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=$l,parseMarkdownIntoBlocksFn:p=rx,caret:b,plugins:A,remend:S,linkSafety:_={enabled:!0},allowedTags:O,...L})=>{let U=y.useId(),[$,w]=y.useTransition(),q=y.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?aE(e,S):e,[e,t,n,S]),V=y.useMemo(()=>p(q),[q,p]),[Q,N]=y.useState(V);y.useEffect(()=>{t==="streaming"?w(()=>{N(V)}):N(V)},[V,t]);let j=t==="streaming"?Q:V,M=y.useMemo(()=>j.map((te,x)=>`${U}-${x}`),[j.length,U]),B=y.useMemo(()=>d?d===!0?ci():ci(d):null,[d]),z=y.useMemo(()=>{var te,x;return{shikiTheme:(x=(te=A?.code)==null?void 0:te.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:_}},[u,c,h,t,o,_,A?.code]),F=y.useMemo(()=>({...U2,...r}),[r]),K=y.useMemo(()=>{let te=[];return A!=null&&A.cjk&&(te=[...te,...A.cjk.remarkPluginsBefore]),te=[...te,...a],A!=null&&A.cjk&&(te=[...te,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(te=[...te,A.math.remarkPlugin]),te},[a,A?.math,A?.cjk]),oe=y.useMemo(()=>{var te;let x=i;if(O&&Object.keys(O).length>0&&i===$s){let ie={...qn,tagNames:[...(te=qn.tagNames)!=null?te:[],...Object.keys(O)],attributes:{...qn.attributes,...O}};x=[fi.raw,[no,ie],fi.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),B&&h&&(x=[...x,B.rehypePlugin]),x},[i,A?.math,B,h,O]),fe=y.useMemo(()=>b&&h?{"--streamdown-caret":`"${sx[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(hi.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(zl,{components:F,rehypePlugins:oe,remarkPlugins:K,...L,children:e})})})}):g.jsx(hi.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:fe,children:[j.length===0&&b&&h&&g.jsx("span",{}),j.map((te,x)=>g.jsx(f,{components:F,content:te,index:x,rehypePlugins:oe,remarkPlugins:K,shouldParseIncompleteMarkdown:n,...L},M[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);ia.displayName="Streamdown";var lx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=y.useRef(null),c=y.useRef(null),[h,d]=y.useState(s),[f,p]=y.useState({x:0,y:0}),[b,A]=y.useState(!1),[S,_]=y.useState({x:0,y:0}),[O,L]=y.useState({x:0,y:0}),U=y.useCallback(M=>{d(B=>Math.max(n,Math.min(r,B+M)))},[n,r]),$=y.useCallback(()=>{U(i)},[U,i]),w=y.useCallback(()=>{U(-i)},[U,i]),q=y.useCallback(()=>{d(s),p({x:0,y:0})},[s]),V=y.useCallback(M=>{M.preventDefault();let B=M.deltaY>0?-i:i;U(B)},[U,i]),Q=y.useCallback(M=>{if(M.button!==0||M.isPrimary===!1)return;A(!0),_({x:M.clientX,y:M.clientY}),L(f);let B=M.currentTarget;B instanceof HTMLElement&&B.setPointerCapture(M.pointerId)},[f]),N=y.useCallback(M=>{if(!b)return;M.preventDefault();let B=M.clientX-S.x,z=M.clientY-S.y;p({x:O.x+B,y:O.y+z})},[b,S,O]),j=y.useCallback(M=>{A(!1);let B=M.currentTarget;B instanceof HTMLElement&&B.releasePointerCapture(M.pointerId)},[]);return y.useEffect(()=>{let M=o.current;if(M)return M.addEventListener("wheel",V,{passive:!1}),()=>{M.removeEventListener("wheel",V)}},[V]),y.useEffect(()=>{let M=c.current;if(M&&b)return document.body.style.userSelect="none",M.addEventListener("pointermove",N,{passive:!1}),M.addEventListener("pointerup",j),M.addEventListener("pointercancel",j),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",N),M.removeEventListener("pointerup",j),M.removeEventListener("pointercancel",j)}},[b,N,j]),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:$,title:"Zoom in",type:"button",children:g.jsx(g2,{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(E2,{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:q,title:"Reset zoom and pan",type:"button",children:g.jsx(m2,{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})]})},Yl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=y.useState(null),[u,o]=y.useState(!1),[c,h]=y.useState(""),[d,f]=y.useState(""),[p,b]=y.useState(0),{mermaid:A}=y.useContext(Fe),S=na(),_=A?.errorComponent,{shouldRender:O,containerRef:L}=i2({immediate:r});if(y.useEffect(()=>{if(O){if(!S){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let $=S.getMermaid(n),w=e.split("").reduce((Q,N)=>(Q<<5)-Q+N.charCodeAt(0)|0,0),q=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:V}=await $.render(q,e);h(V),f(V)}catch($){if(!(d||c)){let w=$ instanceof Error?$.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,O,S]),!(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 $=()=>b(w=>w+1);return _?g.jsx("div",{ref:L,children:g.jsx(_,{chart:e,error:a,retry:$})}):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(lx,{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"})})})};const cx=({src:e,alt:t,className:n,node:r,...i})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...i,className:eu("max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 active:opacity-90 transition-opacity",n)})}),hx=({children:e,className:t,node:n,...r})=>g.jsx("li",{className:eu("py-0 pl-0 [&>p]:inline",t),...r,children:e}),ql={img:cx,li:hx};function Vl(e){if(e.tool?.status)return e.tool.status;if(e.title?.endsWith("✓"))return"success";if(e.title?.endsWith("✗"))return"failed";if(e.title?.includes("待审批"))return"pending_approval"}function dx(e){return Vl(e)==="success"}function fx(e){const t=Vl(e);return t==="failed"||t==="timed_out"}function px(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function mx(e){return e.type===Ee.Tool&&!!e.children?.length}function gx(e){return e.type!==Ee.Cursor&&!e.children?.length&&e.content.trim()===""}function Wl(e){return!!e.tokenUsage||gx(e)}function Ex(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function bx(e){return e.type===Ee.Cursor||e.type===Ee.User||e.type===Ee.Assistant||px(e)||e.type===Ee.Error?!0:e.type===Ee.Info&&e.tokenUsage?!1:Ex(e)}function Ys(e){return mx(e)||e.type!==Ee.Tool&&e.type!==Ee.Action?!1:!bx(e)}function Tx(e){const t=e.filter(i=>!Wl(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(Ys(i)){const a=[i];let s=r+1;for(;s<t.length;){const u=t[s];if(Ys(u))a.push(u),s++;else break}n.push({kind:"execution-group",logs:a,key:a[0].id}),r=s}else n.push({kind:"single",log:i,key:i.id}),r++}return n}const xx="/api",Gl=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${xx}/attachments/by-path?path=${encodeURIComponent(e)}`:e,Ql=y.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(ia,{urlTransform:Gl,components:ql,children:e})})}));Ql.displayName="UserMessage";const Xl=y.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=y.useState(t),i=y.useRef(null),[a,s]=y.useState(0);y.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=y.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
116
+ `)},R2=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=y.useState(!1),[u,o]=y.useState(!1),c=y.useRef(null),h=y.useRef(0),{isAnimating:d}=y.useContext(Fe),f=async b=>{var A,S;if(typeof window>"u"||!((A=navigator?.clipboard)!=null&&A.write)){r?.(new Error("Clipboard API not available"));return}try{let _=(S=c.current)==null?void 0:S.closest('[data-streamdown="table-wrapper"]'),O=_?.querySelector("table");if(!O){r?.(new Error("Table not found"));return}let L=gl(O),U=b==="csv"?El(L):L2(L),$=new ClipboardItem({"text/plain":new Blob([U],{type:"text/plain"}),"text/html":new Blob([O.outerHTML],{type:"text/html"})});await navigator.clipboard.write([$]),o(!0),s(!1),n?.(b),h.current=window.setTimeout(()=>o(!1),i)}catch(_){r?.(_)}};y.useEffect(()=>{let b=A=>{let S=A.composedPath();c.current&&!S.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b),window.clearTimeout(h.current)}},[]);let p=u?ea:ta;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]})},D2=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=y.useState(!1),s=y.useRef(null),{isAnimating:u}=y.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=gl(f),b=c==="csv"?El(p):O2(p);Mt(`table.${c==="csv"?"csv":"md"}`,b,c==="csv"?"text/csv":"text/markdown"),a(!1),n?.(c)}catch(d){r?.(d)}};return y.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(xr,{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]})},P2=({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(R2,{}),g.jsx(D2,{})]}):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})})]}),M2=y.lazy(()=>Js(()=>import("./code-block-OCS4YCEC-6FHTyCN2.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.CodeBlock}))),v2=y.lazy(()=>Js(()=>Promise.resolve().then(()=>Vx),void 0).then(e=>({default:e.Mermaid}))),B2=/language-([^\s]+)/;function kr(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&&kr(e.node,t.node)}var di=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Un=(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},ra=y.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));ra.displayName="MarkdownOl";var bl=y.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&&kr(e.node,t.node));bl.displayName="MarkdownLi";var Tl=y.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));Tl.displayName="MarkdownUl";var xl=y.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));xl.displayName="MarkdownHr";var kl=y.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));kl.displayName="MarkdownStrong";var F2=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=y.useContext(Fe),[s,u]=y.useState(!1),o=n==="streamdown:incomplete-link",c=y.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=y.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=y.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(y2,{...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})},_l=y.memo(F2,(e,t)=>de(e,t)&&e.href===t.href);_l.displayName="MarkdownA";var Al=y.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));Al.displayName="MarkdownH1";var yl=y.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));yl.displayName="MarkdownH2";var Cl=y.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));Cl.displayName="MarkdownH3";var Nl=y.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));Nl.displayName="MarkdownH4";var Sl=y.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));Sl.displayName="MarkdownH5";var Il=y.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));Il.displayName="MarkdownH6";var wl=y.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=y.useContext(Fe),a=di(i,"table");return g.jsx(P2,{className:t,showControls:a,...r,children:e})},(e,t)=>de(e,t));wl.displayName="MarkdownTable";var Ll=y.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));Ll.displayName="MarkdownThead";var Ol=y.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));Ol.displayName="MarkdownTbody";var Rl=y.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));Rl.displayName="MarkdownTr";var Dl=y.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));Dl.displayName="MarkdownTh";var Pl=y.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));Pl.displayName="MarkdownTd";var Ml=y.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));Ml.displayName="MarkdownBlockquote";var vl=y.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));vl.displayName="MarkdownSup";var Bl=y.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));Bl.displayName="MarkdownSub";var Fl=y.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var u,o;if(!y.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(y.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(y.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(!y.isValidElement(s))return s;if(s.type===ra){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));Fl.displayName="MarkdownSection";var H2=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:u}=y.useContext(Fe),o=na();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(B2),h=(i=c?.at(1))!=null?i:"",d="";if(y.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=di(u,"mermaid"),b=Un(u,"download"),A=Un(u,"copy"),S=Un(u,"fullscreen"),_=Un(u,"panZoom"),O=p&&(b||A||S);return g.jsx(y.Suspense,{fallback:g.jsx(Bs,{}),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(N2,{chart:d,config:s?.config}):null,A?g.jsx(Ms,{code:d}):null,S?g.jsx(w2,{chart:d,config:s?.config}):null]}):null,g.jsx(v2,{chart:d,config:s?.config,showControls:_})]})})}let f=di(u,"code");return g.jsx(y.Suspense,{fallback:g.jsx(Bs,{}),children:g.jsx(M2,{className:W("overflow-x-auto border-border border-t",t),code:d,language:h,children:f?g.jsxs(g.Fragment,{children:[g.jsx(T2,{code:d,language:h}),g.jsx(Ms,{})]}):null})})},Hl=y.memo(H2,(e,t)=>e.className===t.className&&kr(e.node,t.node));Hl.displayName="MarkdownCode";var Ul=y.memo(k2,(e,t)=>e.className===t.className&&kr(e.node,t.node));Ul.displayName="MarkdownImg";var jl=y.memo(({children:e,className:t,node:n,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&y.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));jl.displayName="MarkdownParagraph";var U2={ol:ra,li:bl,ul:Tl,hr:xl,strong:kl,a:_l,h1:Al,h2:yl,h3:Cl,h4:Nl,h5:Sl,h6:Il,table:wl,thead:Ll,tbody:Ol,tr:Rl,th:Dl,td:Pl,blockquote:Ml,code:Hl,img:Ul,pre:({children:e})=>y.isValidElement(e)?y.cloneElement(e,{"data-block":"true"}):e,sup:vl,sub:Bl,p:jl,section:Fl},j2=()=>e=>{st(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Fs=[],Hs={allowDangerousHtml:!0},jn=new WeakMap,z2=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 S=jn.get(b);S||(S=b.name,jn.set(b,S)),d+=S}else d+=String(b);d+=":",d+=JSON.stringify(A)}else if(typeof p=="function"){let b=jn.get(p);b||(b=p.name,jn.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()}},Us=new z2,zl=e=>{let t=$2(e),n=e.children||"";return X2(t.runSync(t.parse(n),n),e)},$2=e=>{let t=Us.get(e);if(t)return t;let n=q2(e);return Us.set(e,n),n},Y2=e=>e.some(t=>Array.isArray(t)?t[0]===Jr:t===Jr),q2=e=>{let t=e.rehypePlugins||Fs,n=e.remarkPlugins||Fs,r=Y2(t)?n:[...n,j2],i=e.remarkRehypeOptions?{...Hs,...e.remarkRehypeOptions}:Hs;return pT().use(fb).use(r).use(Qb,i).use(t)},V2=e=>e,W2=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},G2=(e,t)=>{var n;for(let r in Mr)if(Object.hasOwn(Mr,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Mr[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},X2=(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||V2;st(e,(c,h,d)=>{if(c.type==="raw"&&d&&typeof h=="number")return W2(d,h,a,c.value),h;if(c.type==="element"&&(G2(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 kE(e,{Fragment:g.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0})},K2=/\[\^[\w-]{1,200}\](?!:)/,Z2=/\[\^[\w-]{1,200}\]:/,J2=/<\/(\w+)>/,ex=/<(\w+)[\s>]/,tx=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),nx=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},rx=e=>{let t=K2.test(e),n=Z2.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(J2);if(h){let d=h[1];a.at(-1)===d&&a.pop()}}continue}if(u.type==="html"&&u.block){let h=o.match(ex);if(h){let d=h[1];o.includes(`</${d}>`)||tx.has(d.toLowerCase())||a.push(d)}}if(c>0&&!s){let h=i[c-1];if(nx(h)%2===1){i[c-1]=h+o;continue}}i.push(o),u.type!=="space"&&(s=u.type==="code")}return i},js,zs,qn={...hn,protocols:{...hn.protocols,href:[...(zs=(js=hn.protocols)==null?void 0:js.href)!=null?zs:[],"tel"]}},fi={raw:Jr,sanitize:[no,qn],harden:[Pc,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},ix={gfm:[K1,{}]},$s=Object.values(fi),ax=Object.values(ix),sx={block:" ▋",circle:" ●"},ux={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Fe=y.createContext(ux),$l=y.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>g.jsx(zl,{...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)});$l.displayName="Block";var ox=["github-light","github-dark"],ia=y.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:i=$s,remarkPlugins:a=ax,className:s,shikiTheme:u=ox,mermaid:o,controls:c=!0,isAnimating:h=!1,animated:d,BlockComponent:f=$l,parseMarkdownIntoBlocksFn:p=rx,caret:b,plugins:A,remend:S,linkSafety:_={enabled:!0},allowedTags:O,...L})=>{let U=y.useId(),[$,w]=y.useTransition(),q=y.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?aE(e,S):e,[e,t,n,S]),V=y.useMemo(()=>p(q),[q,p]),[Q,N]=y.useState(V);y.useEffect(()=>{t==="streaming"?w(()=>{N(V)}):N(V)},[V,t]);let j=t==="streaming"?Q:V,M=y.useMemo(()=>j.map((te,x)=>`${U}-${x}`),[j.length,U]),B=y.useMemo(()=>d?d===!0?ci():ci(d):null,[d]),z=y.useMemo(()=>{var te,x;return{shikiTheme:(x=(te=A?.code)==null?void 0:te.getThemes())!=null?x:u,controls:c,isAnimating:h,mode:t,mermaid:o,linkSafety:_}},[u,c,h,t,o,_,A?.code]),F=y.useMemo(()=>({...U2,...r}),[r]),K=y.useMemo(()=>{let te=[];return A!=null&&A.cjk&&(te=[...te,...A.cjk.remarkPluginsBefore]),te=[...te,...a],A!=null&&A.cjk&&(te=[...te,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(te=[...te,A.math.remarkPlugin]),te},[a,A?.math,A?.cjk]),oe=y.useMemo(()=>{var te;let x=i;if(O&&Object.keys(O).length>0&&i===$s){let ie={...qn,tagNames:[...(te=qn.tagNames)!=null?te:[],...Object.keys(O)],attributes:{...qn.attributes,...O}};x=[fi.raw,[no,ie],fi.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),B&&h&&(x=[...x,B.rehypePlugin]),x},[i,A?.math,B,h,O]),fe=y.useMemo(()=>b&&h?{"--streamdown-caret":`"${sx[b]}"`}:void 0,[b,h]);return t==="static"?g.jsx(hi.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(zl,{components:F,rehypePlugins:oe,remarkPlugins:K,...L,children:e})})})}):g.jsx(hi.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:fe,children:[j.length===0&&b&&h&&g.jsx("span",{}),j.map((te,x)=>g.jsx(f,{components:F,content:te,index:x,rehypePlugins:oe,remarkPlugins:K,shouldParseIncompleteMarkdown:n,...L},M[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);ia.displayName="Streamdown";var lx=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:u=!1})=>{let o=y.useRef(null),c=y.useRef(null),[h,d]=y.useState(s),[f,p]=y.useState({x:0,y:0}),[b,A]=y.useState(!1),[S,_]=y.useState({x:0,y:0}),[O,L]=y.useState({x:0,y:0}),U=y.useCallback(M=>{d(B=>Math.max(n,Math.min(r,B+M)))},[n,r]),$=y.useCallback(()=>{U(i)},[U,i]),w=y.useCallback(()=>{U(-i)},[U,i]),q=y.useCallback(()=>{d(s),p({x:0,y:0})},[s]),V=y.useCallback(M=>{M.preventDefault();let B=M.deltaY>0?-i:i;U(B)},[U,i]),Q=y.useCallback(M=>{if(M.button!==0||M.isPrimary===!1)return;A(!0),_({x:M.clientX,y:M.clientY}),L(f);let B=M.currentTarget;B instanceof HTMLElement&&B.setPointerCapture(M.pointerId)},[f]),N=y.useCallback(M=>{if(!b)return;M.preventDefault();let B=M.clientX-S.x,z=M.clientY-S.y;p({x:O.x+B,y:O.y+z})},[b,S,O]),j=y.useCallback(M=>{A(!1);let B=M.currentTarget;B instanceof HTMLElement&&B.releasePointerCapture(M.pointerId)},[]);return y.useEffect(()=>{let M=o.current;if(M)return M.addEventListener("wheel",V,{passive:!1}),()=>{M.removeEventListener("wheel",V)}},[V]),y.useEffect(()=>{let M=c.current;if(M&&b)return document.body.style.userSelect="none",M.addEventListener("pointermove",N,{passive:!1}),M.addEventListener("pointerup",j),M.addEventListener("pointercancel",j),()=>{document.body.style.userSelect="",M.removeEventListener("pointermove",N),M.removeEventListener("pointerup",j),M.removeEventListener("pointercancel",j)}},[b,N,j]),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:$,title:"Zoom in",type:"button",children:g.jsx(g2,{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(E2,{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:q,title:"Reset zoom and pan",type:"button",children:g.jsx(m2,{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})]})},Yl=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=y.useState(null),[u,o]=y.useState(!1),[c,h]=y.useState(""),[d,f]=y.useState(""),[p,b]=y.useState(0),{mermaid:A}=y.useContext(Fe),S=na(),_=A?.errorComponent,{shouldRender:O,containerRef:L}=i2({immediate:r});if(y.useEffect(()=>{if(O){if(!S){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),o(!0);let $=S.getMermaid(n),w=e.split("").reduce((Q,N)=>(Q<<5)-Q+N.charCodeAt(0)|0,0),q=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:V}=await $.render(q,e);h(V),f(V)}catch($){if(!(d||c)){let w=$ instanceof Error?$.message:"Failed to render Mermaid chart";s(w)}}finally{o(!1)}})()}},[e,n,p,O,S]),!(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 $=()=>b(w=>w+1);return _?g.jsx("div",{ref:L,children:g.jsx(_,{chart:e,error:a,retry:$})}):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(lx,{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"})})})};const cx=({src:e,alt:t,className:n,node:r,...i})=>g.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"inline-block",children:g.jsx("img",{src:e,alt:t,...i,className:eu("max-w-[300px] max-h-[200px] object-contain rounded-lg border border-neutral-200 cursor-pointer hover:opacity-90 active:opacity-90 transition-opacity",n)})}),hx=({children:e,className:t,node:n,...r})=>g.jsx("li",{className:eu("py-0 pl-0 [&>p]:inline",t),...r,children:e}),ql={img:cx,li:hx};function Vl(e){if(e.tool?.status)return e.tool.status;if(e.title?.endsWith("✓"))return"success";if(e.title?.endsWith("✗"))return"failed";if(e.title?.includes("待审批"))return"pending_approval"}function dx(e){return Vl(e)==="success"}function fx(e){const t=Vl(e);return t==="failed"||t==="timed_out"}function px(e){return e.title==="Thinking"||e.content.startsWith("Thinking:")}function mx(e){return e.type===Ee.Tool&&!!e.children?.length}function gx(e){return e.type!==Ee.Cursor&&!e.children?.length&&e.content.trim()===""}function Wl(e){return!!e.tokenUsage||gx(e)}function Ex(e){const t=e.tool?.status;return t==="pending_approval"||t==="denied"}function bx(e){return e.type===Ee.Cursor||e.type===Ee.User||e.type===Ee.Assistant||px(e)||e.type===Ee.Error?!0:e.type===Ee.Info&&e.tokenUsage?!1:Ex(e)}function Ys(e){return mx(e)||e.type!==Ee.Tool&&e.type!==Ee.Action?!1:!bx(e)}function Tx(e){const t=e.filter(i=>!Wl(i)),n=[];let r=0;for(;r<t.length;){const i=t[r];if(Ys(i)){const a=[i];let s=r+1;for(;s<t.length;){const u=t[s];if(Ys(u))a.push(u),s++;else break}n.push({kind:"execution-group",logs:a,key:a[0].id}),r=s}else n.push({kind:"single",log:i,key:i.id}),r++}return n}const xx="/api",Gl=e=>e.includes("://")||e.startsWith("/api/")?e:e.startsWith("/")?`${xx}/attachments/by-path?path=${encodeURIComponent(e)}`:e,Ql=y.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(ia,{urlTransform:Gl,components:ql,children:e})})}));Ql.displayName="UserMessage";const Xl=y.memo(({content:e,isOpenDefault:t=!0})=>{const[n,r]=y.useState(t),i=y.useRef(null),[a,s]=y.useState(0);y.useEffect(()=>{i.current&&s(i.current.scrollHeight)},[e,n]);const u=y.useMemo(()=>{const c=e.replace(/^Thinking:\s*/i,"").trim().split(`
117
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(ar,{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()})})})]})});Xl.displayName="ThinkingBlock";const pi=y.memo(({title:e,content:t,type:n})=>{const[r,i]=y.useState(!1);if(n===Ee.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
118
  `)[0]||"",h=c!==e?c:"";return g.jsxs("div",{className:"my-2",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(ki,{size:10}):g.jsx(ar,{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})})]})});pi.displayName="ToolBlock";const mi=y.memo(({logs:e})=>{const{t}=tu(),[n,r]=y.useState(!1),i=e.map(s=>{const u=s.content.split(`
119
119
  `)[0]||"",o=u.match(/([^/\\]+\.[a-zA-Z0-9]+)/);return o?o[1]:u.slice(0,40)}),a=e.length;return g.jsxs("div",{className:"my-2",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(ar,{size:11,strokeWidth:2,className:"text-neutral-400"})}),g.jsx("span",{className:"font-medium text-neutral-500 shrink-0",children:t("工具调用")}),g.jsx("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:a})}),!n&&g.jsxs("span",{className:"truncate text-neutral-300 font-mono",children:[i.slice(0,3).join(", "),e.length>3?" …":""]})]}),n&&g.jsx("div",{className:"ml-5 mt-0.5 mb-1.5",children:e.map(s=>{const u=s.content.split(`