@vtechcom/hexcore 2.0.0-beta.1 → 2.0.0-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 (118) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/README.md +6 -3
  3. package/dist/cli/hexcore.js +113 -0
  4. package/dist/cli/hexcore.js.map +1 -1
  5. package/dist/config.js +1 -1
  6. package/dist/hydra/argv.js +10 -0
  7. package/dist/hydra/argv.js.map +1 -1
  8. package/dist/hydra/capabilities.js +3 -0
  9. package/dist/hydra/capabilities.js.map +1 -1
  10. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts +12 -6
  11. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts.map +1 -1
  12. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js +119 -38
  13. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js.map +1 -1
  14. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js +119 -38
  15. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js.map +1 -1
  16. package/package.json +2 -2
  17. package/web/200.html +20 -18
  18. package/web/404.html +20 -18
  19. package/web/_nuxt/{DgDlQiDU.js → B-lS44p0.js} +1 -1
  20. package/web/_nuxt/{CqsSss-D.js → B1NtJEdQ.js} +1 -1
  21. package/web/_nuxt/B1ZAR7mP.js +1 -0
  22. package/web/_nuxt/BFc_bxHc.js +1 -0
  23. package/web/_nuxt/BGGQYvrr.js +1 -0
  24. package/web/_nuxt/BPQ3VLAy.js +1 -0
  25. package/web/_nuxt/BV_QiRi8.js +1 -0
  26. package/web/_nuxt/BW_3NqYy.js +1 -0
  27. package/web/_nuxt/B_DikKgJ.js +1 -0
  28. package/web/_nuxt/B_Vrwblg.js +1 -0
  29. package/web/_nuxt/Bbbbx_yO.js +1 -0
  30. package/web/_nuxt/BeS-yS0C.js +1 -0
  31. package/web/_nuxt/{Onf26W-r.js → BfFJ09wD.js} +1 -1
  32. package/web/_nuxt/{rhEiP908.js → Bj1gglGt.js} +1 -1
  33. package/web/_nuxt/BkRxDbrA.js +1 -0
  34. package/web/_nuxt/Bmqx7s9K.js +1 -0
  35. package/web/_nuxt/BnZUk6sk.js +1 -0
  36. package/web/_nuxt/BqoV-QnQ.js +3 -0
  37. package/web/_nuxt/Bv47q1hu.js +1 -0
  38. package/web/_nuxt/Bz1eTnxX.js +1 -0
  39. package/web/_nuxt/{CkCrahXt.js → CAfY3dDF.js} +1 -1
  40. package/web/_nuxt/CBchb2Up.js +1 -0
  41. package/web/_nuxt/CEGGvSzA.js +1 -0
  42. package/web/_nuxt/CG6Dc4jp.js +1 -0
  43. package/web/_nuxt/{LGfPBi70.js → CH5xbifj.js} +1 -1
  44. package/web/_nuxt/CZFMOWPc.js +1 -0
  45. package/web/_nuxt/C_n__rkq.js +1 -0
  46. package/web/_nuxt/CaWYVaRD.js +1 -0
  47. package/web/_nuxt/ChS5Np24.js +1 -0
  48. package/web/_nuxt/Cp-IABpG.js +1 -0
  49. package/web/_nuxt/Cuk6v7N8.js +1 -0
  50. package/web/_nuxt/CzTJPvyS.js +1 -0
  51. package/web/_nuxt/D-Stn6KG.js +1 -0
  52. package/web/_nuxt/D7oLnXFd.js +1 -0
  53. package/web/_nuxt/DAHap_t6.js +1 -0
  54. package/web/_nuxt/DBL-cQio.js +1 -0
  55. package/web/_nuxt/DIi866IK.js +7 -0
  56. package/web/_nuxt/DMl_I_aT.js +1 -0
  57. package/web/_nuxt/Dd34_EaM.js +1 -0
  58. package/web/_nuxt/DlAUqK2U.js +1 -0
  59. package/web/_nuxt/DlHvzKYz.js +1 -0
  60. package/web/_nuxt/DmF-LwQa.js +1 -0
  61. package/web/_nuxt/DmPn-vCY.js +1 -0
  62. package/web/_nuxt/DsttYulo.js +1 -0
  63. package/web/_nuxt/{DL9i0ayn.js → DybEwxe5.js} +1 -1
  64. package/web/_nuxt/JXuauuVw.js +41 -0
  65. package/web/_nuxt/Yzrsuije.js +1 -0
  66. package/web/_nuxt/builds/latest.json +1 -1
  67. package/web/_nuxt/builds/meta/5b0a342e-aa78-42e7-89fa-ee280f32f47a.json +1 -0
  68. package/web/_nuxt/dhmyGJu2.js +1 -0
  69. package/web/_nuxt/entry.Q53uGRvC.css +1 -0
  70. package/web/_nuxt/error-404.DL126m4x.css +1 -0
  71. package/web/_nuxt/error-500.BUVIYHmG.css +1 -0
  72. package/web/_nuxt/{YUGC0nt0.js → hza_YA5H.js} +1 -1
  73. package/web/_nuxt/index.D8biniUe.css +1 -0
  74. package/web/_nuxt/vzCX1O3u.js +1 -0
  75. package/web/_nuxt/{CZK6xUH-.js → yhvT770r.js} +1 -1
  76. package/web/heads/index.html +20 -18
  77. package/web/heads/new/index.html +20 -18
  78. package/web/index.html +20 -18
  79. package/web/login/index.html +20 -18
  80. package/web/settings/index.html +20 -18
  81. package/web/setup/index.html +20 -18
  82. package/web/_nuxt/2MxohCD-.js +0 -1
  83. package/web/_nuxt/4pFXjB_u.js +0 -1
  84. package/web/_nuxt/B-v0dEQX.js +0 -1
  85. package/web/_nuxt/B4yE3U25.js +0 -1
  86. package/web/_nuxt/BFh8Ai0L.js +0 -1
  87. package/web/_nuxt/BgPn4NJH.js +0 -1
  88. package/web/_nuxt/Bj1xviSh.js +0 -1
  89. package/web/_nuxt/BnotlrL7.js +0 -1
  90. package/web/_nuxt/C1YRg2ic.js +0 -1
  91. package/web/_nuxt/CGD7MYQH.js +0 -1
  92. package/web/_nuxt/CQcG7Bu4.js +0 -1
  93. package/web/_nuxt/CS3KqpH_.js +0 -1
  94. package/web/_nuxt/CT-yt694.js +0 -1
  95. package/web/_nuxt/CcdyYRYz.js +0 -1
  96. package/web/_nuxt/CePNTU1S.js +0 -1
  97. package/web/_nuxt/CgPLsCeU.js +0 -5
  98. package/web/_nuxt/CnOqDT9k.js +0 -3
  99. package/web/_nuxt/Cr8dL64Q.js +0 -1
  100. package/web/_nuxt/D3CwzwU0.js +0 -1
  101. package/web/_nuxt/DDANn6-H.js +0 -1
  102. package/web/_nuxt/DDl9uKIA.js +0 -1
  103. package/web/_nuxt/DLNoK9BC.js +0 -1
  104. package/web/_nuxt/DLztFeOQ.js +0 -1
  105. package/web/_nuxt/DPihKXdt.js +0 -1
  106. package/web/_nuxt/DXyr6Naa.js +0 -1
  107. package/web/_nuxt/DeDg5p0D.js +0 -1
  108. package/web/_nuxt/DyPI7qJE.js +0 -30
  109. package/web/_nuxt/QZNQe_OX.js +0 -1
  110. package/web/_nuxt/Y8IJM-iz.js +0 -1
  111. package/web/_nuxt/builds/meta/7e461629-93e2-4694-b237-6d5c6a85c97c.json +0 -1
  112. package/web/_nuxt/builds/meta/dev.json +0 -1
  113. package/web/_nuxt/entry.BxsAxZxf.css +0 -1
  114. package/web/_nuxt/error-404.XbtAw-qw.css +0 -1
  115. package/web/_nuxt/error-500.CNHVltWM.css +0 -1
  116. package/web/_nuxt/rS90pPZ_.js +0 -1
  117. package/web/_nuxt/vSj9Ec0g.js +0 -1
  118. package/web/_nuxt/woNjBJMN.js +0 -1
@@ -0,0 +1,41 @@
1
+ import{_ as ao}from"./DsttYulo.js";import{u as lo,P as io,c as Y,r as co,a as ns,_ as an}from"./BV_QiRi8.js";import{c as uo,_ as ho,a as fo,L as po}from"./Bj1gglGt.js";import{_ as ss}from"./B_DikKgJ.js";import{_ as yt}from"./BGGQYvrr.js";import{a as ln,_ as cn}from"./ChS5Np24.js";import{b as os,c as rs,d as as,e as ls,a as is,_ as mo}from"./BFc_bxHc.js";import{e as Se,n as G,v as un,K as dn,o as k,l as D,w,b as m,i as u,I as hn,D as cs,m as B,q as H,L as go,f as Be,c as A,F as ie,y as be,z as me,a as v,t as y,d as P,H as us,A as ot,_ as Ee,E as $e,k as Oe,r as ds,x as yo,M as _o,B as Cn,G as Rn,N as Tn,j as An,O as bo,h as vo,u as So,p as Nn}from"./DIi866IK.js";import{i as ko,m as xo,g as wo,s as Co,R as Wt,_ as fn,e as pn,f as mn,E as Ro,u as gn,h as To,j as Ao,k as No,l as Io,n as Po,a as Lo,b as Eo,c as $o,d as Oo,o as Mo,r as Bo}from"./D-Stn6KG.js";import{P as Uo}from"./BqoV-QnQ.js";import{_ as yn}from"./BW_3NqYy.js";import{_ as Do}from"./DlAUqK2U.js";import{_ as Go}from"./B1NtJEdQ.js";import{_ as jo}from"./CAfY3dDF.js";import{_ as zo}from"./DmPn-vCY.js";import{u as Fo,A as Ho,f as Wo}from"./Bz1eTnxX.js";import{T as hs}from"./CH5xbifj.js";import{p as Vo,b as qo,c as Ko}from"./DAHap_t6.js";import{u as Yo}from"./BnZUk6sk.js";import{u as Jo}from"./B1ZAR7mP.js";var Xo=Se({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const e=t,{forwardRef:n}=lo(),s=ko(),o=H(()=>xo(s.baseId,e.value)),r=H(()=>wo(s.baseId,e.value)),a=H(()=>e.value===s.modelValue.value),i=G(a.value);return un(()=>{s.registerContent(e.value),requestAnimationFrame(()=>{i.value=!1})}),dn(()=>{s.unregisterContent(e.value)}),(l,c)=>(k(),D(u(Uo),{present:l.forceMount||a.value,"force-mount":""},{default:w(({present:d})=>[m(u(io),{id:r.value,ref:u(n),"as-child":l.asChild,as:l.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":u(s).orientation.value,"aria-labelledby":o.value,hidden:!d,tabindex:"0",style:hn({animationDuration:i.value?"0s":void 0})},{default:w(()=>[!u(s).unmountOnHide.value||d?cs(l.$slots,"default",{key:0}):B("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),Qo=Xo;const Zo=Y("ActivityIcon",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const er=Y("BanIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);const tr=Y("CableIcon",[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]]);const nr=Y("CpuIcon",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);const fs=Y("GaugeIcon",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);const sr=Y("GlobeIcon",[["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"}]]);const or=Y("HardDriveIcon",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);const rr=Y("HistoryIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const ar=Y("PackageIcon",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);const lr=Y("PlayIcon",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);const ir=Y("PlugIcon",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);const cr=Y("ScrollTextIcon",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);const ur=Y("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const dr=Y("ServerIcon",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);const hr=Y("SquareTerminalIcon",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);const fr=Y("SquareIcon",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const pr=Y("TerminalIcon",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),ps=Se({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t,n=co(e,"class");return(s,o)=>(k(),D(u(Qo),go({"data-slot":"tabs-content",class:u(ns)("flex-1 outline-none",e.class)},u(n)),{default:w(()=>[cs(s.$slots,"default")]),_:3},16,["class"]))}});function mr(t){const e=[];if(t<=0)return{points:[],edges:[],edgeOpacity:.35};if(t===1)e.push({index:0,x:50,y:50});else if(t===2)e.push({index:0,x:30,y:50},{index:1,x:70,y:50});else for(let r=0;r<t;r++){const a=r/t*2*Math.PI-Math.PI/2;e.push({index:r,x:50+32*Math.cos(a),y:50+30*Math.sin(a)})}const n=[];for(let s=0;s<t;s++)for(let o=s+1;o<t;o++)n.push({from:s,to:o});return{points:e,edges:n,edgeOpacity:t>6?.2:.35}}const gr={class:"relative min-h-80 overflow-hidden bg-muted/40",style:{"background-image":"radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0)","background-size":"22px 22px"}},yr={class:"pointer-events-none absolute inset-0",width:"100%",height:"100%",preserveAspectRatio:"none","aria-hidden":"true"},_r=["x1","y1","x2","y2","stroke","stroke-dasharray","opacity"],br=["aria-pressed","onClick"],vr={class:"block truncate text-xs font-semibold"},Sr={class:"mb-1.5 block font-mono text-[10px] text-muted-foreground tabular"},kr={class:"absolute bottom-3 left-3.5 flex items-center gap-3.5 rounded-md border bg-card/95 px-2.5 py-1.5 text-[11px] text-muted-foreground"},xr={key:0},wr={class:"inline-flex items-center gap-1.5"},Cr={class:"inline-flex items-center gap-1.5"},Rr={class:"opacity-70"},Tr=Se({__name:"TopologyCanvas",props:{head:{},live:{},selectedIndex:{}},emits:["select"],setup(t,{emit:e}){const n=t,s=e,{t:o}=Be(),r=H(()=>mr(n.head.nodes.length));function a(d){return n.live?.find(h=>h.nodeId===d)}function i(d){const h=n.head.nodes[d];return h?a(h.id)?.reachable??!1:!1}function l(d,h){return i(d)&&i(h)}const c=d=>r.value.points.find(h=>h.index===d);return(d,h)=>{const g=yt;return k(),A("div",gr,[(k(),A("svg",yr,[(k(!0),A(ie,null,be(u(r).edges,(f,p)=>(k(),A("line",{key:p,x1:`${c(f.from)?.x}%`,y1:`${c(f.from)?.y}%`,x2:`${c(f.to)?.x}%`,y2:`${c(f.to)?.y}%`,stroke:l(f.from,f.to)?"var(--primary)":"var(--muted-foreground)","stroke-dasharray":l(f.from,f.to)?void 0:"5 4","stroke-width":"2",opacity:l(f.from,f.to)?u(r).edgeOpacity:.4},null,8,_r))),128))])),(k(!0),A(ie,null,be(t.head.nodes,f=>(k(),A("button",{key:f.id,class:me(u(ns)("absolute z-10 w-40 -translate-x-1/2 -translate-y-1/2 rounded-lg border-2 bg-card px-3 py-2.5 text-left shadow-sm outline-none transition-shadow","focus-visible:ring-2 focus-visible:ring-ring",t.selectedIndex===f.index&&"ring-4 ring-ring/25",a(f.id)?.reachable?"border-primary":f.status==="FAILED"?"border-destructive":"border-border")),style:hn({left:`${c(f.index)?.x}%`,top:`${c(f.index)?.y}%`}),"aria-pressed":t.selectedIndex===f.index,onClick:p=>s("select",f.index)},[v("span",vr,y(f.name),1),v("span",Sr," api "+y(f.apiPort)+" · p2p "+y(f.p2pPort),1),a(f.id)?(k(),D(g,{key:0,"hydra-state":a(f.id).hydraState,tone:a(f.id).reachable?void 0:"neutral"},null,8,["hydra-state","tone"])):(k(),D(g,{key:1,status:f.status},null,8,["status"]))],14,br))),128)),v("div",kr,[t.head.nodes.length===1?(k(),A("span",xr,y(u(o)("topology.solo")),1)):(k(),A(ie,{key:1},[v("span",wr,[h[0]||(h[0]=v("span",{class:"inline-block h-0.5 w-4 bg-primary opacity-60"},null,-1)),P(" "+y(u(o)("topology.peerUp")),1)]),v("span",Cr,[h[1]||(h[1]=v("span",{class:"inline-block h-0.5 w-4 bg-muted-foreground opacity-60"},null,-1)),P(" "+y(u(o)("topology.peerDown")),1)]),v("span",Rr,y(u(o)("topology.inferred")),1)],64))])])}}}),ms={history:!1,snapshotUtxo:!0};function Ar(t){const{history:e,snapshotUtxo:n}={...ms,...t.options},s=new URL(t.apiBase||t.pageOrigin,t.pageOrigin),o=s.protocol==="https:"?"wss":"ws",r=new URL(`${o}://${s.hostname}:${t.apiPort}/`);return r.searchParams.set("history",e?"yes":"no"),r.searchParams.set("snapshot-utxo",n?"yes":"no"),r.toString()}function Nr(t){return new URL(t.pageOrigin).protocol==="https:"&&t.url.startsWith("ws://")?{key:"console.httpsAdvice"}:null}const Ir=new Set(["InvalidInput","CommandFailed","PostTxOnChainFailed","TxInvalid","DecommitInvalid","SideLoadSnapshotRejected","RejectedInputBecauseUnsynced","NetworkDisconnected","NetworkVersionMismatch","NetworkClusterIDMismatch","PeerDisconnected","NodeUnsynced","DepositExpired","HeadIsClosed"]),Pr=new Set(["Greetings","HeadIsOpen","TxValid","SnapshotConfirmed","NodeSynced","NetworkConnected","PeerConnected","CommitFinalized","CommitApproved","DecommitFinalized","DecommitApproved","HeadIsFinalized","ReadyToFanout"]);function Lr(t){return t.direction==="out"?"sent":Ir.has(t.tag)?"bad":Pr.has(t.tag)?"good":"neutral"}function Er(t,e,n){try{const s=JSON.parse(t);return{id:e,at:n,direction:"in",tag:typeof s.tag=="string"?s.tag:"Unknown",seq:typeof s.seq=="number"?s.seq:void 0,body:JSON.stringify(s,null,2)}}catch{return{id:e,at:n,direction:"in",tag:"raw",body:t}}}const Vt=[{tag:"Init",label:"Init",description:"Open the head. On v2 this opens it outright — the commit phase is gone (ADR-33).",payload:{tag:"Init"}},{tag:"NewTx",label:"NewTx",description:"Submit a layer-2 transaction. Needs the signed transaction as CBOR hex.",payload:{tag:"NewTx",transaction:{type:"Tx ConwayEra",description:"",cborHex:""}},needsInput:!0},{tag:"Decommit",label:"Decommit",description:"Move a UTxO out of the head and back to layer 1.",payload:{tag:"Decommit",decommitTx:{type:"Tx ConwayEra",description:"",cborHex:""}},needsInput:!0},{tag:"Recover",label:"Recover",description:"Reclaim a deposit that was seen on chain but never made it into a snapshot.",payload:{tag:"Recover",recoverTxId:""},needsInput:!0},{tag:"Contest",label:"Contest",description:"Challenge a closing snapshot that is older than the one this node holds.",payload:{tag:"Contest"}},{tag:"Fanout",label:"Fanout",description:"Distribute the final UTxO set back to layer 1. Only after ReadyToFanout.",payload:{tag:"Fanout"}},{tag:"SafeClose",label:"SafeClose",description:"Close, but refuse if the head holds non-ADA assets. The node replies InvalidInput if it does.",payload:{tag:"SafeClose"},destructive:!0,since:"2.x only"},{tag:"Close",label:"Close",description:"End the head and start the contestation period. There is no undo.",payload:{tag:"Close"},destructive:!0},{tag:"Abort",label:"Abort",description:"Abandon a head that is still initialising. Removed in v2 along with the commit phase.",payload:{tag:"Abort"},destructive:!0,since:"0.22 only"}];function $r(t){try{const e=JSON.parse(t).tag;return Vt.find(n=>n.tag===e&&n.destructive)??null}catch{return null}}function In(t){const e=t.trim();if(!e)return{ok:!1,error:{key:"console.invalid.empty"}};try{const n=JSON.parse(e);return typeof n!="object"||n===null||Array.isArray(n)?{ok:!1,error:{key:"console.invalid.notObject"}}:typeof n.tag!="string"||!n.tag?{ok:!1,error:{key:"console.invalid.noTag"}}:{ok:!0,pretty:JSON.stringify(n)}}catch(n){return{ok:!1,error:{key:"console.invalid.json",params:{error:n.message}}}}}const Or="https://hydrasdk.com";function Mr(t){const e=new URL(t),n=e.searchParams.get("history")==="yes",s=e.searchParams.get("snapshot-utxo")==="no";return`import { HydraBridge } from '@hydra-sdk/bridge';
2
+
3
+ const hydra = new HydraBridge({
4
+ url: '${`${e.protocol}//${e.host}`}',
5
+ // Replay the node's whole event log on connect. Off is usually what you want.
6
+ history: ${n},${s?`
7
+ // Drop the UTxO map from Greetings — it is large on a busy head.
8
+ noSnapshotUtxo: true,`:""}
9
+ });
10
+
11
+ hydra.events.on('onMessage', frame => console.log(frame.tag, frame));
12
+ hydra.events.on('onConnected', () => console.log('connected'));
13
+
14
+ await hydra.connect();
15
+
16
+ // Open the head, then wait for HeadIsOpen.
17
+ hydra.commands.init();
18
+ `}function Br(t){return`const socket = new WebSocket('${t}');
19
+
20
+ socket.onmessage = event => {
21
+ const frame = JSON.parse(event.data);
22
+ console.log(frame.tag, frame);
23
+ };
24
+
25
+ socket.onopen = () => socket.send(JSON.stringify({ tag: 'Init' }));
26
+ `}function Ur(t){const e=t.replace(/^ws/,"http").split("?")[0];return`# The node also answers over HTTP.
27
+ curl ${e}head # protocol state
28
+ curl ${e}snapshot/utxo
29
+ curl ${e}protocol-parameters
30
+ `}function Ce(t){if(t==null||!Number.isFinite(t))return"—";if(t<1024)return`${t} B`;const e=["KB","MB","GB","TB"];let n=t/1024,s=0;for(;n>=1024&&s<e.length-1;)n/=1024,s+=1;return`${n<10?n.toFixed(1):Math.round(n)} ${e[s]}`}function Pn(t){return t==null||!Number.isFinite(t)?"—":`${t.toFixed(1)}%`}const Dr={class:"space-y-3"},Gr={class:"flex items-center justify-between gap-3"},jr={class:"text-sm font-medium"},zr={key:0,class:"grid grid-cols-3 gap-2"},Fr={class:"rounded-md border px-3 py-2"},Hr={class:"block text-[11px] text-muted-foreground"},Wr={class:"font-mono text-sm tabular"},Vr={class:"text-muted-foreground"},qr={class:"rounded-md border px-3 py-2"},Kr={class:"block text-[11px] text-muted-foreground"},Yr={class:"font-mono text-sm tabular"},Jr={class:"rounded-md border px-3 py-2"},Xr={class:"font-mono text-sm tabular"},Qr={key:1,class:"text-xs text-muted-foreground"},Zr={key:2,class:"text-xs text-muted-foreground"},ea={key:4,class:"space-y-2"},ta={class:"flex items-center justify-between gap-2"},na={class:"truncate font-mono text-xs"},sa={class:"mt-2.5 flex items-baseline justify-between gap-2 text-xs"},oa={class:"text-muted-foreground"},ra={class:"font-mono tabular"},aa={class:"text-muted-foreground"},la={class:"mt-1.5 h-1.5 overflow-hidden rounded-full bg-muted"},ia={class:"mt-2.5 flex flex-wrap items-center gap-x-3 gap-y-1 font-mono text-[11px] text-muted-foreground tabular"},ca={key:0,class:"opacity-60"},ua={key:0},da={key:1},ha={key:1,class:"mt-1.5 text-xs text-muted-foreground"},fa={key:5,class:"text-[11px] text-muted-foreground"},Ln=1e4,gs=Se({__name:"NodeResourcePanel",props:{headId:{},selectedNodeId:{},running:{type:Boolean}},setup(t){const e=t,n=us(),{t:s}=Be(),o=G(null),r=G(!1),a=G("");let i=null;async function l(){if(e.running){r.value=!0;try{o.value=await n.get(`/api/heads/${e.headId}/resources`),a.value=""}catch(f){a.value=f instanceof ot?f.message:s("resources.failed")}finally{r.value=!1}}}un(()=>{l(),i=Co(()=>{l()},Ln)}),dn(()=>{i&&clearInterval(i)});function c(f,p){return!f||!p?0:Math.max(1,Math.min(100,f/p*100))}function d(f,p){const C=c(f,p);return C>=90?"bg-destructive":C>=75?"bg-warning":"bg-primary"}const h=H(()=>o.value?.nodes.filter(f=>f.running).length??0),g=H(()=>o.value?.sampledAt.slice(11,19)??"");return(f,p)=>{const C=an,R=ln,b=cn,_=ss,x=yt;return k(),A("div",Dr,[v("div",Gr,[v("h3",jr,y(u(s)("resources.title")),1),t.running?(k(),D(C,{key:0,variant:"outline",size:"icon-sm","aria-label":u(s)("resources.resample"),disabled:u(r),onClick:p[0]||(p[0]=T=>l())},{default:w(()=>[m(u(Wt),{class:me(["size-4",u(r)?"animate-spin":""])},null,8,["class"])]),_:1},8,["aria-label","disabled"])):B("",!0)]),u(o)?(k(),A("div",zr,[v("div",Fr,[v("span",Hr,y(u(s)("resources.running")),1),v("span",Wr,[P(y(u(h)),1),v("span",Vr,"/"+y(u(o).nodes.length),1)])]),v("div",qr,[v("span",Kr,y(u(s)("resources.memory")),1),v("span",Yr,y(u(Ce)(u(o).totalMemoryBytes)),1)]),v("div",Jr,[p[1]||(p[1]=v("span",{class:"block text-[11px] text-muted-foreground"},"CPU",-1)),v("span",Xr,y(u(Pn)(u(o).totalCpuPercent)),1)])])):t.running?(k(),A("p",Qr,y(u(s)("resources.sampling")),1)):(k(),A("p",Zr,y(u(s)("resources.nothing")),1)),u(a)?(k(),D(b,{key:3,variant:"destructive"},{default:w(()=>[m(R,null,{default:w(()=>[P(y(u(a)),1)]),_:1})]),_:1})):B("",!0),!u(o)&&t.running&&u(r)?(k(),A("div",ea,[m(_,{class:"h-14 w-full"}),m(_,{class:"h-14 w-full"})])):B("",!0),(k(!0),A(ie,null,be(u(o)?.nodes??[],T=>(k(),A("div",{key:T.nodeId,class:me(["rounded-md border p-3",T.nodeId===t.selectedNodeId?"border-primary/50 bg-muted/40":""])},[v("div",ta,[v("span",na,y(T.name),1),m(x,{tone:T.running?"success":"neutral",label:T.running?u(s)("resources.nodeRunning"):u(s)("resources.nodeStopped"),plain:""},null,8,["tone","label"])]),T.running?(k(),A(ie,{key:0},[v("div",sa,[v("span",oa,y(u(s)("resources.memory")),1),v("span",ra,[P(y(u(Ce)(T.memoryBytes)),1),v("span",aa," / "+y(u(Ce)(T.memoryLimitBytes)),1)])]),v("div",la,[v("div",{class:me(["h-full rounded-full transition-[width]",d(T.memoryBytes,T.memoryLimitBytes)]),style:hn({width:`${c(T.memoryBytes,T.memoryLimitBytes)}%`})},null,6)]),v("div",ia,[v("span",null,[m(u(nr),{class:"mr-0.5 inline size-3 -translate-y-px"}),P(y(u(Pn)(T.cpuPercent)),1),T.cpuCores?(k(),A("span",ca,"/"+y(T.cpuCores*100)+"%",1)):B("",!0)]),v("span",null,"↓ "+y(u(Ce)(T.netRxBytes))+" · ↑ "+y(u(Ce)(T.netTxBytes)),1),T.blockReadBytes!==null||T.blockWriteBytes!==null?(k(),A("span",ua,[m(u(or),{class:"mr-0.5 inline size-3 -translate-y-px"}),P(y(u(Ce)(T.blockReadBytes))+" · "+y(u(Ce)(T.blockWriteBytes)),1)])):B("",!0),T.pids!==null?(k(),A("span",da,y(u(s)("resources.threads",{count:T.pids})),1)):B("",!0)])],64)):(k(),A("p",ha,y(u(s)("resources.noContainer")),1))],2))),128)),u(o)?(k(),A("p",fa,y(u(s)("resources.sampled",{at:u(g),every:Ln/1e3})),1)):B("",!0)])}}});var F=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function pa(t){return _n(t)}function _n(t){return Array.isArray(t)?ma(t):t instanceof RegExp?t:typeof t=="object"?ga(t):t}function ma(t){let e=[];for(let n=0,s=t.length;n<s;n++)e[n]=_n(t[n]);return e}function ga(t){let e={};for(let n in t)e[n]=_n(t[n]);return e}function ys(t,...e){return e.forEach(n=>{for(let s in n)t[s]=n[s]}),t}function _s(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?_s(t.substring(0,t.length-1)):t.substr(~e+1)}var Ot=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,et=class{static hasCaptures(t){return t===null?!1:(Ot.lastIndex=0,Ot.test(t))}static replaceCaptures(t,e,n){return t.replace(Ot,(s,o,r,a)=>{let i=n[parseInt(o||r,10)];if(i){let l=e.substring(i.start,i.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return s})}};function bs(t,e){return t<e?-1:t>e?1:0}function vs(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,s=e.length;if(n===s){for(let o=0;o<n;o++){let r=bs(t[o],e[o]);if(r!==0)return r}return 0}return n-s}function En(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Ss(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ks=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},lt=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(ba(t),e)}static createFromParsedTheme(t,e){return Sa(t,e)}_cachedMatchRoot=new ks(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,s=this._cachedMatchRoot.get(e).find(o=>ya(t.parent,o.parentScopes));return s?new xs(s.fontStyle,s.foreground,s.background):null}},Mt=class rt{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const s of n)e=new rt(e,s);return e}static from(...e){let n=null;for(let s=0;s<e.length;s++)n=new rt(n,e[s]);return n}push(e){return new rt(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let s=this;for(;s&&s!==e;)n.push(s.scopeName),s=s.parent;return s===e?n.reverse():void 0}};function ya(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let s=e[n],o=!1;if(s===">"){if(n===e.length-1)return!1;s=e[++n],o=!0}for(;t&&!_a(t.scopeName,s);){if(o)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function _a(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var xs=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function ba(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],s=0;for(let o=0,r=e.length;o<r;o++){let a=e[o];if(!a.settings)continue;let i;if(typeof a.scope=="string"){let h=a.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),i=h.split(",")}else Array.isArray(a.scope)?i=a.scope:i=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let h=a.settings.fontStyle.split(" ");for(let g=0,f=h.length;g<f;g++)switch(h[g]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof a.settings.foreground=="string"&&En(a.settings.foreground)&&(c=a.settings.foreground);let d=null;typeof a.settings.background=="string"&&En(a.settings.background)&&(d=a.settings.background);for(let h=0,g=i.length;h<g;h++){let p=i[h].trim().split(" "),C=p[p.length-1],R=null;p.length>1&&(R=p.slice(0,p.length-1),R.reverse()),n[s++]=new va(C,R,o,l,c,d)}}return n}var va=class{constructor(t,e,n,s,o,r){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=s,this.foreground=o,this.background=r}},X=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(X||{});function Sa(t,e){t.sort((l,c)=>{let d=bs(l.scope,c.scope);return d!==0||(d=vs(l.parentScopes,c.parentScopes),d!==0)?d:l.index-c.index});let n=0,s="#000000",o="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(s=l.foreground),l.background!==null&&(o=l.background)}let r=new ka(e),a=new xs(n,r.getId(s),r.getId(o)),i=new wa(new qt(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let d=t[l];i.insert(0,d.scope,d.parentScopes,d.fontStyle,r.getId(d.foreground),r.getId(d.background))}return new lt(r,a,i)}var ka=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xa=Object.freeze([]),qt=class ws{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,s,o,r){this.scopeDepth=e,this.parentScopes=n||xa,this.fontStyle=s,this.foreground=o,this.background=r}clone(){return new ws(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let s=0,o=e.length;s<o;s++)n[s]=e[s].clone();return n}acceptOverwrite(e,n,s,o){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),o!==0&&(this.background=o)}},wa=class Kt{constructor(e,n=[],s={}){this._mainRule=e,this._children=s,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let s=0,o=0;for(;e.parentScopes[s]===">"&&s++,n.parentScopes[o]===">"&&o++,!(s>=e.parentScopes.length||o>=n.parentScopes.length);){const r=n.parentScopes[o].length-e.parentScopes[s].length;if(r!==0)return r;s++,o++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let s=e.indexOf("."),o,r;if(s===-1?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1)),this._children.hasOwnProperty(o))return this._children[o].match(r)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Kt._cmpBySpecificity),n}insert(e,n,s,o,r,a){if(n===""){this._doInsertHere(e,s,o,r,a);return}let i=n.indexOf("."),l,c;i===-1?(l=n,c=""):(l=n.substring(0,i),c=n.substring(i+1));let d;this._children.hasOwnProperty(l)?d=this._children[l]:(d=new Kt(this._mainRule.clone(),qt.cloneArr(this._rulesWithParentScopes)),this._children[l]=d),d.insert(e+1,c,s,o,r,a)}_doInsertHere(e,n,s,o,r){if(n===null){this._mainRule.acceptOverwrite(e,s,o,r);return}for(let a=0,i=this._rulesWithParentScopes.length;a<i;a++){let l=this._rulesWithParentScopes[a];if(vs(l.parentScopes,n)===0){l.acceptOverwrite(e,s,o,r);return}}s===-1&&(s=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),r===0&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new qt(e,n,s,o,r))}},Ae=class le{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=le.getLanguageId(e),s=le.getTokenType(e),o=le.getFontStyle(e),r=le.getForeground(e),a=le.getBackground(e);console.log({languageId:n,tokenType:s,fontStyle:o,foreground:r,background:a})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,s,o,r,a,i){let l=le.getLanguageId(e),c=le.getTokenType(e),d=le.containsBalancedBrackets(e)?1:0,h=le.getFontStyle(e),g=le.getForeground(e),f=le.getBackground(e);return n!==0&&(l=n),s!==8&&(c=s),o!==null&&(d=o?1:0),r!==-1&&(h=r),a!==0&&(g=a),i!==0&&(f=i),(l<<0|c<<8|d<<10|h<<11|g<<15|f<<24)>>>0}};function it(t,e){const n=[],s=Ca(t);let o=s.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=s.next()}let c=a();if(n.push({matcher:c,priority:l}),o!==",")break;o=s.next()}return n;function r(){if(o==="-"){o=s.next();const l=r();return c=>!!l&&!l(c)}if(o==="("){o=s.next();const l=i();return o===")"&&(o=s.next()),l}if($n(o)){const l=[];do l.push(o),o=s.next();while($n(o));return c=>e(l,c)}return null}function a(){const l=[];let c=r();for(;c;)l.push(c),c=r();return d=>l.every(h=>h(d))}function i(){const l=[];let c=a();for(;c&&(l.push(c),o==="|"||o===",");){do o=s.next();while(o==="|"||o===",");c=a()}return d=>l.some(h=>h(d))}}function $n(t){return!!t&&!!t.match(/[\w\.:]+/)}function Ca(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const s=n[0];return n=e.exec(t),s}}}function Cs(t){typeof t.dispose=="function"&&t.dispose()}var We=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Ra=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ta=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Aa=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new We(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Ta;for(const n of t)Na(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof We){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Na(t,e,n,s){const o=n.lookup(t.scopeName);if(!o){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const r=n.lookup(e);t instanceof We?at({baseGrammar:r,selfGrammar:o},s):Yt(t.ruleName,{baseGrammar:r,selfGrammar:o,repository:o.repository},s);const a=n.injections(t.scopeName);if(a)for(const i of a)s.add(new We(i))}function Yt(t,e,n){if(e.repository&&e.repository[t]){const s=e.repository[t];ct([s],e,n)}}function at(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ct(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ct(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ct(t,e,n){for(const s of t){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const o=s.repository?ys({},e.repository,s.repository):e.repository;Array.isArray(s.patterns)&&ct(s.patterns,{...e,repository:o},n);const r=s.include;if(!r)continue;const a=Rs(r);switch(a.kind){case 0:at({...e,selfGrammar:e.baseGrammar},n);break;case 1:at(e,n);break;case 2:Yt(a.ruleName,{...e,repository:o},n);break;case 3:case 4:const i=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(i){const l={baseGrammar:e.baseGrammar,selfGrammar:i,repository:o};a.kind===4?Yt(a.ruleName,l,n):at(l,n)}else a.kind===4?n.add(new Ra(a.scopeName,a.ruleName)):n.add(new We(a.scopeName));break}}}var Ia=class{kind=0},Pa=class{kind=1},La=class{constructor(t){this.ruleName=t}kind=2},Ea=class{constructor(t){this.scopeName=t}kind=3},$a=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Rs(t){if(t==="$base")return new Ia;if(t==="$self")return new Pa;const e=t.indexOf("#");if(e===-1)return new Ea(t);if(e===0)return new La(t.substring(1));{const n=t.substring(0,e),s=t.substring(e+1);return new $a(n,s)}}var Oa=/\\(\d+)/,On=/\\(\d+)/g,Ma=-1,Ts=-2;var Ye=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,s){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=et.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=et.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${_s(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:et.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:et.replaceCaptures(this._contentName,t,e)}},Ba=class extends Ye{retokenizeCapturedWithRuleId;constructor(t,e,n,s,o){super(t,e,n,s),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,s){throw new Error("Not supported!")}},Ua=class extends Ye{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,s,o){super(t,e,n,null),this._match=new Ve(s,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new qe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Mn=class extends Ye{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,o){super(t,e,n,s),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new qe,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jt=class extends Ye{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,s,o,r,a,i,l,c){super(t,e,n,s),this._begin=new Ve(o,this.id),this.beginCaptures=r,this._end=new Ve(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,s)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new qe;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ut=class extends Ye{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,s,o,r,a,i,l){super(t,e,n,s),this._begin=new Ve(o,this.id),this.beginCaptures=r,this.whileCaptures=i,this._while=new Ve(a,Ts),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,s){return this._getCachedCompiledPatterns(t).compileAG(t,n,s)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new qe;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,s){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,s)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new qe,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},As=class J{static createCaptureRule(e,n,s,o,r){return e.registerRule(a=>new Ba(n,a,s,o,r))}static getCompiledRuleId(e,n,s){return e.id||n.registerRule(o=>{if(e.id=o,e.match)return new Ua(e.$vscodeTextmateLocation,e.id,e.name,e.match,J._compileCaptures(e.captures,n,s));if(typeof e.begin>"u"){e.repository&&(s=ys({},s,e.repository));let r=e.patterns;return typeof r>"u"&&e.include&&(r=[{include:e.include}]),new Mn(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,J._compilePatterns(r,n,s))}return e.while?new ut(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,s),e.while,J._compileCaptures(e.whileCaptures||e.captures,n,s),J._compilePatterns(e.patterns,n,s)):new Jt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,J._compileCaptures(e.beginCaptures||e.captures,n,s),e.end,J._compileCaptures(e.endCaptures||e.captures,n,s),e.applyEndPatternLast,J._compilePatterns(e.patterns,n,s))}),e.id}static _compileCaptures(e,n,s){let o=[];if(e){let r=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const i=parseInt(a,10);i>r&&(r=i)}for(let a=0;a<=r;a++)o[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const i=parseInt(a,10);let l=0;e[a].patterns&&(l=J.getCompiledRuleId(e[a],n,s)),o[i]=J.createCaptureRule(n,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,l)}}return o}static _compilePatterns(e,n,s){let o=[];if(e)for(let r=0,a=e.length;r<a;r++){const i=e[r];let l=-1;if(i.include){const c=Rs(i.include);switch(c.kind){case 0:case 1:l=J.getCompiledRuleId(s[i.include],n,s);break;case 2:let d=s[c.ruleName];d&&(l=J.getCompiledRuleId(d,n,s));break;case 3:case 4:const h=c.scopeName,g=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,s);if(f)if(g){let p=f.repository[g];p&&(l=J.getCompiledRuleId(p,n,f.repository))}else l=J.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else l=J.getCompiledRuleId(i,n,s);if(l!==-1){const c=n.getRule(l);let d=!1;if((c instanceof Mn||c instanceof Jt||c instanceof ut)&&c.hasMissingPatterns&&c.patterns.length===0&&(d=!0),d)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(e?e.length:0)!==o.length}}},Ve=class Ns{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const s=e.length;let o=0,r=[],a=!1;for(let i=0;i<s;i++)if(e.charAt(i)==="\\"&&i+1<s){const c=e.charAt(i+1);c==="z"?(r.push(e.substring(o,i)),r.push("$(?!\\n)(?<!\\n)"),o=i+2):(c==="A"||c==="G")&&(a=!0),i++}this.hasAnchor=a,o===0?this.source=e:(r.push(e.substring(o,s)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Oa.test(this.source):this.hasBackReferences=!1}clone(){return new Ns(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(o=>e.substring(o.start,o.end));return On.lastIndex=0,this.source.replace(On,(o,r)=>Ss(s[parseInt(r,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],s=[],o=[],r,a,i,l;for(r=0,a=this.source.length;r<a;r++)i=this.source.charAt(r),e[r]=i,n[r]=i,s[r]=i,o[r]=i,i==="\\"&&r+1<a&&(l=this.source.charAt(r+1),l==="A"?(e[r+1]="￿",n[r+1]="￿",s[r+1]="A",o[r+1]="A"):l==="G"?(e[r+1]="￿",n[r+1]="G",s[r+1]="￿",o[r+1]="G"):(e[r+1]=l,n[r+1]=l,s[r+1]=l,o[r+1]=l),r++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:o.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},qe=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new Bn(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let s=this._items.map(o=>o.resolveAnchors(e,n));return new Bn(t,s,this._items.map(o=>o.ruleId))}},Bn=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
31
+ `)}findNextMatchSync(t,e,n){const s=this.scanner.findNextMatchSync(t,e,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},Bt=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Da=class Xt{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Bt(e,8),this._embeddedLanguagesMatcher=new Ga(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Xt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Bt(0,0);_getBasicScopeAttributes=new ks(e=>{const n=this._scopeToLanguage(e),s=this._toStandardTokenType(e);return new Bt(n,s)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Xt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ga=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,s])=>Ss(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Un=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Is(t,e,n,s,o,r,a,i){const l=e.content.length;let c=!1,d=-1;if(a){const f=ja(t,e,n,s,o,r);o=f.stack,s=f.linePos,n=f.isFirstLine,d=f.anchorPosition}const h=Date.now();for(;!c;){if(i!==0&&Date.now()-h>i)return new Un(o,!0);g()}return new Un(o,!1);function g(){const f=za(t,e,n,s,o,d);if(!f){r.produce(o,l),c=!0;return}const p=f.captureIndices,C=f.matchedRuleId,R=p&&p.length>0?p[0].end>s:!1;if(C===Ma){const b=o.getRule(t);r.produce(o,p[0].start),o=o.withContentNameScopesList(o.nameScopesList),Fe(t,e,n,o,r,b.endCaptures,p),r.produce(o,p[0].end);const _=o;if(o=o.parent,d=_.getAnchorPos(),!R&&_.getEnterPos()===s){o=_,r.produce(o,l),c=!0;return}}else{const b=t.getRule(C);r.produce(o,p[0].start);const _=o,x=b.getName(e.content,p),T=o.contentNameScopesList.pushAttributed(x,t);if(o=o.push(C,s,d,p[0].end===l,null,T,T),b instanceof Jt){const E=b;Fe(t,e,n,o,r,E.beginCaptures,p),r.produce(o,p[0].end),d=p[0].end;const z=E.getContentName(e.content,p),Q=T.pushAttributed(z,t);if(o=o.withContentNameScopesList(Q),E.endHasBackReferences&&(o=o.withEndRule(E.getEndWithResolvedBackReferences(e.content,p))),!R&&_.hasSameRuleAs(o)){o=o.pop(),r.produce(o,l),c=!0;return}}else if(b instanceof ut){const E=b;Fe(t,e,n,o,r,E.beginCaptures,p),r.produce(o,p[0].end),d=p[0].end;const z=E.getContentName(e.content,p),Q=T.pushAttributed(z,t);if(o=o.withContentNameScopesList(Q),E.whileHasBackReferences&&(o=o.withEndRule(E.getWhileWithResolvedBackReferences(e.content,p))),!R&&_.hasSameRuleAs(o)){o=o.pop(),r.produce(o,l),c=!0;return}}else if(Fe(t,e,n,o,r,b.captures,p),r.produce(o,p[0].end),o=o.pop(),!R){o=o.safePop(),r.produce(o,l),c=!0;return}}p[0].end>s&&(s=p[0].end,n=!1)}}function ja(t,e,n,s,o,r){let a=o.beginRuleCapturedEOL?0:-1;const i=[];for(let l=o;l;l=l.pop()){const c=l.getRule(t);c instanceof ut&&i.push({rule:c,stack:l})}for(let l=i.pop();l;l=i.pop()){const{ruleScanner:c,findOptions:d}=Wa(l.rule,t,l.stack.endRule,n,s===a),h=c.findNextMatchSync(e,s,d);if(h){if(h.ruleId!==Ts){o=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(r.produce(l.stack,h.captureIndices[0].start),Fe(t,e,n,l.stack,r,l.rule.whileCaptures,h.captureIndices),r.produce(l.stack,h.captureIndices[0].end),a=h.captureIndices[0].end,h.captureIndices[0].end>s&&(s=h.captureIndices[0].end,n=!1))}else{o=l.stack.pop();break}}return{stack:o,linePos:s,anchorPosition:a,isFirstLine:n}}function za(t,e,n,s,o,r){const a=Fa(t,e,n,s,o,r),i=t.getInjections();if(i.length===0)return a;const l=Ha(i,t,e,n,s,o,r);if(!l)return a;if(!a)return l;const c=a.captureIndices[0].start,d=l.captureIndices[0].start;return d<c||l.priorityMatch&&d===c?l:a}function Fa(t,e,n,s,o,r){const a=o.getRule(t),{ruleScanner:i,findOptions:l}=Ps(a,t,o.endRule,n,s===r),c=i.findNextMatchSync(e,s,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ha(t,e,n,s,o,r,a){let i=Number.MAX_VALUE,l=null,c,d=0;const h=r.contentNameScopesList.getScopeNames();for(let g=0,f=t.length;g<f;g++){const p=t[g];if(!p.matcher(h))continue;const C=e.getRule(p.ruleId),{ruleScanner:R,findOptions:b}=Ps(C,e,null,s,o===a),_=R.findNextMatchSync(n,o,b);if(!_)continue;const x=_.captureIndices[0].start;if(!(x>=i)&&(i=x,l=_.captureIndices,c=_.ruleId,d=p.priority,i===o))break}return l?{priorityMatch:d===-1,captureIndices:l,matchedRuleId:c}:null}function Ps(t,e,n,s,o){return{ruleScanner:t.compileAG(e,n,s,o),findOptions:0}}function Wa(t,e,n,s,o){return{ruleScanner:t.compileWhileAG(e,n,s,o),findOptions:0}}function Fe(t,e,n,s,o,r,a){if(r.length===0)return;const i=e.content,l=Math.min(r.length,a.length),c=[],d=a[0].end;for(let h=0;h<l;h++){const g=r[h];if(g===null)continue;const f=a[h];if(f.length===0)continue;if(f.start>d)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,f.start):o.produce(s,f.start),g.retokenizeCapturedWithRuleId){const C=g.getName(i,a),R=s.contentNameScopesList.pushAttributed(C,t),b=g.getContentName(i,a),_=R.pushAttributed(b,t),x=s.push(g.retokenizeCapturedWithRuleId,f.start,-1,!1,null,R,_),T=t.createOnigString(i.substring(0,f.end));Is(t,T,n&&f.start===0,f.start,x,o,!1,0),Cs(T);continue}const p=g.getName(i,a);if(p!==null){const R=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(p,t);c.push(new Va(R,f.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Va=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function qa(t,e,n,s,o,r,a,i){return new Ya(t,e,n,s,o,r,a,i)}function Dn(t,e,n,s,o){const r=it(e,dt),a=As.getCompiledRuleId(n,s,o.repository);for(const i of r)t.push({debugSelector:e,matcher:i.matcher,ruleId:a,grammar:o,priority:i.priority})}function dt(t,e){if(e.length<t.length)return!1;let n=0;return t.every(s=>{for(let o=n;o<e.length;o++)if(Ka(e[o],s))return n=o+1,!0;return!1})}function Ka(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Ya=class{constructor(t,e,n,s,o,r,a,i){if(this._rootScopeName=t,this.balancedBracketSelectors=r,this._onigLib=i,this._basicScopeAttributesProvider=new Da(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=Gn(e,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const l of Object.keys(o)){const c=it(l,dt);for(const d of c)this._tokenTypeMatchers.push({matcher:d.matcher,type:o[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},e=[],n=this._rootScopeName,s=t.lookup(n);if(s){const o=s.injections;if(o)for(let a in o)Dn(e,a,o[a],this,s);const r=this._grammarRepository.injections(n);r&&r.forEach(a=>{const i=this.getExternalGrammar(a);if(i){const l=i.injectionSelector;l&&Dn(e,l,i,this,i)}})}return e.sort((o,r)=>o.priority-r.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Gn(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const s=this._tokenize(t,e,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(t,e,n=0){const s=this._tokenize(t,e,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(t,e,n,s){this._rootId===-1&&(this._rootId=As.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!e||e===Qt.NULL){o=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),h=Ae.set(0,c.languageId,c.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),g=this.getRule(this._rootId).getName(null,null);let f;g?f=He.createRootAndLookUpScopeName(g,h,this):f=He.createRoot("unknown",h),e=new Qt(null,this._rootId,-1,-1,!1,null,f,f)}else o=!1,e.reset();t=t+`
32
+ `;const r=this.createOnigString(t),a=r.content.length,i=new Xa(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Is(this,r,o,0,e,i,!0,s);return Cs(r),{lineLength:a,lineTokens:i,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Gn(t,e){return t=pa(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var He=class fe{constructor(e,n,s){this.parent=e,this.scopePath=n,this.tokenAttributes=s}static fromExtension(e,n){let s=e,o=e?.scopePath??null;for(const r of n)o=Mt.push(o,r.scopeNames),s=new fe(s,o,r.encodedTokenAttributes);return s}static createRoot(e,n){return new fe(null,new Mt(null,e),n)}static createRootAndLookUpScopeName(e,n,s){const o=s.getMetadataForScope(e),r=new Mt(null,e),a=s.themeProvider.themeMatch(r),i=fe.mergeAttributes(n,o,a);return new fe(null,r,i)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return fe.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,s){let o=-1,r=0,a=0;return s!==null&&(o=s.fontStyle,r=s.foregroundId,a=s.backgroundId),Ae.set(e,n.languageId,n.tokenType,null,o,r,a)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return fe._pushAttributed(this,e,n);const s=e.split(/ /g);let o=this;for(const r of s)o=fe._pushAttributed(o,r,n);return o}static _pushAttributed(e,n,s){const o=s.getMetadataForScope(n),r=e.scopePath.push(n),a=s.themeProvider.themeMatch(r),i=fe.mergeAttributes(e.tokenAttributes,o,a);return new fe(e,r,i)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let s=this;for(;s&&s!==e;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(s.parent?.scopePath??null)}),s=s.parent;return s===e?n.reverse():void 0}},Qt=class Re{constructor(e,n,s,o,r,a,i,l){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=r,this.endRule=a,this.nameScopesList=i,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new Re(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:Re._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?He.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Re._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,s,o,r,a,i){return new Re(this,e,n,s,o,r,a,i)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new Re(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const s=He.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new Re(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,He.fromExtension(s,n.contentNameScopesList))}},Ja=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):it(n,dt).map(s=>s.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>it(n,dt).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Xa=class{constructor(t,e,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let s=t?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const r=t?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(r)&&(s=Ae.set(s,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(r))}if(o&&(s=Ae.set(s,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===s){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(s),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,o=this._binaryTokens.length;s<o;s++)n[s]=this._binaryTokens[s];return n}},Qa=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,s,o){if(!this._grammars.has(t)){let r=this._rawGrammars.get(t);if(!r)return null;this._grammars.set(t,qa(t,r,e,n,s,o,this,this._onigLib))}return this._grammars.get(t)}},Za=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Qa(lt.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(lt.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,s){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(e,n,s){return this._loadGrammar(e,n,s.embeddedLanguages,s.tokenTypes,new Ja(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,s,o,r){const a=new Aa(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(i=>this._loadSingleGrammar(i.scopeName)),a.processQueue();return this._grammarForScopeName(e,n,s,o,r)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(e,n=[],s=0,o=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,s,o)}_grammarForScopeName(e,n=0,s=null,o=null,r=null){return this._syncRegistry.grammarForScopeName(e,n,s,o,r)}},Zt=Qt.NULL;function ht(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},s=typeof t=="string"?t:t.name;for(const[o,r]of Object.entries(e?.colorReplacements||{}))typeof r=="string"?n[o]=r:o===s&&Object.assign(n,r);return n}function ve(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function el(t){return Array.isArray(t)?t:[t]}async function Ls(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function _t(t){return!t||["plaintext","txt","text","plain"].includes(t)}function tl(t){return t==="ansi"||_t(t)}function bt(t){return t==="none"}function nl(t){return bt(t)}const sl=/(\r?\n)/g;function vt(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(sl);let s=0;const o=[];for(let r=0;r<n.length;r+=2){const a=e?n[r]+(n[r+1]||""):n[r];o.push([a,s]),s+=n[r].length,s+=n[r+1]?.length||0}return o}const jn={light:"#333333",dark:"#bbbbbb"},zn={light:"#fffffe",dark:"#1e1e1e"},Fn="__shiki_resolved";function bn(t){if(t?.[Fn])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:s}=e;if(!n||!s){const i=e.settings?e.settings.find(l=>!l.name&&!l.scope):void 0;i?.settings?.foreground&&(s=i.settings.foreground),i?.settings?.background&&(n=i.settings.background),!s&&e?.colors?.["editor.foreground"]&&(s=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),s||(s=e.type==="light"?jn.light:jn.dark),n||(n=e.type==="light"?zn.light:zn.dark),e.fg=s,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let o=0;const r=new Map;function a(i){if(r.has(i))return r.get(i);o+=1;const l=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${l}`]?a(i):(r.set(i,l),l)}e.settings=e.settings.map(i=>{const l=i.settings?.foreground&&!i.settings.foreground.startsWith("#"),c=i.settings?.background&&!i.settings.background.startsWith("#");if(!l&&!c)return i;const d={...i,settings:{...i.settings}};if(l){const h=a(i.settings.foreground);e.colorReplacements[h]=i.settings.foreground,d.settings.foreground=h}if(c){const h=a(i.settings.background);e.colorReplacements[h]=i.settings.background,d.settings.background=h}return d});for(const i of Object.keys(e.colors||{}))if((i==="editor.foreground"||i==="editor.background"||i.startsWith("terminal.ansi"))&&!e.colors[i]?.startsWith("#")){const l=a(e.colors[i]);e.colorReplacements[l]=e.colors[i],e.colors[i]=l}return Object.defineProperty(e,Fn,{enumerable:!1,writable:!1,value:!0}),e}async function Es(t){return[...new Set((await Promise.all(t.filter(e=>!tl(e)).map(async e=>await Ls(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function $s(t){return(await Promise.all(t.map(async e=>nl(e)?null:bn(await Ls(e))))).filter(e=>!!e)}function Os(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new F(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var ol=class extends Za{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,s={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=bn(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=lt.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Os(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(o=>{this._alias[o]=t.name}),this._loadedLanguagesCache=null,e.size)for(const o of e)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const e=[...this._langGraph.entries()],n=e.filter(([s,o])=>!o);if(n.length){const s=e.filter(([o,r])=>r?(r.embeddedLanguages||r.embeddedLangs)?.some(a=>n.map(([i])=>i).includes(a)):!1).filter(o=>!n.includes(o));throw new F(`Missing languages ${n.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of e)this._resolver.addLanguage(o);for(const[s,o]of e)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},rl=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let s=1;s<=e.length;s++){const o=e.slice(0,s).join(".");n=[...n,...this._injections.get(o)||[]]}return n}};let ze=0;function al(t){ze+=1,t.warnings!==!1&&ze>=10&&ze%10===0&&console.warn(`[Shiki] ${ze} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new F("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),s=(t.themes||[]).flat(1).map(bn),o=new ol(new rl(t.engine,n),s,n,t.langAlias);let r;function a(_){return Os(_,t.langAlias)}function i(_){R();const x=o.getGrammar(typeof _=="string"?_:_.name);if(!x)throw new F(`Language \`${_}\` not found, you may need to load it first`);return x}function l(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};R();const x=o.getTheme(_);if(!x)throw new F(`Theme \`${_}\` not found, you may need to load it first`);return x}function c(_){R();const x=l(_);return r!==_&&(o.setTheme(x),r=_),{theme:x,colorMap:o.getColorMap()}}function d(){return R(),o.getLoadedThemes()}function h(){return R(),o.getLoadedLanguages()}function g(..._){R(),o.loadLanguages(_.flat(1))}async function f(..._){return g(await Es(_))}function p(..._){R();for(const x of _.flat(1))o.loadTheme(x)}async function C(..._){return R(),p(await $s(_))}function R(){if(e)throw new F("Shiki instance has been disposed")}function b(){e||(e=!0,o.dispose(),ze-=1)}return{setTheme:c,getTheme:l,getLanguage:i,getLoadedThemes:d,getLoadedLanguages:h,resolveLangAlias:a,loadLanguage:f,loadLanguageSync:g,loadTheme:C,loadThemeSync:p,dispose:b,[Symbol.dispose]:b}}async function ll(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,s]=await Promise.all([$s(t.themes||[]),Es(t.langs||[]),t.engine]);return al({...t,themes:e,langs:n,engine:s})}const Ms=new WeakMap;function St(t,e){Ms.set(t,e)}function Ke(t){return Ms.get(t)}var kt=class Bs{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Bs(Object.fromEntries(el(n).map(s=>[s,Zt])),e)}constructor(...e){if(e.length===2){const[n,s]=e;this.lang=s,this._stacks=n}else{const[n,s,o]=e;this.lang=s,this._stacks={[o]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return il(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function il(t){const e=[],n=new Set;function s(o){if(n.has(o))return;n.add(o);const r=o?.nameScopesList?.scopeName;r&&e.push(r),o.parent&&s(o.parent)}return s(t),e}function cl(t,e){if(!(t instanceof kt))throw new F("Invalid grammar state");return t.getInternalStack(e)}const ul=/,/,dl=/ /;function Us(t,e,n={}){const{theme:s=t.getLoadedThemes()[0]}=n;if(_t(t.resolveLangAlias(n.lang||"text"))||bt(s))return vt(e).map(i=>[{content:i[0],offset:i[1]}]);const{theme:o,colorMap:r}=t.setTheme(s),a=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new F(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(o.name))throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return fl(e,a,o,r,n)}function hl(...t){if(t.length===2)return Ke(t[1]);const[e,n,s={}]=t,{lang:o="text",theme:r=e.getLoadedThemes()[0]}=s;if(_t(o)||bt(r))throw new F("Plain language does not have grammar state");if(o==="ansi")throw new F("ANSI language does not have grammar state");const{theme:a,colorMap:i}=e.setTheme(r),l=e.getLanguage(o);return new kt(vn(n,l,a,i,s).stateStack,l.name,a.name)}function fl(t,e,n,s,o){const r=vn(t,e,n,s,o),a=new kt(r.stateStack,e.name,n.name);return St(r.tokens,a),r.tokens}function vn(t,e,n,s,o){const r=ht(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:i=500,includeExplanation:l=!1}=o,c=vt(t);let d=o.grammarState?cl(o.grammarState,n.name)??Zt:o.grammarContextCode!=null?vn(o.grammarContextCode,e,n,s,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Zt,h=[];const g=[];for(let f=0,p=c.length;f<p;f++){const[C,R]=c[f];if(C===""){h=[],g.push([]);continue}if(a>0&&C.length>=a){h=[],g.push([{content:C,offset:R,color:"",fontStyle:0}]);continue}let b,_,x;l&&l!=="tokenType"&&(b=e.tokenizeLine(C,d,i),_=b.tokens,x=0);const T=e.tokenizeLine2(C,d,i),E=T.tokens.length/2;for(let z=0;z<E;z++){const Q=T.tokens[2*z],Z=z+1<E?T.tokens[2*z+2]:C.length;if(Q===Z)continue;const ce=T.tokens[2*z+1],ge=ve(s[Ae.getForeground(ce)],r),oe=Ae.getFontStyle(ce),de={content:C.substring(Q,Z),offset:R+Q,color:ge,fontStyle:oe};if(l==="tokenType")de.type=Ae.getTokenType(ce);else if(l){const re=[];if(l!=="scopeName")for(const te of n.settings){let ae;switch(typeof te.scope){case"string":ae=te.scope.split(ul).map(ue=>ue.trim());break;case"object":ae=te.scope;break;default:continue}re.push({settings:te,selectors:ae.map(ue=>ue.split(dl))})}de.explanation=[];let ke=0;for(;Q+ke<Z;){const te=_[x],ae=C.substring(te.startIndex,te.endIndex);ke+=ae.length,de.explanation.push({content:ae,scopes:l==="scopeName"?pl(te.scopes):ml(re,te.scopes)}),x+=1}}h.push(de)}g.push(h),h=[],d=T.ruleStack}return{tokens:g,stateStack:d}}function pl(t){return t.map(e=>({scopeName:e}))}function ml(t,e){const n=[];for(let s=0,o=e.length;s<o;s++){const r=e[s];n[s]={scopeName:r,themeMatches:yl(t,r,e.slice(0,s))}}return n}function Hn(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function gl(t,e,n){if(!Hn(t.at(-1),e))return!1;let s=t.length-2,o=n.length-1;for(;s>=0&&o>=0;)Hn(t[s],n[o])&&(s-=1),o-=1;return s===-1}function yl(t,e,n){const s=[];for(const{selectors:o,settings:r}of t)for(const a of o)if(gl(a,e,n)){s.push(r);break}return s}function Ds(t,e,n,s=Us){const o=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),r=o.map(c=>{const d=s(t,e,{...n,theme:c.theme});return{tokens:d,state:Ke(d),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),a=_l(...r.map(c=>c.tokens)),i=a[0].map((c,d)=>c.map((h,g)=>{const f={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=h.explanation),a.forEach((p,C)=>{const{content:R,explanation:b,offset:_,...x}=p[d][g];f.variants[o[C].color]=x}),f})),l=r[0].state?new kt(Object.fromEntries(r.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),r[0].state.lang):void 0;return l&&St(i,l),i}function _l(...t){const e=t.map(()=>[]),n=t.length;for(let s=0;s<t[0].length;s++){const o=t.map(l=>l[s]),r=e.map(()=>[]);e.forEach((l,c)=>l.push(r[c]));const a=o.map(()=>0),i=o.map(l=>l[0]);for(;i.every(l=>l);){const l=Math.min(...i.map(c=>c.content.length));for(let c=0;c<n;c++){const d=i[c];d.content.length===l?(r[c].push(d),a[c]+=1,i[c]=o[c][a[c]]):(r[c].push({...d,content:d.content.slice(0,l)}),i[c]={...d,content:d.content.slice(l),offset:d.offset+l})}}}return e}const bl=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Je{constructor(e,n,s){this.normal=n,this.property=e,s&&(this.space=s)}}Je.prototype.normal={};Je.prototype.property={};Je.prototype.space=void 0;function Gs(t,e){const n={},s={};for(const o of t)Object.assign(n,o.property),Object.assign(s,o.normal);return new Je(n,s,e)}function en(t){return t.toLowerCase()}class ee{constructor(e,n){this.attribute=n,this.property=e}}ee.prototype.attribute="";ee.prototype.booleanish=!1;ee.prototype.boolean=!1;ee.prototype.commaOrSpaceSeparated=!1;ee.prototype.commaSeparated=!1;ee.prototype.defined=!1;ee.prototype.mustUseProperty=!1;ee.prototype.number=!1;ee.prototype.overloadedBoolean=!1;ee.prototype.property="";ee.prototype.spaceSeparated=!1;ee.prototype.space=void 0;let vl=0;const L=Ie(),W=Ie(),tn=Ie(),S=Ie(),j=Ie(),Ne=Ie(),se=Ie();function Ie(){return 2**++vl}const nn=Object.freeze(Object.defineProperty({__proto__:null,boolean:L,booleanish:W,commaOrSpaceSeparated:se,commaSeparated:Ne,number:S,overloadedBoolean:tn,spaceSeparated:j},Symbol.toStringTag,{value:"Module"})),Ut=Object.keys(nn);class Sn extends ee{constructor(e,n,s,o){let r=-1;if(super(e,n),Wn(this,"space",o),typeof s=="number")for(;++r<Ut.length;){const a=Ut[r];Wn(this,Ut[r],(s&nn[a])===nn[a])}}}Sn.prototype.defined=!0;function Wn(t,e,n){n&&(t[e]=n)}function Ue(t){const e={},n={};for(const[s,o]of Object.entries(t.properties)){const r=new Sn(s,t.transform(t.attributes||{},s),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(s)&&(r.mustUseProperty=!0),e[s]=r,n[en(s)]=s,n[en(r.attribute)]=s}return new Je(e,n,t.space)}const js=Ue({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:j,ariaCurrent:null,ariaDescribedBy:j,ariaDetails:null,ariaDisabled:W,ariaDropEffect:j,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:j,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:j,ariaLevel:S,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:j,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:j,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:W,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function zs(t,e){return e in t?t[e]:e}function Fs(t,e){return zs(t,e.toLowerCase())}const Sl=Ue({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ne,acceptCharset:j,accessKey:j,action:null,allow:null,allowFullScreen:L,allowPaymentRequest:L,allowUserMedia:L,alpha:L,alt:null,as:null,async:L,autoCapitalize:null,autoComplete:j,autoFocus:L,autoPlay:L,blocking:j,capture:null,charSet:null,checked:L,cite:null,className:j,closedBy:null,colorSpace:null,cols:S,colSpan:S,command:null,commandFor:null,content:null,contentEditable:W,controls:L,controlsList:j,coords:S|Ne,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L,defer:L,dir:null,dirName:null,disabled:L,download:tn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L,formTarget:null,headers:j,height:S,hidden:tn,high:S,href:null,hrefLang:null,htmlFor:j,httpEquiv:j,id:null,imageSizes:null,imageSrcSet:null,inert:L,inputMode:null,integrity:null,is:null,isMap:L,itemId:null,itemProp:j,itemRef:j,itemScope:L,itemType:j,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:L,muted:L,name:null,nonce:null,noModule:L,noValidate:L,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:L,optimum:S,pattern:null,ping:j,placeholder:null,playsInline:L,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L,referrerPolicy:null,rel:j,required:L,reversed:L,rows:S,rowSpan:S,sandbox:j,scope:null,scoped:L,seamless:L,selected:L,shadowRootClonable:L,shadowRootCustomElementRegistry:L,shadowRootDelegatesFocus:L,shadowRootMode:null,shadowRootSerializable:L,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:L,useMap:null,value:W,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:j,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L,declare:L,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:L,noHref:L,noShade:L,noWrap:L,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:L,disablePictureInPicture:L,disableRemotePlayback:L,exportParts:Ne,part:j,prefix:null,property:null,results:S,security:null,unselectable:null},space:"html",transform:Fs}),kl=Ue({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:se,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:j,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:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:L,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,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:Ne,g2:Ne,glyphName:Ne,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:se,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,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:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:j,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:se,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:se,rev:se,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:se,requiredFeatures:se,requiredFonts:se,requiredFormats:se,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:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:se,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:se,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:se,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zs}),Hs=Ue({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Ws=Ue({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fs}),Vs=Ue({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),xl=/[A-Z]/g,Vn=/-[a-z]/g,wl=/^data[-\w.:]+$/i;function Cl(t,e){const n=en(e);let s=e,o=ee;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wl.test(e)){if(e.charAt(4)==="-"){const r=e.slice(5).replace(Vn,Tl);s="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=e.slice(4);if(!Vn.test(r)){let a=r.replace(xl,Rl);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}o=Sn}return new o(s,e)}function Rl(t){return"-"+t.toLowerCase()}function Tl(t){return t.charAt(1).toUpperCase()}const Al=Gs([js,Sl,Hs,Ws,Vs],"html"),qs=Gs([js,kl,Hs,Ws,Vs],"svg"),qn={}.hasOwnProperty;function Nl(t,e){const n=e||{};function s(o,...r){let a=s.invalid;const i=s.handlers;if(o&&qn.call(o,t)){const l=String(o[t]);a=qn.call(i,l)?i[l]:s.unknown}if(a)return a.call(this,o,...r)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const Il=/["&'<>`]/g,Pl=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ll=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,El=/[|\\{}()[\]^$+*?.]/g,Kn=new WeakMap;function $l(t,e){if(t=t.replace(e.subset?Ol(e.subset):Il,s),e.subset||e.escapeOnly)return t;return t.replace(Pl,n).replace(Ll,s);function n(o,r,a){return e.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(r+2),e)}function s(o,r,a){return e.format(o.charCodeAt(0),a.charCodeAt(r+1),e)}}function Ol(t){let e=Kn.get(t);return e||(e=Ml(t),Kn.set(t,e)),e}function Ml(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(El,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Bl=/[\dA-Fa-f]/;function Ul(t,e,n){const s="&#x"+t.toString(16).toUpperCase();return n&&e&&!Bl.test(String.fromCharCode(e))?s:s+";"}const Dl=/\d/;function Gl(t,e,n){const s="&#"+String(t);return n&&e&&!Dl.test(String.fromCharCode(e))?s:s+";"}const jl=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Dt={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},zl=["cent","copy","divide","gt","lt","not","para","times"],Ks={}.hasOwnProperty,sn={};let tt;for(tt in Dt)Ks.call(Dt,tt)&&(sn[Dt[tt]]=tt);const Fl=/[^\dA-Za-z]/;function Hl(t,e,n,s){const o=String.fromCharCode(t);if(Ks.call(sn,o)){const r=sn[o],a="&"+r;return n&&jl.includes(r)&&!zl.includes(r)&&(!s||e&&e!==61&&Fl.test(String.fromCharCode(e)))?a:a+";"}return""}function Wl(t,e,n){let s=Ul(t,e,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=Hl(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const r=Gl(t,e,n.omitOptionalSemicolons);r.length<s.length&&(s=r)}return o&&(!n.useShortestReferences||o.length<s.length)?o:s}function Me(t,e){return $l(t,Object.assign({format:Wl},e))}const Vl=/^>|^->|<!--|-->|--!>|<!-$/g,ql=[">"],Kl=["<",">"];function Yl(t,e,n,s){return s.settings.bogusComments?"<?"+Me(t.value,Object.assign({},s.settings.characterReferences,{subset:ql}))+">":"<!--"+t.value.replace(Vl,o)+"-->";function o(r){return Me(r,Object.assign({},s.settings.characterReferences,{subset:Kl}))}}function Jl(t,e,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function Yn(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let s=0,o=n.indexOf(e);for(;o!==-1;)s++,o=n.indexOf(e,o+e.length);return s}function Xl(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Ql(t){return t.join(" ").trim()}const Zl=/[ \t\n\f\r]/g;function kn(t){return typeof t=="object"?t.type==="text"?Jn(t.value):!1:Jn(t)}function Jn(t){return t.replace(Zl,"")===""}const q=Js(1),Ys=Js(-1),ei=[];function Js(t){return e;function e(n,s,o){const r=n?n.children:ei;let a=(s||0)+t,i=r[a];if(!o)for(;i&&kn(i);)a+=t,i=r[a];return i}}const ti={}.hasOwnProperty;function Xs(t){return e;function e(n,s,o){return ti.call(t,n.tagName)&&t[n.tagName](n,s,o)}}const xn=Xs({body:si,caption:Gt,colgroup:Gt,dd:li,dt:ai,head:Gt,html:ni,li:ri,optgroup:ii,option:ci,p:oi,rp:Xn,rt:Xn,tbody:di,td:Qn,tfoot:hi,th:Qn,thead:ui,tr:fi});function Gt(t,e,n){const s=q(n,e,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&kn(s.value.charAt(0)))}function ni(t,e,n){const s=q(n,e);return!s||s.type!=="comment"}function si(t,e,n){const s=q(n,e);return!s||s.type!=="comment"}function oi(t,e,n){const s=q(n,e);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ri(t,e,n){const s=q(n,e);return!s||s.type==="element"&&s.tagName==="li"}function ai(t,e,n){const s=q(n,e);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function li(t,e,n){const s=q(n,e);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function Xn(t,e,n){const s=q(n,e);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function ii(t,e,n){const s=q(n,e);return!s||s.type==="element"&&s.tagName==="optgroup"}function ci(t,e,n){const s=q(n,e);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function ui(t,e,n){const s=q(n,e);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function di(t,e,n){const s=q(n,e);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function hi(t,e,n){return!q(n,e)}function fi(t,e,n){const s=q(n,e);return!s||s.type==="element"&&s.tagName==="tr"}function Qn(t,e,n){const s=q(n,e);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const pi=Xs({body:yi,colgroup:_i,head:gi,html:mi,tbody:bi});function mi(t){const e=q(t,-1);return!e||e.type!=="comment"}function gi(t){const e=new Set;for(const s of t.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(e.has(s.tagName))return!1;e.add(s.tagName)}const n=t.children[0];return!n||n.type==="element"}function yi(t){const e=q(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&kn(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function _i(t,e,n){const s=Ys(n,e),o=q(t,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&xn(s,n.children.indexOf(s),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function bi(t,e,n){const s=Ys(n,e),o=q(t,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&xn(s,n.children.indexOf(s),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const nt={name:[[`
33
+ \f\r &/=>`.split(""),`
34
+ \f\r "&'/=>\``.split("")],[`\0
35
+ \f\r "&'/<=>`.split(""),`\0
36
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
37
+ \f\r &>`.split(""),`\0
38
+ \f\r "&'<=>\``.split("")],[`\0
39
+ \f\r "&'<=>\``.split(""),`\0
40
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function vi(t,e,n,s){const o=s.schema,r=o.space==="svg"?!1:s.settings.omitOptionalTags;let a=o.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(t.tagName.toLowerCase());const i=[];let l;o.space==="html"&&t.tagName==="svg"&&(s.schema=qs);const c=Si(s,t.properties),d=s.all(o.space==="html"&&t.tagName==="template"?t.content:t);return s.schema=o,d&&(a=!1),(c||!r||!pi(t,e,n))&&(i.push("<",t.tagName,c?" "+c:""),a&&(o.space==="svg"||s.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!s.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&i.push(" "),i.push("/")),i.push(">")),i.push(d),!a&&(!r||!xn(t,e,n))&&i.push("</"+t.tagName+">"),i.join("")}function Si(t,e){const n=[];let s=-1,o;if(e){for(o in e)if(e[o]!==null&&e[o]!==void 0){const r=ki(t,o,e[o]);r&&n.push(r)}}for(;++s<n.length;){const r=t.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&r!=='"'&&r!=="'"&&(n[s]+=" ")}return n.join("")}function ki(t,e,n){const s=Cl(t.schema,e),o=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,r=t.settings.allowDangerousCharacters?0:1;let a=t.quote,i;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=Me(s.attribute,Object.assign({},t.settings.characterReferences,{subset:nt.name[o][r]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Xl:Ql)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?l:(t.settings.preferUnquoted&&(i=Me(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:nt.unquoted[o][r]}))),i!==n&&(t.settings.quoteSmart&&Yn(n,a)>Yn(n,t.alternative)&&(a=t.alternative),i=a+Me(n,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?nt.single:nt.double)[o][r],attribute:!0}))+a),l+(i&&"="+i))}const xi=["<","&"];function Qs(t,e,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Me(t.value,Object.assign({},s.settings.characterReferences,{subset:xi}))}function wi(t,e,n,s){return s.settings.allowDangerousHtml?t.value:Qs(t,e,n,s)}function Ci(t,e,n,s){return s.all(t)}const Ri=Nl("type",{invalid:Ti,unknown:Ai,handlers:{comment:Yl,doctype:Jl,element:vi,raw:wi,root:Ci,text:Qs}});function Ti(t){throw new Error("Expected node, not `"+t+"`")}function Ai(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ni={},Ii={},Pi=[];function Li(t,e){const n=e||Ni,s=n.quote||'"',o=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Ei,all:$i,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||bl,characterReferences:n.characterReferences||Ii,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?qs:Al,quote:s,alternative:o}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Ei(t,e,n){return Ri(t,e,n,this)}function $i(t){const e=[],n=t&&t.children||Pi;let s=-1;for(;++s<n.length;)e[s]=this.one(n[s],s,t);return e.join("")}const Zn=/\s+/g;function Zs(t,e){if(!e)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(Zn)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(Zn);for(const s of n)s&&!t.properties.class.includes(s)&&t.properties.class.push(s);return t}function Oi(t){const e=vt(t,!0).map(([o])=>o);function n(o){if(o===t.length)return{line:e.length-1,character:e.at(-1).length};let r=o,a=0;for(const i of e){if(r<i.length)break;r-=i.length,a++}return{line:a,character:r}}function s(o,r){let a=0;for(let i=0;i<o;i++)a+=e[i].length;return a+=r,a}return{lines:e,indexToPos:n,posToIndex:s}}const Mi=["color","background-color"];function Bi(t,e){let n=0;const s=[];for(const o of e)o>n&&s.push({...t,content:t.content.slice(n,o),offset:t.offset+n}),n=o;return n<t.content.length&&s.push({...t,content:t.content.slice(n),offset:t.offset+n}),s}function Ui(t,e){let n=0,s=t.length;for(;n<s;){const o=n+(s-n>>1);t[o]<=e?n=o+1:s=o}return n}function Di(t,e){const n=[...e instanceof Set?e:new Set(e)].sort((s,o)=>s-o);return n.length?t.map(s=>s.flatMap(o=>{const r=o.offset+o.content.length,a=Ui(n,o.offset);let i=a;for(;i<n.length&&n[i]<r;)i++;if(a===i)return o;const l=n.slice(a,i);for(let c=0;c<l.length;c++)l[c]-=o.offset;return Bi(o,l)})):t}function Gi(t,e,n,s,o="css-vars"){const r={content:t.content,explanation:t.explanation,offset:t.offset},a=e.map(d=>ft(t.variants[d])),i=new Set(a.flatMap(d=>Object.keys(d))),l={},c=(d,h)=>{const g=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+e[d]+(h==="color"?"":g)};return a.forEach((d,h)=>{for(const g of i){const f=d[g]||"inherit";if(h===0&&s&&Mi.includes(g))if(s==="light-dark()"&&a.length>1){const p=e.findIndex(_=>_==="light"),C=e.findIndex(_=>_==="dark");if(p===-1||C===-1)throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const R=a[p][g]||"inherit",b=a[C][g]||"inherit";l[g]=`light-dark(${R}, ${b})`,o==="css-vars"&&(l[c(h,g)]=f)}else l[g]=f;else o==="css-vars"&&(l[c(h,g)]=f)}}),r.htmlStyle=l,r}function ft(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&X.Italic&&(e["font-style"]="italic"),t.fontStyle&X.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&X.Underline&&n.push("underline"),t.fontStyle&X.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function on(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function ji(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let o=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new F(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...s.indexToPos(a),offset:a}}else{const i=s.lines[a.line];if(i===void 0)throw new F(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${s.lines.length}`);let l=a.character;if(l<0&&(l=i.length+l),l<0||l>i.length)throw new F(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${i.length}`);return{...a,character:l,offset:s.posToIndex(a.line,l)}}};const s=Oi(n.source),r=(n.options.decorations||[]).map(a=>({...a,start:o(a.start),end:o(a.end)}));zi(r),t.set(n.meta,{decorations:r,converter:s,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return Di(n,e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]))},code(n){if(!this.options.decorations?.length)return;const s=e(this),o=[...n.children].filter(d=>d.type==="element"&&d.tagName==="span");if(o.length!==s.converter.lines.length)throw new F(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function r(d,h,g,f){const p=o[d];let C="",R=-1,b=-1;if(h===0&&(R=0),g===0&&(b=0),g===Number.POSITIVE_INFINITY&&(b=p.children.length),R===-1||b===-1)for(let x=0;x<p.children.length;x++)C+=eo(p.children[x]),R===-1&&C.length===h&&(R=x+1),b===-1&&C.length===g&&(b=x+1);if(R===-1)throw new F(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(b===-1)throw new F(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const _=p.children.slice(R,b);if(!f.alwaysWrap&&_.length===p.children.length)i(p,f,"line");else if(!f.alwaysWrap&&_.length===1&&_[0].type==="element")i(_[0],f,"token");else{const x={type:"element",tagName:"span",properties:{},children:_};i(x,f,"wrapper"),p.children.splice(R,_.length,x)}}function a(d,h){o[d]=i(o[d],h,"line")}function i(d,h,g){const f=h.properties||{},p=h.transform||(C=>C);return d.tagName=h.tagName||"span",d.properties={...d.properties,...f,class:d.properties.class},h.properties?.class&&Zs(d,h.properties.class),d=p(d,g)||d,d}const l=[],c=s.decorations.sort((d,h)=>h.start.offset-d.start.offset||d.end.offset-h.end.offset);for(const d of c){const{start:h,end:g}=d;if(h.line===g.line)r(h.line,h.character,g.character,d);else if(h.line<g.line){r(h.line,h.character,Number.POSITIVE_INFINITY,d);for(let f=h.line+1;f<g.line;f++)l.unshift(()=>a(f,d));r(g.line,0,g.character,d)}}l.forEach(d=>d())}}}function zi(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new F(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=e+1;s<t.length;s++){const o=t[s],r=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,i=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,l=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(r||a||i||l){if(r&&a||i&&l||i&&n.start.offset===n.end.offset||a&&o.start.offset===o.end.offset)continue;throw new F(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function eo(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(eo).join(""):""}const Fi=[ji()];function pt(t){const e=Hi(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...Fi]}function Hi(t){const e=[],n=[],s=[];for(const o of t)switch(o.enforce){case"pre":e.push(o);break;case"post":n.push(o);break;default:s.push(o)}return{pre:e,post:n,normal:s}}var Te=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],jt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Wi(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const s=t.indexOf("m",n);if(s!==-1)return{sequence:t.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:t.length}}function es(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function Vi(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)e.push({type:"resetAll"});else if(s<=9)jt[s]&&e.push({type:"setDecoration",value:jt[s]});else if(s<=29){const o=jt[s-20];o&&(e.push({type:"resetDecoration",value:o}),o==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Te[s-30]}});else if(s===38){const o=es(t);o&&e.push({type:"setForegroundColor",value:o})}else if(s===39)e.push({type:"resetForegroundColor"});else if(s<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Te[s-40]}});else if(s===48){const o=es(t);o&&e.push({type:"setBackgroundColor",value:o})}else s===49?e.push({type:"resetBackgroundColor"}):s===53?e.push({type:"setDecoration",value:"overline"}):s===55?e.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Te[s-90+8]}}):s>=100&&s<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Te[s-100+8]}})}return e}function qi(){let t=null,e=null,n=new Set;return{parse(s){const o=[];let r=0;do{const a=Wi(s,r),i=a.sequence?s.substring(r,a.startPosition):s.substring(r);if(i.length>0&&o.push({value:i,foreground:t,background:e,decorations:new Set(n)}),a.sequence){const l=Vi(a.sequence);for(const c of l)c.type==="resetAll"?(t=null,e=null,n.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&n.add(c.value)}r=a.position}while(r<s.length);return o}}}var Ki={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Yi(t=Ki){function e(i){return t[i]}function n(i){return`#${i.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let s;function o(){if(s)return s;s=[];for(let c=0;c<Te.length;c++)s.push(e(Te[c]));let i=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let d=0;d<6;d++)for(let h=0;h<6;h++)s.push(n([i[c],i[d],i[h]]));let l=8;for(let c=0;c<24;c++,l+=10)s.push(n([l,l,l]));return s}function r(i){return o()[i]}function a(i){switch(i.type){case"named":return e(i.name);case"rgb":return n(i.rgb);case"table":return r(i.index)}}return{value:a}}const Ji=/#([0-9a-f]{3,8})/i,Xi=/var\((--[\w-]+-ansi-[\w-]+)\)/,Qi={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Zi(t,e,n){const s=ht(t,n),o=vt(e),r=Yi(Object.fromEntries(Te.map(i=>{const l=`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`;return[i,t.colors?.[l]||Qi[i]]}))),a=qi();return o.map(i=>a.parse(i[0]).map(l=>{let c,d;l.decorations.has("reverse")?(c=l.background?r.value(l.background):t.bg,d=l.foreground?r.value(l.foreground):t.fg):(c=l.foreground?r.value(l.foreground):t.fg,d=l.background?r.value(l.background):void 0),c=ve(c,s),d=ve(d,s),l.decorations.has("dim")&&(c=ec(c));let h=X.None;return l.decorations.has("bold")&&(h|=X.Bold),l.decorations.has("italic")&&(h|=X.Italic),l.decorations.has("underline")&&(h|=X.Underline),l.decorations.has("strikethrough")&&(h|=X.Strikethrough),{content:l.value,offset:i[1],color:c,bgColor:d,fontStyle:h}}))}function ec(t){const e=t.match(Ji);if(e){const s=e[1];if(s.length===8){const o=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${o}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const o=s[0],r=s[1],a=s[2],i=s[3];return`#${o}${o}${r}${r}${a}${a}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0")}`}else if(s.length===3){const o=s[0],r=s[1],a=s[2];return`#${o}${o}${r}${r}${a}${a}80`}}}const n=t.match(Xi);return n?`var(${n[1]}-dim)`:t}function rn(t,e,n={}){const s=t.resolveLangAlias(n.lang||"text"),{theme:o=t.getLoadedThemes()[0]}=n;if(!_t(s)&&!bt(o)&&s==="ansi"){const{theme:r}=t.setTheme(o);return Zi(r,e,n)}return Us(t,e,n)}function mt(t,e,n){let s,o,r,a,i,l;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:d="--shiki-",colorsRendering:h="css-vars"}=n,g=Object.entries(n.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,_)=>b.color===c?-1:_.color===c?1:0);if(g.length===0)throw new F("`themes` option must not be empty");const f=Ds(t,e,n,rn);if(l=Ke(f),c&&c!=="light-dark()"&&!g.some(b=>b.color===c))throw new F(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=g.map(b=>t.getTheme(b.theme)),C=g.map(b=>b.color);r=f.map(b=>b.map(_=>Gi(_,C,d,c,h))),l&&St(r,l);const R=g.map(b=>ht(b.theme,n));o=ts(g,p,R,d,c,"fg",h),s=ts(g,p,R,d,c,"bg",h),a=`shiki-themes ${p.map(b=>b.name).join(" ")}`,i=c?void 0:[o,s].join(";")}else if("theme"in n){const c=ht(n.theme,n);r=rn(t,e,n);const d=t.getTheme(n.theme);s=ve(d.bg,c),o=ve(d.fg,c),a=d.name,l=Ke(r)}else throw new F("Invalid options, either `theme` or `themes` must be provided");return{tokens:r,fg:o,bg:s,themeName:a,rootStyle:i,grammarState:l}}function ts(t,e,n,s,o,r,a){return t.map((i,l)=>{const c=ve(e[l][r],n[l])||"inherit",d=`${s+i.color}${r==="bg"?"-bg":""}:${c}`;if(l===0&&o){if(o==="light-dark()"&&t.length>1){const h=t.findIndex(f=>f.color==="light"),g=t.findIndex(f=>f.color==="dark");if(h===-1||g===-1)throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${ve(e[h][r],n[h])||"inherit"}, ${ve(e[g][r],n[g])||"inherit"});${d}`}return c}return a==="css-vars"?d:null}).filter(i=>!!i).join(";")}const to=/^\s+$/,tc=/^(\s*)(.*?)(\s*)$/;function gt(t,e,n,s={meta:{},options:n,codeToHast:(o,r)=>gt(t,o,r),codeToTokens:(o,r)=>mt(t,o,r)}){let o=e;for(const p of pt(n))o=p.preprocess?.call(s,o,n)||o;let{tokens:r,fg:a,bg:i,themeName:l,rootStyle:c,grammarState:d}=mt(t,o,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:g=!1}=n;h===!0?r=sc(r):h==="never"&&(r=oc(r)),g&&(r=rc(r));const f={...s,get source(){return o}};for(const p of pt(n))r=p.tokens?.call(f,r)||r;return nc(r,{...n,fg:a,bg:i,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},f,d)}function nc(t,e,n,s=Ke(t)){const o=pt(e),r=[],a={type:"root",children:[]},{structure:i="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[C,R]of Object.entries(e.meta||{}))C.startsWith("_")||(c[C]=R);let d={type:"element",tagName:"pre",properties:c,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:r};const g=[],f={...n,structure:i,addClassToHast:Zs,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return a},get pre(){return d},get code(){return h},get lines(){return g}};if(t.forEach((C,R)=>{R&&(i==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):i==="classic"&&r.push({type:"text",value:`
41
+ `}));let b={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const x of C){let T={type:"element",tagName:"span",properties:{...x.htmlAttrs},children:[{type:"text",value:x.content}]};const E=on(x.htmlStyle||ft(x));E&&(T.properties.style=E);for(const z of o)T=z?.span?.call(f,T,R+1,_,b,x)||T;i==="inline"?a.children.push(T):i==="classic"&&b.children.push(T),_+=x.content.length}if(i==="classic"){for(const x of o)b=x?.line?.call(f,b,R+1)||b;g.push(b),r.push(b)}else i==="inline"&&g.push(b)}),i==="classic"){for(const C of o)h=C?.code?.call(f,h)||h;d.children.push(h);for(const C of o)d=C?.pre?.call(f,d)||d;a.children.push(d)}else if(i==="inline"){const C=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of a.children)_.type==="element"&&_.tagName==="br"?(C.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&R.children.push(_);C.push(R);let b={type:"element",tagName:"code",properties:{},children:C};for(const _ of o)b=_?.code?.call(f,b)||b;a.children=[];for(let _=0;_<b.children.length;_++){_>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const x=b.children[_];x.type==="element"&&a.children.push(...x.children)}}let p=a;for(const C of o)p=C?.root?.call(f,p)||p;return s&&St(p,s),p}function sc(t){return t.map(e=>{const n=[];let s="",o;return e.forEach((r,a)=>{const i=!(r.fontStyle&&(r.fontStyle&X.Underline||r.fontStyle&X.Strikethrough));i&&to.test(r.content)&&e[a+1]?(o===void 0&&(o=r.offset),s+=r.content):s?(i?n.push({...r,offset:o,content:s+r.content}):n.push({content:s,offset:o},r),o=void 0,s=""):n.push(r)}),n})}function oc(t){return t.map(e=>e.flatMap(n=>{if(to.test(n.content))return n;const s=n.content.match(tc);if(!s)return n;const[,o,r,a]=s;if(!o&&!a)return n;const i=[{...n,offset:n.offset+o.length,content:r}];return o&&i.unshift({content:o,offset:n.offset}),a&&i.push({content:a,offset:n.offset+o.length+r.length}),i}))}function rc(t){return t.map(e=>{const n=[];for(const s of e){if(n.length===0){n.push({...s});continue}const o=n.at(-1),r=on(o.htmlStyle||ft(o)),a=on(s.htmlStyle||ft(s)),i=o.fontStyle&&(o.fontStyle&X.Underline||o.fontStyle&X.Strikethrough),l=s.fontStyle&&(s.fontStyle&X.Underline||s.fontStyle&X.Strikethrough);!i&&!l&&r===a?o.content+=s.content:n.push({...s})}return n})}const ac=Li;function lc(t,e,n){const s={meta:{},options:n,codeToHast:(r,a)=>gt(t,r,a),codeToTokens:(r,a)=>mt(t,r,a)};let o=ac(gt(t,e,n,s));for(const r of pt(n))o=r.postprocess?.call(s,o,n)||o;return o}async function ic(t){const e=await ll(t);return{getLastGrammarState:(...n)=>hl(e,...n),codeToTokensBase:(n,s)=>rn(e,n,s),codeToTokensWithThemes:(n,s)=>Ds(e,n,s),codeToTokens:(n,s)=>mt(e,n,s),codeToHast:(n,s)=>gt(e,n,s),codeToHtml:(n,s)=>lc(e,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}var wn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function cc(){return 2147483648}function uc(){return typeof performance<"u"?performance.now():Date.now()}const dc=(t,e)=>t+(e-t%e)%e;async function hc(t){let e,n;const s={};function o(f){n=f,s.HEAPU8=new Uint8Array(f),s.HEAPU32=new Uint32Array(f)}function r(f,p,C){s.HEAPU8.copyWithin(f,p,p+C)}function a(f){try{return e.grow(f-n.byteLength+65535>>>16),o(e.buffer),1}catch{}}function i(f){const p=s.HEAPU8.length;f=f>>>0;const C=cc();if(f>C)return!1;for(let R=1;R<=4;R*=2){let b=p*(1+.2/R);b=Math.min(b,f+100663296);const _=Math.min(C,dc(Math.max(f,b),65536));if(a(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(f,p,C=1024){const R=p+C;let b=p;for(;f[b]&&!(b>=R);)++b;if(b-p>16&&f.buffer&&l)return l.decode(f.subarray(p,b));let _="";for(;p<b;){let x=f[p++];if(!(x&128)){_+=String.fromCharCode(x);continue}const T=f[p++]&63;if((x&224)===192){_+=String.fromCharCode((x&31)<<6|T);continue}const E=f[p++]&63;if((x&240)===224?x=(x&15)<<12|T<<6|E:x=(x&7)<<18|T<<12|E<<6|f[p++]&63,x<65536)_+=String.fromCharCode(x);else{const z=x-65536;_+=String.fromCharCode(55296|z>>10,56320|z&1023)}}return _}function d(f,p){return f?c(s.HEAPU8,f,p):""}const h={emscripten_get_now:uc,emscripten_memcpy_big:r,emscripten_resize_heap:i,fd_write:()=>0};async function g(){const p=await t({env:h,wasi_snapshot_preview1:h});e=p.memory,o(e.buffer),Object.assign(s,p),s.UTF8ToString=d}return await g(),s}var fc=Object.defineProperty,pc=(t,e,n)=>e in t?fc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e,n)=>pc(t,typeof e!="symbol"?e+"":e,n);let K=null;function mc(t){throw new wn(t.UTF8ToString(t.getLastOnigError()))}class xt{constructor(e){V(this,"utf16Length"),V(this,"utf8Length"),V(this,"utf16Value"),V(this,"utf8Value"),V(this,"utf16OffsetToUtf8"),V(this,"utf8OffsetToUtf16");const n=e.length,s=xt._utf8ByteLength(e),o=s!==n,r=o?new Uint32Array(n+1):null;o&&(r[n]=s);const a=o?new Uint32Array(s+1):null;o&&(a[s]=n);const i=new Uint8Array(s);let l=0;for(let c=0;c<n;c++){const d=e.charCodeAt(c);let h=d,g=!1;if(d>=55296&&d<=56319&&c+1<n){const f=e.charCodeAt(c+1);f>=56320&&f<=57343&&(h=(d-55296<<10)+65536|f-56320,g=!0)}o&&(r[c]=l,g&&(r[c+1]=l),h<=127?a[l+0]=c:h<=2047?(a[l+0]=c,a[l+1]=c):h<=65535?(a[l+0]=c,a[l+1]=c,a[l+2]=c):(a[l+0]=c,a[l+1]=c,a[l+2]=c,a[l+3]=c)),h<=127?i[l++]=h:h<=2047?(i[l++]=192|(h&1984)>>>6,i[l++]=128|(h&63)>>>0):h<=65535?(i[l++]=224|(h&61440)>>>12,i[l++]=128|(h&4032)>>>6,i[l++]=128|(h&63)>>>0):(i[l++]=240|(h&1835008)>>>18,i[l++]=128|(h&258048)>>>12,i[l++]=128|(h&4032)>>>6,i[l++]=128|(h&63)>>>0),g&&c++}this.utf16Length=n,this.utf8Length=s,this.utf16Value=e,this.utf8Value=i,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let n=0;for(let s=0,o=e.length;s<o;s++){const r=e.charCodeAt(s);let a=r,i=!1;if(r>=55296&&r<=56319&&s+1<o){const l=e.charCodeAt(s+1);l>=56320&&l<=57343&&(a=(r-55296<<10)+65536|l-56320,i=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,i&&s++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const wt=class pe{constructor(e){if(V(this,"id",++pe.LAST_ID),V(this,"_onigBinding"),V(this,"content"),V(this,"utf16Length"),V(this,"utf8Length"),V(this,"utf16OffsetToUtf8"),V(this,"utf8OffsetToUtf16"),V(this,"ptr"),!K)throw new wn("Must invoke loadWasm first.");this._onigBinding=K,this.content=e;const n=new xt(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!pe._sharedPtrInUse?(pe._sharedPtr||(pe._sharedPtr=K.omalloc(1e4)),pe._sharedPtrInUse=!0,K.HEAPU8.set(n.utf8Value,pe._sharedPtr),this.ptr=pe._sharedPtr):this.ptr=n.createString(K)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===pe._sharedPtr?pe._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};V(wt,"LAST_ID",0);V(wt,"_sharedPtr",0);V(wt,"_sharedPtrInUse",!1);let no=wt;class gc{constructor(e){if(V(this,"_onigBinding"),V(this,"_ptr"),!K)throw new wn("Must invoke loadWasm first.");const n=[],s=[];for(let i=0,l=e.length;i<l;i++){const c=new xt(e[i]);n[i]=c.createString(K),s[i]=c.utf8Length}const o=K.omalloc(4*e.length);K.HEAPU32.set(n,o/4);const r=K.omalloc(4*e.length);K.HEAPU32.set(s,r/4);const a=K.createOnigScanner(o,r,e.length);for(let i=0,l=e.length;i<l;i++)K.ofree(n[i]);K.ofree(r),K.ofree(o),a===0&&mc(K),this._onigBinding=K,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,s){let o=0;if(typeof s=="number"&&(o=s),typeof e=="string"){e=new no(e);const r=this._findNextMatchSync(e,n,!1,o);return e.dispose(),r}return this._findNextMatchSync(e,n,!1,o)}_findNextMatchSync(e,n,s,o){const r=this._onigBinding,a=r.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),o);if(a===0)return null;const i=r.HEAPU32;let l=a/4;const c=i[l++],d=i[l++],h=[];for(let g=0;g<d;g++){const f=e.convertUtf8OffsetToUtf16(i[l++]),p=e.convertUtf8OffsetToUtf16(i[l++]);h[g]={start:f,end:p,length:p-f}}return{index:c,captureIndices:h}}}function yc(t){return typeof t.instantiator=="function"}function _c(t){return typeof t.default=="function"}function bc(t){return typeof t.data<"u"}function vc(t){return typeof Response<"u"&&t instanceof Response}function Sc(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let st;function kc(t){if(st)return st;async function e(){K=await hc(async n=>{let s=t;return s=await s,typeof s=="function"&&(s=await s(n)),typeof s=="function"&&(s=await s(n)),yc(s)?s=await s.instantiator(n):_c(s)?s=await s.default(n):(bc(s)&&(s=s.data),vc(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await xc(s)(n):s=await wc(s)(n):Sc(s)?s=await zt(s)(n):s instanceof WebAssembly.Module?s=await zt(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await zt(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return st=e(),st}function zt(t){return e=>WebAssembly.instantiate(t,e)}function xc(t){return e=>WebAssembly.instantiateStreaming(t,e)}function wc(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function Cc(t){return t&&await kc(t),{createScanner(e){return new gc(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new no(e)}}}const Rc={light:"github-light-default",dark:"github-dark-default"};let Ft=null;function Tc(){return Ft||(Ft=ic({themes:[Ee(()=>import("./D7oLnXFd.js"),[],import.meta.url),Ee(()=>import("./Cuk6v7N8.js"),[],import.meta.url)],langs:[Ee(()=>import("./Cp-IABpG.js"),[],import.meta.url),Ee(()=>import("./BPQ3VLAy.js"),[],import.meta.url),Ee(()=>import("./Yzrsuije.js"),[],import.meta.url)],engine:Cc(Ee(()=>import("./CG6Dc4jp.js"),[],import.meta.url))})),Ft}const Ac={class:"group relative"},Nc=["innerHTML"],Ic={key:2,class:"absolute top-2 right-2 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100"},Pc=Se({__name:"CodeBlock",props:{code:{},lang:{default:"json"},copy:{type:Boolean,default:!1},label:{default:"code"},class:{}},setup(t){const e=t,n=G("");async function s(){try{const o=await Tc();n.value=o.codeToHtml(e.code,{lang:e.lang,themes:Rc,defaultColor:!1})}catch{n.value=""}}return $e(()=>[e.code,e.lang],s,{immediate:!0}),(o,r)=>{const a=yn;return k(),A("div",Ac,[u(n)?(k(),A("div",{key:0,class:me(["code-block overflow-auto",e.class]),innerHTML:u(n)},null,10,Nc)):(k(),A("pre",{key:1,class:me(["code-block overflow-auto bg-muted/60 p-3 font-mono text-xs whitespace-pre",e.class])},[v("code",null,y(t.code),1)],2)),t.copy?(k(),A("div",Ic,[m(a,{value:t.code,"icon-only":"",label:t.label},null,8,["value","label"])])):B("",!0)])}}}),so=Do(Pc,[["__scopeId","data-v-537f60e4"]]),Lc={class:"space-y-4"},Ec={class:"text-sm font-medium"},$c={class:"text-xs text-muted-foreground"},Oc={class:"space-y-1.5"},Mc={class:"text-xs font-medium text-muted-foreground"},Bc={key:0,class:"text-xs text-muted-foreground"},Uc={key:1,class:"text-xs text-muted-foreground"},Dc={key:2,class:"text-xs text-muted-foreground"},Gc=["href"],jc={class:"text-xs text-muted-foreground"},zc=Se({__name:"NodeConnectPanel",props:{url:{},nodeName:{}},setup(t){const e=t,{t:n}=Be(),s=G("sdk"),o=H(()=>s.value==="raw"?Br(e.url):s.value==="http"?Ur(e.url):Mr(e.url)),r=H(()=>s.value==="http"?"bash":"typescript");return(a,i)=>{const l=yn,c=mn,d=pn,h=fn,g=so,f=ds("i18n-t"),p=jo;return k(),A("div",Lc,[v("div",null,[v("h3",Ec,y(u(n)("connect.title",{node:t.nodeName})),1),v("p",$c,y(u(n)("connect.intro")),1)]),v("div",Oc,[v("span",Mc,y(u(n)("connect.url")),1),m(l,{value:t.url,label:u(n)("copy.labels.nodeUrl"),class:"w-full"},null,8,["value","label"])]),m(h,{modelValue:u(s),"onUpdate:modelValue":i[0]||(i[0]=C=>Oe(s)?s.value=C:null)},{default:w(()=>[m(d,null,{default:w(()=>[m(c,{value:"sdk"},{default:w(()=>[m(u(ar)),i[1]||(i[1]=P(" hydra-sdk",-1))]),_:1}),m(c,{value:"raw"},{default:w(()=>[m(u(tr)),i[2]||(i[2]=P(" WebSocket",-1))]),_:1}),m(c,{value:"http"},{default:w(()=>[m(u(sr)),i[3]||(i[3]=P(" HTTP",-1))]),_:1})]),_:1})]),_:1},8,["modelValue"]),m(g,{code:u(o),lang:u(r),copy:"",label:u(n)("copy.labels.snippet"),class:"max-h-72 text-xs"},null,8,["code","lang","label"]),u(s)==="sdk"?(k(),A("p",Bc,[m(f,{keypath:"connect.sdkHint",scope:"global"},{install:w(()=>[...i[4]||(i[4]=[v("code",{class:"font-mono"},"pnpm add @hydra-sdk/bridge",-1)])]),_:1})])):u(s)==="raw"?(k(),A("p",Uc,[m(f,{keypath:"connect.rawHint",scope:"global"},{tag:w(()=>[...i[5]||(i[5]=[v("code",{class:"font-mono"},"tag",-1)])]),_:1})])):(k(),A("p",Dc,y(u(n)("connect.httpHint")),1)),m(p),v("a",{href:u(Or),target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1.5 text-sm font-medium text-primary hover:underline"},[P(y(u(n)("connect.docs"))+" ",1),m(u(Ro),{class:"size-3.5"})],8,Gc),v("p",jc,y(u(n)("connect.docsHint")),1)])}}}),Fc=500;function Ht(t,e,n=Fc){return t.push(e),t.length>n&&t.splice(0,t.length-n),t}function Hc(t){const e=t.code;return t.reason?{key:"console.close.byNode",params:{reason:t.reason,code:e}}:t.wasClean?{key:"console.close.clean",params:{code:e}}:e===1006?{key:"console.close.unreachable"}:{key:"console.close.lost",params:{code:e}}}function Wc(){const t=_o(),{t:e}=Be(),n=gn(),s=G("idle"),o=G([]),r=yo({...ms}),a=G(""),i=G(null);let l=null,c=1;const d=H(()=>i.value===null?"":Ar({apiBase:t.public.apiBase,pageOrigin:window.location.origin,apiPort:i.value,options:r})),h=H(()=>a.value.trim()||d.value),g=H(()=>{const x=h.value?Nr({pageOrigin:window.location.origin,url:h.value}):null;return x?n(x):null}),f=H(()=>s.value==="open");function p(x,T="hexcore"){Ht(o.value,{id:c++,at:new Date().toISOString(),direction:"system",tag:T,body:x})}function C(x){x!==void 0&&(i.value=x),R();const T=h.value;if(T){o.value=[],c=1,s.value="connecting",p(e("console.notes.connecting",{url:T}));try{l=new WebSocket(T)}catch(E){s.value="closed",p(e("console.notes.cannotOpen",{url:T,error:E.message}),"error");return}l.onopen=()=>{s.value="open",p(e("console.notes.connected"))},l.onmessage=E=>{Ht(o.value,Er(String(E.data),c++,new Date().toISOString()))},l.onclose=E=>{s.value="closed",p(n(Hc(E)),"error"),l=null},l.onerror=()=>{}}}function R(){if(!l)return;const x=l;l=null,x.onopen=x.onmessage=x.onclose=x.onerror=null,x.close(),s.value="idle"}function b(x){if(!l||s.value!=="open")return!1;l.send(x);let T="command";try{const E=JSON.parse(x);typeof E.tag=="string"&&(T=E.tag)}catch{}return Ht(o.value,{id:c++,at:new Date().toISOString(),direction:"out",tag:T,body:x}),!0}function _(){o.value=[]}return dn(R),{status:s,connected:f,frames:o,options:r,url:h,urlOverride:a,derivedUrl:d,advice:g,connect:C,disconnect:R,send:b,clear:_}}const Vc={class:"font-mono"},qc={class:"flex flex-wrap items-center gap-2 px-5 pb-2.5"},Kc=["title"],Yc=["title"],Jc={class:"ml-auto flex items-center gap-1.5"},Xc={key:0,class:"px-5 py-3 text-muted-foreground"},Qc=["onClick"],Zc={class:"shrink-0 text-muted-foreground/60 tabular"},eu={class:"w-3 shrink-0 text-muted-foreground/70"},tu={key:0,class:"min-w-0 truncate text-muted-foreground"},nu={class:"space-y-2 px-5 py-3"},su={class:"flex items-center gap-2"},ou={key:0,class:"text-muted-foreground"},ru={class:"min-w-0 flex-1 truncate text-xs text-muted-foreground"},au={class:"flex items-center gap-2"},lu={key:0,class:"ml-auto flex items-center gap-1.5 text-xs text-destructive"},iu=Se({__name:"NodeConsoleSheet",props:{node:{},headId:{},headName:{},headRunning:{type:Boolean}},emits:["close"],setup(t,{emit:e}){const n=t,s=e,{status:o,connected:r,frames:a,options:i,url:l,advice:c,connect:d,disconnect:h,send:g,clear:f}=Wc(),{t:p,locale:C}=Be(),R=gn(),b=Fo(),_={"0.22 only":"console.since.v022","2.x only":"console.since.v2"},x=H(()=>n.node!==null),T=G("console"),E=G(""),z=G(""),Q=G(""),Z=G(null),ce=G(null),ge=G(!0),oe=G(new Set),de=H(()=>{const U=Q.value.trim().toLowerCase();return U?a.value.filter(I=>I.tag.toLowerCase().includes(U)||(I.body??"").toLowerCase().includes(U)):a.value}),re={idle:"neutral",connecting:"warning",open:"success",closed:"danger"},ke={good:"text-success-soft-foreground",bad:"text-destructive",sent:"text-info-soft-foreground",neutral:"text-foreground"};$e(()=>n.node?.id,()=>{n.node&&n.headRunning?d(n.node.apiPort):h(),T.value="console",E.value="",z.value="",oe.value=new Set},{immediate:!0}),$e(()=>[i.history,i.snapshotUtxo],()=>{(o.value==="open"||o.value==="connecting")&&d()}),$e(()=>a.value.length,async()=>{ge.value&&(await bo(),ce.value&&(ce.value.scrollTop=ce.value.scrollHeight))});function te(){const U=ce.value;U&&(ge.value=U.scrollHeight-U.scrollTop-U.clientHeight<40)}function ae(U){const I=Vt.find(xe=>xe.tag===U);I&&(E.value=JSON.stringify(I.payload,null,2),z.value="")}function ue(){const U=In(E.value);if(!U.ok){z.value=R(U.error);return}z.value="";const I=$r(U.pretty);if(I){Z.value=I;return}$(U.pretty)}function De(){Z.value=null;const U=In(E.value);U.ok&&$(U.pretty)}function $(U){if(!g(U)){z.value=p("console.notConnected");return}ge.value=!0}function N(U){const I=new Set(oe.value);I.delete(U)||I.add(U),oe.value=I}function _e(U){return U.slice(11,23)}function ne(U){if(!U)return"";const I=U.replace(/\s+/g," ").trim();return I.length>120?`${I.slice(0,120)}…`:I}return(U,I)=>{const xe=yt,he=Io,Xe=Po,Qe=No,Pe=mn,Ct=pn,we=ln,Ze=cn,ye=an,Rt=uo,Le=so,Tt=rs,At=os,Nt=ls,Ge=as,It=is,Pt=Go,je=ps,Lt=gs,Et=zc,$t=fn,M=Ao,oo=To,ro=zo;return k(),A(ie,null,[m(oo,{open:u(x),"onUpdate:open":I[10]||(I[10]=O=>!O&&s("close"))},{default:w(()=>[m(M,{class:"sm:max-w-3xl"},{default:w(()=>[m(Qe,null,{default:w(()=>[m(he,{class:"flex items-center gap-2.5"},{default:w(()=>[v("span",Vc,y(t.node?.name??"node"),1),m(xe,{tone:re[u(o)],label:u(p)(`console.status.${u(o)}`),plain:""},null,8,["tone","label"])]),_:1}),m(Xe,null,{default:w(()=>[P(y(u(p)("console.subtitle",{index:t.node?.index,head:t.headName,port:t.node?.apiPort})),1)]),_:1})]),_:1}),m($t,{modelValue:u(T),"onUpdate:modelValue":I[9]||(I[9]=O=>Oe(T)?T.value=O:null),class:"flex min-h-0 flex-1 flex-col gap-0"},{default:w(()=>[m(Ct,{class:"mx-5 mt-3 mb-3 self-start"},{default:w(()=>[m(Pe,{value:"console"},{default:w(()=>[m(u(pr)),P(" "+y(u(p)("detail.console")),1)]),_:1}),m(Pe,{value:"resources"},{default:w(()=>[m(u(fs)),P(" "+y(u(p)("detail.tabs.resources")),1)]),_:1}),m(Pe,{value:"connect"},{default:w(()=>[m(u(ir)),P(" "+y(u(p)("console.connectTab")),1)]),_:1})]),_:1}),m(je,{value:"console",class:"mt-0 flex min-h-0 flex-1 flex-col"},{default:w(()=>[t.headRunning?u(c)?(k(),D(Ze,{key:1,variant:"destructive",class:"mx-5 mb-3 w-auto"},{default:w(()=>[m(we,null,{default:w(()=>[P(y(u(c)),1)]),_:1})]),_:1})):B("",!0):(k(),D(Ze,{key:0,class:"mx-5 mb-3 w-auto"},{default:w(()=>[m(we,null,{default:w(()=>[P(y(u(p)("console.notRunning")),1)]),_:1})]),_:1})),v("div",qc,[u(r)?(k(),D(ye,{key:0,variant:"outline",size:"sm",onClick:I[0]||(I[0]=O=>u(h)())},{default:w(()=>[m(u(fr),{class:"size-3.5"}),P(" "+y(u(p)("console.disconnect")),1)]),_:1})):(k(),D(ye,{key:1,size:"sm",disabled:!t.headRunning||!t.node,onClick:I[1]||(I[1]=O=>t.node&&u(d)(t.node.apiPort))},{default:w(()=>[m(u(lr),{class:"size-3.5"}),P(" "+y(u(p)("console.connect")),1)]),_:1},8,["disabled"])),m(Rt,{modelValue:u(Q),"onUpdate:modelValue":I[2]||(I[2]=O=>Oe(Q)?Q.value=O:null),placeholder:u(p)("console.filter"),class:"h-8 w-44 text-xs"},null,8,["modelValue","placeholder"]),v("label",{class:"flex items-center gap-1.5 text-xs text-muted-foreground",title:u(p)("console.historyHint")},[Cn(v("input",{"onUpdate:modelValue":I[3]||(I[3]=O=>u(i).history=O),type:"checkbox",class:"size-3.5 accent-primary"},null,512),[[Rn,u(i).history]]),I[12]||(I[12]=P(" history ",-1))],8,Kc),v("label",{class:"flex items-center gap-1.5 text-xs text-muted-foreground",title:u(p)("console.snapshotUtxoHint")},[Cn(v("input",{"onUpdate:modelValue":I[4]||(I[4]=O=>u(i).snapshotUtxo=O),type:"checkbox",class:"size-3.5 accent-primary"},null,512),[[Rn,u(i).snapshotUtxo]]),I[13]||(I[13]=P(" snapshot-utxo ",-1))],8,Yc),v("div",Jc,[u(ge)?B("",!0):(k(),D(ye,{key:0,variant:"ghost",size:"sm",class:"h-7 text-xs",onClick:I[5]||(I[5]=O=>ge.value=!0)},{default:w(()=>[P(y(u(p)("common.follow")),1)]),_:1})),m(ye,{variant:"ghost",size:"icon-sm","aria-label":u(p)("console.clear"),disabled:u(a).length===0,onClick:I[6]||(I[6]=O=>u(f)())},{default:w(()=>[m(u(hs),{class:"size-3.5"})]),_:1},8,["aria-label","disabled"])])]),v("div",{ref_key:"pane",ref:ce,class:"min-h-0 flex-1 overflow-auto border-y bg-muted/30 py-1 font-mono text-xs",onScroll:te},[u(de).length===0?(k(),A("p",Xc,y(u(a).length?u(p)("console.noMatch"):u(p)("console.nothingYet")),1)):B("",!0),(k(!0),A(ie,null,be(u(de),O=>(k(),A("div",{key:O.id},[v("button",{type:"button",class:"flex w-full items-baseline gap-2 px-5 py-1 text-left hover:bg-muted/60",onClick:Zu=>N(O.id)},[v("span",Zc,y(_e(O.at)),1),v("span",eu,y(O.direction==="out"?"↑":O.direction==="system"?"·":"↓"),1),v("span",{class:me(["shrink-0 font-semibold",ke[u(Lr)(O)]])},y(O.tag),3),u(oe).has(O.id)?B("",!0):(k(),A("span",tu,y(ne(O.body)),1))],8,Qc),u(oe).has(O.id)&&O.body?(k(),D(Le,{key:0,code:O.body,lang:"json",copy:"",label:u(p)("copy.labels.frame"),class:"mx-5 my-1 max-h-80"},null,8,["code","label"])):B("",!0)]))),128))],544),v("div",nu,[v("div",su,[(k(),D(It,{key:u(C),"onUpdate:modelValue":I[7]||(I[7]=O=>ae(String(O)))},{default:w(()=>[m(At,{size:"sm",class:"w-44","aria-label":u(p)("console.templateLabel")},{default:w(()=>[m(Tt,{placeholder:u(p)("console.templatePlaceholder")},null,8,["placeholder"])]),_:1},8,["aria-label"]),m(Ge,null,{default:w(()=>[(k(!0),A(ie,null,be(u(Vt),O=>(k(),D(Nt,{key:O.tag,value:O.tag},{default:w(()=>[P(y(O.label),1),O.since?(k(),A("span",ou," · "+y(u(p)(_[O.since])),1)):B("",!0)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})),v("p",ru,y(u(p)("console.templateHint")),1)]),m(Pt,{modelValue:u(E),"onUpdate:modelValue":I[8]||(I[8]=O=>Oe(E)?E.value=O:null),rows:"3",spellcheck:"false",placeholder:'{ "tag": "Init" }',class:"min-h-20 font-mono text-xs",onKeydown:[Tn(An(ue,["meta","prevent"]),["enter"]),Tn(An(ue,["ctrl","prevent"]),["enter"])]},null,8,["modelValue","onKeydown"]),v("div",au,[m(ye,{size:"sm",disabled:!u(r)||!u(E).trim(),onClick:ue},{default:w(()=>[m(u(ur),{class:"size-3.5"}),P(" "+y(u(p)("console.send")),1)]),_:1},8,["disabled"]),I[14]||(I[14]=v("span",{class:"text-[11px] text-muted-foreground"},"⌘/Ctrl + Enter",-1)),u(z)?(k(),A("p",lu,[m(u(er),{class:"size-3.5 shrink-0"}),P(y(u(z)),1)])):B("",!0)])])]),_:1}),m(je,{value:"resources",class:"mt-0 min-h-0 flex-1 overflow-auto px-5 pb-5"},{default:w(()=>[u(T)==="resources"?(k(),D(Lt,{key:0,"head-id":t.headId,"selected-node-id":t.node?.id,running:t.headRunning},null,8,["head-id","selected-node-id","running"])):B("",!0)]),_:1}),m(je,{value:"connect",class:"mt-0 min-h-0 flex-1 overflow-auto px-5 pb-5"},{default:w(()=>[m(Et,{url:u(l),"node-name":t.node?.name??""},null,8,["url","node-name"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["open"]),m(ro,{open:u(Z)!==null,title:u(p)("console.confirm.title",{command:u(Z)?.label,node:t.node?.name}),"confirm-label":u(p)("console.confirm.label",{command:u(Z)?.label}),"onUpdate:open":I[11]||(I[11]=O=>!O&&(Z.value=null)),onConfirm:De},{default:w(()=>[v("p",null,y(u(Z)&&u(b).commandDescription(u(Z))),1),v("p",null,y(u(p)("console.confirm.body")),1)]),_:1},8,["open","title","confirm-label"])],64)}}}),cu={class:"mb-1 text-lg font-semibold"},uu={class:"mb-4 text-sm text-muted-foreground"},du={key:2},hu={class:"mb-4 flex items-start justify-between gap-4"},fu={class:"min-w-0"},pu={class:"flex flex-wrap items-center gap-2.5 text-xl font-semibold tracking-tight"},mu={key:0,class:"mt-1 truncate text-sm text-muted-foreground"},gu={class:"mt-2 flex flex-wrap items-center gap-1.5"},yu=["title"],_u={class:"text-muted-foreground"},bu={class:"font-medium tabular"},vu={class:"flex shrink-0 gap-2"},Su={class:"list-disc pl-4"},ku={class:"min-h-44 p-4"},xu={key:0,class:"mb-3 flex items-center justify-between gap-3"},wu={class:"flex items-center gap-2"},Cu={class:"font-mono text-sm font-medium"},Ru={key:1,class:"grid gap-3 sm:grid-cols-2"},Tu={class:"rounded-md border p-3"},Au={class:"mb-2.5 text-[11px] font-semibold tracking-wide text-muted-foreground uppercase"},Nu={class:"grid grid-cols-[104px_1fr] items-center gap-x-3 gap-y-2 text-xs"},Iu={class:"text-muted-foreground"},Pu={class:"font-mono tabular"},Lu={class:"text-muted-foreground"},Eu={key:1,class:"text-muted-foreground"},$u={key:1,class:"text-muted-foreground"},Ou={class:"rounded-md border p-3"},Mu={class:"mb-2.5 text-[11px] font-semibold tracking-wide text-muted-foreground uppercase"},Bu={key:0,class:"flex flex-wrap items-center gap-1.5"},Uu={key:4,class:"text-xs text-muted-foreground"},Du={class:"font-mono"},Gu={key:5,class:"text-xs text-muted-foreground"},ju={class:"font-mono tabular"},zu={key:1,class:"flex items-center gap-1.5 text-xs text-muted-foreground"},Fu={class:"mb-2 flex items-center justify-between gap-2"},Hu={class:"font-mono text-xs font-medium text-muted-foreground"},Wu={class:"flex items-center gap-2"},Vu={class:"group relative"},qu={class:"max-h-80 overflow-auto rounded-md bg-muted/60 p-3 pr-12 font-mono text-xs whitespace-pre-wrap"},Ku={key:0,class:"absolute top-2 right-2 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100"},Yu={key:0,class:"py-6 text-center text-sm text-muted-foreground"},Ju={key:1,class:"space-y-0.5"},Xu={class:"min-w-0 flex-1 break-words text-muted-foreground"},Qu=["title"],kd=Se({__name:"index",setup(t){const e=vo(),n=Yo(),s=Jo(),o=us(),{t:r,locale:a}=Be(),i=gn(),l=H(()=>Number(e.params.id)),c=G(null),d=G(null),h=G(!1),g=G(Number(e.params.nodeIndex??0)||0),f=G("node"),p=G(""),C=G("200"),R=G([]);So({title:()=>`${c.value?.name??r("detail.head")} · Hexcore`});const b=H(()=>c.value?.nodes.find($=>$.index===g.value)),_=H(()=>d.value?.nodes.find($=>$.nodeId===b.value?.id)),x=H(()=>c.value?qo(c.value,Ko(c.value,null),n.dockerOk):null),T=H(()=>{const $=c.value?.hydraNodeImage;return $?Wo($)?.label??$:""}),E=H(()=>Object.keys(c.value?.protocolParameterOverrides??{}).length),z=H(()=>E.value?Object.keys(c.value.protocolParameterOverrides).join(", "):""),Q=H(()=>{const $=c.value;if(!$)return[];const N=[{label:r("detail.chips.nodes"),value:String($.nodes.length)},{label:r("detail.chips.network"),value:$.network}];return $.offline?N.push({label:r("detail.chips.seed"),value:`${$.offline.headSeed.slice(0,8)}…`,title:$.offline.headSeed}):(N.push({label:r("detail.chips.contestation"),value:`${$.contestationPeriod}s`}),N.push({label:r("detail.chips.deposit"),value:`${$.depositPeriod}s`})),T.value&&N.push({label:r("detail.chips.version"),value:T.value,title:$.hydraNodeImage}),z.value&&N.push({label:r("detail.chips.pinned"),value:r("detail.chips.pinnedValue",{count:E.value},E.value),title:z.value}),N}),Z=H(()=>c.value?.status==="RUNNING"),ce={error:"bg-destructive",warn:"bg-warning",warning:"bg-warning"};function ge($){return ce[$]??"bg-muted-foreground/40"}async function oe(){try{c.value=await o.get(`/api/heads/${l.value}`),d.value=c.value.status==="RUNNING"||c.value.status==="STARTING"?await n.liveStatus(l.value):null}catch($){if($ instanceof ot&&$.code==="HEAD_NOT_FOUND"){h.value=!0;return}throw $}}const de=Lo(oe,{interval:()=>Vo(c.value?.status??"CONFIGURED")}),re=Eo({onDeleted:()=>{de.stop(),Nn("/heads")},onReset:()=>{oe()}});un(()=>{n.fetchHealth().catch(()=>{}),de.start()}),$e(g,$=>{const N=$===0?`/heads/${l.value}`:`/heads/${l.value}/nodes/${$}`;e.path!==N&&Nn(N,{replace:!0})}),$e([f,g,C],async()=>{f.value==="log"&&await ke(),f.value==="events"&&await te()});async function ke(){if(b.value)try{const $=await o.get(`/api/heads/${l.value}/nodes/${g.value}/logs?tail=${C.value}`);p.value=$.logs||r("detail.log.empty")}catch($){p.value=$ instanceof ot?r("detail.log.failedWith",{error:$.message}):r("detail.log.failed")}}async function te(){try{R.value=await o.get(`/api/heads/${l.value}/events`)}catch{R.value=[]}}const ae=G(null),ue=G(null);async function De($){if(!c.value)return;const N=c.value.name;($==="start"||$==="restart")&&(ae.value=l.value);try{await n.runAction(l.value,$),s.success(r(`lifecycle.done.${$}`,{name:N}))}catch(_e){s.error(r(`lifecycle.failed.${$}`,{name:N}),_e instanceof ot?_e.message:void 0)}finally{await oe()}}return($,N)=>{const _e=ao,ne=an,U=fo,I=ho,xe=ss,he=yt,Xe=mo,Qe=ln,Pe=cn,Ct=Tr,we=mn,Ze=pn,ye=yn,Rt=ds("i18n-t"),Le=ps,Tt=gs,At=rs,Nt=os,Ge=ls,It=as,Pt=is,je=fn,Lt=$o,Et=Oo,$t=iu;return u(h)?(k(),D(I,{key:0},{default:w(()=>[m(U,{class:"py-12 text-center"},{default:w(()=>[v("h1",cu,y(u(r)("detail.notFound")),1),v("p",uu,y(u(r)("detail.notFoundHint")),1),m(ne,{variant:"outline","as-child":""},{default:w(()=>[m(_e,{to:"/heads"},{default:w(()=>[P(y(u(r)("newHead.back")),1)]),_:1})]),_:1})]),_:1})]),_:1})):u(c)?(k(),A("div",du,[m(ne,{variant:"ghost",size:"sm",class:"mb-3 -ml-3","as-child":""},{default:w(()=>[m(_e,{to:"/heads"},{default:w(()=>[m(u(Ho),{class:"size-4"}),P(" "+y(u(r)("detail.allHeads")),1)]),_:1})]),_:1}),v("div",hu,[v("div",fu,[v("h1",pu,[P(y(u(c).name)+" ",1),m(he,{status:u(c).status,size:"md"},null,8,["status"]),u(c).status==="RUNNING"?(k(),D(he,{key:0,"hydra-state":u(d)?.hydraState??u(c).hydraState,size:"md"},null,8,["hydra-state"])):B("",!0)]),u(c).description?(k(),A("p",mu,y(u(c).description),1)):B("",!0),v("div",gu,[(k(!0),A(ie,null,be(u(Q),M=>(k(),A("span",{key:M.label,title:M.title,class:me(["inline-flex items-center gap-1.5 rounded-md border bg-muted/40 px-2 py-0.5 text-xs",M.title?"cursor-help":""])},[v("span",_u,y(M.label),1),v("span",bu,y(M.value),1)],10,yu))),128))])]),v("div",vu,[m(ne,{variant:"outline",size:"icon-sm","aria-label":u(r)("common.refresh"),onClick:N[0]||(N[0]=M=>oe())},{default:w(()=>[m(u(Wt),{class:"size-4"})]),_:1},8,["aria-label"]),u(c).status==="RUNNING"?(k(),A(ie,{key:0},[m(ne,{variant:"outline",size:"sm",disabled:u(n).isBusy(u(c).id),onClick:N[1]||(N[1]=M=>De("restart"))},{default:w(()=>[P(y(u(r)("actions.restart")),1)]),_:1},8,["disabled"]),m(ne,{variant:"outline",size:"sm",disabled:u(n).isBusy(u(c).id),onClick:N[2]||(N[2]=M=>De("stop"))},{default:w(()=>[P(y(u(r)("actions.stop")),1)]),_:1},8,["disabled"])],64)):(k(),D(ne,{key:1,size:"sm",disabled:!u(x)?.canStart||u(n).isBusy(u(c).id),title:u(i)(u(x)?.startBlockedReason),onClick:N[3]||(N[3]=M=>De("start"))},{default:w(()=>[u(n).isBusy(u(c).id)?(k(),D(u(po),{key:0,class:"size-4 animate-spin"})):B("",!0),P(" "+y(u(c).status==="FAILED"?u(r)("actions.retry"):u(r)("actions.start")),1)]),_:1},8,["disabled","title"])),u(x)?.canEdit?(k(),D(ne,{key:2,variant:"outline",size:"sm","as-child":""},{default:w(()=>[m(_e,{to:`/heads/${u(c).id}/edit`},{default:w(()=>[P(y(u(r)("actions.edit")),1)]),_:1},8,["to"])]),_:1})):B("",!0),u(x)?.canReset?(k(),D(ne,{key:3,variant:"outline",size:"sm",disabled:u(n).isBusy(u(c).id),title:u(r)("detail.resetHint"),onClick:N[4]||(N[4]=M=>u(re).askReset(u(c)))},{default:w(()=>[P(y(u(r)("actions.reset")),1)]),_:1},8,["disabled","title"])):B("",!0),m(ne,{variant:"outline",size:"icon-sm","aria-label":u(r)("detail.deleteHead"),title:u(r)("detail.deleteHead"),class:"text-destructive hover:bg-destructive-soft hover:text-destructive",disabled:u(n).isBusy(u(c).id)||!u(x)?.canDelete,onClick:N[5]||(N[5]=M=>u(re).askDelete(u(c)))},{default:w(()=>[m(u(hs),{class:"size-4"})]),_:1},8,["aria-label","title","disabled"])])]),u(c).lastError?(k(),D(Pe,{key:0,variant:"destructive",class:"mb-4"},{default:w(()=>[m(Xe,null,{default:w(()=>[P(y(u(r)("detail.lastError")),1)]),_:1}),m(Qe,null,{default:w(()=>[P(y(u(c).lastError),1)]),_:1})]),_:1})):B("",!0),u(d)?.degraded?(k(),D(Pe,{key:1,class:"mb-4"},{default:w(()=>[m(Xe,null,{default:w(()=>[P(y(u(r)("presentation.bar.degraded.title",{up:u(d).containersRunning,total:u(c).nodeCount})),1)]),_:1}),m(Qe,null,{default:w(()=>[v("ul",Su,[(k(!0),A(ie,null,be(u(d).degradedReasons,M=>(k(),A("li",{key:M},y(M),1))),128))])]),_:1})]),_:1})):B("",!0),m(I,{class:"overflow-hidden py-0"},{default:w(()=>[m(Ct,{head:u(c),live:u(d)?.nodes,"selected-index":u(g),onSelect:N[6]||(N[6]=M=>g.value=M)},null,8,["head","live","selected-index"]),m(je,{modelValue:u(f),"onUpdate:modelValue":N[10]||(N[10]=M=>Oe(f)?f.value=M:null),class:"gap-0 border-t"},{default:w(()=>[m(Ze,{class:"m-3 mb-0"},{default:w(()=>[m(we,{value:"node"},{default:w(()=>[m(u(dr)),P(" "+y(u(r)("detail.tabs.node")),1)]),_:1}),m(we,{value:"resources"},{default:w(()=>[m(u(fs)),P(" "+y(u(r)("detail.tabs.resources")),1)]),_:1}),m(we,{value:"log"},{default:w(()=>[m(u(cr)),P(" "+y(u(r)("detail.tabs.log")),1)]),_:1}),m(we,{value:"events"},{default:w(()=>[m(u(rr)),P(" "+y(u(r)("detail.tabs.events")),1)]),_:1})]),_:1}),v("div",ku,[m(Le,{value:"node",class:"mt-0"},{default:w(()=>[u(b)?(k(),A("div",xu,[v("div",wu,[v("span",Cu,y(u(b).name),1),m(he,{status:u(b).status},null,8,["status"])]),m(ne,{variant:"outline",size:"sm",disabled:u(c).status!=="RUNNING",title:u(c).status==="RUNNING"?u(r)("detail.consoleHint"):u(r)("detail.consoleBlocked"),onClick:N[7]||(N[7]=M=>ue.value=u(b))},{default:w(()=>[m(u(hr),{class:"size-4"}),P(" "+y(u(r)("detail.console")),1)]),_:1},8,["disabled","title"])])):B("",!0),u(b)?(k(),A("div",Ru,[v("div",Tu,[v("h4",Au,y(u(r)("detail.identity")),1),v("dl",Nu,[v("dt",Iu,y(u(r)("detail.ports")),1),v("dd",Pu," api "+y(u(b).apiPort)+" · p2p "+y(u(b).p2pPort)+" · metrics "+y(u(b).monitoringPort),1),v("dt",Lu,y(u(r)("detail.address")),1),v("dd",null,[u(b).cardanoAddress?(k(),D(ye,{key:0,value:u(b).cardanoAddress,truncate:16,label:u(r)("copy.labels.address")},null,8,["value","label"])):(k(),A("span",Eu,"—"))]),N[15]||(N[15]=v("dt",{class:"text-muted-foreground"},"Hydra vkey",-1)),v("dd",null,[u(b).hydraVkey?(k(),D(ye,{key:0,value:u(b).hydraVkey,truncate:16,label:u(r)("copy.labels.vkey")},null,8,["value","label"])):(k(),A("span",$u,"—"))])])]),v("div",Ou,[v("h4",Mu,y(u(r)("detail.liveState")),1),u(_)?(k(),A("div",Bu,[m(he,{"hydra-state":u(_).hydraState},null,8,["hydra-state"]),u(_).chainSynced?(k(),D(he,{key:0,tone:u(_).chainSynced==="InSync"?"success":"warning",label:u(_).chainSynced==="InSync"?u(r)("detail.inSync"):u(r)("detail.catchingUp")},null,8,["tone","label"])):B("",!0),u(_).networkConnected===!1?(k(),D(he,{key:1,tone:"danger",label:u(r)("detail.networkDown")},null,8,["label"])):B("",!0),u(_).peersDown?.length?(k(),D(he,{key:2,tone:"danger",label:u(r)("detail.peersLost",{peers:u(_).peersDown.join(", ")})},null,8,["label"])):B("",!0),u(_).error?(k(),D(he,{key:3,tone:"danger",label:u(_).error},null,8,["label"])):B("",!0),u(_).version?(k(),A("span",Uu,[N[16]||(N[16]=P(" v",-1)),v("span",Du,y(u(_).version),1)])):B("",!0),u(_).snapshotUtxoCount!==void 0?(k(),A("span",Gu,[N[17]||(N[17]=P(" · ",-1)),m(Rt,{keypath:"detail.snapshotUtxos",scope:"global"},{count:w(()=>[v("span",ju,y(u(_).snapshotUtxoCount),1)]),_:1})])):B("",!0)])):(k(),A("p",zu,[m(u(Zo),{class:"size-3.5"}),P(" "+y(u(Z)?u(r)("detail.connecting"):u(r)("detail.notRunning")),1)]))])])):B("",!0)]),_:1}),m(Le,{value:"resources",class:"mt-0"},{default:w(()=>[m(Tt,{"head-id":u(c).id,"selected-node-id":u(b)?.id,running:u(Z)},null,8,["head-id","selected-node-id","running"])]),_:1}),m(Le,{value:"log",class:"mt-0"},{default:w(()=>[v("div",Fu,[v("span",Hu,y(u(b)?.name),1),v("div",Wu,[m(ne,{variant:"outline",size:"sm",onClick:N[8]||(N[8]=M=>ke())},{default:w(()=>[m(u(Wt),{class:"size-3.5"}),P(" "+y(u(r)("common.refresh")),1)]),_:1}),(k(),D(Pt,{key:u(a),modelValue:u(C),"onUpdate:modelValue":N[9]||(N[9]=M=>Oe(C)?C.value=M:null)},{default:w(()=>[m(Nt,{size:"sm",class:"w-32","aria-label":u(r)("detail.log.tail")},{default:w(()=>[m(At)]),_:1},8,["aria-label"]),m(It,null,{default:w(()=>[m(Ge,{value:"100"},{default:w(()=>[P(y(u(r)("detail.log.lines",{count:100})),1)]),_:1}),m(Ge,{value:"500"},{default:w(()=>[P(y(u(r)("detail.log.lines",{count:500})),1)]),_:1}),m(Ge,{value:"2000"},{default:w(()=>[P(y(u(r)("detail.log.lines",{count:2e3})),1)]),_:1})]),_:1})]),_:1},8,["modelValue"]))])]),v("div",Vu,[v("pre",qu,y(u(p)||u(r)("common.loading")),1),u(p)?(k(),A("div",Ku,[m(ye,{value:u(p),"icon-only":"",label:u(r)("copy.labels.log")},null,8,["value","label"])])):B("",!0)])]),_:1}),m(Le,{value:"events",class:"mt-0"},{default:w(()=>[u(R).length===0?(k(),A("p",Yu,y(u(r)("detail.noEvents")),1)):(k(),A("ol",Ju,[(k(!0),A(ie,null,be(u(R),M=>(k(),A("li",{key:M.id,class:"flex items-baseline gap-3 rounded-md px-2 py-1.5 text-xs hover:bg-muted/50"},[v("span",{class:me(["mt-1.5 size-1.5 shrink-0 rounded-full",ge(M.level)]),"aria-hidden":"true"},null,2),v("span",{class:me(["shrink-0 font-medium",M.level==="error"?"text-destructive":"text-foreground"])},y(M.kind),3),v("span",Xu,y(M.message),1),v("span",{class:"shrink-0 tabular text-muted-foreground/70",title:`${M.created_at} UTC · ${u(Mo)(M.created_at,u(a))}`},y(u(Bo)(M.created_at,u(a))),9,Qu)]))),128))]))]),_:1})])]),_:1},8,["modelValue"])]),_:1}),m(Lt,{head:u(re).target.value,kind:u(re).kind.value,loading:u(re).busy.value,onClose:N[11]||(N[11]=M=>u(re).close()),onConfirm:N[12]||(N[12]=M=>u(re).run())},null,8,["head","kind","loading"]),m(Et,{"head-id":u(ae),"head-name":u(c).name,onClose:N[13]||(N[13]=M=>ae.value=null)},null,8,["head-id","head-name"]),m($t,{node:u(ue),"head-id":u(c).id,"head-name":u(c).name,"head-running":u(c).status==="RUNNING",onClose:N[14]||(N[14]=M=>ue.value=null)},null,8,["node","head-id","head-name","head-running"])])):(k(),D(I,{key:1},{default:w(()=>[m(U,{class:"space-y-3 pt-6"},{default:w(()=>[m(xe,{class:"h-6 w-56"}),m(xe,{class:"h-4 w-full"}),m(xe,{class:"h-4 w-3/5"})]),_:1})]),_:1}))}}});export{kd as _};