@neuralnomads/codenomad 0.18.0 → 0.19.0

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 (135) hide show
  1. package/README.md +12 -0
  2. package/THIRD_PARTY_NOTICES.md +26 -0
  3. package/dist/auth/manager.js +1 -1
  4. package/dist/background-processes/manager.js +15 -30
  5. package/dist/background-processes/manager.test.js +123 -0
  6. package/dist/config/schema.js +2 -1
  7. package/dist/config/schema.test.js +13 -0
  8. package/dist/events/bus.js +17 -0
  9. package/dist/events/bus.test.js +37 -0
  10. package/dist/filesystem/__tests__/search-cache.test.js +20 -8
  11. package/dist/filesystem/__tests__/search.test.js +53 -0
  12. package/dist/filesystem/search-cache.js +6 -10
  13. package/dist/filesystem/search.js +22 -9
  14. package/dist/index.js +77 -58
  15. package/dist/index.test.js +62 -0
  16. package/dist/opencode-plugin/codenomad-opencode-plugin.tgz +0 -0
  17. package/dist/opencode-update/service.js +150 -0
  18. package/dist/opencode-update/service.test.js +107 -0
  19. package/dist/permissions/auto-accept-manager.js +380 -0
  20. package/dist/permissions/auto-accept-manager.test.js +736 -0
  21. package/dist/permissions/auto-accept-store.js +118 -0
  22. package/dist/permissions/auto-accept-store.test.js +157 -0
  23. package/dist/permissions/opencode-replier.js +31 -0
  24. package/dist/permissions/opencode-yolo-metadata.js +81 -0
  25. package/dist/permissions/opencode-yolo-metadata.test.js +54 -0
  26. package/dist/server/__tests__/listener-retry.test.js +15 -0
  27. package/dist/server/__tests__/remote-proxy.test.js +151 -47
  28. package/dist/server/http-server.js +22 -9
  29. package/dist/server/remote-proxy.js +91 -34
  30. package/dist/server/routes/auth-pages/login.html +3 -3
  31. package/dist/server/routes/auth.js +1 -1
  32. package/dist/server/routes/auth.test.js +21 -0
  33. package/dist/server/routes/opencode-update.js +37 -0
  34. package/dist/server/routes/opencode-update.test.js +34 -0
  35. package/dist/server/routes/remote-servers.js +1 -1
  36. package/dist/server/routes/settings.js +48 -2
  37. package/dist/server/routes/settings.test.js +58 -0
  38. package/dist/server/routes/usage.js +18 -0
  39. package/dist/server/routes/usage.test.js +26 -0
  40. package/dist/server/routes/workspaces.js +34 -2
  41. package/dist/server/routes/workspaces.test.js +113 -0
  42. package/dist/server/routes/worktrees.js +19 -0
  43. package/dist/server/routes/yolo.js +13 -0
  44. package/dist/server/tls.js +2 -2
  45. package/dist/settings/binaries.js +4 -1
  46. package/dist/settings/binaries.test.js +19 -0
  47. package/dist/settings/public-config.js +14 -0
  48. package/dist/settings/public-config.test.js +56 -0
  49. package/dist/settings/service.js +17 -5
  50. package/dist/settings/service.test.js +51 -0
  51. package/dist/settings/yaml-doc-store.js +55 -4
  52. package/dist/settings/yaml-doc-store.test.js +78 -0
  53. package/dist/shutdown.js +83 -0
  54. package/dist/shutdown.test.js +148 -0
  55. package/dist/sidecars/manager.js +26 -3
  56. package/dist/sidecars/manager.test.js +42 -0
  57. package/dist/speech/service.js +121 -10
  58. package/dist/speech/service.test.js +247 -0
  59. package/dist/ui/remote-ui.js +2 -2
  60. package/dist/usage/providers/api-key.js +171 -0
  61. package/dist/usage/providers/google.js +171 -0
  62. package/dist/usage/providers/minimax.js +109 -0
  63. package/dist/usage/providers/oauth.js +76 -0
  64. package/dist/usage/providers/special.js +148 -0
  65. package/dist/usage/service.js +83 -0
  66. package/dist/usage/service.test.js +61 -0
  67. package/dist/usage/shared.js +130 -0
  68. package/dist/usage/shared.test.js +33 -0
  69. package/dist/usage/types.js +1 -0
  70. package/dist/workspaces/__tests__/spawn.test.js +64 -7
  71. package/dist/workspaces/__tests__/workspace-identity.test.js +163 -0
  72. package/dist/workspaces/binary-path.test.js +10 -0
  73. package/dist/workspaces/instance-client.js +42 -0
  74. package/dist/workspaces/instance-client.test.js +149 -0
  75. package/dist/workspaces/instance-events.js +2 -2
  76. package/dist/workspaces/launch-cleanup.test.js +29 -0
  77. package/dist/workspaces/loopback.js +8 -0
  78. package/dist/workspaces/manager.js +473 -128
  79. package/dist/workspaces/manager.test.js +335 -0
  80. package/dist/workspaces/process-identity.darwin.test.js +88 -0
  81. package/dist/workspaces/process-identity.js +449 -0
  82. package/dist/workspaces/process-identity.test.js +140 -0
  83. package/dist/workspaces/runtime.js +471 -138
  84. package/dist/workspaces/runtime.test.js +286 -0
  85. package/dist/workspaces/spawn.js +86 -15
  86. package/dist/workspaces/workspace-identity.js +27 -0
  87. package/package.json +2 -1
  88. package/public/assets/FilesTab-Cbs7b7y9.js +2 -0
  89. package/public/assets/{GitChangesTab-DyRStL3G.js → GitChangesTab-D3H4cqJJ.js} +2 -2
  90. package/public/assets/{SplitFilePanel-C4FztlTR.js → SplitFilePanel-C_Bcle0r.js} +1 -1
  91. package/public/assets/StatusTab-D1-tfkgN.js +1 -0
  92. package/public/assets/{align-justify-GNs_d9nT.js → align-justify-B5HUL_LR.js} +1 -1
  93. package/public/assets/{bundle-full-B0vc8NGv.js → bundle-full-CEFzES5w.js} +1 -1
  94. package/public/assets/{diff-viewer-BmSzmlPC.js → diff-viewer-BBC2_yI1.js} +1 -1
  95. package/public/assets/{git-diff-vendor-CSgooKT_.js → git-diff-vendor-CYS3ApzA.js} +1 -1
  96. package/public/assets/{index-ChDVvMF4.js → index-B81f0aWL.js} +1 -1
  97. package/public/assets/index-BHlYVddm.js +1 -0
  98. package/public/assets/index-Best16ZB.js +2 -0
  99. package/public/assets/index-Boq37ErX.js +1 -0
  100. package/public/assets/index-By9pgzQk.css +1 -0
  101. package/public/assets/index-C0caoeJg.js +1 -0
  102. package/public/assets/index-Dqg2UVvS.js +1 -0
  103. package/public/assets/index-it6EGJV6.js +1 -0
  104. package/public/assets/{index-Bv867yIC.js → index-lORR8OnW.js} +1 -1
  105. package/public/assets/index-ppe6yWaU.js +1 -0
  106. package/public/assets/index-wEqeBwqT.js +1 -0
  107. package/public/assets/index-yEcajWX_.js +1 -0
  108. package/public/assets/{loading-DRzViX8M.js → loading-CbUWFqQ_.js} +1 -1
  109. package/public/assets/main-DfSREDgt.js +69 -0
  110. package/public/assets/{markdown-BlxzERp2.js → markdown-CEtfpKK-.js} +60 -47
  111. package/public/assets/monaco-viewer-NKl8kwH2.js +26 -0
  112. package/public/assets/terminal-square-q-by1uT7.js +1 -0
  113. package/public/assets/tool-call-CZL2uqIM.js +59 -0
  114. package/public/assets/unified-picker-CvJXD-j8.js +1 -0
  115. package/public/assets/{wrap-text-CMFBVbBi.js → wrap-text-Bo7xr74P.js} +1 -1
  116. package/public/index.html +5 -5
  117. package/public/loading.html +5 -5
  118. package/public/sw.js +1 -1
  119. package/public/ui-version.json +1 -1
  120. package/public/assets/FilesTab-CFF9uJuc.js +0 -2
  121. package/public/assets/StatusTab-CcoPFya8.js +0 -1
  122. package/public/assets/index--bYE3fA1.js +0 -1
  123. package/public/assets/index-B-9c-wPM.css +0 -1
  124. package/public/assets/index-BDJqHo1E.js +0 -1
  125. package/public/assets/index-BEXDNmDA.js +0 -1
  126. package/public/assets/index-BWX6Cyx3.js +0 -2
  127. package/public/assets/index-CUB1cngT.js +0 -1
  128. package/public/assets/index-CyGPk9Qx.js +0 -1
  129. package/public/assets/index-D9T8sYiH.js +0 -1
  130. package/public/assets/index-DQ8RfkwK.js +0 -1
  131. package/public/assets/index-udaOwtFG.js +0 -1
  132. package/public/assets/main-DUP17Bqi.js +0 -68
  133. package/public/assets/monaco-viewer-BbohfXZk.js +0 -26
  134. package/public/assets/tool-call-B0Ri40qI.js +0 -59
  135. package/public/assets/unified-picker-CGg8mlSo.js +0 -1
@@ -0,0 +1 @@
1
+ import{m as ce,P as Ye,O as Qe,t as $,i as g,a as De,g as Ie,d as B,j as Ze,u as Je,f as et}from"./monaco-viewer-NKl8kwH2.js";import{n as i,m as M,q as de,s as j,d as F,b as V,o as H,c as k,k as ue,S as K,l as ge,t as tt,w as _e,a as pe,F as ye}from"./git-diff-vendor-CYS3ApzA.js";import{I as Ce,Q as Oe,T as W,U as Me,W as Ee,X as xe,Y as nt,Z as me,_ as le,$ as fe,a0 as Ue,a1 as te,a2 as ne,a3 as ot,a4 as we,a5 as st,a6 as rt,a7 as z,a8 as Se,a9 as it,aa as at,ab as lt,ac as ct,ad as q,ae as dt,af as ut,ag as gt,ah as pt,ai as ft,aj as Z,ak as ht,al as mt,am as vt,an as bt,ao as yt,ap as xt,aq as ve,ar as Ct,K as wt,as as St,at as kt,au as $t,av as Pt,aw as Tt,ax as It}from"./main-DfSREDgt.js";import{u as Ae}from"./index-Best16ZB.js";import{T as _t}from"./terminal-square-q-by1uT7.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const Dt=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]],Ot=e=>i(Ce,M(e,{name:"BellRing",iconNode:Dt})),Mt=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Et=e=>i(Ce,M(e,{name:"GripVertical",iconNode:Mt})),Ut=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],At=e=>i(Ce,M(e,{name:"XOctagon",iconNode:Ut}));var Rt={};Se(Rt,{Arrow:()=>Oe,Content:()=>Fe,Portal:()=>Le,Root:()=>Ke,Tooltip:()=>ee,Trigger:()=>Be,useTooltipContext:()=>he});var Re=ue();function he(){const e=ge(Re);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Fe(e){const n=he(),c=W({id:n.generateId("content")},e),[l,t]=j(c,["ref","style"]);return V(()=>H(n.registerContentId(t.id))),i(K,{get when(){return n.contentPresent()},get children(){return i(Ue.Positioner,{get children(){return i(ot,M({ref(o){var s=te(d=>{n.setContentRef(d)},l.ref);typeof s=="function"&&s(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return we({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>n.hideTooltip(!0)},()=>n.dataset(),t))}})}})}function Le(e){const n=he();return i(K,{get when(){return n.contentPresent()},get children(){return i(Ye,e)}})}function Ft(e,n,c){const l=e.split("-")[0],t=n.getBoundingClientRect(),o=c.getBoundingClientRect(),s=[],d=t.left+t.width/2,x=t.top+t.height/2;switch(l){case"top":s.push([t.left,x]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([t.right,x]);break;case"right":s.push([d,t.top]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([d,t.bottom]);break;case"bottom":s.push([t.left,x]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([o.right,o.top]),s.push([t.right,x]);break;case"left":s.push([d,t.top]),s.push([o.right,o.top]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([d,t.bottom]);break}return s}var X={},Lt=0,G=!1,N,J,Y;function Ke(e){const n=`tooltip-${de()}`,c=`${++Lt}`,l=W({id:n,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,o]=j(l,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[d,x]=F(),[m,u]=F(),[a,p]=F(),[r,v]=F(o.placement),f=Me({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:y=>{var U;return(U=t.onOpenChange)==null?void 0:U.call(t,y)}}),{present:C}=Ee({show:()=>t.forceMount||f.isOpen(),element:()=>a()??null}),h=()=>{X[c]=T},S=()=>{for(const y in X)y!==c&&(X[y](!0),delete X[y])},T=(y=!1)=>{y||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,f.close()):s||(s=window.setTimeout(()=>{s=void 0,f.close()},t.closeDelay)),window.clearTimeout(N),N=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(Y=window.setTimeout(()=>{window.clearTimeout(Y),Y=void 0},t.skipDelayDuration)),G&&(window.clearTimeout(J),J=window.setTimeout(()=>{delete X[c],J=void 0,G=!1},t.closeDelay))},E=()=>{clearTimeout(s),s=void 0,S(),h(),G=!0,f.open(),window.clearTimeout(N),N=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(Y),Y=void 0},O=()=>{S(),h(),!f.isOpen()&&!N&&!G?N=window.setTimeout(()=>{N=void 0,G=!0,E()},t.openDelay):f.isOpen()||E()},A=(y=!1)=>{!y&&t.openDelay&&t.openDelay>0&&!s&&!Y?O():E()},b=()=>{window.clearTimeout(N),N=void 0,G=!1},R=()=>{window.clearTimeout(s),s=void 0},I=y=>me(m(),y)||me(a(),y),_=y=>{const U=m(),L=a();if(!(!U||!L))return Ft(y,U,L)},w=y=>{const U=y.target;if(I(U)){R();return}if(!t.ignoreSafeArea){const L=_(r());if(L&&st(rt(y),L)){R();return}}s||T()};V(()=>{if(!f.isOpen())return;const y=xe();y.addEventListener("pointermove",w,!0),H(()=>{y.removeEventListener("pointermove",w,!0)})}),V(()=>{const y=m();if(!y||!f.isOpen())return;const U=se=>{const re=se.target;me(re,y)&&T(!0)},L=nt();L.addEventListener("scroll",U,{capture:!0}),H(()=>{L.removeEventListener("scroll",U,{capture:!0})})}),H(()=>{clearTimeout(s),X[c]&&delete X[c]});const D={dataset:k(()=>({"data-expanded":f.isOpen()?"":void 0,"data-closed":f.isOpen()?void 0:""})),isOpen:f.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:d,contentPresent:C,openTooltip:A,hideTooltip:T,cancelOpening:b,generateId:fe(()=>l.id),registerContentId:le(x),isTargetOnTooltip:I,setTriggerRef:u,setContentRef:p};return i(Re.Provider,{value:D,get children(){return i(Ue,M({anchorRef:m,contentRef:a,onCurrentPlacementChange:v},o))}})}function Be(e){let n;const c=he(),[l,t]=j(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,s=!1,d=!1;const x=()=>{o=!1},m=()=>{!c.isOpen()&&(s||d)&&c.openTooltip(d)},u=h=>{c.isOpen()&&!s&&!d&&c.hideTooltip(h)},a=h=>{z(h,l.onPointerEnter),!(h.pointerType==="touch"||c.triggerOnFocusOnly()||c.isDisabled()||h.defaultPrevented)&&(s=!0,m())},p=h=>{z(h,l.onPointerLeave),h.pointerType!=="touch"&&(s=!1,d=!1,c.isOpen()?u():c.cancelOpening())},r=h=>{z(h,l.onPointerDown),o=!0,xe(n).addEventListener("pointerup",x,{once:!0})},v=h=>{z(h,l.onClick),s=!1,d=!1,u(!0)},f=h=>{z(h,l.onFocus),!(c.isDisabled()||h.defaultPrevented||o)&&(d=!0,m())},C=h=>{z(h,l.onBlur);const S=h.relatedTarget;c.isTargetOnTooltip(S)||(s=!1,d=!1,u(!0))};return H(()=>{xe(n).removeEventListener("pointerup",x)}),i(ne,M({as:"button",ref(h){var S=te(T=>{c.setTriggerRef(T),n=T},l.ref);typeof S=="function"&&S(h)},get"aria-describedby"(){return ce(()=>!!c.isOpen())()?c.contentId():void 0},onPointerEnter:a,onPointerLeave:p,onPointerDown:r,onClick:v,onFocus:f,onBlur:C},()=>c.dataset(),t))}var ee=Object.assign(Ke,{Arrow:Oe,Content:Fe,Portal:Le,Trigger:Be}),Kt={};Se(Kt,{Collapsible:()=>Bt,Content:()=>ke,Root:()=>$e,Trigger:()=>Pe,useCollapsibleContext:()=>oe});var He=ue();function oe(){const e=ge(He);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function ke(e){const[n,c]=F(),l=oe(),t=W({id:l.generateId("content")},e),[o,s]=j(t,["ref","id","style"]),{present:d}=Ee({show:l.shouldMount,element:()=>n()??null}),[x,m]=F(0),[u,a]=F(0);let r=l.isOpen()||d();return tt(()=>{const v=requestAnimationFrame(()=>{r=!1});H(()=>{cancelAnimationFrame(v)})}),V(_e(d,()=>{if(!n())return;n().style.transitionDuration="0s",n().style.animationName="none";const v=n().getBoundingClientRect();m(v.height),a(v.width),r||(n().style.transitionDuration="",n().style.animationName="")})),V(_e(l.isOpen,v=>{!v&&n()&&(n().style.transitionDuration="",n().style.animationName="")},{defer:!0})),V(()=>H(l.registerContentId(o.id))),i(K,{get when(){return d()},get children(){return i(ne,M({as:"div",ref(v){var f=te(c,o.ref);typeof f=="function"&&f(v)},get id(){return o.id},get style(){return we({"--kb-collapsible-content-height":x()?`${x()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>l.dataset(),s))}})}function $e(e){const n=`collapsible-${de()}`,c=W({id:n},e),[l,t]=j(c,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=F(),d=Me({open:()=>l.open,defaultOpen:()=>l.defaultOpen,onOpenChange:u=>{var a;return(a=l.onOpenChange)==null?void 0:a.call(l,u)}}),x=k(()=>({"data-expanded":d.isOpen()?"":void 0,"data-closed":d.isOpen()?void 0:"","data-disabled":l.disabled?"":void 0})),m={dataset:x,isOpen:d.isOpen,disabled:()=>l.disabled??!1,shouldMount:()=>l.forceMount||d.isOpen(),contentId:o,toggle:d.toggle,generateId:fe(()=>t.id),registerContentId:le(s)};return i(He.Provider,{value:m,get children(){return i(ne,M({as:"div"},x,t))}})}function Pe(e){const n=oe(),[c,l]=j(e,["onClick"]);return i(it,M({get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return ce(()=>!!n.isOpen())()?n.contentId():void 0},get disabled(){return n.disabled()},onClick:o=>{z(o,c.onClick),n.toggle()}},()=>n.dataset(),l))}var Bt=Object.assign($e,{Content:ke,Trigger:Pe}),Q={};Se(Q,{Accordion:()=>Ht,Content:()=>ze,Header:()=>qe,Item:()=>We,Root:()=>Xe,Trigger:()=>Ge,useAccordionContext:()=>Te});var je=ue();function Ne(){const e=ge(je);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function ze(e){const n=Ne(),c=n.generateId("content"),l=W({id:c},e),[t,o]=j(l,["id","style"]);return V(()=>H(n.registerContentId(t.id))),i(ke,M({role:"region",get"aria-labelledby"(){return n.triggerId()},get style(){return we({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},o))}function qe(e){const n=oe();return i(ne,M({as:"h3"},()=>n.dataset(),e))}var Ve=ue();function Te(){const e=ge(Ve);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function We(e){const n=Te(),c=`${n.generateId("item")}-${de()}`,l=W({id:c},e),[t,o]=j(l,["value","disabled"]),[s,d]=F(),[x,m]=F(),u=()=>n.listState().selectionManager(),a=()=>u().isSelected(t.value),p={value:()=>t.value,triggerId:s,contentId:x,generateId:fe(()=>o.id),registerTriggerId:le(d),registerContentId:le(m)};return i(je.Provider,{value:p,get children(){return i($e,M({get open(){return a()},get disabled(){return t.disabled}},o))}})}function Xe(e){let n;const c=`accordion-${de()}`,l=W({id:c,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,o]=j(l,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,d]=F([]),{DomCollectionProvider:x}=at({items:s,onItemsChange:d}),m=lt({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:p=>{var r;return(r=t.onChange)==null?void 0:r.call(t,Array.from(p))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});m.selectionManager().setFocusedKey("item-1");const u=ct({selectionManager:()=>m.selectionManager(),collection:()=>m.collection(),disallowEmptySelection:()=>m.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>n),a={listState:()=>m,generateId:fe(()=>t.id)};return i(x,{get children(){return i(Ve.Provider,{value:a,get children(){return i(ne,M({as:"div",get id(){return t.id},ref(p){var r=te(v=>n=v,t.ref);typeof r=="function"&&r(p)},get onKeyDown(){return q([t.onKeyDown,u.onKeyDown])},get onMouseDown(){return q([t.onMouseDown,u.onMouseDown])},get onFocusIn(){return q([t.onFocusIn])},get onFocusOut(){return q([t.onFocusOut,u.onFocusOut])}},o))}})}})}function Ge(e){let n;const c=Te(),l=Ne(),t=oe(),o=l.generateId("trigger"),s=W({id:o},e),[d,x]=j(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);dt({getItem:()=>({ref:()=>n,type:"item",key:l.value(),textValue:"",disabled:t.disabled()})});const m=ut({key:()=>l.value(),selectionManager:()=>c.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>n),u=a=>{["Enter"," "].includes(a.key)&&a.preventDefault(),z(a,d.onKeyDown),z(a,m.onKeyDown)};return V(()=>H(l.registerTriggerId(x.id))),i(Pe,M({ref(a){var p=te(r=>n=r,d.ref);typeof p=="function"&&p(a)},get"data-key"(){return m.dataKey()},get onPointerDown(){return q([d.onPointerDown,m.onPointerDown])},get onPointerUp(){return q([d.onPointerUp,m.onPointerUp])},get onClick(){return q([d.onClick,m.onClick])},onKeyDown:u,get onMouseDown(){return q([d.onMouseDown,m.onMouseDown])},get onFocus(){return q([d.onFocus,m.onFocus])}},x))}var Ht=Object.assign(Xe,{Content:ze,Header:qe,Item:We,Trigger:Ge}),ie=$('<div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">'),jt=$('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const Nt=e=>{const{t:n}=Ae(),{preferences:c}=Qe(),l=k(()=>c().showUsageMetrics??!0),t=k(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),o=k(()=>pt(e.instanceId,e.sessionId)),s=k(()=>o().length>0),d=k(()=>s()?ft(e.instanceId,e.sessionId)??{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}:{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}),x=k(()=>`$${d().cost.toFixed(2)}`),m=k(()=>d().inputTokens),u=k(()=>d().outputTokens),a=k(()=>d().reasoningTokens),p=k(()=>t().inputTokens??0),r=k(()=>t().outputTokens??0),v=k(()=>{const C=t().isSubscriptionModel?0:t().cost;return C>0?C:0}),f=k(()=>t().isSubscriptionModel?n("contextUsagePanel.included"):`$${v().toFixed(2)}`);return(()=>{var C=jt(),h=C.firstChild,S=h.firstChild,T=S.firstChild,E=T.nextSibling,O=S.nextSibling,A=O.firstChild,b=A.nextSibling,R=O.nextSibling,I=R.firstChild,_=I.nextSibling;return g(T,()=>n("contextUsagePanel.labels.input")),g(E,()=>Z(p())),g(A,()=>n("contextUsagePanel.labels.output")),g(b,()=>Z(r())),g(I,()=>n("contextUsagePanel.labels.cost")),g(_,f),g(h,i(K,{get when(){return ce(()=>!!s())()&&l()},get children(){return[(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalInput")),g(D,()=>Z(m())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalOutput")),g(D,()=>Z(u())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalCost")),g(D,x),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalReasoning")),g(D,()=>Z(a())),w})()]}}),null),pe(()=>De(C,`session-context-panel px-4 py-2 ${e.class??""}`)),C})()};var zt=$('<div><div class="mt-2 truncate text-right text-sm font-semibold text-secondary">'),be=$('<div class="text-xs text-tertiary">'),qt=$("<div class=space-y-2>"),Vt=$('<div class="h-2 overflow-hidden border border-base"style=background-color:var(--surface-base)><div class="h-full transition-[width] duration-300"role=progressbar aria-valuemin=0 aria-valuemax=100>'),Wt=$('<div><div class="mb-1 flex items-baseline justify-between gap-2 text-[11px] text-primary"><span class=font-medium></span><div class="flex min-w-0 items-baseline gap-1.5 text-right"><span class="shrink-0 font-medium">'),Xt=$("<span class=text-tertiary aria-hidden=true>·"),Gt=$('<span class="truncate text-[10px] text-tertiary">');const Yt=6e4,Qt=e=>{const{t:n}=Ae(),c=k(()=>{const r=e.providerId.trim();return r?{providerId:r,modelId:e.modelId.trim()}:null}),[l,t]=F();let o=0;const s=async(r,v,f)=>{const C=++o;f&&t(void 0);try{const h=await Ze.fetchProviderUsage(r,v);C===o&&t(h)}catch{C===o&&l()===void 0&&t(null)}};V(()=>{const r=c();if(!r){o+=1,t(void 0);return}s(r.providerId,r.modelId,!0)});const d=setInterval(()=>{const r=c();r&&s(r.providerId,r.modelId,!1)},Yt);H(()=>{o+=1,clearInterval(d)});const x=k(()=>{var r;return Object.entries(((r=l())==null?void 0:r.windows)??{})}),m=r=>{const v={"5h":"fiveHours","7d":"sevenDays","7d-sonnet":"sevenDaysSonnet","7d-opus":"sevenDaysOpus",weekly:"weekly",daily:"daily",monthly:"monthly",credits:"credits",billing_cycle:"billingCycle",session:"session",premium:"premium",chat:"chat",completions:"completions","mcp-tools":"mcpTools"}[r];return v?n(`providerUsage.windows.${v}`):r},u=r=>r.valueLabel?r.valueLabel:r.usedPercent===null?n("providerUsage.unavailableValue"):n("providerUsage.usedPercent",{percent:Math.round(r.usedPercent)}),a=r=>{if(!r)return null;const v=new Date(r);return Number.isFinite(v.getTime())?n("providerUsage.resets",{time:v.toLocaleString([],{dateStyle:"short",timeStyle:"short"})}):null},p=r=>r!==null&&r>=80?"var(--status-error)":r!==null&&r>=50?"var(--status-warning)":"var(--status-success)";return(()=>{var r=zt(),v=r.firstChild;return g(r,i(K,{get when(){return l()!==void 0},get fallback(){return(()=>{var f=be();return g(f,()=>n("providerUsage.loading")),f})()},get children(){return i(K,{get when(){return l()},get fallback(){return(()=>{var f=be();return g(f,()=>n("providerUsage.unavailable")),f})()},children:f=>i(K,{get when(){return ce(()=>!!(f().supported&&f().configured&&f().ok))()&&x().length>0},get fallback(){return(()=>{var C=be();return g(C,()=>n(f().supported?f().configured?"providerUsage.unavailable":"providerUsage.notConfigured":"providerUsage.unsupported")),C})()},get children(){var C=qt();return g(C,i(ye,{get each(){return x()},children:([h,S])=>(()=>{var T=Wt(),E=T.firstChild,O=E.firstChild,A=O.nextSibling,b=A.firstChild;return g(O,()=>m(h)),g(b,()=>u(S)),g(A,i(K,{get when(){return a(S.resetAt)},children:R=>[Xt(),(()=>{var I=Gt();return g(I,R),I})()]}),null),g(T,i(K,{get when(){return S.usedPercent!==null},get children(){var R=Vt(),I=R.firstChild;return pe(_=>{var w=`${Math.max(0,Math.min(100,S.usedPercent??0))}%`,P=p(S.usedPercent),D=n("providerUsage.progressLabel",{window:m(h)}),y=Math.round(S.usedPercent??0);return w!==_.e&&Ie(I,"width",_.e=w),P!==_.t&&Ie(I,"background-color",_.t=P),D!==_.a&&B(I,"aria-label",_.a=D),y!==_.o&&B(I,"aria-valuenow",_.o=y),_},{e:void 0,t:void 0,a:void 0,o:void 0}),R}}),null),T})()})),C}})})}}),v),g(v,()=>{var f;return((f=l())==null?void 0:f.providerName)??e.providerId}),r})()};var Zt=$("<span class=section-left><span class=section-label>"),Jt=$("<div>"),ae=$('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),en=$('<div class="flex items-center justify-between gap-2 border border-base bg-surface-secondary px-3 py-2"><p class="min-w-0 text-xs leading-5 text-secondary"></p><div class="-mr-2 shrink-0">'),tn=$('<div class="flex flex-col gap-2">'),nn=$("<span>"),on=$('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),sn=$('<div class="text-xs text-tertiary">'),rn=$('<div class="border border-base bg-surface-secondary px-3 py-2">'),an=$("<div class=status-tab-container>");const ln=e=>{const n=Ct(e.section.id);return(()=>{var c=Jt();return Je(n,c),g(c,i(Q.Item,{get value(){return e.section.id},class:"right-panel-accordion-item",get children(){return[i(Q.Header,{class:"right-panel-accordion-header-row",get children(){return[i(Q.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var l=Zt(),t=l.firstChild;return g(l,i(Et,{class:"h-3.5 w-3.5 text-tertiary","aria-hidden":"true"}),t),g(t,()=>e.t(e.section.labelKey)),l})(),i(wt,{get class(){return`right-panel-accordion-chevron ${e.expanded?"right-panel-accordion-chevron-expanded":""}`}})]}}),i(ee,{openDelay:200,gutter:4,placement:"top",get children(){return[i(ee.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(e.section.tooltipKey)},get children(){return i(St,{class:"section-info-icon"})}}),i(ee.Portal,{get children(){return i(ee.Content,{class:"section-info-tooltip",get children(){return e.t(e.section.tooltipKey)}})}})]}})]}}),i(Q.Content,{class:"right-panel-accordion-content",get children(){return e.section.render()}})]}})),pe(()=>De(c,`right-panel-section-draggable ${n.isActiveDraggable?"right-panel-section-draggable-active":""}`)),c})()},mn=e=>{const n=u=>e.expandedItems().includes(u),c=()=>{const u=e.activeSession();return u?(()=>{var a=en(),p=a.firstChild,r=p.nextSibling;return g(p,()=>e.t("instanceShell.yoloMode.description")),g(r,i(It,{get checked(){return Tt(e.instanceId,u.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>Pt(e.instanceId,u.id)})),a})():(()=>{var a=ae(),p=a.firstChild;return g(p,()=>e.t("instanceShell.yoloMode.noSessionSelected")),a})()},l=()=>{const u=e.activeSessionId();if(!u||u==="info")return(()=>{var p=ae(),r=p.firstChild;return g(r,()=>e.t("instanceShell.plan.noSessionSelected")),p})();const a=e.latestTodoState();return a?i($t,{state:a,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var p=ae(),r=p.firstChild;return g(r,()=>e.t("instanceShell.plan.empty")),p})()},t=()=>{const u=e.backgroundProcessList();return u.length===0?(()=>{var a=ae(),p=a.firstChild;return g(p,()=>e.t("instanceShell.backgroundProcesses.empty")),a})():(()=>{var a=tn();return g(a,i(ye,{each:u,children:p=>(()=>{var r=on(),v=r.firstChild,f=v.firstChild,C=f.nextSibling,h=C.firstChild,S=h.nextSibling,T=v.nextSibling,E=T.firstChild,O=E.nextSibling,A=O.nextSibling;return g(f,()=>p.title),g(h,i(Ot,{class:"h-3.5 w-3.5"})),g(S,()=>e.t("instanceShell.backgroundProcesses.status",{status:p.status})),g(C,i(K,{get when(){return typeof p.outputSizeBytes=="number"},get children(){var b=nn();return g(b,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((p.outputSizeBytes??0)/1024)})),b}}),null),E.$$click=()=>e.onOpenBackgroundOutput(p),g(E,i(_t,{class:"h-4 w-4"})),O.$$click=()=>e.onStopBackgroundProcess(p.id),g(O,i(At,{class:"h-4 w-4"})),A.$$click=()=>e.onTerminateBackgroundProcess(p.id),g(A,i(kt,{class:"h-4 w-4"})),pe(b=>{var R=!!p.notifyEnabled,I=!p.notifyEnabled,_=e.t(p.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),w=e.t(p.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),P=e.t("instanceShell.backgroundProcesses.actions.output"),D=e.t("instanceShell.backgroundProcesses.actions.output"),y=p.status!=="running",U=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),se=e.t("instanceShell.backgroundProcesses.actions.terminate"),re=e.t("instanceShell.backgroundProcesses.actions.terminate");return R!==b.e&&h.classList.toggle("text-success",b.e=R),I!==b.t&&h.classList.toggle("text-tertiary",b.t=I),_!==b.a&&B(h,"aria-label",b.a=_),w!==b.o&&B(h,"title",b.o=w),P!==b.i&&B(E,"aria-label",b.i=P),D!==b.n&&B(E,"title",b.n=D),y!==b.s&&(O.disabled=b.s=y),U!==b.h&&B(O,"aria-label",b.h=U),L!==b.r&&B(O,"title",b.r=L),se!==b.d&&B(A,"aria-label",b.d=se),re!==b.l&&B(A,"title",b.l=re),b},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),r})()})),a})()},o=()=>{const u=e.activeSession();return u?(()=>{var a=rn();return g(a,i(Qt,{get providerId(){return u.model.providerId},get modelId(){return u.model.modelId}})),a})():(()=>{var a=sn();return g(a,()=>e.t("providerUsage.noSession")),a})()},s=k(()=>[...ht({renderYoloModeSection:c,renderProviderUsage:o,renderPlanSectionContent:l,renderBackgroundProcesses:t,renderMcpStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"}),renderLspStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"}),renderPluginStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}).statusSections??[],...e.extraSections??[]]),d=k(()=>mt(s(),e.customization().statusSectionOrder,e.customization().hiddenStatusSectionIds)),x=(u,a)=>{if(!u||u===a)return;const p=d().map(h=>h.id),r=p.indexOf(u),v=p.indexOf(a);if(r===-1||v===-1)return;const f=[...p],[C]=f.splice(r,1);f.splice(v,0,C),e.onCustomizationChange(h=>({...h,statusSectionOrder:f}))},m=({draggable:u,droppable:a})=>{a&&x(String(u.id),String(a.id))};return(()=>{var u=an();return g(u,i(K,{get when(){return e.activeSession()},children:a=>i(Nt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),g(u,i(Q.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return i(vt,{collisionDetector:bt,onDragEnd:m,get children(){return i(yt,{get children(){return i(xt,{get ids(){return d().map(a=>a.id)},get children(){return i(ye,{get each(){return d()},children:a=>i(ln,{section:a,get expanded(){return n(a.id)},get t(){return e.t}})})}})}})}})}}),null),u})()};et(["click"]);export{mn as default};
@@ -1 +1 @@
1
- import{I as n}from"./main-DUP17Bqi.js";import{n as o,m as y}from"./git-diff-vendor-CSgooKT_.js";const i=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],t=e=>o(n,y(e,{name:"AlignJustify",iconNode:i}));export{t as A};
1
+ import{I as n}from"./main-DfSREDgt.js";import{n as o,m as y}from"./git-diff-vendor-CYS3ApzA.js";const i=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],t=e=>o(n,y(e,{name:"AlignJustify",iconNode:i}));export{t as A};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BUKiar2Z.js","assets/tex-Cppo0RY3.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-WgofotgN.js","assets/csharp-CX12Zw3r.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-CCoi5OLL.js","assets/vue-html-DAAvJJDi.js","assets/vue-vine-_Ih-lPRR.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./monaco-viewer-BbohfXZk.js";import"./git-diff-vendor-CSgooKT_.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",t[o+1]="￿",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="￿",t[o+1]="G",n[o+1]="￿",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
2
+ var Ln=Object.defineProperty;var Pn=(r,e,t)=>e in r?Ln(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var f=(r,e,t)=>Pn(r,typeof e!="symbol"?e+"":e,t);import{_ as l}from"./monaco-viewer-NKl8kwH2.js";import"./git-diff-vendor-CYS3ApzA.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";let k=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function kn(r){return nt(r)}function nt(r){return Array.isArray(r)?In(r):r instanceof RegExp?r:typeof r=="object"?wn(r):r}function In(r){let e=[];for(let t=0,n=r.length;t<n;t++)e[t]=nt(r[t]);return e}function wn(r){let e={};for(let t in r)e[t]=nt(r[t]);return e}function Vt(r,...e){return e.forEach(t=>{for(let n in t)r[n]=t[n]}),r}function Mt(r){const e=~r.lastIndexOf("/")||~r.lastIndexOf("\\");return e===0?r:~e===r.length-1?Mt(r.substring(0,r.length-1)):r.substr(~e+1)}var Me=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(r){return r===null?!1:(Me.lastIndex=0,Me.test(r))}static replaceCaptures(r,e,t){return r.replace(Me,(n,i,o,s)=>{let c=t[parseInt(i||o,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function Bt(r,e){return r<e?-1:r>e?1:0}function Gt(r,e){if(r===null&&e===null)return 0;if(!r)return-1;if(!e)return 1;let t=r.length,n=e.length;if(t===n){for(let i=0;i<t;i++){let o=Bt(r[i],e[i]);if(o!==0)return o}return 0}return t-n}function pt(r){return!!(/^#[0-9a-f]{6}$/i.test(r)||/^#[0-9a-f]{8}$/i.test(r)||/^#[0-9a-f]{3}$/i.test(r)||/^#[0-9a-f]{4}$/i.test(r))}function jt(r){return r.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(r){f(this,"cache",new Map);this.fn=r}get(r){if(this.cache.has(r))return this.cache.get(r);const e=this.fn(r);return this.cache.set(r,e),e}},be=class{constructor(r,e,t){f(this,"_cachedMatchRoot",new $t(r=>this._root.match(r)));this._colorMap=r,this._defaults=e,this._root=t}static createFromRawTheme(r,e){return this.createFromParsedTheme(Dn(r),e)}static createFromParsedTheme(r,e){return xn(r,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(r){if(r===null)return this._defaults;const e=r.scopeName,n=this._cachedMatchRoot.get(e).find(i=>On(r.parent,i.parentScopes));return n?new Ut(n.fontStyle,n.foreground,n.background):null}},Be=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const n of t)e=new ye(e,n);return e}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new ye(t,e[n]);return t}push(e){return new ye(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function On(r,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let n=e[t],i=!1;if(n===">"){if(t===e.length-1)return!1;n=e[++t],i=!0}for(;r&&!Cn(r.scopeName,n);){if(i)return!1;r=r.parent}if(!r)return!1;r=r.parent}return!0}function Cn(r,e){return e===r||r.startsWith(e)&&r[e.length]==="."}var Ut=class{constructor(r,e,t){this.fontStyle=r,this.foregroundId=e,this.backgroundId=t}};function Dn(r){if(!r)return[];if(!r.settings||!Array.isArray(r.settings))return[];let e=r.settings,t=[],n=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];if(!s.settings)continue;let c;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),c=d.split(",")}else Array.isArray(s.scope)?c=s.scope:c=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let d=s.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let u=null;typeof s.settings.foreground=="string"&&pt(s.settings.foreground)&&(u=s.settings.foreground);let m=null;typeof s.settings.background=="string"&&pt(s.settings.background)&&(m=s.settings.background);for(let d=0,h=c.length;d<h;d++){let _=c[d].trim().split(" "),b=_[_.length-1],v=null;_.length>1&&(v=_.slice(0,_.length-1),v.reverse()),t[n++]=new Nn(b,v,i,a,u,m)}}return t}var Nn=class{constructor(r,e,t,n,i,o){this.scope=r,this.parentScopes=e,this.index=t,this.fontStyle=n,this.foreground=i,this.background=o}},N=(r=>(r[r.NotSet=-1]="NotSet",r[r.None=0]="None",r[r.Italic=1]="Italic",r[r.Bold=2]="Bold",r[r.Underline=4]="Underline",r[r.Strikethrough=8]="Strikethrough",r))(N||{});function xn(r,e){r.sort((a,u)=>{let m=Bt(a.scope,u.scope);return m!==0||(m=Gt(a.parentScopes,u.parentScopes),m!==0)?m:a.index-u.index});let t=0,n="#000000",i="#ffffff";for(;r.length>=1&&r[0].scope==="";){let a=r.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let o=new Vn(e),s=new Ut(t,o.getId(n),o.getId(i)),c=new Bn(new Fe(0,null,-1,0,0),[]);for(let a=0,u=r.length;a<u;a++){let m=r[a];c.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new be(o,s,c)}var Vn=class{constructor(r){f(this,"_isFrozen");f(this,"_lastColorId");f(this,"_id2color");f(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(r)){this._isFrozen=!0;for(let e=0,t=r.length;e<t;e++)this._color2id[r[e]]=e,this._id2color[e]=r[e]}else this._isFrozen=!1}getId(r){if(r===null)return 0;r=r.toUpperCase();let e=this._color2id[r];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${r}`);return e=++this._lastColorId,this._color2id[r]=e,this._id2color[e]=r,e}getColorMap(){return this._id2color.slice(0)}},Mn=Object.freeze([]),Fe=class Ht{constructor(e,t,n,i,o){f(this,"scopeDepth");f(this,"parentScopes");f(this,"fontStyle");f(this,"foreground");f(this,"background");this.scopeDepth=e,this.parentScopes=t||Mn,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new Ht(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Bn=class ze{constructor(e,t=[],n={}){f(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,t.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,o;if(n===-1?(i=e,o=""):(i=e.substring(0,n),o=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(ze._cmpBySpecificity),t}insert(e,t,n,i,o,s){if(t===""){this._doInsertHere(e,n,i,o,s);return}let c=t.indexOf("."),a,u;c===-1?(a=t,u=""):(a=t.substring(0,c),u=t.substring(c+1));let m;this._children.hasOwnProperty(a)?m=this._children[a]:(m=new ze(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=m),m.insert(e+1,u,n,i,o,s)}_doInsertHere(e,t,n,i,o){if(t===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let s=0,c=this._rulesWithParentScopes.length;s<c;s++){let a=this._rulesWithParentScopes[s];if(Gt(a.parentScopes,t)===0){a.acceptOverwrite(e,n,i,o);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,t,n,i,o))}},Q=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),n=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:i,foreground:o,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,n,i,o,s,c){let a=B.getLanguageId(e),u=B.getTokenType(e),m=B.containsBalancedBrackets(e)?1:0,d=B.getFontStyle(e),h=B.getForeground(e),p=B.getBackground(e);return t!==0&&(a=t),n!==8&&(u=n),i!==null&&(m=i?1:0),o!==-1&&(d=o),s!==0&&(h=s),c!==0&&(p=c),(a<<0|u<<8|m<<10|d<<11|h<<15|p<<24)>>>0}};function Re(r,e){const t=[],n=Gn(r);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let u=s();if(t.push({matcher:u,priority:a}),i!==",")break;i=n.next()}return t;function o(){if(i==="-"){i=n.next();const a=o();return u=>!!a&&!a(u)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(ft(i)){const a=[];do a.push(i),i=n.next();while(ft(i));return u=>e(a,u)}return null}function s(){const a=[];let u=o();for(;u;)a.push(u),u=o();return m=>a.every(d=>d(m))}function c(){const a=[];let u=s();for(;u&&(a.push(u),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");u=s()}return m=>a.some(d=>d(m))}}function ft(r){return!!r&&!!r.match(/[\w\.:]+/)}function Gn(r){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(r);return{next:()=>{if(!t)return null;const n=t[0];return t=e.exec(r),n}}}function Wt(r){typeof r.dispose=="function"&&r.dispose()}var oe=class{constructor(r){this.scopeName=r}toKey(){return this.scopeName}},jn=class{constructor(r,e){this.scopeName=r,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},$n=class{constructor(){f(this,"_references",[]);f(this,"_seenReferenceKeys",new Set);f(this,"visitedRule",new Set)}get references(){return this._references}add(r){const e=r.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(r))}},Un=class{constructor(r,e){f(this,"seenFullScopeRequests",new Set);f(this,"seenPartialScopeRequests",new Set);f(this,"Q");this.repo=r,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oe(this.initialScopeName)]}processQueue(){const r=this.Q;this.Q=[];const e=new $n;for(const t of r)Hn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof oe){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Hn(r,e,t,n){const i=t.lookup(r.scopeName);if(!i){if(r.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);r instanceof oe?Ee({baseGrammar:o,selfGrammar:i},n):qe(r.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const s=t.injections(r.scopeName);if(s)for(const c of s)n.add(new oe(c))}function qe(r,e,t){if(e.repository&&e.repository[r]){const n=e.repository[r];Te([n],e,t)}}function Ee(r,e){r.selfGrammar.patterns&&Array.isArray(r.selfGrammar.patterns)&&Te(r.selfGrammar.patterns,{...r,repository:r.selfGrammar.repository},e),r.selfGrammar.injections&&Te(Object.values(r.selfGrammar.injections),{...r,repository:r.selfGrammar.repository},e)}function Te(r,e,t){for(const n of r){if(t.visitedRule.has(n))continue;t.visitedRule.add(n);const i=n.repository?Vt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&Te(n.patterns,{...e,repository:i},t);const o=n.include;if(!o)continue;const s=Ft(o);switch(s.kind){case 0:Ee({...e,selfGrammar:e.baseGrammar},t);break;case 1:Ee(e,t);break;case 2:qe(s.ruleName,{...e,repository:i},t);break;case 3:case 4:const c=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};s.kind===4?qe(s.ruleName,a,t):Ee(a,t)}else s.kind===4?t.add(new jn(s.scopeName,s.ruleName)):t.add(new oe(s.scopeName));break}}}var Wn=class{constructor(){f(this,"kind",0)}},Fn=class{constructor(){f(this,"kind",1)}},zn=class{constructor(r){f(this,"kind",2);this.ruleName=r}},qn=class{constructor(r){f(this,"kind",3);this.scopeName=r}},Kn=class{constructor(r,e){f(this,"kind",4);this.scopeName=r,this.ruleName=e}};function Ft(r){if(r==="$base")return new Wn;if(r==="$self")return new Fn;const e=r.indexOf("#");if(e===-1)return new qn(r);if(e===0)return new zn(r.substring(1));{const t=r.substring(0,e),n=r.substring(e+1);return new Kn(t,n)}}var Yn=/\\(\d+)/,_t=/\\(\d+)/g,Jn=-1,zt=-2;var de=class{constructor(r,e,t,n){f(this,"$location");f(this,"id");f(this,"_nameIsCapturing");f(this,"_name");f(this,"_contentNameIsCapturing");f(this,"_contentName");this.$location=r,this.id=e,this._name=t||null,this._nameIsCapturing=pe.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const r=this.$location?`${Mt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${r}`}getName(r,e){return!this._nameIsCapturing||this._name===null||r===null||e===null?this._name:pe.replaceCaptures(this._name,r,e)}getContentName(r,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,r,e)}},Xn=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Qn=class extends de{constructor(e,t,n,i,o){super(e,t,n,null);f(this,"_match");f(this,"captures");f(this,"_cachedCompiledPatterns");this._match=new se(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends de{constructor(e,t,n,i,o){super(e,t,n,i);f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ae,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ke=class extends de{constructor(e,t,n,i,o,s,c,a,u,m){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"_end");f(this,"endHasBackReferences");f(this,"endCaptures");f(this,"applyEndPatternLast");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this._end=new se(c||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=u||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ae=class extends de{constructor(e,t,n,i,o,s,c,a,u){super(e,t,n,i);f(this,"_begin");f(this,"beginCaptures");f(this,"whileCaptures");f(this,"_while");f(this,"whileHasBackReferences");f(this,"hasMissingPatterns");f(this,"patterns");f(this,"_cachedCompiledPatterns");f(this,"_cachedCompiledWhilePatterns");this._begin=new se(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new se(c,zt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ae;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ae,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},qt=class D{static createCaptureRule(e,t,n,i,o){return e.registerRule(s=>new Xn(t,s,n,i,o))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new Qn(e.$vscodeTextmateLocation,e.id,e.name,e.match,D._compileCaptures(e.captures,t,n));if(typeof e.begin>"u"){e.repository&&(n=Vt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new gt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,D._compilePatterns(o,t,n))}return e.while?new Ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,D._compileCaptures(e.whileCaptures||e.captures,t,n),D._compilePatterns(e.patterns,t,n)):new Ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,D._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,D._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,D._compilePatterns(e.patterns,t,n))}),e.id}static _compileCaptures(e,t,n){let i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);c>o&&(o=c)}for(let s=0;s<=o;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const c=parseInt(s,10);let a=0;e[s].patterns&&(a=D.getCompiledRuleId(e[s],t,n)),i[c]=D.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,n){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const c=e[o];let a=-1;if(c.include){const u=Ft(c.include);switch(u.kind){case 0:case 1:a=D.getCompiledRuleId(n[c.include],t,n);break;case 2:let m=n[u.ruleName];m&&(a=D.getCompiledRuleId(m,t,n));break;case 3:case 4:const d=u.scopeName,h=u.kind===4?u.ruleName:null,p=t.getExternalGrammar(d,n);if(p)if(h){let _=p.repository[h];_&&(a=D.getCompiledRuleId(_,t,p.repository))}else a=D.getCompiledRuleId(p.repository.$self,t,p.repository);break}}else a=D.getCompiledRuleId(c,t,n);if(a!==-1){const u=t.getRule(a);let m=!1;if((u instanceof gt||u instanceof Ke||u instanceof Ae)&&u.hasMissingPatterns&&u.patterns.length===0&&(m=!0),m)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},se=class Kt{constructor(e,t){f(this,"source");f(this,"ruleId");f(this,"hasAnchor");f(this,"hasBackReferences");f(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],s=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const u=e.charAt(c+1);u==="z"?(o.push(e.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(u==="A"||u==="G")&&(s=!0),c++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,n)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=Yn.test(this.source):this.hasBackReferences=!1}clone(){return new Kt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=t.map(i=>e.substring(i.start,i.end));return _t.lastIndex=0,this.source.replace(_t,(i,o)=>jt(n[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],n=[],i=[],o,s,c,a;for(o=0,s=this.source.length;o<s;o++)c=this.source.charAt(o),e[o]=c,t[o]=c,n[o]=c,i[o]=c,c==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",t[o+1]="￿",n[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="￿",t[o+1]="G",n[o+1]="￿",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,n[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ae=class{constructor(){f(this,"_items");f(this,"_hasAnchors");f(this,"_cached");f(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(r){this._items.push(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}unshift(r){this._items.unshift(r),this._hasAnchors=this._hasAnchors||r.hasAnchor}length(){return this._items.length}setSource(r,e){this._items[r].source!==e&&(this._disposeCaches(),this._items[r].setSource(e))}compile(r){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new yt(r,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(r,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(r,e,t)),this._anchorCache.A0_G0):this.compile(r)}_resolveAnchors(r,e,t){let n=this._items.map(i=>i.resolveAnchors(e,t));return new yt(r,n,this._items.map(i=>i.ruleId))}},yt=class{constructor(r,e,t){f(this,"scanner");this.regExps=e,this.rules=t,this.scanner=r.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const r=[];for(let e=0,t=this.rules.length;e<t;e++)r.push(" - "+this.rules[e]+": "+this.regExps[e]);return r.join(`
3
3
  `)}findNextMatchSync(r,e,t){const n=this.scanner.findNextMatchSync(r,e,t);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Ge=class{constructor(r,e){this.languageId=r,this.tokenType=e}},W,Zn=(W=class{constructor(e,t){f(this,"_defaultAttributes");f(this,"_embeddedLanguagesMatcher");f(this,"_getBasicScopeAttributes",new $t(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Ge(t,n)}));this._defaultAttributes=new Ge(e,8),this._embeddedLanguagesMatcher=new er(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?W._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(W.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},f(W,"_NULL_SCOPE_METADATA",new Ge(0,0)),f(W,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),W),er=class{constructor(r){f(this,"values");f(this,"scopesRegExp");if(r.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(r);const e=r.map(([t,n])=>jt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(r){if(!this.scopesRegExp)return;const e=r.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Et=class{constructor(r,e){this.stack=r,this.stoppedEarly=e}};function Yt(r,e,t,n,i,o,s,c){const a=e.content.length;let u=!1,m=-1;if(s){const p=tr(r,e,t,n,i,o);i=p.stack,n=p.linePos,t=p.isFirstLine,m=p.anchorPosition}const d=Date.now();for(;!u;){if(c!==0&&Date.now()-d>c)return new Et(i,!0);h()}return new Et(i,!1);function h(){const p=nr(r,e,t,n,i,m);if(!p){o.produce(i,a),u=!0;return}const _=p.captureIndices,b=p.matchedRuleId,v=_&&_.length>0?_[0].end>n:!1;if(b===Jn){const y=i.getRule(r);o.produce(i,_[0].start),i=i.withContentNameScopesList(i.nameScopesList),re(r,e,t,i,o,y.endCaptures,_),o.produce(i,_[0].end);const E=i;if(i=i.parent,m=E.getAnchorPos(),!v&&E.getEnterPos()===n){i=E,o.produce(i,a),u=!0;return}}else{const y=r.getRule(b);o.produce(i,_[0].start);const E=i,R=y.getName(e.content,_),A=i.contentNameScopesList.pushAttributed(R,r);if(i=i.push(b,n,m,_[0].end===a,null,A,A),y instanceof Ke){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.endHasBackReferences&&(i=i.withEndRule(L.getEndWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(y instanceof Ae){const L=y;re(r,e,t,i,o,L.beginCaptures,_),o.produce(i,_[0].end),m=_[0].end;const x=L.getContentName(e.content,_),O=A.pushAttributed(x,r);if(i=i.withContentNameScopesList(O),L.whileHasBackReferences&&(i=i.withEndRule(L.getWhileWithResolvedBackReferences(e.content,_))),!v&&E.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),u=!0;return}}else if(re(r,e,t,i,o,y.captures,_),o.produce(i,_[0].end),i=i.pop(),!v){i=i.safePop(),o.produce(i,a),u=!0;return}}_[0].end>n&&(n=_[0].end,t=!1)}}function tr(r,e,t,n,i,o){let s=i.beginRuleCapturedEOL?0:-1;const c=[];for(let a=i;a;a=a.pop()){const u=a.getRule(r);u instanceof Ae&&c.push({rule:u,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:u,findOptions:m}=or(a.rule,r,a.stack.endRule,t,n===s),d=u.findNextMatchSync(e,n,m);if(d){if(d.ruleId!==zt){i=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),re(r,e,t,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,t=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:t}}function nr(r,e,t,n,i,o){const s=rr(r,e,t,n,i,o),c=r.getInjections();if(c.length===0)return s;const a=ir(c,r,e,t,n,i,o);if(!a)return s;if(!s)return a;const u=s.captureIndices[0].start,m=a.captureIndices[0].start;return m<u||a.priorityMatch&&m===u?a:s}function rr(r,e,t,n,i,o){const s=i.getRule(r),{ruleScanner:c,findOptions:a}=Jt(s,r,i.endRule,t,n===o),u=c.findNextMatchSync(e,n,a);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function ir(r,e,t,n,i,o,s){let c=Number.MAX_VALUE,a=null,u,m=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,p=r.length;h<p;h++){const _=r[h];if(!_.matcher(d))continue;const b=e.getRule(_.ruleId),{ruleScanner:v,findOptions:y}=Jt(b,e,null,n,i===s),E=v.findNextMatchSync(t,i,y);if(!E)continue;const R=E.captureIndices[0].start;if(!(R>=c)&&(c=R,a=E.captureIndices,u=E.ruleId,m=_.priority,c===i))break}return a?{priorityMatch:m===-1,captureIndices:a,matchedRuleId:u}:null}function Jt(r,e,t,n,i){return{ruleScanner:r.compileAG(e,t,n,i),findOptions:0}}function or(r,e,t,n,i){return{ruleScanner:r.compileWhileAG(e,t,n,i),findOptions:0}}function re(r,e,t,n,i,o,s){if(o.length===0)return;const c=e.content,a=Math.min(o.length,s.length),u=[],m=s[0].end;for(let d=0;d<a;d++){const h=o[d];if(h===null)continue;const p=s[d];if(p.length===0)continue;if(p.start>m)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,p.start):i.produce(n,p.start),h.retokenizeCapturedWithRuleId){const b=h.getName(c,s),v=n.contentNameScopesList.pushAttributed(b,r),y=h.getContentName(c,s),E=v.pushAttributed(y,r),R=n.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,v,E),A=r.createOnigString(c.substring(0,p.end));Yt(r,A,t&&p.start===0,p.start,R,i,!1,0),Wt(A);continue}const _=h.getName(c,s);if(_!==null){const v=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(_,r);u.push(new sr(v,p.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var sr=class{constructor(r,e){f(this,"scopes");f(this,"endPos");this.scopes=r,this.endPos=e}};function ar(r,e,t,n,i,o,s,c){return new cr(r,e,t,n,i,o,s,c)}function vt(r,e,t,n,i){const o=Re(e,Se),s=qt.getCompiledRuleId(t,n,i.repository);for(const c of o)r.push({debugSelector:e,matcher:c.matcher,ruleId:s,grammar:i,priority:c.priority})}function Se(r,e){if(e.length<r.length)return!1;let t=0;return r.every(n=>{for(let i=t;i<e.length;i++)if(lr(e[i],n))return t=i+1,!0;return!1})}function lr(r,e){if(!r)return!1;if(r===e)return!0;const t=e.length;return r.length>t&&r.substr(0,t)===e&&r[t]==="."}var cr=class{constructor(r,e,t,n,i,o,s,c){f(this,"_rootId");f(this,"_lastRuleId");f(this,"_ruleId2desc");f(this,"_includedGrammars");f(this,"_grammarRepository");f(this,"_grammar");f(this,"_injections");f(this,"_basicScopeAttributesProvider");f(this,"_tokenTypeMatchers");if(this._rootScopeName=r,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new Zn(t,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=bt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const u=Re(a,Se);for(const m of u)this._tokenTypeMatchers.push({matcher:m.matcher,type:i[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const r of this._ruleId2desc)r&&r.dispose()}createOnigScanner(r){return this._onigLib.createOnigScanner(r)}createOnigString(r){return this._onigLib.createOnigString(r)}getMetadataForScope(r){return this._basicScopeAttributesProvider.getBasicScopeAttributes(r)}_collectInjections(){const r={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],t=this._rootScopeName,n=r.lookup(t);if(n){const i=n.injections;if(i)for(let s in i)vt(e,s,i[s],this,n);const o=this._grammarRepository.injections(t);o&&o.forEach(s=>{const c=this.getExternalGrammar(s);if(c){const a=c.injectionSelector;a&&vt(e,a,c,this,c)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(r){const e=++this._lastRuleId,t=r(e);return this._ruleId2desc[e]=t,t}getRule(r){return this._ruleId2desc[r]}getExternalGrammar(r,e){if(this._includedGrammars[r])return this._includedGrammars[r];if(this._grammarRepository){const t=this._grammarRepository.lookup(r);if(t)return this._includedGrammars[r]=bt(t,e&&e.$base),this._includedGrammars[r]}}tokenizeLine(r,e,t=0){const n=this._tokenize(r,e,!1,t);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(r,e,t=0){const n=this._tokenize(r,e,!0,t);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(r,e,t,n){this._rootId===-1&&(this._rootId=qt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Ye.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),d=Q.set(0,u.languageId,u.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=ie.createRootAndLookUpScopeName(h,d,this):p=ie.createRoot("unknown",d),e=new Ye(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();r=r+`
4
4
  `;const o=this.createOnigString(r),s=o.content.length,c=new dr(t,r,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Yt(this,o,i,0,e,c,!0,n);return Wt(o),{lineLength:s,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function bt(r,e){return r=kn(r),r.repository=r.repository||{},r.repository.$self={$vscodeTextmateLocation:r.$vscodeTextmateLocation,patterns:r.patterns,name:r.scopeName},r.repository.$base=e||r.repository.$self,r}var ie=class j{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(e,t){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const o of t)i=Be.push(i,o.scopeNames),n=new j(n,i,o.encodedTokenAttributes);return n}static createRoot(e,t){return new j(null,new Be(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const i=n.getMetadataForScope(e),o=new Be(null,e),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(t,i,s);return new j(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return j.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let i=-1,o=0,s=0;return n!==null&&(i=n.fontStyle,o=n.foregroundId,s=n.backgroundId),Q.set(e,t.languageId,t.tokenType,null,i,o,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return j._pushAttributed(this,e,t);const n=e.split(/ /g);let i=this;for(const o of n)i=j._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,n){const i=n.getMetadataForScope(t),o=e.scopePath.push(t),s=n.themeProvider.themeMatch(o),c=j.mergeAttributes(e.tokenAttributes,i,s);return new j(e,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?t.reverse():void 0}},G,Ye=(G=class{constructor(e,t,n,i,o,s,c,a){f(this,"_stackElementBrand");f(this,"_enterPos");f(this,"_anchorPos");f(this,"depth");this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:G._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ie.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){G._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,i,o,s,c){return new G(this,e,t,n,i,o,s,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){var n,i;return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new G(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){var e,t,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((t=this.nameScopesList)==null?void 0:t.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,t){const n=ie.fromExtension((e==null?void 0:e.nameScopesList)??null,t.nameScopesList);return new G(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,n,ie.fromExtension(n,t.contentNameScopesList))}},f(G,"NULL",new G(null,0,0,0,!1,null,null,null)),G),ur=class{constructor(r,e){f(this,"balancedBracketScopes");f(this,"unbalancedBracketScopes");f(this,"allowAny",!1);this.balancedBracketScopes=r.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Re(t,Se).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Re(t,Se).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(r){for(const e of this.unbalancedBracketScopes)if(e(r))return!1;for(const e of this.balancedBracketScopes)if(e(r))return!0;return this.allowAny}},dr=class{constructor(r,e,t,n){f(this,"_emitBinaryTokens");f(this,"_lineText");f(this,"_tokens");f(this,"_binaryTokens");f(this,"_lastTokenEndIndex");f(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=r,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(r,e){this.produceFromScopes(r.contentNameScopesList,e)}produceFromScopes(r,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(r==null?void 0:r.tokenAttributes)??0,o=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(r==null?void 0:r.getScopeNames())??[];for(const c of this._tokenTypeOverrides)c.matcher(s)&&(i=Q.set(i,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(i=Q.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const t=(r==null?void 0:r.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(r,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(r,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(r,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)t[n]=this._binaryTokens[n];return t}},mr=class{constructor(r,e){f(this,"_grammars",new Map);f(this,"_rawGrammars",new Map);f(this,"_injectionGrammars",new Map);f(this,"_theme");this._onigLib=e,this._theme=r}dispose(){for(const r of this._grammars.values())r.dispose()}setTheme(r){this._theme=r}getColorMap(){return this._theme.getColorMap()}addGrammar(r,e){this._rawGrammars.set(r.scopeName,r),e&&this._injectionGrammars.set(r.scopeName,e)}lookup(r){return this._rawGrammars.get(r)}injections(r){return this._injectionGrammars.get(r)}getDefaults(){return this._theme.getDefaults()}themeMatch(r){return this._theme.match(r)}grammarForScopeName(r,e,t,n,i){if(!this._grammars.has(r)){let o=this._rawGrammars.get(r);if(!o)return null;this._grammars.set(r,ar(r,o,e,t,n,i,this,this._onigLib))}return this._grammars.get(r)}},hr=class{constructor(e){f(this,"_options");f(this,"_syncRegistry");f(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new mr(be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(be.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ur(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,i,o){const s=new Un(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(c=>this._loadSingleGrammar(c.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,t=0,n=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,i,o)}},Je=Ye.NULL;const pr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class me{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}me.prototype.normal={};me.prototype.property={};me.prototype.space=void 0;function Xt(r,e){const t={},n={};for(const i of r)Object.assign(t,i.property),Object.assign(n,i.normal);return new me(t,n,e)}function Xe(r){return r.toLowerCase()}class V{constructor(e,t){this.attribute=t,this.property=e}}V.prototype.attribute="";V.prototype.booleanish=!1;V.prototype.boolean=!1;V.prototype.commaOrSpaceSeparated=!1;V.prototype.commaSeparated=!1;V.prototype.defined=!1;V.prototype.mustUseProperty=!1;V.prototype.number=!1;V.prototype.overloadedBoolean=!1;V.prototype.property="";V.prototype.spaceSeparated=!1;V.prototype.space=void 0;let fr=0;const T=q(),P=q(),Qe=q(),g=q(),S=q(),J=q(),M=q();function q(){return 2**++fr}const Ze=Object.freeze(Object.defineProperty({__proto__:null,boolean:T,booleanish:P,commaOrSpaceSeparated:M,commaSeparated:J,number:g,overloadedBoolean:Qe,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),je=Object.keys(Ze);class rt extends V{constructor(e,t,n,i){let o=-1;if(super(e,t),Rt(this,"space",i),typeof n=="number")for(;++o<je.length;){const s=je[o];Rt(this,je[o],(n&Ze[s])===Ze[s])}}}rt.prototype.defined=!0;function Rt(r,e,t){t&&(r[e]=t)}function Z(r){const e={},t={};for(const[n,i]of Object.entries(r.properties)){const o=new rt(n,r.transform(r.attributes||{},n),i,r.space);r.mustUseProperty&&r.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,t[Xe(n)]=n,t[Xe(o.attribute)]=n}return new me(e,t,r.space)}const Qt=Z({properties:{ariaActiveDescendant:null,ariaAtomic:P,ariaAutoComplete:null,ariaBusy:P,ariaChecked:P,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:P,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:P,ariaFlowTo:S,ariaGrabbed:P,ariaHasPopup:null,ariaHidden:P,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:g,ariaLive:null,ariaModal:P,ariaMultiLine:P,ariaMultiSelectable:P,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:P,ariaReadOnly:P,ariaRelevant:null,ariaRequired:P,ariaRoleDescription:S,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:P,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(r,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Zt(r,e){return e in r?r[e]:e}function en(r,e){return Zt(r,e.toLowerCase())}const _r=Z({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:J,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:S,autoFocus:T,autoPlay:T,blocking:S,capture:null,charSet:null,checked:T,cite:null,className:S,cols:g,colSpan:null,content:null,contentEditable:P,controls:T,controlsList:S,coords:g|J,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:Qe,draggable:P,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:S,height:g,hidden:Qe,high:g,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:S,itemRef:S,itemScope:T,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:T,muted:T,name:null,nonce:null,noModule:T,noValidate:T,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:T,optimum:g,pattern:null,ping:S,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:S,required:T,reversed:T,rows:g,rowSpan:g,sandbox:S,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:P,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:P,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:S,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:T,declare:T,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:P,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:en}),gr=Z({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:S,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:J,g2:J,glyphName:J,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:S,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zt}),tn=Z({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(r,e){return"xlink:"+e.slice(5).toLowerCase()}}),nn=Z({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:en}),rn=Z({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(r,e){return"xml:"+e.slice(3).toLowerCase()}}),yr=/[A-Z]/g,Tt=/-[a-z]/g,Er=/^data[-\w.:]+$/i;function vr(r,e){const t=Xe(e);let n=e,i=V;if(t in r.normal)return r.property[r.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Er.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Tt,Rr);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Tt.test(o)){let s=o.replace(yr,br);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=rt}return new i(n,e)}function br(r){return"-"+r.toLowerCase()}function Rr(r){return r.charAt(1).toUpperCase()}const Tr=Xt([Qt,_r,tn,nn,rn],"html"),on=Xt([Qt,gr,tn,nn,rn],"svg"),At={}.hasOwnProperty;function Ar(r,e){const t=e||{};function n(i,...o){let s=n.invalid;const c=n.handlers;if(i&&At.call(i,r)){const a=String(i[r]);s=At.call(c,a)?c[a]:n.unknown}if(s)return s.call(this,i,...o)}return n.handlers=t.handlers||{},n.invalid=t.invalid,n.unknown=t.unknown,n}const Sr=/["&'<>`]/g,Lr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Pr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,kr=/[|\\{}()[\]^$+*?.]/g,St=new WeakMap;function Ir(r,e){if(r=r.replace(e.subset?wr(e.subset):Sr,n),e.subset||e.escapeOnly)return r;return r.replace(Lr,t).replace(Pr,n);function t(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function n(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function wr(r){let e=St.get(r);return e||(e=Or(r),St.set(r,e)),e}function Or(r){const e=[];let t=-1;for(;++t<r.length;)e.push(r[t].replace(kr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Cr=/[\dA-Fa-f]/;function Dr(r,e,t){const n="&#x"+r.toString(16).toUpperCase();return t&&e&&!Cr.test(String.fromCharCode(e))?n:n+";"}const Nr=/\d/;function xr(r,e,t){const n="&#"+String(r);return t&&e&&!Nr.test(String.fromCharCode(e))?n:n+";"}const Vr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],$e={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Mr=["cent","copy","divide","gt","lt","not","para","times"],sn={}.hasOwnProperty,et={};let fe;for(fe in $e)sn.call($e,fe)&&(et[$e[fe]]=fe);const Br=/[^\dA-Za-z]/;function Gr(r,e,t,n){const i=String.fromCharCode(r);if(sn.call(et,i)){const o=et[i],s="&"+o;return t&&Vr.includes(o)&&!Mr.includes(o)&&(!n||e&&e!==61&&Br.test(String.fromCharCode(e)))?s:s+";"}return""}function jr(r,e,t){let n=Dr(r,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=Gr(r,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=xr(r,e,t.omitOptionalSemicolons);o.length<n.length&&(n=o)}return i&&(!t.useShortestReferences||i.length<n.length)?i:n}function X(r,e){return Ir(r,Object.assign({format:jr},e))}const $r=/^>|^->|<!--|-->|--!>|<!-$/g,Ur=[">"],Hr=["<",">"];function Wr(r,e,t,n){return n.settings.bogusComments?"<?"+X(r.value,Object.assign({},n.settings.characterReferences,{subset:Ur}))+">":"<!--"+r.value.replace($r,i)+"-->";function i(o){return X(o,Object.assign({},n.settings.characterReferences,{subset:Hr}))}}function Fr(r,e,t,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function Lt(r,e){const t=String(r);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=t.indexOf(e);for(;i!==-1;)n++,i=t.indexOf(e,i+e.length);return n}function zr(r,e){const t=e||{};return(r[r.length-1]===""?[...r,""]:r).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function qr(r){return r.join(" ").trim()}const Kr=/[ \t\n\f\r]/g;function it(r){return typeof r=="object"?r.type==="text"?Pt(r.value):!1:Pt(r)}function Pt(r){return r.replace(Kr,"")===""}const w=ln(1),an=ln(-1),Yr=[];function ln(r){return e;function e(t,n,i){const o=t?t.children:Yr;let s=(n||0)+r,c=o[s];if(!i)for(;c&&it(c);)s+=r,c=o[s];return c}}const Jr={}.hasOwnProperty;function cn(r){return e;function e(t,n,i){return Jr.call(r,t.tagName)&&r[t.tagName](t,n,i)}}const ot=cn({body:Qr,caption:Ue,colgroup:Ue,dd:ni,dt:ti,head:Ue,html:Xr,li:ei,optgroup:ri,option:ii,p:Zr,rp:kt,rt:kt,tbody:si,td:It,tfoot:ai,th:It,thead:oi,tr:li});function Ue(r,e,t){const n=w(t,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&it(n.value.charAt(0)))}function Xr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Qr(r,e,t){const n=w(t,e);return!n||n.type!=="comment"}function Zr(r,e,t){const n=w(t,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function ei(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="li"}function ti(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ni(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function kt(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function ri(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ii(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function oi(r,e,t){const n=w(t,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function si(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function ai(r,e,t){return!w(t,e)}function li(r,e,t){const n=w(t,e);return!n||n.type==="element"&&n.tagName==="tr"}function It(r,e,t){const n=w(t,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const ci=cn({body:mi,colgroup:hi,head:di,html:ui,tbody:pi});function ui(r){const e=w(r,-1);return!e||e.type!=="comment"}function di(r){const e=new Set;for(const n of r.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const t=r.children[0];return!t||t.type==="element"}function mi(r){const e=w(r,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&it(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function hi(r,e,t){const n=an(t,e),i=w(r,-1,!0);return t&&n&&n.type==="element"&&n.tagName==="colgroup"&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function pi(r,e,t){const n=an(t,e),i=w(r,-1);return t&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&ot(n,t.children.indexOf(n),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const _e={name:[[`
5
5
  \f\r &/=>`.split(""),`
@@ -1 +1 @@
1
- import{aq as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-BbohfXZk.js";import{c as L,b as F,n as p,a as D,S as q,E as z,D as G,C as T,G as U}from"./git-diff-vendor-CSgooKT_.js";import{av as N,aw as K}from"./main-DUP17Bqi.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-BWX6Cyx3.js";var $=b("<div>"),O=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const j=B("session");U();function I(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,I(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,k;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((k=m==null?void 0:m.textContent)==null?void 0:k.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const u=C??document.createElement("span");u.className="tool-call-diff-compact-line-number",u.textContent=g,u.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(u),n.push({gutter:r,label:u,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,h=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",h),o.style.setProperty("--diff-aside-width--",h)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return F(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=O();return x(f,p(q,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=$(),n=o;return typeof n=="function"?E(n,l):o=l,x(l,p(q,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(j.warn("Failed to render diff view",d),(()=>{var h=P();return x(h,()=>e.diffText),h})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?T.Split:T.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=$(),n=o;return typeof n=="function"?E(n,l):o=l,D(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};
1
+ import{aw as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-NKl8kwH2.js";import{c as L,b as F,n as p,a as D,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CYS3ApzA.js";import{aH as N,aI as K}from"./main-DfSREDgt.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-Best16ZB.js";var q=b("<div>"),I=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const O=B("session");U();function j(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,j(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,k;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((k=m==null?void 0:m.textContent)==null?void 0:k.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const u=C??document.createElement("span");u.className="tool-call-diff-compact-line-number",u.textContent=g,u.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(u),n.push({gutter:r,label:u,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,h=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",h),o.style.setProperty("--diff-aside-width--",h)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return F(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=I();return x(f,p(T,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=q(),n=o;return typeof n=="function"?E(n,l):o=l,x(l,p(T,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(O.warn("Failed to render diff view",d),(()=>{var h=P();return x(h,()=>e.diffText),h})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?$.Split:$.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=q(),n=o;return typeof n=="function"?E(n,l):o=l,D(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};
@@ -1,4 +1,4 @@
1
- import"./fast-diff-vendor-DgdwVvTQ.js";import{c as ms,g as ws}from"./highlight-vendor-8FKMu9os.js";const V={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return fl(this.context.count)},getNextContextId(){return fl(this.context.count++)}};function fl(e){const t=String(e),n=t.length-1;return V.context.id+(n?String.fromCharCode(96+n):"")+t}function Ve(e){V.context=e}const Ul=!1,Ls=(e,t)=>e===t,Hn=Symbol("solid-proxy"),Bl=typeof Proxy=="function",Vl=Symbol("solid-track"),gu=Symbol("solid-dev-component"),Tn={equals:Ls};let ln=null,Gl=Zl;const We=1,An=2,zl={owned:null,cleanups:null,context:null,owner:null},ii={};var q=null;let In=null,ps=null,Q=null,xe=null,Ie=null,Zn=0;function Dt(e,t){const n=Q,i=q,l=e.length===0,r=t===void 0?i:t,s=l?zl:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=l?e:()=>e(()=>_e(()=>cn(s)));q=s,Q=null;try{return Ye(o,!0)}finally{Q=n,q=i}}function z(e,t){t=t?Object.assign({},Tn,t):Tn;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=l=>(typeof l=="function"&&(l=l(n.value)),Yl(n,l));return[ql.bind(n),i]}function cl(e,t,n){const i=_n(e,t,!0,We);Kt(i)}function j(e,t,n){const i=_n(e,t,!1,We);Kt(i)}function re(e,t,n){Gl=Hs;const i=_n(e,t,!1,We),l=Pt&&bn(Pt);l&&(i.suspense=l),(!n||!n.render)&&(i.user=!0),Ie?Ie.push(i):Kt(i)}function y(e,t,n){n=n?Object.assign({},Tn,n):Tn;const i=_n(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,Kt(i),ql.bind(i)}function $s(e){return e&&typeof e=="object"&&"then"in e}function ys(e,t,n){let i,l,r;i=!0,l=e,r={};let s=null,o=ii,d=null,f=!1,u="initialValue"in r,a=typeof i=="function"&&y(i);const b=new Set,[c,_]=(r.storage||z)(r.initialValue),[w,m]=z(void 0),[v,h]=z(void 0,{equals:!1}),[L,p]=z(u?"ready":"unresolved");V.context&&(d=V.getNextContextId(),r.ssrLoadFrom==="initial"?o=r.initialValue:V.load&&V.has(d)&&(o=V.load(d)));function x(T,W,R,D){return s===T&&(s=null,D!==void 0&&(u=!0),(T===o||W===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(D,{value:W})),o=ii,N(W,R)),W}function N(T,W){Ye(()=>{W===void 0&&_(()=>T),p(W!==void 0?"errored":u?"ready":"unresolved"),m(W);for(const R of b.keys())R.decrement();b.clear()},!1)}function S(){const T=Pt&&bn(Pt),W=c(),R=w();if(R!==void 0&&!s)throw R;return Q&&!Q.user&&T&&cl(()=>{v(),s&&(T.resolved&&In||b.has(T)||(T.increment(),b.add(T)))}),W}function $(T=!0){if(T!==!1&&f)return;f=!1;const W=a?a():i;if(W==null||W===!1){x(s,_e(c));return}let R;const D=o!==ii?o:_e(()=>{try{return l(W,{value:c(),refetching:T})}catch(G){R=G}});if(R!==void 0){x(s,void 0,Fn(R),W);return}else if(!$s(D))return x(s,D,void 0,W),D;return s=D,"v"in D?(D.s===1?x(s,D.v,void 0,W):x(s,void 0,Fn(D.v),W),D):(f=!0,queueMicrotask(()=>f=!1),Ye(()=>{p(u?"refreshing":"pending"),h()},!1),D.then(G=>x(D,G,void 0,W),G=>x(D,void 0,Fn(G),W)))}Object.defineProperties(S,{state:{get:()=>L()},error:{get:()=>w()},loading:{get(){const T=L();return T==="pending"||T==="refreshing"}},latest:{get(){if(!u)return S();const T=w();if(T&&!s)throw T;return c()}}});let A=q;return a?cl(()=>(A=q,$(!1))):$(!1),[S,{refetch:T=>Fs(A,()=>$(T)),mutate:_}]}function bu(e){return Ye(e,!1)}function _e(e){if(Q===null)return e();const t=Q;Q=null;try{return e()}finally{Q=t}}function _u(e,t,n){const i=Array.isArray(e);let l,r=n&&n.defer;return s=>{let o;if(i){o=Array(e.length);for(let f=0;f<e.length;f++)o[f]=e[f]()}else o=e();if(r)return r=!1,s;const d=_e(()=>t(o,l,s));return l=o,d}}function xu(e){re(()=>_e(e))}function se(e){return q===null||(q.cleanups===null?q.cleanups=[e]:q.cleanups.push(e)),e}function Ss(e,t){ln||(ln=Symbol("error")),q=_n(void 0,void 0,!0),q.context={...q.context,[ln]:[t]};try{return e()}catch(n){xn(n)}finally{q=q.owner}}function mu(){return Q}function Is(){return q}function Fs(e,t){const n=q,i=Q;q=e,Q=null;try{return Ye(t,!0)}catch(l){xn(l)}finally{q=n,Q=i}}const[wu,Lu]=z(!1);function Ns(e){Ie.push.apply(Ie,e),e.length=0}function Xn(e,t){const n=Symbol("context");return{id:n,Provider:Ts(n),defaultValue:e}}function bn(e){let t;return q&&q.context&&(t=q.context[e.id])!==void 0?t:e.defaultValue}function Kl(e){const t=y(e),n=y(()=>vi(t()));return n.toArray=()=>{const i=n();return Array.isArray(i)?i:i!=null?[i]:[]},n}let Pt;function ks(){return Pt||(Pt=Xn())}function ql(){if(this.sources&&this.state)if(this.state===We)Kt(this);else{const e=xe;xe=null,Ye(()=>Rn(this),!1),xe=e}if(Q){const e=this.observers?this.observers.length:0;Q.sources?(Q.sources.push(this),Q.sourceSlots.push(e)):(Q.sources=[this],Q.sourceSlots=[e]),this.observers?(this.observers.push(Q),this.observerSlots.push(Q.sources.length-1)):(this.observers=[Q],this.observerSlots=[Q.sources.length-1])}return this.value}function Yl(e,t,n){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&Ye(()=>{for(let l=0;l<e.observers.length;l+=1){const r=e.observers[l],s=In&&In.running;s&&In.disposed.has(r),(s?!r.tState:!r.state)&&(r.pure?xe.push(r):Ie.push(r),r.observers&&Xl(r)),s||(r.state=We)}if(xe.length>1e6)throw xe=[],new Error},!1)),t}function Kt(e){if(!e.fn)return;cn(e);const t=Zn;Cs(e,e.value,t)}function Cs(e,t,n){let i;const l=q,r=Q;Q=q=e;try{i=e.fn(t)}catch(s){return e.pure&&(e.state=We,e.owned&&e.owned.forEach(cn),e.owned=null),e.updatedAt=n+1,xn(s)}finally{Q=r,q=l}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Yl(e,i):e.value=i,e.updatedAt=n)}function _n(e,t,n,i=We,l){const r={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:q,context:q?q.context:null,pure:n};return q===null||q!==zl&&(q.owned?q.owned.push(r):q.owned=[r]),r}function Dn(e){if(e.state===0)return;if(e.state===An)return Rn(e);if(e.suspense&&_e(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Zn);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===We)Kt(e);else if(e.state===An){const i=xe;xe=null,Ye(()=>Rn(e,t[0]),!1),xe=i}}function Ye(e,t){if(xe)return e();let n=!1;t||(xe=[]),Ie?n=!0:Ie=[],Zn++;try{const i=e();return Es(n),i}catch(i){n||(Ie=null),xe=null,xn(i)}}function Es(e){if(xe&&(Zl(xe),xe=null),e)return;const t=Ie;Ie=null,t.length&&Ye(()=>Gl(t),!1)}function Zl(e){for(let t=0;t<e.length;t++)Dn(e[t])}function Hs(e){let t,n=0;for(t=0;t<e.length;t++){const i=e[t];i.user?e[n++]=i:Dn(i)}if(V.context){if(V.count){V.effects||(V.effects=[]),V.effects.push(...e.slice(0,n));return}Ve()}for(V.effects&&(V.done||!V.count)&&(e=[...V.effects,...e],n+=V.effects.length,delete V.effects),t=0;t<n;t++)Dn(e[t])}function Rn(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];if(i.sources){const l=i.state;l===We?i!==t&&(!i.updatedAt||i.updatedAt<Zn)&&Dn(i):l===An&&Rn(i,t)}}}function Xl(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=An,n.pure?xe.push(n):Ie.push(n),n.observers&&Xl(n))}}function cn(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const r=l.pop(),s=n.observerSlots.pop();i<l.length&&(r.sourceSlots[s]=i,l[i]=r,n.observerSlots[i]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)cn(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)cn(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Fn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function hl(e,t,n){try{for(const i of t)i(e)}catch(i){xn(i,n&&n.owner||null)}}function xn(e,t=q){const n=ln&&t&&t.context&&t.context[ln],i=Fn(e);if(!n)throw i;Ie?Ie.push({fn(){hl(i,n,t)},state:We}):hl(i,n,t)}function vi(e){if(typeof e=="function"&&!e.length)return vi(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=vi(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Ts(e,t){return function(i){let l;return j(()=>l=_e(()=>(q.context={...q.context,[e]:i.value},Kl(()=>i.children))),void 0),l}}const gi=Symbol("fallback");function Wn(e){for(let t=0;t<e.length;t++)e[t]()}function As(e,t,n={}){let i=[],l=[],r=[],s=0,o=t.length>1?[]:null;return se(()=>Wn(r)),()=>{let d=e()||[],f=d.length,u,a;return d[Vl],_e(()=>{let c,_,w,m,v,h,L,p,x;if(f===0)s!==0&&(Wn(r),r=[],i=[],l=[],s=0,o&&(o=[])),n.fallback&&(i=[gi],l[0]=Dt(N=>(r[0]=N,n.fallback())),s=1);else if(s===0){for(l=new Array(f),a=0;a<f;a++)i[a]=d[a],l[a]=Dt(b);s=f}else{for(w=new Array(f),m=new Array(f),o&&(v=new Array(f)),h=0,L=Math.min(s,f);h<L&&i[h]===d[h];h++);for(L=s-1,p=f-1;L>=h&&p>=h&&i[L]===d[p];L--,p--)w[p]=l[L],m[p]=r[L],o&&(v[p]=o[L]);for(c=new Map,_=new Array(p+1),a=p;a>=h;a--)x=d[a],u=c.get(x),_[a]=u===void 0?-1:u,c.set(x,a);for(u=h;u<=L;u++)x=i[u],a=c.get(x),a!==void 0&&a!==-1?(w[a]=l[u],m[a]=r[u],o&&(v[a]=o[u]),a=_[a],c.set(x,a)):r[u]();for(a=h;a<f;a++)a in w?(l[a]=w[a],r[a]=m[a],o&&(o[a]=v[a],o[a](a))):l[a]=Dt(b);l=l.slice(0,s=f),i=d.slice(0)}return l});function b(c){if(r[a]=c,o){const[_,w]=z(a);return o[a]=w,t(d[a],_)}return t(d[a])}}}function Ds(e,t,n={}){let i=[],l=[],r=[],s=[],o=0,d;return se(()=>Wn(r)),()=>{const f=e()||[],u=f.length;return f[Vl],_e(()=>{if(u===0)return o!==0&&(Wn(r),r=[],i=[],l=[],o=0,s=[]),n.fallback&&(i=[gi],l[0]=Dt(b=>(r[0]=b,n.fallback())),o=1),l;for(i[0]===gi&&(r[0](),r=[],i=[],l=[],o=0),d=0;d<u;d++)d<i.length&&i[d]!==f[d]?s[d](()=>f[d]):d>=i.length&&(l[d]=Dt(a));for(;d<i.length;d++)r[d]();return o=s.length=r.length=u,i=f.slice(0),l=l.slice(0,o)});function a(b){r[d]=b;const[c,_]=z(f[d]);return s[d]=_,t(c,d)}}}function k(e,t){return _e(()=>e(t||{}))}function wn(){return!0}const bi={get(e,t,n){return t===Hn?n:e.get(t)},has(e,t){return t===Hn?!0:e.has(t)},set:wn,deleteProperty:wn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:wn,deleteProperty:wn}},ownKeys(e){return e.keys()}};function li(e){return(e=typeof e=="function"?e():e)?e:{}}function Rs(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function pu(...e){let t=!1;for(let s=0;s<e.length;s++){const o=e[s];t=t||!!o&&Hn in o,e[s]=typeof o=="function"?(t=!0,y(o)):o}if(Bl&&t)return new Proxy({get(s){for(let o=e.length-1;o>=0;o--){const d=li(e[o])[s];if(d!==void 0)return d}},has(s){for(let o=e.length-1;o>=0;o--)if(s in li(e[o]))return!0;return!1},keys(){const s=[];for(let o=0;o<e.length;o++)s.push(...Object.keys(li(e[o])));return[...new Set(s)]}},bi);const n={},i=Object.create(null);for(let s=e.length-1;s>=0;s--){const o=e[s];if(!o)continue;const d=Object.getOwnPropertyNames(o);for(let f=d.length-1;f>=0;f--){const u=d[f];if(u==="__proto__"||u==="constructor")continue;const a=Object.getOwnPropertyDescriptor(o,u);if(!i[u])i[u]=a.get?{enumerable:!0,configurable:!0,get:Rs.bind(n[u]=[a.get.bind(o)])}:a.value!==void 0?a:void 0;else{const b=n[u];b&&(a.get?b.push(a.get.bind(o)):a.value!==void 0&&b.push(()=>a.value))}}}const l={},r=Object.keys(i);for(let s=r.length-1;s>=0;s--){const o=r[s],d=i[o];d&&d.get?Object.defineProperty(l,o,d):l[o]=d?d.value:void 0}return l}function $u(e,...t){const n=t.length;if(Bl&&Hn in e){const l=n>1?t.flat():t[0],r=t.map(s=>new Proxy({get(o){return s.includes(o)?e[o]:void 0},has(o){return s.includes(o)&&o in e},keys(){return s.filter(o=>o in e)}},bi));return r.push(new Proxy({get(s){return l.includes(s)?void 0:e[s]},has(s){return l.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!l.includes(s))}},bi)),r}const i=[];for(let l=0;l<=n;l++)i[l]={};for(const l of Object.getOwnPropertyNames(e)){let r=n;for(let d=0;d<t.length;d++)if(t[d].includes(l)){r=d;break}const s=Object.getOwnPropertyDescriptor(e,l);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?i[r][l]=s.value:Object.defineProperty(i[r],l,s)}return i}function yu(e){let t,n;const i=l=>{const r=V.context;if(r){const[o,d]=z();V.count||(V.count=0),V.count++,(n||(n=e())).then(f=>{!V.done&&Ve(r),V.count--,d(()=>f.default),Ve()}),t=o}else if(!t){const[o]=ys(()=>(n||(n=e())).then(d=>d.default));t=o}let s;return y(()=>(s=t())?_e(()=>{if(!r||V.done)return s(l);const o=V.context;Ve(r);const d=s(l);return Ve(o),d}):"")};return i.preload=()=>n||((n=e()).then(l=>t=()=>l.default),n),i}let Ws=0;function Su(){return V.context?V.getNextContextId():`cl-${Ws++}`}const Ql=e=>`Stale read from <${e}>.`;function hn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return y(As(()=>e.each,e.children,t||void 0))}function Iu(e){const t="fallback"in e&&{fallback:()=>e.fallback};return y(Ds(()=>e.each,e.children,t||void 0))}function X(e){const t=e.keyed,n=y(()=>e.when,void 0,void 0),i=t?n:y(n,void 0,{equals:(l,r)=>!l==!r});return y(()=>{const l=i();if(l){const r=e.children;return typeof r=="function"&&r.length>0?_e(()=>r(t?l:()=>{if(!_e(i))throw Ql("Show");return n()})):r}return e.fallback},void 0,void 0)}function Fu(e){const t=Kl(()=>e.children),n=y(()=>{const i=t(),l=Array.isArray(i)?i:[i];let r=()=>{};for(let s=0;s<l.length;s++){const o=s,d=l[s],f=r,u=y(()=>f()?void 0:d.when,void 0,void 0),a=d.keyed?u:y(u,void 0,{equals:(b,c)=>!b==!c});r=()=>f()||(a()?[o,u,d]:void 0)}return r});return y(()=>{const i=n()();if(!i)return e.fallback;const[l,r,s]=i,o=s.children;return typeof o=="function"&&o.length>0?_e(()=>o(s.keyed?r():()=>{var f;if(((f=_e(n)())==null?void 0:f[0])!==l)throw Ql("Match");return r()})):o},void 0,void 0)}function Nu(e){return e}let Ln;function ku(e){let t;V.context&&V.load&&(t=V.load(V.getContextId()));const[n,i]=z(t,void 0);return Ln||(Ln=new Set),Ln.add(i),se(()=>Ln.delete(i)),y(()=>{let l;if(l=n()){const r=e.fallback;return typeof r=="function"&&r.length?_e(()=>r(l,()=>i())):r}return Ss(()=>e.children,i)},void 0,void 0)}const Os=Xn();function Cu(e){let t=0,n,i,l,r,s;const[o,d]=z(!1),f=ks(),u={increment:()=>{++t===1&&d(!0)},decrement:()=>{--t===0&&d(!1)},inFallback:o,effects:[],resolved:!1},a=Is();if(V.context&&V.load){const _=V.getContextId();let w=V.load(_);if(w&&(typeof w!="object"||w.s!==1?l=w:V.gather(_)),l&&l!=="$$f"){const[m,v]=z(void 0,{equals:!1});r=m,l.then(()=>{if(V.done)return v();V.gather(_),Ve(i),v(),Ve()},h=>{s=h,v()})}}const b=bn(Os);b&&(n=b.register(u.inFallback));let c;return se(()=>c&&c()),k(f.Provider,{value:u,get children(){return y(()=>{if(s)throw s;if(i=V.context,r)return r(),r=void 0;i&&l==="$$f"&&Ve();const _=y(()=>e.children);return y(w=>{const m=u.inFallback(),{showContent:v=!0,showFallback:h=!0}=n?n():{};if((!m||l&&l!=="$$f")&&v)return u.resolved=!0,c&&c(),c=i=l=void 0,Ns(u.effects),_();if(h)return c?w:Dt(L=>(c=L,i&&(Ve({id:i.id+"F",count:0}),i=void 0),e.fallback),a)})})}})}var vl;(function(e){e[e.CRLF=1]="CRLF",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.NEWLINE=4]="NEWLINE",e[e.NORMAL=5]="NORMAL",e[e.NULL=6]="NULL"})(vl||(vl={}));var gl;(function(e){e[e.SplitGitHub=1]="SplitGitHub",e[e.SplitGitLab=2]="SplitGitLab",e[e.Split=3]="Split",e[e.Unified=4]="Unified"})(gl||(gl={}));const Ms=e=>{let t=1;const n={},i=(l,r)=>{l.forEach(s=>{if(s.type==="text"){if(s.value.indexOf(`
1
+ import"./fast-diff-vendor-DgdwVvTQ.js";import{c as ms,g as ws}from"./highlight-vendor-8FKMu9os.js";const V={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return fl(this.context.count)},getNextContextId(){return fl(this.context.count++)}};function fl(e){const t=String(e),n=t.length-1;return V.context.id+(n?String.fromCharCode(96+n):"")+t}function Ve(e){V.context=e}const Ul=!1,Ls=(e,t)=>e===t,Hn=Symbol("solid-proxy"),Bl=typeof Proxy=="function",Vl=Symbol("solid-track"),gu=Symbol("solid-dev-component"),Tn={equals:Ls};let ln=null,Gl=Zl;const We=1,An=2,zl={owned:null,cleanups:null,context:null,owner:null},ii={};var q=null;let In=null,ps=null,Q=null,xe=null,Ie=null,Zn=0;function Dt(e,t){const n=Q,i=q,l=e.length===0,r=t===void 0?i:t,s=l?zl:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=l?e:()=>e(()=>_e(()=>cn(s)));q=s,Q=null;try{return Ye(o,!0)}finally{Q=n,q=i}}function z(e,t){t=t?Object.assign({},Tn,t):Tn;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=l=>(typeof l=="function"&&(l=l(n.value)),Yl(n,l));return[ql.bind(n),i]}function cl(e,t,n){const i=_n(e,t,!0,We);Kt(i)}function j(e,t,n){const i=_n(e,t,!1,We);Kt(i)}function re(e,t,n){Gl=Hs;const i=_n(e,t,!1,We),l=Pt&&bn(Pt);l&&(i.suspense=l),(!n||!n.render)&&(i.user=!0),Ie?Ie.push(i):Kt(i)}function y(e,t,n){n=n?Object.assign({},Tn,n):Tn;const i=_n(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,Kt(i),ql.bind(i)}function $s(e){return e&&typeof e=="object"&&"then"in e}function ys(e,t,n){let i,l,r;typeof t=="function"?(i=e,l=t,r={}):(i=!0,l=e,r=t||{});let s=null,o=ii,d=null,f=!1,u="initialValue"in r,a=typeof i=="function"&&y(i);const b=new Set,[c,_]=(r.storage||z)(r.initialValue),[w,m]=z(void 0),[v,h]=z(void 0,{equals:!1}),[L,p]=z(u?"ready":"unresolved");V.context&&(d=V.getNextContextId(),r.ssrLoadFrom==="initial"?o=r.initialValue:V.load&&V.has(d)&&(o=V.load(d)));function x(T,W,R,D){return s===T&&(s=null,D!==void 0&&(u=!0),(T===o||W===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(D,{value:W})),o=ii,N(W,R)),W}function N(T,W){Ye(()=>{W===void 0&&_(()=>T),p(W!==void 0?"errored":u?"ready":"unresolved"),m(W);for(const R of b.keys())R.decrement();b.clear()},!1)}function S(){const T=Pt&&bn(Pt),W=c(),R=w();if(R!==void 0&&!s)throw R;return Q&&!Q.user&&T&&cl(()=>{v(),s&&(T.resolved&&In||b.has(T)||(T.increment(),b.add(T)))}),W}function $(T=!0){if(T!==!1&&f)return;f=!1;const W=a?a():i;if(W==null||W===!1){x(s,_e(c));return}let R;const D=o!==ii?o:_e(()=>{try{return l(W,{value:c(),refetching:T})}catch(G){R=G}});if(R!==void 0){x(s,void 0,Fn(R),W);return}else if(!$s(D))return x(s,D,void 0,W),D;return s=D,"v"in D?(D.s===1?x(s,D.v,void 0,W):x(s,void 0,Fn(D.v),W),D):(f=!0,queueMicrotask(()=>f=!1),Ye(()=>{p(u?"refreshing":"pending"),h()},!1),D.then(G=>x(D,G,void 0,W),G=>x(D,void 0,Fn(G),W)))}Object.defineProperties(S,{state:{get:()=>L()},error:{get:()=>w()},loading:{get(){const T=L();return T==="pending"||T==="refreshing"}},latest:{get(){if(!u)return S();const T=w();if(T&&!s)throw T;return c()}}});let A=q;return a?cl(()=>(A=q,$(!1))):$(!1),[S,{refetch:T=>Fs(A,()=>$(T)),mutate:_}]}function bu(e){return Ye(e,!1)}function _e(e){if(Q===null)return e();const t=Q;Q=null;try{return e()}finally{Q=t}}function _u(e,t,n){const i=Array.isArray(e);let l,r=n&&n.defer;return s=>{let o;if(i){o=Array(e.length);for(let f=0;f<e.length;f++)o[f]=e[f]()}else o=e();if(r)return r=!1,s;const d=_e(()=>t(o,l,s));return l=o,d}}function xu(e){re(()=>_e(e))}function se(e){return q===null||(q.cleanups===null?q.cleanups=[e]:q.cleanups.push(e)),e}function Ss(e,t){ln||(ln=Symbol("error")),q=_n(void 0,void 0,!0),q.context={...q.context,[ln]:[t]};try{return e()}catch(n){xn(n)}finally{q=q.owner}}function mu(){return Q}function Is(){return q}function Fs(e,t){const n=q,i=Q;q=e,Q=null;try{return Ye(t,!0)}catch(l){xn(l)}finally{q=n,Q=i}}const[wu,Lu]=z(!1);function Ns(e){Ie.push.apply(Ie,e),e.length=0}function Xn(e,t){const n=Symbol("context");return{id:n,Provider:Ts(n),defaultValue:e}}function bn(e){let t;return q&&q.context&&(t=q.context[e.id])!==void 0?t:e.defaultValue}function Kl(e){const t=y(e),n=y(()=>vi(t()));return n.toArray=()=>{const i=n();return Array.isArray(i)?i:i!=null?[i]:[]},n}let Pt;function ks(){return Pt||(Pt=Xn())}function ql(){if(this.sources&&this.state)if(this.state===We)Kt(this);else{const e=xe;xe=null,Ye(()=>Rn(this),!1),xe=e}if(Q){const e=this.observers?this.observers.length:0;Q.sources?(Q.sources.push(this),Q.sourceSlots.push(e)):(Q.sources=[this],Q.sourceSlots=[e]),this.observers?(this.observers.push(Q),this.observerSlots.push(Q.sources.length-1)):(this.observers=[Q],this.observerSlots=[Q.sources.length-1])}return this.value}function Yl(e,t,n){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&Ye(()=>{for(let l=0;l<e.observers.length;l+=1){const r=e.observers[l],s=In&&In.running;s&&In.disposed.has(r),(s?!r.tState:!r.state)&&(r.pure?xe.push(r):Ie.push(r),r.observers&&Xl(r)),s||(r.state=We)}if(xe.length>1e6)throw xe=[],new Error},!1)),t}function Kt(e){if(!e.fn)return;cn(e);const t=Zn;Cs(e,e.value,t)}function Cs(e,t,n){let i;const l=q,r=Q;Q=q=e;try{i=e.fn(t)}catch(s){return e.pure&&(e.state=We,e.owned&&e.owned.forEach(cn),e.owned=null),e.updatedAt=n+1,xn(s)}finally{Q=r,q=l}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Yl(e,i):e.value=i,e.updatedAt=n)}function _n(e,t,n,i=We,l){const r={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:q,context:q?q.context:null,pure:n};return q===null||q!==zl&&(q.owned?q.owned.push(r):q.owned=[r]),r}function Dn(e){if(e.state===0)return;if(e.state===An)return Rn(e);if(e.suspense&&_e(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Zn);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===We)Kt(e);else if(e.state===An){const i=xe;xe=null,Ye(()=>Rn(e,t[0]),!1),xe=i}}function Ye(e,t){if(xe)return e();let n=!1;t||(xe=[]),Ie?n=!0:Ie=[],Zn++;try{const i=e();return Es(n),i}catch(i){n||(Ie=null),xe=null,xn(i)}}function Es(e){if(xe&&(Zl(xe),xe=null),e)return;const t=Ie;Ie=null,t.length&&Ye(()=>Gl(t),!1)}function Zl(e){for(let t=0;t<e.length;t++)Dn(e[t])}function Hs(e){let t,n=0;for(t=0;t<e.length;t++){const i=e[t];i.user?e[n++]=i:Dn(i)}if(V.context){if(V.count){V.effects||(V.effects=[]),V.effects.push(...e.slice(0,n));return}Ve()}for(V.effects&&(V.done||!V.count)&&(e=[...V.effects,...e],n+=V.effects.length,delete V.effects),t=0;t<n;t++)Dn(e[t])}function Rn(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const i=e.sources[n];if(i.sources){const l=i.state;l===We?i!==t&&(!i.updatedAt||i.updatedAt<Zn)&&Dn(i):l===An&&Rn(i,t)}}}function Xl(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=An,n.pure?xe.push(n):Ie.push(n),n.observers&&Xl(n))}}function cn(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const r=l.pop(),s=n.observerSlots.pop();i<l.length&&(r.sourceSlots[s]=i,l[i]=r,n.observerSlots[i]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)cn(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)cn(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Fn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function hl(e,t,n){try{for(const i of t)i(e)}catch(i){xn(i,n&&n.owner||null)}}function xn(e,t=q){const n=ln&&t&&t.context&&t.context[ln],i=Fn(e);if(!n)throw i;Ie?Ie.push({fn(){hl(i,n,t)},state:We}):hl(i,n,t)}function vi(e){if(typeof e=="function"&&!e.length)return vi(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=vi(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Ts(e,t){return function(i){let l;return j(()=>l=_e(()=>(q.context={...q.context,[e]:i.value},Kl(()=>i.children))),void 0),l}}const gi=Symbol("fallback");function Wn(e){for(let t=0;t<e.length;t++)e[t]()}function As(e,t,n={}){let i=[],l=[],r=[],s=0,o=t.length>1?[]:null;return se(()=>Wn(r)),()=>{let d=e()||[],f=d.length,u,a;return d[Vl],_e(()=>{let c,_,w,m,v,h,L,p,x;if(f===0)s!==0&&(Wn(r),r=[],i=[],l=[],s=0,o&&(o=[])),n.fallback&&(i=[gi],l[0]=Dt(N=>(r[0]=N,n.fallback())),s=1);else if(s===0){for(l=new Array(f),a=0;a<f;a++)i[a]=d[a],l[a]=Dt(b);s=f}else{for(w=new Array(f),m=new Array(f),o&&(v=new Array(f)),h=0,L=Math.min(s,f);h<L&&i[h]===d[h];h++);for(L=s-1,p=f-1;L>=h&&p>=h&&i[L]===d[p];L--,p--)w[p]=l[L],m[p]=r[L],o&&(v[p]=o[L]);for(c=new Map,_=new Array(p+1),a=p;a>=h;a--)x=d[a],u=c.get(x),_[a]=u===void 0?-1:u,c.set(x,a);for(u=h;u<=L;u++)x=i[u],a=c.get(x),a!==void 0&&a!==-1?(w[a]=l[u],m[a]=r[u],o&&(v[a]=o[u]),a=_[a],c.set(x,a)):r[u]();for(a=h;a<f;a++)a in w?(l[a]=w[a],r[a]=m[a],o&&(o[a]=v[a],o[a](a))):l[a]=Dt(b);l=l.slice(0,s=f),i=d.slice(0)}return l});function b(c){if(r[a]=c,o){const[_,w]=z(a);return o[a]=w,t(d[a],_)}return t(d[a])}}}function Ds(e,t,n={}){let i=[],l=[],r=[],s=[],o=0,d;return se(()=>Wn(r)),()=>{const f=e()||[],u=f.length;return f[Vl],_e(()=>{if(u===0)return o!==0&&(Wn(r),r=[],i=[],l=[],o=0,s=[]),n.fallback&&(i=[gi],l[0]=Dt(b=>(r[0]=b,n.fallback())),o=1),l;for(i[0]===gi&&(r[0](),r=[],i=[],l=[],o=0),d=0;d<u;d++)d<i.length&&i[d]!==f[d]?s[d](()=>f[d]):d>=i.length&&(l[d]=Dt(a));for(;d<i.length;d++)r[d]();return o=s.length=r.length=u,i=f.slice(0),l=l.slice(0,o)});function a(b){r[d]=b;const[c,_]=z(f[d]);return s[d]=_,t(c,d)}}}function k(e,t){return _e(()=>e(t||{}))}function wn(){return!0}const bi={get(e,t,n){return t===Hn?n:e.get(t)},has(e,t){return t===Hn?!0:e.has(t)},set:wn,deleteProperty:wn,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:wn,deleteProperty:wn}},ownKeys(e){return e.keys()}};function li(e){return(e=typeof e=="function"?e():e)?e:{}}function Rs(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function pu(...e){let t=!1;for(let s=0;s<e.length;s++){const o=e[s];t=t||!!o&&Hn in o,e[s]=typeof o=="function"?(t=!0,y(o)):o}if(Bl&&t)return new Proxy({get(s){for(let o=e.length-1;o>=0;o--){const d=li(e[o])[s];if(d!==void 0)return d}},has(s){for(let o=e.length-1;o>=0;o--)if(s in li(e[o]))return!0;return!1},keys(){const s=[];for(let o=0;o<e.length;o++)s.push(...Object.keys(li(e[o])));return[...new Set(s)]}},bi);const n={},i=Object.create(null);for(let s=e.length-1;s>=0;s--){const o=e[s];if(!o)continue;const d=Object.getOwnPropertyNames(o);for(let f=d.length-1;f>=0;f--){const u=d[f];if(u==="__proto__"||u==="constructor")continue;const a=Object.getOwnPropertyDescriptor(o,u);if(!i[u])i[u]=a.get?{enumerable:!0,configurable:!0,get:Rs.bind(n[u]=[a.get.bind(o)])}:a.value!==void 0?a:void 0;else{const b=n[u];b&&(a.get?b.push(a.get.bind(o)):a.value!==void 0&&b.push(()=>a.value))}}}const l={},r=Object.keys(i);for(let s=r.length-1;s>=0;s--){const o=r[s],d=i[o];d&&d.get?Object.defineProperty(l,o,d):l[o]=d?d.value:void 0}return l}function $u(e,...t){const n=t.length;if(Bl&&Hn in e){const l=n>1?t.flat():t[0],r=t.map(s=>new Proxy({get(o){return s.includes(o)?e[o]:void 0},has(o){return s.includes(o)&&o in e},keys(){return s.filter(o=>o in e)}},bi));return r.push(new Proxy({get(s){return l.includes(s)?void 0:e[s]},has(s){return l.includes(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!l.includes(s))}},bi)),r}const i=[];for(let l=0;l<=n;l++)i[l]={};for(const l of Object.getOwnPropertyNames(e)){let r=n;for(let d=0;d<t.length;d++)if(t[d].includes(l)){r=d;break}const s=Object.getOwnPropertyDescriptor(e,l);!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable?i[r][l]=s.value:Object.defineProperty(i[r],l,s)}return i}function yu(e){let t,n;const i=l=>{const r=V.context;if(r){const[o,d]=z();V.count||(V.count=0),V.count++,(n||(n=e())).then(f=>{!V.done&&Ve(r),V.count--,d(()=>f.default),Ve()}),t=o}else if(!t){const[o]=ys(()=>(n||(n=e())).then(d=>d.default));t=o}let s;return y(()=>(s=t())?_e(()=>{if(!r||V.done)return s(l);const o=V.context;Ve(r);const d=s(l);return Ve(o),d}):"")};return i.preload=()=>n||((n=e()).then(l=>t=()=>l.default),n),i}let Ws=0;function Su(){return V.context?V.getNextContextId():`cl-${Ws++}`}const Ql=e=>`Stale read from <${e}>.`;function hn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return y(As(()=>e.each,e.children,t||void 0))}function Iu(e){const t="fallback"in e&&{fallback:()=>e.fallback};return y(Ds(()=>e.each,e.children,t||void 0))}function X(e){const t=e.keyed,n=y(()=>e.when,void 0,void 0),i=t?n:y(n,void 0,{equals:(l,r)=>!l==!r});return y(()=>{const l=i();if(l){const r=e.children;return typeof r=="function"&&r.length>0?_e(()=>r(t?l:()=>{if(!_e(i))throw Ql("Show");return n()})):r}return e.fallback},void 0,void 0)}function Fu(e){const t=Kl(()=>e.children),n=y(()=>{const i=t(),l=Array.isArray(i)?i:[i];let r=()=>{};for(let s=0;s<l.length;s++){const o=s,d=l[s],f=r,u=y(()=>f()?void 0:d.when,void 0,void 0),a=d.keyed?u:y(u,void 0,{equals:(b,c)=>!b==!c});r=()=>f()||(a()?[o,u,d]:void 0)}return r});return y(()=>{const i=n()();if(!i)return e.fallback;const[l,r,s]=i,o=s.children;return typeof o=="function"&&o.length>0?_e(()=>o(s.keyed?r():()=>{var f;if(((f=_e(n)())==null?void 0:f[0])!==l)throw Ql("Match");return r()})):o},void 0,void 0)}function Nu(e){return e}let Ln;function ku(e){let t;V.context&&V.load&&(t=V.load(V.getContextId()));const[n,i]=z(t,void 0);return Ln||(Ln=new Set),Ln.add(i),se(()=>Ln.delete(i)),y(()=>{let l;if(l=n()){const r=e.fallback;return typeof r=="function"&&r.length?_e(()=>r(l,()=>i())):r}return Ss(()=>e.children,i)},void 0,void 0)}const Os=Xn();function Cu(e){let t=0,n,i,l,r,s;const[o,d]=z(!1),f=ks(),u={increment:()=>{++t===1&&d(!0)},decrement:()=>{--t===0&&d(!1)},inFallback:o,effects:[],resolved:!1},a=Is();if(V.context&&V.load){const _=V.getContextId();let w=V.load(_);if(w&&(typeof w!="object"||w.s!==1?l=w:V.gather(_)),l&&l!=="$$f"){const[m,v]=z(void 0,{equals:!1});r=m,l.then(()=>{if(V.done)return v();V.gather(_),Ve(i),v(),Ve()},h=>{s=h,v()})}}const b=bn(Os);b&&(n=b.register(u.inFallback));let c;return se(()=>c&&c()),k(f.Provider,{value:u,get children(){return y(()=>{if(s)throw s;if(i=V.context,r)return r(),r=void 0;i&&l==="$$f"&&Ve();const _=y(()=>e.children);return y(w=>{const m=u.inFallback(),{showContent:v=!0,showFallback:h=!0}=n?n():{};if((!m||l&&l!=="$$f")&&v)return u.resolved=!0,c&&c(),c=i=l=void 0,Ns(u.effects),_();if(h)return c?w:Dt(L=>(c=L,i&&(Ve({id:i.id+"F",count:0}),i=void 0),e.fallback),a)})})}})}var vl;(function(e){e[e.CRLF=1]="CRLF",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.NEWLINE=4]="NEWLINE",e[e.NORMAL=5]="NORMAL",e[e.NULL=6]="NULL"})(vl||(vl={}));var gl;(function(e){e[e.SplitGitHub=1]="SplitGitHub",e[e.SplitGitLab=2]="SplitGitLab",e[e.Split=3]="Split",e[e.Unified=4]="Unified"})(gl||(gl={}));const Ms=e=>{let t=1;const n={},i=(l,r)=>{l.forEach(s=>{if(s.type==="text"){if(s.value.indexOf(`
2
2
  `)===-1){const d=s.value.length;if(n[t])s.startIndex=n[t].valueLength,s.endIndex=s.startIndex+d-1,n[t].value+=s.value,n[t].valueLength+=d,n[t].nodeList.push({node:s,wrapper:r});else{s.startIndex=0,s.endIndex=d-1;const f={value:s.value,lineNumber:t,valueLength:d,nodeList:[{node:s,wrapper:r}]};n[t]=f}s.lineNumber=t;return}const o=s.value.split(`
3
3
  `);s.children=s.children||[];for(let d=0;d<o.length;d++){const f=d===o.length-1?o[d]:o[d]+`
4
4
  `,u=d===0?t:++t,a=f.length,b={type:"text",value:f,startIndex:1/0,endIndex:1/0,lineNumber:u};if(n[u])b.startIndex=n[u].valueLength,b.endIndex=b.startIndex+a-1,n[u].value+=f,n[u].valueLength+=a,n[u].nodeList.push({node:b,wrapper:r});else{b.startIndex=0,b.endIndex=a-1;const c={value:f,lineNumber:u,valueLength:a,nodeList:[{node:b,wrapper:r}]};n[u]=c}s.children.push(b)}s.lineNumber=t;return}s.children&&(i(s.children,s),s.lineNumber=t)})};return i(e.children),{syntaxFileObject:n,syntaxFileLineNumber:t}},Rt=ms(ws);Rt.register("vue",function(t){return{subLanguage:"xml",contains:[t.COMMENT("<!--","-->",{relevance:10}),{begin:/^(\s*)(<script>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0},{begin:/^(?:\s*)(?:<script\s+lang=(["'])ts\1>)/gm,end:/^(\s*)(<\/script>)/gm,subLanguage:"typescript",excludeBegin:!0,excludeEnd:!0},{begin:/^(\s*)(<style(\s+scoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"css",excludeBegin:!0,excludeEnd:!0},{begin:/^(?:\s*)(?:<style(?:\s+scoped)?\s+lang=(["'])(?:s[ca]ss)\1(?:\s+scoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"scss",excludeBegin:!0,excludeEnd:!0},{begin:/^(?:\s*)(?:<style(?:\s+scoped)?\s+lang=(["'])stylus\1(?:\s+scoped)?>)/gm,end:/^(\s*)(<\/style>)/gm,subLanguage:"stylus",excludeBegin:!0,excludeEnd:!0}]}});const Oe={name:"lowlight"};let Jl=2e3;const _i=[];Object.defineProperty(Oe,"maxLineToIgnoreSyntax",{get:()=>Jl});Object.defineProperty(Oe,"setMaxLineToIgnoreSyntax",{value:e=>{Jl=e}});Object.defineProperty(Oe,"ignoreSyntaxHighlightList",{get:()=>_i});Object.defineProperty(Oe,"setIgnoreSyntaxHighlightList",{value:e=>{_i.length=0,_i.push(...e)}});Object.defineProperty(Oe,"getAST",{value:(e,t,n)=>{let i=!0;if(Rt.registered(n)||(i=!1),!(t&&Nn.ignoreSyntaxHighlightList.some(l=>l instanceof RegExp?l.test(t):t===l)))return i?Rt.highlight(n,e):Rt.highlightAuto(e)}});Object.defineProperty(Oe,"processAST",{value:e=>Ms(e)});Object.defineProperty(Oe,"hasRegisteredCurrentLang",{value:e=>Rt.registered(e)});Object.defineProperty(Oe,"getHighlighterEngine",{value:()=>Rt});Object.defineProperty(Oe,"type",{value:"class"});const Nn=Oe;var kt;(function(e){e.None="None",e.Up="Up",e.Down="Down",e.Both="Both",e.Short="Short"})(kt||(kt={}));class Ps{constructor(t,n,i,l,r){this.header=t,this.lines=n,this.unifiedDiffStart=i,this.unifiedDiffEnd=l,this.expansionType=r}equals(t){return this===t?!0:this.header.equals(t.header)&&this.unifiedDiffStart===t.unifiedDiffStart&&this.unifiedDiffEnd===t.unifiedDiffEnd&&this.expansionType===t.expansionType&&this.lines.length===t.lines.length&&this.lines.every((n,i)=>n.equals(t.lines[i]))}}class js{constructor(t,n,i,l){this.oldStartLine=t,this.oldLineCount=n,this.newStartLine=i,this.newLineCount=l}toDiffLineRepresentation(){return`@@ -${this.oldStartLine},${this.oldLineCount} +${this.newStartLine},${this.newLineCount} @@`}equals(t){return this.oldStartLine===t.oldStartLine&&this.oldLineCount===t.oldLineCount&&this.newStartLine===t.newStartLine&&this.oldStartLine===t.oldStartLine}}const er="--diff-add-content-highlight--",tr="--diff-del-content-highlight--";var oe;(function(e){e[e.CRLF=1]="CRLF",e[e.CR=2]="CR",e[e.LF=3]="LF",e[e.NEWLINE=4]="NEWLINE",e[e.NORMAL=5]="NORMAL",e[e.NULL=6]="NULL"})(oe||(oe={}));const nr=e=>{switch(e){case oe.LF:return"␊";case oe.CR:return"␍";case oe.CRLF:return"␍␊";default:return""}};var bl;(function(e){e[e.SplitGitHub=1]="SplitGitHub",e[e.SplitGitLab=2]="SplitGitLab",e[e.Split=3]="Split",e[e.Unified=4]="Unified"})(bl||(bl={}));let Us=1e3;function _l(e){return e.location+e.length}function xl(e,t,n,i,l){const r=Math.min(t.length,i.length),s=l?_l(t)-1:t.location,o=l?_l(i)-1:i.location,d=l?-1:1;let f=0;for(;Math.abs(f)<r&&e[s+f]===n[o+f];)f+=d;return Math.abs(f)}function ml(e){return e.trim().length===0||e.length>=Us}function Bs(e,t){const n=e.text,i=t.text,l=n.slice(-2),r=i.slice(-2),s=l===`\r
@@ -1 +1 @@
1
- import{l as i,ap as f}from"./monaco-viewer-BbohfXZk.js";import"./git-diff-vendor-CSgooKT_.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";var o;(function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"})(o||(o={}));class d{static at(t,e=!1,a=!1){return{at:{date:t,repeating:e,allowWhileIdle:a},interval:void 0,every:void 0}}static interval(t,e=!1){return{at:void 0,interval:{interval:t,allowWhileIdle:e},every:void 0}}static every(t,e,a=!1){return{at:void 0,interval:void 0,every:{interval:t,count:e,allowWhileIdle:a}}}}var c;(function(n){n[n.None=0]="None",n[n.Min=1]="Min",n[n.Low=2]="Low",n[n.Default=3]="Default",n[n.High=4]="High"})(c||(c={}));var r;(function(n){n[n.Secret=-1]="Secret",n[n.Private=0]="Private",n[n.Public=1]="Public"})(r||(r={}));async function g(){return window.Notification.permission!=="default"?await Promise.resolve(window.Notification.permission==="granted"):await i("plugin:notification|is_permission_granted")}async function v(){return await window.Notification.requestPermission()}function p(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}async function y(n){await i("plugin:notification|register_action_types",{types:n})}async function m(){return await i("plugin:notification|get_pending")}async function P(n){await i("plugin:notification|cancel",{notifications:n})}async function _(){await i("plugin:notification|cancel")}async function N(){return await i("plugin:notification|get_active")}async function h(n){await i("plugin:notification|remove_active",{notifications:n})}async function A(){await i("plugin:notification|remove_active")}async function k(n){await i("plugin:notification|create_channel",{...n})}async function M(n){await i("plugin:notification|delete_channel",{id:n})}async function C(){return await i("plugin:notification|listChannels")}async function D(n){return await f("notification","notification",n)}async function H(n){return await f("notification","actionPerformed",n)}export{c as Importance,d as Schedule,o as ScheduleEvery,r as Visibility,N as active,P as cancel,_ as cancelAll,C as channels,k as createChannel,g as isPermissionGranted,H as onAction,D as onNotificationReceived,m as pending,y as registerActionTypes,h as removeActive,A as removeAllActive,M as removeChannel,v as requestPermission,p as sendNotification};
1
+ import{l as i,av as f}from"./monaco-viewer-NKl8kwH2.js";import"./git-diff-vendor-CYS3ApzA.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";var o;(function(n){n.Year="year",n.Month="month",n.TwoWeeks="twoWeeks",n.Week="week",n.Day="day",n.Hour="hour",n.Minute="minute",n.Second="second"})(o||(o={}));class d{static at(t,e=!1,a=!1){return{at:{date:t,repeating:e,allowWhileIdle:a},interval:void 0,every:void 0}}static interval(t,e=!1){return{at:void 0,interval:{interval:t,allowWhileIdle:e},every:void 0}}static every(t,e,a=!1){return{at:void 0,interval:void 0,every:{interval:t,count:e,allowWhileIdle:a}}}}var c;(function(n){n[n.None=0]="None",n[n.Min=1]="Min",n[n.Low=2]="Low",n[n.Default=3]="Default",n[n.High=4]="High"})(c||(c={}));var r;(function(n){n[n.Secret=-1]="Secret",n[n.Private=0]="Private",n[n.Public=1]="Public"})(r||(r={}));async function g(){return window.Notification.permission!=="default"?await Promise.resolve(window.Notification.permission==="granted"):await i("plugin:notification|is_permission_granted")}async function v(){return await window.Notification.requestPermission()}function y(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}async function p(n){await i("plugin:notification|register_action_types",{types:n})}async function m(){return await i("plugin:notification|get_pending")}async function P(n){await i("plugin:notification|cancel",{notifications:n})}async function _(){await i("plugin:notification|cancel")}async function N(){return await i("plugin:notification|get_active")}async function h(n){await i("plugin:notification|remove_active",{notifications:n})}async function A(){await i("plugin:notification|remove_active")}async function k(n){await i("plugin:notification|create_channel",{...n})}async function M(n){await i("plugin:notification|delete_channel",{id:n})}async function C(){return await i("plugin:notification|listChannels")}async function D(n){return await f("notification","notification",n)}async function H(n){return await f("notification","actionPerformed",n)}export{c as Importance,d as Schedule,o as ScheduleEvery,r as Visibility,N as active,P as cancel,_ as cancelAll,C as channels,k as createChannel,g as isPermissionGranted,H as onAction,D as onNotificationReceived,m as pending,p as registerActionTypes,h as removeActive,A as removeAllActive,M as removeChannel,v as requestPermission,y as sendNotification};