@thxgg/steward 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{D6aZT905.js → 6tINjQEd.js} +1 -1
- package/.output/public/_nuxt/B2mIQf5X.js +3 -0
- package/.output/public/_nuxt/{a87LfEfa.js → BRQ9Cxaw.js} +1 -1
- package/.output/public/_nuxt/{D9fz0wy8.js → BTmXUZ_s.js} +1 -1
- package/.output/public/_nuxt/{Dn6yoG20.js → Bc2V3wPK.js} +2 -2
- package/.output/public/_nuxt/{BTHAQvnA.js → BknRrWsw.js} +1 -1
- package/.output/public/_nuxt/{DSqaInP-.js → C0BBSDJ7.js} +1 -1
- package/.output/public/_nuxt/{B7kcsnX1.js → C53_p0K1.js} +1 -1
- package/.output/public/_nuxt/{C2LWefrW.js → C73kduX-.js} +1 -1
- package/.output/public/_nuxt/CN46Bgts.js +1 -0
- package/.output/public/_nuxt/{CzCDTesu.js → CTJgb0zb.js} +1 -1
- package/.output/public/_nuxt/Cce168lk.js +30 -0
- package/.output/public/_nuxt/CyVSeLw5.js +1 -0
- package/.output/public/_nuxt/T11EuTtn.js +1 -0
- package/.output/public/_nuxt/{ClxxfTZn.js → U78rMDmo.js} +1 -1
- package/.output/public/_nuxt/{CV5HFGKm.js → ZNypZshD.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/bd99c09c-d991-4bcb-8c66-ab2088e1da03.json +1 -0
- package/.output/public/_nuxt/entry.Bw0CE6Iz.css +1 -0
- package/.output/public/_nuxt/{DDV2bymk.js → pYJYAY-W.js} +3 -3
- package/.output/server/chunks/_/watcher.mjs +6 -1
- package/.output/server/chunks/_/watcher.mjs.map +1 -1
- package/.output/server/chunks/build/{Detail-B7yBNjgp.mjs → Detail-DMMUwTWr.mjs} +11 -11
- package/.output/server/chunks/build/Detail-DMMUwTWr.mjs.map +1 -0
- package/.output/server/chunks/build/{_prd_-DY25apyl.mjs → _prd_-ByugK4Yi.mjs} +3 -2
- package/.output/server/chunks/build/_prd_-ByugK4Yi.mjs.map +1 -0
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/nuxt-link-SvT1nf8Z.mjs +1 -1
- package/.output/server/chunks/build/{repo-graph-CUcJKW1F.mjs → repo-graph-DzT45gSB.mjs} +2 -2
- package/.output/server/chunks/build/repo-graph-DzT45gSB.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +3 -3
- package/.output/server/chunks/build/usePrd-hXZOmvAv.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +795 -686
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/index.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/dist/server/utils/change-events.js +117 -0
- package/package.json +1 -1
- package/.output/public/_nuxt/B3PShd4B.js +0 -3
- package/.output/public/_nuxt/B9j1BHt9.js +0 -1
- package/.output/public/_nuxt/BGSfDLaX.js +0 -1
- package/.output/public/_nuxt/DK5VWQk7.js +0 -1
- package/.output/public/_nuxt/builds/meta/c98d132b-2ccd-4cf3-88e6-4f203447e539.json +0 -1
- package/.output/public/_nuxt/entry.Dp3jx0Yw.css +0 -1
- package/.output/public/_nuxt/zhOijcjw.js +0 -30
- package/.output/server/chunks/build/Detail-B7yBNjgp.mjs.map +0 -1
- package/.output/server/chunks/build/_prd_-DY25apyl.mjs.map +0 -1
- package/.output/server/chunks/build/repo-graph-CUcJKW1F.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as I,h as T,S as p}from"./CN46Bgts.js";import{s as m,q as v,i as C,g as d,N,a4 as x,$ as A,k as y,_ as O}from"./Bc2V3wPK.js";import{r as E}from"./B2mIQf5X.js";const k=I("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);function w(){const e=v(),t=m(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:T(e));return{primitiveElement:e,currentElement:t}}const g="data-reka-collection-item";function D(e={}){const{key:t="",isProvider:i=!1}=e,r=`${t}CollectionProvider`;let o;if(i){const a=v(new Map);o={collectionRef:v(),itemMap:a},O(r,o)}else o=C(r);const h=(a=!1)=>{const s=o.collectionRef.value;if(!s)return[];const l=Array.from(s.querySelectorAll(`[${g}]`)),n=Array.from(o.itemMap.value.values()).sort((c,f)=>l.indexOf(c.ref)-l.indexOf(f.ref));return a?n:n.filter(c=>c.ref.dataset.disabled!=="")},_=d({name:"CollectionSlot",inheritAttrs:!1,setup(a,{slots:s,attrs:l}){const{primitiveElement:u,currentElement:n}=w();return y(n,()=>{o.collectionRef.value=n.value}),()=>A(p,{ref:u,...l},s)}}),M=d({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(a,{slots:s,attrs:l}){const{primitiveElement:u,currentElement:n}=w();return N(c=>{if(n.value){const f=x(n.value);o.itemMap.value.set(f,{ref:n.value,value:a.value}),c(()=>o.itemMap.value.delete(f))}}),()=>A(p,{...l,[g]:"",ref:u},s)}}),R=m(()=>Array.from(o.itemMap.value.values())),S=m(()=>o.itemMap.value.size);return{getItems:h,reactiveItems:R,itemMapSize:S,CollectionSlot:_,CollectionItem:M}}const $="rovingFocusGroup.onEntryFocus",q={bubbles:!1,cancelable:!0},P={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function U(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function z(e,t,i){const r=U(e.key,i);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return P[r]}function K(e,t=!1){const i=E();for(const r of e)if(r===i||(r.focus({preventScroll:t}),E()!==i))return}function V(e,t){return e.map((i,r)=>e[(t+r)%e.length])}export{k as A,$ as E,q as a,w as b,K as f,z as g,D as u,V as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as B,l as e,a0 as Dt,g as E,k as pe,o as u,x as _,L as q,c as S,n as F,F as se,r as le,v as ot,B as ye,w as c,y as V,q as C,b as p,G as _e,p as $e,ac as Pt,z as ie,A as fe,ad as Tt,ae as Le,a as d,H as oe,t as O,d as G,E as It,af as Ot,j as nt,M as Ke,ag as Mt,ah as Vt,m as Ce,J as Ae,K as Be,a1 as Lt,aa as Fe,ai as lt,ab as Ft,_ as qt,aj as zt,ak as jt}from"./Bc2V3wPK.js";import{c as me,m as qe,h as Kt,f as rt,d as Ue,P as re,g as Oe,l as Ut,B as ce,u as De,o as Ht,b as it,r as te,e as W,a as He,F as ze,n as Nt}from"./CN46Bgts.js";import{r as Gt,V as Wt,u as Qt,c as be,a as Pe,b as Ne,s as Jt,L as ut,f as Xt,g as Yt,q as dt,h as Zt,p as ea,o as ta,j as aa,k as sa,l as oa,m as na,d as ve,S as la,G as ct,C as ra,R as pt,B as Ze,t as ia,v as Ge,w as ft,x as mt,y as vt,X as ht,e as Te,z as ua,A as da,E as ca,i as pa,K as fa}from"./B2mIQf5X.js";import{F as ma,I as va,a as je}from"./C0BBSDJ7.js";import{b as We,u as Qe,g as ha,A as ga}from"./CyVSeLw5.js";import{_ as ya}from"./CTJgb0zb.js";const _a=me("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);const ba=me("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const gt=me("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const yt=me("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);const xa=me("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const _t=me("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const wa=me("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);function ka(s,t,a){const n=s.findIndex(r=>qe(r,t)),l=s.findIndex(r=>qe(r,a));if(n===-1||l===-1)return[];const[i,o]=[n,l].sort((r,f)=>r-f);return s.slice(i,o+1)}function Ca(s){const t=B(()=>e(s)),a=B(()=>new Intl.Collator("en",{usage:"search",...t.value}));return{startsWith:(o,r)=>r.length===0?!0:(o=o.normalize("NFC"),r=r.normalize("NFC"),a.value.compare(o.slice(0,r.length),r)===0),endsWith:(o,r)=>r.length===0?!0:(o=o.normalize("NFC"),r=r.normalize("NFC"),a.value.compare(o.slice(-r.length),r)===0),contains:(o,r)=>{if(r.length===0)return!0;o=o.normalize("NFC"),r=r.normalize("NFC");let f=0;const h=r.length;for(;f+h<=o.length;f++){const b=o.slice(f,f+h);if(a.value.compare(r,b)===0)return!0}return!1}}}function bt(s){return B(()=>Dt(s)?!!Kt(s)?.closest("form"):!0)}function Sa(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}function $a(s){const t=rt("",1e3);return{search:t,handleTypeaheadSearch:(l,i)=>{t.value=t.value+l;{const o=Gt(),r=i.map(v=>({...v,textValue:v.value?.textValue??v.ref.textContent?.trim()??""})),f=r.find(v=>v.ref===o),h=r.map(v=>v.textValue),b=Ea(h,t.value,f?.textValue),m=r.find(v=>v.textValue===b);return m&&m.ref.focus(),m?.ref}},resetTypeahead:()=>{t.value=""}}}function Ra(s,t){return s.map((a,n)=>s[(t+n)%s.length])}function Ea(s,t,a){const l=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,i=a?s.indexOf(a):-1;let o=Ra(s,Math.max(i,0));l.length===1&&(o=o.filter(h=>h!==a));const f=o.find(h=>h.toLowerCase().startsWith(l.toLowerCase()));return f!==a?f:void 0}var Aa=E({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(s){const t=s,{primitiveElement:a,currentElement:n}=We(),l=B(()=>t.checked??t.value);return pe(l,(i,o)=>{if(!n.value)return;const r=n.value,f=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(f,"value").set;if(b&&i!==o){const m=new Event("input",{bubbles:!0}),v=new Event("change",{bubbles:!0});b.call(r,i),r.dispatchEvent(m),r.dispatchEvent(v)}}),(i,o)=>(u(),_(Wt,q({ref_key:"primitiveElement",ref:a},{...t,...i.$attrs},{as:"input"}),null,16))}}),et=Aa,Ba=E({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(s){const t=s,a=B(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=B(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((l,i)=>typeof l=="object"?Object.entries(l).map(([o,r])=>({name:`${t.name}[${i}][${o}]`,value:r})):{name:`${t.name}[${i}]`,value:l}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([l,i])=>({name:`${t.name}[${l}]`,value:i})):[]);return(l,i)=>(u(),S(se,null,[F(" We render single input if it's required "),a.value?(u(),_(et,q({key:l.name},{...t,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(u(!0),S(se,{key:1},le(n.value,o=>(u(),_(et,q({key:o.name},{ref_for:!0},{...t,...l.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),xt=Ba;function Da(s,t,a){return s===void 0?!1:Array.isArray(s)?s.some(n=>Se(n,t,a)):Se(s,t,a)}function Se(s,t,a){return s===void 0||t===void 0?!1:typeof s=="string"?s===t:typeof a=="function"?a(s,t):typeof a=="string"?s?.[a]===t?.[a]:qe(s,t)}const[Je,Pa]=be("ListboxRoot");var Ta=E({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(s,{expose:t,emit:a}){const n=s,l=a,{multiple:i,highlightOnHover:o,orientation:r,disabled:f,selectionBehavior:h,dir:b}=ot(n),{getItems:m}=Qe({isProvider:!0}),{handleTypeaheadSearch:v}=$a(),{primitiveElement:k,currentElement:g}=We(),P=Sa(),J=Qt(b),Z=bt(g),j=C(),w=C(!1),$=C(!0),A=Ue(n,"modelValue",l,{defaultValue:n.defaultValue??(i.value?[]:void 0),passive:n.modelValue===void 0,deep:!0});function X(y){if(w.value=!0,n.multiple){const R=Array.isArray(A.value)?[...A.value]:[],D=R.findIndex(H=>Se(H,y,n.by));n.selectionBehavior==="toggle"?(D===-1?R.push(y):R.splice(D,1),A.value=R):(A.value=[y],j.value=y)}else n.selectionBehavior==="toggle"&&Se(A.value,y,n.by)?A.value=void 0:A.value=y;setTimeout(()=>{w.value=!1},1)}const M=C(null),ee=C(null),Q=C(!1),ue=C(!1),he=Oe(),ae=Oe(),N=Oe();function Y(){return m().map(y=>y.ref).filter(y=>y.dataset.disabled!=="")}function K(y,R=!0){if(!y)return;M.value=y,$.value&&M.value.focus(),R&&M.value.scrollIntoView({block:"nearest"});const D=m().find(H=>H.ref===y);l("highlight",D)}function ne(y){if(Q.value)N.trigger(y);else{const R=m().find(D=>Se(D.value,y,n.by));R&&(M.value=R.ref,K(R.ref))}}function T(y){M.value&&M.value.isConnected&&(y.preventDefault(),y.stopPropagation(),ue.value||M.value.click())}function z(y){if($.value){if(w.value=!0,Q.value)ae.trigger(y);else{const R=y.altKey||y.ctrlKey||y.metaKey;if(R&&y.key==="a"&&i.value){const D=m(),H=D.map(ge=>ge.value);A.value=[...H],y.preventDefault(),K(D[D.length-1].ref)}else if(!R){const D=v(y.key,m());D&&K(D)}}setTimeout(()=>{w.value=!1},1)}}function U(){ue.value=!0}function I(){ye(()=>{ue.value=!1})}function x(){ye(()=>{const y=new KeyboardEvent("keydown",{key:"PageUp"});Xe(y)})}function L(y){const R=M.value;R?.isConnected&&(ee.value=R),M.value=null,l("leave",y)}function xe(y){const R=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(y.currentTarget?.dispatchEvent(R),l("entryFocus",R),!R.defaultPrevented)if(ee.value)K(ee.value);else{const D=Y()?.[0];K(D)}}function Xe(y){const R=ha(y,r.value,J.value);if(!R)return;let D=Y();if(M.value){if(R==="last")D.reverse();else if(R==="prev"||R==="next"){R==="prev"&&D.reverse();const H=D.indexOf(M.value);D=D.slice(H+1)}At(y,D[0])}if(D.length){const H=!M.value&&R==="prev"?D.length-1:0;K(D[H])}if(Q.value)return ae.trigger(y)}function At(y,R){if(!(Q.value||n.selectionBehavior!=="replace"||!i.value||!Array.isArray(A.value)||(y.altKey||y.ctrlKey||y.metaKey)&&!y.shiftKey)&&y.shiftKey){const H=m().filter(we=>we.ref.dataset.disabled!=="");let ge=H.find(we=>we.ref===R)?.value;if(y.key===P.END?ge=H[H.length-1].value:y.key===P.HOME&&(ge=H[0].value),!ge||!j.value)return;const Bt=ka(H.map(we=>we.value),j.value,ge);A.value=Bt}}async function Ye(y){if(await ye(),Q.value)he.trigger(y);else{const R=Y(),D=R.find(H=>H.dataset.state==="checked");D?K(D):R.length&&K(R[0])}}return pe(A,()=>{w.value||ye(()=>{Ye()})},{immediate:!0,deep:!0}),t({highlightedElement:M,highlightItem:ne,highlightFirstItem:x,highlightSelected:Ye,getItems:m}),Pa({modelValue:A,onValueChange:X,multiple:i,orientation:r,dir:J,disabled:f,highlightOnHover:o,highlightedElement:M,isVirtual:Q,virtualFocusHook:he,virtualKeydownHook:ae,virtualHighlightHook:N,by:n.by,firstValue:j,selectionBehavior:h,focusable:$,onLeave:L,onEnter:xe,changeHighlight:K,onKeydownEnter:T,onKeydownNavigation:Xe,onKeydownTypeAhead:z,onCompositionStart:U,onCompositionEnd:I,highlightFirstItem:x}),(y,R)=>(u(),_(e(re),{ref_key:"primitiveElement",ref:k,as:y.as,"as-child":y.asChild,dir:e(J),"data-disabled":e(f)?"":void 0,onPointerleave:L,onFocusout:R[0]||(R[0]=async D=>{const H=D.relatedTarget||D.target;await ye(),M.value&&e(g)&&!e(g).contains(H)&&L(D)})},{default:c(()=>[V(y.$slots,"default",{modelValue:e(A)}),e(Z)&&y.name?(u(),_(e(xt),{key:0,name:y.name,value:e(A),disabled:e(f),required:y.required},null,8,["name","value","disabled","required"])):F("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),Ia=Ta,Oa=E({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const{CollectionSlot:t}=Qe(),a=Je(),n=rt(!1,10);return(l,i)=>(u(),_(e(t),null,{default:c(()=>[p(e(re),{role:"listbox",as:l.as,"as-child":l.asChild,tabindex:e(a).focusable.value?e(a).highlightedElement.value?"-1":"0":"-1","aria-orientation":e(a).orientation.value,"aria-multiselectable":!!e(a).multiple.value,"data-orientation":e(a).orientation.value,onMousedown:i[0]||(i[0]=$e(o=>n.value=!0,["left"])),onFocus:i[1]||(i[1]=o=>{e(n)||e(a).onEnter(o)}),onKeydown:[i[2]||(i[2]=_e(o=>{e(a).orientation.value==="vertical"&&(o.key==="ArrowLeft"||o.key==="ArrowRight")||e(a).orientation.value==="horizontal"&&(o.key==="ArrowUp"||o.key==="ArrowDown")||(o.preventDefault(),e(a).focusable.value&&e(a).onKeydownNavigation(o))},["down","up","left","right","home","end"])),_e(e(a).onKeydownEnter,["enter"]),e(a).onKeydownTypeAhead]},{default:c(()=>[V(l.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),Ma=Oa,Va=E({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(s,{emit:t}){const a=s,l=Ue(a,"modelValue",t,{defaultValue:"",passive:a.modelValue===void 0}),i=Je(),{primitiveElement:o,currentElement:r}=We(),f=B(()=>a.disabled||i.disabled.value||!1),h=C();return Pt(()=>h.value=i.highlightedElement.value?.id),ie(()=>{i.focusable.value=!1,setTimeout(()=>{a.autoFocus&&r.value?.focus()},1)}),fe(()=>{i.focusable.value=!0}),(b,m)=>(u(),_(e(re),{ref_key:"primitiveElement",ref:o,as:b.as,"as-child":b.asChild,value:e(l),disabled:f.value?"":void 0,"data-disabled":f.value?"":void 0,"aria-disabled":f.value??void 0,"aria-activedescendant":h.value,type:"text",onKeydown:[_e($e(e(i).onKeydownNavigation,["prevent"]),["down","up","home","end"]),_e(e(i).onKeydownEnter,["enter"])],onInput:m[0]||(m[0]=v=>{l.value=v.target.value,e(i).highlightFirstItem()}),onCompositionstart:e(i).onCompositionStart,onCompositionend:e(i).onCompositionEnd},{default:c(()=>[V(b.$slots,"default",{modelValue:e(l)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onKeydown","onCompositionstart","onCompositionend"]))}}),La=Va;const[Fa,qa]=be("ListboxGroup");var za=E({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const t=s,a=Pe(void 0,"reka-listbox-group");return qa({id:a}),(n,l)=>(u(),_(e(re),q({role:"group"},t,{"aria-labelledby":e(a)}),{default:c(()=>[V(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),ja=za,Ka=E({__name:"ListboxGroupLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(s){const t=s,a=Fa({id:""});return(n,l)=>(u(),_(e(re),q(t,{id:e(a).id}),{default:c(()=>[V(n.$slots,"default")]),_:3},16,["id"]))}}),Ua=Ka;const Ha="listbox.select",[An,Na]=be("ListboxItem");var Ga=E({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(s,{emit:t}){const a=s,n=t,l=Pe(void 0,"reka-listbox-item"),{CollectionItem:i}=Qe(),{forwardRef:o,currentElement:r}=Ne(),f=Je(),h=B(()=>r.value===f.highlightedElement.value),b=B(()=>Da(f.modelValue.value,a.value,f.by)),m=B(()=>f.disabled.value||a.disabled);async function v(g){n("select",g),!g?.defaultPrevented&&!m.value&&g&&(f.onValueChange(a.value),f.changeHighlight(r.value))}function k(g){const P={originalEvent:g,value:a.value};Jt(Ha,v,P)}return Na({isSelected:b}),(g,P)=>(u(),_(e(i),{value:g.value},{default:c(()=>[Tt([h.value,b.value],()=>p(e(re),q({id:e(l)},g.$attrs,{ref:e(o),role:"option",tabindex:e(f).focusable.value?h.value?"0":"-1":-1,"aria-selected":b.value,as:g.as,"as-child":g.asChild,disabled:m.value?"":void 0,"data-disabled":m.value?"":void 0,"data-highlighted":h.value?"":void 0,"data-state":b.value?"checked":"unchecked",onClick:k,onKeydown:_e($e(k,["prevent"]),["space"]),onPointermove:P[0]||(P[0]=()=>{e(f).highlightedElement.value!==e(r)&&e(f).highlightOnHover.value&&!e(f).focusable.value&&e(f).changeHighlight(e(r),!1)})}),{default:c(()=>[V(g.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),P,1)]),_:3},8,["value"]))}}),Wa=Ga;const[Qa,Ja]=be("SwitchRoot");var Xa=E({__name:"SwitchRoot",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(s,{emit:t}){const a=s,n=t,{disabled:l}=ot(a),i=Ue(a,"modelValue",n,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function o(){l.value||(i.value=!i.value)}const{forwardRef:r,currentElement:f}=Ne(),h=bt(f),b=B(()=>a.id&&f.value?document.querySelector(`[for="${a.id}"]`)?.innerText:void 0);return Ja({modelValue:i,toggleCheck:o,disabled:l}),(m,v)=>(u(),_(e(re),q(m.$attrs,{id:m.id,ref:e(r),role:"switch",type:m.as==="button"?"button":void 0,value:m.value,"aria-label":m.$attrs["aria-label"]||b.value,"aria-checked":e(i),"aria-required":m.required,"data-state":e(i)?"checked":"unchecked","data-disabled":e(l)?"":void 0,"as-child":m.asChild,as:m.as,disabled:e(l),onClick:o,onKeydown:_e($e(o,["prevent"]),["enter"])}),{default:c(()=>[V(m.$slots,"default",{modelValue:e(i)}),e(h)&&m.name?(u(),_(e(xt),{key:0,type:"checkbox",name:m.name,disabled:e(l),required:m.required,value:m.value,checked:!!e(i)},null,8,["name","disabled","required","value","checked"])):F("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),Ya=Xa,Za=E({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const t=Qa();return Ne(),(a,n)=>(u(),_(e(re),{"data-state":e(t).modelValue?.value?"checked":"unchecked","data-disabled":e(t).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:c(()=>[V(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"]))}}),es=Za;const wt=globalThis.setInterval,ts=700,as={state:"idle",version:"progress-json-v2",startedAt:null,completedAt:null,totalRows:0,processedRows:0,migratedRows:0,failedRows:0,currentSlug:null,errorMessage:null,percent:0};let ke=null,Me=!1,Re=0;function ss(){const s=Le("state-migration:status",()=>({...as})),t=Le("state-migration:initialized",()=>!1),a=B(()=>s.value.state==="running"||s.value.state==="failed");async function n(){if(!Me){Me=!0;try{const o=await $fetch("/api/state-migration/status",{query:{_:Date.now()}});s.value=o,t.value=!0,o.state==="completed"&&i()}catch{t.value=!0}finally{Me=!1}}}function l(){ke||(ke=wt(()=>{n()},ts))}function i(){ke&&(clearInterval(ke),ke=null)}return ie(()=>{Re+=1,n(),l()}),fe(()=>{Re=Math.max(0,Re-1),Re===0&&i()}),{status:s,initialized:t,isBlocking:a,refreshStatus:n}}const os={key:0,class:"fixed inset-0 z-[110] flex items-center justify-center bg-[radial-gradient(circle_at_18%_20%,oklch(0.92_0.03_218_/_0.65),transparent_52%),radial-gradient(circle_at_82%_80%,oklch(0.95_0.04_40_/_0.5),transparent_46%),oklch(0.17_0.02_240_/_0.72)] px-4 backdrop-blur-sm",role:"alert","aria-live":"assertive","aria-busy":"true"},ns={class:"w-full max-w-xl rounded-2xl border border-border/70 bg-background/95 p-6 shadow-2xl md:p-7"},ls={class:"mb-4 flex items-start gap-3"},rs={class:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-border bg-muted/60"},is={class:"space-y-1"},us={class:"text-xl font-semibold tracking-tight"},ds={class:"space-y-3 rounded-xl border border-border/80 bg-card/70 p-4"},cs={class:"flex items-center justify-between gap-3 text-sm"},ps={class:"inline-flex items-center gap-1.5 text-muted-foreground"},fs={class:"font-medium tabular-nums"},ms={class:"h-2 overflow-hidden rounded-full border border-border/70 bg-muted/60"},vs={class:"text-sm text-muted-foreground"},hs={key:0,class:"mt-4 flex items-center justify-end"},gs=E({__name:"StateMigrationOverlay",setup(s){const{status:t,initialized:a,isBlocking:n,refreshStatus:l}=ss(),i=Ut("(prefers-reduced-motion: reduce)"),o=B(()=>Math.max(0,Math.min(100,t.value.percent))),r=B(()=>`${o.value}%`),f=B(()=>{const m=t.value.totalRows,v=t.value.processedRows;return m<=0?"Preparing migration...":`${v} of ${m} PRD states migrated`}),h=B(()=>t.value.state==="failed"?t.value.errorMessage||"Migration failed before completion.":t.value.currentSlug?`Migrating ${t.value.currentSlug}`:"Preparing migration steps"),b=B(()=>a.value&&n.value);return(m,v)=>(u(),_(Ot,{"enter-active-class":"transition-all duration-300 ease-[var(--ease-out-cubic)] motion-reduce:transition-none","enter-from-class":"opacity-0 scale-[0.98]","leave-active-class":"transition-all duration-200 ease-[var(--ease-out-cubic)] motion-reduce:transition-none","leave-to-class":"opacity-0"},{default:c(()=>[e(b)?(u(),S("div",os,[d("div",ns,[d("div",ls,[d("div",rs,[e(t).state==="running"?(u(),_(e(ut),{key:0,class:oe(["size-5 text-primary",e(i)?"":"animate-spin"])},null,8,["class"])):(u(),_(e(Xt),{key:1,class:"size-5 text-destructive"}))]),d("div",is,[v[0]||(v[0]=d("p",{class:"text-sm font-semibold uppercase tracking-[0.09em] text-muted-foreground"},"Data upgrade",-1)),d("h2",us,O(e(t).state==="running"?"One-time migration in progress":"Migration needs attention"),1),v[1]||(v[1]=d("p",{class:"text-sm text-muted-foreground"}," Steward is upgrading legacy PRD progress data to the latest format. This runs once per local database. ",-1))])]),d("div",ds,[d("div",cs,[d("span",ps,[p(e(ba),{class:"size-3.5"}),G(" "+O(e(f)),1)]),d("span",fs,O(e(o))+"%",1)]),d("div",ms,[d("div",{class:oe(["migration-progress-fill h-full rounded-full motion-reduce:transition-none",e(i)?"":"migration-progress-fill--animated"]),style:It({width:e(r)})},null,6)]),d("p",vs,O(e(h)),1)]),e(t).state==="failed"?(u(),S("div",hs,[p(e(ce),{size:"sm",variant:"outline",onClick:e(l)},{default:c(()=>[...v[2]||(v[2]=[G(" Retry status check ",-1)])]),_:1},8,["onClick"])])):F("",!0)])])):F("",!0)]),_:1}))}}),ys=Object.assign(gs,{__name:"LayoutStateMigrationOverlay"}),_s={class:"flex items-center gap-2 truncate"},bs={class:"truncate"},xs={key:0,class:"absolute top-full right-0 z-[9999] mt-1 w-[280px] rounded-md border bg-popover p-1 text-popover-foreground shadow-md"},ws={class:"max-h-[200px] overflow-y-auto"},ks=["aria-selected","onClick"],Cs={class:"flex flex-1 flex-col gap-0.5 overflow-hidden text-left"},Ss={class:"truncate font-medium"},$s={class:"truncate text-xs text-muted-foreground"},Rs=["onClick"],Es={key:1,class:"px-2 py-1.5 text-sm text-muted-foreground"},As={key:2,class:"my-1 h-px bg-border"},Bs={class:"space-y-2"},Ds={class:"flex gap-2"},Ps={key:0,class:"text-sm text-destructive"},Ts={key:0,class:"space-y-2 rounded-md border p-3"},Is={class:"flex items-center gap-2 text-sm"},Os=["disabled"],Ms={class:"flex-1 truncate font-mono text-xs text-muted-foreground"},Vs={class:"max-h-[200px] overflow-y-auto"},Ls={key:0,class:"py-2 text-center text-sm text-muted-foreground"},Fs={key:1,class:"py-2 text-center text-sm text-muted-foreground"},qs=["onClick"],zs={class:"truncate"},js={key:0},Ks={key:1},Us=E({__name:"RepoSelector",setup(s,{expose:t}){const a=nt(),n=Ke(),{repos:l,currentRepo:i,currentRepoId:o,selectRepo:r,addRepo:f,removeRepo:h}=De(),{showSuccess:b}=it(),m=Le("prd-show-archived",()=>!1),v=C(!1),k=C(""),g=C(null);Ht(g,()=>{v.value&&(v.value=!1,k.value="")}),pe(()=>n.fullPath,()=>{v.value=!1,k.value=""});async function P(I){r(I),v.value=!1,k.value="";try{const x=await J(I);x?a.push(`/${I}/${x}`):a.push("/")}catch{a.push("/")}}async function J(I){return(await $fetch(`/api/repos/${I}/prds`,{query:m.value?{includeArchived:"1"}:void 0}))?.[0]?.slug||null}function Z(){v.value=!1,ae.value=!0}const j=C(!1),w=C(""),$=C(null),A=C([]),X=C(!1),M=B(()=>!!$.value&&$.value!==w.value);async function ee(I){X.value=!0;try{const x=await $fetch("/api/browse",{query:{path:I||w.value||void 0}});w.value=x.current,$.value=x.parent,A.value=x.directories}catch{}finally{X.value=!1}}function Q(){j.value=!0,ee(N.value||void 0)}function ue(I){N.value=I,j.value=!1,Y.value=null}function he(){const I=$.value;!M.value||!I||ee(I)}const ae=C(!1),N=C(""),Y=C(null),K=C(!1),ne=B(()=>{if(!k.value)return l.value;const I=k.value.toLowerCase();return l.value?.filter(x=>x.name.toLowerCase().includes(I)||x.path.toLowerCase().includes(I))??[]});async function T(){if(!N.value.trim()){Y.value="Please enter a repository path";return}K.value=!0,Y.value=null;try{const I=await f(N.value.trim());if(ae.value=!1,N.value="",b("Repository added",I?.name||"Successfully added repository"),I?.id)try{const x=await J(I.id);x&&a.push(`/${I.id}/${x}`)}catch{}}catch(I){if(I instanceof Error){const x=I;Y.value=x.data?.message||I.message}else Y.value="Failed to add repository"}finally{K.value=!1}}async function z(I,x){I.stopPropagation(),await h(x)}function U(){ae.value=!1,N.value="",Y.value=null}return t({openAddDialog:()=>{ae.value=!0}}),(I,x)=>(u(),S("div",{ref_key:"dropdownRef",ref:g,class:"relative"},[d("button",{type:"button",class:"inline-flex h-8 w-[200px] items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm font-normal ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",onClick:x[0]||(x[0]=L=>v.value=!e(v))},[d("span",_s,[p(e(ma),{class:"size-4 shrink-0 text-muted-foreground"}),d("span",bs,O(e(i)?.name??"Select repository"),1)]),p(e(Yt),{class:"size-4 shrink-0 opacity-50"})]),e(v)?(u(),S("div",xs,[Mt(d("input",{"onUpdate:modelValue":x[1]||(x[1]=L=>Ce(k)?k.value=L:null),type:"text",placeholder:"Search repositories...",class:"mb-1 h-9 w-full rounded-md border border-input bg-background px-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"},null,512),[[Vt,e(k)]]),d("div",ws,[e(ne)?.length?(u(!0),S(se,{key:0},le(e(ne),L=>(u(),S("div",{key:L.id,class:"group flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground cursor-pointer",role:"option","aria-selected":e(o)===L.id,onClick:xe=>P(L.id)},[p(e(dt),{class:oe(["size-4 shrink-0",e(o)===L.id?"opacity-100":"opacity-0"])},null,8,["class"]),d("div",Cs,[d("span",Ss,O(L.name),1),d("span",$s,O(L.path),1)]),d("button",{type:"button",class:"ml-auto opacity-0 group-hover:opacity-100 p-1 hover:bg-destructive/10 rounded transition-opacity",title:"Remove repository",onClick:xe=>z(xe,L.id)},[p(e(wa),{class:"size-3.5 text-destructive"})],8,Rs)],8,ks))),128)):(u(),S("div",Es," No repositories found. ")),e(ne)?.length?(u(),S("div",As)):F("",!0),d("button",{type:"button",class:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground",onClick:Z},[p(e(Zt),{class:"size-4"}),x[5]||(x[5]=d("span",null,"Add repository...",-1))])])])):F("",!0),p(e(ea),{open:e(ae),"onUpdate:open":x[4]||(x[4]=L=>ae.value=L)},{default:c(()=>[p(e(ta),{side:"right",class:"flex h-full flex-col",onEscapeKeyDown:U},{default:c(()=>[p(e(aa),{class:"px-6"},{default:c(()=>[p(e(sa),null,{default:c(()=>[...x[6]||(x[6]=[G("Add Repository",-1)])]),_:1}),p(e(oa),null,{default:c(()=>[...x[7]||(x[7]=[G(" Enter the absolute path to a repository containing PRD documents. ",-1)])]),_:1})]),_:1}),d("form",{id:"add-repo-form",class:"min-h-0 flex-1 space-y-4 overflow-y-auto px-6",onSubmit:$e(T,["prevent"])},[d("div",Bs,[x[8]||(x[8]=d("label",{for:"repo-path",class:"text-sm font-medium"}," Repository Path ",-1)),d("div",Ds,[p(e(va),{id:"repo-path",modelValue:e(N),"onUpdate:modelValue":x[2]||(x[2]=L=>Ce(N)?N.value=L:null),placeholder:"/path/to/your/project","aria-invalid":!!e(Y),disabled:e(K),class:"flex-1"},null,8,["modelValue","aria-invalid","disabled"]),p(e(ce),{type:"button",variant:"outline",size:"icon",disabled:e(K),onClick:Q},{default:c(()=>[p(e(je),{class:"size-4"})]),_:1},8,["disabled"])]),e(Y)?(u(),S("p",Ps,O(e(Y)),1)):F("",!0),x[9]||(x[9]=d("p",{class:"text-xs text-muted-foreground"},[G(" The repository should contain a "),d("code",{class:"rounded bg-muted px-1"},"docs/prd/"),G(" directory with markdown files. ")],-1))]),e(j)?(u(),S("div",Ts,[d("div",Is,[d("button",{type:"button",class:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs text-muted-foreground hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-50",disabled:!e(M),onClick:he},[p(e(ga),{class:"size-3"}),x[10]||(x[10]=G(" Up ",-1))],8,Os),d("span",Ms,O(e(w)),1),p(e(ce),{type:"button",variant:"ghost",size:"sm",class:"h-7 text-xs",onClick:x[3]||(x[3]=L=>ue(e(w)))},{default:c(()=>[...x[11]||(x[11]=[G(" Select ",-1)])]),_:1})]),d("div",Vs,[e(X)?(u(),S("div",Ls," Loading... ")):e(A).length?(u(!0),S(se,{key:2},le(e(A),L=>(u(),S("button",{key:L.path,type:"button",class:"flex w-full items-center gap-2 rounded px-2 py-1 text-sm hover:bg-accent",onClick:xe=>ee(L.path)},[p(e(je),{class:"size-4 text-muted-foreground"}),d("span",zs,O(L.name),1)],8,qs))),128)):(u(),S("div",Fs," No subdirectories "))])])):F("",!0)],32),p(e(na),{class:"px-6 pb-6"},{default:c(()=>[p(e(ce),{type:"button",variant:"outline",disabled:e(K),onClick:U},{default:c(()=>[...x[12]||(x[12]=[G(" Cancel ",-1)])]),_:1},8,["disabled"]),p(e(ce),{type:"submit",form:"add-repo-form",disabled:e(K)},{default:c(()=>[e(K)?(u(),S("span",js,"Adding...")):(u(),S("span",Ks,"Add Repository"))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])],512))}}),Hs=Object.assign(Us,{__name:"LayoutRepoSelector"}),Ns=E({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(s,{emit:t}){const a=s,n=t,l=te(a,"class"),i=ve(l,n);return(o,r)=>(u(),_(e(Ya),q({"data-slot":"switch"},e(i),{class:e(W)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-colors duration-150 ease-[var(--ease-out-cubic)] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none",a.class)}),{default:c(f=>[p(e(es),{"data-slot":"switch-thumb",class:oe(e(W)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform duration-150 ease-[var(--ease-in-out-cubic)] will-change-transform motion-reduce:transition-none data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:c(()=>[V(o.$slots,"thumb",Ae(Be(f)))]),_:2},1032,["class"])]),_:3},16,["class"]))}}),Gs=Object.assign(Ns,{__name:"UiSwitch"}),Ws={class:"flex h-full w-64 flex-col border-r border-border bg-background"},Qs={class:"p-2"},Js={class:"flex h-10 items-center justify-between gap-2 px-2"},Xs={class:"flex items-center gap-2 whitespace-nowrap text-xs text-muted-foreground"},Ys={key:1,class:"flex items-center justify-center py-8"},Zs={key:2,class:"px-2 py-8 text-center"},eo={key:3,class:"px-2 py-8 text-center"},to={key:4,class:"px-2 py-8 text-center"},ao={class:"mt-2 text-sm text-muted-foreground"},so={class:"mt-1 text-xs text-muted-foreground/70"},oo={key:5,class:"space-y-1"},no={class:"flex-1 truncate"},lo=E({__name:"Sidebar",setup(s){const t=Ke(),{prds:a,prdsStatus:n,showArchived:l,setShowArchived:i,refreshPrds:o}=He(),{currentRepoId:r}=De(),f=B(()=>t.params.prd);function h(v){return f.value===v}const b=B(()=>r.value?`/${r.value}/repo-graph`:"/"),m=B(()=>r.value?t.path===`/${r.value}/repo-graph`:!1);return(v,k)=>{const g=ya;return u(),S("aside",Ws,[p(e(la),{class:"flex-1"},{default:c(()=>[d("div",Qs,[e(r)?(u(),_(g,{key:0,to:e(b),class:oe(["group mb-2 flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",[e(m)?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"]])},{default:c(()=>[p(e(ct),{class:"size-4 shrink-0"}),k[0]||(k[0]=d("span",{class:"flex-1 truncate"},"Repo Graph",-1))]),_:1},8,["to","class"])):F("",!0),d("div",Js,[k[2]||(k[2]=d("h2",{class:"text-sm font-medium text-muted-foreground"},"Documents",-1)),d("div",Xs,[k[1]||(k[1]=d("span",{id:"sidebar-show-archived-label"},"Show archived",-1)),p(e(Gs),{"model-value":e(l),"aria-labelledby":"sidebar-show-archived-label","onUpdate:modelValue":e(i)},null,8,["model-value","onUpdate:modelValue"])])]),e(n)==="pending"?(u(),S("div",Ys,[p(e(ut),{class:"size-5 animate-spin text-muted-foreground"})])):e(r)?e(n)==="error"?(u(),S("div",eo,[p(e(ra),{class:"mx-auto size-8 text-destructive/50"}),k[5]||(k[5]=d("p",{class:"mt-2 text-sm text-muted-foreground"}," Failed to load PRDs ",-1)),p(e(ce),{variant:"ghost",size:"sm",class:"mt-2",onClick:e(o)},{default:c(()=>[p(e(pt),{class:"mr-1 size-3"}),k[4]||(k[4]=G(" Retry ",-1))]),_:1},8,["onClick"])])):e(a)?.length?(u(),S("nav",oo,[(u(!0),S(se,null,le(e(a),P=>(u(),_(g,{key:P.slug,to:`/${e(r)}/${P.slug}`,class:oe(["group flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors",[h(P.slug)?"bg-accent text-accent-foreground":P.archived?"text-muted-foreground/75 hover:bg-accent/40 hover:text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"]])},{default:c(()=>[p(e(ze),{class:"size-4 shrink-0"}),d("span",no,O(P.name),1),P.archived?(u(),_(e(Ze),{key:0,variant:"outline",class:"shrink-0 text-[10px] uppercase tracking-wide"},{default:c(()=>[...k[6]||(k[6]=[G(" Archived ",-1)])]),_:1})):F("",!0),P.hasState&&P.taskCount?(u(),_(e(Ze),{key:1,variant:"secondary",class:"shrink-0 text-xs"},{default:c(()=>[G(O(P.completedCount??0)+"/"+O(P.taskCount),1)]),_:2},1024)):F("",!0)]),_:2},1032,["to","class"]))),128))])):(u(),S("div",to,[p(e(ze),{class:"mx-auto size-8 text-muted-foreground/50"}),d("p",ao,O(e(l)?"No PRDs found":"No active PRDs found"),1),d("p",so,O(e(l)?"Add .md files to docs/prd/":"Archived PRDs are hidden. Use the archive toggle above."),1)])):(u(),S("div",Zs,[...k[3]||(k[3]=[d("p",{class:"text-sm text-muted-foreground"}," Select a repository to view PRDs ",-1)])]))])]),_:1})])}}}),ro=Object.assign(lo,{__name:"LayoutSidebar"}),io=E({__name:"Command",props:{modelValue:{default:""},defaultValue:{},multiple:{type:Boolean},orientation:{},dir:{},disabled:{type:Boolean},selectionBehavior:{},highlightOnHover:{type:Boolean},by:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{},defaultSearch:{default:""}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(s,{emit:t}){const a=s,n=t,l=te(a,"class"),i=ve(l,n),o=C(new Map),r=C(new Map),{contains:f}=Ca({sensitivity:"base"}),h=Lt({search:a.defaultSearch||"",filtered:{count:0,items:new Map,groups:new Set}});pe(()=>a.defaultSearch,m=>{m!==void 0&&(h.search=m)});function b(){if(!h.search){h.filtered.count=o.value.size;return}h.filtered.groups=new Set;let m=0;for(const[v,k]of o.value){const g=f(k,h.search);h.filtered.items.set(v,g?1:0),g&&m++}for(const[v,k]of r.value)for(const g of k)if(h.filtered.items.get(g)>0){h.filtered.groups.add(v);break}h.filtered.count=m}return pe(()=>h.search,()=>{b()}),pe(()=>o.value.size,()=>{h.search&&b()}),Mo({allItems:o,allGroups:r,filterState:h}),(m,v)=>(u(),_(e(Ia),q({"data-slot":"command"},e(i),{class:e(W)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",a.class)}),{default:c(()=>[V(m.$slots,"default")]),_:3},16,["class"]))}}),uo=Object.assign(io,{__name:"UiCommand"}),co=E({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(s,{emit:t}){const l=ve(s,t);return(i,o)=>(u(),_(e(ia),q({"data-slot":"dialog"},e(l)),{default:c(r=>[V(i.$slots,"default",Ae(Be(r)))]),_:3},16))}}),kt=Object.assign(co,{__name:"UiDialog"}),po=E({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(s){const t=s;return(a,n)=>(u(),_(e(Ge),q({"data-slot":"dialog-close"},t),{default:c(()=>[V(a.$slots,"default")]),_:3},16))}});Object.assign(po,{__name:"UiDialogClose"});const fo=E({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class");return(n,l)=>(u(),_(e(ft),q({"data-slot":"dialog-overlay"},e(a),{class:e(W)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t.class)}),{default:c(()=>[V(n.$slots,"default")]),_:3},16,["class"]))}}),mo=Object.assign(fo,{__name:"UiDialogOverlay"}),vo=E({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},showCloseButton:{type:Boolean,default:!0}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(s,{emit:t}){const a=s,n=t,l=te(a,"class"),i=ve(l,n);return(o,r)=>(u(),_(e(mt),null,{default:c(()=>[p(mo),p(e(vt),q({"data-slot":"dialog-content"},{...o.$attrs,...e(i)},{class:e(W)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a.class)}),{default:c(()=>[V(o.$slots,"default"),s.showCloseButton?(u(),_(e(Ge),{key:0,"data-slot":"dialog-close",class:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},{default:c(()=>[p(e(ht)),r[0]||(r[0]=d("span",{class:"sr-only"},"Close",-1))]),_:1})):F("",!0)]),_:3},16,["class"])]),_:3}))}}),Ct=Object.assign(vo,{__name:"UiDialogContent"}),ho=E({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class"),n=Te(a);return(l,i)=>(u(),_(e(ua),q({"data-slot":"dialog-description"},e(n),{class:e(W)("text-muted-foreground text-sm",t.class)}),{default:c(()=>[V(l.$slots,"default")]),_:3},16,["class"]))}}),St=Object.assign(ho,{__name:"UiDialogDescription"}),go=E({__name:"DialogFooter",props:{class:{}},setup(s){const t=s;return(a,n)=>(u(),S("div",{"data-slot":"dialog-footer",class:oe(e(W)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(a.$slots,"default")],2))}});Object.assign(go,{__name:"UiDialogFooter"});const yo=E({__name:"DialogHeader",props:{class:{}},setup(s){const t=s;return(a,n)=>(u(),S("div",{"data-slot":"dialog-header",class:oe(e(W)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(a.$slots,"default")],2))}}),$t=Object.assign(yo,{__name:"UiDialogHeader"}),_o=E({inheritAttrs:!1,__name:"DialogScrollContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(s,{emit:t}){const a=s,n=t,l=te(a,"class"),i=ve(l,n);return(o,r)=>(u(),_(e(mt),null,{default:c(()=>[p(e(ft),{class:"fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"},{default:c(()=>[p(e(vt),q({class:e(W)("relative z-50 grid w-full max-w-lg my-8 gap-4 border border-border bg-background p-6 shadow-lg duration-200 sm:rounded-lg md:w-full",a.class)},{...o.$attrs,...e(i)},{onPointerDownOutside:r[0]||(r[0]=f=>{const h=f.detail.originalEvent,b=h.target;(h.offsetX>b.clientWidth||h.offsetY>b.clientHeight)&&f.preventDefault()})}),{default:c(()=>[V(o.$slots,"default"),p(e(Ge),{class:"absolute top-4 right-4 p-0.5 transition-colors rounded-md hover:bg-secondary"},{default:c(()=>[p(e(ht),{class:"w-4 h-4"}),r[1]||(r[1]=d("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3})]),_:3}))}});Object.assign(_o,{__name:"UiDialogScrollContent"});const bo=E({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class"),n=Te(a);return(l,i)=>(u(),_(e(da),q({"data-slot":"dialog-title"},e(n),{class:e(W)("text-lg leading-none font-semibold",t.class)}),{default:c(()=>[V(l.$slots,"default")]),_:3},16,["class"]))}}),Rt=Object.assign(bo,{__name:"UiDialogTitle"}),xo=E({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(s){const t=s;return(a,n)=>(u(),_(e(ca),q({"data-slot":"dialog-trigger"},t),{default:c(()=>[V(a.$slots,"default")]),_:3},16))}});Object.assign(xo,{__name:"UiDialogTrigger"});const wo=E({__name:"CommandDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean},title:{default:"Command Palette"},description:{default:"Search for a command to run..."},defaultSearch:{default:""}},emits:["update:open"],setup(s,{emit:t}){const l=ve(s,t);return(i,o)=>(u(),_(e(kt),Ae(Be(e(l))),{default:c(r=>[p(e(Ct),{class:"overflow-hidden p-0","show-close-button":!1},{default:c(()=>[p(e($t),{class:"sr-only"},{default:c(()=>[p(e(Rt),null,{default:c(()=>[G(O(s.title),1)]),_:1}),p(e(St),null,{default:c(()=>[G(O(s.description),1)]),_:1})]),_:1}),p(uo,{"default-search":s.defaultSearch},{default:c(()=>[V(i.$slots,"default",Ae(Be(r)))]),_:2},1032,["default-search"])]),_:2},1024)]),_:3},16))}}),ko=Object.assign(wo,{__name:"UiCommandDialog"}),Co=E({__name:"CommandEmpty",props:{asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class"),{filterState:n}=Ie(),l=B(()=>!!n.search&&n.filtered.count===0);return(i,o)=>l.value?(u(),_(e(re),q({key:0,"data-slot":"command-empty"},e(a),{class:e(W)("py-6 text-center text-sm",t.class)}),{default:c(()=>[V(i.$slots,"default")]),_:3},16,["class"])):F("",!0)}}),So=Object.assign(Co,{__name:"UiCommandEmpty"}),$o=E({__name:"CommandGroup",props:{asChild:{type:Boolean},as:{},class:{},heading:{}},setup(s){const t=s,a=te(t,"class"),{allGroups:n,filterState:l}=Ie(),i=Pe(),o=B(()=>l.search?l.filtered.groups.has(i):!0);return Lo({id:i}),ie(()=>{n.value.has(i)||n.value.set(i,new Set)}),fe(()=>{n.value.delete(i)}),(r,f)=>(u(),_(e(ja),q(e(a),{id:e(i),"data-slot":"command-group",class:e(W)("text-foreground overflow-hidden p-1",t.class),hidden:o.value?void 0:!0}),{default:c(()=>[s.heading?(u(),_(e(Ua),{key:0,"data-slot":"command-group-heading",class:"px-2 py-1.5 text-xs font-medium text-muted-foreground"},{default:c(()=>[G(O(s.heading),1)]),_:1})):F("",!0),V(r.$slots,"default")]),_:3},16,["id","class","hidden"]))}}),Ve=Object.assign($o,{__name:"UiCommandGroup"}),Ro={"data-slot":"command-input-wrapper",class:"flex h-9 items-center gap-2 border-b px-3"},Eo=E({inheritAttrs:!1,__name:"CommandInput",props:{modelValue:{},autoFocus:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class"),n=Te(a),{filterState:l}=Ie(),i=C(null);return ie(()=>{ye(()=>{const o=i.value?.$el;if(o&&l.search){const r=l.search.length;o.setSelectionRange(r,r)}})}),(o,r)=>(u(),S("div",Ro,[p(e(xa),{class:"size-4 shrink-0 opacity-50"}),p(e(La),q({ref_key:"inputRef",ref:i},{...e(n),...o.$attrs},{modelValue:e(l).search,"onUpdate:modelValue":r[0]||(r[0]=f=>e(l).search=f),"data-slot":"command-input","auto-focus":"",class:e(W)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t.class)}),null,16,["modelValue","class"])]))}}),Ao=Object.assign(Eo,{__name:"UiCommandInput"}),Bo=E({__name:"CommandItem",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(s,{emit:t}){const a=s,n=t,l=te(a,"class"),i=ve(l,n),o=Pe(),{filterState:r,allItems:f,allGroups:h}=Ie(),b=Vo(),m=B(()=>{if(r.search){const g=r.filtered.items.get(o);return g===void 0?!0:g>0}else return!0}),v=C(),k=Nt(v);return ie(()=>{if(!(k.value instanceof HTMLElement))return;f.value.set(o,k.value.textContent??a.value?.toString()??"");const g=b?.id;g&&(h.value.has(g)?h.value.get(g)?.add(o):h.value.set(g,new Set([o])))}),fe(()=>{f.value.delete(o)}),(g,P)=>m.value?(u(),_(e(Wa),q({key:0},e(i),{id:e(o),ref_key:"itemRef",ref:v,"data-slot":"command-item",class:e(W)("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a.class),onSelect:P[0]||(P[0]=()=>{e(r).search=""})}),{default:c(()=>[V(g.$slots,"default")]),_:3},16,["id","class"])):F("",!0)}}),de=Object.assign(Bo,{__name:"UiCommandItem"}),Do={role:"presentation"},Po=E({__name:"CommandList",props:{asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class"),n=Te(a);return(l,i)=>(u(),_(e(Ma),q({"data-slot":"command-list"},e(n),{class:e(W)("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar-none",t.class)}),{default:c(()=>[d("div",Do,[V(l.$slots,"default")])]),_:3},16,["class"]))}}),To=Object.assign(Po,{__name:"UiCommandList"}),Io=E({__name:"CommandSeparator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(s){const t=s,a=te(t,"class");return(n,l)=>(u(),_(e(pa),q({"data-slot":"command-separator"},e(a),{class:e(W)("bg-border -mx-1 h-px",t.class)}),{default:c(()=>[V(n.$slots,"default")]),_:3},16,["class"]))}}),tt=Object.assign(Io,{__name:"UiCommandSeparator"}),Oo=E({__name:"CommandShortcut",props:{class:{}},setup(s){const t=s;return(a,n)=>(u(),S("span",{"data-slot":"command-shortcut",class:oe(e(W)("text-muted-foreground ml-auto text-xs tracking-widest",t.class))},[V(a.$slots,"default")],2))}});Object.assign(Oo,{__name:"UiCommandShortcut"});const[Ie,Mo]=be("Command"),[Vo,Lo]=be("CommandGroup"),Fo={class:"flex items-center gap-1"},qo={key:0,class:"text-[10px] uppercase tracking-wide text-muted-foreground"},zo={class:"flex-1"},jo={class:"flex-1"},Ko={class:"ml-auto flex items-center gap-1"},Uo={class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},Ho={class:"flex-1"},No={class:"ml-auto flex items-center gap-1"},Go={class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},Wo={class:"ml-auto flex items-center gap-1"},Qo={class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},Jo={class:"flex-1"},Xo=E({__name:"CommandPalette",props:{open:{type:Boolean,default:!1},openModifiers:{},filter:{default:""},filterModifiers:{}},emits:Ft(["openShortcutsHelp"],["update:open","update:filter"]),setup(s,{emit:t}){const a=Fe(s,"open"),n=Fe(s,"filter"),l=t,i=nt(),{themeMode:o,cycleThemeMode:r}=lt(),{prds:f,showArchived:h,toggleShowArchived:b}=He(),{repos:m,currentRepoId:v,selectRepo:k,refreshGitRepos:g}=De(),{showSuccess:P,showError:J}=it(),Z=["document","board","graph"],j={document:"Document",board:"Task Board",graph:"Graph"},w=C("document");{const T=localStorage.getItem("prd-viewer-tab");(T==="document"||T==="board"||T==="graph")&&(w.value=T)}function $(T){T.key!=="prd-viewer-tab"||!T.newValue||(T.newValue==="document"||T.newValue==="board"||T.newValue==="graph")&&(w.value=T.newValue)}ie(()=>{window.addEventListener("storage",$)}),fe(()=>{window.removeEventListener("storage",$)});const A=B(()=>{const T=Z.indexOf(w.value),z=T>=0?T:0;return Z[(z+1)%Z.length]}),X=B(()=>j[A.value]);function M(T){v.value&&(i.push(`/${v.value}/${T}`),a.value=!1)}function ee(T){k(T),i.push("/"),a.value=!1}function Q(){r(),a.value=!1}function ue(){const T=A.value;w.value=T,localStorage.setItem("prd-viewer-tab",T),window.dispatchEvent(new StorageEvent("storage",{key:"prd-viewer-tab",newValue:T})),a.value=!1}function he(){a.value=!1,l("openShortcutsHelp")}function ae(){b(),a.value=!1}const N=C(!1);async function Y(){if(!(!v.value||N.value)){N.value=!0,a.value=!1;try{const T=await g(v.value);P(`Discovered ${T.discovered} git repositories`)}catch{J("Failed to refresh git repos")}finally{N.value=!1}}}pe(a,T=>{T||(n.value="")});const K=B(()=>navigator.platform.toUpperCase().indexOf("MAC")>=0),ne=B(()=>K.value?"⌘":"Ctrl");return(T,z)=>(u(),_(e(ko),{open:a.value,"onUpdate:open":z[0]||(z[0]=U=>a.value=U),"default-search":n.value},{default:c(()=>[p(e(Ao),{placeholder:"Type a command or search..."}),p(e(To),null,{default:c(()=>[p(e(So),null,{default:c(()=>[...z[1]||(z[1]=[G("No results found.",-1)])]),_:1}),e(f)?.length?(u(),_(e(Ve),{key:0,heading:"Documents"},{default:c(()=>[(u(!0),S(se,null,le(e(f),U=>(u(),_(e(de),{key:U.slug,value:`PRD: ${U.name}`,onSelect:I=>M(U.slug)},{default:c(()=>[p(e(ze),{class:"size-4"}),d("span",Fo,[d("span",null,O(U.name),1),U.archived?(u(),S("span",qo,"Archived")):F("",!0)])]),_:2},1032,["value","onSelect"]))),128))]),_:1})):F("",!0),e(f)?.length&&e(m)?.length?(u(),_(e(tt),{key:1})):F("",!0),e(m)?.length?(u(),_(e(Ve),{key:2,heading:"Repositories"},{default:c(()=>[(u(!0),S(se,null,le(e(m),U=>(u(),_(e(de),{key:U.id,value:`repo-${U.id} ${U.name}`,onSelect:I=>ee(U.id)},{default:c(()=>[p(e(je),{class:"size-4"}),d("span",zo,O(U.name),1),U.id===e(v)?(u(),_(e(dt),{key:0,class:"size-4 text-primary"})):F("",!0)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):F("",!0),e(m)?.length?(u(),_(e(tt),{key:3})):F("",!0),p(e(Ve),{heading:"Actions"},{default:c(()=>[p(e(de),{value:"cycle-theme light dark system",onSelect:Q},{default:c(()=>[e(o)==="system"?(u(),_(e(gt),{key:0,class:"size-4"})):e(o)==="light"?(u(),_(e(_t),{key:1,class:"size-4"})):(u(),_(e(yt),{key:2,class:"size-4"})),d("span",jo,"Cycle theme mode ("+O(e(o))+")",1),d("div",Ko,[d("kbd",Uo,O(e(ne)),1),z[2]||(z[2]=d("kbd",{class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},".",-1))])]),_:1}),p(e(de),{value:`switch-tab ${e(X).toLowerCase()}`,onSelect:ue},{default:c(()=>[p(e(ct),{class:"size-4"}),d("span",Ho,"Switch to "+O(e(X)),1),d("div",No,[d("kbd",Go,O(e(ne)),1),z[3]||(z[3]=d("kbd",{class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},"\\",-1))])]),_:1},8,["value"]),p(e(de),{value:"keyboard shortcuts help",onSelect:he},{default:c(()=>[p(e(fa),{class:"size-4"}),z[5]||(z[5]=d("span",{class:"flex-1"},"Keyboard shortcuts",-1)),d("div",Wo,[d("kbd",Qo,O(e(ne)),1),z[4]||(z[4]=d("kbd",{class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-[10px] text-muted-foreground"},"/",-1))])]),_:1}),e(v)?(u(),_(e(de),{key:0,value:"refresh git repos rescan discover",disabled:e(N),onSelect:Y},{default:c(()=>[p(e(pt),{class:oe(["size-4",{"animate-spin":e(N)}])},null,8,["class"]),z[6]||(z[6]=d("span",{class:"flex-1"},"Refresh git repos",-1))]),_:1},8,["disabled"])):F("",!0),p(e(de),{value:"toggle archived documents",onSelect:ae},{default:c(()=>[p(e(_a),{class:"size-4"}),d("span",Jo,O(e(h)?"Hide archived documents":"Show archived documents"),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["open","default-search"]))}}),Yo=Object.assign(Xo,{__name:"CommandPalette"}),Zo={class:"space-y-6"},en={class:"mb-3 text-sm font-medium text-muted-foreground"},tn={class:"space-y-2"},an={class:"text-sm"},sn={class:"flex items-center gap-1"},on=E({__name:"ShortcutsHelp",props:{open:{type:Boolean,default:!1},openModifiers:{}},emits:["update:open"],setup(s){const t=Fe(s,"open"),a=B(()=>navigator.platform.toUpperCase().indexOf("MAC")>=0),n=B(()=>a.value?"⌘":"Ctrl"),l=B(()=>[{name:"Navigation",shortcuts:[{keys:[n.value,"K"],description:"Open command palette"},{keys:[n.value,"J"],description:"Quick jump to document"}]},{name:"Actions",shortcuts:[{keys:[n.value,"."],description:"Cycle theme mode (light/dark/system)"},{keys:[n.value,"\\"],description:"Cycle Document, Task Board, and Graph tabs"},{keys:[n.value,","],description:"Add repository"}]},{name:"Help",shortcuts:[{keys:[n.value,"/"],description:"Show this help"},{keys:["Esc"],description:"Close dialog or palette"}]}]);return(i,o)=>(u(),_(e(kt),{open:t.value,"onUpdate:open":o[0]||(o[0]=r=>t.value=r)},{default:c(()=>[p(e(Ct),{class:"max-w-md"},{default:c(()=>[p(e($t),null,{default:c(()=>[p(e(Rt),null,{default:c(()=>[...o[1]||(o[1]=[G("Keyboard Shortcuts",-1)])]),_:1}),p(e(St),null,{default:c(()=>[...o[2]||(o[2]=[G(" Quick reference for available keyboard shortcuts. ",-1)])]),_:1})]),_:1}),d("div",Zo,[(u(!0),S(se,null,le(e(l),r=>(u(),S("div",{key:r.name},[d("h3",en,O(r.name),1),d("div",tn,[(u(!0),S(se,null,le(r.shortcuts,f=>(u(),S("div",{key:f.description,class:"flex items-center justify-between"},[d("span",an,O(f.description),1),d("div",sn,[(u(!0),S(se,null,le(f.keys,(h,b)=>(u(),S("kbd",{key:b,class:"inline-flex h-5 min-w-5 items-center justify-center rounded border border-border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground"},O(h),1))),128))])]))),128))])]))),128))])]),_:1})]),_:1},8,["open"]))}}),nn=Object.assign(on,{__name:"ShortcutsHelp"});function Et(){const s=document.activeElement;if(!s)return!1;const t=s.tagName.toLowerCase();return t==="input"||t==="textarea"||s.getAttribute("contenteditable")==="true"||s.getAttribute("role")==="textbox"}function ln(s){const t=s.toLowerCase().split("+"),a=t.pop()||"";return{meta:t.includes("meta"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt"),key:a}}function rn(s,t){const a=s.key.toLowerCase();let n=a===t.key;return t.key==="\\"&&(n=a==="\\"||s.code==="Backslash"),t.key==="/"&&(n=a==="/"||s.code==="Slash"),t.key==="."&&(n=a==="."||s.code==="Period"),t.key===","&&(n=a===","||s.code==="Comma"),n&&s.metaKey===t.meta&&s.ctrlKey===t.ctrl&&s.shiftKey===t.shift&&s.altKey===t.alt}const Ee=[];let at=!1;function un(s){for(const t of Ee)if(rn(s,t.combo)){if(!t.allowInInput&&Et())continue;s.preventDefault(),s.stopPropagation(),t.handler();return}}function st(){at||(document.addEventListener("keydown",un,{capture:!0}),at=!0)}function dn(){ie(()=>{st()});function s(a,n,l){const o={combo:ln(a),handler:n,allowInInput:l?.allowInInput??!1};Ee.push(o),st(),fe(()=>{const r=Ee.indexOf(o);r>-1&&Ee.splice(r,1)})}function t(){return Et()}return{onShortcut:s,isInputFocused:t}}const cn=2e3,pn=2e3;function fn(s){return!s.instanceId||!s.buildId?null:`${s.buildId}:${s.instanceId}`}function mn(s){const t=C(null),a=C(!1),n=C(null),l=C(null),i=C(null),o=C(null),r=C(!1),f=C(!1),h=C(!1);function b(){l.value&&(clearTimeout(l.value),l.value=null)}function m(){i.value&&(clearInterval(i.value),i.value=null)}async function v(){try{const w=await $fetch(`/api/runtime?_=${Date.now()}`);return fn(w)}catch{return null}}async function k(){o.value===null&&(o.value=await v())}async function g(){if(!(r.value||h.value)){r.value=!0;try{const w=await v();if(!w)return;if(!o.value){o.value=w;return}w!==o.value&&(h.value=!0,window.location.reload())}finally{r.value=!1}}}function P(){i.value||(i.value=wt(()=>{g()},pn))}function J(){l.value||(l.value=setTimeout(()=>{l.value=null,Z()},cn))}function Z(){if(!t.value)try{const w=new EventSource("/api/watch");w.onopen=async()=>{a.value=!0,n.value=null,b(),m(),f.value&&(f.value=!1,await g())},w.onmessage=$=>{try{const A=JSON.parse($.data);s(A)}catch{}},w.onerror=()=>{a.value=!1,n.value="Connection lost",f.value=!0,t.value===w&&(w.close(),t.value=null),P(),J()},t.value=w}catch{n.value="Failed to connect",P(),J()}}function j(){b(),m(),f.value=!1,t.value&&(t.value.close(),t.value=null,a.value=!1)}return ie(async()=>{await k(),Z()}),fe(()=>{j()}),{isConnected:a,error:n,connect:Z,disconnect:j}}const vn={class:"min-h-screen bg-background text-foreground"},hn={class:"fixed top-0 left-0 right-0 z-50 h-14 border-b border-border bg-background/95 backdrop-blur-sm supports-[backdrop-filter]:bg-background/80"},gn={class:"flex h-full items-center justify-between px-4 md:px-6"},yn={class:"flex items-center gap-3"},_n={class:"hidden text-xs text-muted-foreground md:inline"},bn={class:"flex items-center gap-3"},xn={class:"flex h-screen pt-14"},wn={class:"flex-1 overflow-auto"},Bn=E({__name:"default",setup(s){const{themeMode:t,cycleThemeMode:a}=lt(),{refreshPrds:n}=He(),{currentRepoId:l}=De(),i=Ke(),o=jt(),r=B(()=>o.public.stewardVersion||"0.0.0"),f=B(()=>o.public.stewardPackageName||"steward"),h=C(null);qt("fileChangeEvent",h);const b=C(!1),m=C(""),v=C(!1),k=C(null),{onShortcut:g}=dn();g("Meta+k",()=>{b.value=!0}),g("Ctrl+k",()=>{b.value=!0}),g("Meta+j",()=>{m.value="PRD: ",b.value=!0}),g("Ctrl+j",()=>{m.value="PRD: ",b.value=!0});function P(){const w=["document","board","graph"],$=localStorage.getItem("prd-viewer-tab")||"document",A=w.indexOf($),X=A>=0?A:0,M=w[(X+1)%w.length]??"document";localStorage.setItem("prd-viewer-tab",M),window.dispatchEvent(new StorageEvent("storage",{key:"prd-viewer-tab",newValue:M}))}g("Meta+\\",P),g("Ctrl+\\",P);function J(){a()}g("Meta+.",J),g("Ctrl+.",J);function Z(){k.value?.openAddDialog()}g("Meta+,",Z),g("Ctrl+,",Z);function j(){v.value=!0}return g("Meta+/",j),g("Ctrl+/",j),g("Meta+Shift+/",j),g("Ctrl+Shift+/",j),mn(w=>{if(w.type==="connected"||!w.category)return;const $=w.category;if(w.repoId!==l.value)return;($==="prd"||$==="tasks")&&n();const A=i.params.prd,X=$==="tasks"||$==="progress",M=$==="prd"&&(!A||w.path?.includes(`/${A}.`)),ee=!!A&&X&&w.path?.includes(`/${A}/`);(X||M||ee)&&(h.value={category:$,path:w.path,timestamp:Date.now()})}),(w,$)=>{const A=ys,X=Hs,M=zt,ee=ro;return u(),S("div",vn,[p(A),p(Yo,{open:e(b),"onUpdate:open":$[0]||($[0]=Q=>Ce(b)?b.value=Q:null),filter:e(m),"onUpdate:filter":$[1]||($[1]=Q=>Ce(m)?m.value=Q:null),onOpenShortcutsHelp:j},null,8,["open","filter"]),p(nn,{open:e(v),"onUpdate:open":$[2]||($[2]=Q=>Ce(v)?v.value=Q:null)},null,8,["open"]),d("header",hn,[d("div",gn,[d("div",yn,[$[3]||($[3]=d("h1",{class:"text-lg font-semibold tracking-tight"}," PRD Viewer ",-1)),d("span",_n,O(e(f))+" v"+O(e(r)),1)]),p(M,null,{fallback:c(()=>[...$[5]||($[5]=[d("div",{class:"flex items-center gap-3"},[d("div",{class:"h-8 w-[200px] animate-pulse rounded-md bg-muted"}),d("div",{class:"size-9 animate-pulse rounded-md bg-muted"})],-1)])]),default:c(()=>[d("div",bn,[p(X,{ref_key:"repoSelectorRef",ref:k},null,512),p(e(ce),{variant:"ghost",size:"icon",class:"size-9",onClick:J},{default:c(()=>[e(t)==="system"?(u(),_(e(gt),{key:0,class:"size-4"})):e(t)==="light"?(u(),_(e(_t),{key:1,class:"size-4"})):(u(),_(e(yt),{key:2,class:"size-4"})),$[4]||($[4]=d("span",{class:"sr-only"},"Cycle theme mode",-1))]),_:1})])]),_:1})])]),d("div",xn,[p(M,null,{fallback:c(()=>[...$[6]||($[6]=[d("aside",{class:"flex h-full w-64 flex-col border-r border-border bg-background"},[d("div",{class:"flex h-12 items-center border-b border-border px-4"},[d("div",{class:"h-4 w-20 animate-pulse rounded bg-muted"})]),d("div",{class:"flex-1 p-2 space-y-2"},[d("div",{class:"h-9 animate-pulse rounded-md bg-muted"}),d("div",{class:"h-9 animate-pulse rounded-md bg-muted"}),d("div",{class:"h-9 animate-pulse rounded-md bg-muted"})])],-1)])]),default:c(()=>[p(ee)]),_:1}),d("main",wn,[V(w.$slots,"default")])])])}}});export{Bn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a}from"./
|
|
1
|
+
import{_ as a}from"./CTJgb0zb.js";import{_ as i}from"./DlAUqK2U.js";import{u}from"./BRQ9Cxaw.js";import{o as c,c as l,a as e,t as r,b as d,w as p,d as f}from"./Bc2V3wPK.js";const m={class:"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black"},g={class:"max-w-520px text-center z-20"},h=["textContent"],b=["textContent"],x={class:"flex items-center justify-center w-full"},y={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},status:{type:Number,default:404},statusText:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return u({title:`${n.status} - ${n.statusText} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(k,o)=>{const s=a;return c(),l("div",m,[o[0]||(o[0]=e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),e("div",g,[e("h1",{class:"font-medium mb-8 sm:text-10xl text-8xl",textContent:r(t.status)},null,8,h),e("p",{class:"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl",textContent:r(t.description)},null,8,b),e("div",x,[d(s,{to:"/",class:"cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"},{default:p(()=>[f(r(t.backHome),1)]),_:1})])])])}}},N=i(y,[["__scopeId","data-v-a548e1ee"]]);export{N as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DxNHbxmM.js","./CnnebwVN.js","./wDzz0qaB.js","./DPfMkruS.js","./Cl0AqbOI.js","./2EtD6e53.js","./Cn7AkR1O.js","./BGJmEYvX.js","./CylS5w8V.js","./Cp-IABpG.js","./DxSwrfjg.js","./BPQ3VLAy.js","./CXtECtnM.js","./COt5Ahok.js","./5X7smno1.js","./DGP4VlC8.js","./BLtJtn59.js","./CquLrc37.js","./DVxCFoDh.js","./CO1LY3CK.js","./B6aJPvgy.js","./BYV0-3_D.js","./CxbxFI8M.js","./Bp3cYrEr.js","./CDVJQ6XC.js","./DZxFcAj9.js","./BIGW1oBm.js","./fKv21gyL.js","./Yzrsuije.js","./DZu-aV2c.js","./CpOuai2O.js","./CeZK1NFH.js","./CGscLIrv.js","./Bhrxn6JZ.js","./CmIQRyeF.js","./C9oPPf7i.js","./g9-lgVsj.js","./CnsnAmq5.js","./Buea-lGh.js","./CuPHTKiy.js","./Cvjx9yec.js","./B7c-h3xW.js","./BxgE0vQu.js","./BTifaqeh.js","./CenWIFCC.js","./DkwncUOv.js","./C5YyOfLZ.js","./CxGSJlkm.js","./D97Zzqfu.js","./CSXwinHm.js","./YqXBG_HV.js","./BR5kRUq4.js","./CLZrNe3w.js","./m17aaUwq.js","./CufHLc7y.js","./CYsAdtH9.js","./fuZLfV_i.js","./DWrx1Km3.js","./CzTSHFRz.js","./CXZktZb0.js","./Br6cN0cg.js","./W9tJ9s81.js","./Dspwwk_N.js","./DMwsHuHA.js","./CQ8jqdy-.js","./mjskCLCv.js","./83L43bj1.js","./B1dDrJ26.js","./TsXTqZ29.js","./Dph4kLrZ.js","./DhmSosst.js","./BzTr9Aqm.js","./DJjDtW9f.js","./BLmx8bSh.js","./BVQ-GDCI.js","./DsumFeuD.js","./COcwbKMJ.js","./DQwYQDb2.js","./D1j8_8rp.js","./CG8Ifv2g.js","./BqTXFGrv.js","./D3lLCCz7.js","./Cq5zzVJU.js","./Dzze3sRP.js","./BRZ36xJF.js","./BsS91CYL.js","./DM8c43g1.js","./BH7IYjvW.js","./DYoxhk2S.js","./CZhp0h8q.js","./CxLEBnE3.js","./Cm3UrAx6.js","./RNghxpo_.js","./DEthMvLe.js","./DqQDbK_p.js","./CW8IKDeL.js","./BEDo0Tqx.js","./yv6CvBhz.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a3 as l}from"./Dn6yoG20.js";let P=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Sr(t){return Xe(t)}function Xe(t){return Array.isArray(t)?Pr(t):t instanceof RegExp?t:typeof t=="object"?kr(t):t}function Pr(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=Xe(t[r]);return e}function kr(t){let e={};for(let r in t)e[r]=Xe(t[r]);return e}function Dt(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function Nt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Nt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ue=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,r){return t.replace(Oe,(n,i,o,a)=>{let u=r[parseInt(i||o,10)];if(u){let s=e.substring(u.start,u.end);for(;s[0]===".";)s=s.substring(1);switch(a){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return n})}};function xt(t,e){return t<e?-1:t>e?1:0}function Vt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let o=xt(t[i],e[i]);if(o!==0)return o}return 0}return r-n}function mt(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Mt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bt=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},_e=class{constructor(t,e,r){this._colorMap=t,this._defaults=e,this._root=r}static createFromRawTheme(t,e){return this.createFromParsedTheme(Or(t),e)}static createFromParsedTheme(t,e){return Dr(t,e)}_cachedMatchRoot=new Bt(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(i=>Ir(t.parent,i.parentScopes));return n?new Gt(n.fontStyle,n.foreground,n.background):null}},Ce=class de{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new de(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new de(r,e[n]);return r}push(e){return new de(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function Ir(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!wr(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function wr(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Gt=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function Or(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,o=e.length;i<o;i++){let a=e[i];if(!a.settings)continue;let u;if(typeof a.scope=="string"){let p=a.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),u=p.split(",")}else Array.isArray(a.scope)?u=a.scope:u=[""];let s=-1;if(typeof a.settings.fontStyle=="string"){s=0;let p=a.settings.fontStyle.split(" ");for(let f=0,d=p.length;f<d;f++)switch(p[f]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let c=null;typeof a.settings.foreground=="string"&&mt(a.settings.foreground)&&(c=a.settings.foreground);let m=null;typeof a.settings.background=="string"&&mt(a.settings.background)&&(m=a.settings.background);for(let p=0,f=u.length;p<f;p++){let h=u[p].trim().split(" "),E=h[h.length-1],b=null;h.length>1&&(b=h.slice(0,h.length-1),b.reverse()),r[n++]=new Cr(E,b,i,s,c,m)}}return r}var Cr=class{constructor(t,e,r,n,i,o){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=o}},C=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(C||{});function Dr(t,e){t.sort((s,c)=>{let m=xt(s.scope,c.scope);return m!==0||(m=Vt(s.parentScopes,c.parentScopes),m!==0)?m:s.index-c.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let s=t.shift();s.fontStyle!==-1&&(r=s.fontStyle),s.foreground!==null&&(n=s.foreground),s.background!==null&&(i=s.background)}let o=new Nr(e),a=new Gt(r,o.getId(n),o.getId(i)),u=new Vr(new Ge(0,null,-1,0,0),[]);for(let s=0,c=t.length;s<c;s++){let m=t[s];u.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new _e(o,a,u)}var Nr=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xr=Object.freeze([]),Ge=class jt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,r,n,i,o){this.scopeDepth=e,this.parentScopes=r||xr,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new jt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Vr=class je{constructor(e,r=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const o=r.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return r.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 r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(je._cmpBySpecificity),r}insert(e,r,n,i,o,a){if(r===""){this._doInsertHere(e,n,i,o,a);return}let u=r.indexOf("."),s,c;u===-1?(s=r,c=""):(s=r.substring(0,u),c=r.substring(u+1));let m;this._children.hasOwnProperty(s)?m=this._children[s]:(m=new je(this._mainRule.clone(),Ge.cloneArr(this._rulesWithParentScopes)),this._children[s]=m),m.insert(e+1,c,n,i,o,a)}_doInsertHere(e,r,n,i,o){if(r===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let a=0,u=this._rulesWithParentScopes.length;a<u;a++){let s=this._rulesWithParentScopes[a];if(Vt(s.parentScopes,r)===0){s.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 Ge(e,r,n,i,o))}},Y=class V{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=V.getLanguageId(e),n=V.getTokenType(e),i=V.getFontStyle(e),o=V.getForeground(e),a=V.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:o,background:a})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,r,n,i,o,a,u){let s=V.getLanguageId(e),c=V.getTokenType(e),m=V.containsBalancedBrackets(e)?1:0,p=V.getFontStyle(e),f=V.getForeground(e),d=V.getBackground(e);return r!==0&&(s=r),n!==8&&(c=n),i!==null&&(m=i?1:0),o!==-1&&(p=o),a!==0&&(f=a),u!==0&&(d=u),(s<<0|c<<8|m<<10|p<<11|f<<15|d<<24)>>>0}};function ge(t,e){const r=[],n=Mr(t);let i=n.next();for(;i!==null;){let s=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let c=a();if(r.push({matcher:c,priority:s}),i!==",")break;i=n.next()}return r;function o(){if(i==="-"){i=n.next();const s=o();return c=>!!s&&!s(c)}if(i==="("){i=n.next();const s=u();return i===")"&&(i=n.next()),s}if(pt(i)){const s=[];do s.push(i),i=n.next();while(pt(i));return c=>e(s,c)}return null}function a(){const s=[];let c=o();for(;c;)s.push(c),c=o();return m=>s.every(p=>p(m))}function u(){const s=[];let c=a();for(;c&&(s.push(c),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");c=a()}return m=>s.some(p=>p(m))}}function pt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Mr(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function $t(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Br=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gr=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jr=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gr;for(const r of t)$r(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof te){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function $r(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=r.lookup(e);t instanceof te?he({baseGrammar:o,selfGrammar:i},n):$e(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const a=r.injections(t.scopeName);if(a)for(const u of a)n.add(new te(u))}function $e(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];ye([n],e,r)}}function he(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?Dt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&ye(n.patterns,{...e,repository:i},r);const o=n.include;if(!o)continue;const a=Ut(o);switch(a.kind){case 0:he({...e,selfGrammar:e.baseGrammar},r);break;case 1:he(e,r);break;case 2:$e(a.ruleName,{...e,repository:i},r);break;case 3:case 4:const u=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(u){const s={baseGrammar:e.baseGrammar,selfGrammar:u,repository:i};a.kind===4?$e(a.ruleName,s,r):he(s,r)}else a.kind===4?r.add(new Br(a.scopeName,a.ruleName)):r.add(new te(a.scopeName));break}}}var Ur=class{kind=0},Hr=class{kind=1},Wr=class{constructor(t){this.ruleName=t}kind=2},Fr=class{constructor(t){this.scopeName=t}kind=3},zr=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Ut(t){if(t==="$base")return new Ur;if(t==="$self")return new Hr;const e=t.indexOf("#");if(e===-1)return new Fr(t);if(e===0)return new Wr(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new zr(r,n)}}var qr=/\\(\d+)/,dt=/\\(\d+)/g,Kr=-1,Ht=-2;var se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,r,n){this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=ue.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=ue.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Nt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:ue.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ue.replaceCaptures(this._contentName,t,e)}},Yr=class extends se{retokenizeCapturedWithRuleId;constructor(t,e,r,n,i){super(t,e,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,r,n){throw new Error("Not supported!")}},Jr=class extends se{_match;captures;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,null),this._match=new re(n,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ne,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ht=class extends se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,n),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const r of this.patterns)t.getRule(r).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ne,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i,o,a,u,s,c){super(t,e,r,n),this._begin=new re(i,this.id),this.beginCaptures=o,this._end=new re(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=u,this.applyEndPatternLast=s||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t,e).compileAG(t,r,n)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ne;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},Ee=class extends se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,r,n,i,o,a,u,s){super(t,e,r,n),this._begin=new re(i,this.id),this.beginCaptures=o,this.whileCaptures=u,this._while=new re(a,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ne;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,r,n){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,r,n)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ne,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Wt=class O{static createCaptureRule(e,r,n,i,o){return e.registerRule(a=>new Yr(r,a,n,i,o))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new Jr(e.$vscodeTextmateLocation,e.id,e.name,e.match,O._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=Dt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new ht(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,O._compilePatterns(o,r,n))}return e.while?new Ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,O._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,O._compileCaptures(e.whileCaptures||e.captures,r,n),O._compilePatterns(e.patterns,r,n)):new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,O._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,O._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,O._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let o=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);u>o&&(o=u)}for(let a=0;a<=o;a++)i[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);let s=0;e[a].patterns&&(s=O.getCompiledRuleId(e[a],r,n)),i[u]=O.createCaptureRule(r,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,s)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let o=0,a=e.length;o<a;o++){const u=e[o];let s=-1;if(u.include){const c=Ut(u.include);switch(c.kind){case 0:case 1:s=O.getCompiledRuleId(n[u.include],r,n);break;case 2:let m=n[c.ruleName];m&&(s=O.getCompiledRuleId(m,r,n));break;case 3:case 4:const p=c.scopeName,f=c.kind===4?c.ruleName:null,d=r.getExternalGrammar(p,n);if(d)if(f){let h=d.repository[f];h&&(s=O.getCompiledRuleId(h,r,d.repository))}else s=O.getCompiledRuleId(d.repository.$self,r,d.repository);break}}else s=O.getCompiledRuleId(u,r,n);if(s!==-1){const c=r.getRule(s);let m=!1;if((c instanceof ht||c instanceof Ue||c instanceof Ee)&&c.hasMissingPatterns&&c.patterns.length===0&&(m=!0),m)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},re=class Ft{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,r){if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],a=!1;for(let u=0;u<n;u++)if(e.charAt(u)==="\\"&&u+1<n){const c=e.charAt(u+1);c==="z"?(o.push(e.substring(i,u)),o.push("$(?!\\n)(?<!\\n)"),i=u+2):(c==="A"||c==="G")&&(a=!0),u++}this.hasAnchor=a,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=r,typeof this.source=="string"?this.hasBackReferences=qr.test(this.source):this.hasBackReferences=!1}clone(){return new Ft(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return dt.lastIndex=0,this.source.replace(dt,(i,o)=>Mt(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=[],r=[],n=[],i=[],o,a,u,s;for(o=0,a=this.source.length;o<a;o++)u=this.source.charAt(o),e[o]=u,r[o]=u,n[o]=u,i[o]=u,u==="\\"&&o+1<a&&(s=this.source.charAt(o+1),s==="A"?(e[o+1]="",r[o+1]="",n[o+1]="A",i[o+1]="A"):s==="G"?(e[o+1]="",r[o+1]="G",n[o+1]="",i[o+1]="G"):(e[o+1]=s,r[o+1]=s,n[o+1]=s,i[o+1]=s),o++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ne=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new ft(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new ft(t,n,this._items.map(i=>i.ruleId))}},ft=class{constructor(t,e,r){this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
import{a8 as l}from"./Bc2V3wPK.js";let P=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Sr(t){return Xe(t)}function Xe(t){return Array.isArray(t)?Pr(t):t instanceof RegExp?t:typeof t=="object"?kr(t):t}function Pr(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=Xe(t[r]);return e}function kr(t){let e={};for(let r in t)e[r]=Xe(t[r]);return e}function Dt(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function Nt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Nt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ue=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,r){return t.replace(Oe,(n,i,o,a)=>{let u=r[parseInt(i||o,10)];if(u){let s=e.substring(u.start,u.end);for(;s[0]===".";)s=s.substring(1);switch(a){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return n})}};function xt(t,e){return t<e?-1:t>e?1:0}function Vt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let o=xt(t[i],e[i]);if(o!==0)return o}return 0}return r-n}function mt(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Mt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bt=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},_e=class{constructor(t,e,r){this._colorMap=t,this._defaults=e,this._root=r}static createFromRawTheme(t,e){return this.createFromParsedTheme(Or(t),e)}static createFromParsedTheme(t,e){return Dr(t,e)}_cachedMatchRoot=new Bt(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(i=>Ir(t.parent,i.parentScopes));return n?new Gt(n.fontStyle,n.foreground,n.background):null}},Ce=class de{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new de(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new de(r,e[n]);return r}push(e){return new de(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function Ir(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!wr(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function wr(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Gt=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function Or(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,o=e.length;i<o;i++){let a=e[i];if(!a.settings)continue;let u;if(typeof a.scope=="string"){let p=a.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),u=p.split(",")}else Array.isArray(a.scope)?u=a.scope:u=[""];let s=-1;if(typeof a.settings.fontStyle=="string"){s=0;let p=a.settings.fontStyle.split(" ");for(let f=0,d=p.length;f<d;f++)switch(p[f]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let c=null;typeof a.settings.foreground=="string"&&mt(a.settings.foreground)&&(c=a.settings.foreground);let m=null;typeof a.settings.background=="string"&&mt(a.settings.background)&&(m=a.settings.background);for(let p=0,f=u.length;p<f;p++){let h=u[p].trim().split(" "),E=h[h.length-1],b=null;h.length>1&&(b=h.slice(0,h.length-1),b.reverse()),r[n++]=new Cr(E,b,i,s,c,m)}}return r}var Cr=class{constructor(t,e,r,n,i,o){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=o}},C=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(C||{});function Dr(t,e){t.sort((s,c)=>{let m=xt(s.scope,c.scope);return m!==0||(m=Vt(s.parentScopes,c.parentScopes),m!==0)?m:s.index-c.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let s=t.shift();s.fontStyle!==-1&&(r=s.fontStyle),s.foreground!==null&&(n=s.foreground),s.background!==null&&(i=s.background)}let o=new Nr(e),a=new Gt(r,o.getId(n),o.getId(i)),u=new Vr(new Ge(0,null,-1,0,0),[]);for(let s=0,c=t.length;s<c;s++){let m=t[s];u.insert(0,m.scope,m.parentScopes,m.fontStyle,o.getId(m.foreground),o.getId(m.background))}return new _e(o,a,u)}var Nr=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},xr=Object.freeze([]),Ge=class jt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,r,n,i,o){this.scopeDepth=e,this.parentScopes=r||xr,this.fontStyle=n,this.foreground=i,this.background=o}clone(){return new jt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},Vr=class je{constructor(e,r=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const o=r.parentScopes[i].length-e.parentScopes[n].length;if(o!==0)return o;n++,i++}return r.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 r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(je._cmpBySpecificity),r}insert(e,r,n,i,o,a){if(r===""){this._doInsertHere(e,n,i,o,a);return}let u=r.indexOf("."),s,c;u===-1?(s=r,c=""):(s=r.substring(0,u),c=r.substring(u+1));let m;this._children.hasOwnProperty(s)?m=this._children[s]:(m=new je(this._mainRule.clone(),Ge.cloneArr(this._rulesWithParentScopes)),this._children[s]=m),m.insert(e+1,c,n,i,o,a)}_doInsertHere(e,r,n,i,o){if(r===null){this._mainRule.acceptOverwrite(e,n,i,o);return}for(let a=0,u=this._rulesWithParentScopes.length;a<u;a++){let s=this._rulesWithParentScopes[a];if(Vt(s.parentScopes,r)===0){s.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 Ge(e,r,n,i,o))}},Y=class V{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=V.getLanguageId(e),n=V.getTokenType(e),i=V.getFontStyle(e),o=V.getForeground(e),a=V.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:o,background:a})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,r,n,i,o,a,u){let s=V.getLanguageId(e),c=V.getTokenType(e),m=V.containsBalancedBrackets(e)?1:0,p=V.getFontStyle(e),f=V.getForeground(e),d=V.getBackground(e);return r!==0&&(s=r),n!==8&&(c=n),i!==null&&(m=i?1:0),o!==-1&&(p=o),a!==0&&(f=a),u!==0&&(d=u),(s<<0|c<<8|m<<10|p<<11|f<<15|d<<24)>>>0}};function ge(t,e){const r=[],n=Mr(t);let i=n.next();for(;i!==null;){let s=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let c=a();if(r.push({matcher:c,priority:s}),i!==",")break;i=n.next()}return r;function o(){if(i==="-"){i=n.next();const s=o();return c=>!!s&&!s(c)}if(i==="("){i=n.next();const s=u();return i===")"&&(i=n.next()),s}if(pt(i)){const s=[];do s.push(i),i=n.next();while(pt(i));return c=>e(s,c)}return null}function a(){const s=[];let c=o();for(;c;)s.push(c),c=o();return m=>s.every(p=>p(m))}function u(){const s=[];let c=a();for(;c&&(s.push(c),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");c=a()}return m=>s.some(p=>p(m))}}function pt(t){return!!t&&!!t.match(/[\w\.:]+/)}function Mr(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function $t(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Br=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gr=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jr=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gr;for(const r of t)$r(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof te){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function $r(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=r.lookup(e);t instanceof te?he({baseGrammar:o,selfGrammar:i},n):$e(t.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},n);const a=r.injections(t.scopeName);if(a)for(const u of a)n.add(new te(u))}function $e(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];ye([n],e,r)}}function he(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&ye(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&ye(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function ye(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?Dt({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&ye(n.patterns,{...e,repository:i},r);const o=n.include;if(!o)continue;const a=Ut(o);switch(a.kind){case 0:he({...e,selfGrammar:e.baseGrammar},r);break;case 1:he(e,r);break;case 2:$e(a.ruleName,{...e,repository:i},r);break;case 3:case 4:const u=a.scopeName===e.selfGrammar.scopeName?e.selfGrammar:a.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(u){const s={baseGrammar:e.baseGrammar,selfGrammar:u,repository:i};a.kind===4?$e(a.ruleName,s,r):he(s,r)}else a.kind===4?r.add(new Br(a.scopeName,a.ruleName)):r.add(new te(a.scopeName));break}}}var Ur=class{kind=0},Hr=class{kind=1},Wr=class{constructor(t){this.ruleName=t}kind=2},Fr=class{constructor(t){this.scopeName=t}kind=3},zr=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Ut(t){if(t==="$base")return new Ur;if(t==="$self")return new Hr;const e=t.indexOf("#");if(e===-1)return new Fr(t);if(e===0)return new Wr(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new zr(r,n)}}var qr=/\\(\d+)/,dt=/\\(\d+)/g,Kr=-1,Ht=-2;var se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,r,n){this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=ue.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=ue.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Nt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:ue.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ue.replaceCaptures(this._contentName,t,e)}},Yr=class extends se{retokenizeCapturedWithRuleId;constructor(t,e,r,n,i){super(t,e,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,r,n){throw new Error("Not supported!")}},Jr=class extends se{_match;captures;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,null),this._match=new re(n,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ne,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ht=class extends se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,n),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const r of this.patterns)t.getRule(r).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ne,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i,o,a,u,s,c){super(t,e,r,n),this._begin=new re(i,this.id),this.beginCaptures=o,this._end=new re(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=u,this.applyEndPatternLast=s||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t,e).compileAG(t,r,n)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ne;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},Ee=class extends se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,r,n,i,o,a,u,s){super(t,e,r,n),this._begin=new re(i,this.id),this.beginCaptures=o,this.whileCaptures=u,this._while=new re(a,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ne;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,r,n){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,r,n)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ne,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Wt=class O{static createCaptureRule(e,r,n,i,o){return e.registerRule(a=>new Yr(r,a,n,i,o))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new Jr(e.$vscodeTextmateLocation,e.id,e.name,e.match,O._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=Dt({},n,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new ht(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,O._compilePatterns(o,r,n))}return e.while?new Ee(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,O._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,O._compileCaptures(e.whileCaptures||e.captures,r,n),O._compilePatterns(e.patterns,r,n)):new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,O._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,O._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,O._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let o=0;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);u>o&&(o=u)}for(let a=0;a<=o;a++)i[a]=null;for(const a in e){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);let s=0;e[a].patterns&&(s=O.getCompiledRuleId(e[a],r,n)),i[u]=O.createCaptureRule(r,e[a].$vscodeTextmateLocation,e[a].name,e[a].contentName,s)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let o=0,a=e.length;o<a;o++){const u=e[o];let s=-1;if(u.include){const c=Ut(u.include);switch(c.kind){case 0:case 1:s=O.getCompiledRuleId(n[u.include],r,n);break;case 2:let m=n[c.ruleName];m&&(s=O.getCompiledRuleId(m,r,n));break;case 3:case 4:const p=c.scopeName,f=c.kind===4?c.ruleName:null,d=r.getExternalGrammar(p,n);if(d)if(f){let h=d.repository[f];h&&(s=O.getCompiledRuleId(h,r,d.repository))}else s=O.getCompiledRuleId(d.repository.$self,r,d.repository);break}}else s=O.getCompiledRuleId(u,r,n);if(s!==-1){const c=r.getRule(s);let m=!1;if((c instanceof ht||c instanceof Ue||c instanceof Ee)&&c.hasMissingPatterns&&c.patterns.length===0&&(m=!0),m)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},re=class Ft{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,r){if(e&&typeof e=="string"){const n=e.length;let i=0,o=[],a=!1;for(let u=0;u<n;u++)if(e.charAt(u)==="\\"&&u+1<n){const c=e.charAt(u+1);c==="z"?(o.push(e.substring(i,u)),o.push("$(?!\\n)(?<!\\n)"),i=u+2):(c==="A"||c==="G")&&(a=!0),u++}this.hasAnchor=a,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=r,typeof this.source=="string"?this.hasBackReferences=qr.test(this.source):this.hasBackReferences=!1}clone(){return new Ft(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return dt.lastIndex=0,this.source.replace(dt,(i,o)=>Mt(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=[],r=[],n=[],i=[],o,a,u,s;for(o=0,a=this.source.length;o<a;o++)u=this.source.charAt(o),e[o]=u,r[o]=u,n[o]=u,i[o]=u,u==="\\"&&o+1<a&&(s=this.source.charAt(o+1),s==="A"?(e[o+1]="",r[o+1]="",n[o+1]="A",i[o+1]="A"):s==="G"?(e[o+1]="",r[o+1]="G",n[o+1]="",i[o+1]="G"):(e[o+1]=s,r[o+1]=s,n[o+1]=s,i[o+1]=s),o++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ne=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new ft(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new ft(t,n,this._items.map(i=>i.ruleId))}},ft=class{constructor(t,e,r){this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
3
3
|
`)}findNextMatchSync(t,e,r){const n=this.scanner.findNextMatchSync(t,e,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},De=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Xr=class He{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,r){this._defaultAttributes=new De(e,8),this._embeddedLanguagesMatcher=new Qr(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?He._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new De(0,0);_getBasicScopeAttributes=new Bt(e=>{const r=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new De(r,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const r=e.match(He.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Qr=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([r,n])=>Mt(r));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},_t=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function zt(t,e,r,n,i,o,a,u){const s=e.content.length;let c=!1,m=-1;if(a){const d=Zr(t,e,r,n,i,o);i=d.stack,n=d.linePos,r=d.isFirstLine,m=d.anchorPosition}const p=Date.now();for(;!c;){if(u!==0&&Date.now()-p>u)return new _t(i,!0);f()}return new _t(i,!1);function f(){const d=en(t,e,r,n,i,m);if(!d){o.produce(i,s),c=!0;return}const h=d.captureIndices,E=d.matchedRuleId,b=h&&h.length>0?h[0].end>n:!1;if(E===Kr){const y=i.getRule(t);o.produce(i,h[0].start),i=i.withContentNameScopesList(i.nameScopesList),Z(t,e,r,i,o,y.endCaptures,h),o.produce(i,h[0].end);const v=i;if(i=i.parent,m=v.getAnchorPos(),!b&&v.getEnterPos()===n){i=v,o.produce(i,s),c=!0;return}}else{const y=t.getRule(E);o.produce(i,h[0].start);const v=i,g=y.getName(e.content,h),R=i.contentNameScopesList.pushAttributed(g,t);if(i=i.push(E,n,m,h[0].end===s,null,R,R),y instanceof Ue){const A=y;Z(t,e,r,i,o,A.beginCaptures,h),o.produce(i,h[0].end),m=h[0].end;const N=A.getContentName(e.content,h),$=R.pushAttributed(N,t);if(i=i.withContentNameScopesList($),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(e.content,h))),!b&&v.hasSameRuleAs(i)){i=i.pop(),o.produce(i,s),c=!0;return}}else if(y instanceof Ee){const A=y;Z(t,e,r,i,o,A.beginCaptures,h),o.produce(i,h[0].end),m=h[0].end;const N=A.getContentName(e.content,h),$=R.pushAttributed(N,t);if(i=i.withContentNameScopesList($),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(e.content,h))),!b&&v.hasSameRuleAs(i)){i=i.pop(),o.produce(i,s),c=!0;return}}else if(Z(t,e,r,i,o,y.captures,h),o.produce(i,h[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,s),c=!0;return}}h[0].end>n&&(n=h[0].end,r=!1)}}function Zr(t,e,r,n,i,o){let a=i.beginRuleCapturedEOL?0:-1;const u=[];for(let s=i;s;s=s.pop()){const c=s.getRule(t);c instanceof Ee&&u.push({rule:c,stack:s})}for(let s=u.pop();s;s=u.pop()){const{ruleScanner:c,findOptions:m}=nn(s.rule,t,s.stack.endRule,r,n===a),p=c.findNextMatchSync(e,n,m);if(p){if(p.ruleId!==Ht){i=s.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(s.stack,p.captureIndices[0].start),Z(t,e,r,s.stack,o,s.rule.whileCaptures,p.captureIndices),o.produce(s.stack,p.captureIndices[0].end),a=p.captureIndices[0].end,p.captureIndices[0].end>n&&(n=p.captureIndices[0].end,r=!1))}else{i=s.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:a,isFirstLine:r}}function en(t,e,r,n,i,o){const a=tn(t,e,r,n,i,o),u=t.getInjections();if(u.length===0)return a;const s=rn(u,t,e,r,n,i,o);if(!s)return a;if(!a)return s;const c=a.captureIndices[0].start,m=s.captureIndices[0].start;return m<c||s.priorityMatch&&m===c?s:a}function tn(t,e,r,n,i,o){const a=i.getRule(t),{ruleScanner:u,findOptions:s}=qt(a,t,i.endRule,r,n===o),c=u.findNextMatchSync(e,n,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function rn(t,e,r,n,i,o,a){let u=Number.MAX_VALUE,s=null,c,m=0;const p=o.contentNameScopesList.getScopeNames();for(let f=0,d=t.length;f<d;f++){const h=t[f];if(!h.matcher(p))continue;const E=e.getRule(h.ruleId),{ruleScanner:b,findOptions:y}=qt(E,e,null,n,i===a),v=b.findNextMatchSync(r,i,y);if(!v)continue;const g=v.captureIndices[0].start;if(!(g>=u)&&(u=g,s=v.captureIndices,c=v.ruleId,m=h.priority,u===i))break}return s?{priorityMatch:m===-1,captureIndices:s,matchedRuleId:c}:null}function qt(t,e,r,n,i){return{ruleScanner:t.compileAG(e,r,n,i),findOptions:0}}function nn(t,e,r,n,i){return{ruleScanner:t.compileWhileAG(e,r,n,i),findOptions:0}}function Z(t,e,r,n,i,o,a){if(o.length===0)return;const u=e.content,s=Math.min(o.length,a.length),c=[],m=a[0].end;for(let p=0;p<s;p++){const f=o[p];if(f===null)continue;const d=a[p];if(d.length===0)continue;if(d.start>m)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(n,d.start),f.retokenizeCapturedWithRuleId){const E=f.getName(u,a),b=n.contentNameScopesList.pushAttributed(E,t),y=f.getContentName(u,a),v=b.pushAttributed(y,t),g=n.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,b,v),R=t.createOnigString(u.substring(0,d.end));zt(t,R,r&&d.start===0,d.start,g,i,!1,0),$t(R);continue}const h=f.getName(u,a);if(h!==null){const b=(c.length>0?c[c.length-1].scopes:n.contentNameScopesList).pushAttributed(h,t);c.push(new on(b,d.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var on=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function an(t,e,r,n,i,o,a,u){return new ln(t,e,r,n,i,o,a,u)}function gt(t,e,r,n,i){const o=ge(e,ve),a=Wt.getCompiledRuleId(r,n,i.repository);for(const u of o)t.push({debugSelector:e,matcher:u.matcher,ruleId:a,grammar:i,priority:u.priority})}function ve(t,e){if(e.length<t.length)return!1;let r=0;return t.every(n=>{for(let i=r;i<e.length;i++)if(sn(e[i],n))return r=i+1,!0;return!1})}function sn(t,e){if(!t)return!1;if(t===e)return!0;const r=e.length;return t.length>r&&t.substr(0,r)===e&&t[r]==="."}var ln=class{constructor(t,e,r,n,i,o,a,u){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new Xr(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=yt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const s of Object.keys(i)){const c=ge(s,ve);for(const m of c)this._tokenTypeMatchers.push({matcher:m.matcher,type:i[s]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],r=this._rootScopeName,n=t.lookup(r);if(n){const i=n.injections;if(i)for(let a in i)gt(e,a,i[a],this,n);const o=this._grammarRepository.injections(r);o&&o.forEach(a=>{const u=this.getExternalGrammar(a);if(u){const s=u.injectionSelector;s&>(e,s,u,this,u)}})}return e.sort((i,o)=>i.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,r=t(e);return this._ruleId2desc[e]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=yt(r,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,r=0){const n=this._tokenize(t,e,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(t,e,r=0){const n=this._tokenize(t,e,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(t,e,r,n){this._rootId===-1&&(this._rootId=Wt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===We.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),p=Y.set(0,c.languageId,c.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=ee.createRootAndLookUpScopeName(f,p,this):d=ee.createRoot("unknown",p),e=new We(null,this._rootId,-1,-1,!1,null,d,d)}else i=!1,e.reset();t=t+`
|
|
4
4
|
`;const o=this.createOnigString(t),a=o.content.length,u=new cn(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),s=zt(this,o,i,0,e,u,!0,n);return $t(o),{lineLength:a,lineTokens:u,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function yt(t,e){return t=Sr(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ee=class M{constructor(e,r,n){this.parent=e,this.scopePath=r,this.tokenAttributes=n}static fromExtension(e,r){let n=e,i=e?.scopePath??null;for(const o of r)i=Ce.push(i,o.scopeNames),n=new M(n,i,o.encodedTokenAttributes);return n}static createRoot(e,r){return new M(null,new Ce(null,e),r)}static createRootAndLookUpScopeName(e,r,n){const i=n.getMetadataForScope(e),o=new Ce(null,e),a=n.themeProvider.themeMatch(o),u=M.mergeAttributes(r,i,a);return new M(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return M.equals(this,e)}static equals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.scopeName!==r.scopeName||e.tokenAttributes!==r.tokenAttributes)return!1;e=e.parent,r=r.parent}while(!0)}static mergeAttributes(e,r,n){let i=-1,o=0,a=0;return n!==null&&(i=n.fontStyle,o=n.foregroundId,a=n.backgroundId),Y.set(e,r.languageId,r.tokenType,null,i,o,a)}pushAttributed(e,r){if(e===null)return this;if(e.indexOf(" ")===-1)return M._pushAttributed(this,e,r);const n=e.split(/ /g);let i=this;for(const o of n)i=M._pushAttributed(i,o,r);return i}static _pushAttributed(e,r,n){const i=n.getMetadataForScope(r),o=e.scopePath.push(r),a=n.themeProvider.themeMatch(o),u=M.mergeAttributes(e.tokenAttributes,i,a);return new M(e,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?r.reverse():void 0}},We=class U{constructor(e,r,n,i,o,a,u,s){this.parent=e,this.ruleId=r,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=u,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new U(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:U._equals(this,e)}static _equals(e,r){return e===r?!0:this._structuralEquals(e,r)?ee.equals(e.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.depth!==r.depth||e.ruleId!==r.ruleId||e.endRule!==r.endRule)return!1;e=e.parent,r=r.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){U._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,r,n,i,o,a,u){return new U(this,e,r,n,i,o,a,u)}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,r){return this.parent&&(r=this.parent._writeString(e,r)),e[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}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 U(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let r=this;for(;r&&r._enterPos===e._enterPos;){if(r.ruleId===e.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,r){const n=ee.fromExtension(e?.nameScopesList??null,r.nameScopesList);return new U(e,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,ee.fromExtension(n,r.contentNameScopesList))}},un=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(r=>r==="*"?(this.allowAny=!0,[]):ge(r,ve).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(r=>ge(r,ve).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},cn=class{constructor(t,e,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=t,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(n=Y.set(n,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(n=Y.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=e;return}const r=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:r}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},mn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,r,n,i){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,an(t,o,e,r,n,i,this,this._onigLib))}return this._grammars.get(t)}},pn=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new mn(_e.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,r){this._syncRegistry.setTheme(_e.createFromRawTheme(e,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,r,n){return this.loadGrammarWithConfiguration(e,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,r,n){return this._loadGrammar(e,r,n.embeddedLanguages,n.tokenTypes,new un(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,r,n,i,o){const a=new jr(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(u=>this._loadSingleGrammar(u.scopeName)),a.processQueue();return this._grammarForScopeName(e,r,n,i,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const r=this._options.loadGrammar(e);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(e,r=[],n=0,i=null){return this._syncRegistry.addGrammar(e,r),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,r=0,n=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,r,n,i,o)}},Fe=We.NULL;const dn=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class le{constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}}le.prototype.normal={};le.prototype.property={};le.prototype.space=void 0;function Kt(t,e){const r={},n={};for(const i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new le(r,n,e)}function ze(t){return t.toLowerCase()}class D{constructor(e,r){this.attribute=r,this.property=e}}D.prototype.attribute="";D.prototype.booleanish=!1;D.prototype.boolean=!1;D.prototype.commaOrSpaceSeparated=!1;D.prototype.commaSeparated=!1;D.prototype.defined=!1;D.prototype.mustUseProperty=!1;D.prototype.number=!1;D.prototype.overloadedBoolean=!1;D.prototype.property="";D.prototype.spaceSeparated=!1;D.prototype.space=void 0;let hn=0;const T=W(),S=W(),qe=W(),_=W(),L=W(),q=W(),x=W();function W(){return 2**++hn}const Ke=Object.freeze(Object.defineProperty({__proto__:null,boolean:T,booleanish:S,commaOrSpaceSeparated:x,commaSeparated:q,number:_,overloadedBoolean:qe,spaceSeparated:L},Symbol.toStringTag,{value:"Module"})),Ne=Object.keys(Ke);class Qe extends D{constructor(e,r,n,i){let o=-1;if(super(e,r),Et(this,"space",i),typeof n=="number")for(;++o<Ne.length;){const a=Ne[o];Et(this,Ne[o],(n&Ke[a])===Ke[a])}}}Qe.prototype.defined=!0;function Et(t,e,r){r&&(t[e]=r)}function J(t){const e={},r={};for(const[n,i]of Object.entries(t.properties)){const o=new Qe(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(o.mustUseProperty=!0),e[n]=o,r[ze(n)]=n,r[ze(o.attribute)]=n}return new le(e,r,t.space)}const Yt=J({properties:{ariaActiveDescendant:null,ariaAtomic:S,ariaAutoComplete:null,ariaBusy:S,ariaChecked:S,ariaColCount:_,ariaColIndex:_,ariaColSpan:_,ariaControls:L,ariaCurrent:null,ariaDescribedBy:L,ariaDetails:null,ariaDisabled:S,ariaDropEffect:L,ariaErrorMessage:null,ariaExpanded:S,ariaFlowTo:L,ariaGrabbed:S,ariaHasPopup:null,ariaHidden:S,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:L,ariaLevel:_,ariaLive:null,ariaModal:S,ariaMultiLine:S,ariaMultiSelectable:S,ariaOrientation:null,ariaOwns:L,ariaPlaceholder:null,ariaPosInSet:_,ariaPressed:S,ariaReadOnly:S,ariaRelevant:null,ariaRequired:S,ariaRoleDescription:L,ariaRowCount:_,ariaRowIndex:_,ariaRowSpan:_,ariaSelected:S,ariaSetSize:_,ariaSort:null,ariaValueMax:_,ariaValueMin:_,ariaValueNow:_,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Jt(t,e){return e in t?t[e]:e}function Xt(t,e){return Jt(t,e.toLowerCase())}const fn=J({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:L,accessKey:L,action:null,allow:null,allowFullScreen:T,allowPaymentRequest:T,allowUserMedia:T,alt:null,as:null,async:T,autoCapitalize:null,autoComplete:L,autoFocus:T,autoPlay:T,blocking:L,capture:null,charSet:null,checked:T,cite:null,className:L,cols:_,colSpan:null,content:null,contentEditable:S,controls:T,controlsList:L,coords:_|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:T,defer:T,dir:null,dirName:null,disabled:T,download:qe,draggable:S,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:T,formTarget:null,headers:L,height:_,hidden:qe,high:_,href:null,hrefLang:null,htmlFor:L,httpEquiv:L,id:null,imageSizes:null,imageSrcSet:null,inert:T,inputMode:null,integrity:null,is:null,isMap:T,itemId:null,itemProp:L,itemRef:L,itemScope:T,itemType:L,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:T,low:_,manifest:null,max:null,maxLength:_,media:null,method:null,min:null,minLength:_,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:_,pattern:null,ping:L,placeholder:null,playsInline:T,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:T,referrerPolicy:null,rel:L,required:T,reversed:T,rows:_,rowSpan:_,sandbox:L,scope:null,scoped:T,seamless:T,selected:T,shadowRootClonable:T,shadowRootDelegatesFocus:T,shadowRootMode:null,shape:null,size:_,sizes:null,slot:null,span:_,spellCheck:S,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_,step:null,style:null,tabIndex:_,target:null,title:null,translate:null,type:null,typeMustMatch:T,useMap:null,value:S,width:_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:L,axis:null,background:null,bgColor:null,border:_,borderColor:null,bottomMargin:_,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:_,leftMargin:_,link:null,longDesc:null,lowSrc:null,marginHeight:_,marginWidth:_,noResize:T,noHref:T,noShade:T,noWrap:T,object:null,profile:null,prompt:null,rev:null,rightMargin:_,rules:null,scheme:null,scrolling:S,standby:null,summary:null,text:null,topMargin:_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:T,disableRemotePlayback:T,prefix:null,property:null,results:_,security:null,unselectable:null},space:"html",transform:Xt}),_n=J({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:x,accentHeight:_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_,amplitude:_,arabicForm:null,ascent:_,attributeName:null,attributeType:null,azimuth:_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_,by:null,calcMode:null,capHeight:_,className:L,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:_,diffuseConstant:_,direction:null,display:null,dur:null,divisor:_,dominantBaseline:null,download:T,dx:null,dy:null,edgeMode:null,editable:null,elevation:_,enableBackground:null,end:null,event:null,exponent:_,externalResourcesRequired:null,fill:null,fillOpacity:_,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:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_,horizOriginX:_,horizOriginY:_,id:null,ideographic:_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_,k:_,k1:_,k2:_,k3:_,k4:_,kernelMatrix:x,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_,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:_,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:_,overlineThickness:_,paintOrder:null,panose1:null,path:null,pathLength:_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:L,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_,pointsAtY:_,pointsAtZ:_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:x,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:x,rev:x,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:x,requiredFeatures:x,requiredFonts:x,requiredFormats:x,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:_,specularExponent:_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_,strikethroughThickness:_,string:null,stroke:null,strokeDashArray:x,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_,strokeOpacity:_,strokeWidth:null,style:null,surfaceScale:_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:x,tabIndex:_,tableValues:null,target:null,targetX:_,targetY:_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:x,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_,underlineThickness:_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_,values:null,vAlphabetic:_,vMathematical:_,vectorEffect:null,vHanging:_,vIdeographic:_,version:null,vertAdvY:_,vertOriginX:_,vertOriginY:_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Jt}),Qt=J({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Zt=J({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xt}),er=J({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),gn=/[A-Z]/g,vt=/-[a-z]/g,yn=/^data[-\w.:]+$/i;function En(t,e){const r=ze(e);let n=e,i=D;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&yn.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(vt,bn);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!vt.test(o)){let a=o.replace(gn,vn);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=Qe}return new i(n,e)}function vn(t){return"-"+t.toLowerCase()}function bn(t){return t.charAt(1).toUpperCase()}const Tn=Kt([Yt,fn,Qt,Zt,er],"html"),tr=Kt([Yt,_n,Qt,Zt,er],"svg"),bt={}.hasOwnProperty;function Rn(t,e){const r=e||{};function n(i,...o){let a=n.invalid;const u=n.handlers;if(i&&bt.call(i,t)){const s=String(i[t]);a=bt.call(u,s)?u[s]:n.unknown}if(a)return a.call(this,i,...o)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const Ln=/["&'<>`]/g,An=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Sn=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pn=/[|\\{}()[\]^$+*?.]/g,Tt=new WeakMap;function kn(t,e){if(t=t.replace(e.subset?In(e.subset):Ln,n),e.subset||e.escapeOnly)return t;return t.replace(An,r).replace(Sn,n);function r(i,o,a){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(o+2),e)}function n(i,o,a){return e.format(i.charCodeAt(0),a.charCodeAt(o+1),e)}}function In(t){let e=Tt.get(t);return e||(e=wn(t),Tt.set(t,e)),e}function wn(t){const e=[];let r=-1;for(;++r<t.length;)e.push(t[r].replace(Pn,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const On=/[\dA-Fa-f]/;function Cn(t,e,r){const n="&#x"+t.toString(16).toUpperCase();return r&&e&&!On.test(String.fromCharCode(e))?n:n+";"}const Dn=/\d/;function Nn(t,e,r){const n="&#"+String(t);return r&&e&&!Dn.test(String.fromCharCode(e))?n:n+";"}const xn=["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"],xe={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:"€"},Vn=["cent","copy","divide","gt","lt","not","para","times"],rr={}.hasOwnProperty,Ye={};let ce;for(ce in xe)rr.call(xe,ce)&&(Ye[xe[ce]]=ce);const Mn=/[^\dA-Za-z]/;function Bn(t,e,r,n){const i=String.fromCharCode(t);if(rr.call(Ye,i)){const o=Ye[i],a="&"+o;return r&&xn.includes(o)&&!Vn.includes(o)&&(!n||e&&e!==61&&Mn.test(String.fromCharCode(e)))?a:a+";"}return""}function Gn(t,e,r){let n=Cn(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=Bn(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const o=Nn(t,e,r.omitOptionalSemicolons);o.length<n.length&&(n=o)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function K(t,e){return kn(t,Object.assign({format:Gn},e))}const jn=/^>|^->|<!--|-->|--!>|<!-$/g,$n=[">"],Un=["<",">"];function Hn(t,e,r,n){return n.settings.bogusComments?"<?"+K(t.value,Object.assign({},n.settings.characterReferences,{subset:$n}))+">":"<!--"+t.value.replace(jn,i)+"-->";function i(o){return K(o,Object.assign({},n.settings.characterReferences,{subset:Un}))}}function Wn(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function Rt(t,e){const r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}function Fn(t,e){const r=e||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function zn(t){return t.join(" ").trim()}const qn=/[ \t\n\f\r]/g;function Ze(t){return typeof t=="object"?t.type==="text"?Lt(t.value):!1:Lt(t)}function Lt(t){return t.replace(qn,"")===""}const I=ir(1),nr=ir(-1),Kn=[];function ir(t){return e;function e(r,n,i){const o=r?r.children:Kn;let a=(n||0)+t,u=o[a];if(!i)for(;u&&Ze(u);)a+=t,u=o[a];return u}}const Yn={}.hasOwnProperty;function or(t){return e;function e(r,n,i){return Yn.call(t,r.tagName)&&t[r.tagName](r,n,i)}}const et=or({body:Xn,caption:Ve,colgroup:Ve,dd:ti,dt:ei,head:Ve,html:Jn,li:Zn,optgroup:ri,option:ni,p:Qn,rp:At,rt:At,tbody:oi,td:St,tfoot:ai,th:St,thead:ii,tr:si});function Ve(t,e,r){const n=I(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Ze(n.value.charAt(0)))}function Jn(t,e,r){const n=I(r,e);return!n||n.type!=="comment"}function Xn(t,e,r){const n=I(r,e);return!n||n.type!=="comment"}function Qn(t,e,r){const n=I(r,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"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function Zn(t,e,r){const n=I(r,e);return!n||n.type==="element"&&n.tagName==="li"}function ei(t,e,r){const n=I(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ti(t,e,r){const n=I(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function At(t,e,r){const n=I(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function ri(t,e,r){const n=I(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ni(t,e,r){const n=I(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function ii(t,e,r){const n=I(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function oi(t,e,r){const n=I(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function ai(t,e,r){return!I(r,e)}function si(t,e,r){const n=I(r,e);return!n||n.type==="element"&&n.tagName==="tr"}function St(t,e,r){const n=I(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const li=or({body:mi,colgroup:pi,head:ci,html:ui,tbody:di});function ui(t){const e=I(t,-1);return!e||e.type!=="comment"}function ci(t){const e=new Set;for(const n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const r=t.children[0];return!r||r.type==="element"}function mi(t){const e=I(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Ze(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function pi(t,e,r){const n=nr(r,e),i=I(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&et(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function di(t,e,r){const n=nr(r,e),i=I(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&et(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const me={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"bd99c09c-d991-4bcb-8c66-ab2088e1da03","timestamp":1772218681776}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"bd99c09c-d991-4bcb-8c66-ab2088e1da03","timestamp":1772218681776,"prerendered":[]}
|