@jamiexiongr/panda-hub 0.1.31 → 0.1.32

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.
@@ -1 +1 @@
1
- import{r as h,j as c}from"./index-2xq-OQM2.js";import{H as d,t as N,j as b,c as k,a as j,m as x,x as v}from"./xml-COG-BRHv.js";d.registerLanguage("typescript",N);d.registerLanguage("javascript",b);d.registerLanguage("css",k);d.registerLanguage("json",j);d.registerLanguage("markdown",x);d.registerLanguage("xml",v);const w=new Map,y=new Map,_=300,W=(s,e,a)=>{const i=s.get(e);if(i!==void 0)return s.delete(e),s.set(e,i),i;const r=a();if(s.set(e,r),s.size>_){const u=s.keys().next().value;u&&s.delete(u)}return r},C=s=>{const e=s.toLowerCase();return e.endsWith(".ts")||e.endsWith(".tsx")||e.endsWith(".mts")||e.endsWith(".cts")?"typescript":e.endsWith(".js")||e.endsWith(".jsx")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".css")||e.endsWith(".scss")||e.endsWith(".less")?"css":e.endsWith(".html")||e.endsWith(".svg")||e.endsWith(".xml")?"xml":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":null},m=s=>s.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),H=s=>W(w,s,()=>{const e=s.split(/\r?\n/),a=[];let i=null,r=null;for(const l of e){const t=l.replace(/\r$/,""),n=t.trimStart(),o=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(n);if(n.startsWith("@@")){o&&(i=Number(o[1]),r=Number(o[2]));continue}if(!(t.startsWith("diff --git ")||t.startsWith("index ")||t.startsWith("--- ")||t.startsWith("+++ ")||t.startsWith("*** "))){if(t.startsWith("+")&&!t.startsWith("+++")){a.push({kind:"add",content:t.slice(1),oldLineNumber:null,newLineNumber:r,displayLineNumber:r}),r!==null&&(r+=1);continue}if(t.startsWith("-")&&!t.startsWith("---")){a.push({kind:"remove",content:t.slice(1),oldLineNumber:i,newLineNumber:null,displayLineNumber:i}),i!==null&&(i+=1);continue}a.push({kind:"context",content:t.startsWith(" ")?t.slice(1):t,oldLineNumber:i,newLineNumber:r,displayLineNumber:r??i}),i!==null&&(i+=1),r!==null&&(r+=1)}}if(!a.some(l=>(l.kind==="add"||l.kind==="remove"||l.kind==="context")&&l.displayLineNumber!==null)){let l=1;for(const t of a)(t.kind==="add"||t.kind==="remove"||t.kind==="context")&&(t.displayLineNumber=l,l+=1)}return a}),$=(s,e)=>W(y,`${e}\0${s}`,()=>{const a=C(e);if(!a||!s.trim())return m(s);try{return d.highlight(s,{language:a,ignoreIllegals:!0}).value}catch{return m(s)}}),L=s=>s.kind==="meta"||s.kind==="hunk",R=h.memo(function({diffText:e,filePath:a,emptyMessage:i}){const r=h.useMemo(()=>H(e),[e]),u=r.length>180||e.length>16e3,[l,t]=h.useState(!u);return h.useEffect(()=>{var g;if(!u){t(!0);return}t(!1);const n=window,o=(g=n.requestIdleCallback)==null?void 0:g.call(n,()=>{t(!0)},{timeout:220}),f=o===void 0?window.setTimeout(()=>{t(!0)},32):null;return()=>{var p;o!==void 0&&((p=n.cancelIdleCallback)==null||p.call(n,o)),f!==null&&window.clearTimeout(f)}},[e,u]),e.trim()?c.jsx("div",{className:"patch-diff",children:r.map((n,o)=>c.jsxs("div",{className:`patch-diff__line is-${n.kind} ${L(n)?"is-meta-block":""}`,children:[L(n)?null:c.jsx("span",{className:"patch-diff__number",children:n.displayLineNumber??""}),c.jsx("span",{className:"patch-diff__content",dangerouslySetInnerHTML:{__html:l?$(n.content||" ",a):m(n.content||" ")}})]},`${n.kind}-${o}-${n.oldLineNumber??"x"}-${n.newLineNumber??"y"}`))}):c.jsx("div",{className:"patch-file-card__empty",children:i})});export{R as SessionDiffPreview};
1
+ import{r as h,j as c}from"./index-Buoz6IYL.js";import{H as d,t as N,j as b,c as k,a as j,m as x,x as v}from"./xml-BJn4g2Sn.js";d.registerLanguage("typescript",N);d.registerLanguage("javascript",b);d.registerLanguage("css",k);d.registerLanguage("json",j);d.registerLanguage("markdown",x);d.registerLanguage("xml",v);const w=new Map,y=new Map,_=300,W=(s,e,a)=>{const i=s.get(e);if(i!==void 0)return s.delete(e),s.set(e,i),i;const r=a();if(s.set(e,r),s.size>_){const u=s.keys().next().value;u&&s.delete(u)}return r},C=s=>{const e=s.toLowerCase();return e.endsWith(".ts")||e.endsWith(".tsx")||e.endsWith(".mts")||e.endsWith(".cts")?"typescript":e.endsWith(".js")||e.endsWith(".jsx")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".css")||e.endsWith(".scss")||e.endsWith(".less")?"css":e.endsWith(".html")||e.endsWith(".svg")||e.endsWith(".xml")?"xml":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":null},m=s=>s.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),H=s=>W(w,s,()=>{const e=s.split(/\r?\n/),a=[];let i=null,r=null;for(const l of e){const t=l.replace(/\r$/,""),n=t.trimStart(),o=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(n);if(n.startsWith("@@")){o&&(i=Number(o[1]),r=Number(o[2]));continue}if(!(t.startsWith("diff --git ")||t.startsWith("index ")||t.startsWith("--- ")||t.startsWith("+++ ")||t.startsWith("*** "))){if(t.startsWith("+")&&!t.startsWith("+++")){a.push({kind:"add",content:t.slice(1),oldLineNumber:null,newLineNumber:r,displayLineNumber:r}),r!==null&&(r+=1);continue}if(t.startsWith("-")&&!t.startsWith("---")){a.push({kind:"remove",content:t.slice(1),oldLineNumber:i,newLineNumber:null,displayLineNumber:i}),i!==null&&(i+=1);continue}a.push({kind:"context",content:t.startsWith(" ")?t.slice(1):t,oldLineNumber:i,newLineNumber:r,displayLineNumber:r??i}),i!==null&&(i+=1),r!==null&&(r+=1)}}if(!a.some(l=>(l.kind==="add"||l.kind==="remove"||l.kind==="context")&&l.displayLineNumber!==null)){let l=1;for(const t of a)(t.kind==="add"||t.kind==="remove"||t.kind==="context")&&(t.displayLineNumber=l,l+=1)}return a}),$=(s,e)=>W(y,`${e}\0${s}`,()=>{const a=C(e);if(!a||!s.trim())return m(s);try{return d.highlight(s,{language:a,ignoreIllegals:!0}).value}catch{return m(s)}}),L=s=>s.kind==="meta"||s.kind==="hunk",R=h.memo(function({diffText:e,filePath:a,emptyMessage:i}){const r=h.useMemo(()=>H(e),[e]),u=r.length>180||e.length>16e3,[l,t]=h.useState(!u);return h.useEffect(()=>{var g;if(!u){t(!0);return}t(!1);const n=window,o=(g=n.requestIdleCallback)==null?void 0:g.call(n,()=>{t(!0)},{timeout:220}),f=o===void 0?window.setTimeout(()=>{t(!0)},32):null;return()=>{var p;o!==void 0&&((p=n.cancelIdleCallback)==null||p.call(n,o)),f!==null&&window.clearTimeout(f)}},[e,u]),e.trim()?c.jsx("div",{className:"patch-diff",children:r.map((n,o)=>c.jsxs("div",{className:`patch-diff__line is-${n.kind} ${L(n)?"is-meta-block":""}`,children:[L(n)?null:c.jsx("span",{className:"patch-diff__number",children:n.displayLineNumber??""}),c.jsx("span",{className:"patch-diff__content",dangerouslySetInnerHTML:{__html:l?$(n.content||" ",a):m(n.content||" ")}})]},`${n.kind}-${o}-${n.oldLineNumber??"x"}-${n.newLineNumber??"y"}`))}):c.jsx("div",{className:"patch-file-card__empty",children:i})});export{R as SessionDiffPreview};
@@ -1,4 +1,4 @@
1
- import{r as x,j as i,p as _}from"./index-2xq-OQM2.js";import{g as M}from"./session-file-preview-page-DCpn44mO.js";import"./xml-COG-BRHv.js";const w=l=>l.replace(/\\/g,"/").replace(/^\/+/,"").replace(/\/{2,}/g,"/"),b=(l,t)=>{const r=t.trim();if(!r||/^([a-z]+:|#)/i.test(r)||r.startsWith("//"))return null;try{const h=w(l).split("/").slice(0,-1).join("/"),a=new URL(r,`https://preview.local/${h?`${h}/`:""}`);return w(a.pathname)}catch{return null}},f=l=>l.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(t=>t.trim()),v=l=>{var h,a,o,n;const t=/^\s*(\d+)\.\s+(.+)$/.exec(l);if(t){const e=/^\[( |x|X)\]\s+(.+)$/.exec(t[2]??"");return{ordered:!0,ordinal:Number.parseInt(t[1]??"",10),checked:e?e[1].toLowerCase()==="x":null,text:((h=e==null?void 0:e[2])==null?void 0:h.trim())??((a=t[2])==null?void 0:a.trim())??""}}const r=/^\s*[-*+]\s+(.+)$/.exec(l);if(r){const e=/^\[( |x|X)\]\s+(.+)$/.exec(r[1]??"");return{ordered:!1,ordinal:null,checked:e?e[1].toLowerCase()==="x":null,text:((o=e==null?void 0:e[2])==null?void 0:o.trim())??((n=r[1])==null?void 0:n.trim())??""}}return null},L=l=>{var o;const t=l.replace(/\r\n/g,`
1
+ import{r as x,j as i,p as _}from"./index-Buoz6IYL.js";import{g as M}from"./session-file-preview-page-DbdsZil_.js";import"./xml-BJn4g2Sn.js";const w=l=>l.replace(/\\/g,"/").replace(/^\/+/,"").replace(/\/{2,}/g,"/"),b=(l,t)=>{const r=t.trim();if(!r||/^([a-z]+:|#)/i.test(r)||r.startsWith("//"))return null;try{const h=w(l).split("/").slice(0,-1).join("/"),a=new URL(r,`https://preview.local/${h?`${h}/`:""}`);return w(a.pathname)}catch{return null}},f=l=>l.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(t=>t.trim()),v=l=>{var h,a,o,n;const t=/^\s*(\d+)\.\s+(.+)$/.exec(l);if(t){const e=/^\[( |x|X)\]\s+(.+)$/.exec(t[2]??"");return{ordered:!0,ordinal:Number.parseInt(t[1]??"",10),checked:e?e[1].toLowerCase()==="x":null,text:((h=e==null?void 0:e[2])==null?void 0:h.trim())??((a=t[2])==null?void 0:a.trim())??""}}const r=/^\s*[-*+]\s+(.+)$/.exec(l);if(r){const e=/^\[( |x|X)\]\s+(.+)$/.exec(r[1]??"");return{ordered:!1,ordinal:null,checked:e?e[1].toLowerCase()==="x":null,text:((o=e==null?void 0:e[2])==null?void 0:o.trim())??((n=r[1])==null?void 0:n.trim())??""}}return null},L=l=>{var o;const t=l.replace(/\r\n/g,`
2
2
  `).split(`
3
3
  `),r=[];let h=[];const a=()=>{const n=h.join(`
4
4
  `).trim();n&&r.push({kind:"paragraph",text:n}),h=[]};for(let n=0;n<t.length;n+=1){const e=t[n]??"";if(!e.trim()){a();continue}const c=/^\s{0,3}(```+|~~~+)[ \t]*([^`]*)$/.exec(e);if(c){a();const m=c[1]??"```",p=((o=c[2])==null?void 0:o.trim().split(/\s+/,1)[0])??null,j=[],k=new RegExp(`^\\s{0,3}${m}\\s*$`);for(n+=1;n<t.length&&!k.test(t[n]??"");)j.push(t[n]??""),n+=1;r.push({kind:"code",language:p,text:j.join(`
@@ -0,0 +1,38 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/session-file-markdown-preview-BoOjcJcb.js","assets/index-Buoz6IYL.js","assets/index-qres5phQ.css","assets/xml-BJn4g2Sn.js"])))=>i.map(i=>d[i]);
2
+ var pe=e=>{throw TypeError(e)};var te=(e,s,t)=>s.has(e)||pe("Cannot "+t);var f=(e,s,t)=>(te(e,s,"read from private field"),t?t.call(e):s.get(e)),R=(e,s,t)=>s.has(e)?pe("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),x=(e,s,t,n)=>(te(e,s,"write to private field"),n?n.call(e,t):s.set(e,t),t),I=(e,s,t)=>(te(e,s,"access private method"),t);import{S as Ae,n as re,s as Pe,a as je,Q as Ne,b as xe,c as De,d as $e,r as l,e as Fe,f as Be,g as ze,h as He,i as ge,k as Qe,l as We,m as j,q as Se,o as ke,p as Ke,j as r,X as Oe,C as Ue,t as qe,_ as Ye}from"./index-Buoz6IYL.js";import{H as A,c as Ge,j as Ve,a as Xe,m as Ze,t as Je,x as es}from"./xml-BJn4g2Sn.js";function _e(e,s){const t=new Set(s);return e.filter(n=>!t.has(n))}function ss(e,s,t){const n=e.slice(0);return n[s]=t,n}var $,O,F,B,C,P,K,U,q,Y,N,ae,oe,ce,le,ue,Ee,ts=(Ee=class extends Ae{constructor(s,t,n){super();R(this,N);R(this,$);R(this,O);R(this,F);R(this,B);R(this,C);R(this,P);R(this,K);R(this,U);R(this,q);R(this,Y,[]);x(this,$,s),x(this,B,n),x(this,F,[]),x(this,C,[]),x(this,O,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&f(this,C).forEach(s=>{s.subscribe(t=>{I(this,N,le).call(this,s,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,f(this,C).forEach(s=>{s.destroy()})}setQueries(s,t){x(this,F,s),x(this,B,t),re.batch(()=>{const n=f(this,C),i=I(this,N,ce).call(this,f(this,F));i.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const c=i.map(m=>m.observer),a=c.map(m=>m.getCurrentResult()),d=n.length!==c.length,p=c.some((m,E)=>m!==n[E]),_=d||p,S=_?!0:a.some((m,E)=>{const u=f(this,O)[E];return!u||!Pe(m,u)});!_&&!S||(_&&(x(this,Y,i),x(this,C,c)),x(this,O,a),this.hasListeners()&&(_&&(_e(n,c).forEach(m=>{m.destroy()}),_e(c,n).forEach(m=>{m.subscribe(E=>{I(this,N,le).call(this,m,E)})})),I(this,N,ue).call(this)))})}getCurrentResult(){return f(this,O)}getQueries(){return f(this,C).map(s=>s.getCurrentQuery())}getObservers(){return f(this,C)}getOptimisticResult(s,t){const n=I(this,N,ce).call(this,s),i=n.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),c=n.map(a=>a.defaultedQueryOptions.queryHash);return[i,a=>I(this,N,oe).call(this,a??i,t,c),()=>I(this,N,ae).call(this,i,n)]}},$=new WeakMap,O=new WeakMap,F=new WeakMap,B=new WeakMap,C=new WeakMap,P=new WeakMap,K=new WeakMap,U=new WeakMap,q=new WeakMap,Y=new WeakMap,N=new WeakSet,ae=function(s,t){return t.map((n,i)=>{const c=s[i];return n.defaultedQueryOptions.notifyOnChangeProps?c:n.observer.trackResult(c,a=>{t.forEach(d=>{d.observer.trackProp(a)})})})},oe=function(s,t,n){if(t){const i=f(this,q),c=n!==void 0&&i!==void 0&&(i.length!==n.length||n.some((a,d)=>a!==i[d]));return(!f(this,P)||f(this,O)!==f(this,U)||c||t!==f(this,K))&&(x(this,K,t),x(this,U,f(this,O)),n!==void 0&&x(this,q,n),x(this,P,je(f(this,P),t(s)))),f(this,P)}return s},ce=function(s){const t=new Map;f(this,C).forEach(i=>{const c=i.options.queryHash;if(!c)return;const a=t.get(c);a?a.push(i):t.set(c,[i])});const n=[];return s.forEach(i=>{var p;const c=f(this,$).defaultQueryOptions(i),d=((p=t.get(c.queryHash))==null?void 0:p.shift())??new Ne(f(this,$),c);n.push({defaultedQueryOptions:c,observer:d})}),n},le=function(s,t){const n=f(this,C).indexOf(s);n!==-1&&(x(this,O,ss(f(this,O),n,t)),I(this,N,ue).call(this))},ue=function(){var s;if(this.hasListeners()){const t=f(this,P),n=I(this,N,ae).call(this,f(this,O),f(this,Y)),i=I(this,N,oe).call(this,n,(s=f(this,B))==null?void 0:s.combine);t!==i&&re.batch(()=>{this.listeners.forEach(c=>{c(f(this,O))})})}},Ee);function ns({queries:e,...s},t){const n=xe(),i=De(),c=$e(),a=l.useMemo(()=>e.map(h=>{const y=n.defaultQueryOptions(h);return y._optimisticResults=i?"isRestoring":"optimistic",y}),[e,n,i]);a.forEach(h=>{Fe(h);const y=n.getQueryCache().get(h.queryHash);Be(h,c,y)}),ze(c);const[d]=l.useState(()=>new ts(n,a,s)),[p,_,S]=d.getOptimisticResult(a,s.combine),m=!i&&s.subscribed!==!1;l.useSyncExternalStore(l.useCallback(h=>m?d.subscribe(re.batchCalls(h)):He,[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),l.useEffect(()=>{d.setQueries(a,s)},[a,s,d]);const u=p.some((h,y)=>ge(a[y],h))?p.flatMap((h,y)=>{const b=a[y];if(b&&ge(b,h)){const M=new Ne(n,b);return Qe(b,M,c)}return[]}):[];if(u.length>0)throw Promise.all(u);const g=p.find((h,y)=>{const b=a[y];return b&&We({result:h,errorResetBoundary:c,throwOnError:b.throwOnError,query:n.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(g!=null&&g.error)throw g.error;return _(S())}/**
3
+ * @license lucide-react v0.577.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const is=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rs=j("chevron-left",is);/**
8
+ * @license lucide-react v0.577.0 - ISC
9
+ *
10
+ * This source code is licensed under the ISC license.
11
+ * See the LICENSE file in the root directory of this source tree.
12
+ */const as=[["path",{d:"M14 22h4a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v6",key:"14cnrg"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M5 14a1 1 0 0 0-1 1v2a1 1 0 0 1-1 1 1 1 0 0 1 1 1v2a1 1 0 0 0 1 1",key:"sr0ebq"}],["path",{d:"M9 22a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-2a1 1 0 0 0-1-1",key:"w793db"}]],os=j("file-braces-corner",as);/**
13
+ * @license lucide-react v0.577.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */const cs=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],ls=j("file-code-corner",cs);/**
18
+ * @license lucide-react v0.577.0 - ISC
19
+ *
20
+ * This source code is licensed under the ISC license.
21
+ * See the LICENSE file in the root directory of this source tree.
22
+ */const us=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],ds=j("file-image",us);/**
23
+ * @license lucide-react v0.577.0 - ISC
24
+ *
25
+ * This source code is licensed under the ISC license.
26
+ * See the LICENSE file in the root directory of this source tree.
27
+ */const hs=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ms=j("file-text",hs);/**
28
+ * @license lucide-react v0.577.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const fs=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ps=j("file",fs);/**
33
+ * @license lucide-react v0.577.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */const gs=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],_s=j("folder",gs);function bs(e){const s=e.regex,t={},n={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},c=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),a={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,i]};i.contains.push(d);const p={match:/\\"/},_={className:"string",begin:/'/,end:/'/},S={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]},E=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],u=e.SHEBANG({binary:`(${E.join("|")})`,relevance:10}),g={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},h=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],y=["true","false"],b={match:/(\/[a-z._-]+)+/},M=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],G=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],T=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],z=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:h,literal:y,built_in:[...M,...G,"set","shopt",...T,...z]},contains:[u,e.SHEBANG(),g,m,c,a,b,d,p,_,S,t]}}var D="[0-9](_*[0-9])*",J=`\\.(${D})`,ee="[0-9a-fA-F](_*[0-9a-fA-F])*",be={className:"number",variants:[{begin:`(\\b(${D})((${J})|\\.)?|(${J}))[eE][+-]?(${D})[fFdD]?\\b`},{begin:`\\b(${D})((${J})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${J})[fFdD]?\\b`},{begin:`\\b(${D})[fFdD]\\b`},{begin:`\\b0[xX]((${ee})\\.?|(${ee})?\\.(${ee}))[pP][+-]?(${D})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ee})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Re(e,s,t){return t===-1?"":e.replace(s,n=>Re(e,s,t-1))}function vs(e){const s=e.regex,t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=t+Re("(?:<"+t+"~~~(?:\\s*,\\s*"+t+"~~~)*>)?",/~~~/g,2),p={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},_={className:"meta",begin:"@"+t,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},S={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,t],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[s.concat(/(?!else)/,t),/\s+/,t,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,t],className:{1:"keyword",3:"title.class"},contains:[S,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+n+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[_,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,be,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},be,_]}}function ys(e){const s="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",n={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},c={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},a={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,i]},d=e.inherit(a,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),E={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},u={end:",",endsWithParent:!0,excludeEnd:!0,keywords:s,relevance:0},g={begin:/\{/,end:/\}/,contains:[u],illegal:"\\n",relevance:0},h={begin:"\\[",end:"\\]",contains:[u],illegal:"\\n",relevance:0},y=[n,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type",begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:s,keywords:{literal:s}},E,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},g,h,c,a],b=[...y];return b.pop(),b.push(d),u.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:y}}const ws=async e=>(await ke({agentId:e.agentId??void 0,sessionId:e.agentId?void 0:e.sessionId})).client.getSessionFilePreviewTree(e.sessionId,{path:e.path??null}),Es=async e=>(await ke({agentId:e.agentId??void 0,sessionId:e.agentId?void 0:e.sessionId})).client.getSessionFilePreviewContent(e.sessionId,{path:e.path}),Ns=e=>{var s;return["session-file-preview","tree",e.sessionId,((s=e.path)==null?void 0:s.trim())??""]},xs=e=>["session-file-preview","content",e.sessionId,e.path.trim()],Ss=e=>Se({queryKey:Ns(e),enabled:e.enabled??!0,queryFn:()=>ws(e),staleTime:3e4,refetchOnMount:!1,refetchOnWindowFocus:!1,retry:1}),ks=e=>Se({queryKey:xs(e),enabled:e.enabled??!0,queryFn:()=>Es(e),staleTime:3e4,refetchOnMount:!1,refetchOnWindowFocus:!1,retry:1});A.registerLanguage("bash",bs);A.registerLanguage("css",Ge);A.registerLanguage("java",vs);A.registerLanguage("javascript",Ve);A.registerLanguage("json",Xe);A.registerLanguage("markdown",Ze);A.registerLanguage("typescript",Je);A.registerLanguage("xml",es);A.registerLanguage("yaml",ys);const Os=l.lazy(async()=>({default:(await Ye(()=>import("./session-file-markdown-preview-BoOjcJcb.js"),__vite__mapDeps([0,1,2,3]))).SessionFileMarkdownPreview})),ne=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;"),Ce=e=>{const s=e.toLowerCase();return s.endsWith(".ts")||s.endsWith(".tsx")||s.endsWith(".mts")||s.endsWith(".cts")?"typescript":s.endsWith(".js")||s.endsWith(".jsx")||s.endsWith(".mjs")||s.endsWith(".cjs")?"javascript":s.endsWith(".json")?"json":s.endsWith(".css")||s.endsWith(".scss")||s.endsWith(".less")?"css":s.endsWith(".html")||s.endsWith(".svg")||s.endsWith(".xml")?"xml":s.endsWith(".md")||s.endsWith(".markdown")?"markdown":s.endsWith(".yml")||s.endsWith(".yaml")?"yaml":s.endsWith(".sh")?"bash":s.endsWith(".java")?"java":null},Rs=(e,s,t=!1)=>{if(t||!e.trim())return ne(e);const n=Ce(s);if(!n)return ne(e);try{return A.highlight(e,{language:n,ignoreIllegals:!0}).value}catch{return ne(e)}},Cs=(e,s)=>{const t=[{key:"root",label:e,currentPath:null}];if(!s)return t;const n=s.split("/").filter(Boolean);let i=null;for(const c of n)i=i?`${i}/${c}`:c,t.push({key:i,label:c,currentPath:i});return t},ve=e=>{const s=e.split("/").filter(Boolean);return s.length<=1?null:s.slice(0,-1).join("/")},Ms=e=>e.kind==="directory"?_s:e.file_kind==="image"?ds:e.extension===".json"?os:e.file_kind==="code"?ls:e.file_kind==="markdown"||e.file_kind==="text"?ms:ps,Ts=l.memo(function({level:s,isOpen:t,onToggle:n,buttonRef:i}){return r.jsx("div",{className:`session-file-preview-nav__level ${t?"is-open":""}`,children:r.jsxs("button",{ref:i,type:"button",className:"session-file-preview-nav__trigger",onClick:n,"aria-expanded":t,children:[r.jsx("span",{className:"session-file-preview-nav__trigger-label",children:s.label}),r.jsx(Ue,{"aria-hidden":"true"})]})})}),ye=(e,s)=>{s.removeQueries({predicate:t=>{const n=t.queryKey;return Array.isArray(n)&&n[0]==="session-file-preview"&&n[2]===e}})},Is=e=>Math.max(1,Math.min(4,e)),ie=e=>{if(e.length<2)return 0;const s=e.item(0),t=e.item(1);if(!s||!t)return 0;const n=t.clientX-s.clientX,i=t.clientY-s.clientY;return Math.hypot(n,i)},Ls=l.memo(function({src:s,alt:t,onOpen:n}){return r.jsx("button",{type:"button",className:"session-file-preview-viewer__image",onClick:n,"aria-label":"全屏查看图片",children:r.jsx("img",{src:s,alt:t})})}),As=l.memo(function({src:s,alt:t,onClose:n}){const[i,c]=l.useState(1),[a,d]=l.useState({x:0,y:0}),p=l.useRef(null),_=l.useRef(null);l.useEffect(()=>{const u=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=u}},[]),l.useEffect(()=>{const u=g=>{g.key==="Escape"&&n()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[n]),l.useEffect(()=>{i===1&&(a.x!==0||a.y!==0)&&d({x:0,y:0})},[a.x,a.y,i]);const S=u=>{if(u.touches.length>=2){p.current={distance:ie(u.touches),scale:i},_.current=null;return}if(u.touches.length===1&&i>1){const g=u.touches[0];_.current={startX:g.clientX,startY:g.clientY,originX:a.x,originY:a.y}}},m=u=>{if(u.touches.length>=2){const g=p.current;if(!g){p.current={distance:ie(u.touches),scale:i};return}const h=ie(u.touches);if(h<=0||g.distance<=0)return;u.preventDefault(),c(Is(h/g.distance*g.scale));return}if(u.touches.length===1&&_.current&&i>1){const g=u.touches[0];u.preventDefault(),d({x:_.current.originX+(g.clientX-_.current.startX),y:_.current.originY+(g.clientY-_.current.startY)})}},E=()=>{p.current&&i<=1&&c(1),i<=1&&d({x:0,y:0}),p.current=null,_.current=null};return r.jsxs("div",{className:"session-file-preview-lightbox",role:"dialog","aria-modal":"true","aria-label":"图片全屏预览",onClick:n,children:[r.jsx("button",{type:"button",className:"session-file-preview-lightbox__close",onClick:n,"aria-label":"关闭图片预览",children:r.jsx(Oe,{})}),r.jsx("div",{className:"session-file-preview-lightbox__stage",onClick:u=>{u.stopPropagation()},onTouchStart:S,onTouchMove:m,onTouchEnd:E,onTouchCancel:E,children:r.jsx("img",{src:s,alt:t,className:"session-file-preview-lightbox__image",style:{transform:`translate(${a.x}px, ${a.y}px) scale(${i})`}})})]})}),we=l.memo(function({content:s,path:t,plainText:n=!1}){const i=l.useMemo(()=>Rs(s,t,n),[s,t,n]),c=l.useMemo(()=>i.split(`
38
+ `),[i]);return r.jsx("div",{className:"session-file-preview-viewer__code-shell",children:r.jsx("div",{className:"session-file-preview-viewer__code-scroll",children:r.jsx("div",{className:"session-file-preview-viewer__code",role:"presentation",children:c.map((a,d)=>r.jsxs("div",{className:"session-file-preview-viewer__code-line",children:[r.jsx("span",{className:"session-file-preview-viewer__line-number","aria-hidden":"true",children:d+1}),r.jsx("span",{className:"session-file-preview-viewer__line-content",dangerouslySetInnerHTML:{__html:a||" "}})]},`${t}-line-${d+1}`))})})})}),Ps=(e,s,t,n)=>{const i=Ce(t.path);if(t.content_text!==null&&(t.file_kind==="markdown"||i==="markdown")){const a=t.content_text;return a===null?r.jsx("div",{className:"session-file-preview-viewer__empty",children:"暂时没有可显示的内容。"}):r.jsx(l.Suspense,{fallback:r.jsx("div",{className:"session-file-preview-viewer__empty",children:"正在载入 Markdown…"}),children:r.jsx(Os,{agentId:e,sessionId:s,filePath:t.path,content:a})})}if(t.content_text!==null&&(t.file_kind==="code"||i!==null&&i!=="markdown"))return r.jsx(we,{content:t.content_text,path:t.path});if(t.file_kind==="text"&&t.content_text!==null)return r.jsx(we,{content:t.content_text,path:t.path,plainText:!0});if(t.file_kind==="image"&&t.content_base64){const a=`data:${t.mime_type??"application/octet-stream"};base64,${t.content_base64}`;return r.jsx(Ls,{src:a,alt:t.name,onOpen:()=>{n({src:a,alt:t.name})}})}return t.file_kind==="image"?r.jsx("div",{className:"session-file-preview-viewer__empty",children:"这张图片体积过大,当前预览页没有继续加载内容。"}):r.jsx("div",{className:"session-file-preview-viewer__empty",children:"当前文件暂不支持预览。"})},js=({agentId:e,sessionId:s,projectName:t,projectPath:n,isActive:i,onBack:c})=>{var fe;const a=xe(),d=l.useRef(null),p=l.useRef(null),_=l.useRef({}),S=l.useRef(s),[m,E]=l.useState(null),[u,g]=l.useState([]),[h,y]=l.useState(null),[b,M]=l.useState(null),[G,T]=l.useState(null),[z,H]=l.useState(null),Q=l.useMemo(()=>Cs(t,m),[m,t]),Me=ns({queries:Q.map(o=>Ss({agentId:e,sessionId:s,enabled:i,path:o.currentPath}))}),V=Ke(ks({agentId:e,sessionId:s,enabled:i&&!!h,path:h??""})),de=V.data,X=Q.findIndex(o=>o.key===b),he=X>=0?Q[X]:null,L=X>=0?Me[X]:null,me=((fe=L==null?void 0:L.data)==null?void 0:fe.nodes)??[],Te=o=>{g(v=>v.some(w=>w.path===o.path)?v:[...v,o]),y(o.path)},Ie=o=>{g(v=>{const w=v.filter(k=>k.path!==o);return y(k=>{if(k!==o)return k;const Z=v.findIndex(se=>se.path===o),W=w[Z]??w[Math.max(0,Z-1)]??null;return(W==null?void 0:W.path)??null}),w})};l.useEffect(()=>{const o=S.current;o!==s&&(ye(o,a),S.current=s),E(null),g([]),y(null),M(null),T(null),H(null)},[a,s,n]),l.useEffect(()=>()=>{ye(S.current,a)},[a]),l.useEffect(()=>{i||(M(null),T(null),H(null))},[i]),l.useEffect(()=>{H(null)},[h]),l.useEffect(()=>{h&&(E(ve(h)),M(null),T(null))},[h]),l.useEffect(()=>{if(!i||!m)return;const o=p.current;if(!o)return;const v=window.requestAnimationFrame(()=>{o.scrollTo({left:o.scrollWidth,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(v)}},[m,i]),l.useEffect(()=>{if(!i)return;const o=v=>{const w=d.current;!w||w.contains(v.target)||(M(null),T(null))};return document.addEventListener("pointerdown",o),()=>{document.removeEventListener("pointerdown",o)}},[i]),l.useEffect(()=>{if(!b){T(null);return}const o=d.current,v=_.current[b];if(!o||!v){T(null);return}const w=()=>{const Z=o.getBoundingClientRect(),W=v.getBoundingClientRect(),se=Math.max(0,W.left-Z.left);T({left:`${se}px`})};w();const k=p.current;return k==null||k.addEventListener("scroll",w,{passive:!0}),window.addEventListener("resize",w),()=>{k==null||k.removeEventListener("scroll",w),window.removeEventListener("resize",w)}},[b,Q]);const Le=()=>!he||!G?null:r.jsx("div",{className:"session-file-preview-nav__menu",role:"menu",style:G,children:L!=null&&L.isPending?r.jsx("div",{className:"session-file-preview-nav__status",children:"正在载入…"}):L!=null&&L.isError?r.jsx("div",{className:"session-file-preview-nav__status is-error",children:L.error.message}):me.length>0?me.map(o=>{const v=Ms(o),w=o.kind==="directory"&&o.path===he.currentPath,k=o.kind==="file"&&o.path===h;return r.jsxs("button",{type:"button",className:`session-file-preview-nav__option ${w||k?"is-selected":""}`,onClick:()=>{o.kind==="directory"?(E(o.path),M(o.path)):(E(ve(o.path)),Te({path:o.path,name:o.name}),M(null),T(null))},role:"menuitem",children:[r.jsx("span",{className:"session-file-preview-nav__option-icon","aria-hidden":"true",children:r.jsx(v,{})}),r.jsx("span",{className:"session-file-preview-nav__option-label",children:o.name}),w||k?r.jsx("span",{className:"session-file-preview-nav__option-check","aria-hidden":"true",children:r.jsx(qe,{})}):null]},o.path)}):r.jsx("div",{className:"session-file-preview-nav__status",children:"这一层没有可选内容。"})});return r.jsxs("section",{className:"session-file-preview","aria-label":"项目文件预览",children:[r.jsxs("header",{className:"session-file-preview__topbar",children:[r.jsx("button",{type:"button",className:"session-file-preview__back",onClick:c,"aria-label":"返回会话页",children:r.jsx(rs,{strokeWidth:1.8})}),r.jsxs("div",{ref:d,className:"session-file-preview-nav-shell",children:[r.jsx("div",{ref:p,className:"session-file-preview-nav",children:Q.map(o=>r.jsx(Ts,{level:o,isOpen:b===o.key,onToggle:()=>{M(v=>{const w=v===o.key?null:o.key;return w===null&&T(null),w})},buttonRef:v=>{_.current[o.key]=v}},o.key))}),Le()]})]}),r.jsxs("div",{className:"session-file-preview__viewer",children:[r.jsx("div",{className:"session-file-preview__tabs",role:"tablist","aria-label":"已打开文件",children:u.length>0?u.map(o=>r.jsxs("div",{className:`session-file-preview__tab ${o.path===h?"is-active":""}`,children:[r.jsx("button",{type:"button",role:"tab","aria-selected":o.path===h,className:"session-file-preview__tab-button",onClick:()=>{y(o.path)},children:r.jsx("span",{className:"session-file-preview__tab-label",children:o.name})}),r.jsx("button",{type:"button",className:"session-file-preview__tab-close",onClick:v=>{v.stopPropagation(),Ie(o.path)},"aria-label":`关闭 ${o.name}`,children:r.jsx(Oe,{})})]},o.path)):r.jsx("div",{className:"session-file-preview__tabs-empty",children:"未打开文件"})}),r.jsx("div",{className:"session-file-preview__viewer-scroll",children:h?V.isPending?r.jsx("div",{className:"session-file-preview-viewer__empty",children:"正在载入文件内容…"}):V.isError?r.jsx("div",{className:"session-file-preview-viewer__empty is-error",children:V.error.message}):de?r.jsx("div",{className:"session-file-preview__viewer-content",children:Ps(e,s,de,H)}):r.jsx("div",{className:"session-file-preview-viewer__empty",children:"暂时没有可显示的内容。"}):r.jsxs("div",{className:"session-file-preview-viewer__empty",children:[r.jsx("div",{className:"session-file-preview-viewer__empty-title",children:"选择一个文件开始预览"}),r.jsxs("div",{className:"session-file-preview-viewer__empty-meta",children:["当前项目根目录:",n]})]})})]}),z?r.jsx(As,{src:z.src,alt:z.alt,onClose:()=>{H(null)}}):null]})},Bs=Object.freeze(Object.defineProperty({__proto__:null,SessionFilePreviewPage:js},Symbol.toStringTag,{value:"Module"}));export{ks as g,Bs as s};
@@ -1 +1 @@
1
- import{W as n,L as i,C as r,E as s,B as o}from"./index-2xq-OQM2.js";class d extends n{constructor(){super(...arguments),this._isSupported="BarcodeDetector"in window,this.errorVideoElementMissing="videoElement must be provided.",this.eventBarcodesScanned="barcodesScanned"}async startScan(e){if(!this._isSupported)throw this.createUnavailableException();if(!(e!=null&&e.videoElement))throw new Error(this.errorVideoElementMissing);this.videoElement=e.videoElement,this.stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:{ideal:(e==null?void 0:e.lensFacing)===i.Front?"user":"environment"}},audio:!1}),e.videoElement.srcObject=this.stream,await e.videoElement.play();const t=new BarcodeDetector;this.intervalId=window.setInterval(async()=>{if(!e.videoElement)return;const a=await t.detect(e.videoElement);a.length!==0&&this.handleScannedBarcodes(a)},500)}async stopScan(){if(!this._isSupported)throw this.createUnavailableException();this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=void 0),this.videoElement&&(this.videoElement.srcObject=null,this.videoElement=void 0)}async readBarcodesFromImage(e){throw this.createUnavailableException()}async scan(){throw this.createUnavailableException()}async isSupported(){return{supported:this._isSupported}}async enableTorch(){throw this.createUnavailableException()}async disableTorch(){throw this.createUnavailableException()}async toggleTorch(){throw this.createUnavailableException()}async isTorchEnabled(){throw this.createUnavailableException}async isTorchAvailable(){return{available:!1}}async setZoomRatio(e){throw this.createUnavailableException()}async getZoomRatio(){throw this.createUnavailableException()}async getMinZoomRatio(){throw this.createUnavailableException()}async getMaxZoomRatio(){throw this.createUnavailableException()}async openSettings(){throw this.createUnavailableException()}async isGoogleBarcodeScannerModuleAvailable(){throw this.createUnavailableException()}async installGoogleBarcodeScannerModule(){throw this.createUnavailableException()}async checkPermissions(){try{return{camera:(await navigator.permissions.query({name:"camera"})).state}}catch{return{camera:"prompt"}}}async requestPermissions(){try{return(await navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(t=>t.stop()),{camera:"granted"}}catch{return{camera:"denied"}}}createUnavailableException(){return new r("This plugin method is not available on this platform.",s.Unavailable)}handleScannedBarcodes(e){const t={barcodes:e.map(a=>({cornerPoints:[[a.cornerPoints[0].x,a.cornerPoints[0].y],[a.cornerPoints[1].x,a.cornerPoints[1].y],[a.cornerPoints[2].x,a.cornerPoints[2].y],[a.cornerPoints[3].x,a.cornerPoints[3].y]],displayValue:a.rawValue,rawValue:a.rawValue,format:a.format.toUpperCase(),valueType:o.Unknown}))};this.notifyListeners(this.eventBarcodesScanned,t)}}export{d as BarcodeScannerWeb};
1
+ import{W as n,L as i,w as r,E as s,B as o}from"./index-Buoz6IYL.js";class d extends n{constructor(){super(...arguments),this._isSupported="BarcodeDetector"in window,this.errorVideoElementMissing="videoElement must be provided.",this.eventBarcodesScanned="barcodesScanned"}async startScan(e){if(!this._isSupported)throw this.createUnavailableException();if(!(e!=null&&e.videoElement))throw new Error(this.errorVideoElementMissing);this.videoElement=e.videoElement,this.stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:{ideal:(e==null?void 0:e.lensFacing)===i.Front?"user":"environment"}},audio:!1}),e.videoElement.srcObject=this.stream,await e.videoElement.play();const t=new BarcodeDetector;this.intervalId=window.setInterval(async()=>{if(!e.videoElement)return;const a=await t.detect(e.videoElement);a.length!==0&&this.handleScannedBarcodes(a)},500)}async stopScan(){if(!this._isSupported)throw this.createUnavailableException();this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=void 0),this.videoElement&&(this.videoElement.srcObject=null,this.videoElement=void 0)}async readBarcodesFromImage(e){throw this.createUnavailableException()}async scan(){throw this.createUnavailableException()}async isSupported(){return{supported:this._isSupported}}async enableTorch(){throw this.createUnavailableException()}async disableTorch(){throw this.createUnavailableException()}async toggleTorch(){throw this.createUnavailableException()}async isTorchEnabled(){throw this.createUnavailableException}async isTorchAvailable(){return{available:!1}}async setZoomRatio(e){throw this.createUnavailableException()}async getZoomRatio(){throw this.createUnavailableException()}async getMinZoomRatio(){throw this.createUnavailableException()}async getMaxZoomRatio(){throw this.createUnavailableException()}async openSettings(){throw this.createUnavailableException()}async isGoogleBarcodeScannerModuleAvailable(){throw this.createUnavailableException()}async installGoogleBarcodeScannerModule(){throw this.createUnavailableException()}async checkPermissions(){try{return{camera:(await navigator.permissions.query({name:"camera"})).state}}catch{return{camera:"prompt"}}}async requestPermissions(){try{return(await navigator.mediaDevices.getUserMedia({video:!0})).getTracks().forEach(t=>t.stop()),{camera:"granted"}}catch{return{camera:"denied"}}}createUnavailableException(){return new r("This plugin method is not available on this platform.",s.Unavailable)}handleScannedBarcodes(e){const t={barcodes:e.map(a=>({cornerPoints:[[a.cornerPoints[0].x,a.cornerPoints[0].y],[a.cornerPoints[1].x,a.cornerPoints[1].y],[a.cornerPoints[2].x,a.cornerPoints[2].y],[a.cornerPoints[3].x,a.cornerPoints[3].y]],displayValue:a.rawValue,rawValue:a.rawValue,format:a.format.toUpperCase(),valueType:o.Unknown}))};this.notifyListeners(this.eventBarcodesScanned,t)}}export{d as BarcodeScannerWeb};
@@ -1 +1 @@
1
- import{W as t}from"./index-2xq-OQM2.js";class s extends t{constructor(){super(),this.handleVisibilityChange=()=>{const e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}async toggleBackButtonHandler(){throw this.unimplemented("Not implemented on web.")}}export{s as AppWeb};
1
+ import{W as t}from"./index-Buoz6IYL.js";class s extends t{constructor(){super(),this.handleVisibilityChange=()=>{const e={isActive:document.hidden!==!0};this.notifyListeners("appStateChange",e),document.hidden?this.notifyListeners("pause",null):this.notifyListeners("resume",null)},document.addEventListener("visibilitychange",this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented("Not implemented on web.")}async getInfo(){throw this.unimplemented("Not implemented on web.")}async getLaunchUrl(){return{url:""}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented("Not implemented on web.")}async toggleBackButtonHandler(){throw this.unimplemented("Not implemented on web.")}}export{s as AppWeb};
@@ -1 +1 @@
1
- import{W as o}from"./index-2xq-OQM2.js";class e extends o{constructor(){super(),this._lastWindow=null}async open(s){this._lastWindow=window.open(s.url,s.windowName||"_blank")}async close(){return new Promise((s,n)=>{this._lastWindow!=null?(this._lastWindow.close(),this._lastWindow=null,s()):n("No active window to close!")})}}const i=new e;export{i as Browser,e as BrowserWeb};
1
+ import{W as o}from"./index-Buoz6IYL.js";class e extends o{constructor(){super(),this._lastWindow=null}async open(s){this._lastWindow=window.open(s.url,s.windowName||"_blank")}async close(){return new Promise((s,n)=>{this._lastWindow!=null?(this._lastWindow.close(),this._lastWindow=null,s()):n("No active window to close!")})}}const i=new e;export{i as Browser,e as BrowserWeb};
@@ -1 +1 @@
1
- import{W as s}from"./index-2xq-OQM2.js";class c extends s{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!("Notification"in window)||!Notification.requestPermission)return!1;if(Notification.permission!=="granted")try{new Notification("")}catch(i){if(i.name=="TypeError")return!1}return!0}}async getDeliveredNotifications(){const i=[];for(const t of this.deliveredNotifications){const e={title:t.title,id:parseInt(t.tag),body:t.body};i.push(e)}return{notifications:i}}async removeDeliveredNotifications(i){for(const t of i.notifications){const e=this.deliveredNotifications.find(n=>n.tag===String(t.id));e==null||e.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(const i of this.deliveredNotifications)i.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented("Not implemented on web.")}async deleteChannel(){throw this.unimplemented("Not implemented on web.")}async listChannels(){throw this.unimplemented("Not implemented on web.")}async schedule(i){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");for(const t of i.notifications)this.sendNotification(t);return{notifications:i.notifications.map(t=>({id:t.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented("Not implemented on web.")}async cancel(i){this.pending=this.pending.filter(t=>!i.notifications.find(e=>e.id===t.id))}async areEnabled(){const{display:i}=await this.checkPermissions();return{value:i==="granted"}}async changeExactNotificationSetting(){throw this.unimplemented("Not implemented on web.")}async checkExactNotificationSetting(){throw this.unimplemented("Not implemented on web.")}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(i){switch(i){case"granted":return"granted";case"denied":return"denied";default:return"prompt"}}sendPending(){var i;const t=[],e=new Date().getTime();for(const n of this.pending)!((i=n.schedule)===null||i===void 0)&&i.at&&n.schedule.at.getTime()<=e&&(this.buildNotification(n),t.push(n));this.pending=this.pending.filter(n=>!t.find(o=>o===n))}sendNotification(i){var t;if(!((t=i.schedule)===null||t===void 0)&&t.at){const e=i.schedule.at.getTime()-new Date().getTime();this.pending.push(i),setTimeout(()=>{this.sendPending()},e);return}this.buildNotification(i)}buildNotification(i){const t=new Notification(i.title,{body:i.body,tag:String(i.id)});return t.addEventListener("click",this.onClick.bind(this,i),!1),t.addEventListener("show",this.onShow.bind(this,i),!1),t.addEventListener("close",()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(i){const t={actionId:"tap",notification:i};this.notifyListeners("localNotificationActionPerformed",t)}onShow(i){this.notifyListeners("localNotificationReceived",i)}}export{c as LocalNotificationsWeb};
1
+ import{W as s}from"./index-Buoz6IYL.js";class c extends s{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!("Notification"in window)||!Notification.requestPermission)return!1;if(Notification.permission!=="granted")try{new Notification("")}catch(i){if(i.name=="TypeError")return!1}return!0}}async getDeliveredNotifications(){const i=[];for(const t of this.deliveredNotifications){const e={title:t.title,id:parseInt(t.tag),body:t.body};i.push(e)}return{notifications:i}}async removeDeliveredNotifications(i){for(const t of i.notifications){const e=this.deliveredNotifications.find(n=>n.tag===String(t.id));e==null||e.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(const i of this.deliveredNotifications)i.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented("Not implemented on web.")}async deleteChannel(){throw this.unimplemented("Not implemented on web.")}async listChannels(){throw this.unimplemented("Not implemented on web.")}async schedule(i){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");for(const t of i.notifications)this.sendNotification(t);return{notifications:i.notifications.map(t=>({id:t.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented("Not implemented on web.")}async cancel(i){this.pending=this.pending.filter(t=>!i.notifications.find(e=>e.id===t.id))}async areEnabled(){const{display:i}=await this.checkPermissions();return{value:i==="granted"}}async changeExactNotificationSetting(){throw this.unimplemented("Not implemented on web.")}async checkExactNotificationSetting(){throw this.unimplemented("Not implemented on web.")}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable("Notifications not supported in this browser.");return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(i){switch(i){case"granted":return"granted";case"denied":return"denied";default:return"prompt"}}sendPending(){var i;const t=[],e=new Date().getTime();for(const n of this.pending)!((i=n.schedule)===null||i===void 0)&&i.at&&n.schedule.at.getTime()<=e&&(this.buildNotification(n),t.push(n));this.pending=this.pending.filter(n=>!t.find(o=>o===n))}sendNotification(i){var t;if(!((t=i.schedule)===null||t===void 0)&&t.at){const e=i.schedule.at.getTime()-new Date().getTime();this.pending.push(i),setTimeout(()=>{this.sendPending()},e);return}this.buildNotification(i)}buildNotification(i){const t=new Notification(i.title,{body:i.body,tag:String(i.id)});return t.addEventListener("click",this.onClick.bind(this,i),!1),t.addEventListener("show",this.onShow.bind(this,i),!1),t.addEventListener("close",()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(i){const t={actionId:"tap",notification:i};this.notifyListeners("localNotificationActionPerformed",t)}onShow(i){this.notifyListeners("localNotificationReceived",i)}}export{c as LocalNotificationsWeb};
@@ -1 +1 @@
1
- import{W as p}from"./index-2xq-OQM2.js";class f extends p{constructor(){super(...arguments),this.group="CapacitorStorage"}async configure({group:e}){typeof e=="string"&&(this.group=e)}async get(e){return{value:this.impl.getItem(this.applyPrefix(e.key))}}async set(e){this.impl.setItem(this.applyPrefix(e.key),e.value)}async remove(e){this.impl.removeItem(this.applyPrefix(e.key))}async keys(){return{keys:this.rawKeys().map(t=>t.substring(this.prefix.length))}}async clear(){for(const e of this.rawKeys())this.impl.removeItem(e)}async migrate(){var e;const t=[],s=[],n="_cap_",o=Object.keys(this.impl).filter(i=>i.indexOf(n)===0);for(const i of o){const r=i.substring(n.length),a=(e=this.impl.getItem(i))!==null&&e!==void 0?e:"",{value:l}=await this.get({key:r});typeof l=="string"?s.push(r):(await this.set({key:r,value:a}),t.push(r))}return{migrated:t,existing:s}}async removeOld(){const e="_cap_",t=Object.keys(this.impl).filter(s=>s.indexOf(e)===0);for(const s of t)this.impl.removeItem(s)}get impl(){return window.localStorage}get prefix(){return this.group==="NativeStorage"?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>e.indexOf(this.prefix)===0)}applyPrefix(e){return this.prefix+e}}export{f as PreferencesWeb};
1
+ import{W as p}from"./index-Buoz6IYL.js";class f extends p{constructor(){super(...arguments),this.group="CapacitorStorage"}async configure({group:e}){typeof e=="string"&&(this.group=e)}async get(e){return{value:this.impl.getItem(this.applyPrefix(e.key))}}async set(e){this.impl.setItem(this.applyPrefix(e.key),e.value)}async remove(e){this.impl.removeItem(this.applyPrefix(e.key))}async keys(){return{keys:this.rawKeys().map(t=>t.substring(this.prefix.length))}}async clear(){for(const e of this.rawKeys())this.impl.removeItem(e)}async migrate(){var e;const t=[],s=[],n="_cap_",o=Object.keys(this.impl).filter(i=>i.indexOf(n)===0);for(const i of o){const r=i.substring(n.length),a=(e=this.impl.getItem(i))!==null&&e!==void 0?e:"",{value:l}=await this.get({key:r});typeof l=="string"?s.push(r):(await this.set({key:r,value:a}),t.push(r))}return{migrated:t,existing:s}}async removeOld(){const e="_cap_",t=Object.keys(this.impl).filter(s=>s.indexOf(e)===0);for(const s of t)this.impl.removeItem(s)}get impl(){return window.localStorage}get prefix(){return this.group==="NativeStorage"?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>e.indexOf(this.prefix)===0)}applyPrefix(e){return this.prefix+e}}export{f as PreferencesWeb};
@@ -1,3 +1,3 @@
1
- import{t as tt}from"./index-2xq-OQM2.js";var Ue,en;function it(){if(en)return Ue;en=1;function i(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(n=>{const r=e[n],f=typeof r;(f==="object"||f==="function")&&!Object.isFrozen(r)&&i(r)}),e}class g{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function p(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function d(e,...n){const r=Object.create(null);for(const f in e)r[f]=e[f];return n.forEach(function(f){for(const w in f)r[w]=f[w]}),r}const M="</span>",U=e=>!!e.scope,T=(e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${n}${r.shift()}`,...r.map((f,w)=>`${f}${"_".repeat(w+1)}`)].join(" ")}return`${n}${e}`};class N{constructor(n,r){this.buffer="",this.classPrefix=r.classPrefix,n.walk(this)}addText(n){this.buffer+=p(n)}openNode(n){if(!U(n))return;const r=T(n.scope,{prefix:this.classPrefix});this.span(r)}closeNode(n){U(n)&&(this.buffer+=M)}value(){return this.buffer}span(n){this.buffer+=`<span class="${n}">`}}const C=(e={})=>{const n={children:[]};return Object.assign(n,e),n};class A{constructor(){this.rootNode=C(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){const r=C({scope:n});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,r){return typeof r=="string"?n.addText(r):r.children&&(n.openNode(r),r.children.forEach(f=>this._walk(n,f)),n.closeNode(r)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(r=>typeof r=="string")?n.children=[n.children.join("")]:n.children.forEach(r=>{A._collapse(r)}))}}class P extends A{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,r){const f=n.root;r&&(f.scope=`language:${r}`),this.add(f)}toHTML(){return new N(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function L(e){return e?typeof e=="string"?e:e.source:null}function x(e){return O("(?=",e,")")}function D(e){return O("(?:",e,")*")}function j(e){return O("(?:",e,")?")}function O(...e){return e.map(r=>L(r)).join("")}function Y(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function q(...e){return"("+(Y(e).capture?"":"?:")+e.map(f=>L(f)).join("|")+")"}function H(e){return new RegExp(e.toString()+"|").exec("").length-1}function V(e,n){const r=e&&e.exec(n);return r&&r.index===0}const ae=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function K(e,{joinWith:n}){let r=0;return e.map(f=>{r+=1;const w=r;let R=L(f),o="";for(;R.length>0;){const a=ae.exec(R);if(!a){o+=R;break}o+=R.substring(0,a.index),R=R.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+w):(o+=a[0],a[0]==="("&&r++)}return o}).map(f=>`(${f})`).join(n)}const G=/\b\B/,ue="[a-zA-Z]\\w*",ee="[a-zA-Z_]\\w*",ge="\\b\\d+(\\.\\d+)?",fe="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",be="\\b(0b[01]+)",Ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",me=(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=O(n,/.*\b/,e.binary,/\b.*/)),d({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(r,f)=>{r.index!==0&&f.ignoreMatch()}},e)},ne={begin:"\\\\[\\s\\S]",relevance:0},_e={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ne]},oe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ne]},Ne={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},m=function(e,n,r={}){const f=d({scope:"comment",begin:e,end:n,contains:[]},r);f.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const w=q("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return f.contains.push({begin:O(/[ ]+/,"(",w,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),f},z=m("//","$"),F=m("/\\*","\\*/"),W=m("#","$"),te={scope:"number",begin:ge,relevance:0},ce={scope:"number",begin:fe,relevance:0},fn={scope:"number",begin:be,relevance:0},bn={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ne,{begin:/\[/,end:/\]/,relevance:0,contains:[ne]}]},pn={scope:"title",begin:ue,relevance:0},hn={scope:"title",begin:ee,relevance:0},En={begin:"\\.\\s*"+ee,relevance:0};var Se=Object.freeze({__proto__:null,APOS_STRING_MODE:_e,BACKSLASH_ESCAPE:ne,BINARY_NUMBER_MODE:fn,BINARY_NUMBER_RE:be,COMMENT:m,C_BLOCK_COMMENT_MODE:F,C_LINE_COMMENT_MODE:z,C_NUMBER_MODE:ce,C_NUMBER_RE:fe,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(n,r)=>{r.data._beginMatch=n[1]},"on:end":(n,r)=>{r.data._beginMatch!==n[1]&&r.ignoreMatch()}})},HASH_COMMENT_MODE:W,IDENT_RE:ue,MATCH_NOTHING_RE:G,METHOD_GUARD:En,NUMBER_MODE:te,NUMBER_RE:ge,PHRASAL_WORDS_MODE:Ne,QUOTE_STRING_MODE:oe,REGEXP_MODE:bn,RE_STARTERS_RE:Ee,SHEBANG:me,TITLE_MODE:pn,UNDERSCORE_IDENT_RE:ee,UNDERSCORE_TITLE_MODE:hn});function mn(e,n){e.input[e.index-1]==="."&&n.ignoreMatch()}function _n(e,n){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Nn(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=mn,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function yn(e,n){Array.isArray(e.illegal)&&(e.illegal=q(...e.illegal))}function Sn(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function An(e,n){e.relevance===void 0&&(e.relevance=1)}const Tn=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(f=>{delete e[f]}),e.keywords=r.keywords,e.begin=O(r.beforeMatch,x(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},xn=["of","and","for","in","not","or","if","then","parent","list","value"],On="keyword";function Pe(e,n,r=On){const f=Object.create(null);return typeof e=="string"?w(r,e.split(" ")):Array.isArray(e)?w(r,e):Object.keys(e).forEach(function(R){Object.assign(f,Pe(e[R],n,R))}),f;function w(R,o){n&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const u=a.split("|");f[u[0]]=[R,wn(u[0],u[1])]})}}function wn(e,n){return n?Number(n):Rn(e)?0:1}function Rn(e){return xn.includes(e.toLowerCase())}const $e={},le=e=>{console.error(e)},ze=(e,...n)=>{console.log(`WARN: ${e}`,...n)},pe=(e,n)=>{$e[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),$e[`${e}/${n}`]=!0)},Ae=new Error;function He(e,n,{key:r}){let f=0;const w=e[r],R={},o={};for(let a=1;a<=n.length;a++)o[a+f]=w[a],R[a+f]=!0,f+=H(n[a-1]);e[r]=o,e[r]._emit=R,e[r]._multi=!0}function Mn(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ae;if(typeof e.beginScope!="object"||e.beginScope===null)throw le("beginScope must be object"),Ae;He(e,e.begin,{key:"beginScope"}),e.begin=K(e.begin,{joinWith:""})}}function vn(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ae;if(typeof e.endScope!="object"||e.endScope===null)throw le("endScope must be object"),Ae;He(e,e.end,{key:"endScope"}),e.end=K(e.end,{joinWith:""})}}function kn(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function In(e){kn(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Mn(e),vn(e)}function Cn(e){function n(o,a){return new RegExp(L(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,a]),this.matchAt+=H(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(u=>u[1]);this.matcherRe=n(K(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(a);if(!u)return null;const I=u.findIndex((ye,ke)=>ke>0&&ye!==void 0),v=this.matchIndexes[I];return u.splice(0,I),Object.assign(u,v)}}class f{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const u=new r;return this.rules.slice(a).forEach(([I,v])=>u.addRule(I,v)),u.compile(),this.multiRegexes[a]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,u){this.rules.push([a,u]),u.type==="begin"&&this.count++}exec(a){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let I=u.exec(a);if(this.resumingScanAtSamePosition()&&!(I&&I.index===this.lastIndex)){const v=this.getMatcher(0);v.lastIndex=this.lastIndex+1,I=v.exec(a)}return I&&(this.regexIndex+=I.position+1,this.regexIndex===this.count&&this.considerAll()),I}}function w(o){const a=new f;return o.contains.forEach(u=>a.addRule(u.begin,{rule:u,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function R(o,a){const u=o;if(o.isCompiled)return u;[_n,Sn,In,Tn].forEach(v=>v(o,a)),e.compilerExtensions.forEach(v=>v(o,a)),o.__beforeBegin=null,[Nn,yn,An].forEach(v=>v(o,a)),o.isCompiled=!0;let I=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),I=o.keywords.$pattern,delete o.keywords.$pattern),I=I||/\w+/,o.keywords&&(o.keywords=Pe(o.keywords,e.case_insensitive)),u.keywordPatternRe=n(I,!0),a&&(o.begin||(o.begin=/\B|\b/),u.beginRe=n(u.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(u.endRe=n(u.end)),u.terminatorEnd=L(u.end)||"",o.endsWithParent&&a.terminatorEnd&&(u.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(u.illegalRe=n(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(v){return Ln(v==="self"?o:v)})),o.contains.forEach(function(v){R(v,u)}),o.starts&&R(o.starts,a),u.matcher=w(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=d(e.classNameAliases||{}),R(e)}function Ge(e){return e?e.endsWithParent||Ge(e.starts):!1}function Ln(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(n){return d(e,{variants:null},n)})),e.cachedVariants?e.cachedVariants:Ge(e)?d(e,{starts:e.starts?d(e.starts):null}):Object.isFrozen(e)?d(e):e}var Dn="11.11.1";class Bn extends Error{constructor(n,r){super(n),this.name="HTMLInjectionError",this.html=r}}const ve=p,Fe=d,Ze=Symbol("nomatch"),Un=7,Ke=function(e){const n=Object.create(null),r=Object.create(null),f=[];let w=!0;const R="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:P};function u(t){return a.noHighlightRe.test(t)}function I(t){let l=t.className+" ";l+=t.parentNode?t.parentNode.className:"";const E=a.languageDetectRe.exec(l);if(E){const y=re(E[1]);return y||(ze(R.replace("{}",E[1])),ze("Falling back to no-highlight mode for this block.",t)),y?E[1]:"no-highlight"}return l.split(/\s+/).find(y=>u(y)||re(y))}function v(t,l,E){let y="",k="";typeof l=="object"?(y=t,E=l.ignoreIllegals,k=l.language):(pe("10.7.0","highlight(lang, code, ...args) has been deprecated."),pe("10.7.0",`Please use highlight(code, options) instead.
1
+ import{v as tt}from"./index-Buoz6IYL.js";var Ue,en;function it(){if(en)return Ue;en=1;function i(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(n=>{const r=e[n],f=typeof r;(f==="object"||f==="function")&&!Object.isFrozen(r)&&i(r)}),e}class g{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function p(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function d(e,...n){const r=Object.create(null);for(const f in e)r[f]=e[f];return n.forEach(function(f){for(const w in f)r[w]=f[w]}),r}const M="</span>",U=e=>!!e.scope,T=(e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${n}${r.shift()}`,...r.map((f,w)=>`${f}${"_".repeat(w+1)}`)].join(" ")}return`${n}${e}`};class N{constructor(n,r){this.buffer="",this.classPrefix=r.classPrefix,n.walk(this)}addText(n){this.buffer+=p(n)}openNode(n){if(!U(n))return;const r=T(n.scope,{prefix:this.classPrefix});this.span(r)}closeNode(n){U(n)&&(this.buffer+=M)}value(){return this.buffer}span(n){this.buffer+=`<span class="${n}">`}}const C=(e={})=>{const n={children:[]};return Object.assign(n,e),n};class A{constructor(){this.rootNode=C(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){const r=C({scope:n});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,r){return typeof r=="string"?n.addText(r):r.children&&(n.openNode(r),r.children.forEach(f=>this._walk(n,f)),n.closeNode(r)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(r=>typeof r=="string")?n.children=[n.children.join("")]:n.children.forEach(r=>{A._collapse(r)}))}}class P extends A{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,r){const f=n.root;r&&(f.scope=`language:${r}`),this.add(f)}toHTML(){return new N(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function L(e){return e?typeof e=="string"?e:e.source:null}function x(e){return O("(?=",e,")")}function D(e){return O("(?:",e,")*")}function j(e){return O("(?:",e,")?")}function O(...e){return e.map(r=>L(r)).join("")}function Y(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function q(...e){return"("+(Y(e).capture?"":"?:")+e.map(f=>L(f)).join("|")+")"}function H(e){return new RegExp(e.toString()+"|").exec("").length-1}function V(e,n){const r=e&&e.exec(n);return r&&r.index===0}const ae=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function K(e,{joinWith:n}){let r=0;return e.map(f=>{r+=1;const w=r;let R=L(f),o="";for(;R.length>0;){const a=ae.exec(R);if(!a){o+=R;break}o+=R.substring(0,a.index),R=R.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+w):(o+=a[0],a[0]==="("&&r++)}return o}).map(f=>`(${f})`).join(n)}const G=/\b\B/,ue="[a-zA-Z]\\w*",ee="[a-zA-Z_]\\w*",ge="\\b\\d+(\\.\\d+)?",fe="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",be="\\b(0b[01]+)",Ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",me=(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=O(n,/.*\b/,e.binary,/\b.*/)),d({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(r,f)=>{r.index!==0&&f.ignoreMatch()}},e)},ne={begin:"\\\\[\\s\\S]",relevance:0},_e={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ne]},oe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ne]},Ne={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},m=function(e,n,r={}){const f=d({scope:"comment",begin:e,end:n,contains:[]},r);f.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const w=q("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return f.contains.push({begin:O(/[ ]+/,"(",w,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),f},z=m("//","$"),F=m("/\\*","\\*/"),W=m("#","$"),te={scope:"number",begin:ge,relevance:0},ce={scope:"number",begin:fe,relevance:0},fn={scope:"number",begin:be,relevance:0},bn={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ne,{begin:/\[/,end:/\]/,relevance:0,contains:[ne]}]},pn={scope:"title",begin:ue,relevance:0},hn={scope:"title",begin:ee,relevance:0},En={begin:"\\.\\s*"+ee,relevance:0};var Se=Object.freeze({__proto__:null,APOS_STRING_MODE:_e,BACKSLASH_ESCAPE:ne,BINARY_NUMBER_MODE:fn,BINARY_NUMBER_RE:be,COMMENT:m,C_BLOCK_COMMENT_MODE:F,C_LINE_COMMENT_MODE:z,C_NUMBER_MODE:ce,C_NUMBER_RE:fe,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(n,r)=>{r.data._beginMatch=n[1]},"on:end":(n,r)=>{r.data._beginMatch!==n[1]&&r.ignoreMatch()}})},HASH_COMMENT_MODE:W,IDENT_RE:ue,MATCH_NOTHING_RE:G,METHOD_GUARD:En,NUMBER_MODE:te,NUMBER_RE:ge,PHRASAL_WORDS_MODE:Ne,QUOTE_STRING_MODE:oe,REGEXP_MODE:bn,RE_STARTERS_RE:Ee,SHEBANG:me,TITLE_MODE:pn,UNDERSCORE_IDENT_RE:ee,UNDERSCORE_TITLE_MODE:hn});function mn(e,n){e.input[e.index-1]==="."&&n.ignoreMatch()}function _n(e,n){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Nn(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=mn,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function yn(e,n){Array.isArray(e.illegal)&&(e.illegal=q(...e.illegal))}function Sn(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function An(e,n){e.relevance===void 0&&(e.relevance=1)}const Tn=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach(f=>{delete e[f]}),e.keywords=r.keywords,e.begin=O(r.beforeMatch,x(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},xn=["of","and","for","in","not","or","if","then","parent","list","value"],On="keyword";function Pe(e,n,r=On){const f=Object.create(null);return typeof e=="string"?w(r,e.split(" ")):Array.isArray(e)?w(r,e):Object.keys(e).forEach(function(R){Object.assign(f,Pe(e[R],n,R))}),f;function w(R,o){n&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){const u=a.split("|");f[u[0]]=[R,wn(u[0],u[1])]})}}function wn(e,n){return n?Number(n):Rn(e)?0:1}function Rn(e){return xn.includes(e.toLowerCase())}const $e={},le=e=>{console.error(e)},ze=(e,...n)=>{console.log(`WARN: ${e}`,...n)},pe=(e,n)=>{$e[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),$e[`${e}/${n}`]=!0)},Ae=new Error;function He(e,n,{key:r}){let f=0;const w=e[r],R={},o={};for(let a=1;a<=n.length;a++)o[a+f]=w[a],R[a+f]=!0,f+=H(n[a-1]);e[r]=o,e[r]._emit=R,e[r]._multi=!0}function Mn(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw le("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ae;if(typeof e.beginScope!="object"||e.beginScope===null)throw le("beginScope must be object"),Ae;He(e,e.begin,{key:"beginScope"}),e.begin=K(e.begin,{joinWith:""})}}function vn(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw le("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ae;if(typeof e.endScope!="object"||e.endScope===null)throw le("endScope must be object"),Ae;He(e,e.end,{key:"endScope"}),e.end=K(e.end,{joinWith:""})}}function kn(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function In(e){kn(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),Mn(e),vn(e)}function Cn(e){function n(o,a){return new RegExp(L(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,a]),this.matchAt+=H(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const a=this.regexes.map(u=>u[1]);this.matcherRe=n(K(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(a);if(!u)return null;const I=u.findIndex((ye,ke)=>ke>0&&ye!==void 0),v=this.matchIndexes[I];return u.splice(0,I),Object.assign(u,v)}}class f{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];const u=new r;return this.rules.slice(a).forEach(([I,v])=>u.addRule(I,v)),u.compile(),this.multiRegexes[a]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,u){this.rules.push([a,u]),u.type==="begin"&&this.count++}exec(a){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let I=u.exec(a);if(this.resumingScanAtSamePosition()&&!(I&&I.index===this.lastIndex)){const v=this.getMatcher(0);v.lastIndex=this.lastIndex+1,I=v.exec(a)}return I&&(this.regexIndex+=I.position+1,this.regexIndex===this.count&&this.considerAll()),I}}function w(o){const a=new f;return o.contains.forEach(u=>a.addRule(u.begin,{rule:u,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function R(o,a){const u=o;if(o.isCompiled)return u;[_n,Sn,In,Tn].forEach(v=>v(o,a)),e.compilerExtensions.forEach(v=>v(o,a)),o.__beforeBegin=null,[Nn,yn,An].forEach(v=>v(o,a)),o.isCompiled=!0;let I=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),I=o.keywords.$pattern,delete o.keywords.$pattern),I=I||/\w+/,o.keywords&&(o.keywords=Pe(o.keywords,e.case_insensitive)),u.keywordPatternRe=n(I,!0),a&&(o.begin||(o.begin=/\B|\b/),u.beginRe=n(u.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(u.endRe=n(u.end)),u.terminatorEnd=L(u.end)||"",o.endsWithParent&&a.terminatorEnd&&(u.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(u.illegalRe=n(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(v){return Ln(v==="self"?o:v)})),o.contains.forEach(function(v){R(v,u)}),o.starts&&R(o.starts,a),u.matcher=w(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=d(e.classNameAliases||{}),R(e)}function Ge(e){return e?e.endsWithParent||Ge(e.starts):!1}function Ln(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(n){return d(e,{variants:null},n)})),e.cachedVariants?e.cachedVariants:Ge(e)?d(e,{starts:e.starts?d(e.starts):null}):Object.isFrozen(e)?d(e):e}var Dn="11.11.1";class Bn extends Error{constructor(n,r){super(n),this.name="HTMLInjectionError",this.html=r}}const ve=p,Fe=d,Ze=Symbol("nomatch"),Un=7,Ke=function(e){const n=Object.create(null),r=Object.create(null),f=[];let w=!0;const R="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:P};function u(t){return a.noHighlightRe.test(t)}function I(t){let l=t.className+" ";l+=t.parentNode?t.parentNode.className:"";const E=a.languageDetectRe.exec(l);if(E){const y=re(E[1]);return y||(ze(R.replace("{}",E[1])),ze("Falling back to no-highlight mode for this block.",t)),y?E[1]:"no-highlight"}return l.split(/\s+/).find(y=>u(y)||re(y))}function v(t,l,E){let y="",k="";typeof l=="object"?(y=t,E=l.ignoreIllegals,k=l.language):(pe("10.7.0","highlight(lang, code, ...args) has been deprecated."),pe("10.7.0",`Please use highlight(code, options) instead.
2
2
  https://github.com/highlightjs/highlight.js/issues/2277`),k=t,y=l),E===void 0&&(E=!0);const X={code:y,language:k};xe("before:highlight",X);const se=X.result?X.result:ye(X.language,X.code,E);return se.code=X.code,xe("after:highlight",se),se}function ye(t,l,E,y){const k=Object.create(null);function X(s,c){return s.keywords[c]}function se(){if(!b.keywords){B.addText(S);return}let s=0;b.keywordPatternRe.lastIndex=0;let c=b.keywordPatternRe.exec(S),h="";for(;c;){h+=S.substring(s,c.index);const _=Q.case_insensitive?c[0].toLowerCase():c[0],$=X(b,_);if($){const[ie,et]=$;if(B.addText(h),h="",k[_]=(k[_]||0)+1,k[_]<=Un&&(Re+=et),ie.startsWith("_"))h+=c[0];else{const nt=Q.classNameAliases[ie]||ie;J(c[0],nt)}}else h+=c[0];s=b.keywordPatternRe.lastIndex,c=b.keywordPatternRe.exec(S)}h+=S.substring(s),B.addText(h)}function Oe(){if(S==="")return;let s=null;if(typeof b.subLanguage=="string"){if(!n[b.subLanguage]){B.addText(S);return}s=ye(b.subLanguage,S,!0,Ve[b.subLanguage]),Ve[b.subLanguage]=s._top}else s=Ie(S,b.subLanguage.length?b.subLanguage:null);b.relevance>0&&(Re+=s.relevance),B.__addSublanguage(s._emitter,s.language)}function Z(){b.subLanguage!=null?Oe():se(),S=""}function J(s,c){s!==""&&(B.startScope(c),B.addText(s),B.endScope())}function Ye(s,c){let h=1;const _=c.length-1;for(;h<=_;){if(!s._emit[h]){h++;continue}const $=Q.classNameAliases[s[h]]||s[h],ie=c[h];$?J(ie,$):(S=ie,se(),S=""),h++}}function qe(s,c){return s.scope&&typeof s.scope=="string"&&B.openNode(Q.classNameAliases[s.scope]||s.scope),s.beginScope&&(s.beginScope._wrap?(J(S,Q.classNameAliases[s.beginScope._wrap]||s.beginScope._wrap),S=""):s.beginScope._multi&&(Ye(s.beginScope,c),S="")),b=Object.create(s,{parent:{value:b}}),b}function Je(s,c,h){let _=V(s.endRe,h);if(_){if(s["on:end"]){const $=new g(s);s["on:end"](c,$),$.isMatchIgnored&&(_=!1)}if(_){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return Je(s.parent,c,h)}function Yn(s){return b.matcher.regexIndex===0?(S+=s[0],1):(Be=!0,0)}function qn(s){const c=s[0],h=s.rule,_=new g(h),$=[h.__beforeBegin,h["on:begin"]];for(const ie of $)if(ie&&(ie(s,_),_.isMatchIgnored))return Yn(c);return h.skip?S+=c:(h.excludeBegin&&(S+=c),Z(),!h.returnBegin&&!h.excludeBegin&&(S=c)),qe(h,s),h.returnBegin?0:c.length}function Jn(s){const c=s[0],h=l.substring(s.index),_=Je(b,s,h);if(!_)return Ze;const $=b;b.endScope&&b.endScope._wrap?(Z(),J(c,b.endScope._wrap)):b.endScope&&b.endScope._multi?(Z(),Ye(b.endScope,s)):$.skip?S+=c:($.returnEnd||$.excludeEnd||(S+=c),Z(),$.excludeEnd&&(S=c));do b.scope&&B.closeNode(),!b.skip&&!b.subLanguage&&(Re+=b.relevance),b=b.parent;while(b!==_.parent);return _.starts&&qe(_.starts,s),$.returnEnd?0:c.length}function Qn(){const s=[];for(let c=b;c!==Q;c=c.parent)c.scope&&s.unshift(c.scope);s.forEach(c=>B.openNode(c))}let we={};function Qe(s,c){const h=c&&c[0];if(S+=s,h==null)return Z(),0;if(we.type==="begin"&&c.type==="end"&&we.index===c.index&&h===""){if(S+=l.slice(c.index,c.index+1),!w){const _=new Error(`0 width match regex (${t})`);throw _.languageName=t,_.badRule=we.rule,_}return 1}if(we=c,c.type==="begin")return qn(c);if(c.type==="illegal"&&!E){const _=new Error('Illegal lexeme "'+h+'" for mode "'+(b.scope||"<unnamed>")+'"');throw _.mode=b,_}else if(c.type==="end"){const _=Jn(c);if(_!==Ze)return _}if(c.type==="illegal"&&h==="")return S+=`
3
3
  `,1;if(De>1e5&&De>c.index*3)throw new Error("potential infinite loop, way more iterations than matches");return S+=h,h.length}const Q=re(t);if(!Q)throw le(R.replace("{}",t)),new Error('Unknown language: "'+t+'"');const Vn=Cn(Q);let Le="",b=y||Vn;const Ve={},B=new a.__emitter(a);Qn();let S="",Re=0,de=0,De=0,Be=!1;try{if(Q.__emitTokens)Q.__emitTokens(l,B);else{for(b.matcher.considerAll();;){De++,Be?Be=!1:b.matcher.considerAll(),b.matcher.lastIndex=de;const s=b.matcher.exec(l);if(!s)break;const c=l.substring(de,s.index),h=Qe(c,s);de=s.index+h}Qe(l.substring(de))}return B.finalize(),Le=B.toHTML(),{language:t,value:Le,relevance:Re,illegal:!1,_emitter:B,_top:b}}catch(s){if(s.message&&s.message.includes("Illegal"))return{language:t,value:ve(l),illegal:!0,relevance:0,_illegalBy:{message:s.message,index:de,context:l.slice(de-100,de+100),mode:s.mode,resultSoFar:Le},_emitter:B};if(w)return{language:t,value:ve(l),illegal:!1,relevance:0,errorRaised:s,_emitter:B,_top:b};throw s}}function ke(t){const l={value:ve(t),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return l._emitter.addText(t),l}function Ie(t,l){l=l||a.languages||Object.keys(n);const E=ke(t),y=l.filter(re).filter(je).map(Z=>ye(Z,t,!1));y.unshift(E);const k=y.sort((Z,J)=>{if(Z.relevance!==J.relevance)return J.relevance-Z.relevance;if(Z.language&&J.language){if(re(Z.language).supersetOf===J.language)return 1;if(re(J.language).supersetOf===Z.language)return-1}return 0}),[X,se]=k,Oe=X;return Oe.secondBest=se,Oe}function Pn(t,l,E){const y=l&&r[l]||E;t.classList.add("hljs"),t.classList.add(`language-${y}`)}function Ce(t){let l=null;const E=I(t);if(u(E))return;if(xe("before:highlightElement",{el:t,language:E}),t.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",t);return}if(t.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(t)),a.throwUnescapedHTML))throw new Bn("One of your code blocks includes unescaped HTML.",t.innerHTML);l=t;const y=l.textContent,k=E?v(y,{language:E,ignoreIllegals:!0}):Ie(y);t.innerHTML=k.value,t.dataset.highlighted="yes",Pn(t,E,k.language),t.result={language:k.language,re:k.relevance,relevance:k.relevance},k.secondBest&&(t.secondBest={language:k.secondBest.language,relevance:k.secondBest.relevance}),xe("after:highlightElement",{el:t,result:k,text:y})}function $n(t){a=Fe(a,t)}const zn=()=>{Te(),pe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Hn(){Te(),pe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let We=!1;function Te(){function t(){Te()}if(document.readyState==="loading"){We||window.addEventListener("DOMContentLoaded",t,!1),We=!0;return}document.querySelectorAll(a.cssSelector).forEach(Ce)}function Gn(t,l){let E=null;try{E=l(e)}catch(y){if(le("Language definition for '{}' could not be registered.".replace("{}",t)),w)le(y);else throw y;E=o}E.name||(E.name=t),n[t]=E,E.rawDefinition=l.bind(null,e),E.aliases&&Xe(E.aliases,{languageName:t})}function Fn(t){delete n[t];for(const l of Object.keys(r))r[l]===t&&delete r[l]}function Zn(){return Object.keys(n)}function re(t){return t=(t||"").toLowerCase(),n[t]||n[r[t]]}function Xe(t,{languageName:l}){typeof t=="string"&&(t=[t]),t.forEach(E=>{r[E.toLowerCase()]=l})}function je(t){const l=re(t);return l&&!l.disableAutodetect}function Kn(t){t["before:highlightBlock"]&&!t["before:highlightElement"]&&(t["before:highlightElement"]=l=>{t["before:highlightBlock"](Object.assign({block:l.el},l))}),t["after:highlightBlock"]&&!t["after:highlightElement"]&&(t["after:highlightElement"]=l=>{t["after:highlightBlock"](Object.assign({block:l.el},l))})}function Wn(t){Kn(t),f.push(t)}function Xn(t){const l=f.indexOf(t);l!==-1&&f.splice(l,1)}function xe(t,l){const E=t;f.forEach(function(y){y[E]&&y[E](l)})}function jn(t){return pe("10.7.0","highlightBlock will be removed entirely in v12.0"),pe("10.7.0","Please use highlightElement now."),Ce(t)}Object.assign(e,{highlight:v,highlightAuto:Ie,highlightAll:Te,highlightElement:Ce,highlightBlock:jn,configure:$n,initHighlighting:zn,initHighlightingOnLoad:Hn,registerLanguage:Gn,unregisterLanguage:Fn,listLanguages:Zn,getLanguage:re,registerAliases:Xe,autoDetection:je,inherit:Fe,addPlugin:Wn,removePlugin:Xn}),e.debugMode=function(){w=!1},e.safeMode=function(){w=!0},e.versionString=Dn,e.regex={concat:O,lookahead:x,either:q,optional:j,anyNumberOfTimes:D};for(const t in Se)typeof Se[t]=="object"&&i(Se[t]);return Object.assign(e,Se),e},he=Ke({});return he.newInstance=()=>Ke({}),Ue=he,he.HighlightJS=he,he.default=he,Ue}var rt=it();const Nt=tt(rt),st=i=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:i.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),at=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ot=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],ct=[...at,...ot],lt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),dt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),ut=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),gt=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function yt(i){const g=i.regex,p=st(i),d={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},M="and or not only",U=/@-?\w[\w]*(-\w+)*/,T="[a-zA-Z-][a-zA-Z0-9_-]*",N=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[p.BLOCK_COMMENT,d,p.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+T,relevance:0},p.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+dt.join("|")+")"},{begin:":(:)?("+ut.join("|")+")"}]},p.CSS_VARIABLE,{className:"attribute",begin:"\\b("+gt.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[p.BLOCK_COMMENT,p.HEXCOLOR,p.IMPORTANT,p.CSS_NUMBER_MODE,...N,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...N,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},p.FUNCTION_DISPATCH]},{begin:g.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:U},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:M,attribute:lt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...N,p.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ct.join("|")+")\\b"}]}}const nn="[A-Za-z$_][0-9A-Za-z$_]*",ft=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],bt=["true","false","null","undefined","NaN","Infinity"],tn=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],rn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],sn=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],pt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ht=[].concat(sn,tn,rn);function St(i){const g=i.regex,p=(m,{after:z})=>{const F="</"+m[0].slice(1);return m.input.indexOf(F,z)!==-1},d=nn,M={begin:"<>",end:"</>"},U=/<[A-Za-z0-9\\._:-]+\s*\/>/,T={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(m,z)=>{const F=m[0].length+m.index,W=m.input[F];if(W==="<"||W===","){z.ignoreMatch();return}W===">"&&(p(m,{after:F})||z.ignoreMatch());let te;const ce=m.input.substring(F);if(te=ce.match(/^\s*=/)){z.ignoreMatch();return}if((te=ce.match(/^\s+extends\s+/))&&te.index===0){z.ignoreMatch();return}}},N={$pattern:nn,keyword:ft,literal:bt,built_in:ht,"variable.language":pt},C="[0-9](_?[0-9])*",A=`\\.(${C})`,P="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",L={className:"number",variants:[{begin:`(\\b(${P})((${A})|\\.)?|(${A}))[eE][+-]?(${C})\\b`},{begin:`\\b(${P})\\b((${A})\\b|\\.)?|(${A})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:N,contains:[]},D={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},j={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,x],subLanguage:"css"}},O={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},Y={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,x]},H={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},V=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,D,j,O,Y,{match:/\$\d+/},L];x.contains=V.concat({begin:/\{/,end:/\}/,keywords:N,contains:["self"].concat(V)});const ae=[].concat(H,x.contains),K=ae.concat([{begin:/(\s*)\(/,end:/\)/,keywords:N,contains:["self"].concat(ae)}]),G={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:K},ue={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,g.concat(d,"(",g.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]},ee={relevance:0,match:g.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...tn,...rn]}},ge={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},fe={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[G],illegal:/%/},be={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ee(m){return g.concat("(?!",m.join("|"),")")}const me={match:g.concat(/\b/,Ee([...sn,"super","import"].map(m=>`${m}\\s*\\(`)),d,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:g.concat(/\./,g.lookahead(g.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},_e={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},G]},oe="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",Ne={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(oe)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[G]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:N,exports:{PARAMS_CONTAINS:K,CLASS_REFERENCE:ee},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),ge,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,D,j,O,Y,H,{match:/\$\d+/},L,ee,{scope:"attr",match:d+g.lookahead(":"),relevance:0},Ne,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[H,i.REGEXP_MODE,{className:"function",begin:oe,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:K}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:M.begin,end:M.end},{match:U},{begin:T.begin,"on:begin":T.isTrulyOpeningTag,end:T.end}],subLanguage:"xml",contains:[{begin:T.begin,end:T.end,skip:!0,contains:["self"]}]}]},fe,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[G,i.inherit(i.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[G]},me,be,ue,_e,{match:/\$[(.]/}]}}function At(i){const g={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},p={match:/[{}[\],:]/,className:"punctuation",relevance:0},d=["true","false","null"],M={scope:"literal",beginKeywords:d.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:d},contains:[g,p,i.QUOTE_STRING_MODE,M,i.C_NUMBER_MODE,i.C_LINE_COMMENT_MODE,i.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Tt(i){const g=i.regex,p={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},d={begin:"^[-\\*]{3,}",end:"$"},M={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},U={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},T={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},N=/[A-Za-z][A-Za-z0-9+.-]*/,C={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:g.concat(/\[.+?\]\(/,N,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},A={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},P={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},L=i.inherit(A,{contains:[]}),x=i.inherit(P,{contains:[]});A.contains.push(x),P.contains.push(L);let D=[p,C];return[A,P,L,x].forEach(q=>{q.contains=q.contains.concat(D)}),D=D.concat(A,P),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:D},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:D}]}]},p,U,A,P,{className:"quote",begin:"^>\\s+",contains:D,end:"$"},M,d,C,T,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}const Me="[A-Za-z$_][0-9A-Za-z$_]*",an=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],on=["true","false","null","undefined","NaN","Infinity"],cn=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ln=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],dn=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],un=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gn=[].concat(dn,cn,ln);function Et(i){const g=i.regex,p=(m,{after:z})=>{const F="</"+m[0].slice(1);return m.input.indexOf(F,z)!==-1},d=Me,M={begin:"<>",end:"</>"},U=/<[A-Za-z0-9\\._:-]+\s*\/>/,T={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(m,z)=>{const F=m[0].length+m.index,W=m.input[F];if(W==="<"||W===","){z.ignoreMatch();return}W===">"&&(p(m,{after:F})||z.ignoreMatch());let te;const ce=m.input.substring(F);if(te=ce.match(/^\s*=/)){z.ignoreMatch();return}if((te=ce.match(/^\s+extends\s+/))&&te.index===0){z.ignoreMatch();return}}},N={$pattern:Me,keyword:an,literal:on,built_in:gn,"variable.language":un},C="[0-9](_?[0-9])*",A=`\\.(${C})`,P="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",L={className:"number",variants:[{begin:`(\\b(${P})((${A})|\\.)?|(${A}))[eE][+-]?(${C})\\b`},{begin:`\\b(${P})\\b((${A})\\b|\\.)?|(${A})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:N,contains:[]},D={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},j={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,x],subLanguage:"css"}},O={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},Y={className:"string",begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,x]},H={className:"comment",variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},V=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,D,j,O,Y,{match:/\$\d+/},L];x.contains=V.concat({begin:/\{/,end:/\}/,keywords:N,contains:["self"].concat(V)});const ae=[].concat(H,x.contains),K=ae.concat([{begin:/(\s*)\(/,end:/\)/,keywords:N,contains:["self"].concat(ae)}]),G={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:K},ue={variants:[{match:[/class/,/\s+/,d,/\s+/,/extends/,/\s+/,g.concat(d,"(",g.concat(/\./,d),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}}]},ee={relevance:0,match:g.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...cn,...ln]}},ge={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},fe={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[G],illegal:/%/},be={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Ee(m){return g.concat("(?!",m.join("|"),")")}const me={match:g.concat(/\b/,Ee([...dn,"super","import"].map(m=>`${m}\\s*\\(`)),d,g.lookahead(/\s*\(/)),className:"title.function",relevance:0},ne={begin:g.concat(/\./,g.lookahead(g.concat(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},_e={match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},G]},oe="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>",Ne={match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,/(async\s*)?/,g.lookahead(oe)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[G]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:N,exports:{PARAMS_CONTAINS:K,CLASS_REFERENCE:ee},illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node",relevance:5}),ge,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,D,j,O,Y,H,{match:/\$\d+/},L,ee,{scope:"attr",match:d+g.lookahead(":"),relevance:0},Ne,{begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[H,i.REGEXP_MODE,{className:"function",begin:oe,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:N,contains:K}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:M.begin,end:M.end},{match:U},{begin:T.begin,"on:begin":T.isTrulyOpeningTag,end:T.end}],subLanguage:"xml",contains:[{begin:T.begin,end:T.end,skip:!0,contains:["self"]}]}]},fe,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[G,i.inherit(i.TITLE_MODE,{begin:d,className:"title.function"})]},{match:/\.\.\./,relevance:0},ne,{match:"\\$"+d,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[G]},me,be,ue,_e,{match:/\$[(.]/}]}}function xt(i){const g=i.regex,p=Et(i),d=Me,M=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],U={begin:[/namespace/,/\s+/,i.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},T={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:M},contains:[p.exports.CLASS_REFERENCE]},N={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},C=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],A={$pattern:Me,keyword:an.concat(C),literal:on,built_in:gn.concat(M),"variable.language":un},P={className:"meta",begin:"@"+d},L=(O,Y,q)=>{const H=O.contains.findIndex(V=>V.label===Y);if(H===-1)throw new Error("can not find mode to replace");O.contains.splice(H,1,q)};Object.assign(p.keywords,A),p.exports.PARAMS_CONTAINS.push(P);const x=p.contains.find(O=>O.scope==="attr"),D=Object.assign({},x,{match:g.concat(d,g.lookahead(/\s*\?:/))});p.exports.PARAMS_CONTAINS.push([p.exports.CLASS_REFERENCE,x,D]),p.contains=p.contains.concat([P,U,T,D]),L(p,"shebang",i.SHEBANG()),L(p,"use_strict",N);const j=p.contains.find(O=>O.label==="func.def");return j.relevance=0,Object.assign(p,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),p}function Ot(i){const g=i.regex,p=g.concat(/[\p{L}_]/u,g.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),d=/[\p{L}0-9._:-]+/u,M={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},U={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},T=i.inherit(U,{begin:/\(/,end:/\)/}),N=i.inherit(i.APOS_STRING_MODE,{className:"string"}),C=i.inherit(i.QUOTE_STRING_MODE,{className:"string"}),A={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:d,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[M]},{begin:/'/,end:/'/,contains:[M]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[U,C,N,T,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[U,T,C,N]}]}]},i.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},M,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[C]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[A],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[A],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:g.concat(/</,g.lookahead(g.concat(p,g.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:p,relevance:0,starts:A}]},{className:"tag",begin:g.concat(/<\//,g.lookahead(g.concat(p,/>/))),contains:[{className:"name",begin:p,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}export{Nt as H,At as a,yt as c,St as j,Tt as m,xt as t,Ot as x};
@@ -14,8 +14,8 @@
14
14
  <link rel="alternate icon" type="image/png" href="/logo.png" />
15
15
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
16
16
  <title>Panda</title>
17
- <script type="module" crossorigin src="/assets/index-2xq-OQM2.js"></script>
18
- <link rel="stylesheet" crossorigin href="/assets/index-DBWUmekP.css">
17
+ <script type="module" crossorigin src="/assets/index-Buoz6IYL.js"></script>
18
+ <link rel="stylesheet" crossorigin href="/assets/index-qres5phQ.css">
19
19
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
20
20
  <body>
21
21
  <div id="root"></div>
package/dist/web/sw.js CHANGED
@@ -1,2 +1,2 @@
1
1
  try{self["workbox:core:7.3.0"]&&_()}catch{}const T=(a,...e)=>{let t=a;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},N=T;class l extends Error{constructor(e,t){const s=N(e,t);super(s),this.name=e,this.details=t}}const f={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},b=a=>[f.prefix,a,f.suffix].filter(e=>e&&e.length>0).join("-"),x=a=>{for(const e of Object.keys(f))a(e)},C={updateDetails:a=>{x(e=>{typeof a[e]=="string"&&(f[e]=a[e])})},getGoogleAnalyticsName:a=>a||b(f.googleAnalytics),getPrecacheName:a=>a||b(f.precache),getPrefix:()=>f.prefix,getRuntimeName:a=>a||b(f.runtime),getSuffix:()=>f.suffix};function k(a,e){const t=e();return a.waitUntil(t),t}try{self["workbox:precaching:7.3.0"]&&_()}catch{}const I="__WB_REVISION__";function E(a){if(!a)throw new l("add-to-cache-list-unexpected-type",{entry:a});if(typeof a=="string"){const i=new URL(a,location.href);return{cacheKey:i.href,url:i.href}}const{revision:e,url:t}=a;if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:a});if(!e){const i=new URL(t,location.href);return{cacheKey:i.href,url:i.href}}const s=new URL(t,location.href),n=new URL(t,location.href);return s.searchParams.set(I,e),{cacheKey:s.href,url:n.href}}class O{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const n=t.originalRequest.url;s?this.notUpdatedURLs.push(n):this.updatedURLs.push(n)}return s}}}class M{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:s})=>{const n=(s==null?void 0:s.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return n?new Request(n,{headers:t.headers}):t},this._precacheController=e}}let p;function S(){if(p===void 0){const a=new Response("");if("body"in a)try{new Response(a.body),p=!0}catch{p=!1}p=!1}return p}async function W(a,e){let t=null;if(a.url&&(t=new URL(a.url).origin),t!==self.location.origin)throw new l("cross-origin-copy-response",{origin:t});const s=a.clone(),i={headers:new Headers(s.headers),status:s.status,statusText:s.statusText},r=S()?s.body:await s.blob();return new Response(r,i)}const A=a=>new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),"");function P(a,e){const t=new URL(a);for(const s of e)t.searchParams.delete(s);return t.href}async function D(a,e,t,s){const n=P(e.url,t);if(e.url===n)return a.match(e,s);const i=Object.assign(Object.assign({},s),{ignoreSearch:!0}),r=await a.keys(e,i);for(const c of r){const o=P(c.url,t);if(n===o)return a.match(c,s)}}class q{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const j=new Set;async function F(){for(const a of j)await a()}function H(a){return new Promise(e=>setTimeout(e,a))}try{self["workbox:strategies:7.3.0"]&&_()}catch{}function m(a){return typeof a=="string"?new Request(a):a}class B{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new q,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=m(e);if(s.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const r=await t.preloadResponse;if(r)return r}const n=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const r of this.iterateCallbacks("requestWillFetch"))s=await r({request:s.clone(),event:t})}catch(r){if(r instanceof Error)throw new l("plugin-error-request-will-fetch",{thrownErrorMessage:r.message})}const i=s.clone();try{let r;r=await fetch(s,s.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))r=await c({event:t,request:i,response:r});return r}catch(r){throw n&&await this.runCallbacks("fetchDidFail",{error:r,event:t,originalRequest:n.clone(),request:i.clone()}),r}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=m(e);let s;const{cacheName:n,matchOptions:i}=this._strategy,r=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await o({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(e,t){const s=m(e);await H(0);const n=await this.getCacheKey(s,"write");if(!t)throw new l("cache-put-with-no-response",{url:A(n.url)});const i=await this._ensureResponseSafeToCache(t);if(!i)return!1;const{cacheName:r,matchOptions:c}=this._strategy,o=await self.caches.open(r),h=this.hasCallback("cacheDidUpdate"),g=h?await D(o,n.clone(),["__WB_REVISION__"],c):null;try{await o.put(n,h?i.clone():i)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await F(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:r,oldResponse:g,newResponse:i.clone(),request:n,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let n=e;for(const i of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await i({mode:t,request:n,event:this.event,params:this.params}));this._cacheKeys[s]=n}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const s=this._pluginStateMap.get(t);yield i=>{const r=Object.assign(Object.assign({},i),{state:s});return t[e](r)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){const e=this._extendLifetimePromises.splice(0),s=(await Promise.allSettled(e)).find(n=>n.status==="rejected");if(s)throw s.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const n of this.iterateCallbacks("cacheWillUpdate"))if(t=await n({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&t.status!==200&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=C.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s=typeof e.request=="string"?new Request(e.request):e.request,n="params"in e?e.params:void 0,i=new B(this,{event:t,request:s,params:n}),r=this._getResponse(i,s,t),c=this._awaitComplete(r,i,s,t);return[r,c]}async _getResponse(e,t,s){await e.runCallbacks("handlerWillStart",{event:s,request:t});let n;try{if(n=await this._handle(t,e),!n||n.type==="error")throw new l("no-response",{url:t.url})}catch(i){if(i instanceof Error){for(const r of e.iterateCallbacks("handlerDidError"))if(n=await r({error:i,event:s,request:t}),n)break}if(!n)throw i}for(const i of e.iterateCallbacks("handlerWillRespond"))n=await i({event:s,request:t,response:n});return n}async _awaitComplete(e,t,s,n){let i,r;try{i=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await t.doneWaiting()}catch(c){c instanceof Error&&(r=c)}if(await t.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),t.destroy(),r)throw r}}class d extends V{constructor(e={}){e.cacheName=C.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(d.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const n=t.params||{};if(this._fallbackToNetwork){const i=n.integrity,r=e.integrity,c=!r||r===i;s=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?r||i:void 0})),i&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,s.clone()))}else throw new l("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new l("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,n]of this.plugins.entries())n!==d.copyRedirectedCacheableResponsesPlugin&&(n===d.defaultPrecacheCacheabilityPlugin&&(e=s),n.cacheWillUpdate&&t++);t===0?this.plugins.push(d.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}d.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:a}){return!a||a.status>=400?null:a}};d.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:a}){return a.redirected?await W(a):a}};class ${constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new d({cacheName:C.getPrecacheName(e),plugins:[...t,new M({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){typeof s=="string"?t.push(s):s&&s.revision===void 0&&t.push(s.url);const{cacheKey:n,url:i}=E(s),r=typeof s!="string"&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(i)&&this._urlsToCacheKeys.get(i)!==n)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(i),secondEntry:n});if(typeof s!="string"&&s.integrity){if(this._cacheKeysToIntegrities.has(n)&&this._cacheKeysToIntegrities.get(n)!==s.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:i});this._cacheKeysToIntegrities.set(n,s.integrity)}if(this._urlsToCacheKeys.set(i,n),this._urlsToCacheModes.set(i,r),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")}
2
- This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return k(e,async()=>{const t=new O;this.strategy.plugins.push(t);for(const[i,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(i),h=new Request(i,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:h,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}})}activate(e){return k(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),s=await t.keys(),n=new Set(this._urlsToCacheKeys.values()),i=[];for(const r of s)n.has(r.url)||(await t.delete(r),i.push(r.url));return{deletedURLs:i}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s)return(await self.caches.open(this.strategy.cacheName)).match(s)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let U;const K=()=>(U||(U=new $),U);try{self["workbox:routing:7.3.0"]&&_()}catch{}const v="GET",R=a=>a&&typeof a=="object"?a:{handle:a};class w{constructor(e,t,s=v){this.handler=R(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=R(e)}}class G extends w{constructor(e,t,s){const n=({url:i})=>{const r=e.exec(i.href);if(r&&!(i.origin!==location.origin&&r.index!==0))return r.slice(1)};super(n,t,s)}}class z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map(n=>{typeof n=="string"&&(n=[n]);const i=new Request(...n);return this.handleRequest({request:i,event:e})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let c=r&&r.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:s,request:e,event:t,params:i})}catch(u){h=Promise.reject(u)}const g=r&&r.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:s,request:e,event:t,params:i})}catch(L){L instanceof Error&&(u=L)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const i=this._routes.get(s.method)||[];for(const r of i){let c;const o=r.match({url:e,sameOrigin:t,request:s,event:n});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:r,params:c}}return{}}setDefaultHandler(e,t=v){this._defaultHandlerMap.set(t,R(e))}setCatchHandler(e){this._catchHandler=R(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const Q=()=>(y||(y=new z,y.addFetchListener(),y.addCacheListener()),y);function J(a,e,t){let s;if(typeof a=="string"){const i=new URL(a,location.href),r=({url:c})=>c.href===i.href;s=new w(r,e,t)}else if(a instanceof RegExp)s=new G(a,e,t);else if(typeof a=="function")s=new w(a,e,t);else if(a instanceof w)s=a;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Q().registerRoute(s),s}function X(a,e=[]){for(const t of[...a.searchParams.keys()])e.some(s=>s.test(t))&&a.searchParams.delete(t);return a}function*Y(a,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:s=!0,urlManipulation:n}={}){const i=new URL(a,location.href);i.hash="",yield i.href;const r=X(i,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(s){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(n){const c=n({url:i});for(const o of c)yield o.href}}class Z extends w{constructor(e,t){const s=({request:n})=>{const i=e.getURLsToCacheKeys();for(const r of Y(n.url,t)){const c=i.get(r);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(s,e.strategy)}}function ee(a){const e=K(),t=new Z(e,a);J(t)}const te="-precache-",se=async(a,e=te)=>{const s=(await self.caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==a);return await Promise.all(s.map(n=>self.caches.delete(n))),s};function ae(){self.addEventListener("activate",(a=>{const e=C.getPrecacheName();a.waitUntil(se(e).then(t=>{}))}))}function ne(a){K().precache(a)}function ie(a,e){ne(a),ee(e)}ae();ie([{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},{"revision":"7b0653faddc936caa089f1dbf8c3b7a3","url":"index.html"},{"revision":null,"url":"assets/xml-COG-BRHv.js"},{"revision":null,"url":"assets/web-gFMIJiWK.js"},{"revision":null,"url":"assets/web-DR5ufVxV.js"},{"revision":null,"url":"assets/web-CVvrmG-0.js"},{"revision":null,"url":"assets/web-CasgI1aI.js"},{"revision":null,"url":"assets/web-731MG9gc.js"},{"revision":null,"url":"assets/session-file-preview-page-DCpn44mO.js"},{"revision":null,"url":"assets/session-file-markdown-preview-ChAPAUwv.js"},{"revision":null,"url":"assets/session-diff-preview-D2OLvjY4.js"},{"revision":null,"url":"assets/index-DBWUmekP.css"},{"revision":null,"url":"assets/index-2xq-OQM2.js"},{"revision":null,"url":"assets/diagnostics-page-BmzeM8p1.css"},{"revision":null,"url":"assets/diagnostics-page-B1U4KFsP.js"},{"revision":"ce252fc684ae118a6f6cf9071809dffd","url":"apple-touch-icon.png"},{"revision":"b02f1b7803c9c7268e57c7d436517197","url":"icon.svg"},{"revision":"cf3a5edad6232ed8aa50814fb89c0554","url":"logo.png"},{"revision":"20d3c302662bcb19dbf6c59f1c7abf11","url":"maskable-512.png"},{"revision":"6f02e0dde6896109b490eccd706d82d6","url":"pwa-192.png"},{"revision":"5aeed9a5f97bb102f2c7f0348ac6bdf0","url":"pwa-512.png"},{"revision":"278e8c999f9f15c3726b6bac8a40c6c5","url":"small-icon.svg"},{"revision":"d7dcc96e69efd9ecf21ccd70313cee7b","url":"manifest.webmanifest"}]);self.addEventListener("message",a=>{var e;((e=a.data)==null?void 0:e.type)==="SKIP_WAITING"&&self.skipWaiting()});self.addEventListener("push",a=>{const e=(()=>{var s;try{return((s=a.data)==null?void 0:s.json())??{}}catch{return{}}})(),t=(()=>{try{return new URL(e.url??"/",self.location.origin).toString()}catch{return self.location.origin}})();a.waitUntil((async()=>{(await self.clients.matchAll({type:"window",includeUncontrolled:!0})).some(i=>"visibilityState"in i&&i.visibilityState==="visible"?i.url===t:!1)||await self.registration.showNotification(e.title??"Panda",{body:e.body??"点开查看最新会话进展。",tag:e.tag??"panda-web-push",icon:"/pwa-512.png",badge:"/pwa-192.png",data:{url:t,sessionId:e.sessionId??null}})})())});self.addEventListener("notificationclick",a=>{var t;const e=typeof((t=a.notification.data)==null?void 0:t.url)=="string"?a.notification.data.url:self.location.origin;a.notification.close(),a.waitUntil((async()=>{const s=await self.clients.matchAll({type:"window",includeUncontrolled:!0});for(const n of s)if("focus"in n){if(n.url===e){await n.focus();return}if("navigate"in n){await n.navigate(e),await n.focus();return}}await self.clients.openWindow(e)})())});
2
+ This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return k(e,async()=>{const t=new O;this.strategy.plugins.push(t);for(const[i,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(i),h=new Request(i,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:h,event:e}))}const{updatedURLs:s,notUpdatedURLs:n}=t;return{updatedURLs:s,notUpdatedURLs:n}})}activate(e){return k(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),s=await t.keys(),n=new Set(this._urlsToCacheKeys.values()),i=[];for(const r of s)n.has(r.url)||(await t.delete(r),i.push(r.url));return{deletedURLs:i}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s)return(await self.caches.open(this.strategy.cacheName)).match(s)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let U;const K=()=>(U||(U=new $),U);try{self["workbox:routing:7.3.0"]&&_()}catch{}const v="GET",R=a=>a&&typeof a=="object"?a:{handle:a};class w{constructor(e,t,s=v){this.handler=R(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=R(e)}}class G extends w{constructor(e,t,s){const n=({url:i})=>{const r=e.exec(i.href);if(r&&!(i.origin!==location.origin&&r.index!==0))return r.slice(1)};super(n,t,s)}}class z{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",(e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map(n=>{typeof n=="string"&&(n=[n]);const i=new Request(...n);return this.handleRequest({request:i,event:e})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}}))}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:n,url:s});let c=r&&r.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let h;try{h=c.handle({url:s,request:e,event:t,params:i})}catch(u){h=Promise.reject(u)}const g=r&&r.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:s,request:e,event:t,params:i})}catch(L){L instanceof Error&&(u=L)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:s,event:n}){const i=this._routes.get(s.method)||[];for(const r of i){let c;const o=r.match({url:e,sameOrigin:t,request:s,event:n});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:r,params:c}}return{}}setDefaultHandler(e,t=v){this._defaultHandlerMap.set(t,R(e))}setCatchHandler(e){this._catchHandler=R(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const Q=()=>(y||(y=new z,y.addFetchListener(),y.addCacheListener()),y);function J(a,e,t){let s;if(typeof a=="string"){const i=new URL(a,location.href),r=({url:c})=>c.href===i.href;s=new w(r,e,t)}else if(a instanceof RegExp)s=new G(a,e,t);else if(typeof a=="function")s=new w(a,e,t);else if(a instanceof w)s=a;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Q().registerRoute(s),s}function X(a,e=[]){for(const t of[...a.searchParams.keys()])e.some(s=>s.test(t))&&a.searchParams.delete(t);return a}function*Y(a,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:s=!0,urlManipulation:n}={}){const i=new URL(a,location.href);i.hash="",yield i.href;const r=X(i,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(s){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(n){const c=n({url:i});for(const o of c)yield o.href}}class Z extends w{constructor(e,t){const s=({request:n})=>{const i=e.getURLsToCacheKeys();for(const r of Y(n.url,t)){const c=i.get(r);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(s,e.strategy)}}function ee(a){const e=K(),t=new Z(e,a);J(t)}const te="-precache-",se=async(a,e=te)=>{const s=(await self.caches.keys()).filter(n=>n.includes(e)&&n.includes(self.registration.scope)&&n!==a);return await Promise.all(s.map(n=>self.caches.delete(n))),s};function ae(){self.addEventListener("activate",(a=>{const e=C.getPrecacheName();a.waitUntil(se(e).then(t=>{}))}))}function ne(a){K().precache(a)}function ie(a,e){ne(a),ee(e)}ae();ie([{"revision":"1872c500de691dce40960bb85481de07","url":"registerSW.js"},{"revision":"baa2eecc257e066e7405bd3c468164be","url":"index.html"},{"revision":null,"url":"assets/xml-BJn4g2Sn.js"},{"revision":null,"url":"assets/web-OEcsiG9z.js"},{"revision":null,"url":"assets/web-D9nPg8kF.js"},{"revision":null,"url":"assets/web-Cv1t4xrp.js"},{"revision":null,"url":"assets/web-BiBxkdSf.js"},{"revision":null,"url":"assets/web-BBYipy_G.js"},{"revision":null,"url":"assets/session-file-preview-page-DbdsZil_.js"},{"revision":null,"url":"assets/session-file-markdown-preview-BoOjcJcb.js"},{"revision":null,"url":"assets/session-diff-preview-5oB0rJ5W.js"},{"revision":null,"url":"assets/index-qres5phQ.css"},{"revision":null,"url":"assets/index-Buoz6IYL.js"},{"revision":null,"url":"assets/diagnostics-page-BmzeM8p1.css"},{"revision":null,"url":"assets/diagnostics-page-4wwMLeXa.js"},{"revision":"ce252fc684ae118a6f6cf9071809dffd","url":"apple-touch-icon.png"},{"revision":"b02f1b7803c9c7268e57c7d436517197","url":"icon.svg"},{"revision":"cf3a5edad6232ed8aa50814fb89c0554","url":"logo.png"},{"revision":"20d3c302662bcb19dbf6c59f1c7abf11","url":"maskable-512.png"},{"revision":"6f02e0dde6896109b490eccd706d82d6","url":"pwa-192.png"},{"revision":"5aeed9a5f97bb102f2c7f0348ac6bdf0","url":"pwa-512.png"},{"revision":"278e8c999f9f15c3726b6bac8a40c6c5","url":"small-icon.svg"},{"revision":"d7dcc96e69efd9ecf21ccd70313cee7b","url":"manifest.webmanifest"}]);self.addEventListener("message",a=>{var e;((e=a.data)==null?void 0:e.type)==="SKIP_WAITING"&&self.skipWaiting()});self.addEventListener("push",a=>{const e=(()=>{var s;try{return((s=a.data)==null?void 0:s.json())??{}}catch{return{}}})(),t=(()=>{try{return new URL(e.url??"/",self.location.origin).toString()}catch{return self.location.origin}})();a.waitUntil((async()=>{(await self.clients.matchAll({type:"window",includeUncontrolled:!0})).some(i=>"visibilityState"in i&&i.visibilityState==="visible"?i.url===t:!1)||await self.registration.showNotification(e.title??"Panda",{body:e.body??"点开查看最新会话进展。",tag:e.tag??"panda-web-push",icon:"/pwa-512.png",badge:"/pwa-192.png",data:{url:t,sessionId:e.sessionId??null}})})())});self.addEventListener("notificationclick",a=>{var t;const e=typeof((t=a.notification.data)==null?void 0:t.url)=="string"?a.notification.data.url:self.location.origin;a.notification.close(),a.waitUntil((async()=>{const s=await self.clients.matchAll({type:"window",includeUncontrolled:!0});for(const n of s)if("focus"in n){if(n.url===e){await n.focus();return}if("navigate"in n){await n.navigate(e),await n.focus();return}}await self.clients.openWindow(e)})())});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jamiexiongr/panda-hub",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Panda hub runtime",