isorite 0.17.0 → 0.18.1

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 (97) hide show
  1. package/dist/main.js +1577 -65
  2. package/package.json +4 -1
  3. package/web/_app/immutable/assets/0.i592VXJM.css +1 -0
  4. package/web/_app/immutable/chunks/{2BcU70Iq.js → -_CDfwKC.js} +1 -1
  5. package/web/_app/immutable/chunks/{DrPF-vh8.js → -oRvYXNk.js} +1 -1
  6. package/web/_app/immutable/chunks/0qd6IUbO.js +1 -0
  7. package/web/_app/immutable/chunks/{yy6sD_us.js → 7faei0hL.js} +1 -1
  8. package/web/_app/immutable/chunks/{BNlziJ_1.js → BArcFmbE.js} +3 -3
  9. package/web/_app/immutable/chunks/{NgkOM4d0.js → BF1TezEe.js} +1 -1
  10. package/web/_app/immutable/chunks/{DK9wjWIk.js → BF3mdiSX.js} +1 -1
  11. package/web/_app/immutable/chunks/{BbvUCVY_.js → BezGs1Zj.js} +1 -1
  12. package/web/_app/immutable/chunks/{BjLgp18-.js → BpHE30PI.js} +1 -1
  13. package/web/_app/immutable/chunks/{Ds9L6FPB.js → BtF1frCE.js} +1 -1
  14. package/web/_app/immutable/chunks/{D_xpsaTJ.js → BuNfZSU6.js} +1 -1
  15. package/web/_app/immutable/chunks/{0KrpTYPM.js → BubCsN15.js} +1 -1
  16. package/web/_app/immutable/chunks/{_zY4mrA0.js → BvhVny3O.js} +1 -1
  17. package/web/_app/immutable/chunks/{CcRcjPTM.js → Bvs-JCN-.js} +1 -1
  18. package/web/_app/immutable/chunks/{1W6iRjg5.js → C-F98t31.js} +1 -1
  19. package/web/_app/immutable/chunks/{rv_cF9pp.js → C1OaBy7n.js} +1 -1
  20. package/web/_app/immutable/chunks/{CMN7rSZK.js → C4SqDe8e.js} +1 -1
  21. package/web/_app/immutable/chunks/{BBU5FdEo.js → C74H8jNb.js} +1 -1
  22. package/web/_app/immutable/chunks/{Cn7j5NKi.js → C7bouMY8.js} +1 -1
  23. package/web/_app/immutable/chunks/{vGOSIW7X.js → C8IrXs1w.js} +1 -1
  24. package/web/_app/immutable/chunks/{CwcA6hab.js → CGGjDDVZ.js} +1 -1
  25. package/web/_app/immutable/chunks/{CabmfniL.js → CMAnq3x6.js} +1 -1
  26. package/web/_app/immutable/chunks/{Bx_Vz2qr.js → CMe14KUo.js} +1 -1
  27. package/web/_app/immutable/chunks/{DQJRaTNz.js → CXc9Iibq.js} +1 -1
  28. package/web/_app/immutable/chunks/Cb-KPahQ.js +1 -0
  29. package/web/_app/immutable/chunks/{CpJ4vfn-.js → Cf13Ew0A.js} +1 -1
  30. package/web/_app/immutable/chunks/{CQhfj5-f.js → CkSjC-iE.js} +3 -3
  31. package/web/_app/immutable/chunks/{sBy91tGs.js → Cn8Mg7_E.js} +1 -1
  32. package/web/_app/immutable/chunks/Co7i-dcu.js +1 -0
  33. package/web/_app/immutable/chunks/{1MewxdCy.js → CoeYsgbS.js} +1 -1
  34. package/web/_app/immutable/chunks/{CccIbhmH.js → CqmdC7Q3.js} +2 -2
  35. package/web/_app/immutable/chunks/{DJHLXLij.js → CrqOdm1D.js} +1 -1
  36. package/web/_app/immutable/chunks/{B-04K_Pl.js → CyJXJYoE.js} +1 -1
  37. package/web/_app/immutable/chunks/{CxEu-Di8.js → Cz6kYWmu.js} +1 -1
  38. package/web/_app/immutable/chunks/{ZDjPMhAb.js → CzbFy3_5.js} +1 -1
  39. package/web/_app/immutable/chunks/{yYKJ4mbq.js → D-9suc4b.js} +1 -1
  40. package/web/_app/immutable/chunks/{qfBACIi9.js → D37hxBaz.js} +1 -1
  41. package/web/_app/immutable/chunks/D4nFtMQC.js +1 -0
  42. package/web/_app/immutable/chunks/{CmFzeyfe.js → DNs5kWvM.js} +1 -1
  43. package/web/_app/immutable/chunks/{C2EzU0qX.js → DR5d84Z7.js} +1 -1
  44. package/web/_app/immutable/chunks/{C2QvvHIN.js → DaEL1AOW.js} +1 -1
  45. package/web/_app/immutable/chunks/{BCsFs14H.js → Dazeexma.js} +1 -1
  46. package/web/_app/immutable/chunks/{DqZ4UzUH.js → Dc2_04md.js} +1 -1
  47. package/web/_app/immutable/chunks/{DfLI-CvW.js → Dcjgv4h2.js} +1 -1
  48. package/web/_app/immutable/chunks/{DMpFmiFg.js → DdegnILL.js} +1 -1
  49. package/web/_app/immutable/chunks/{CRbUrapz.js → DgI3Vj5v.js} +1 -1
  50. package/web/_app/immutable/chunks/{fpNFwizw.js → Dgko1xMH.js} +1 -1
  51. package/web/_app/immutable/chunks/DjN194Ef.js +1 -0
  52. package/web/_app/immutable/chunks/{DS7XcdHs.js → DlgOmQ_G.js} +1 -1
  53. package/web/_app/immutable/chunks/{DMTkA0aK.js → DmS5Qyvl.js} +1 -1
  54. package/web/_app/immutable/chunks/{DeazQJkV.js → DqnDX3G8.js} +1 -1
  55. package/web/_app/immutable/chunks/{DEwfz-Il.js → DzAOHjhV.js} +1 -1
  56. package/web/_app/immutable/chunks/{DRKiKCov.js → Iqegk1SI.js} +1 -1
  57. package/web/_app/immutable/chunks/{Cl-Xmm9N.js → ONqdwA3r.js} +1 -1
  58. package/web/_app/immutable/chunks/{Dns-yz2Q.js → Oikibjm2.js} +1 -1
  59. package/web/_app/immutable/chunks/{CdD6waB-.js → T3u7Skc8.js} +1 -1
  60. package/web/_app/immutable/chunks/{Df3spPXn.js → cWWhqL1F.js} +1 -1
  61. package/web/_app/immutable/chunks/{CfTuc06U.js → fRXyV4Ec.js} +1 -1
  62. package/web/_app/immutable/chunks/{Dzu8v7nB.js → jAC4YCqW.js} +1 -1
  63. package/web/_app/immutable/chunks/{CB6ztdCQ.js → kFEqmLql.js} +1 -1
  64. package/web/_app/immutable/chunks/lSTs4h6V.js +1 -0
  65. package/web/_app/immutable/chunks/ufOJrCuz.js +517 -0
  66. package/web/_app/immutable/chunks/{BBhr3bLI.js → y0C1JQ1v.js} +1 -1
  67. package/web/_app/immutable/chunks/{CAuYgj5q.js → yvD4_bP8.js} +1 -1
  68. package/web/_app/immutable/entry/app.BRzQKhKX.js +2 -0
  69. package/web/_app/immutable/entry/start.-f1rSSM0.js +1 -0
  70. package/web/_app/immutable/nodes/0.i_AjenOL.js +11 -0
  71. package/web/_app/immutable/nodes/1.D6qHWJUF.js +1 -0
  72. package/web/_app/immutable/nodes/2.BPWtlg8V.js +1 -0
  73. package/web/_app/immutable/nodes/3.DaRPyiq0.js +1 -0
  74. package/web/_app/immutable/nodes/4.CkZ28L5K.js +3 -0
  75. package/web/_app/immutable/nodes/5.6ZCfORwJ.js +22 -0
  76. package/web/_app/immutable/nodes/6.B9EIxq5B.js +1 -0
  77. package/web/_app/immutable/nodes/7.DGJflKit.js +1 -0
  78. package/web/_app/version.json +1 -1
  79. package/web/index.html +17 -17
  80. package/web/_app/immutable/assets/0.DVQOzs4l.css +0 -1
  81. package/web/_app/immutable/chunks/BJOSVfg-.js +0 -1
  82. package/web/_app/immutable/chunks/CHjmZsHD.js +0 -1
  83. package/web/_app/immutable/chunks/CM4EA3Wo.js +0 -1
  84. package/web/_app/immutable/chunks/DH2bqH7t.js +0 -517
  85. package/web/_app/immutable/chunks/Ddw9FbDu.js +0 -1
  86. package/web/_app/immutable/chunks/IECP4ppk.js +0 -1
  87. package/web/_app/immutable/chunks/ZDkogIhD.js +0 -1
  88. package/web/_app/immutable/entry/app.CX19wIuG.js +0 -2
  89. package/web/_app/immutable/entry/start.DaiosA4i.js +0 -1
  90. package/web/_app/immutable/nodes/0.B6_Ycc14.js +0 -3
  91. package/web/_app/immutable/nodes/1.JA1sPybf.js +0 -1
  92. package/web/_app/immutable/nodes/2.DN2phYmE.js +0 -1
  93. package/web/_app/immutable/nodes/3.CbnLNp2F.js +0 -1
  94. package/web/_app/immutable/nodes/4.CIsG7Kdu.js +0 -3
  95. package/web/_app/immutable/nodes/5.D__u9ji8.js +0 -19
  96. package/web/_app/immutable/nodes/6.DBP0fpLt.js +0 -1
  97. package/web/_app/immutable/nodes/7.DuaH9aUr.js +0 -1
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DIGvaVgJ.js","./BxTFtVqu.js","./yxd8jSz3.js","./Cq5C893B.js","./C6Btt2Xs.js","./DtbnBenW.js","./D_aBVMvK.js","./Bbt0DTmZ.js","./K_3X9lyC.js","./BBU5FdEo.js","./CDAjAYjS.js","./_rHYGvON.js","./DeazQJkV.js","./NgkOM4d0.js","./Bffqt7tx.js","./BWonG38x.js","./BEHa2uNW.js","./BPW39P52.js","./Ds8Pkiic.js","./CPF5uNy5.js","./DLa7NjNO.js","./DXiLM1-G.js","./CygcOYNo.js","./GwMd3KmG.js","./Cp5ooBfH.js","./Bu8mWwtz.js","./BBhr3bLI.js","./CMN7rSZK.js"])))=>i.map(i=>d[i]);
2
- import{vt as e}from"./CxEu-Di8.js";import{t}from"./CRzLMJPS.js";import{A as n,B as r,C as i,D as a,F as o,J as s,M as c,O as l,Q as u,S as d,Y as f,_ as p,a as m,b as h,bt as ee,c as te,d as ne,g as re,gt as g,ht as ie,i as ae,j as oe,k as se,lt as _,mt as v,o as y,p as ce,s as le,vt as ue,yt as b}from"./BxTFtVqu.js";import{t as de}from"./yxd8jSz3.js";var fe=class e{static create(t,n,r,i,a){let o=i+(i<<8)+t+(n<<4)|0;return new e(t,n,r,o,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[v.contextHash,r]]}addChild(e,t){e.prop(v.contextHash)!=this.hash&&(e=new b(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new b(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new b(g.none,e,t,n,this.hashProp)})}},x;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(x||={});var pe=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},me=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return C(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function he(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==x.OrderedList?T:w)(n,t,!1);return r>0&&(e.type!=x.BulletList||be(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var ge={[x.Blockquote](e,t,n){return n.next==62&&(n.markers.push(I(x.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(S(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[x.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[x.OrderedList]:he,[x.BulletList]:he,[x.Document](){return!0}};function S(e){return e==32||e==9||e==10||e==13}function C(e,t=0){for(;t<e.length&&S(e.charCodeAt(t));)t++;return t}function _e(e,t,n){for(;t>n&&S(e.charCodeAt(t-1));)t--;return t}function ve(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function ye(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function be(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!S(n))return-1}return n&&e.next==45&&Ce(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(Ae.SetextHeading)>-1||r<3?-1:1}function xe(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function w(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||S(e.text.charCodeAt(e.pos+1)))&&(!n||xe(t,x.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function T(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!S(e.text.charCodeAt(r+1))||n&&!xe(t,x.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function Se(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function Ce(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&S(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var E=/^[ \t]*$/,we=/-->/,Te=/\?>/,D=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,we],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,E],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,E]];function Ee(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=D.length-+!!n;e<t;e++)if(D[e][0].test(r))return e;return-1}function De(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.skipSpace(t),i=e.countIndent(r,t,n);return i>=n+5||r==e.text.length?n+1:i}function O(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==x.CodeText?e[r].to=n:e.push(I(x.CodeText,t,n))}var k={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(O(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){O(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==x.CodeText?O(o,e.from,e.to):o.push(e);s=[]}O(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&O(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=x.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(x.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=ve(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=_e(t.text,t.text.length,o),c=[I(x.CodeMark,r,r+a)];o<s&&c.push(I(x.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&O(c,e.lineStart-1,e.lineStart),c.push(I(x.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}{o=!0,n||(O(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(O(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(x.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=ye(t);return n<0?!1:(e.startContext(x.Blockquote,t.pos),e.addNode(x.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(be(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(x.HorizontalRule,n),!0},BulletList(e,t){let n=w(t,e,!1);if(n<0)return!1;e.block.type!=x.BulletList&&e.startContext(x.BulletList,t.basePos,t.next);let r=De(t,t.pos+1);return e.startContext(x.ListItem,t.basePos,r-t.baseIndent),e.addNode(x.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=T(t,e,!1);if(n<0)return!1;e.block.type!=x.OrderedList&&e.startContext(x.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=De(t,t.pos+n);return e.startContext(x.ListItem,t.basePos,r-t.baseIndent),e.addNode(x.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=Se(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=_e(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!S(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(x.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(x.HeaderMark,o-r,a-r);let c=s.finish(x.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=Ee(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=D[n][1],a=[],o=i!=E;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==we?x.CommentBlock:i==Te?x.ProcessingInstructionBlock:x.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},Oe=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DIGvaVgJ.js","./BxTFtVqu.js","./yxd8jSz3.js","./Cq5C893B.js","./C6Btt2Xs.js","./DtbnBenW.js","./D_aBVMvK.js","./Bbt0DTmZ.js","./K_3X9lyC.js","./C74H8jNb.js","./CDAjAYjS.js","./_rHYGvON.js","./DqnDX3G8.js","./BF1TezEe.js","./Bffqt7tx.js","./BWonG38x.js","./BEHa2uNW.js","./BPW39P52.js","./Ds8Pkiic.js","./CPF5uNy5.js","./DLa7NjNO.js","./DXiLM1-G.js","./CygcOYNo.js","./GwMd3KmG.js","./Cp5ooBfH.js","./Bu8mWwtz.js","./y0C1JQ1v.js","./C4SqDe8e.js"])))=>i.map(i=>d[i]);
2
+ import{yt as e}from"./Cz6kYWmu.js";import{t}from"./CRzLMJPS.js";import{A as n,B as r,C as i,D as a,F as o,J as s,M as c,O as l,Q as u,S as d,Y as f,_ as p,a as m,b as h,bt as ee,c as te,d as ne,g as re,gt as g,ht as ie,i as ae,j as oe,k as se,lt as _,mt as v,o as y,p as ce,s as le,vt as ue,yt as b}from"./BxTFtVqu.js";import{t as de}from"./yxd8jSz3.js";var fe=class e{static create(t,n,r,i,a){let o=i+(i<<8)+t+(n<<4)|0;return new e(t,n,r,o,a,[],[])}constructor(e,t,n,r,i,a,o){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=i,this.children=a,this.positions=o,this.hashProp=[[v.contextHash,r]]}addChild(e,t){e.prop(v.contextHash)!=this.hash&&(e=new b(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new b(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(e,t,n)=>new b(g.none,e,t,n,this.hashProp)})}},x;(function(e){e[e.Document=1]=`Document`,e[e.CodeBlock=2]=`CodeBlock`,e[e.FencedCode=3]=`FencedCode`,e[e.Blockquote=4]=`Blockquote`,e[e.HorizontalRule=5]=`HorizontalRule`,e[e.BulletList=6]=`BulletList`,e[e.OrderedList=7]=`OrderedList`,e[e.ListItem=8]=`ListItem`,e[e.ATXHeading1=9]=`ATXHeading1`,e[e.ATXHeading2=10]=`ATXHeading2`,e[e.ATXHeading3=11]=`ATXHeading3`,e[e.ATXHeading4=12]=`ATXHeading4`,e[e.ATXHeading5=13]=`ATXHeading5`,e[e.ATXHeading6=14]=`ATXHeading6`,e[e.SetextHeading1=15]=`SetextHeading1`,e[e.SetextHeading2=16]=`SetextHeading2`,e[e.HTMLBlock=17]=`HTMLBlock`,e[e.LinkReference=18]=`LinkReference`,e[e.Paragraph=19]=`Paragraph`,e[e.CommentBlock=20]=`CommentBlock`,e[e.ProcessingInstructionBlock=21]=`ProcessingInstructionBlock`,e[e.Escape=22]=`Escape`,e[e.Entity=23]=`Entity`,e[e.HardBreak=24]=`HardBreak`,e[e.Emphasis=25]=`Emphasis`,e[e.StrongEmphasis=26]=`StrongEmphasis`,e[e.Link=27]=`Link`,e[e.Image=28]=`Image`,e[e.InlineCode=29]=`InlineCode`,e[e.HTMLTag=30]=`HTMLTag`,e[e.Comment=31]=`Comment`,e[e.ProcessingInstruction=32]=`ProcessingInstruction`,e[e.Autolink=33]=`Autolink`,e[e.HeaderMark=34]=`HeaderMark`,e[e.QuoteMark=35]=`QuoteMark`,e[e.ListMark=36]=`ListMark`,e[e.LinkMark=37]=`LinkMark`,e[e.EmphasisMark=38]=`EmphasisMark`,e[e.CodeMark=39]=`CodeMark`,e[e.CodeText=40]=`CodeText`,e[e.CodeInfo=41]=`CodeInfo`,e[e.LinkTitle=42]=`LinkTitle`,e[e.LinkLabel=43]=`LinkLabel`,e[e.URL=44]=`URL`})(x||={});var pe=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},me=class{constructor(){this.text=``,this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return C(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e=``;for(let t=0;t<this.basePos;t++)e+=` `;return e+this.text.slice(this.basePos)}};function he(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==x.OrderedList?T:w)(n,t,!1);return r>0&&(e.type!=x.BulletList||be(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var ge={[x.Blockquote](e,t,n){return n.next==62&&(n.markers.push(I(x.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(S(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0)},[x.ListItem](e,t,n){return n.indent<n.baseIndent+e.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+e.value),!0)},[x.OrderedList]:he,[x.BulletList]:he,[x.Document](){return!0}};function S(e){return e==32||e==9||e==10||e==13}function C(e,t=0){for(;t<e.length&&S(e.charCodeAt(t));)t++;return t}function _e(e,t,n){for(;t>n&&S(e.charCodeAt(t-1));)t--;return t}function ve(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function ye(e){return e.next==62?e.text.charCodeAt(e.pos+1)==32?2:1:-1}function be(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let t=e.pos+1;t<e.text.length;t++){let n=e.text.charCodeAt(t);if(n==e.next)r++;else if(!S(n))return-1}return n&&e.next==45&&Ce(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(Ae.SetextHeading)>-1||r<3?-1:1}function xe(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function w(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||S(e.text.charCodeAt(e.pos+1)))&&(!n||xe(t,x.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function T(e,t,n){let r=e.pos,i=e.next;for(;i>=48&&i<=57;){if(r++,r==e.text.length)return-1;i=e.text.charCodeAt(r)}return r==e.pos||r>e.pos+9||i!=46&&i!=41||r<e.text.length-1&&!S(e.text.charCodeAt(r+1))||n&&!xe(t,x.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49)?-1:r+1-e.pos}function Se(e){if(e.next!=35)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==35;)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function Ce(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;for(;t<e.text.length&&e.text.charCodeAt(t)==e.next;)t++;let n=t;for(;t<e.text.length&&S(e.text.charCodeAt(t));)t++;return t==e.text.length?n:-1}var E=/^[ \t]*$/,we=/-->/,Te=/\?>/,D=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,we],[/^\s*<\?/,Te],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,E],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,E]];function Ee(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let e=0,t=D.length-+!!n;e<t;e++)if(D[e][0].test(r))return e;return-1}function De(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.skipSpace(t),i=e.countIndent(r,t,n);return i>=n+5||r==e.text.length?n+1:i}function O(e,t,n){let r=e.length-1;r>=0&&e[r].to==t&&e[r].type==x.CodeText?e[r].to=n:e.push(I(x.CodeText,t,n))}var k={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),i=e.lineStart+r,a=e.lineStart+t.text.length,o=[],s=[];for(O(o,i,a);e.nextLine()&&t.depth>=e.stack.length;)if(t.pos==t.text.length){O(s,e.lineStart-1,e.lineStart);for(let e of t.markers)s.push(e)}else if(t.indent<n)break;else{if(s.length){for(let e of s)e.type==x.CodeText?O(o,e.from,e.to):o.push(e);s=[]}O(o,e.lineStart-1,e.lineStart);for(let e of t.markers)o.push(e);a=e.lineStart+t.text.length;let n=e.lineStart+t.findColumn(t.baseIndent+4);n<a&&O(o,n,a)}return s.length&&(s=s.filter(e=>e.type!=x.CodeText),s.length&&(t.markers=s.concat(t.markers))),e.addNode(e.buffer.writeElements(o,-i).finish(x.CodeBlock,a-i),i),!0},FencedCode(e,t){let n=ve(t);if(n<0)return!1;let r=e.lineStart+t.pos,i=t.next,a=n-t.pos,o=t.skipSpace(n),s=_e(t.text,t.text.length,o),c=[I(x.CodeMark,r,r+a)];o<s&&c.push(I(x.CodeInfo,e.lineStart+o,e.lineStart+s));for(let n=!0,r=!0,o=!1;e.nextLine()&&t.depth>=e.stack.length;n=!1){let s=t.pos;if(t.indent-t.baseIndent<4)for(;s<t.text.length&&t.text.charCodeAt(s)==i;)s++;if(s-t.pos>=a&&t.skipSpace(s)==t.text.length){for(let e of t.markers)c.push(e);r&&o&&O(c,e.lineStart-1,e.lineStart),c.push(I(x.CodeMark,e.lineStart+t.pos,e.lineStart+s)),e.nextLine();break}{o=!0,n||(O(c,e.lineStart-1,e.lineStart),r=!1);for(let e of t.markers)c.push(e);let i=e.lineStart+t.basePos,a=e.lineStart+t.text.length;i<a&&(O(c,i,a),r=!1)}}return e.addNode(e.buffer.writeElements(c,-r).finish(x.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=ye(t);return n<0?!1:(e.startContext(x.Blockquote,t.pos),e.addNode(x.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null)},HorizontalRule(e,t){if(be(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(x.HorizontalRule,n),!0},BulletList(e,t){let n=w(t,e,!1);if(n<0)return!1;e.block.type!=x.BulletList&&e.startContext(x.BulletList,t.basePos,t.next);let r=De(t,t.pos+1);return e.startContext(x.ListItem,t.basePos,r-t.baseIndent),e.addNode(x.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=T(t,e,!1);if(n<0)return!1;e.block.type!=x.OrderedList&&e.startContext(x.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=De(t,t.pos+n);return e.startContext(x.ListItem,t.basePos,r-t.baseIndent),e.addNode(x.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=Se(t);if(n<0)return!1;let r=t.pos,i=e.lineStart+r,a=_e(t.text,t.text.length,r),o=a;for(;o>r&&t.text.charCodeAt(o-1)==t.next;)o--;(o==a||o==r||!S(t.text.charCodeAt(o-1)))&&(o=t.text.length);let s=e.buffer.write(x.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,o),i+n+1),-i);o<t.text.length&&s.write(x.HeaderMark,o-r,a-r);let c=s.finish(x.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(c,i),!0},HTMLBlock(e,t){let n=Ee(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,i=D[n][1],a=[],o=i!=E;for(;!i.test(t.text)&&e.nextLine();){if(t.depth<e.stack.length){o=!1;break}for(let e of t.markers)a.push(e)}o&&e.nextLine();let s=i==we?x.CommentBlock:i==Te?x.ProcessingInstructionBlock:x.HTMLBlock,c=e.prevLineEnd();return e.addNode(e.buffer.writeElements(a,-r).finish(s,c-r),r),!0},SetextHeading:void 0},Oe=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
3
3
  `+t.scrub(),i=this.advance(r);return i>-1&&i<r.length&&this.complete(e,n,i)}finish(e,t){return(this.stage==2||this.stage==3)&&C(t.content,this.pos)==t.content.length&&this.complete(e,t,t.content.length)}complete(e,t,n){return e.addLeafElement(t,I(x.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(Ue(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(I(x.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(Ve(e,C(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=C(e,this.pos),n=0;if(t>this.pos){let r=He(e,t,this.start);if(r){let t=A(e,r.to-this.start);t>0&&(this.nextStage(r),n=t)}}return n||=A(e,this.pos),n>0&&n<e.length?n:-1}else return A(e,this.pos)}};function A(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!S(n))return-1}return t}var ke=class{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:Ce(t),i=t.next;if(r<0)return!1;let a=I(x.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,I(i==61?x.SetextHeading1:x.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},Ae={LinkReference(e,t){return t.content.charCodeAt(0)==91?new Oe(t):null},SetextHeading(){return new ke}},je=[(e,t)=>Se(t)>=0,(e,t)=>ve(t)>=0,(e,t)=>ye(t)>=0,(e,t)=>w(t,e,!0)>=0,(e,t)=>T(t,e,!0)>=0,(e,t)=>be(t,e,!0)>=0,(e,t)=>Ee(t,e,!0)>=0],Me={text:``,end:0},Ne=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new me,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=fe.create(x.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new Ge(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let t=0;;){let n=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;t<e.markers.length&&(!n||e.markers[t].from<n.end);){let n=e.markers[t++];this.addNode(n.type,n.from,n.to)}if(!n)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;start:for(;;){for(let t of this.parser.blockParsers)if(t){let n=t(this,e);if(n!=0){if(n==1)return null;e.forward();continue start}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let t=new pe(this.lineStart+e.pos,e.text.slice(e.pos));for(let e of this.parser.leafBlockParsers)if(e){let n=e(this,t);n&&t.parsers.push(n)}lines:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break lines}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
4
4
  `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=Ke(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Me;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+x[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
5
5
  `?``:t;else{let e=t.indexOf(`
6
6
  `);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=fe.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new b(this.parser.nodeSet.types[e],P,P,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(G(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?Pe(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=G(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(x.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?I(this.parser.getNodeType(e),t,n,r):new Re(e,t)}get buffer(){return new Le(this.parser.nodeSet)}};function Pe(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=Pe(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new b(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var Fe=class e extends ue{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new Ne(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let r=M(t);if(!r)return this;let{nodeSet:i,skipContextMarkup:a}=this,o=this.blockParsers.slice(),s=this.leafBlockParsers.slice(),c=this.blockNames.slice(),u=this.inlineParsers.slice(),d=this.inlineNames.slice(),f=this.endLeafBlock.slice(),p=this.wrappers;if(j(r.defineNodes)){a=Object.assign({},a);let e=i.types.slice(),t;for(let n of r.defineNodes){let{name:r,block:i,composite:o,style:s}=typeof n==`string`?{name:n}:n;if(e.some(e=>e.name==r))continue;o&&(a[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,u=o?[`Block`,`BlockContext`]:i?c>=x.ATXHeading1&&c<=x.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(g.define({id:c,name:r,props:u&&[[v.group,u]]})),s&&(t||={},Array.isArray(s)||s instanceof l?t[r]=s:Object.assign(t,s))}i=new ie(e),t&&(i=i.extend(n(t)))}if(j(r.props)&&(i=i.extend(...r.props)),j(r.remove))for(let e of r.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(o[t]=s[t]=void 0),n>-1&&(u[n]=void 0)}if(j(r.parseBlock))for(let e of r.parseBlock){let t=c.indexOf(e.name);if(t>-1)o[t]=e.parse,s[t]=e.leaf;else{let t=e.before?N(c,e.before):e.after?N(c,e.after)+1:c.length-1;o.splice(t,0,e.parse),s.splice(t,0,e.leaf),c.splice(t,0,e.name)}e.endLeaf&&f.push(e.endLeaf)}if(j(r.parseInline))for(let e of r.parseInline){let t=d.indexOf(e.name);if(t>-1)u[t]=e.parse;else{let t=e.before?N(d,e.before):e.after?N(d,e.after)+1:d.length-1;u.splice(t,0,e.parse),d.splice(t,0,e.name)}}return r.wrap&&(p=p.concat(r.wrap)),new e(i,o,s,c,f,a,u,d,p)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new W(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function j(e){return e!=null&&e.length>0}function M(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=M(e[0]);if(e.length==1)return t;let n=M(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||P).concat(t||P),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function N(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var Ie=[g.none];for(let e=1,t;t=x[e];e++)Ie[e]=g.define({id:e,name:t,props:e>=x.Escape?[]:[[v.group,e in ge?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var P=[],Le=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return b.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},F=class{constructor(e,t,n,r=P){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new Le(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},Re=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return P}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function I(e,t,n,r){return new F(e,t,n,r)}var L={resolve:`Emphasis`,mark:`EmphasisMark`},R={resolve:`Emphasis`,mark:`EmphasisMark`},z={},B={},V=class{constructor(e,t,n,r,i=n-t){this.type=e,this.from=t,this.to=n,this.side=r,this.size=i}},ze=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,H=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{H=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var U={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(ze.charCodeAt(t)==r)return e.append(I(x.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(I(x.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(I(x.InlineCode,n,r+1,[I(x.CodeMark,n,n+i),I(x.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(I(x.Autolink,n,n+1+i[0].length,[I(x.LinkMark,n,n+1),I(x.URL,n+1,n+i[0].length),I(x.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(I(x.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(I(x.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(I(x.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=H.test(i),s=H.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new V(t==95?L:R,n,r,!!f|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(I(x.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(I(x.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new V(z,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new V(B,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof V&&(r.type==z||r.type==B)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=Be(e,i,r.type==z?x.Link:x.Image,r.from,n+1);if(r.type==z)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof V&&t.type==z&&(t.side=0)}return a.to}}return-1}};function Be(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(I(x.LinkMark,r,r+(n==x.Image?2:1))),t.push(I(x.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=Ve(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=He(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(I(x.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(I(x.LinkMark,n,s)))}else if(o==91){let n=Ue(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return I(n,r,s,t)}function Ve(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return I(x.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(S(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?I(x.URL,t+n,i+n):i==e.length&&null}}function He(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return I(x.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function Ue(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return!r&&I(x.LinkLabel,t+n,a+1+n);else{if(r&&!S(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var W=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new V(e,t,n,!!r|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof V&&(t.type==z||t.type==B))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof V&&n.type.resolve&&n.side&2))continue;let r=n.type==L||n.type==R,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof V&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.size+n.size)%3==0&&(e.size%3||n.size%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof F&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new V(a.type,a.from,l,a.side,a.size):null,(this.parts[t]=r&&n.to!=u?new V(n.type,u,n.to,n.side,n.size):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof F&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof V&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof V?t:null}skipSpace(e){return C(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?I(this.parser.getNodeType(e),t,n,r):new Re(e,t)}};W.linkStart=z,W.imageStart=B,W.emphasisAsterisk=R,W.emphasisUnderscore=L;function G(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof F&&(n[r]=new F(t.type,t.from,t.to,G(t.children,[e])))}else n.splice(r++,0,e)}return n}var We=[x.CodeBlock,x.ListItem,x.OrderedList,x.BulletList],Ge=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
7
- `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(v.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=Ke(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new b(e.parser.nodeSet.types[x.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(We.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function Ke(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var qe=n({"Blockquote/...":c.quote,HorizontalRule:c.contentSeparator,"ATXHeading1/... SetextHeading1/...":c.heading1,"ATXHeading2/... SetextHeading2/...":c.heading2,"ATXHeading3/...":c.heading3,"ATXHeading4/...":c.heading4,"ATXHeading5/...":c.heading5,"ATXHeading6/...":c.heading6,"Comment CommentBlock":c.comment,Escape:c.escape,Entity:c.character,"Emphasis/...":c.emphasis,"StrongEmphasis/...":c.strong,"Link/... Image/...":c.link,"OrderedList/... BulletList/...":c.list,"BlockQuote/...":c.quote,"InlineCode CodeText":c.monospace,"URL Autolink":c.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":c.processingInstruction,"CodeInfo LinkLabel":c.labelName,LinkTitle:c.string,Paragraph:c.content}),Je=new Fe(new ie(Ie).extend(qe),Object.keys(k).map(e=>k[e]),Object.keys(k).map(e=>Ae[e]),Object.keys(k),je,ge,Object.keys(U).map(e=>U[e]),Object.keys(U),[]);function Ye(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function Xe(e){let{codeParser:t,htmlParser:n}=e;return{wrap:ee((e,r)=>{let i=e.type.id;if(t&&(i==x.CodeBlock||i==x.FencedCode)){let n=``;if(i==x.FencedCode){let t=e.node.getChild(x.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==x.CodeText,bracketed:i==x.FencedCode}}else if(n&&(i==x.HTMLBlock||i==x.HTMLTag||i==x.CommentBlock))return{parser:n,overlay:Ye(e.node,e.from,e.to)};return null})}}var Ze={resolve:`Strikethrough`,mark:`StrikethroughMark`},Qe={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":c.strikethrough}},{name:`StrikethroughMark`,style:c.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=H.test(r),c=H.test(i);return e.addDelimiter(Ze,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function K(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function $e(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var et=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,tt=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&et.test(r=t.text.slice(t.pos))){let i=[];K(e,n.content,0,i,n.start)==K(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];K(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},nt={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":c.heading}},`TableRow`,{name:`TableCell`,style:c.content},{name:`TableDelimiter`,style:c.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return $e(t.content,0)?new tt:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof tt)||!$e(t.text,t.basePos))return!1;let r=e.peekLine();return et.test(r)&&K(e,t.text,t.basePos)==K(e,r,t.basePos)},before:`SetextHeading`}]},rt=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},it={defineNodes:[{name:`Task`,block:!0,style:c.list},{name:`TaskMarker`,style:c.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new rt:null},after:`SetextHeading`}]},at=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,ot=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,st=/[\w-]+\.[\w-]+($|[/:])/,ct=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,lt=/\/[a-zA-Z\d@.]+/gy;function ut(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function dt(e,t){ot.lastIndex=t;let n=ot.exec(e);if(!n||st.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&ut(e,t,r,`)`)>ut(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function ft(e,t){ct.lastIndex=t;let n=ct.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var pt=[nt,it,Qe,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;at.lastIndex=r;let i=at.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=dt(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=ft(e.text,r):(a=ft(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(lt.lastIndex=a,i=lt.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function mt(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),S(s))break}return-1}}var ht={defineNodes:[{name:`Superscript`,style:c.special(c.content)},{name:`SuperscriptMark`,style:c.processingInstruction}],parseInline:[{name:`Superscript`,parse:mt(94,`Superscript`,`SuperscriptMark`)}]},gt={defineNodes:[{name:`Subscript`,style:c.special(c.content)},{name:`SubscriptMark`,style:c.processingInstruction}],parseInline:[{name:`Subscript`,parse:mt(126,`Subscript`,`SubscriptMark`)}]},_t={defineNodes:[{name:`Emoji`,style:c.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},vt=e({html:()=>q,htmlCompletionSource:()=>St}),yt=g.define({id:0,name:`Document`,top:!0}),bt=class extends ue{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new b(yt,[],[],i-r)}}},xt=new ae(ne(),new bt,[],`html`);function q(e){return new y(xt)}function St(){return null}var Ct=e({commonmarkLanguage:()=>At,deleteMarkupBackward:()=>Ut,insertNewlineContinueMarkup:()=>Rt,insertNewlineContinueMarkupCommand:()=>Lt,markdown:()=>Kt,markdownKeymap:()=>Wt,markdownLanguage:()=>X,pasteURLAsLink:()=>Zt}),wt=ne({commentTokens:{block:{open:`<!--`,close:`-->`}}}),Tt=new v,Et=Je.configure({props:[re.add(e=>!e.is(`Block`)||e.is(`Document`)||J(e)!=null||Dt(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Tt.add(J),h.add({Document:()=>null}),i.add({Document:wt})]});function J(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Dt(e){return e.name==`OrderedList`||e.name==`BulletList`}function Ot(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=J(e.type))!=null&&r<=t)break;n=e}return n.to}var kt=p.of((e,t,n)=>{for(let r=a(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(Tt);if(e==null)continue;let t=Ot(r,e);if(t>n)return{from:n,to:t}}return null});function Y(e){return new ae(wt,e,[],`markdown`)}var At=Y(Et),X=Y(Et.configure([pt,gt,ht,_t,{props:[re.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function jt(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):m.matchLanguageName(e,n,!0),t instanceof m)return t.support?t.support.language.parser:le.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var Mt=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+Pt(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function Nt(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new Mt(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new Mt(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new Mt(i.parent,s,s+t,a[1],e,n,i))}}return r}function Pt(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Ft(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=Pt(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function It(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(d)!=` `)return e;let r=_(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var Lt=(e={})=>({state:t,dispatch:n})=>{let r=a(t),{doc:i}=t,o=null,c=t.changeByRange(n=>{if(!n.empty||!X.isActiveAt(t,n.from,-1)&&!X.isActiveAt(t,n.from,1))return o={range:n};let a=n.from,c=i.lineAt(a),l=Nt(r.resolveInner(a,-1),i);for(;l.length&&l[l.length-1].from>a-c.from;)l.pop();if(!l.length)return o={range:n};let u=l[l.length-1];if(u.to-u.spaceAfter.length>a-c.from)return o={range:n};let d=a>=u.to-u.spaceAfter.length&&!/\S/.test(c.text.slice(u.to));if(u.item&&d){if(u.item.from<c.from&&!/^[\s>]*$/.test(c.text.slice(0,u.to)))return o={range:n};let r=u.node.firstChild,d=u.node.getChild(`ListItem`,`ListItem`);if(r.to>=a||d&&d.to<a||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||e.nonTightLists===!1){let e=l.length>1?l[l.length-2]:null,t,n=``;e&&e.item?(t=c.from+e.from,n=e.marker(i,1)):t=c.from+(e?e.to:0);let r=[{from:t,to:a,insert:n}];return u.node.name==`OrderedList`&&Ft(u.item,i,r,-2),e&&e.node.name==`OrderedList`&&Ft(e.item,i,r),{range:s.cursor(t+n.length),changes:r}}{let e=Vt(l,t,c);return{range:s.cursor(a+e.length+1),changes:{from:c.from,insert:e+t.lineBreak}}}}if(u.node.name==`Blockquote`&&d&&c.from){let e=i.lineAt(c.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==u.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:c.from+u.from,to:c.to}]);return{range:n.map(i),changes:i}}}let f=[];u.node.name==`OrderedList`&&Ft(u.item,i,f);let p=u.item&&u.item.from<c.from,m=``;if(!p||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=u.to)for(let e=0,t=l.length-1;e<=t;e++)m+=e==t&&!p?l[e].marker(i,1):l[e].blank(e<t?_(c.text,4,l[e+1].from)-m.length:null);let h=a;for(;h>c.from&&/\s/.test(c.text.charAt(h-c.from-1));)h--;return m=It(m,t),Bt(u.node,t.doc)&&(m=Vt(l,t,c)+t.lineBreak+m),f.push({from:h,to:a,insert:t.lineBreak+m}),{range:s.cursor(h+m.length+1),changes:f}});return!o&&(n(t.update(c,{scrollIntoView:!0,userEvent:`input`})),!0)},Rt=Lt();function zt(e){return e.name==`QuoteMark`||e.name==`ListMark`}function Bt(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function Vt(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?_(n.text,4,e[t+1].from)-r.length:null,t<i);return It(r,t)}function Ht(e,t){let n=e.resolveInner(t,-1),r=t;zt(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(zt(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var Ut=({state:e,dispatch:t})=>{let n=a(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&X.isActiveAt(e,t.from)){let t=a.lineAt(i),r=Nt(Ht(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:s.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(_(t.text,4,n.to)-_(t.text,4,n.from));return r==t.from&&(i=It(i,e)),{range:s.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:s.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},Wt=[{key:`Enter`,run:Rt},{key:`Backspace`,run:Ut}],Gt=q({matchClosingTags:!1});function Kt(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=At,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=Gt}=e;if(!(a instanceof Fe))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],d=[c.support,kt],f;s&&d.push(Zt),n instanceof y?(d.push(n.support),f=n.language):n&&(f=n);let p=t||f?jt(t,f):void 0;l.push(Xe({codeParser:p,htmlParser:c.language.parser})),i&&d.push(u.high(r.of(Wt)));let m=Y(a.configure(l));return o&&d.push(m.data.of({autocomplete:qt})),new y(m,d)}function qt(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=a(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:Yt(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var Jt=null;function Yt(){if(Jt)return Jt;let e=St(new de(f.create({extensions:Gt}),0,!0));return Jt=e?e.options:[]}var Xt=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Zt=o.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!X.isActiveAt(t.state,n.from,1)))return!1;let i=a(t.state),o=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||Xt.test(e.name))&&(o=!0)},leave:e=>{e.to<n.to&&(o=!0)}}),!o&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function Z(e){return new y(te.define(e))}function Q(e){return t(()=>import(`./DIGvaVgJ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var Qt=[m.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return t(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),m.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return t(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),m.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Q(`Cassandra`)}}),m.of({name:`CSS`,extensions:[`css`],load(){return t(()=>import(`./DtbnBenW.js`).then(e=>e.css()),__vite__mapDeps([5,1,3]),import.meta.url)}}),m.of({name:`Go`,extensions:[`go`],load(){return t(()=>import(`./D_aBVMvK.js`).then(e=>e.go()),__vite__mapDeps([6,1,2,3]),import.meta.url)}}),m.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return t(()=>Promise.resolve().then(()=>vt).then(e=>e.html()),void 0,import.meta.url)}}),m.of({name:`Java`,extensions:[`java`],load(){return t(()=>import(`./Bbt0DTmZ.js`).then(e=>e.java()),__vite__mapDeps([7,1,3]),import.meta.url)}}),m.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript()),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return t(()=>import(`./BBU5FdEo.js`).then(e=>e.jinja()),__vite__mapDeps([9,1,3]),import.meta.url)}}),m.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return t(()=>import(`./CDAjAYjS.js`).then(e=>e.json()),__vite__mapDeps([10,1,3]),import.meta.url)}}),m.of({name:`JSX`,extensions:[`jsx`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`LESS`,extensions:[`less`],load(){return t(()=>import(`./_rHYGvON.js`).then(e=>e.less()),__vite__mapDeps([11,1,3,5]),import.meta.url)}}),m.of({name:`Liquid`,extensions:[`liquid`],load(){return t(()=>import(`./DeazQJkV.js`).then(e=>e.liquid()),__vite__mapDeps([12,1,3]),import.meta.url)}}),m.of({name:`MariaDB SQL`,load(){return Q(`MariaSQL`)}}),m.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return t(()=>Promise.resolve().then(()=>Ct).then(e=>e.markdown()),void 0,import.meta.url)}}),m.of({name:`MS SQL`,load(){return Q(`MSSQL`)}}),m.of({name:`MySQL`,load(){return Q(`MySQL`)}}),m.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return t(()=>import(`./NgkOM4d0.js`).then(e=>e.php()),__vite__mapDeps([13,1,3]),import.meta.url)}}),m.of({name:`PLSQL`,extensions:[`pls`],load(){return Q(`PLSQL`)}}),m.of({name:`PostgreSQL`,load(){return Q(`PostgreSQL`)}}),m.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return t(()=>import(`./Bffqt7tx.js`).then(e=>e.python()),__vite__mapDeps([14,1,2,3]),import.meta.url)}}),m.of({name:`Rust`,extensions:[`rs`],load(){return t(()=>import(`./BWonG38x.js`).then(e=>e.rust()),__vite__mapDeps([15,1,3]),import.meta.url)}}),m.of({name:`Sass`,extensions:[`sass`],load(){return t(()=>import(`./BEHa2uNW.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),m.of({name:`SCSS`,extensions:[`scss`],load(){return t(()=>import(`./BEHa2uNW.js`).then(e=>e.sass()),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),m.of({name:`SQL`,extensions:[`sql`],load(){return Q(`StandardSQL`)}}),m.of({name:`SQLite`,load(){return Q(`SQLite`)}}),m.of({name:`TSX`,extensions:[`tsx`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return t(()=>import(`./BPW39P52.js`).then(e=>e.wast()),__vite__mapDeps([17,1,3]),import.meta.url)}}),m.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return t(()=>import(`./Ds8Pkiic.js`).then(e=>e.xml()),__vite__mapDeps([18,1,3]),import.meta.url)}}),m.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return t(()=>import(`./CPF5uNy5.js`).then(e=>e.yaml()),__vite__mapDeps([19,1,3]),import.meta.url)}}),m.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return t(()=>import(`./gfMMiTNf.js`).then(e=>Z(e.apl)),[],import.meta.url)}}),m.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return t(()=>import(`./C_eisQCp.js`).then(e=>Z(e.asciiArmor)),[],import.meta.url)}}),m.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return t(()=>import(`./DCl_8MCW.js`).then(e=>Z(e.asn1({}))),[],import.meta.url)}}),m.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return t(()=>import(`./BEn0Cwpx.js`).then(e=>Z(e.asterisk)),[],import.meta.url)}}),m.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return t(()=>import(`./D5EjA2JK.js`).then(e=>Z(e.brainfuck)),[],import.meta.url)}}),m.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return t(()=>import(`./DHLQUbN7.js`).then(e=>Z(e.cobol)),[],import.meta.url)}}),m.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.csharp)),[],import.meta.url)}}),m.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return t(()=>import(`./BflJGmDX.js`).then(e=>Z(e.clojure)),[],import.meta.url)}}),m.of({name:`ClojureScript`,extensions:[`cljs`],load(){return t(()=>import(`./BflJGmDX.js`).then(e=>Z(e.clojure)),[],import.meta.url)}}),m.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return t(()=>import(`./CnaYoQib.js`).then(e=>Z(e.gss)),[],import.meta.url)}}),m.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return t(()=>import(`./84nbDH0I.js`).then(e=>Z(e.cmake)),[],import.meta.url)}}),m.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return t(()=>import(`./De_zI4J0.js`).then(e=>Z(e.coffeeScript)),[],import.meta.url)}}),m.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return t(()=>import(`./DgAKBe0r.js`).then(e=>Z(e.commonLisp)),[],import.meta.url)}}),m.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return t(()=>import(`./p9eYesGn.js`).then(e=>Z(e.cypher)),[],import.meta.url)}}),m.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return t(()=>import(`./B_1Jd8HM.js`).then(e=>Z(e.cython)),[],import.meta.url)}}),m.of({name:`Crystal`,extensions:[`cr`],load(){return t(()=>import(`./Bsdphhtm.js`).then(e=>Z(e.crystal)),[],import.meta.url)}}),m.of({name:`D`,extensions:[`d`],load(){return t(()=>import(`./DWkQyNnU.js`).then(e=>Z(e.d)),[],import.meta.url)}}),m.of({name:`Dart`,extensions:[`dart`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.dart)),[],import.meta.url)}}),m.of({name:`diff`,extensions:[`diff`,`patch`],load(){return t(()=>import(`./ChtP43wD.js`).then(e=>Z(e.diff)),[],import.meta.url)}}),m.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return t(()=>import(`./DLa7NjNO.js`).then(e=>Z(e.dockerFile)),__vite__mapDeps([20,21]),import.meta.url)}}),m.of({name:`DTD`,extensions:[`dtd`],load(){return t(()=>import(`./DTF72YNO.js`).then(e=>Z(e.dtd)),[],import.meta.url)}}),m.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return t(()=>import(`./S7ucR4pR.js`).then(e=>Z(e.dylan)),[],import.meta.url)}}),m.of({name:`EBNF`,load(){return t(()=>import(`./D4c0_ac3.js`).then(e=>Z(e.ebnf)),[],import.meta.url)}}),m.of({name:`ECL`,extensions:[`ecl`],load(){return t(()=>import(`./BVIeWmwY.js`).then(e=>Z(e.ecl)),[],import.meta.url)}}),m.of({name:`edn`,extensions:[`edn`],load(){return t(()=>import(`./BflJGmDX.js`).then(e=>Z(e.clojure)),[],import.meta.url)}}),m.of({name:`Eiffel`,extensions:[`e`],load(){return t(()=>import(`./BEjRio4Q.js`).then(e=>Z(e.eiffel)),[],import.meta.url)}}),m.of({name:`Elm`,extensions:[`elm`],load(){return t(()=>import(`./Cshzl8qu.js`).then(e=>Z(e.elm)),[],import.meta.url)}}),m.of({name:`Erlang`,extensions:[`erl`],load(){return t(()=>import(`./BV0c4Hdn.js`).then(e=>Z(e.erlang)),[],import.meta.url)}}),m.of({name:`Esper`,load(){return t(()=>import(`./DuQMFDvy.js`).then(e=>Z(e.esper)),[],import.meta.url)}}),m.of({name:`Factor`,extensions:[`factor`],load(){return t(()=>import(`./CygcOYNo.js`).then(e=>Z(e.factor)),__vite__mapDeps([22,21]),import.meta.url)}}),m.of({name:`FCL`,load(){return t(()=>import(`./ClOhbFR7.js`).then(e=>Z(e.fcl)),[],import.meta.url)}}),m.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return t(()=>import(`./D6RzAl64.js`).then(e=>Z(e.forth)),[],import.meta.url)}}),m.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return t(()=>import(`./Bt6PBEDR.js`).then(e=>Z(e.fortran)),[],import.meta.url)}}),m.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return t(()=>import(`./B45xgp2S.js`).then(e=>Z(e.fSharp)),[],import.meta.url)}}),m.of({name:`Gas`,extensions:[`s`],load(){return t(()=>import(`./BHEdbvp9.js`).then(e=>Z(e.gas)),[],import.meta.url)}}),m.of({name:`Gherkin`,extensions:[`feature`],load(){return t(()=>import(`./oBAE_ms0.js`).then(e=>Z(e.gherkin)),[],import.meta.url)}}),m.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return t(()=>import(`./CUpZ7dEl.js`).then(e=>Z(e.groovy)),[],import.meta.url)}}),m.of({name:`Haskell`,extensions:[`hs`],load(){return t(()=>import(`./BRsoo5mP.js`).then(e=>Z(e.haskell)),[],import.meta.url)}}),m.of({name:`Haxe`,extensions:[`hx`],load(){return t(()=>import(`./DjVOVvNP.js`).then(e=>Z(e.haxe)),[],import.meta.url)}}),m.of({name:`HXML`,extensions:[`hxml`],load(){return t(()=>import(`./DjVOVvNP.js`).then(e=>Z(e.hxml)),[],import.meta.url)}}),m.of({name:`HTTP`,load(){return t(()=>import(`./CLVgA2GD.js`).then(e=>Z(e.http)),[],import.meta.url)}}),m.of({name:`IDL`,extensions:[`pro`],load(){return t(()=>import(`./BUZw3wgd.js`).then(e=>Z(e.idl)),[],import.meta.url)}}),m.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return t(()=>import(`./Bu8mWwtz.js`).then(e=>Z(e.jsonld)),[],import.meta.url)}}),m.of({name:`Julia`,extensions:[`jl`],load(){return t(()=>import(`./CQfgDRfP.js`).then(e=>Z(e.julia)),[],import.meta.url)}}),m.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.kotlin)),[],import.meta.url)}}),m.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return t(()=>import(`./BXxG0Yva.js`).then(e=>Z(e.liveScript)),[],import.meta.url)}}),m.of({name:`Lua`,extensions:[`lua`],load(){return t(()=>import(`./DPCEkfD_.js`).then(e=>Z(e.lua)),[],import.meta.url)}}),m.of({name:`mIRC`,extensions:[`mrc`],load(){return t(()=>import(`./C9zpzAZU.js`).then(e=>Z(e.mirc)),[],import.meta.url)}}),m.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return t(()=>import(`./u8YMmbU0.js`).then(e=>Z(e.mathematica)),[],import.meta.url)}}),m.of({name:`Modelica`,extensions:[`mo`],load(){return t(()=>import(`./CqHI_q-D.js`).then(e=>Z(e.modelica)),[],import.meta.url)}}),m.of({name:`MUMPS`,extensions:[`mps`],load(){return t(()=>import(`./BSzj6Xyz.js`).then(e=>Z(e.mumps)),[],import.meta.url)}}),m.of({name:`Mbox`,extensions:[`mbox`],load(){return t(()=>import(`./BEMVcqjs.js`).then(e=>Z(e.mbox)),[],import.meta.url)}}),m.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return t(()=>import(`./8H7HVH4w.js`).then(e=>Z(e.nginx)),[],import.meta.url)}}),m.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return t(()=>import(`./GwMd3KmG.js`).then(e=>Z(e.nsis)),__vite__mapDeps([23,21]),import.meta.url)}}),m.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return t(()=>import(`./CzMBulkp.js`).then(e=>Z(e.ntriples)),[],import.meta.url)}}),m.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.objectiveC)),[],import.meta.url)}}),m.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.objectiveCpp)),[],import.meta.url)}}),m.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return t(()=>import(`./B45xgp2S.js`).then(e=>Z(e.oCaml)),[],import.meta.url)}}),m.of({name:`Octave`,extensions:[`m`],load(){return t(()=>import(`./D2Q8cUp1.js`).then(e=>Z(e.octave)),[],import.meta.url)}}),m.of({name:`Oz`,extensions:[`oz`],load(){return t(()=>import(`./BwTct_5T.js`).then(e=>Z(e.oz)),[],import.meta.url)}}),m.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return t(()=>import(`./Dp_KdFgX.js`).then(e=>Z(e.pascal)),[],import.meta.url)}}),m.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return t(()=>import(`./BkSkiI9m.js`).then(e=>Z(e.perl)),[],import.meta.url)}}),m.of({name:`Pig`,extensions:[`pig`],load(){return t(()=>import(`./AF4Hwhju.js`).then(e=>Z(e.pig)),[],import.meta.url)}}),m.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return t(()=>import(`./D8WpQPaX.js`).then(e=>Z(e.powerShell)),[],import.meta.url)}}),m.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return t(()=>import(`./C357ku5U.js`).then(e=>Z(e.properties)),[],import.meta.url)}}),m.of({name:`ProtoBuf`,extensions:[`proto`],load(){return t(()=>import(`./D1ij_kNL.js`).then(e=>Z(e.protobuf)),[],import.meta.url)}}),m.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return t(()=>import(`./Cp5ooBfH.js`).then(e=>Z(e.pug)),__vite__mapDeps([24,25]),import.meta.url)}}),m.of({name:`Puppet`,extensions:[`pp`],load(){return t(()=>import(`./BZyAS7I4.js`).then(e=>Z(e.puppet)),[],import.meta.url)}}),m.of({name:`Q`,extensions:[`q`],load(){return t(()=>import(`./B9NhS7L_.js`).then(e=>Z(e.q)),[],import.meta.url)}}),m.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return t(()=>import(`./CxDmU1I4.js`).then(e=>Z(e.r)),[],import.meta.url)}}),m.of({name:`RPM Changes`,load(){return t(()=>import(`./gpDK5sbt.js`).then(e=>Z(e.rpmChanges)),[],import.meta.url)}}),m.of({name:`RPM Spec`,extensions:[`spec`],load(){return t(()=>import(`./gpDK5sbt.js`).then(e=>Z(e.rpmSpec)),[],import.meta.url)}}),m.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return t(()=>import(`./ChfNwlCY.js`).then(e=>Z(e.ruby)),[],import.meta.url)}}),m.of({name:`SAS`,extensions:[`sas`],load(){return t(()=>import(`./C2OyD2Y6.js`).then(e=>Z(e.sas)),[],import.meta.url)}}),m.of({name:`Scala`,extensions:[`scala`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.scala)),[],import.meta.url)}}),m.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return t(()=>import(`./D9qYN0V5.js`).then(e=>Z(e.scheme)),[],import.meta.url)}}),m.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return t(()=>import(`./DwuoZtxw.js`).then(e=>Z(e.shell)),[],import.meta.url)}}),m.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return t(()=>import(`./tLWDfEkZ.js`).then(e=>Z(e.sieve)),[],import.meta.url)}}),m.of({name:`Smalltalk`,extensions:[`st`],load(){return t(()=>import(`./BLp5-jwC.js`).then(e=>Z(e.smalltalk)),[],import.meta.url)}}),m.of({name:`Solr`,load(){return t(()=>import(`./B78wSQJQ.js`).then(e=>Z(e.solr)),[],import.meta.url)}}),m.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return t(()=>import(`./B45xgp2S.js`).then(e=>Z(e.sml)),[],import.meta.url)}}),m.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return t(()=>import(`./Dz-mlCAC.js`).then(e=>Z(e.sparql)),[],import.meta.url)}}),m.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return t(()=>import(`./CTIncYxj.js`).then(e=>Z(e.spreadsheet)),[],import.meta.url)}}),m.of({name:`Squirrel`,extensions:[`nut`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.squirrel)),[],import.meta.url)}}),m.of({name:`Stylus`,extensions:[`styl`],load(){return t(()=>import(`./BOVgKnng.js`).then(e=>Z(e.stylus)),[],import.meta.url)}}),m.of({name:`Swift`,extensions:[`swift`],load(){return t(()=>import(`./DKB6_1j6.js`).then(e=>Z(e.swift)),[],import.meta.url)}}),m.of({name:`sTeX`,load(){return t(()=>import(`./DNzd62Q_.js`).then(e=>Z(e.stex)),[],import.meta.url)}}),m.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return t(()=>import(`./DNzd62Q_.js`).then(e=>Z(e.stex)),[],import.meta.url)}}),m.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return t(()=>import(`./CjI9Y6RI.js`).then(e=>Z(e.verilog)),[],import.meta.url)}}),m.of({name:`Tcl`,extensions:[`tcl`],load(){return t(()=>import(`./BGfruO1u.js`).then(e=>Z(e.tcl)),[],import.meta.url)}}),m.of({name:`Textile`,extensions:[`textile`],load(){return t(()=>import(`./C4jVoHG1.js`).then(e=>Z(e.textile)),[],import.meta.url)}}),m.of({name:`TiddlyWiki`,load(){return t(()=>import(`./VlUiK86J.js`).then(e=>Z(e.tiddlyWiki)),[],import.meta.url)}}),m.of({name:`Tiki wiki`,load(){return t(()=>import(`./DTszW0OQ.js`).then(e=>Z(e.tiki)),[],import.meta.url)}}),m.of({name:`TOML`,extensions:[`toml`],load(){return t(()=>import(`./BPTmHmyx.js`).then(e=>Z(e.toml)),[],import.meta.url)}}),m.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return t(()=>import(`./C2dAgh7P.js`).then(e=>Z(e.troff)),[],import.meta.url)}}),m.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return t(()=>import(`./PPSTk1ow.js`).then(e=>Z(e.ttcn)),[],import.meta.url)}}),m.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return t(()=>import(`./2b4Gb5sE.js`).then(e=>Z(e.ttcnCfg)),[],import.meta.url)}}),m.of({name:`Turtle`,extensions:[`ttl`],load(){return t(()=>import(`./Cx3rYX2g.js`).then(e=>Z(e.turtle)),[],import.meta.url)}}),m.of({name:`Web IDL`,extensions:[`webidl`],load(){return t(()=>import(`./D5jiJvOU.js`).then(e=>Z(e.webIDL)),[],import.meta.url)}}),m.of({name:`VB.NET`,extensions:[`vb`],load(){return t(()=>import(`./BthdM_4N.js`).then(e=>Z(e.vb)),[],import.meta.url)}}),m.of({name:`VBScript`,extensions:[`vbs`],load(){return t(()=>import(`./D9f6rSsU.js`).then(e=>Z(e.vbScript)),[],import.meta.url)}}),m.of({name:`Velocity`,extensions:[`vtl`],load(){return t(()=>import(`./CqftRsjg.js`).then(e=>Z(e.velocity)),[],import.meta.url)}}),m.of({name:`Verilog`,extensions:[`v`],load(){return t(()=>import(`./CjI9Y6RI.js`).then(e=>Z(e.verilog)),[],import.meta.url)}}),m.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return t(()=>import(`./kS471soi.js`).then(e=>Z(e.vhdl)),[],import.meta.url)}}),m.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return t(()=>import(`./BKJx4mf9.js`).then(e=>Z(e.xQuery)),[],import.meta.url)}}),m.of({name:`Yacas`,extensions:[`ys`],load(){return t(()=>import(`./CXXgtw0p.js`).then(e=>Z(e.yacas)),[],import.meta.url)}}),m.of({name:`Z80`,extensions:[`z80`],load(){return t(()=>import(`./Co3PbHdE.js`).then(e=>Z(e.z80)),[],import.meta.url)}}),m.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return t(()=>import(`./qgSLujhx.js`).then(e=>Z(e.mscgen)),[],import.meta.url)}}),m.of({name:`Xù`,extensions:[`xu`],load(){return t(()=>import(`./qgSLujhx.js`).then(e=>Z(e.xu)),[],import.meta.url)}}),m.of({name:`MsGenny`,extensions:[`msgenny`],load(){return t(()=>import(`./qgSLujhx.js`).then(e=>Z(e.msgenny)),[],import.meta.url)}}),m.of({name:`Vue`,extensions:[`vue`],load(){return t(()=>import(`./BBhr3bLI.js`).then(e=>e.vue()),__vite__mapDeps([26,1,3,8,2]),import.meta.url)}}),m.of({name:`Angular Template`,load(){return t(()=>import(`./CMN7rSZK.js`).then(e=>e.angular()),__vite__mapDeps([27,1,3,8,2]),import.meta.url)}})],$t=oe([{tag:c.keyword,class:`tok-k`},{tag:[c.string,c.regexp,c.special(c.string)],class:`tok-s`},{tag:[c.number,c.bool,c.null,c.atom],class:`tok-n`},{tag:[c.typeName,c.className,c.namespace],class:`tok-t`},{tag:c.comment,class:`tok-c`}]),en={style:e=>$t.style(e),scope:e=>e.prop(i)!==X.data};function tn(e){let t=e.trim().split(/\s/)[0]??``;return t?m.matchLanguageName(Qt,t,!1):null}var $=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);function nn(e,t){let n=tn(t)?.support;if(!n)return null;let r=``,i=ce(f.create({doc:e,extensions:[n]}),e.length,500)??n.language.parser.parse(e);return se(e,i,en,(e,t)=>{r+=t?`<span class="${t}">${$(e)}</span>`:$(e)},()=>{r+=`
7
+ `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(v.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=Ke(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new b(e.parser.nodeSet.types[x.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(We.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function Ke(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var qe=n({"Blockquote/...":c.quote,HorizontalRule:c.contentSeparator,"ATXHeading1/... SetextHeading1/...":c.heading1,"ATXHeading2/... SetextHeading2/...":c.heading2,"ATXHeading3/...":c.heading3,"ATXHeading4/...":c.heading4,"ATXHeading5/...":c.heading5,"ATXHeading6/...":c.heading6,"Comment CommentBlock":c.comment,Escape:c.escape,Entity:c.character,"Emphasis/...":c.emphasis,"StrongEmphasis/...":c.strong,"Link/... Image/...":c.link,"OrderedList/... BulletList/...":c.list,"BlockQuote/...":c.quote,"InlineCode CodeText":c.monospace,"URL Autolink":c.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":c.processingInstruction,"CodeInfo LinkLabel":c.labelName,LinkTitle:c.string,Paragraph:c.content}),Je=new Fe(new ie(Ie).extend(qe),Object.keys(k).map(e=>k[e]),Object.keys(k).map(e=>Ae[e]),Object.keys(k),je,ge,Object.keys(U).map(e=>U[e]),Object.keys(U),[]);function Ye(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function Xe(e){let{codeParser:t,htmlParser:n}=e;return{wrap:ee((e,r)=>{let i=e.type.id;if(t&&(i==x.CodeBlock||i==x.FencedCode)){let n=``;if(i==x.FencedCode){let t=e.node.getChild(x.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==x.CodeText,bracketed:i==x.FencedCode}}else if(n&&(i==x.HTMLBlock||i==x.HTMLTag||i==x.CommentBlock))return{parser:n,overlay:Ye(e.node,e.from,e.to)};return null})}}var Ze={resolve:`Strikethrough`,mark:`StrikethroughMark`},Qe={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":c.strikethrough}},{name:`StrikethroughMark`,style:c.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=H.test(r),c=H.test(i);return e.addDelimiter(Ze,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function K(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function $e(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var et=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,tt=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&et.test(r=t.text.slice(t.pos))){let i=[];K(e,n.content,0,i,n.start)==K(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];K(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},nt={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":c.heading}},`TableRow`,{name:`TableCell`,style:c.content},{name:`TableDelimiter`,style:c.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return $e(t.content,0)?new tt:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof tt)||!$e(t.text,t.basePos))return!1;let r=e.peekLine();return et.test(r)&&K(e,t.text,t.basePos)==K(e,r,t.basePos)},before:`SetextHeading`}]},rt=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},it={defineNodes:[{name:`Task`,block:!0,style:c.list},{name:`TaskMarker`,style:c.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new rt:null},after:`SetextHeading`}]},at=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,ot=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,st=/[\w-]+\.[\w-]+($|[/:])/,ct=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,lt=/\/[a-zA-Z\d@.]+/gy;function ut(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function dt(e,t){ot.lastIndex=t;let n=ot.exec(e);if(!n||st.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&ut(e,t,r,`)`)>ut(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function ft(e,t){ct.lastIndex=t;let n=ct.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var pt=[nt,it,Qe,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;at.lastIndex=r;let i=at.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=dt(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=ft(e.text,r):(a=ft(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(lt.lastIndex=a,i=lt.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function mt(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),S(s))break}return-1}}var ht={defineNodes:[{name:`Superscript`,style:c.special(c.content)},{name:`SuperscriptMark`,style:c.processingInstruction}],parseInline:[{name:`Superscript`,parse:mt(94,`Superscript`,`SuperscriptMark`)}]},gt={defineNodes:[{name:`Subscript`,style:c.special(c.content)},{name:`SubscriptMark`,style:c.processingInstruction}],parseInline:[{name:`Subscript`,parse:mt(126,`Subscript`,`SubscriptMark`)}]},_t={defineNodes:[{name:`Emoji`,style:c.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},vt=e({html:()=>q,htmlCompletionSource:()=>St}),yt=g.define({id:0,name:`Document`,top:!0}),bt=class extends ue{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new b(yt,[],[],i-r)}}},xt=new ae(ne(),new bt,[],`html`);function q(e){return new y(xt)}function St(){return null}var Ct=e({commonmarkLanguage:()=>At,deleteMarkupBackward:()=>Ut,insertNewlineContinueMarkup:()=>Rt,insertNewlineContinueMarkupCommand:()=>Lt,markdown:()=>Kt,markdownKeymap:()=>Wt,markdownLanguage:()=>X,pasteURLAsLink:()=>Zt}),wt=ne({commentTokens:{block:{open:`<!--`,close:`-->`}}}),Tt=new v,Et=Je.configure({props:[re.add(e=>!e.is(`Block`)||e.is(`Document`)||J(e)!=null||Dt(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Tt.add(J),h.add({Document:()=>null}),i.add({Document:wt})]});function J(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Dt(e){return e.name==`OrderedList`||e.name==`BulletList`}function Ot(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=J(e.type))!=null&&r<=t)break;n=e}return n.to}var kt=p.of((e,t,n)=>{for(let r=a(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(Tt);if(e==null)continue;let t=Ot(r,e);if(t>n)return{from:n,to:t}}return null});function Y(e){return new ae(wt,e,[],`markdown`)}var At=Y(Et),X=Y(Et.configure([pt,gt,ht,_t,{props:[re.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function jt(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):m.matchLanguageName(e,n,!0),t instanceof m)return t.support?t.support.language.parser:le.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var Mt=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+Pt(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function Nt(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new Mt(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new Mt(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new Mt(i.parent,s,s+t,a[1],e,n,i))}}return r}function Pt(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Ft(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=Pt(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function It(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(d)!=` `)return e;let r=_(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var Lt=(e={})=>({state:t,dispatch:n})=>{let r=a(t),{doc:i}=t,o=null,c=t.changeByRange(n=>{if(!n.empty||!X.isActiveAt(t,n.from,-1)&&!X.isActiveAt(t,n.from,1))return o={range:n};let a=n.from,c=i.lineAt(a),l=Nt(r.resolveInner(a,-1),i);for(;l.length&&l[l.length-1].from>a-c.from;)l.pop();if(!l.length)return o={range:n};let u=l[l.length-1];if(u.to-u.spaceAfter.length>a-c.from)return o={range:n};let d=a>=u.to-u.spaceAfter.length&&!/\S/.test(c.text.slice(u.to));if(u.item&&d){if(u.item.from<c.from&&!/^[\s>]*$/.test(c.text.slice(0,u.to)))return o={range:n};let r=u.node.firstChild,d=u.node.getChild(`ListItem`,`ListItem`);if(r.to>=a||d&&d.to<a||c.from>0&&!/[^\s>]/.test(i.lineAt(c.from-1).text)||e.nonTightLists===!1){let e=l.length>1?l[l.length-2]:null,t,n=``;e&&e.item?(t=c.from+e.from,n=e.marker(i,1)):t=c.from+(e?e.to:0);let r=[{from:t,to:a,insert:n}];return u.node.name==`OrderedList`&&Ft(u.item,i,r,-2),e&&e.node.name==`OrderedList`&&Ft(e.item,i,r),{range:s.cursor(t+n.length),changes:r}}{let e=Vt(l,t,c);return{range:s.cursor(a+e.length+1),changes:{from:c.from,insert:e+t.lineBreak}}}}if(u.node.name==`Blockquote`&&d&&c.from){let e=i.lineAt(c.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==u.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:c.from+u.from,to:c.to}]);return{range:n.map(i),changes:i}}}let f=[];u.node.name==`OrderedList`&&Ft(u.item,i,f);let p=u.item&&u.item.from<c.from,m=``;if(!p||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=u.to)for(let e=0,t=l.length-1;e<=t;e++)m+=e==t&&!p?l[e].marker(i,1):l[e].blank(e<t?_(c.text,4,l[e+1].from)-m.length:null);let h=a;for(;h>c.from&&/\s/.test(c.text.charAt(h-c.from-1));)h--;return m=It(m,t),Bt(u.node,t.doc)&&(m=Vt(l,t,c)+t.lineBreak+m),f.push({from:h,to:a,insert:t.lineBreak+m}),{range:s.cursor(h+m.length+1),changes:f}});return!o&&(n(t.update(c,{scrollIntoView:!0,userEvent:`input`})),!0)},Rt=Lt();function zt(e){return e.name==`QuoteMark`||e.name==`ListMark`}function Bt(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function Vt(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?_(n.text,4,e[t+1].from)-r.length:null,t<i);return It(r,t)}function Ht(e,t){let n=e.resolveInner(t,-1),r=t;zt(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(zt(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var Ut=({state:e,dispatch:t})=>{let n=a(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&X.isActiveAt(e,t.from)){let t=a.lineAt(i),r=Nt(Ht(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:s.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(_(t.text,4,n.to)-_(t.text,4,n.from));return r==t.from&&(i=It(i,e)),{range:s.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:s.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},Wt=[{key:`Enter`,run:Rt},{key:`Backspace`,run:Ut}],Gt=q({matchClosingTags:!1});function Kt(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=At,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=Gt}=e;if(!(a instanceof Fe))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],d=[c.support,kt],f;s&&d.push(Zt),n instanceof y?(d.push(n.support),f=n.language):n&&(f=n);let p=t||f?jt(t,f):void 0;l.push(Xe({codeParser:p,htmlParser:c.language.parser})),i&&d.push(u.high(r.of(Wt)));let m=Y(a.configure(l));return o&&d.push(m.data.of({autocomplete:qt})),new y(m,d)}function qt(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=a(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:Yt(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var Jt=null;function Yt(){if(Jt)return Jt;let e=St(new de(f.create({extensions:Gt}),0,!0));return Jt=e?e.options:[]}var Xt=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Zt=o.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!X.isActiveAt(t.state,n.from,1)))return!1;let i=a(t.state),o=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||Xt.test(e.name))&&(o=!0)},leave:e=>{e.to<n.to&&(o=!0)}}),!o&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function Z(e){return new y(te.define(e))}function Q(e){return t(()=>import(`./DIGvaVgJ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var Qt=[m.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return t(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),m.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return t(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),m.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Q(`Cassandra`)}}),m.of({name:`CSS`,extensions:[`css`],load(){return t(()=>import(`./DtbnBenW.js`).then(e=>e.css()),__vite__mapDeps([5,1,3]),import.meta.url)}}),m.of({name:`Go`,extensions:[`go`],load(){return t(()=>import(`./D_aBVMvK.js`).then(e=>e.go()),__vite__mapDeps([6,1,2,3]),import.meta.url)}}),m.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return t(()=>Promise.resolve().then(()=>vt).then(e=>e.html()),void 0,import.meta.url)}}),m.of({name:`Java`,extensions:[`java`],load(){return t(()=>import(`./Bbt0DTmZ.js`).then(e=>e.java()),__vite__mapDeps([7,1,3]),import.meta.url)}}),m.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript()),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return t(()=>import(`./C74H8jNb.js`).then(e=>e.jinja()),__vite__mapDeps([9,1,3]),import.meta.url)}}),m.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return t(()=>import(`./CDAjAYjS.js`).then(e=>e.json()),__vite__mapDeps([10,1,3]),import.meta.url)}}),m.of({name:`JSX`,extensions:[`jsx`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`LESS`,extensions:[`less`],load(){return t(()=>import(`./_rHYGvON.js`).then(e=>e.less()),__vite__mapDeps([11,1,3,5]),import.meta.url)}}),m.of({name:`Liquid`,extensions:[`liquid`],load(){return t(()=>import(`./DqnDX3G8.js`).then(e=>e.liquid()),__vite__mapDeps([12,1,3]),import.meta.url)}}),m.of({name:`MariaDB SQL`,load(){return Q(`MariaSQL`)}}),m.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return t(()=>Promise.resolve().then(()=>Ct).then(e=>e.markdown()),void 0,import.meta.url)}}),m.of({name:`MS SQL`,load(){return Q(`MSSQL`)}}),m.of({name:`MySQL`,load(){return Q(`MySQL`)}}),m.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return t(()=>import(`./BF1TezEe.js`).then(e=>e.php()),__vite__mapDeps([13,1,3]),import.meta.url)}}),m.of({name:`PLSQL`,extensions:[`pls`],load(){return Q(`PLSQL`)}}),m.of({name:`PostgreSQL`,load(){return Q(`PostgreSQL`)}}),m.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return t(()=>import(`./Bffqt7tx.js`).then(e=>e.python()),__vite__mapDeps([14,1,2,3]),import.meta.url)}}),m.of({name:`Rust`,extensions:[`rs`],load(){return t(()=>import(`./BWonG38x.js`).then(e=>e.rust()),__vite__mapDeps([15,1,3]),import.meta.url)}}),m.of({name:`Sass`,extensions:[`sass`],load(){return t(()=>import(`./BEHa2uNW.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),m.of({name:`SCSS`,extensions:[`scss`],load(){return t(()=>import(`./BEHa2uNW.js`).then(e=>e.sass()),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),m.of({name:`SQL`,extensions:[`sql`],load(){return Q(`StandardSQL`)}}),m.of({name:`SQLite`,load(){return Q(`SQLite`)}}),m.of({name:`TSX`,extensions:[`tsx`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return t(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),m.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return t(()=>import(`./BPW39P52.js`).then(e=>e.wast()),__vite__mapDeps([17,1,3]),import.meta.url)}}),m.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return t(()=>import(`./Ds8Pkiic.js`).then(e=>e.xml()),__vite__mapDeps([18,1,3]),import.meta.url)}}),m.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return t(()=>import(`./CPF5uNy5.js`).then(e=>e.yaml()),__vite__mapDeps([19,1,3]),import.meta.url)}}),m.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return t(()=>import(`./gfMMiTNf.js`).then(e=>Z(e.apl)),[],import.meta.url)}}),m.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return t(()=>import(`./C_eisQCp.js`).then(e=>Z(e.asciiArmor)),[],import.meta.url)}}),m.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return t(()=>import(`./DCl_8MCW.js`).then(e=>Z(e.asn1({}))),[],import.meta.url)}}),m.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return t(()=>import(`./BEn0Cwpx.js`).then(e=>Z(e.asterisk)),[],import.meta.url)}}),m.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return t(()=>import(`./D5EjA2JK.js`).then(e=>Z(e.brainfuck)),[],import.meta.url)}}),m.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return t(()=>import(`./DHLQUbN7.js`).then(e=>Z(e.cobol)),[],import.meta.url)}}),m.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.csharp)),[],import.meta.url)}}),m.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return t(()=>import(`./BflJGmDX.js`).then(e=>Z(e.clojure)),[],import.meta.url)}}),m.of({name:`ClojureScript`,extensions:[`cljs`],load(){return t(()=>import(`./BflJGmDX.js`).then(e=>Z(e.clojure)),[],import.meta.url)}}),m.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return t(()=>import(`./CnaYoQib.js`).then(e=>Z(e.gss)),[],import.meta.url)}}),m.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return t(()=>import(`./84nbDH0I.js`).then(e=>Z(e.cmake)),[],import.meta.url)}}),m.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return t(()=>import(`./De_zI4J0.js`).then(e=>Z(e.coffeeScript)),[],import.meta.url)}}),m.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return t(()=>import(`./DgAKBe0r.js`).then(e=>Z(e.commonLisp)),[],import.meta.url)}}),m.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return t(()=>import(`./p9eYesGn.js`).then(e=>Z(e.cypher)),[],import.meta.url)}}),m.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return t(()=>import(`./B_1Jd8HM.js`).then(e=>Z(e.cython)),[],import.meta.url)}}),m.of({name:`Crystal`,extensions:[`cr`],load(){return t(()=>import(`./Bsdphhtm.js`).then(e=>Z(e.crystal)),[],import.meta.url)}}),m.of({name:`D`,extensions:[`d`],load(){return t(()=>import(`./DWkQyNnU.js`).then(e=>Z(e.d)),[],import.meta.url)}}),m.of({name:`Dart`,extensions:[`dart`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.dart)),[],import.meta.url)}}),m.of({name:`diff`,extensions:[`diff`,`patch`],load(){return t(()=>import(`./ChtP43wD.js`).then(e=>Z(e.diff)),[],import.meta.url)}}),m.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return t(()=>import(`./DLa7NjNO.js`).then(e=>Z(e.dockerFile)),__vite__mapDeps([20,21]),import.meta.url)}}),m.of({name:`DTD`,extensions:[`dtd`],load(){return t(()=>import(`./DTF72YNO.js`).then(e=>Z(e.dtd)),[],import.meta.url)}}),m.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return t(()=>import(`./S7ucR4pR.js`).then(e=>Z(e.dylan)),[],import.meta.url)}}),m.of({name:`EBNF`,load(){return t(()=>import(`./D4c0_ac3.js`).then(e=>Z(e.ebnf)),[],import.meta.url)}}),m.of({name:`ECL`,extensions:[`ecl`],load(){return t(()=>import(`./BVIeWmwY.js`).then(e=>Z(e.ecl)),[],import.meta.url)}}),m.of({name:`edn`,extensions:[`edn`],load(){return t(()=>import(`./BflJGmDX.js`).then(e=>Z(e.clojure)),[],import.meta.url)}}),m.of({name:`Eiffel`,extensions:[`e`],load(){return t(()=>import(`./BEjRio4Q.js`).then(e=>Z(e.eiffel)),[],import.meta.url)}}),m.of({name:`Elm`,extensions:[`elm`],load(){return t(()=>import(`./Cshzl8qu.js`).then(e=>Z(e.elm)),[],import.meta.url)}}),m.of({name:`Erlang`,extensions:[`erl`],load(){return t(()=>import(`./BV0c4Hdn.js`).then(e=>Z(e.erlang)),[],import.meta.url)}}),m.of({name:`Esper`,load(){return t(()=>import(`./DuQMFDvy.js`).then(e=>Z(e.esper)),[],import.meta.url)}}),m.of({name:`Factor`,extensions:[`factor`],load(){return t(()=>import(`./CygcOYNo.js`).then(e=>Z(e.factor)),__vite__mapDeps([22,21]),import.meta.url)}}),m.of({name:`FCL`,load(){return t(()=>import(`./ClOhbFR7.js`).then(e=>Z(e.fcl)),[],import.meta.url)}}),m.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return t(()=>import(`./D6RzAl64.js`).then(e=>Z(e.forth)),[],import.meta.url)}}),m.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return t(()=>import(`./Bt6PBEDR.js`).then(e=>Z(e.fortran)),[],import.meta.url)}}),m.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return t(()=>import(`./B45xgp2S.js`).then(e=>Z(e.fSharp)),[],import.meta.url)}}),m.of({name:`Gas`,extensions:[`s`],load(){return t(()=>import(`./BHEdbvp9.js`).then(e=>Z(e.gas)),[],import.meta.url)}}),m.of({name:`Gherkin`,extensions:[`feature`],load(){return t(()=>import(`./oBAE_ms0.js`).then(e=>Z(e.gherkin)),[],import.meta.url)}}),m.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return t(()=>import(`./CUpZ7dEl.js`).then(e=>Z(e.groovy)),[],import.meta.url)}}),m.of({name:`Haskell`,extensions:[`hs`],load(){return t(()=>import(`./BRsoo5mP.js`).then(e=>Z(e.haskell)),[],import.meta.url)}}),m.of({name:`Haxe`,extensions:[`hx`],load(){return t(()=>import(`./DjVOVvNP.js`).then(e=>Z(e.haxe)),[],import.meta.url)}}),m.of({name:`HXML`,extensions:[`hxml`],load(){return t(()=>import(`./DjVOVvNP.js`).then(e=>Z(e.hxml)),[],import.meta.url)}}),m.of({name:`HTTP`,load(){return t(()=>import(`./CLVgA2GD.js`).then(e=>Z(e.http)),[],import.meta.url)}}),m.of({name:`IDL`,extensions:[`pro`],load(){return t(()=>import(`./BUZw3wgd.js`).then(e=>Z(e.idl)),[],import.meta.url)}}),m.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return t(()=>import(`./Bu8mWwtz.js`).then(e=>Z(e.jsonld)),[],import.meta.url)}}),m.of({name:`Julia`,extensions:[`jl`],load(){return t(()=>import(`./CQfgDRfP.js`).then(e=>Z(e.julia)),[],import.meta.url)}}),m.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.kotlin)),[],import.meta.url)}}),m.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return t(()=>import(`./BXxG0Yva.js`).then(e=>Z(e.liveScript)),[],import.meta.url)}}),m.of({name:`Lua`,extensions:[`lua`],load(){return t(()=>import(`./DPCEkfD_.js`).then(e=>Z(e.lua)),[],import.meta.url)}}),m.of({name:`mIRC`,extensions:[`mrc`],load(){return t(()=>import(`./C9zpzAZU.js`).then(e=>Z(e.mirc)),[],import.meta.url)}}),m.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return t(()=>import(`./u8YMmbU0.js`).then(e=>Z(e.mathematica)),[],import.meta.url)}}),m.of({name:`Modelica`,extensions:[`mo`],load(){return t(()=>import(`./CqHI_q-D.js`).then(e=>Z(e.modelica)),[],import.meta.url)}}),m.of({name:`MUMPS`,extensions:[`mps`],load(){return t(()=>import(`./BSzj6Xyz.js`).then(e=>Z(e.mumps)),[],import.meta.url)}}),m.of({name:`Mbox`,extensions:[`mbox`],load(){return t(()=>import(`./BEMVcqjs.js`).then(e=>Z(e.mbox)),[],import.meta.url)}}),m.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return t(()=>import(`./8H7HVH4w.js`).then(e=>Z(e.nginx)),[],import.meta.url)}}),m.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return t(()=>import(`./GwMd3KmG.js`).then(e=>Z(e.nsis)),__vite__mapDeps([23,21]),import.meta.url)}}),m.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return t(()=>import(`./CzMBulkp.js`).then(e=>Z(e.ntriples)),[],import.meta.url)}}),m.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.objectiveC)),[],import.meta.url)}}),m.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.objectiveCpp)),[],import.meta.url)}}),m.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return t(()=>import(`./B45xgp2S.js`).then(e=>Z(e.oCaml)),[],import.meta.url)}}),m.of({name:`Octave`,extensions:[`m`],load(){return t(()=>import(`./D2Q8cUp1.js`).then(e=>Z(e.octave)),[],import.meta.url)}}),m.of({name:`Oz`,extensions:[`oz`],load(){return t(()=>import(`./BwTct_5T.js`).then(e=>Z(e.oz)),[],import.meta.url)}}),m.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return t(()=>import(`./Dp_KdFgX.js`).then(e=>Z(e.pascal)),[],import.meta.url)}}),m.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return t(()=>import(`./BkSkiI9m.js`).then(e=>Z(e.perl)),[],import.meta.url)}}),m.of({name:`Pig`,extensions:[`pig`],load(){return t(()=>import(`./AF4Hwhju.js`).then(e=>Z(e.pig)),[],import.meta.url)}}),m.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return t(()=>import(`./D8WpQPaX.js`).then(e=>Z(e.powerShell)),[],import.meta.url)}}),m.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return t(()=>import(`./C357ku5U.js`).then(e=>Z(e.properties)),[],import.meta.url)}}),m.of({name:`ProtoBuf`,extensions:[`proto`],load(){return t(()=>import(`./D1ij_kNL.js`).then(e=>Z(e.protobuf)),[],import.meta.url)}}),m.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return t(()=>import(`./Cp5ooBfH.js`).then(e=>Z(e.pug)),__vite__mapDeps([24,25]),import.meta.url)}}),m.of({name:`Puppet`,extensions:[`pp`],load(){return t(()=>import(`./BZyAS7I4.js`).then(e=>Z(e.puppet)),[],import.meta.url)}}),m.of({name:`Q`,extensions:[`q`],load(){return t(()=>import(`./B9NhS7L_.js`).then(e=>Z(e.q)),[],import.meta.url)}}),m.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return t(()=>import(`./CxDmU1I4.js`).then(e=>Z(e.r)),[],import.meta.url)}}),m.of({name:`RPM Changes`,load(){return t(()=>import(`./gpDK5sbt.js`).then(e=>Z(e.rpmChanges)),[],import.meta.url)}}),m.of({name:`RPM Spec`,extensions:[`spec`],load(){return t(()=>import(`./gpDK5sbt.js`).then(e=>Z(e.rpmSpec)),[],import.meta.url)}}),m.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return t(()=>import(`./ChfNwlCY.js`).then(e=>Z(e.ruby)),[],import.meta.url)}}),m.of({name:`SAS`,extensions:[`sas`],load(){return t(()=>import(`./C2OyD2Y6.js`).then(e=>Z(e.sas)),[],import.meta.url)}}),m.of({name:`Scala`,extensions:[`scala`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.scala)),[],import.meta.url)}}),m.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return t(()=>import(`./D9qYN0V5.js`).then(e=>Z(e.scheme)),[],import.meta.url)}}),m.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return t(()=>import(`./DwuoZtxw.js`).then(e=>Z(e.shell)),[],import.meta.url)}}),m.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return t(()=>import(`./tLWDfEkZ.js`).then(e=>Z(e.sieve)),[],import.meta.url)}}),m.of({name:`Smalltalk`,extensions:[`st`],load(){return t(()=>import(`./BLp5-jwC.js`).then(e=>Z(e.smalltalk)),[],import.meta.url)}}),m.of({name:`Solr`,load(){return t(()=>import(`./B78wSQJQ.js`).then(e=>Z(e.solr)),[],import.meta.url)}}),m.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return t(()=>import(`./B45xgp2S.js`).then(e=>Z(e.sml)),[],import.meta.url)}}),m.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return t(()=>import(`./Dz-mlCAC.js`).then(e=>Z(e.sparql)),[],import.meta.url)}}),m.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return t(()=>import(`./CTIncYxj.js`).then(e=>Z(e.spreadsheet)),[],import.meta.url)}}),m.of({name:`Squirrel`,extensions:[`nut`],load(){return t(()=>import(`./xvONpD0Z.js`).then(e=>Z(e.squirrel)),[],import.meta.url)}}),m.of({name:`Stylus`,extensions:[`styl`],load(){return t(()=>import(`./BOVgKnng.js`).then(e=>Z(e.stylus)),[],import.meta.url)}}),m.of({name:`Swift`,extensions:[`swift`],load(){return t(()=>import(`./DKB6_1j6.js`).then(e=>Z(e.swift)),[],import.meta.url)}}),m.of({name:`sTeX`,load(){return t(()=>import(`./DNzd62Q_.js`).then(e=>Z(e.stex)),[],import.meta.url)}}),m.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return t(()=>import(`./DNzd62Q_.js`).then(e=>Z(e.stex)),[],import.meta.url)}}),m.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return t(()=>import(`./CjI9Y6RI.js`).then(e=>Z(e.verilog)),[],import.meta.url)}}),m.of({name:`Tcl`,extensions:[`tcl`],load(){return t(()=>import(`./BGfruO1u.js`).then(e=>Z(e.tcl)),[],import.meta.url)}}),m.of({name:`Textile`,extensions:[`textile`],load(){return t(()=>import(`./C4jVoHG1.js`).then(e=>Z(e.textile)),[],import.meta.url)}}),m.of({name:`TiddlyWiki`,load(){return t(()=>import(`./VlUiK86J.js`).then(e=>Z(e.tiddlyWiki)),[],import.meta.url)}}),m.of({name:`Tiki wiki`,load(){return t(()=>import(`./DTszW0OQ.js`).then(e=>Z(e.tiki)),[],import.meta.url)}}),m.of({name:`TOML`,extensions:[`toml`],load(){return t(()=>import(`./BPTmHmyx.js`).then(e=>Z(e.toml)),[],import.meta.url)}}),m.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return t(()=>import(`./C2dAgh7P.js`).then(e=>Z(e.troff)),[],import.meta.url)}}),m.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return t(()=>import(`./PPSTk1ow.js`).then(e=>Z(e.ttcn)),[],import.meta.url)}}),m.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return t(()=>import(`./2b4Gb5sE.js`).then(e=>Z(e.ttcnCfg)),[],import.meta.url)}}),m.of({name:`Turtle`,extensions:[`ttl`],load(){return t(()=>import(`./Cx3rYX2g.js`).then(e=>Z(e.turtle)),[],import.meta.url)}}),m.of({name:`Web IDL`,extensions:[`webidl`],load(){return t(()=>import(`./D5jiJvOU.js`).then(e=>Z(e.webIDL)),[],import.meta.url)}}),m.of({name:`VB.NET`,extensions:[`vb`],load(){return t(()=>import(`./BthdM_4N.js`).then(e=>Z(e.vb)),[],import.meta.url)}}),m.of({name:`VBScript`,extensions:[`vbs`],load(){return t(()=>import(`./D9f6rSsU.js`).then(e=>Z(e.vbScript)),[],import.meta.url)}}),m.of({name:`Velocity`,extensions:[`vtl`],load(){return t(()=>import(`./CqftRsjg.js`).then(e=>Z(e.velocity)),[],import.meta.url)}}),m.of({name:`Verilog`,extensions:[`v`],load(){return t(()=>import(`./CjI9Y6RI.js`).then(e=>Z(e.verilog)),[],import.meta.url)}}),m.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return t(()=>import(`./kS471soi.js`).then(e=>Z(e.vhdl)),[],import.meta.url)}}),m.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return t(()=>import(`./BKJx4mf9.js`).then(e=>Z(e.xQuery)),[],import.meta.url)}}),m.of({name:`Yacas`,extensions:[`ys`],load(){return t(()=>import(`./CXXgtw0p.js`).then(e=>Z(e.yacas)),[],import.meta.url)}}),m.of({name:`Z80`,extensions:[`z80`],load(){return t(()=>import(`./Co3PbHdE.js`).then(e=>Z(e.z80)),[],import.meta.url)}}),m.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return t(()=>import(`./qgSLujhx.js`).then(e=>Z(e.mscgen)),[],import.meta.url)}}),m.of({name:`Xù`,extensions:[`xu`],load(){return t(()=>import(`./qgSLujhx.js`).then(e=>Z(e.xu)),[],import.meta.url)}}),m.of({name:`MsGenny`,extensions:[`msgenny`],load(){return t(()=>import(`./qgSLujhx.js`).then(e=>Z(e.msgenny)),[],import.meta.url)}}),m.of({name:`Vue`,extensions:[`vue`],load(){return t(()=>import(`./y0C1JQ1v.js`).then(e=>e.vue()),__vite__mapDeps([26,1,3,8,2]),import.meta.url)}}),m.of({name:`Angular Template`,load(){return t(()=>import(`./C4SqDe8e.js`).then(e=>e.angular()),__vite__mapDeps([27,1,3,8,2]),import.meta.url)}})],$t=oe([{tag:c.keyword,class:`tok-k`},{tag:[c.string,c.regexp,c.special(c.string)],class:`tok-s`},{tag:[c.number,c.bool,c.null,c.atom],class:`tok-n`},{tag:[c.typeName,c.className,c.namespace],class:`tok-t`},{tag:c.comment,class:`tok-c`}]),en={style:e=>$t.style(e),scope:e=>e.prop(i)!==X.data};function tn(e){let t=e.trim().split(/\s/)[0]??``;return t?m.matchLanguageName(Qt,t,!1):null}var $=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);function nn(e,t){let n=tn(t)?.support;if(!n)return null;let r=``,i=ce(f.create({doc:e,extensions:[n]}),e.length,500)??n.language.parser.parse(e);return se(e,i,en,(e,t)=>{r+=t?`<span class="${t}">${$(e)}</span>`:$(e)},()=>{r+=`
8
8
  `}),r}async function rn(e,t){let n=tn(t);if(!n)return null;try{await n.load()}catch{return null}return nn(e,t)}async function an(e,t){let n=m.matchFilename(Qt,t);if(!n)return null;try{await n.load()}catch{return null}let r=n.support;if(!r)return null;let i=``,a=ce(f.create({doc:e,extensions:[r]}),e.length,500)??r.language.parser.parse(e);return se(e,a,en,(e,t)=>{i+=t?`<span class="${t}">${$(e)}</span>`:$(e)},()=>{i+=`
9
9
  `}),i}function on(e,t){let n=()=>{for(let t of e.querySelectorAll(`pre > code[class*='language-']:not([data-coloured])`)){let e=/language-(\S+)/.exec(t.className)?.[1]??``,n=t.textContent??``;t.dataset.coloured=``,rn(n,e).then(e=>{e!==null&&t.textContent===n&&(t.innerHTML=e)})}};return n(),{update:n}}export{Qt as a,q as c,nn as i,on as n,Kt as o,an as r,X as s,en as t};
@@ -1,4 +1,4 @@
1
- import{_ as e,a as t,b as n,d as r,f as i,i as a,o,s,u as c,x as l}from"./DS7XcdHs.js";import{a as u,t as d}from"./DciMwFJ1.js";import{a as f,i as p,l as m,s as h,u as g}from"./DK9wjWIk.js";import{a as _,i as v,t as y}from"./_zY4mrA0.js";import{a as ee,i as b,r as x,t as S}from"./DrPF-vh8.js";import{t as C}from"./D6QVYUu9.js";import{n as w,r as T}from"./DQJRaTNz.js";import{i as E,n as te,r as D,t as O}from"./Bx_Vz2qr.js";import{n as k,t as A}from"./CggtIYAM.js";import{PeleError as j,c as M,d as ne,g as N,h as P,i as F,n as I,o as L,s as R,u as z}from"./BNlziJ_1.js";var B=new Map([[`task`,`roundedRect`],[`tool`,`subroutine`],[`input`,`lean-right`],[`decision`,`diamond`],[`refdoc`,`lin-doc`],[`action`,`hexagon`],[`round`,`rect`]]),V=new Set(`doc.stadium.terminal.circle.trapezoid.inv_trapezoid.inv-trapezoid.doublecircle.double-circle.typeDeclaration.procs.lean_left.lean-left.in-out.cylinder.ellipse.odd.tag-rect.tagged-rectangle.delay.half-rounded-rectangle.lin-rect.lined-rectangle.win-pane.window-pane.curv-trap.curved-trapezoid`.split(`.`)),re=new Set([`roundedRect`,`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`lean-right`,`diamond`,`lin-doc`,`lined-document`,`hexagon`,`hex`,`connector`,`collapsedGroup`]),H=`roundedRect`;function U(e){return e&&(B.get(e)??e)}function W(e){return A(e)||e===`constructor`}function ie(e,t){for(let n of e)n.isGroup||((!n.shape||n.shape===`squareRect`||n.shape===`rect`)&&(n.shape=H),V.has(n.shape)?(t.emitError(`SHAPE_REMOVED`,`shape "${n.shape}" was removed in v0.8.1, using "${H}"`,{nodeId:n.id}),n.shape=H):re.has(n.shape)||(t.emitWarning(`SHAPE_UNSUPPORTED`,`shape "${n.shape}" is not supported, using "${H}"`,{nodeId:n.id}),n.shape=H))}var G=new Set([`shape`,`view`,`icon`,`img`,`form`,`pos`,`w`,`h`,`class`,`style`,`labelType`]),ae=new Set([`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`tool`]);function oe(e){return ae.has(e.type)}function K(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}function q(e){return e.startsWith(`"`)&&e.endsWith(`"`)?e.substring(1,e.length-1):e}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function se(e){let t=e=>Array.isArray(e)?[]:J(e)?{}:e,n=t(e),r=[[e,n]];for(;r.length>0;){let[e,n]=r.pop();if(Array.isArray(e))for(let i of e){let e=t(i);n.push(e),typeof i==`object`&&i&&r.push([i,e])}else if(J(e))for(let i of Object.keys(e)){if(i===`__proto__`||i===`constructor`||i===`prototype`)continue;let a=e[i],o=t(a);n[i]=o,typeof a==`object`&&a&&r.push([a,o])}}return n}function Y(e,t){return Object.assign(e??{},t)}var ce=/:\s*[>|][\d+-]*\s*$/,le=/,([\t ]*)$/;function X(e){let t=!1,n=!1,r=0,i,a=[];for(let o of e.split(`
1
+ import{_ as e,a as t,b as n,d as r,f as i,i as a,o,s,u as c,x as l}from"./DlgOmQ_G.js";import{a as u,t as d}from"./DciMwFJ1.js";import{a as f,i as p,l as m,s as h,u as g}from"./BF3mdiSX.js";import{a as _,i as v,t as y}from"./BvhVny3O.js";import{a as ee,i as b,r as x,t as S}from"./-oRvYXNk.js";import{t as C}from"./D6QVYUu9.js";import{n as w,r as T}from"./CXc9Iibq.js";import{i as E,n as te,r as D,t as O}from"./CMe14KUo.js";import{n as k,t as A}from"./CggtIYAM.js";import{PeleError as j,c as M,d as ne,g as N,h as P,i as F,n as I,o as L,s as R,u as z}from"./BArcFmbE.js";var B=new Map([[`task`,`roundedRect`],[`tool`,`subroutine`],[`input`,`lean-right`],[`decision`,`diamond`],[`refdoc`,`lin-doc`],[`action`,`hexagon`],[`round`,`rect`]]),V=new Set(`doc.stadium.terminal.circle.trapezoid.inv_trapezoid.inv-trapezoid.doublecircle.double-circle.typeDeclaration.procs.lean_left.lean-left.in-out.cylinder.ellipse.odd.tag-rect.tagged-rectangle.delay.half-rounded-rectangle.lin-rect.lined-rectangle.win-pane.window-pane.curv-trap.curved-trapezoid`.split(`.`)),re=new Set([`roundedRect`,`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`lean-right`,`diamond`,`lin-doc`,`lined-document`,`hexagon`,`hex`,`connector`,`collapsedGroup`]),H=`roundedRect`;function U(e){return e&&(B.get(e)??e)}function W(e){return A(e)||e===`constructor`}function ie(e,t){for(let n of e)n.isGroup||((!n.shape||n.shape===`squareRect`||n.shape===`rect`)&&(n.shape=H),V.has(n.shape)?(t.emitError(`SHAPE_REMOVED`,`shape "${n.shape}" was removed in v0.8.1, using "${H}"`,{nodeId:n.id}),n.shape=H):re.has(n.shape)||(t.emitWarning(`SHAPE_UNSUPPORTED`,`shape "${n.shape}" is not supported, using "${H}"`,{nodeId:n.id}),n.shape=H))}var G=new Set([`shape`,`view`,`icon`,`img`,`form`,`pos`,`w`,`h`,`class`,`style`,`labelType`]),ae=new Set([`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`tool`]);function oe(e){return ae.has(e.type)}function K(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}function q(e){return e.startsWith(`"`)&&e.endsWith(`"`)?e.substring(1,e.length-1):e}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function se(e){let t=e=>Array.isArray(e)?[]:J(e)?{}:e,n=t(e),r=[[e,n]];for(;r.length>0;){let[e,n]=r.pop();if(Array.isArray(e))for(let i of e){let e=t(i);n.push(e),typeof i==`object`&&i&&r.push([i,e])}else if(J(e))for(let i of Object.keys(e)){if(i===`__proto__`||i===`constructor`||i===`prototype`)continue;let a=e[i],o=t(a);n[i]=o,typeof a==`object`&&a&&r.push([a,o])}}return n}function Y(e,t){return Object.assign(e??{},t)}var ce=/:\s*[>|][\d+-]*\s*$/,le=/,([\t ]*)$/;function X(e){let t=!1,n=!1,r=0,i,a=[];for(let o of e.split(`
2
2
  `)){if(i!==void 0){let e=o.length-o.trimStart().length;if(o.trim()===``||e>i){a.push(o);continue}i=void 0}let e=-1;for(let i=0;i<o.length;i++){let a=o[i];if(n)a===`\\`?i++:a===`"`&&(n=!1);else if(t)a===`'`&&(t=!1);else if(a===`"`)n=!0;else if(a===`'`)t=!0;else if(a===`#`&&(i===0||o[i-1]===` `||o[i-1]===` `)){e=i;break}else a===`[`||a===`{`?r++:(a===`]`||a===`}`)&&(r=Math.max(0,r-1))}if(t||n||r>0){a.push(o);continue}let s=e>=0?o.slice(0,e):o,c=e>=0?o.slice(e):``;ce.test(s)?(i=o.length-o.trimStart().length,a.push(o)):a.push(s.replace(le,`$1`)+c)}return a.join(`
3
3
  `)}function ue(e,t){if(e===`arrow_point`&&t===`normal`)return`sequence`;if(e===`arrow_cross`&&t===`normal`)return`failure`;if(e===`arrow_open`&&t===`dotted`)return`reference`}function de(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`;break;case`>`:r=`arrow_point`;break;case`-`:case`.`:n=t}let i=`normal`,a=n.length-1,o=0;for(let e=0;e<n.length;e++)n[e]===`.`&&o++;return o>0&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}function fe(e){if(!e)return;let t={},n=!1;for(let r of Object.keys(e))G.has(r)||(t[r]=e[r],n=!0);return n?t:void 0}var pe=class{type=`agentflow`;direction;nodes=new Map;edges=[];subgraphs=[];connectors=new Map;classes=new Map;tooltips=new Map;defaultEdgeStyle;defaultInterpolate;mappings=[];diagnostics=[];title;accTitle;accDescr;lineOffset;subgraphLookup=new Map;globalNodes=new Set;members=new Set;edgeById=new Map;pairCount=new Map;subCount=0;bareMappings=new Set;firstMapping=new Map;reported=new Map;options;constructor(e={}){this.options=e,this.lineOffset=e.lineOffset??0}metadata(e,t,n){let r=t.includes(`
4
4
  `),i;try{i=I(r?t+`
@@ -0,0 +1 @@
1
+ import{H as e,U as t,W as n,at as r,it as i,n as a,o,t as s}from"./Cz6kYWmu.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function ee(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(x(e)),te(e,t));var v=new Map;function y(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(v.size>0){let t=x(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function x(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var ne=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,S=/^\/\((?:[^)]+)\)$/;function re(e){let t=[];return{pattern:e===`/`||S.test(e)?/^\/$/:RegExp(`^${ae(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return se(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return se(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=ne.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return se(e)}).join(``)}).join(``)}/?$`),params:t}}function ie(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function ae(e){return e.slice(1).split(`/`).filter(ie)}function oe(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0)}else if(s.optional&&s.chained)o++;else return}if(!o)return r}function se(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ce=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function le(e,t){let n=ae(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ce,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function ue({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=re(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return oe(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function de(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function fe(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var C=globalThis.__sveltekit_1a733yx?.base??``,pe=globalThis.__sveltekit_1a733yx?.assets??C??``;function me(e){return(pe||C)+e}var he=`#`;function ge(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return C+he+le(e[0],e[1])}var _e=`1793941790772`,ve=`sveltekit:snapshot`,ye=`sveltekit:scroll`,be=`sveltekit:states`,w=`sveltekit:history`,T=`sveltekit:navigation`,E={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},xe=location.origin;function Se(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function D(){return{x:pageXOffset,y:pageYOffset}}function O(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var Ce={...E,"":E.hover};function we(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Te(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=we(e)}}function Ee(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||je(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===xe&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function De(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=O(s,`preload-code`)),i===null&&(i=O(s,`preload-data`)),t===null&&(t=O(s,`keepfocus`)),n===null&&(n=O(s,`noscroll`)),a===null&&(a=O(s,`reload`)),o===null&&(o=O(s,`replacestate`)),s=we(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:Ce[r??`off`],preload_data:Ce[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Oe(e){let t=o(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var ke={v:h};function Ae(){let{set:e,subscribe:t}=o(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${pe}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==_e;return r&&(e(!0),ke.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function je(e,t,n){return e.origin!==xe||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Me(e){}var Ne=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ne],[...new Set([...Ne])];function Pe(e){return e.filter(e=>e!=null)}function k(e,t){return e+`/`+t}function Fe(e){return e instanceof c||e instanceof u?e.status:500}function Ie(e){return e instanceof u?e.text:`Internal Error`}var A,j,Le,Re=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),ze=`a:`;Re?(A={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},j={current:null},Le={current:!1}):(A=new class{#e=r({});get data(){return e(this.#e)}set data(e){i(this.#e,e)}#t=r(null);get form(){return e(this.#t)}set form(e){i(this.#t,e)}#n=r(null);get error(){return e(this.#n)}set error(e){i(this.#n,e)}#r=r({});get params(){return e(this.#r)}set params(e){i(this.#r,e)}#i=r({id:null});get route(){return e(this.#i)}set route(e){i(this.#i,e)}#a=r({});get state(){return e(this.#a)}set state(e){i(this.#a,e)}#o=r(-1);get status(){return e(this.#o)}set status(e){i(this.#o,e)}#s=r(new URL(ze));get url(){return e(this.#s)}set url(e){i(this.#s,e)}},j=new class{#e=r(null);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},Le=new class{#e=r(!1);get current(){return e(this.#e)}set current(e){i(this.#e,e)}},ke.v=()=>Le.current=!0);function Be(e){Object.assign(A,e)}var Ve={spanContext(){return He},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},He={traceId:``,spanId:``,traceFlags:0},{onMount:Ue,tick:We}=s,Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=de(`sveltekit:scroll`)??{},P=de(`sveltekit:snapshot`)??{},F={url:Oe({}),page:Oe({}),navigating:o(null),updated:Ae()};function Ke(e){N[e]=D()}function qe(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(C||`/`);e&&await e.update()}}var Ye,Xe,L,R,Ze,z,Qe={},$e={},B=[],V=[],H=null;function U(){H?.fork?.then(e=>e?.discard()),H=null,Q={element:void 0,href:void 0}}var et=new Map,tt=new Set,nt=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},rt=!1,it=!1,at=!0,K=!1,q=!1,ot=!1,st=!1,ct,J,Y,X,lt=new Set,ut=new Map,dt=new Map;async function ft(e,t,n){if(globalThis.__sveltekit_1a733yx.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_1a733yx.data;for(let t in e)Qe[t]=e[t];for(let e in n)Qe[e]=n[e];for(let e in r)Qe[e]=r[e];for(let e in t)$e[e]=t[e]}document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),Ye=ue(e),R=document.documentElement,Ze=t,Xe=e.nodes[0],L=e.nodes[1],Xe(),L(),J=history.state?.[w],Y=history.state?.[T],J||(J=Y=Date.now(),history.replaceState({...history.state,[w]:J,[T]:Y},``));let r=N[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Vt(Ze,n)):(await Z({type:`enter`,url:Se(z.hash?qt(new URL(location.href)):location.href),replace_state:!0}),i()),Bt()}function pt(){B.length=0,st=!1}function mt(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function ht(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function gt(){Ke(J),fe(ye,N),mt(Y),fe(ve,P)}async function _t(e,t,r,i){let a,o;t.invalidateAll&&U(),await Z({type:`goto`,url:Se(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:i,accept:()=>{if(t.invalidateAll){st=!0,a=new Set;for(let[e,t]of ut)for(let[n,r]of t)r.resource?.reset(),a.add(k(e,n));o=new Set;for(let[e,t]of dt)for(let n of t.keys())o.add(k(e,n))}t.invalidate&&t.invalidate.forEach(zt)}}),t.invalidateAll&&n().then(n).then(()=>{for(let[e,t]of ut)for(let[n,{resource:r}]of t)a?.has(k(e,n))&&r.start();for(let[e,t]of dt)for(let[n,{resource:r}]of t)o?.has(k(e,n))&&r.reconnect()})}async function vt(e){if(e.id!==H?.id){U();let t={};lt.add(t),H={id:e.id,token:t,promise:Ot({...e,preload:t}).then(e=>(lt.delete(t),e.type===`loaded`&&e.state.error&&U(),e)),fork:null}}return H.promise}async function yt(e){let t=(await Mt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function bt(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Be(e.props.page),ct=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:N[J]??D()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}ht(Y),it=!0}async function xt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(C&&(e.pathname===C||e.pathname===C+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Pe(n).map(e=>e.node.component),page:Kt(A)}};s!==void 0&&(l.props.form=s);let u={},f=!A,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==A.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:A.data}),l}async function St({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Ve,current:Ve},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:ee(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},z.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=Ct(t,r,n);return s&&e(i.href),a},setHeaders:h,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function Ct(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:it?b(r,i.href,t):y(r,t)}}function wt(e,t,n,r,i,a){if(st)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(B.some(t=>t(new URL(e))))return!0;return!1}function Tt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Et(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Dt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Kt(A),constructors:[]}}}async function Ot({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return lt.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Pt(G.url):!1,p=G.route?i.id!==G.route.id:!1,m=Et(G.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!wt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,St({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:Tt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&lt.has(a))return Dt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Fe(t),u;if(t instanceof c)u=t.body;else{if(await F.updated.check())return await Je(),await I(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await kt(e,_,o);return d?xt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await It(n,{id:i.id},u,s)}else _.push(void 0);return xt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function kt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:e,error:t,url:n,route:r}){let i={};try{return xt({url:n,params:i,branch:[await St({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Tt(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await _t(new URL(t.location,location.href),{},0);return}let a=await z.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function jt(e){let t=e.href;if(et.has(t))return et.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Ct(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();et.set(t,r),n=await r}catch{et.delete(t);return}return n}async function Mt(e,t){if(e&&!je(e,C,z.hash)){let n=await jt(e);if(!n)return;let r=Nt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:Pt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Nt(e){return f(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(C.length))||`/`}function Pt(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Ft({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Gt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||tt.forEach(e=>e(c)),o?null:s}async function Z({type:e,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=X;X=d;let g=await Mt(r,!1),_=e===`enter`?Gt(G,g,r,e):Ft({url:r,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),X===d&&(X=ee);return}let te=J,v=Y;f(),K=!0,it&&_.navigation.type!==`enter`&&F.navigating.set(j.current=_.navigation);let y=g&&await Ot(g);if(!y){if(je(r,C,z.hash))return await I(r,s);y=await It(r,{id:null},await $(new u(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,X!==d){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:e,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}if(y=await At({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await F.updated.check())return await Je(),await I(r,s);if(pt(),Ke(te),mt(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[w]:J+=e,[T]:Y+=e,[be]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||qe(J,Y)}let b=g&&H?.id===g.id?H.fork:null;H?.fork&&!b?U():(H=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let x;if(it){let e=(await Promise.all(Array.from(nt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{W.delete(e)})}e.push(t),e.forEach(e=>{W.add(e)})}let n=_.navigation.to;G={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=b&&await b;i?x=i.commit():(M=null,ct.$set(y.props),M&&Object.assign(y.props.page,M),Be(y.props.page),x=t?.()),ot=!0}else await bt(y,Ze,!1);let{activeElement:ne}=document;if(await x,await n(),await n(),X!==d){_.reject(Error(`navigation aborted`));return}y.props.page&&M&&Object.assign(y.props.page,M);let S=null;if(at){let e=i?i.scroll:o?D():null;e?scrollTo(e.x,e.y):(S=r.hash&&document.getElementById(Jt(r)))?S.scrollIntoView():scrollTo(0,0)}let re=document.activeElement!==ne&&document.activeElement!==document.body;!a&&!re&&Wt(r,!S),at=!0,K=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=D()),W.forEach(e=>e(_.navigation)),e===`popstate`&&ht(Y),F.navigating.set(j.current=null)}async function It(e,t,n,r,i){return e.origin===xe&&e.pathname===location.pathname&&!rt?await At({status:r,error:n,url:e,route:t}):await I(e,i)}var Q={element:void 0,href:void 0};function Lt(){let e,t;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,E.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],E.tap)}R.addEventListener(`mousedown`,n),R.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(yt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Te(e,R),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=Ee(r,C,z.hash);if(o||s)return;let c=De(r),l=a&&Pt(G.url)===Pt(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=E.tap;let e=await Mt(a,!1);if(!e)return;vt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,yt(a))}}function a(){r.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:i}=Ee(e,C,z.hash);if(n||i)continue;let a=De(e);a.reload||(a.preload_code===E.viewport&&r.observe(e),a.preload_code===E.eager&&yt(t))}}W.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Fe(e),r=Ie(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Rt(e,t={}){return e=new URL(Se(e)),e.origin===xe?_t(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function zt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function Bt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(gt(),!K){let e=Gt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};tt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&gt()}),navigator.connection?.saveData||Lt(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Te(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=Ee(n,C,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=De(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l))Ft({url:r,type:`link`,event:t})?K=!0:t.preventDefault();else{if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Ke(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(je(r,C,!1))return;let i=e.target,a=De(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ut){if(t.state?.[`sveltekit:history`]){let n=t.state[w];if(X={},n===J)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[T],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(ot||s)){i!==A.state&&(A.state=i),e(a),N[J]=D(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),z.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[w]:++J,[T]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(j.current=null)});function e(e){G.url=A.url=e,F.page.set(Kt(A)),F.page.notify()}}async function Vt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){rt=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await Mt(u,!1)||{}),d=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Ht(r.uses)),St({loader:z.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Tt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await xt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await I(new URL(t.location,location.href));f=await At({status:Fe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await bt(f,e,p))}function Ht(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ut=!1;function Wt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=Jt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=D();setTimeout(()=>{let a=history.state;Ut=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ut=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Gt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:D()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Kt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function qt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Jt(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Me as a,A as i,ft as n,me as o,j as r,ge as s,Rt as t};
@@ -1,2 +1,2 @@
1
- import{_ as e,o as t,u as n}from"./DS7XcdHs.js";import{a as r,c as i,d as a,g as o,h as s,i as c,l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"./Dzu8v7nB.js";import{u as _}from"./BNlziJ_1.js";function v(e,t){return{type:`info`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
1
+ import{_ as e,o as t,u as n}from"./DlgOmQ_G.js";import{a as r,c as i,d as a,g as o,h as s,i as c,l,n as u,o as d,p as f,r as p,s as m,t as h,u as g}from"./jAC4YCqW.js";import{u as _}from"./BArcFmbE.js";function v(e,t){return{type:`info`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
2
2
  `):void 0}}var y=[c(`showInfo`),c(`info`),r,h,f,l,g,p,d,m];function b(e){let t=new s(u(e,y,`info`),y,`info`),n={$type:`Info`};for(;t.kind===5;)t.i++;for(t.expect(1);t.kind===5;)t.i++;if(t.accept(0))for(;t.kind===5;)t.i++;for(;t.kind!==-1;){let e=t.kind;if(e===2?n.accDescr=i(t.take()):e===3?n.accTitle=o(t.take()):e===4?n.title=a(t.take()):t.fail(`a title or the end of input`),t.kind===-1)break;for(t.kind!==5&&t.fail(`a line break or the end of input`);t.kind===5;)t.i++}return n}var x=`1.10.0`;function S(r,i,a){let o=a.fontSize??16,s=a.measurer??_(a.fontFamily,a.fontFamilyMono),c=a.padding??8,l=n(r.title,!1,s,o,4e3,1),u=l.height>0?l.height+8:0,d=n(`Pele v${x}`,!1,s,o,4e3),f=Math.ceil(Math.max(l.width,d.width)+2*c),p=Math.ceil(u+d.height+2*c),m=t(l,f/2,c+l.height/2,` class="pele-title" font-weight="var(--_tw)"`)+t(d,f/2,c+u+d.height/2,` class="pele-version" fill="var(--_m)"`);return{svg:e(`info`,f,p,o,a,r,m),width:f,height:p,links:[]}}var C={type:`info`,parse:(e,t,n)=>v(b(e),n),render:S};export{C as info};
@@ -1,4 +1,4 @@
1
- import{V as e,it as t,rt as n,vt as r}from"./CxEu-Di8.js";import{s as i}from"./Ddw9FbDu.js";var a=Symbol.for(`yaml.alias`),o=Symbol.for(`yaml.document`),s=Symbol.for(`yaml.map`),c=Symbol.for(`yaml.pair`),l=Symbol.for(`yaml.scalar`),u=Symbol.for(`yaml.seq`),d=Symbol.for(`yaml.node.type`),f=e=>!!e&&typeof e==`object`&&e[d]===a,p=e=>!!e&&typeof e==`object`&&e[d]===o,m=e=>!!e&&typeof e==`object`&&e[d]===s,h=e=>!!e&&typeof e==`object`&&e[d]===c,g=e=>!!e&&typeof e==`object`&&e[d]===l,_=e=>!!e&&typeof e==`object`&&e[d]===u;function v(e){if(e&&typeof e==`object`)switch(e[d]){case s:case u:return!0}return!1}function y(e){if(e&&typeof e==`object`)switch(e[d]){case a:case s:case l:case u:return!0}return!1}var b=e=>(g(e)||v(e))&&!!e.anchor,x=Symbol(`break visit`),S=Symbol(`skip children`),C=Symbol(`remove node`);function w(e,t){let n=E(t);p(e)?T(null,e.contents,n,Object.freeze([e]))===C&&(e.contents=null):T(null,e,n,Object.freeze([]))}w.BREAK=x,w.SKIP=S,w.REMOVE=C;function T(e,t,n,r){let i=ee(e,t,n,r);if(y(i)||h(i))return te(e,r,i),T(e,i,n,r);if(typeof i!=`symbol`){if(v(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=T(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===x)return x;else i===C&&(t.items.splice(e,1),--e)}}else if(h(t)){r=Object.freeze(r.concat(t));let e=T(`key`,t.key,n,r);if(e===x)return x;e===C&&(t.key=null);let i=T(`value`,t.value,n,r);if(i===x)return x;i===C&&(t.value=null)}}return i}function E(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ee(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(m(t))return n.Map?.(e,t,r);if(_(t))return n.Seq?.(e,t,r);if(h(t))return n.Pair?.(e,t,r);if(g(t))return n.Scalar?.(e,t,r);if(f(t))return n.Alias?.(e,t,r)}function te(e,t,n){let r=t[t.length-1];if(v(r))r.items[e]=n;else if(h(r))e===`key`?r.key=n:r.value=n;else if(p(r))r.contents=n;else{let e=f(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ne={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},re=e=>e.replace(/[!,[\]{}]/g,e=>ne[e]),ie=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+re(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&y(e.contents)){let t={};w(e.contents,(e,n)=>{y(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
1
+ import{H as e,at as t,it as n,yt as r}from"./Cz6kYWmu.js";import{s as i}from"./Co7i-dcu.js";var a=Symbol.for(`yaml.alias`),o=Symbol.for(`yaml.document`),s=Symbol.for(`yaml.map`),c=Symbol.for(`yaml.pair`),l=Symbol.for(`yaml.scalar`),u=Symbol.for(`yaml.seq`),d=Symbol.for(`yaml.node.type`),f=e=>!!e&&typeof e==`object`&&e[d]===a,p=e=>!!e&&typeof e==`object`&&e[d]===o,m=e=>!!e&&typeof e==`object`&&e[d]===s,h=e=>!!e&&typeof e==`object`&&e[d]===c,g=e=>!!e&&typeof e==`object`&&e[d]===l,_=e=>!!e&&typeof e==`object`&&e[d]===u;function v(e){if(e&&typeof e==`object`)switch(e[d]){case s:case u:return!0}return!1}function y(e){if(e&&typeof e==`object`)switch(e[d]){case a:case s:case l:case u:return!0}return!1}var b=e=>(g(e)||v(e))&&!!e.anchor,x=Symbol(`break visit`),S=Symbol(`skip children`),C=Symbol(`remove node`);function w(e,t){let n=E(t);p(e)?T(null,e.contents,n,Object.freeze([e]))===C&&(e.contents=null):T(null,e,n,Object.freeze([]))}w.BREAK=x,w.SKIP=S,w.REMOVE=C;function T(e,t,n,r){let i=ee(e,t,n,r);if(y(i)||h(i))return te(e,r,i),T(e,i,n,r);if(typeof i!=`symbol`){if(v(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=T(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===x)return x;else i===C&&(t.items.splice(e,1),--e)}}else if(h(t)){r=Object.freeze(r.concat(t));let e=T(`key`,t.key,n,r);if(e===x)return x;e===C&&(t.key=null);let i=T(`value`,t.value,n,r);if(i===x)return x;i===C&&(t.value=null)}}return i}function E(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ee(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(m(t))return n.Map?.(e,t,r);if(_(t))return n.Seq?.(e,t,r);if(h(t))return n.Pair?.(e,t,r);if(g(t))return n.Scalar?.(e,t,r);if(f(t))return n.Alias?.(e,t,r)}function te(e,t,n){let r=t[t.length-1];if(v(r))r.items[e]=n;else if(h(r))e===`key`?r.key=n:r.value=n;else if(p(r))r.contents=n;else{let e=f(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ne={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},re=e=>e.replace(/[!,[\]{}]/g,e=>ne[e]),ie=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+re(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&y(e.contents)){let t={};w(e.contents,(e,n)=>{y(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
2
2
  `)}};ie.defaultYaml={explicit:!1,version:`1.2`},ie.defaultTags={"!!":`tag:yaml.org,2002:`};function ae(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function oe(e){let t=new Set;return w(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function se(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function ce(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oe(e);let a=se(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(g(t.node)||v(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function le(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=le(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=le(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=le(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=le(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function D(e,t,n){if(Array.isArray(e))return e.map((e,t)=>D(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!b(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var ue=class{constructor(e){Object.defineProperty(this,d,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!p(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=D(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?le(i,{"":o},``,o):o}},de=class extends ue{constructor(e){super(a),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],w(e,{Node:(e,t)=>{(f(t)||b(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(D(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=fe(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(ae(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function fe(e,t,n){if(f(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(v(t)){let r=0;for(let i of t.items){let t=fe(e,i,n);t>r&&(r=t)}return r}if(h(t)){let r=fe(e,t.key,n),i=fe(e,t.value,n);return Math.max(r,i)}return 1}var pe=e=>!e||typeof e!=`function`&&typeof e!=`object`,O=class extends ue{constructor(e){super(l),this.value=e}toJSON(e,t){return t?.keep?this.value:D(this.value,e,t)}toString(){return String(this.value)}};O.BLOCK_FOLDED=`BLOCK_FOLDED`,O.BLOCK_LITERAL=`BLOCK_LITERAL`,O.PLAIN=`PLAIN`,O.QUOTE_DOUBLE=`QUOTE_DOUBLE`,O.QUOTE_SINGLE=`QUOTE_SINGLE`;var me=`tag:yaml.org,2002:`;function he(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function ge(e,t,n){if(p(e)&&(e=e.contents),y(e))return e;if(h(e)){let t=n.schema[s].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:c}=n,l;if(r&&e&&typeof e==`object`){if(l=c.get(e),l)return l.anchor??(l.anchor=i(e)),new de(l.anchor);l={anchor:null,node:null},c.set(e,l)}t?.startsWith(`!!`)&&(t=me+t.slice(2));let d=he(e,t,o.tags);if(!d){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new O(e);return l&&(l.node=t),t}d=e instanceof Map?o[s]:Symbol.iterator in Object(e)?o[u]:o[s]}a&&(a(d),delete n.onTagObj);let f=d?.createNode?d.createNode(n.schema,e,n):typeof d?.nodeClass?.from==`function`?d.nodeClass.from(n.schema,e,n):new O(e);return t?f.tag=t:d.default||(f.tag=d.tag),l&&(l.node=f),f}function _e(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return ge(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var ve=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,ye=class extends ue{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>y(t)||h(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ve(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(v(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,_e(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(v(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&g(i)?i.value:i:v(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!h(t))return!1;let n=t.value;return n==null||e&&g(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return v(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(v(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,_e(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},be=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function k(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var A=(e,t,n)=>e.endsWith(`
3
3
  `)?k(n,t):n.includes(`
4
4
  `)?`
@@ -149,4 +149,4 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
149
149
  `?(m.push(p),p={t:[],w:[]}):(p.t.push(e),p.w.push(l[t]))}),t.ins.length&&m.push(p),o.push(...m),s=t.at+t.del.length}o.push(...n.slice(s)),n=o,r=$s(r,a.hunks)}return(n??[]).map(e=>{let t=[],n=0;return e.t.forEach((r,i)=>{let a=e.w[i],o=t.at(-1);o&&o.who===a&&o.to===n?o.to+=r.length:t.push({from:n,to:n+r.length,who:a}),n+=r.length}),t})}var ac=(e,t)=>nc(e,t)?.text??null;function oc(e){let t=new Map,n=(e,n)=>{let r=t.get(e);if(!r)return;let i=r.form===`rewrite`&&n!==void 0?(r.open??[]).filter(e=>e!==n):[];r.form===`rewrite`&&i.length?t.set(e,{...r,open:i}):t.delete(e)};for(let r of e)if(r.kind===`proposal`)t.set(r.id,r.form===`rewrite`?{...r,open:r.regions.map((e,t)=>t)}:r);else if(r.kind===`discard`)n(r.proposal,r.region);else if(r.kind===`change`&&r.proposal&&r.why===`keep`)n(r.proposal,r.region);else if(r.kind===`revise`){let e=t.get(r.proposal);if(!e)continue;e.form===`insert`&&r.text!==void 0&&t.set(e.id,{...e,text:r.text}),e.form===`rewrite`&&r.regions&&t.set(e.id,{...e,regions:e.regions.map((e,t)=>({old:e.old,new:r.regions[t]??e.new}))})}return[...t.values()]}function sc(e,t){if(!t.text)return null;let n=-1;for(let r=0;r<=t.nth&&(n=e.indexOf(t.text,n+1),!(n<0));r++);if(n<0){let r=e.indexOf(t.text);if(r<0||e.indexOf(t.text,r+1)>=0)return null;n=r}return{from:n,to:n+t.text.length}}function cc(e,t){if(t.form===`rewrite`)return{form:`rewrite`,regions:t.regions.map(t=>sc(e,t.old))};let n=Js(e),r=t.after?Ys(n,t.after):-1,i=t.before?Ys(n,t.before):-1;if(r>=0)return{form:`insert`,line:n[r].to};if(i>=0)return{form:`insert`,line:n[i].from};if(!t.after&&!t.before){if(n.length)return{form:`insert`,line:n[n.length-1].to};let t=e.split(`
150
150
  `),r=t.length;for(;r>0&&!t[r-1].trim();)r--;return{form:`insert`,line:r}}return!t.after&&n.length?{form:`insert`,line:n[0].from}:null}function lc(e){let t=[],n=new Map,r=new Map,i=e=>e.why===`start`||!e.hunks.length&&e.before===null?[(e.text??``).split(`
151
151
  `).length,0]:[e.hunks.reduce((e,t)=>e+t.ins.length,0),e.hunks.reduce((e,t)=>e+t.del.length,0)];for(let a of e){let e={ids:[a.id],at:a.at,session:a.session,who:a.who,added:0,removed:0};if(a.kind===`proposal`){let i={...e,what:`offered`,asked:a.asked};n.set(a.id,i),r.set(a.id,a.asked),t.push(i)}else if(a.kind===`discard`){let e=n.get(a.proposal);e&&(e.what=`discarded`,e.ids.push(a.id))}else if(a.kind===`change`){let r=a.proposal?n.get(a.proposal):void 0,[o,s]=i(a);if(a.why===`keep`&&r){r.what=`kept`,r.ids.push(a.id),r.at=a.at,r.added+=o,r.removed+=s;continue}let c=t[t.length-1];if(a.why===`edit`&&c&&c.what===`edited`&&c.who===a.who&&c.session===a.session&&Date.parse(a.at)-Date.parse(c.at)<=6e5){c.ids.push(a.id),c.at=a.at,c.added+=o,c.removed+=s;continue}let l=a.why===`start`?a.who===`external`?`found`:`wrote`:a.why===`edit`?`edited`:a.why===`restore`?`restored`:a.why===`keep`?`kept`:a.why===`move`?`moved`:`changed elsewhere`;t.push({...e,what:l,added:o,removed:s,...a.asked?{asked:a.asked}:{}})}}return t}function uc(e,t){let n=0;for(let r of e){if(t<r.at)break;if(t<r.at+r.del.length)return null;n+=r.ins.length-r.del.length}return t+n}function dc(e){if(e.why===`start`||!e.hunks.length&&e.before===null)return(e.text??``).split(`
152
- `).map((e,t)=>t);let t=[],n=0;for(let r of e.hunks){for(let e=0;e<r.ins.length;e++)t.push(r.at+n+e);n+=r.ins.length-r.del.length}return t}function fc(e,t){let n=new Set(t),r=new Set,i=!1;for(let t of e){if(!tc(t))continue;let e=new Set;for(let n of r){let r=uc(t.hunks,n);r!==null&&e.add(r)}if(r=e,n.has(t.id))for(let e of dc(t))r.add(e),i=!0}let a=[...r].sort((e,t)=>e-t),o=[];for(let e of a){let t=o[o.length-1];t&&t.to===e?t.to=e+1:o.push({from:e,to:e+1})}return{runs:o,removed:i&&!o.length}}``.isWellFormed;function pc(e,t){let n=e.edges.some(([,,e])=>e>=Ks.requires)?Ks.requires:Ks.uses,r=new Map,i=new Map,a=new Set,o=new Set,s=[];for(let[c,l,u]of e.edges)if(c!==l){if(u<n){if(c!==t&&l!==t)continue;(u>=Ks.uses?a:o).add(c===t?l:c),u>=Ks.uses&&s.push({from:c,to:l,kind:`uses`})}else r.set(c,[...r.get(c)??[],l]),i.set(l,[...i.get(l)??[],c])}let c={},l={},u=new Set([t]),d=[],f=[],p=[t];for(let e=0;e<p.length;e++){let t=p[e];for(let e of r.get(t)??[])f.push({from:t,to:e,kind:`requires`}),!u.has(e)&&(u.add(e),d.push(e),p.push(e),c[e]=(c[t]??0)+1,l[e]=t)}let m=new Map;for(let e of f)m.set(e.from,(m.get(e.from)??new Set).add(e.to));for(let e of f){let t=new Set,n=[...m.get(e.from)].filter(t=>t!==e.to),r=!1;for(;n.length&&!r;){let i=n.pop();i===e.to?r=!0:i!==e.from&&!t.has(i)&&(t.add(i),n.push(...m.get(i)??[]))}r&&(e.spare=!0,m.get(e.from).delete(e.to))}let h=[...new Set(i.get(t)??[])];for(let e of h)f.push({from:e,to:t,kind:`builds`});let g=new Set([...d,...h]);return{requires:d,depth:c,via:l,builds:h,uses:[...a].filter(e=>!g.has(e)),also:[...o].filter(e=>!g.has(e)&&!a.has(e)),links:[...f,...s.filter(e=>!g.has(e.from===t?e.to:e.from))]}}function mc(){try{return new URLSearchParams(location.search).get(`base`)??``}catch{return``}}var hc=e=>mc()?`${e}@${mc()}`:e;function gc(e,t=``){return`${location.origin}${location.pathname}?base=${encodeURIComponent(e)}${t}`}var _c=class extends Error{status;current;constructor(e,t,n){super(e),this.status=t,this.current=n}};function vc(e=new URL(mc()?`b/${encodeURIComponent(mc())}/api/`:`api/`,document.baseURI).href){let t=null,n=async(t,n)=>{let r;try{r=await fetch(e+t,n)}catch{throw new _c(`isorite is not answering`,0)}let i=await r.json().catch(()=>({}));if(!r.ok)throw new _c(i.error??r.statusText,r.status,i.current);return i},r=()=>n(`session`),i=async(e,i,a)=>{t??=r().then(e=>e.token);let o={"Content-Type":`application/json`,"x-isorite-token":await t};return n(i,{method:e,headers:o,body:JSON.stringify(a)})},a=e=>`?id=${encodeURIComponent(e)}`,o=(t,n=`notes`)=>`${e}file?${n===`code`?`code`:`path`}=${encodeURIComponent(t)}`;return{session:async()=>{let{token:e,...n}=await r();return t=Promise.resolve(e),n},notes:()=>n(`notes`),readNote:e=>n(`note`+a(e)),fileUrl:o,pictures:()=>n(`pictures`),code:(e,t)=>n(`code?href=${encodeURIComponent(e)}${t?`&full=1`:``}`),savePicture:async(e,i)=>{t??=r().then(e=>e.token);let a=Ds(e)??`application/octet-stream`;return n(`file?path=${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":a,"x-isorite-token":await t},body:i})},file:async(e,t)=>{let n;try{n=await fetch(o(e,t))}catch{throw new _c(`isorite is not answering`,0)}if(n.status===404)return null;if(!n.ok)throw new _c((await n.json().catch(()=>({}))).error??n.statusText,n.status);return{bytes:new Uint8Array(await n.arrayBuffer()),type:n.headers.get(`content-type`)??``,version:(n.headers.get(`etag`)??``).replaceAll(`"`,``)}},saveNote:(e,t)=>i(`PUT`,`note`+a(e),t),createNote:(e,t)=>i(`POST`,`note`+a(e),{text:t}),journal:e=>n(`journal`+a(e)),version:async(e,t)=>(await n(`version`+a(e)+`&entry=`+encodeURIComponent(t))).text,makeFolder:e=>i(`POST`,`folder`,{path:e}),moveFolder:async(e,t)=>{await i(`POST`,`folder/move`,{from:e,to:t})},deleteFolder:async e=>{await i(`POST`,`folder/delete`,{path:e})},moveNote:(e,t,n)=>i(`POST`,`note/move`+a(e),{to:t,base:n}),deleteNote:async(e,t)=>{await i(`POST`,`note/delete`+a(e),{base:t})},restore:(e,t,n)=>i(`POST`,`note/restore`+a(e),{entry:t,base:n}),map:()=>n(`map`),timeline:()=>n(`timeline`),search:e=>n(`search?q=${encodeURIComponent(e)}`),agents:()=>n(`agents`),saveAgents:e=>i(`POST`,`agents`,{text:e}),nameRepository:async()=>!1,agentNotes:()=>n(`agents/notes`),setAgentNotes:e=>i(`POST`,`agents/notes`,{may:e}),brokenNews:async()=>[],conversations:()=>n(`conversations`),deleteConversation:async e=>{await i(`POST`,`conversation/delete`,{id:e})},conversation:async e=>{let t=await n(`conversation`+(e?a(e):``));return t.id?t:null},keep:(e,t,n)=>i(`POST`,`proposal/keep`+a(e),{proposal:t,...n===void 0?{}:{region:n}}),revise:async(e,t,n)=>{await i(`POST`,`proposal/revise`+a(e),{proposal:t,text:n})},discard:async(e,t,n)=>{await i(`POST`,`proposal/discard`+a(e),{proposal:t,...n===void 0?{}:{region:n}})},setDone:(e,t,n)=>i(`POST`,`note/done`+a(e),{done:t,base:n}),agentTools:()=>n(`agent/tools`),agentLook:e=>i(`POST`,`agent/look`,e),agentWrite:e=>i(`POST`,`agent/write`,e),agentSend:e=>i(`POST`,`agent/send`,e),agentReceived:async(e,t)=>{await i(`POST`,`agent/received`,{id:e,agent:t})},agentStatus:async(e,t,n)=>{await i(`POST`,`agent/status`,{agent:e,session:t,busy:n})},agentTake:e=>i(`POST`,`agent/take`,{id:e}),agentChanged:async()=>{throw Error(`only isorite acp tells the server of an agent's change`)},keepAgentRecord:async()=>{throw Error(`only the server keeps an agent's session`)},agentRecords:()=>n(`agent/records`),agentRecord:(e,t)=>n(`agent/record?agent=${encodeURIComponent(e)}&session=${encodeURIComponent(t)}`),deleteAgentRecord:async()=>{throw Error(`a kept session is removed through the pane's drawer`)},bases:{list:()=>n(`bases`),lend:async(e,t)=>(await i(`POST`,`bases/lend`,{name:e,lend:t})).bases},own:{repo:()=>n(`own/repo`),choose:e=>i(`POST`,`own/choose`,{choice:e})},terminal:{view:()=>n(`terminal`),prompt:async(e,t)=>{await i(`POST`,`terminal/prompt`,{asked:e,given:t})},stop:async()=>{await i(`POST`,`terminal/stop`,{})},reply:async(e,t)=>{await i(`POST`,`terminal/permission`,{id:e,decision:t})},take:e=>i(`POST`,`agent/take`,{id:e}),give:async e=>{await i(`POST`,`acp/give`,{given:e})},follow:async(e,t)=>{await i(`POST`,`acp/follow`,{agent:e,session:t})},fresh:async e=>{await i(`POST`,`acp/new`,{agent:e})},list:async()=>{await i(`POST`,`acp/list`,{})},set:async(e,t,n)=>{await i(`POST`,`acp/set`,{kind:e,id:t,value:n})},forget:async(e,t)=>{await i(`POST`,`acp/forget`,{agent:e,session:t})},project:()=>n(`connect`),writeProject:async()=>(await i(`POST`,`connect`,{})).written,chosen:()=>n(`acp/agent`),registry:()=>n(`acp/registry`),detected:()=>n(`acp/detected`),choose:e=>i(`POST`,`acp/choose`,{choice:e})},events(t){let n=new EventSource(e+`events`),r=e=>{try{t(JSON.parse(e.data))}catch{}};for(let e of[`note-changed`,`journal`,`agent-start`,`agent-step`,`agent-done`,`agent-sent`,`agent-received`,`agent-item`,`agent-taken`,`terminal`])n.addEventListener(e,r);return()=>n.close()}}}var yc=new class{api;#e=t(null);get session(){return e(this.#e)}set session(e){n(this.#e,e)}#t=t({notes:[],dirs:[]});get listing(){return e(this.#t)}set listing(e){n(this.#t,e)}#n=t(``);get error(){return e(this.#n)}set error(e){n(this.#n,e,!0)}#r=t(``);get open(){return e(this.#r)}set open(e){n(this.#r,e,!0)}#i=t(``);get here(){return e(this.#i)}set here(e){n(this.#i,e,!0)}#a=t(null);get saving(){return e(this.#a)}set saving(e){n(this.#a,e,!0)}#o=t(null);get atlas(){return e(this.#o)}set atlas(e){n(this.#o,e)}#s=t(null);get iso(){return e(this.#s)}set iso(e){n(this.#s,e)}listeners=new Set;relist=null;async load(e=vc()){this.api=e;try{[this.session,this.listing]=await Promise.all([e.session(),e.notes()])}catch(e){this.error=e.message;return}e.events(e=>{this.follow(e);for(let t of this.listeners)t(e);e.type===`note-changed`&&(this.relist&&clearTimeout(this.relist),this.relist=setTimeout(()=>{this.refresh()},300))})}async refresh(){try{this.listing=await this.api.notes()}catch{}}follow(e){(e.type===`agent-start`||e.type===`agent-step`)&&this.iso?.request!==e.request&&(this.iso={request:e.request,note:``,agent:e.agent,state:`reading`,steps:[],message:``});let t=this.iso;t&&`request`in e&&e.request===t.request&&(e.type===`agent-step`?this.iso={...t,state:`reading`,steps:[...t.steps,e.step]}:e.type===`agent-done`&&(this.iso={...t,state:`done`}))}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},bc=e=>i(`/n/[...id]`,{id:e}),xc=e=>{let[t=``,n=``]=e.trim().replace(/^code:/,``).split(`#`);return`${i(`/code/[...path]`,{path:t})}${n?`?at=${encodeURIComponent(n)}`:``}`};function Sc(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``)}function Cc(e){let t=e.trim().replace(/^\/+/,``).replace(/\.md$/,``),n=t.includes(`/`)?yc.listing.notes.filter(e=>e.id===t):yc.listing.notes.filter(e=>e.id.split(`/`).at(-1)===t),r=n.length===1?n[0]:null;return r?{id:r.id,title:r.title,kind:r.kind??`note`,done:!!r.done}:null}export{Ts as A,Is as C,Ns as D,Ms as E,Cr as M,vr as N,js as O,Rs as S,Ps as T,fc as _,Sc as a,Ks as b,gc as c,sc as d,ec as f,ac as g,oc as h,bc as i,$ as j,Os as k,hc as l,lc as m,xc as n,_c as o,cc as p,Cc as r,mc as s,yc as t,pc as u,ic as v,ks as w,Gs as x,Js as y};
152
+ `).map((e,t)=>t);let t=[],n=0;for(let r of e.hunks){for(let e=0;e<r.ins.length;e++)t.push(r.at+n+e);n+=r.ins.length-r.del.length}return t}function fc(e,t){let n=new Set(t),r=new Set,i=!1;for(let t of e){if(!tc(t))continue;let e=new Set;for(let n of r){let r=uc(t.hunks,n);r!==null&&e.add(r)}if(r=e,n.has(t.id))for(let e of dc(t))r.add(e),i=!0}let a=[...r].sort((e,t)=>e-t),o=[];for(let e of a){let t=o[o.length-1];t&&t.to===e?t.to=e+1:o.push({from:e,to:e+1})}return{runs:o,removed:i&&!o.length}}``.isWellFormed;function pc(e,t){let n=e.edges.some(([,,e])=>e>=Ks.requires)?Ks.requires:Ks.uses,r=new Map,i=new Map,a=new Set,o=new Set,s=[];for(let[c,l,u]of e.edges)if(c!==l){if(u<n){if(c!==t&&l!==t)continue;(u>=Ks.uses?a:o).add(c===t?l:c),u>=Ks.uses&&s.push({from:c,to:l,kind:`uses`})}else r.set(c,[...r.get(c)??[],l]),i.set(l,[...i.get(l)??[],c])}let c={},l={},u=new Set([t]),d=[],f=[],p=[t];for(let e=0;e<p.length;e++){let t=p[e];for(let e of r.get(t)??[])f.push({from:t,to:e,kind:`requires`}),!u.has(e)&&(u.add(e),d.push(e),p.push(e),c[e]=(c[t]??0)+1,l[e]=t)}let m=new Map;for(let e of f)m.set(e.from,(m.get(e.from)??new Set).add(e.to));for(let e of f){let t=new Set,n=[...m.get(e.from)].filter(t=>t!==e.to),r=!1;for(;n.length&&!r;){let i=n.pop();i===e.to?r=!0:i!==e.from&&!t.has(i)&&(t.add(i),n.push(...m.get(i)??[]))}r&&(e.spare=!0,m.get(e.from).delete(e.to))}let h=[...new Set(i.get(t)??[])];for(let e of h)f.push({from:e,to:t,kind:`builds`});let g=new Set([...d,...h]);return{requires:d,depth:c,via:l,builds:h,uses:[...a].filter(e=>!g.has(e)),also:[...o].filter(e=>!g.has(e)&&!a.has(e)),links:[...f,...s.filter(e=>!g.has(e.from===t?e.to:e.from))]}}function mc(){try{return new URLSearchParams(location.search).get(`base`)??``}catch{return``}}var hc=e=>mc()?`${e}@${mc()}`:e;function gc(e,t=``){return`${location.origin}${location.pathname}?base=${encodeURIComponent(e)}${t}`}var _c=class extends Error{status;current;constructor(e,t,n){super(e),this.status=t,this.current=n}};function vc(e=new URL(mc()?`b/${encodeURIComponent(mc())}/api/`:`api/`,document.baseURI).href){let t=null,n=async(t,n)=>{let r;try{r=await fetch(e+t,n)}catch{throw new _c(`isorite is not answering`,0)}let i=await r.json().catch(()=>({}));if(!r.ok)throw new _c(i.error??r.statusText,r.status,i.current);return i},r=()=>n(`session`),i=async(e,i,a)=>{t??=r().then(e=>e.token);let o={"Content-Type":`application/json`,"x-isorite-token":await t};return n(i,{method:e,headers:o,body:JSON.stringify(a)})},a=e=>`?id=${encodeURIComponent(e)}`,o=(t,n=`notes`)=>`${e}file?${n===`code`?`code`:`path`}=${encodeURIComponent(t)}`;return{session:async()=>{let{token:e,...n}=await r();return t=Promise.resolve(e),n},notes:()=>n(`notes`),readNote:e=>n(`note`+a(e)),fileUrl:o,pictures:()=>n(`pictures`),code:(e,t)=>n(`code?href=${encodeURIComponent(e)}${t?`&full=1`:``}`),savePicture:async(e,i)=>{t??=r().then(e=>e.token);let a=Ds(e)??`application/octet-stream`;return n(`file?path=${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":a,"x-isorite-token":await t},body:i})},file:async(e,t)=>{let n;try{n=await fetch(o(e,t))}catch{throw new _c(`isorite is not answering`,0)}if(n.status===404)return null;if(!n.ok)throw new _c((await n.json().catch(()=>({}))).error??n.statusText,n.status);return{bytes:new Uint8Array(await n.arrayBuffer()),type:n.headers.get(`content-type`)??``,version:(n.headers.get(`etag`)??``).replaceAll(`"`,``)}},saveNote:(e,t)=>i(`PUT`,`note`+a(e),t),createNote:(e,t)=>i(`POST`,`note`+a(e),{text:t}),journal:e=>n(`journal`+a(e)),version:async(e,t)=>(await n(`version`+a(e)+`&entry=`+encodeURIComponent(t))).text,makeFolder:e=>i(`POST`,`folder`,{path:e}),moveFolder:async(e,t)=>{await i(`POST`,`folder/move`,{from:e,to:t})},deleteFolder:async e=>{await i(`POST`,`folder/delete`,{path:e})},moveNote:(e,t,n)=>i(`POST`,`note/move`+a(e),{to:t,base:n}),deleteNote:async(e,t)=>{await i(`POST`,`note/delete`+a(e),{base:t})},restore:(e,t,n)=>i(`POST`,`note/restore`+a(e),{entry:t,base:n}),map:()=>n(`map`),timeline:()=>n(`timeline`),search:e=>n(`search?q=${encodeURIComponent(e)}`),agents:()=>n(`agents`),saveAgents:e=>i(`POST`,`agents`,{text:e}),nameRepository:async()=>!1,agentNotes:()=>n(`agents/notes`),setAgentNotes:e=>i(`POST`,`agents/notes`,{may:e}),brokenNews:async()=>[],conversations:()=>n(`conversations`),deleteConversation:async e=>{await i(`POST`,`conversation/delete`,{id:e})},conversation:async e=>{let t=await n(`conversation`+(e?a(e):``));return t.id?t:null},keep:(e,t,n)=>i(`POST`,`proposal/keep`+a(e),{proposal:t,...n===void 0?{}:{region:n}}),revise:async(e,t,n)=>{await i(`POST`,`proposal/revise`+a(e),{proposal:t,text:n})},discard:async(e,t,n)=>{await i(`POST`,`proposal/discard`+a(e),{proposal:t,...n===void 0?{}:{region:n}})},setDone:(e,t,n)=>i(`POST`,`note/done`+a(e),{done:t,base:n}),agentTools:()=>n(`agent/tools`),agentLook:e=>i(`POST`,`agent/look`,e),agentWrite:e=>i(`POST`,`agent/write`,e),agentSend:e=>i(`POST`,`agent/send`,e),agentReceived:async(e,t)=>{await i(`POST`,`agent/received`,{id:e,agent:t})},agentStatus:async(e,t,n)=>{await i(`POST`,`agent/status`,{agent:e,session:t,busy:n})},agentTake:e=>i(`POST`,`agent/take`,{id:e}),agentChanged:async()=>{throw Error(`only isorite acp tells the server of an agent's change`)},keepAgentRecord:async()=>{throw Error(`only the server keeps an agent's session`)},agentRecords:()=>n(`agent/records`),agentRecord:(e,t)=>n(`agent/record?agent=${encodeURIComponent(e)}&session=${encodeURIComponent(t)}`),deleteAgentRecord:async()=>{throw Error(`a kept session is removed through the pane's drawer`)},bases:{list:()=>n(`bases`),lend:async(e,t)=>(await i(`POST`,`bases/lend`,{name:e,lend:t})).bases,title:async(e,t)=>(await i(`POST`,`bases/title`,{name:e,title:t})).bases},own:{repo:()=>n(`own/repo`),choose:e=>i(`POST`,`own/choose`,{choice:e})},pi:{state:()=>n(`pi`),setKey:async(e,t)=>{await i(`POST`,`pi/key`,{provider:e,key:t})},removeKey:async e=>{await i(`POST`,`pi/key/remove`,{provider:e})},choose:async(e,t)=>{await i(`POST`,`pi/choose`,{provider:e,model:t})},setReach:async(e,t)=>{await i(`POST`,`pi/reach`,{files:e,shell:t})}},terminal:{view:()=>n(`terminal`),prompt:async(e,t)=>{await i(`POST`,`terminal/prompt`,{asked:e,given:t})},steer:async(e,t)=>{await i(`POST`,`terminal/steer`,{asked:e,given:t})},stop:async()=>{await i(`POST`,`terminal/stop`,{})},reply:async(e,t)=>{await i(`POST`,`terminal/permission`,{id:e,decision:t})},take:e=>i(`POST`,`agent/take`,{id:e}),give:async e=>{await i(`POST`,`acp/give`,{given:e})},withdraw:async e=>{await i(`POST`,`terminal/withdraw`,{given:e})},follow:async(e,t)=>{await i(`POST`,`acp/follow`,{agent:e,session:t})},fork:async(e,t)=>{await i(`POST`,`acp/fork`,{agent:e,session:t})},fresh:async e=>{await i(`POST`,`acp/new`,{agent:e})},list:async()=>{await i(`POST`,`acp/list`,{})},set:async(e,t,n)=>{await i(`POST`,`acp/set`,{kind:e,id:t,value:n})},forget:async(e,t)=>{await i(`POST`,`acp/forget`,{agent:e,session:t})},project:()=>n(`connect`),writeProject:async()=>(await i(`POST`,`connect`,{})).written,chosen:()=>n(`acp/agent`),registry:()=>n(`acp/registry`),detected:()=>n(`acp/detected`),choose:e=>i(`POST`,`acp/choose`,{choice:e})},events(t){let n=new EventSource(e+`events`),r=e=>{try{t(JSON.parse(e.data))}catch{}};for(let e of[`note-changed`,`journal`,`agent-start`,`agent-step`,`agent-done`,`agent-sent`,`agent-received`,`agent-item`,`agent-taken`,`terminal`])n.addEventListener(e,r);return()=>n.close()}}}var yc=new class{api;#e=t(null);get session(){return e(this.#e)}set session(e){n(this.#e,e)}#t=t({notes:[],dirs:[]});get listing(){return e(this.#t)}set listing(e){n(this.#t,e)}#n=t(``);get error(){return e(this.#n)}set error(e){n(this.#n,e,!0)}#r=t(``);get open(){return e(this.#r)}set open(e){n(this.#r,e,!0)}#i=t(``);get here(){return e(this.#i)}set here(e){n(this.#i,e,!0)}#a=t(null);get saving(){return e(this.#a)}set saving(e){n(this.#a,e,!0)}#o=t(null);get atlas(){return e(this.#o)}set atlas(e){n(this.#o,e)}#s=t(null);get iso(){return e(this.#s)}set iso(e){n(this.#s,e)}listeners=new Set;relist=null;async load(e=vc()){this.api=e;try{[this.session,this.listing]=await Promise.all([e.session(),e.notes()])}catch(e){this.error=e.message;return}e.events(e=>{this.follow(e);for(let t of this.listeners)t(e);e.type===`note-changed`&&(this.relist&&clearTimeout(this.relist),this.relist=setTimeout(()=>{this.refresh()},300))})}async refresh(){try{this.listing=await this.api.notes()}catch{}}follow(e){(e.type===`agent-start`||e.type===`agent-step`)&&this.iso?.request!==e.request&&(this.iso={request:e.request,note:``,agent:e.agent,state:`reading`,steps:[],message:``});let t=this.iso;t&&`request`in e&&e.request===t.request&&(e.type===`agent-step`?this.iso={...t,state:`reading`,steps:[...t.steps,e.step]}:e.type===`agent-done`&&(this.iso={...t,state:`done`}))}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},bc=e=>i(`/n/[...id]`,{id:e}),xc=e=>{let[t=``,n=``]=e.trim().replace(/^code:/,``).split(`#`);return`${i(`/code/[...path]`,{path:t})}${n?`?at=${encodeURIComponent(n)}`:``}`};function Sc(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``)}function Cc(e){let t=e.trim().replace(/^\/+/,``).replace(/\.md$/,``),n=t.includes(`/`)?yc.listing.notes.filter(e=>e.id===t):yc.listing.notes.filter(e=>e.id.split(`/`).at(-1)===t),r=n.length===1?n[0]:null;return r?{id:r.id,title:r.title,kind:r.kind??`note`,done:!!r.done}:null}export{Ts as A,Is as C,Ns as D,Ms as E,Cr as M,vr as N,js as O,Rs as S,Ps as T,fc as _,Sc as a,Ks as b,gc as c,sc as d,ec as f,ac as g,oc as h,bc as i,$ as j,Os as k,hc as l,lc as m,xc as n,_c as o,cc as p,Cc as r,mc as s,yc as t,pc as u,ic as v,ks as w,Gs as x,Js as y};
@@ -1,2 +1,2 @@
1
- import{_ as e,a as t,o as n,u as r,x as i}from"./DS7XcdHs.js";import{r as a,t as o}from"./DciMwFJ1.js";import{a as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S}from"./Dzu8v7nB.js";import{t as C}from"./Ce_hS451.js";import{t as w}from"./CabmfniL.js";import{PeleError as T,d as E,u as D}from"./BNlziJ_1.js";var O=1e4;function k(e,t,n,r,i){let a=e.packet?.[t];return typeof a==`number`&&a>=r?Math.min(a,i):n}function A(e){return new T(e,`semantic`,{type:`packet`})}function j(e,t,n){let r=Math.floor(k(t,`bitsPerRow`,32,1,4096)),i=[],a=-1,o=[],s=1;for(let t of e.blocks){let{start:e,end:n,bits:c}=t;if(e!==void 0&&n!==void 0&&n<e)throw A(`Packet block ${e} - ${n} is invalid. End must be greater than start.`);if(e??=a+1,e!==a+1)throw A(`Packet block ${e} - ${n??e} is not contiguous. It should start from ${a+1}.`);if(c===0)throw A(`Packet block ${e} is invalid. Cannot have a zero bit field.`);for(n??=e+(c??1)-1,c??=n-e+1,a=n;o.length<=r+1&&i.length<O;){let a=s*r-1;if(n<=a){o.push({start:e,end:n,bits:c,label:t.label}),n===a&&(i.push(o),o=[],s++);break}o.push({start:e,end:a,bits:a-e,label:t.label}),i.push(o),o=[],s++,e=a+1,c=n-e}}return o.length>0&&i.push(o),{type:`packet`,title:e.title||n,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
1
+ import{_ as e,a as t,o as n,u as r,x as i}from"./DlgOmQ_G.js";import{r as a,t as o}from"./DciMwFJ1.js";import{a as s,c,d as l,f as u,g as d,h as f,i as p,l as m,m as h,n as g,o as _,p as v,r as y,s as b,t as x,u as S}from"./jAC4YCqW.js";import{t as C}from"./Ce_hS451.js";import{t as w}from"./CMAnq3x6.js";import{PeleError as T,d as E,u as D}from"./BArcFmbE.js";var O=1e4;function k(e,t,n,r,i){let a=e.packet?.[t];return typeof a==`number`&&a>=r?Math.min(a,i):n}function A(e){return new T(e,`semantic`,{type:`packet`})}function j(e,t,n){let r=Math.floor(k(t,`bitsPerRow`,32,1,4096)),i=[],a=-1,o=[],s=1;for(let t of e.blocks){let{start:e,end:n,bits:c}=t;if(e!==void 0&&n!==void 0&&n<e)throw A(`Packet block ${e} - ${n} is invalid. End must be greater than start.`);if(e??=a+1,e!==a+1)throw A(`Packet block ${e} - ${n??e} is not contiguous. It should start from ${a+1}.`);if(c===0)throw A(`Packet block ${e} is invalid. Cannot have a zero bit field.`);for(n??=e+(c??1)-1,c??=n-e+1,a=n;o.length<=r+1&&i.length<O;){let a=s*r-1;if(n<=a){o.push({start:e,end:n,bits:c,label:t.label}),n===a&&(i.push(o),o=[],s++);break}o.push({start:e,end:a,bits:a-e,label:t.label}),i.push(o),o=[],s++,e=a+1,c=n-e}}return o.length>0&&i.push(o),{type:`packet`,title:e.title||n,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
2
2
  `):void 0,bitsPerRow:r,rows:i}}var M=[{name:`packet-beta`,pattern:`packet-beta`},p(`packet`),{name:`-`,pattern:`-`,longer:[y]},{name:`+`,pattern:`+`},{name:`:`,pattern:`:`},s,x,v,{name:`INT`,pattern:/0|[1-9][0-9]*(?!\.)/y},h,m,S,y,_,b];function N(e){let t=new f(g(e,M,`packet`),M,`packet`),n={$type:`Packet`,blocks:[]},r=()=>{if(t.kind!==-1)for(t.kind!==10&&t.fail(`a line break or the end of input`);t.kind===10;)t.i++};for(;t.kind===10;)t.i++;for(t.accept(0)||t.expect(1);t.kind!==-1;)switch(t.kind){case 10:t.i++;break;case 5:n.accDescr=c(t.take()),r();break;case 6:n.accTitle=d(t.take()),r();break;case 7:n.title=l(t.take()),r();break;case 8:case 3:{let e={$type:`PacketBlock`,label:``};t.accept(3)?e.bits=Number(t.expect(8)):(e.start=Number(t.take()),t.accept(2)&&(e.end=Number(t.expect(8)))),t.expect(4),e.label=u(t.expect(9)),n.blocks.push(e),r();break}default:t.fail(`a field, a title, or a line break`)}return n}function P(e,t,n){return o(n,r=>F(e,t,n,r))}function F(o,s,c,l){let u=c.fontSize??16,d=Math.round(u*.875),f=Math.round(u*.625),p=c.measurer??D(c.fontFamily,c.fontFamilyMono),m=c.padding??8,h=s.packet??{},g=k(s,`rowHeight`,32,1,400),_=k(s,`bitWidth`,32,1,400),v=k(s,`paddingX`,5,0,400),y=k(s,`paddingY`,5,0,400),b=h.showBits!==!1,x=h.bitOrder===`descending`,S=o.bitsPerRow,T=o.rows;if(l){let e=Math.max(1,Math.floor(((c.maxWidth??320)-2*m)/Math.min(_,18)));S=Math.min(S,Math.max(8,2**Math.floor(Math.log2(e))));let t=o.rows[o.rows.length-1],n=t?.[t.length-1]?.end??0;Math.ceil((n+1)/S)>1e4&&(S=o.bitsPerRow),_=Math.min(_,Math.max(18,((c.maxWidth??320)-2*m)/S));let r=e=>e.bits===e.end-e.start,i=[];for(let e of o.rows)for(let t of e){let e=i[i.length-1];e&&r(e)&&r(t)&&e.label===t.label&&t.start===e.end+1&&t.start%o.bitsPerRow===0?(e.end=t.end,e.bits=e.end-e.start):i.push({...t})}T=[];for(let e of i)for(let t=e.start;t<=e.end;){let n=Math.min(e.end,(Math.floor(t/S)+1)*S-1),r=Math.floor(t/S);(T[r]??(T[r]=[])).push({...e,start:t,end:n}),t=n+1}}let O=new Map;if(l)for(let e of T)for(let t of e){let e=Math.max(1,(t.end-t.start+1)*_-Math.min(v,_-1)-6),n=w(E(t.label).trim(),p,d,e);O.set(t,n)}let A=b?f+4:0,j=T.map(e=>{let t=g;if(l)for(let n of e)t=Math.max(t,O.get(n).height+10);return t}),M=[],N=0;for(let e of j)M.push(N),N+=A+e+y;T.length&&(N-=y);let P=Math.min(v,_-1),F=T.length>0?S*_-P:0,I=r(o.title,!1,p,u,l?a(c):4e3,1),L=I.height>0?I.height+(N>0?12:0):0,R=new Map,z=(e,t)=>{let n=R.get(e);return n||R.set(e,n=new Map),n.has(t)||n.set(t,C(E(e).trim(),t,d,Math.round(u*.5),p)),n.get(t)},B=m+Math.max(0,(I.width-F)/2),V=``,H=``;T.forEach((e,r)=>{let a=m+M[r]+A,o=j[r];for(let r of e){let e=r.end-r.start+1,s=r.start%S,c=B+(x?S-s-e:s)*_,u=e*_-P,f=l?void 0:z(r.label,u-6);if(V+=`<g class="pele-node" data-id="${r.start}-${r.end}"><rect x="${i(c)}" y="${i(a)}" width="${i(u)}" height="${i(o)}" fill="var(--_s)" stroke="var(--_b)" style="rx:var(--_r)"/>`+(l?n(O.get(r),c+u/2,a+o/2,``):f&&f.size<=o?`<text x="${i(c+u/2)}" y="${i(a+o/2+f.size*.35)}"${f.size===d?``:` font-size="${i(f.size)}"`}>${t(f.text)}</text>`:``)+`</g>`,!b)continue;let p=x?r.end:r.start,m=x?r.start:r.end;H+=e===1?`<text x="${i(c+u/2)}" y="${i(a-4)}" text-anchor="middle">${p}</text>`:`<text x="${i(c)}" y="${i(a-4)}">${p}</text><text x="${i(c+u)}" y="${i(a-4)}" text-anchor="end">${m}</text>`}});let U=Math.ceil(Math.max(F,I.width)+2*m),W=Math.ceil(N+L+2*m),G=(V?`<g class="pele-packet-fields" font-size="${d}" text-anchor="middle">${V}</g>`:``)+(H?`<g class="pele-packet-bits" font-size="${f}" fill="var(--_m)">${H}</g>`:``)+n(I,U/2,W-m-I.height/2,` class="pele-title" font-weight="var(--_tw)"`);return{svg:e(`packet`,U,W,u,c,o,G),width:U,height:W,links:[]}}var I={type:`packet`,parse:(e,t,n)=>j(N(e),t,n),render:P};export{I as packet};
@@ -1,4 +1,4 @@
1
- import{_ as e,a as t,i as n,l as r,o as i,r as a,u as o,x as s}from"./DS7XcdHs.js";import{o as c,r as l}from"./DciMwFJ1.js";import{c as u,d,g as f,h as p,i as m,n as h,o as g,r as _,s as ee}from"./Dzu8v7nB.js";import{PeleError as v,d as y,u as te}from"./BNlziJ_1.js";function b(e){return e===32||e>=9&&e<=13||e>127&&/\s/.test(String.fromCharCode(e))}function x(){let e=1/0;return(t,n)=>{if(!t.startsWith(`accDescr`,n))return-1;let r=t.length,i=n+8;for(;i<r&&(t.charCodeAt(i)===32||t.charCodeAt(i)===9);)i++;if(t.charCodeAt(i)===58){for(i++;i<r;i++){let e=t.charCodeAt(i);if(e===10||e===13||e===37&&t.charCodeAt(i+1)===37)break}return i}for(;i<r&&b(t.charCodeAt(i));)i++;if(t.charCodeAt(i)!==123||i>=e)return-1;let a=t.indexOf(`}`,i+1);return a===-1&&(e=i),a+1||-1}}var S=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,C={name:`TITLE`,pattern:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/y,first:`t`},w={name:`ACC_TITLE`,pattern:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/y,first:`a`},T={name:`ACC_DESCR`,pattern:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/y,first:`a`,scanner:x};function E(e,t){return{name:e,pattern:e,longer:t}}function D(e,t){return{...m(e),longer:[t]}}function O(e){return{name:e,pattern:/[A-Z_a-z][\w-]*/y,first:S+`_`}}function k(e){return{name:e,pattern:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/y,first:`"'`}}function A(e){return[{name:e+`_WHITESPACE`,pattern:/[\t \r\n]+/y,hidden:!0,first:` \r
1
+ import{_ as e,a as t,i as n,l as r,o as i,r as a,u as o,x as s}from"./DlgOmQ_G.js";import{o as c,r as l}from"./DciMwFJ1.js";import{c as u,d,g as f,h as p,i as m,n as h,o as g,r as _,s as ee}from"./jAC4YCqW.js";import{PeleError as v,d as y,u as te}from"./BArcFmbE.js";function b(e){return e===32||e>=9&&e<=13||e>127&&/\s/.test(String.fromCharCode(e))}function x(){let e=1/0;return(t,n)=>{if(!t.startsWith(`accDescr`,n))return-1;let r=t.length,i=n+8;for(;i<r&&(t.charCodeAt(i)===32||t.charCodeAt(i)===9);)i++;if(t.charCodeAt(i)===58){for(i++;i<r;i++){let e=t.charCodeAt(i);if(e===10||e===13||e===37&&t.charCodeAt(i+1)===37)break}return i}for(;i<r&&b(t.charCodeAt(i));)i++;if(t.charCodeAt(i)!==123||i>=e)return-1;let a=t.indexOf(`}`,i+1);return a===-1&&(e=i),a+1||-1}}var S=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,C={name:`TITLE`,pattern:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/y,first:`t`},w={name:`ACC_TITLE`,pattern:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/y,first:`a`},T={name:`ACC_DESCR`,pattern:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/y,first:`a`,scanner:x};function E(e,t){return{name:e,pattern:e,longer:t}}function D(e,t){return{...m(e),longer:[t]}}function O(e){return{name:e,pattern:/[A-Z_a-z][\w-]*/y,first:S+`_`}}function k(e){return{name:e,pattern:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/y,first:`"'`}}function A(e){return[{name:e+`_WHITESPACE`,pattern:/[\t \r\n]+/y,hidden:!0,first:` \r
2
2
  `},{..._,name:e+`_YAML`,first:`-`},{...g,name:e+`_DIRECTIVE`,first:` %`},{...ee,name:e+`_SINGLE_LINE_COMMENT`,first:` %`}]}function j(e){if(!e.includes(`\\`))return e.slice(1,-1);let t=e.length-1,n=``;for(let r=1;r<t;r++){let i=e[r];i===`\\`&&r+1<t?(i=e[++r],n+=i===`n`?`
3
3
  `:i===`r`?`\r`:i===`t`?` `:i):n+=i}return n}function M(e,t,n,r,i,a){let o=new p(h(e,t,`railroad`),t,`railroad`),s={$type:n,rules:[]};for(o.expect(0);;){let e=o.kind;if(e===r){let e=d(o.take()),t=e[0];s.title=(t===`"`||t===`'`)&&e.endsWith(t)?i(e):e}else if(e===r+1)s.accTitle=f(o.take());else if(e===r+2)s.accDescr=u(o.take());else break}for(;o.kind!==-1;)s.rules.push(a(o));return s}var ne=[];function N(e){let t=e,n=t.element??t.primary??t.suffix,r=t.alternatives??t.elements??(n?[n]:ne);if(t.base){r=[t.base];for(let e of t.postfixes)e.except&&r.push(e.except)}return r}var P=e=>({type:`terminal`,value:e}),F=e=>({type:`nonterminal`,name:e}),I=e=>({type:`special`,text:e}),L=e=>({type:`optional`,element:e}),R=(e,t,n=1/0)=>({type:`repetition`,element:e,min:t,max:n});function z(e){return e.length===1?e[0]:{type:`sequence`,elements:e}}function B(e){return e.length===1?e[0]:{type:`choice`,alternatives:e}}function V(e,t){return e.rules.map(e=>({name:e.name,definition:H(e.definition,N,t)}))}function H(e,t,n){let r=[e],i=[t(e)],a=[[]];for(;;){let e=r.length-1,o=a[e];if(o.length<i[e].length){let n=i[e][o.length];r.push(n),i.push(t(n)),a.push([])}else{let t=n(r[e],o);if(e===0)return t;r.pop(),i.pop(),a.pop(),a[e-1].push(t)}}}var U=`0123456789`,W={name:`ABNF_RULENAME`,pattern:/[A-Za-z][A-Za-z0-9-]*/y,first:S},G={name:`ABNF_COMMENT`,pattern:/;[^\n\r]*/y,hidden:!0,first:`;`},K=[D(`railroad-abnf-beta`,W),E(`=`),E(`;`,[G]),E(`/`),E(`(`),E(`)`),E(`[`),E(`]`),C,w,T,W,{name:`ABNF_STRING`,pattern:/"[^"]*"/y,first:`"`},{name:`ABNF_NUMVAL`,pattern:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/y,first:`%`},{name:`ABNF_REPEAT`,pattern:/[0-9]*\*[0-9]*/y,first:U+`*`},{name:`ABNF_EXACT_REPEAT`,pattern:/[0-9]+/y,first:U},...A(`ABNF`),G];function q(e,t,n,r){let i={$type:`AbnfConcatenation`,elements:[]};return t.alternatives.push(i),{alternation:t,concatenation:i,node:e,close:n,repeat:r}}function re(e){let t=[],n=q(void 0,{$type:`AbnfAlternation`,alternatives:[]},-2,void 0);for(;;){let r=e.kind===14||e.kind===15?e.take():void 0,i,a=e.kind;switch(a){case 12:i={$type:`AbnfStringLiteral`,value:e.take().slice(1,-1)};break;case 13:i={$type:`AbnfNumVal`,value:e.take()};break;case 11:i={$type:`AbnfRuleName`,name:e.take()};break;case 4:case 6:{e.i++;let i={$type:`AbnfAlternation`,alternatives:[]};t.push(n),n=q({$type:a===4?`AbnfGroup`:`AbnfOptionalGroup`,element:i},i,a+1,r);continue}default:e.fail(`a string, a number, a name, or an opening bracket`)}for(;;){n.concatenation.elements.push(r===void 0?{$type:`AbnfElement`,primary:i}:{$type:`AbnfElement`,repeat:r,primary:i});let a=e.kind;if(a===n.close)e.i++,i=n.node,r=n.repeat,n=t.pop();else{if(a===3)e.i++,n.concatenation={$type:`AbnfConcatenation`,elements:[]},n.alternation.alternatives.push(n.concatenation);else if(a!==12&&a!==13&&a!==11&&a!==4&&a!==6&&a!==14&&a!==15){if(t.length===0)return n.alternation;e.fail(`token of type '${K[n.close].name}'`)}break}}}}function ie(e){return M(e,K,`RailroadAbnf`,8,e=>e.slice(1,-1),e=>{let t=e.expect(11);e.expect(1);let n=re(e);return e.expect(2),{$type:`AbnfRule`,name:t,definition:n}})}function ae(e,t){switch(e.$type){case`AbnfAlternation`:return B(t);case`AbnfConcatenation`:return z(t);case`AbnfElement`:{let n=e.repeat;if(!n)return t[0];let r=n.indexOf(`*`),i=r===-1,a=r>0||i?parseInt(n,10):0,o=i?a:r<n.length-1?parseInt(n.slice(r+1),10):1/0;return a===0&&o===1?L(t[0]):R(t[0],a,o)}case`AbnfStringLiteral`:case`AbnfNumVal`:return P(e.value);case`AbnfRuleName`:return F(e.name);case`AbnfGroup`:return t[0];case`AbnfOptionalGroup`:return L(t[0])}}var oe=e=>V(e,ae);function se(e,t){if(e.charCodeAt(t)!==63)return-1;let n=!1;for(let r=t+1;r<e.length;r++){let t=e.charCodeAt(r);if(t===63)return n?r+1:-1;if(t===59)return-1;n||=!b(t)}return-1}var ce=O(`EBNF_ID`),le={name:`EBNF_SPECIAL_SEQUENCE`,pattern:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/y,first:`?`,scanner:()=>se},ue=A(`EBNF`),de={name:`EBNF_ISO_COMMENT`,pattern:/\(\*[\s\S]*?\*\)/y,hidden:!0,first:`(`,opener:/\(\*/y},fe=[D(`railroad-ebnf-beta`,ce),E(`::=`),E(`=`),E(`;`),E(`|`),E(`,`),E(`(`,[de]),E(`)`),E(`[`),E(`]`),E(`{`),E(`}`),E(`?`,[le]),E(`*`),E(`+`),E(`-`,[ue[1]]),C,w,T,ce,k(`EBNF_STRING`),le,...ue,{name:`EBNF_BLOCK_COMMENT`,pattern:/\/\*[\s\S]*?\*\//y,hidden:!0,first:`/`,opener:/\/\*/y},de];function pe(e,t,n,r){let i={$type:`EbnfSequence`,elements:[]};return t.alternatives.push(i),{choice:t,sequence:i,term:void 0,node:e,close:n,except:r}}var me=[`EbnfGroup`,`EbnfOptional`,`EbnfRepetition`];function he(e){let t=[],n=pe(void 0,{$type:`EbnfChoice`,alternatives:[]},-2,!1),r=!1;for(;;){let i,a=e.kind;switch(a){case 20:i={$type:`EbnfTerminal`,value:j(e.take())};break;case 19:i={$type:`EbnfNonTerminal`,name:e.take()};break;case 21:i={$type:`EbnfSpecial`,text:e.take().slice(1,-1).trim()};break;case 6:case 8:case 10:{e.i++;let i={$type:`EbnfChoice`,alternatives:[]};t.push(n),n=pe({$type:me[a-6>>1],element:i},i,a+1,r),r=!1;continue}default:e.fail(`a terminal, a name, or an opening bracket`)}for(;;){r?(n.term.postfixes.push({$type:`EbnfExceptionPostfix`,except:i}),r=!1):(n.term={$type:`EbnfTerm`,base:i,postfixes:[]},n.sequence.elements.push(n.term));let a=n.term.postfixes;for(;;){let t=e.kind;if(t===12)a.push({$type:`EbnfOptionalPostfix`,operator:e.take()});else if(t===13)a.push({$type:`EbnfZeroOrMorePostfix`,operator:e.take()});else if(t===14)a.push({$type:`EbnfOneOrMorePostfix`,operator:e.take()});else break}let o=e.kind;if(o===n.close)e.i++,i=n.node,r=n.except,n=t.pop();else{if(o===15)e.i++,r=!0;else if(o===5)e.i++;else if(o===4)e.i++,n.sequence={$type:`EbnfSequence`,elements:[]},n.choice.alternatives.push(n.sequence);else if(o!==20&&o!==19&&o!==21&&o!==6&&o!==8&&o!==10){if(t.length===0)return n.choice;e.fail(`token of type '${fe[n.close].name}'`)}break}}}}function ge(e){return M(e,fe,`RailroadEbnf`,16,j,e=>{let t=e.expect(19);e.accept(2)||e.expect(1);let n={$type:`EbnfRule`,name:t,definition:he(e)};return e.expect(3),n})}function _e(e,t){switch(e.$type){case`EbnfChoice`:return B(t);case`EbnfSequence`:return z(t);case`EbnfTerm`:{let n=t[0],r=1;for(let i of e.postfixes)n=i.$type===`EbnfOptionalPostfix`?L(n):i.$type===`EbnfExceptionPostfix`?{type:`sequence`,elements:[n,P(`-`),t[r++]]}:R(n,+(i.$type===`EbnfOneOrMorePostfix`));return n}case`EbnfTerminal`:return P(e.value);case`EbnfNonTerminal`:return F(e.name);case`EbnfSpecial`:return I(e.text);case`EbnfGroup`:return t[0];case`EbnfOptional`:return L(t[0]);case`EbnfRepetition`:return R(t[0],0)}}var ve=e=>V(e,_e),ye=O(`RR_ID`),J=e=>E(e,[ye]),be=[D(`railroad-beta`,ye),J(`nonterminal`),J(`zeroOrMore`),J(`oneOrMore`),J(`sequence`),J(`optional`),J(`terminal`),J(`special`),J(`choice`),E(`=`),E(`;`),E(`(`),E(`,`),E(`)`),C,w,T,ye,k(`RR_STRING`),...A(`RR`),{name:`RR_BLOCK_COMMENT`,pattern:/\/\*[\s\S]*?\*\//y,hidden:!0,first:`/`,opener:/\/\*/y}];function xe(e){e.i++,e.expect(11);let t=j(e.expect(18));return e.expect(13),t}function Se(e){return{$type:e,element:void 0}}function Ce(e){let t=[];for(;;){let n;switch(e.kind){case 6:n={$type:`RailroadTerminalExpr`,value:xe(e)};break;case 1:n={$type:`RailroadNonTerminalExpr`,name:xe(e)};break;case 7:n={$type:`RailroadSpecialExpr`,text:xe(e)};break;case 4:n={$type:`RailroadSequenceExpr`,elements:[]};break;case 8:n={$type:`RailroadChoiceExpr`,alternatives:[]};break;case 5:n=Se(`RailroadOptionalExpr`);break;case 3:n=Se(`RailroadOneOrMoreExpr`);break;case 2:n=Se(`RailroadZeroOrMoreExpr`);break;default:e.fail(`an expression`)}if(`elements`in n||`alternatives`in n||`element`in n)e.i++,e.expect(11),t.push(n);else for(;;){let r=t[t.length-1];if(r===void 0)return n;if(`element`in r)r.element=n;else if((`elements`in r?r.elements:r.alternatives).push(n),e.accept(12))break;e.expect(13),t.pop(),n=r}}}function we(e){return M(e,be,`Railroad`,14,j,e=>{let t=e.expect(17);e.expect(9);let n=Ce(e);return e.expect(10),{$type:`RailroadRule`,name:t,definition:n}})}function Te(e,t){switch(e.$type){case`RailroadTerminalExpr`:return P(e.value);case`RailroadNonTerminalExpr`:return F(e.name);case`RailroadSpecialExpr`:return I(e.text);case`RailroadSequenceExpr`:return z(t);case`RailroadChoiceExpr`:return B(t);case`RailroadOptionalExpr`:return L(t[0]);default:return R(t[0],+(e.$type===`RailroadOneOrMoreExpr`))}}var Ee=e=>V(e,Te),De=O(`PEG_ID`),Oe=[D(`railroad-peg-beta`,De),E(`<-`),E(`;`),E(`/`),E(`&`),E(`!`),E(`?`),E(`*`),E(`+`),E(`(`),E(`)`),E(`.`),C,w,T,De,k(`PEG_STRING`),...A(`PEG`),{name:`PEG_LINE_COMMENT`,pattern:/#[^\n\r]*/y,hidden:!0,first:`#`}];function ke(e,t,n){let r={$type:`PegSequence`,elements:[]};return t.alternatives.push(r),{choice:t,sequence:r,node:e,operator:n}}function Ae(e){let t=[],n=ke(void 0,{$type:`PegOrderedChoice`,alternatives:[]},void 0);for(;;){let r=e.kind===4||e.kind===5?e.take():void 0,i;switch(e.kind){case 16:i={$type:`PegLiteral`,value:j(e.take())};break;case 15:i={$type:`PegIdentifier`,name:e.take()};break;case 11:i={$type:`PegAny`,dot:e.take()};break;case 9:{e.i++;let i={$type:`PegOrderedChoice`,alternatives:[]};t.push(n),n=ke({$type:`PegGroup`,element:i},i,r);continue}default:e.fail(`a literal, a name, a dot, or an opening parenthesis`)}for(;;){let a={$type:`PegSuffix`,primary:i};(e.kind===6||e.kind===7||e.kind===8)&&(a.operator=e.take()),n.sequence.elements.push(r===void 0?{$type:`PegPrefix`,suffix:a}:{$type:`PegPrefix`,operator:r,suffix:a});let o=e.kind;if(o===10&&t.length>0)e.i++,i=n.node,r=n.operator,n=t.pop();else{if(o===3)e.i++,n.sequence={$type:`PegSequence`,elements:[]},n.choice.alternatives.push(n.sequence);else if(o!==4&&o!==5&&o!==16&&o!==15&&o!==11&&o!==9){if(t.length===0)return n.choice;e.fail(`token of type ')'`)}break}}}}function je(e){return M(e,Oe,`RailroadPeg`,12,j,e=>{let t=e.expect(15);e.expect(1);let n={$type:`PegRule`,name:t,definition:Ae(e)};return e.expect(2),n})}function Me(e){switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}}function Ne(e,t){let n=t[0];switch(e.$type){case`PegOrderedChoice`:return B(t);case`PegSequence`:return z(t);case`PegPrefix`:return e.operator?I(e.operator+Me(n)):n;case`PegSuffix`:return e.operator?e.operator===`?`?L(n):R(n,+(e.operator===`+`)):n;case`PegLiteral`:return P(e.value);case`PegIdentifier`:return F(e.name);case`PegAny`:return I(e.dot);case`PegGroup`:return n}}var Pe=e=>V(e,Ne),Fe=class{type=`railroad`;notation=`railroad`;title;accTitle;accDescr;rules=[];byName=new Map;setTitle(e){this.title=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
4
4
  `)}addRule(e){this.rules.push(e),this.byName.set(e.name,e)}getRule(e){return this.byName.get(e)}},Ie=/^\s*railroad-(ebnf-|abnf-|peg-)?beta/i;function Le(e){let t=Ie.exec(e);if(t===null)return;let n=t[1]?.toLowerCase();return n===`ebnf-`?`ebnf`:n===`abnf-`?`abnf`:n===`peg-`?`peg`:`railroad`}function Re(e,t){switch(t){case`ebnf`:{let t=ge(e);return[t,ve(t)]}case`abnf`:{let t=ie(e);return[t,oe(t)]}case`peg`:{let t=je(e);return[t,Pe(t)]}default:{let t=we(e);return[t,Ee(t)]}}}function ze(e,t,n){let[r,i]=Re(t,n);e.notation=n,r.accDescr&&e.setAccDescription(r.accDescr),r.accTitle&&e.setAccTitle(r.accTitle),r.title&&e.setTitle(r.title);for(let t of i)e.addRule(t)}function Be(e,t){let n=Le(e);if(n===void 0)throw new v(`No railroad diagram keyword found.`,`syntax`,{type:`railroad`});let r=new Fe;return t&&(r.title=t),ze(r,e,n),r}var Ve=12,He=6,Ue=18,Y=12,X=7;function Z(e,t,n,r){let i=e.railroad?.[t];return typeof i==`number`&&i>=0?Math.min(i,r):n}var We=/[\n\r\t]/g;function Q(e){return(e.includes(`¶ß`)?y(e.replace(/&/g,`&amp;`)):e).replace(We,e=>e===`