@winstonfassett/webdev-gateway 0.1.0-alpha.1 → 0.1.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -58,7 +58,7 @@ const partysocket = new PartySocket({
|
|
|
58
58
|
\${}
|
|
59
59
|
}`,{label:`interface`,detail:`definition`,type:`keyword`}),jw("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),jw(`enum \${name} {
|
|
60
60
|
\${}
|
|
61
|
-
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),WE=new h_,GE=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function KE(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var qE=[`FunctionDeclaration`],JE={FunctionDeclaration:KE(`function`),ClassDeclaration:KE(`class`),ClassExpression:()=>!0,EnumDeclaration:KE(`constant`),TypeAliasDeclaration:KE(`type`),NamespaceDeclaration:KE(`namespace`),VariableDefinition(e,t){e.matchContext(qE)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function YE(e,t){let n=WE.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Jg.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=JE[t.name];if(e&&e(t,a)||GE.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of YE(e,t.node))r.push(n);return!1}}),WE.set(t,r),r}var XE=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ZE=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function QE(e){let t=$_(e.state).resolveInner(e.pos,-1);if(ZE.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&XE.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)GE.has(n.name)&&(r=r.concat(YE(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:XE}}var $E=Q_.define({name:`javascript`,parser:VE.configure({props:[gv.add({IfStatement:Ov({except:/^\s*({|else\b)/}),TryStatement:Ov({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Dv,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:Tv({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ov({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Mv.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Nv,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),eD={test:e=>/^JSX/.test(e.name),facet:J_({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},tD=$E.configure({dialect:`ts`},`typescript`),nD=$E.configure({dialect:`jsx`,props:[Y_.add(e=>e.isTop?[eD]:void 0)]}),rD=$E.configure({dialect:`jsx ts`,props:[Y_.add(e=>e.isTop?[eD]:void 0)]},`typescript`),iD=e=>({label:e,type:`keyword`}),aD=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(iD),oD=aD.concat([`declare`,`implements`,`private`,`protected`,`public`].map(iD));function sD(e={}){let t=e.jsx?e.typescript?rD:nD:e.typescript?tD:$E,n=e.typescript?UE.concat(oD):HE.concat(aD);return new lv(t,[$E.data.of({autocomplete:xC(ZE,bC(n))}),$E.data.of({autocomplete:QE}),e.jsx?dD:[]])}function cD(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function lD(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var uD=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),dD=Y.inputHandler.of((e,t,n,r,i)=>{if((uD?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!$E.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=$_(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=lD(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:W.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=cD(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=lD(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),fD=`#e5c07b`,pD=`#e06c75`,mD=`#56b6c2`,hD=`#ffffff`,gD=`#abb2bf`,_D=`#7d8799`,vD=`#61afef`,yD=`#98c379`,bD=`#d19a66`,xD=`#c678dd`,SD=`#21252b`,CD=`#2c313a`,wD=`#282c34`,TD=`#353a42`,ED=`#3E4451`,DD=`#528bff`,OD=[Y.theme({"&":{color:gD,backgroundColor:wD},".cm-content":{caretColor:DD},".cm-cursor, .cm-dropCursor":{borderLeftColor:DD},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ED},".cm-panels":{backgroundColor:SD,color:gD},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:wD,color:_D,border:`none`},".cm-activeLineGutter":{backgroundColor:CD},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:TD},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:TD,borderBottomColor:TD},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:CD,color:gD}}},{dark:!0}),uy(oy.define([{tag:Q.keyword,color:xD},{tag:[Q.name,Q.deleted,Q.character,Q.propertyName,Q.macroName],color:pD},{tag:[Q.function(Q.variableName),Q.labelName],color:vD},{tag:[Q.color,Q.constant(Q.name),Q.standard(Q.name)],color:bD},{tag:[Q.definition(Q.name),Q.separator],color:gD},{tag:[Q.typeName,Q.className,Q.number,Q.changed,Q.annotation,Q.modifier,Q.self,Q.namespace],color:fD},{tag:[Q.operator,Q.operatorKeyword,Q.url,Q.escape,Q.regexp,Q.link,Q.special(Q.string)],color:mD},{tag:[Q.meta,Q.comment],color:_D},{tag:Q.strong,fontWeight:`bold`},{tag:Q.emphasis,fontStyle:`italic`},{tag:Q.strikethrough,textDecoration:`line-through`},{tag:Q.link,color:_D,textDecoration:`underline`},{tag:Q.heading,fontWeight:`bold`,color:pD},{tag:[Q.atom,Q.bool,Q.special(Q.variableName)],color:bD},{tag:[Q.processingInstruction,Q.string,Q.inserted],color:yD},{tag:Q.invalid,color:hD}]))],kD=R(`<span class="text-[10px] text-dim ml-auto"> </span>`),AD=R('<button class="h-7 w-full border-t border-border flex items-center px-3 shrink-0 cursor-pointer hover:bg-muted/50 transition-colors"><span class="text-[10px] text-muted-foreground">REPL</span> <span class="text-[10px] text-dim ml-2">Ctrl+`</span> <!></button>'),jD=R(`<option> </option>`),MD=R(`<select class="text-[11px] bg-transparent text-muted-foreground border border-border rounded px-1.5 py-0.5 cursor-pointer hover:text-foreground focus:outline-none focus:border-accent max-w-60 truncate"></select>`),ND=R(`<span class="text-[10px] text-dim">No browsers connected</span>`),PD=R(`<div class="text-dim py-2">Enter to run · Shift+Enter for newline · eval() in browser</div>`),FD=R(`<div class="py-0.5"><div class="text-dim"><span class="text-accent"></span> </div> <pre> </pre></div>`),ID=R(`<span>Run</span> <span class="text-[9px] opacity-70 font-mono">↵</span>`,1),LD=R('<div class="border-t border-border flex flex-col shrink-0" style="height: 280px;"><div class="flex items-center gap-2 px-3 py-1 border-b border-border shrink-0"><button class="text-[10px] text-muted-foreground hover:text-foreground" title="Collapse (Ctrl+`)">▾ REPL</button> <!> <div class="flex-1"></div> <span class="text-[10px] text-dim"> </span> <button class="text-[10px] text-muted-foreground hover:text-foreground transition-colors">Clear</button></div> <div class="flex-1 overflow-y-auto font-mono text-[11px] leading-[18px] px-3 py-1"><!></div> <div class="border-t border-border shrink-0"><div class="flex items-center gap-1 px-2"><span class="text-accent text-[11px] shrink-0"></span> <div class="flex-1 overflow-hidden"></div> <button title="Run (Enter) · Shift+Enter for newline" class="text-[10px] px-2 py-0.5 rounded bg-accent text-accent-foreground hover:bg-accent/90 disabled:opacity-30 shrink-0 cursor-pointer flex items-center gap-1"><!></button></div></div></div>');function RD(e,t){Ke(t,!0);let n=Vi(t,`open`,15,!1),r=Wo(),i=k(!1),a=fn([]),o=k(void 0),s=k(void 0),c=null,l=k(``),u=`admin-svelte:repl:history`,d=[],f=-1,p=``;try{let e=localStorage.getItem(u);e&&(d=JSON.parse(e))}catch{}function m(){try{localStorage.setItem(u,JSON.stringify(d))}catch{}}function h(e){e&&d[d.length-1]!==e&&(d.push(e),d.length>100&&d.splice(0,d.length-100),m())}function g(e,t=!0){c&&c.dispatch({changes:{from:0,to:c.state.doc.length,insert:e},selection:t?{anchor:e.length}:void 0})}function _(e){let t=e.state.selection.main.head;if(e.state.doc.lineAt(t).number!==1)return!1;if(d.length===0)return!0;if(f===-1)p=e.state.doc.toString(),f=d.length-1;else if(f>0)f--;else return!0;return g(d[f]),!0}function v(e){let t=e.state.selection.main.head;return e.state.doc.lineAt(t).number!==e.state.doc.lines||f===-1?!1:(f<d.length-1?(f++,g(d[f])):(f=-1,g(p),p=``),!0)}let y=O(()=>{let e=[];for(let n of r.projects)if(!(t.route.view===`project`&&n.projectId!==t.route.projectId)&&!(t.route.view===`server`&&n.projectId!==t.route.projectId)&&!(t.route.view===`browser`&&n.projectId!==t.route.projectId))for(let r of n.browsers){if(t.route.view===`browser`&&(r.browserId??r.connId)!==t.route.browserId)continue;let i=n.servers.find(e=>e.id===r.serverId),a=i?.endpoints[0]?.port?`:${i.endpoints[0].port}`:``,o=(r.browserId??r.connId)?.slice(0,6)??`?`;e.push({label:`${n.projectId}${a} / ${o}`,serverId:r.serverId??``,browserId:r.browserId??r.connId})}return e});Ln(()=>{I(y).length>0&&!I(y).find(e=>e.serverId===I(l))&&A(l,I(y)[0].serverId,!0)});async function b(){if(I(i)||!c)return;let e=c.state.doc.toString().trim();if(!e)return;let t=I(y).find(e=>e.serverId===I(l));if(!t){a.push({code:e,result:`No browser target selected`,isError:!0,target:`—`,timestamp:Date.now()});return}h(e),f=-1,p=``,g(``),A(i,!0);try{let n=Po();if(!n)throw Error(`Not connected`);let r=await n.evalInBrowser(e,t.serverId),i=x(String(r))??String(r);a.push({code:e,result:i,isError:!1,target:t.label,timestamp:Date.now()})}catch(n){a.push({code:e,result:n.message??String(n),isError:!0,target:t.label,timestamp:Date.now()})}finally{A(i,!1),S()}}function x(e){try{let t=JSON.parse(e);return JSON.stringify(t,null,2)}catch{return null}}function S(){requestAnimationFrame(()=>{I(s)&&(I(s).scrollTop=I(s).scrollHeight)})}function ee(){a.splice(0,a.length)}Hi(()=>{function e(e){e.key==="`"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),n(!n()))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}),Ln(()=>{n()&&I(o)&&!c&&(c=new Y({doc:`document.title`,extensions:[jT,sD(),OD,hc.highest(Pm.of([{key:`Enter`,run:()=>(b(),!0)},{key:`Shift-Enter`,run:Xx},{key:`Mod-Enter`,run:()=>(b(),!0)},{key:`ArrowUp`,run:_},{key:`ArrowDown`,run:v}])),Y.theme({"&":{fontSize:`12px`,maxHeight:`120px`},".cm-scroller":{overflow:`auto`},".cm-gutters":{display:`none`}})],parent:I(o)}),c.focus())});var C=Yr(),te=Cn(C),ne=e=>{var t=AD(),r=M(j(t),4),i=e=>{var t=kD(),n=j(t);E(t),N(()=>B(n,`${a.length??``} entries`)),z(e,t)};V(r,e=>{a.length>0&&e(i)}),E(t),L(`click`,t,()=>n(!0)),z(e,t)},re=e=>{var t=LD(),r=j(t),c=j(r),u=M(c,2),d=e=>{var t=MD();ai(t,21,()=>I(y),ti,(e,t)=>{var n=jD(),r=j(n,!0);E(n);var i={};N(()=>{B(r,I(t).label),i!==(i=I(t).serverId)&&(n.value=(n.__value=I(t).serverId)??``)}),z(e,n)}),E(t),Ei(t,()=>I(l),e=>A(l,e)),z(e,t)},f=e=>{z(e,ND())};V(u,e=>{I(y).length>0?e(d):e(f,-1)});var p=M(u,4),m=j(p,!0);E(p);var h=M(p,2);E(r);var g=M(r,2),_=j(g),v=e=>{z(e,PD())},x=e=>{var t=Yr();ai(Cn(t),17,()=>a,ti,(e,t)=>{var n=FD(),r=j(n),i=j(r);i.textContent=`>`;var a=M(i);E(r);var o=M(r,2),s=j(o,!0);E(o),E(n),N(e=>{B(a,` ${e??``}`),xi(o,1,`${I(t).isError?`text-destructive`:`text-foreground`} whitespace-pre-wrap pl-3`),B(s,I(t).result)},[()=>I(t).code.length>100?I(t).code.slice(0,100)+`...`:I(t).code]),z(e,n)}),z(e,t)};V(_,e=>{a.length===0?e(v):e(x,-1)}),E(g),Bi(g,e=>A(s,e),()=>I(s));var S=M(g,2),C=j(S),te=j(C);te.textContent=`>`;var ne=M(te,2);Bi(ne,e=>A(o,e),()=>I(o));var re=M(ne,2),ie=j(re),ae=e=>{z(e,Jr(`...`))},oe=e=>{var t=ID();Pe(2),z(e,t)};V(ie,e=>{I(i)?e(ae):e(oe,-1)}),E(re),E(C),E(S),E(t),N(()=>{B(m,a.length),re.disabled=I(i)||I(y).length===0}),L(`click`,c,()=>n(!1)),L(`click`,h,ee),L(`click`,re,b),z(e,t)};V(te,e=>{n()?e(re,-1):e(ne)}),z(e,C),qe()}zr([`click`]);var zD=R(`<div><!></div>`);function BD(e,t){Ke(t,!0);let n=Vi(t,`target`,3,`body`),r=(e,t)=>{async function n(t){let n=document.querySelector(t);if(n===null&&(await Er(),n=document.querySelector(t)),n===null)throw Error(`No element found matching selector`);n.appendChild(e)}function r(){e.parentNode&&e.parentNode.removeChild(e)}return n(t),{update:n,destroy:r}};var i=zD(),a=j(i),o=e=>{var n=Yr();di(Cn(n),()=>t.children),z(e,n)};V(a,e=>{t.children&&e(o)}),E(i),fi(i,(e,t)=>r?.(e,t),n),z(e,i),qe()}var VD=ut({isVisible:!1,textInput:``,commands:[],storeMethods:{},actionMap:{},activeCommandId:0,selectedCommandId:0,calledActions:[],results:[]});function HD(e){return Array.isArray?Array.isArray(e):QD(e)===`[object Array]`}function UD(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function WD(e){return e==null?``:UD(e)}function GD(e){return typeof e==`string`}function KD(e){return typeof e==`number`}function qD(e){return e===!0||e===!1||YD(e)&&QD(e)==`[object Boolean]`}function JD(e){return typeof e==`object`}function YD(e){return JD(e)&&e!==null}function XD(e){return e!=null}function ZD(e){return!e.trim().length}function QD(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var $D=`Incorrect 'index' type`,eO=e=>`Invalid value for key ${e}`,tO=e=>`Pattern length exceeds max of ${e}.`,nO=e=>`Missing ${e} property in key`,rO=e=>`Property 'weight' in key '${e}' must be a positive integer`,iO=Object.prototype.hasOwnProperty,aO=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=oO(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function oO(e){let t=null,n=null,r=null,i=1,a=null;if(GD(e)||HD(e))r=e,t=sO(e),n=cO(e);else{if(!iO.call(e,`name`))throw Error(nO(`name`));let o=e.name;if(r=o,iO.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(rO(o));t=sO(o),n=cO(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function sO(e){return HD(e)?e:e.split(`.`)}function cO(e){return HD(e)?e.join(`.`):e}function lO(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(XD(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!XD(s))return;if(a===t.length-1&&(GD(s)||KD(s)||qD(s)||typeof s==`bigint`))n.push(o===void 0?WD(s):{v:WD(s),i:o});else if(HD(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,GD(t)?t.split(`.`):t,0),r?n:n[0]}var uO={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},dO={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},fO={location:0,threshold:.6,distance:100},pO={useExtendedSearch:!1,useTokenSearch:!1,getFn:lO,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},$=Object.freeze({...dO,...uO,...fO,...pO}),mO=/[^ ]+/g;function hO(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(mO).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var gO=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=hO(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,GD(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();GD(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!XD(e)||ZD(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(XD(i)){if(HD(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(XD(n)){if(GD(n)){if(!ZD(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(XD(n.v)){let t=GD(n.v)?n.v:WD(n.v);if(!ZD(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(GD(i)&&!ZD(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function _O(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new gO({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(oO)),i.setSources(t),i.create(),i}function vO(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new gO({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function yO(e=[],t=$.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var bO=32;function xO(e,t,n,{location:r=$.location,distance:i=$.distance,threshold:a=$.threshold,findAllMatches:o=$.findAllMatches,minMatchCharLength:s=$.minMatchCharLength,includeMatches:c=$.includeMatches,ignoreLocation:l=$.ignoreLocation}={}){if(t.length>bO)throw Error(tO(bO));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let ee={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=yO(_,s);e.length?c&&(ee.indices=e):ee.isMatch=!1}return ee}function SO(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function CO(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var wO={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},TO=RegExp(`[`+Object.keys(wO).join(``)+`]`,`g`),EO=String.prototype.normalize?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(TO,e=>wO[e]):e=>e,DO=class{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?EO(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:SO(e),startIndex:t})},d=this.pattern.length;if(d>bO){let e=0,t=d%bO,n=d-t;for(;e<n;)u(this.pattern.substr(e,bO),e),e+=bO;if(t){let e=d-bO;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?EO(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=xO(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=CO(u)),p}},OO=class{constructor(e){this.pattern=e}static isMultiMatch(e){return kO(e,this.multiRegex)}static isSingleMatch(e){return kO(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function kO(e,t){let n=e.match(t);return n?n[1]:null}var AO=class extends OO{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},jO=class extends OO{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},MO=class extends OO{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},NO=class extends OO{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},PO=class extends OO{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},FO=class extends OO{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},IO=class extends OO{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){super(e),this._bitapSearch=new DO(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},LO=class extends OO{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},RO=[AO,LO,MO,NO,FO,PO,jO,IO],zO=RO.length,BO=`\0`,VO=`|`;function HO(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function UO(e,t={}){return e.replace(/\\\|/g,BO).split(VO).map(e=>{let n=HO(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<zO;){let e=RO[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<zO;){let e=RO[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var WO=new Set([IO.type,LO.type]),GO=class{constructor(e,{isCaseSensitive:t=$.isCaseSensitive,ignoreDiacritics:n=$.ignoreDiacritics,includeMatches:r=$.includeMatches,minMatchCharLength:i=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:o=$.findAllMatches,location:s=$.location,threshold:c=$.threshold,distance:l=$.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?EO(e):e,this.pattern=e,this.query=UO(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?EO(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l){a+=1,s+=d;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(WO.has(e)?o.push(...u):o.push(u))}else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=CO(o)),e}}return{isMatch:!1,score:1}}},KO=[];function qO(...e){KO.push(...e)}function JO(e,t){for(let n=0,r=KO.length;n<r;n+=1){let r=KO[n];if(r.condition(e,t))return new r(e,t)}return new DO(e,t)}var YO={AND:`$and`,OR:`$or`},XO={PATH:`$path`,PATTERN:`$val`},ZO=e=>!!(e[YO.AND]||e[YO.OR]),QO=e=>!!e[XO.PATH],$O=e=>!HD(e)&&JD(e)&&!ZO(e),ek=e=>({[YO.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function tk(e,t,{auto:n=!0}={}){let r=e=>{if(GD(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=JO(e,t)),r}let i=Object.keys(e),a=QO(e);if(!a&&i.length>1&&!ZO(e))return r(ek(e));if($O(e)){let r=a?e[XO.PATH]:i[0],o=a?e[XO.PATTERN]:e[r];if(!GD(o))throw Error(eO(r));let s={keyId:cO(r),pattern:o};return n&&(s.searcher=JO(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];HD(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return ZO(e)||(e=ek(e)),r(e)}function nk(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function rk(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{e.score=nk(e.matches,{ignoreFieldNorm:t})})}var ik=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function ak(e,t){let n=e.matches;t.matches=[],XD(n)&&n.forEach(e=>{if(!XD(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ok(e,t){t.score=e.score}function sk(e,t,{includeMatches:n=$.includeMatches,includeScore:r=$.includeScore}={}){let i=[];return n&&i.push(ak),r&&i.push(ok),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var ck=/\b\w+\b/g;function lk({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=EO(n)),n.match(ck)||[]}}}function uk(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function dk(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function fk(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var pk=class{constructor(e,t,n){this.options={...$,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new aO(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=JO(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof gO))throw Error($D);if(this._myIndex=t||_O(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=lk({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=uk(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(XD(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=lk({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});dk(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){if(this._invertedIndex)for(let e of n)fk(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&fk(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(GD(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return KD(n)&&n>-1&&(e=e.slice(0,n)),e}let c=KD(n)&&n>0&&GD(e),l;if(c){let t=new ik(n);GD(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=GD(e)?GD(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),rk(l,{ignoreFieldNorm:s}),a&&l.sort(o),KD(n)&&n>-1&&(l=l.slice(0,n));return sk(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!XD(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=nk(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=tk(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===YO.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(XD(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!XD(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=nk(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!XD(t))return[];let r=[];if(HD(t))t.forEach(({v:t,i,n:a})=>{if(!XD(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},mk=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=lk({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new DO(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=CO(t)),o}};pk.version=`7.3.0`,pk.createIndex=_O,pk.parseIndex=vO,pk.config=$,pk.match=function(e,t,n){return JO(e,{...$,...n}).searchIn(t)},pk.parseQuery=tk,qO(GO),qO(mk),pk.use=function(...e){e.forEach(e=>qO(e))};var hk=()=>!0,gk=(e=[])=>e.map(({actionId:e=Math.random(),canActionRun:t=hk,title:n=``,subTitle:r=``,onRun:i=hk,description:a,keywords:o=[],shortcut:s=``,icon:c,group:l})=>({actionId:e,canActionRun:t,title:n,subTitle:r,onRun:i,description:a,keywords:o,shortcut:s,icon:c,group:l})),_k=e=>e.map(({item:e})=>e),vk=e=>{VD.update(t=>({...t,isVisible:!1,textInput:``,activeCommandId:null,selectedCommandId:null,results:[],calledActions:[...t.calledActions,e]}))},yk=({action:e})=>{let{onRun:t,canActionRun:n=hk,actionId:r=``}=e||{},i=dt(VD),{storeMethods:a}=i;return n({action:e,storeProps:i,storeMethods:a})&&t?(vk(r),t?.({action:e,storeProps:i,storeMethods:a}),!0):(VD.update(e=>({...e,isVisible:!1})),!1)},bk=e=>new pk(e,{keys:[{name:`title`,weight:1},{name:`subTitle`,weight:.7},{name:`description`,weight:.6},{name:`keywords`,weight:.5}],threshold:.4,ignoreLocation:!0}),xk=(...e)=>e.find((e=[])=>e.length>0)||[],Sk=e=>e.replace(/([a-zA-Z])(?=[A-Z])/g,`$1-`).toLowerCase(),Ck=(e={})=>e?Object.keys(e).reduce((t,n)=>`${t}; ${Sk(n)}: ${e[n]}`,``):``,wk=e=>{let t=new Map,n=[];if(e.forEach(e=>{if(e.group){let n=t.get(e.group)||[];t.set(e.group,[...n,e])}else n.push(e)}),n.length>0){let e=new Map;return e.set(``,n),t.forEach((t,n)=>e.set(n,t)),e}return t},Tk={isVisible:!1,textInput:``,activeCommandId:null,selectedCommandId:null,results:[]},Ek=`themeContext`,Dk=R(`<kbd role="button"><!></kbd>`);function Ok(e,t){Ke(t,!0);let n=()=>ht(o,`$themeCtx`,r),[r,i]=gt(),a=e=>{e.stopPropagation(),t.onKeyboardButtonClicked?.({event:e})},o=We(Ek),{unstyled:s,keyboardButtonClass:c,keyboardButtonStyle:l}=n();var u=Dk();let d;var f=j(u),p=e=>{var n=Yr();di(Cn(n),()=>t.children),z(e,n)};V(f,e=>{t.children&&e(p)}),E(u),N(()=>{Mi(u,`tabindex`,t.onKeyboardButtonClicked?0:-1),Ci(u,l),d=xi(u,1,hi(c),`svelte-1vzpvtd`,d,{"cp-kbd":!s})}),L(`click`,u,a),L(`keydown`,u,e=>e.key===`Enter`&&a(e)),z(e,u),qe(),i()}zr([`click`,`keydown`]);var kk=`modulepreload`,Ak=function(e){return`/__admin/`+e},jk={},Mk=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ak(t,n),t in jk)return;jk[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:kk,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Nk=R(`<img alt="" width="20" height="20" class="svelte-16igsvt"/>`),Pk=R(`<span class="cp-result-emoji svelte-16igsvt"> </span>`),Fk=R(`<div class="cp-result-icon svelte-16igsvt"><!></div>`),Ik=R(`<div> </div>`),Lk=R(`<div> </div>`),Rk=R(`<span> </span>`),zk=R(`<div class="cp-result-shortcuts svelte-16igsvt"></div>`),Bk=R(`<div role="option"><!> <div class="cp-result-content svelte-16igsvt"><div><span> </span></div> <!> <!></div> <!></div>`);function Vk(e,t){Ke(t,!0);let n=()=>ht(l,`$themeCtx`,i),r=()=>ht(VD,`$paletteStore`,i),[i,a]=gt(),o=k(void 0),s=k(!1),c=k(fn([])),l=We(Ek),{resultContainerClass:u,unstyled:d,optionSelectedClass:f,titleClass:p,subtitleClass:m,descriptionClass:h,resultContainerStyle:g,titleStyle:_,subtitleStyle:v,descriptionStyle:y,optionSelectedStyle:b}=n();Ln(()=>{t.action.actionId===r().activeCommandId&&I(o)?(A(s,!0),requestAnimationFrame(()=>{I(o)?.scrollIntoView?.({behavior:`smooth`,block:`nearest`})})):A(s,!1)});let x=()=>{yk({action:t.action})};Hi(async()=>{let{parseKeybinding:e}=await Mk(()=>import(`./tinykeys.module-CjuTRcEz.js`),[]);t.action.shortcut&&A(c,e(t.action.shortcut).flat().filter(e=>e.length>0),!0)});let S=()=>{A(s,!0),VD.update(e=>({...e,activeCommandId:t.action.actionId||``,selectedCommandId:t.action.actionId||``}))},ee=()=>{A(s,!1)};var C=Bk();let te;Mi(C,`tabindex`,-1);var ne=j(C),re=e=>{var n=Fk(),r=j(n),i=e=>{var n=Yr();di(Cn(n),()=>t.action.icon),z(e,n)},a=e=>{var n=Yr(),r=Cn(n),i=e=>{var n=Nk();N(()=>Mi(n,`src`,t.action.icon)),z(e,n)},a=O(()=>t.action.icon.startsWith(`http`)||t.action.icon.startsWith(`/`)),o=e=>{var n=Pk(),r=j(n,!0);E(n),N(()=>B(r,t.action.icon)),z(e,n)};V(r,e=>{I(a)?e(i):e(o,-1)}),z(e,n)};V(r,e=>{typeof t.action.icon==`function`?e(i):typeof t.action.icon==`string`&&e(a,1)}),E(n),z(e,n)};V(ne,e=>{t.action.icon&&e(re)});var ie=M(ne,2),ae=j(ie);let oe;var se=j(ae),ce=j(se,!0);E(se),E(ae);var le=M(ae,2),ue=e=>{var n=Ik(),r=j(n,!0);E(n),N(()=>{xi(n,1,`cp-result-subtitle ${m||``}`,`svelte-16igsvt`),Ci(n,v||``),B(r,t.action.subTitle)}),z(e,n)};V(le,e=>{t.action.subTitle&&e(ue)});var de=M(le,2),fe=e=>{var n=Lk(),r=j(n,!0);E(n),N(()=>{xi(n,1,`cp-result-description ${h||``}`,`svelte-16igsvt`),Ci(n,y||``),B(r,t.action.description)}),z(e,n)};V(de,e=>{t.action.description&&e(fe)}),E(ie);var pe=M(ie,2),me=e=>{var t=zk();ai(t,21,()=>I(c),ti,(e,t)=>{Ok(e,{children:e=>{var n=Rk(),r=j(n,!0);E(n),N(()=>B(r,I(t))),z(e,n)},$$slots:{default:!0}})}),E(t),z(e,t)};V(pe,e=>{I(c).length>0&&e(me)}),E(C),Bi(C,e=>A(o,e),()=>I(o)),N(()=>{te=xi(C,1,`${u||``} ${I(s)&&d&&f||``}`,`svelte-16igsvt`,te,{"cp-result":!d,"cp-result-active":!d&&I(s)}),Ci(C,`${g||``} ${I(s)&&b||``}`),Mi(C,`aria-selected`,I(s)),Mi(C,`id`,`palette-${t.action.actionId}`),oe=xi(ae,1,`cp-result-title ${p||``}`,`svelte-16igsvt`,oe,{title:!d}),Ci(ae,_||``),B(ce,t.action.title)}),L(`click`,C,x),L(`keydown`,C,e=>e.key===`Enter`&&x()),Rr(`mouseenter`,C,S),Rr(`mouseleave`,C,ee),z(e,C),qe(),a()}zr([`click`,`keydown`]);var Hk=R(`<div class="cp-group-header svelte-17am6af"> </div>`),Uk=R(`<!> <!>`,1),Wk=R(`<div role="listbox" id="command-palette-results"></div>`),Gk=R(`<div class="cp-empty-content svelte-17am6af"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg> <p class="svelte-17am6af">No results found</p> <span class="svelte-17am6af">Try a different search term</span></div>`),Kk=R(`<div class="cp-empty svelte-17am6af"><!></div>`);function qk(e,t){Ke(t,!0);let n=()=>ht(s,`$themeCtx`,r),[r,i]=gt(),a=k(fn([])),o=VD.subscribe(e=>{A(a,e.results.length>0?xk(e.results):xk(e.commands),!0)}),s=We(Ek),{resultsContainerClass:c,unstyled:l,resultsContainerStyle:u}=n(),d=O(()=>wk(I(a)));Ui(o);var f=Yr(),p=Cn(f),h=e=>{var t=Wk();let n;ai(t,21,()=>[...I(d).entries()],ti,(e,t,n,r)=>{var i=O(()=>m(I(t),2));let a=()=>I(i)[0],o=()=>I(i)[1];var s=Uk(),c=Cn(s),l=e=>{var t=Hk(),n=j(t,!0);E(t),N(()=>B(n,a())),z(e,t)};V(c,e=>{a()&&e(l)}),ai(M(c,2),17,o,e=>e.actionId,(e,t)=>{Vk(e,{get action(){return I(t)}})}),z(e,s)}),E(t),N(()=>{n=xi(t,1,hi(c),`svelte-17am6af`,n,{"cp-results":!l}),Ci(t,u)}),z(e,t)},g=e=>{var n=Kk(),r=j(n),i=e=>{var n=Yr();di(Cn(n),()=>t.emptyState),z(e,n)},a=e=>{z(e,Gk())};V(r,e=>{t.emptyState?e(i):e(a,-1)}),E(n),z(e,n)};V(p,e=>{I(a).length>0?e(h):e(g,-1)}),z(e,f),qe(),i()}var Jk=({actions:e=[]})=>e.reduce((e,t)=>{let n=e=>{let{isVisible:n}=dt(VD);n||(e.preventDefault(),yk({action:t}))},{shortcut:r}=t;return r&&(e[r]=n),e},{}),Yk=()=>{let e=dt(VD),t=()=>{VD.update(e=>({...e,...Tk}))};return{togglePalette:()=>{VD.update(e=>({...e,isVisible:!e.isVisible,activeCommandId:``}))},getAllCalledActions:()=>e.calledActions||[],storeCalledAction:t=>{let{calledActions:n}=e;n.push(t),VD.update(e=>({...e,calledActions:n}))},revertLastAction:t=>{let{calledActions:n}=e;n.pop(),VD.update(e=>({...e,calledActions:n}))},resetActionLog:()=>{VD.update(e=>({...e,calledActions:[]}))},openPalette:()=>{VD.update(e=>({...e,isVisible:!0}))},closePalette:()=>{t()},resetPaletteStore:t}},Xk=(e=[])=>e.reduce((e,t)=>{let{actionId:n=``}=t;return n!==null&&(e[n]=t),e},{}),Zk=R(`<div id="command-palette-overlay" role="presentation"><div class="cp-wrapper" role="dialog" aria-modal="true" aria-label="Command palette"><div role="combobox" aria-expanded="true" aria-haspopup="listbox" aria-controls="command-palette-results"><form autocomplete="off" role="search" novalidate="" class="svelte-sfqeu0"><label class="sr-only svelte-sfqeu0">Search for an action</label> <div class="cp-input-wrapper svelte-sfqeu0"><svg class="cp-search-icon svelte-sfqeu0" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg> <input type="text" aria-autocomplete="list" autocomplete="off" autocapitalize="off"/> <!></div></form> <!></div></div></div>`);function Qk(e,t){Ke(t,!0);let n=()=>ht(VD,`$paletteStore`,r),[r,i]=gt(),a=Vi(t,`commands`,19,()=>[]),o=Vi(t,`placeholder`,3,`Search for an action...`),s=Vi(t,`shortcut`,3,`$mod+k`),c=Vi(t,`inputClass`,3,null),l=Vi(t,`overlayClass`,3,null),u=Vi(t,`paletteWrapperInnerClass`,3,null),d=Vi(t,`resultsContainerClass`,3,null),f=Vi(t,`resultContainerClass`,3,null),p=Vi(t,`optionSelectedClass`,3,null),m=Vi(t,`titleClass`,3,null),h=Vi(t,`subtitleClass`,3,null),g=Vi(t,`descriptionClass`,3,null),_=Vi(t,`keyboardButtonClass`,3,null),v=Vi(t,`unstyled`,3,!1),y=Vi(t,`inputStyle`,19,()=>({})),b=Vi(t,`overlayStyle`,19,()=>({})),x=Vi(t,`paletteWrapperInnerStyle`,19,()=>({})),S=Vi(t,`resultsContainerStyle`,19,()=>({})),ee=Vi(t,`resultContainerStyle`,19,()=>({})),C=Vi(t,`optionSelectedStyle`,19,()=>({})),te=Vi(t,`titleStyle`,19,()=>({})),ne=Vi(t,`subtitleStyle`,19,()=>({})),re=Vi(t,`descriptionStyle`,19,()=>({})),ie=Vi(t,`keyboardButtonStyle`,19,()=>({})),ae=k(void 0),oe=k(void 0),se=k(void 0),ce,le=k(!1),ue=k(null),de=null,fe=k(fn([])),pe=`paletteInput`,me=k(fn([])),he=ut({});Ge(Ek,he);let ge=Yk(),_e=k(``),{togglePalette:ve,closePalette:ye}=ge,be=O(()=>Xk(a())),xe=()=>{VD.update(e=>({...e,commands:a(),storeMethods:ge,actionMap:Xk(a()),activeCommandId:null,results:a()}))};Ln(()=>{xe()});let Se=!1,Ce=VD.subscribe(e=>{let n=Se;A(le,e.isVisible,!0),A(me,e.commands,!0),A(ue,e.activeCommandId??null,!0),A(fe,xk(e.results,e.commands,[]),!0),!n&&e.isVisible?(de=document.activeElement,t.onOpen?.()):n&&!e.isVisible&&t.onClose?.(),Se=e.isVisible}),we=()=>{de&&typeof de.focus==`function`&&de.focus()},Te=e=>{e?.preventDefault?.(),ye(),we()},Ee=()=>{I(le)&&I(oe)&&I(oe).focus()},De=e=>{VD.update(t=>({...t,activeCommandId:e}))},Oe=e=>{if(!I(le))return;e.preventDefault();let t=I(fe).findIndex(e=>e.actionId===I(ue))??0;t=t===-1?0:t;let n=I(fe).length,r=(n+t-1)%n,i=I(fe)[r]?r:t;De(I(fe)[i]?.actionId||``)},ke=e=>{if(I(le)&&(e.preventDefault(),I(fe).length)){let e=I(fe).findIndex(e=>e.actionId===I(ue))??0;e=e===-1?-1:e;let t=I(fe).length,n=(e+1)%t,r=I(fe)[n]?n:e;De(I(fe)[r]?.actionId||``)}},Ae=e=>{if(!I(le))return;e.preventDefault();let n=I(be)[I(ue)];n&&(t.onActionSelect?.(n),yk({action:n}))},w=e=>{I(se)&&!I(se).contains(e.target)&&Te()},je=e=>{e.preventDefault(),ve()},T=e=>{if(!I(le)||!I(se))return;let t=I(se).querySelectorAll(`input, button, [tabindex]:not([tabindex="-1"])`),n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())};Hi(async()=>{let{tinykeys:e,parseKeybinding:t}=await Mk(async()=>{let{tinykeys:e,parseKeybinding:t}=await import(`./tinykeys.module-CjuTRcEz.js`);return{tinykeys:e,parseKeybinding:t}},[]);A(_e,t(`Esc`).flat().join(``),!0);let n={...Jk({actions:a()}),[s()]:je,Escape:Te,ArrowUp:Oe,ArrowDown:ke,Enter:Ae,Tab:T};ce=e(window,n)});let Me=O(()=>bk(I(me))),Ne=e=>{VD.update(t=>({...t,results:e,activeCommandId:e?.[0]?.actionId||``}))},Fe=e=>{e.preventDefault();let t=[...I(me)];if(n().textInput){let e=n().textInput;t=_k(I(Me).search(e))}Ne(t)};Ln(()=>(I(le)&&(Ee(),I(ae)&&I(ae).addEventListener(`click`,w)),()=>{I(ae)?.removeEventListener(`click`,w)})),Ln(()=>{he.set({inputClass:c(),overlayClass:l(),paletteWrapperInnerClass:u(),resultsContainerClass:d(),resultContainerClass:f(),optionSelectedClass:p(),titleClass:m(),subtitleClass:h(),descriptionClass:g(),keyboardButtonClass:_(),unstyled:v(),inputStyle:Ck(y()),overlayStyle:Ck(b()),paletteWrapperInnerStyle:Ck(x()),resultsContainerStyle:Ck(S()),resultContainerStyle:Ck(ee()),optionSelectedStyle:Ck(C()),titleStyle:Ck(te()),subtitleStyle:Ck(ne()),descriptionStyle:Ck(re()),keyboardButtonStyle:Ck(ie()),emptyState:t.emptyState})}),Ui(()=>{ce?.(),Ce(),we()});let Ie=e=>e.preventDefault();BD(e,{target:`body`,children:e=>{var r=Yr(),i=Cn(r),a=e=>{var r=Zk();let i;var a=j(r),s=j(a);let d;var f=j(s),p=j(f);Mi(p,`for`,pe);var m=M(p,2),h=M(j(m),2);ji(h);let g;Mi(h,`spellcheck`,!1),Mi(h,`id`,pe),Bi(h,e=>A(oe,e),()=>I(oe)),Ok(M(h,2),{onKeyboardButtonClicked:()=>Te(),children:e=>{Pe();var t=Jr();N(()=>B(t,I(_e))),z(e,t)},$$slots:{default:!0}}),E(m),E(f),qk(M(f,2),{get emptyState(){return t.emptyState}}),E(s),Bi(s,e=>A(se,e),()=>I(se)),E(a),E(r),Bi(r,e=>A(ae,e),()=>I(ae)),N((e,t,n)=>{i=xi(r,1,hi(l()),`svelte-sfqeu0`,i,{"cp-overlay":!v()}),Ci(r,e),d=xi(s,1,hi(u()),`svelte-sfqeu0`,d,{"cp-container":!v()}),Ci(s,t),g=xi(h,1,hi(c()),`svelte-sfqeu0`,g,{"cp-input":!v()}),Ci(h,n),Mi(h,`placeholder`,o()),Mi(h,`aria-activedescendant`,I(ue)?`palette-${I(ue)}`:void 0)},[()=>Ck(b()),()=>Ck(x()),()=>Ck(y())]),Rr(`submit`,f,Ie),L(`input`,h,Fe),Ii(h,()=>n().textInput,e=>vt(VD,kr(n).textInput=e,kr(n))),z(e,r)};V(i,e=>{I(le)&&e(a)}),z(e,r)},$$slots:{default:!0}}),qe(),i()}zr([`input`]);var $k=Qk;function eA(e){return e.servers[0]}function tA(e,t){return t.filter(t=>t.serverId===e.id)}function nA(e){let t=[];t.push({actionId:`nav-gateway`,title:`Gateway`,description:`${e.projects.length} projects · ${e.browsers.length} browsers`,group:`Navigate`,keywords:[`gateway`,`__gateway`,`home`],onRun:()=>ia(`#/gateway`)});for(let n of e.projects){let e=n.servers.length<=1,r=eA(n),i=n.browsers.length;if(t.push({actionId:`nav-project-${n.projectId}`,title:n.name,description:e?`${r?.type??``} · ${i} browser${i===1?``:`s`}`:`${n.servers.length} servers · ${i} browsers`,group:`Navigate`,keywords:[n.projectId,n.name,r?.type??``].filter(Boolean),onRun:()=>ia(`#/project/${n.projectId}`)}),!e)for(let e of n.servers){let r=tA(e,n.browsers);t.push({actionId:`nav-server-${n.projectId}-${e.type}`,title:`${n.name} · ${e.type}`,description:`${r.length} browser${r.length===1?``:`s`}`,group:`Navigate`,keywords:[n.name,e.type],onRun:()=>ia(`#/project/${n.projectId}/${e.type}`)})}for(let e of n.browsers){let r=n.servers.find(t=>t.id===e.serverId),i=e.browserId??e.connId,a=[...n.browsers.filter(t=>t.serverId===e.serverId)].sort((e,t)=>e.connectedAt-t.connectedAt).findIndex(e=>(e.browserId??e.connId)===i)+1;t.push({actionId:`nav-browser-${i}`,title:`${n.name} · ${r?.type??``}`,subTitle:`Browser ${a}`,group:`Navigate`,keywords:[n.name,r?.type??``,i,`browser`],onRun:()=>ia(`#/project/${n.projectId}/${r?.type??``}/${i}`)})}}return t}function rA(e){let t=is(),n=nA(e),r=[],i=0;for(let e of t){if(i>=5)break;let t=n.find(t=>{if(t.actionId===`nav-gateway`)return e===`#/gateway`;let n=String(t.actionId);if(n.startsWith(`nav-browser-`)){let t=n.replace(`nav-browser-`,``);return e.endsWith(`/${t}`)}if(n.startsWith(`nav-server-`)){let t=n.replace(`nav-server-`,``).split(`-`);return e===`#/project/${t.slice(0,-1).join(`-`)}/${t[t.length-1]}`}return n.startsWith(`nav-project-`)?e===`#/project/${n.replace(`nav-project-`,``)}`:!1});t&&(r.push({...t,actionId:`recent-${t.actionId}`,group:`Recent`}),i++)}return r}function iA(e){let t=[...e.browsers].sort((e,t)=>t.connectedAt-e.connectedAt),n=[];for(let r of t.slice(0,5)){let t=e.servers.find(e=>e.id===r.serverId),i=e.projects.find(e=>e.servers.some(e=>e.id===r.serverId));if(!i||!t)continue;let a=r.browserId??r.connId,o=aA(r.connectedAt),s=[...e.browsers.filter(e=>e.serverId===r.serverId)].sort((e,t)=>e.connectedAt-t.connectedAt).findIndex(e=>(e.browserId??e.connId)===a)+1;n.push({actionId:`active-${a}`,title:`${i.name} · ${t.type}`,subTitle:`Browser ${s} · connected ${o}`,group:`Active`,keywords:[i.name,t.type,a,`active`,`connected`],onRun:()=>ia(`#/project/${i.projectId}/${t.type}/${a}`)})}return n}function aA(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function oA(e){return[{actionId:`cmd-toggle-theme`,title:`Toggle theme`,description:`Switch between light and dark mode`,group:`Commands`,keywords:[`theme`,`dark`,`light`,`mode`],onRun:()=>e.onToggleTheme()},{actionId:`cmd-toggle-repl`,title:`Toggle REPL`,description:`Open or close the REPL panel`,shortcut:"Control+`",group:`Commands`,keywords:[`repl`,`console`,`eval`],onRun:()=>e.onToggleRepl()},{actionId:`cmd-clear-logs`,title:`Clear log stream`,description:`Clear all visible log entries and purge server files`,group:`Commands`,keywords:[`clear`,`logs`,`clean`],onRun:()=>{Ho()}}]}function sA(e,t){return gk([...rA(e),...iA(e),...nA(e),...oA(t)])}function cA(e,t){Ke(t,!0);let n=O(()=>sA(t.registry,t.callbacks));$k(e,{get commands(){return I(n)},placeholder:`Search actions, navigate...`,shortcut:`$mod+k`}),qe()}var lA=R(`<span> </span>`);function uA(e,t){Ke(t,!0);let n=k(fn(Date.now()));Ln(()=>{let e=setInterval(()=>{A(n,Date.now(),!0)},1e3);return()=>clearInterval(e)});function r(e,t){let n=Math.floor((t-e)/1e3);if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m ${n%60}s`:`${Math.floor(r/60)}h ${r%60}m`}let i=O(()=>r(t.since,I(n)));var a=lA(),o=j(a,!0);E(a),N(()=>B(o,I(i))),z(e,a),qe()}var dA=R(`<div class="border-b border-border flex items-center gap-1 px-3 shrink-0 h-8"><a>Overview</a> <a>Logs</a></div>`);function fA(e,t){Ke(t,!0);function n(e){return na({...t.route,tab:e})}function r(e){return t.route.tab===e}var i=dA(),a=j(i),o=M(a,2);E(i),N((e,t,n,r)=>{Mi(a,`href`,e),xi(a,1,`text-xs px-2 py-1 border-b-2 -mb-px transition-colors
|
|
61
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),WE=new h_,GE=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function KE(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var qE=[`FunctionDeclaration`],JE={FunctionDeclaration:KE(`function`),ClassDeclaration:KE(`class`),ClassExpression:()=>!0,EnumDeclaration:KE(`constant`),TypeAliasDeclaration:KE(`type`),NamespaceDeclaration:KE(`namespace`),VariableDefinition(e,t){e.matchContext(qE)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function YE(e,t){let n=WE.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Jg.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=JE[t.name];if(e&&e(t,a)||GE.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of YE(e,t.node))r.push(n);return!1}}),WE.set(t,r),r}var XE=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ZE=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function QE(e){let t=$_(e.state).resolveInner(e.pos,-1);if(ZE.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&XE.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)GE.has(n.name)&&(r=r.concat(YE(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:XE}}var $E=Q_.define({name:`javascript`,parser:VE.configure({props:[gv.add({IfStatement:Ov({except:/^\s*({|else\b)/}),TryStatement:Ov({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Dv,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:Tv({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ov({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Mv.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Nv,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),eD={test:e=>/^JSX/.test(e.name),facet:J_({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},tD=$E.configure({dialect:`ts`},`typescript`),nD=$E.configure({dialect:`jsx`,props:[Y_.add(e=>e.isTop?[eD]:void 0)]}),rD=$E.configure({dialect:`jsx ts`,props:[Y_.add(e=>e.isTop?[eD]:void 0)]},`typescript`),iD=e=>({label:e,type:`keyword`}),aD=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(iD),oD=aD.concat([`declare`,`implements`,`private`,`protected`,`public`].map(iD));function sD(e={}){let t=e.jsx?e.typescript?rD:nD:e.typescript?tD:$E,n=e.typescript?UE.concat(oD):HE.concat(aD);return new lv(t,[$E.data.of({autocomplete:xC(ZE,bC(n))}),$E.data.of({autocomplete:QE}),e.jsx?dD:[]])}function cD(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function lD(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var uD=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),dD=Y.inputHandler.of((e,t,n,r,i)=>{if((uD?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!$E.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=$_(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=lD(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:W.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=cD(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=lD(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),fD=`#e5c07b`,pD=`#e06c75`,mD=`#56b6c2`,hD=`#ffffff`,gD=`#abb2bf`,_D=`#7d8799`,vD=`#61afef`,yD=`#98c379`,bD=`#d19a66`,xD=`#c678dd`,SD=`#21252b`,CD=`#2c313a`,wD=`#282c34`,TD=`#353a42`,ED=`#3E4451`,DD=`#528bff`,OD=[Y.theme({"&":{color:gD,backgroundColor:wD},".cm-content":{caretColor:DD},".cm-cursor, .cm-dropCursor":{borderLeftColor:DD},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ED},".cm-panels":{backgroundColor:SD,color:gD},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:wD,color:_D,border:`none`},".cm-activeLineGutter":{backgroundColor:CD},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:TD},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:TD,borderBottomColor:TD},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:CD,color:gD}}},{dark:!0}),uy(oy.define([{tag:Q.keyword,color:xD},{tag:[Q.name,Q.deleted,Q.character,Q.propertyName,Q.macroName],color:pD},{tag:[Q.function(Q.variableName),Q.labelName],color:vD},{tag:[Q.color,Q.constant(Q.name),Q.standard(Q.name)],color:bD},{tag:[Q.definition(Q.name),Q.separator],color:gD},{tag:[Q.typeName,Q.className,Q.number,Q.changed,Q.annotation,Q.modifier,Q.self,Q.namespace],color:fD},{tag:[Q.operator,Q.operatorKeyword,Q.url,Q.escape,Q.regexp,Q.link,Q.special(Q.string)],color:mD},{tag:[Q.meta,Q.comment],color:_D},{tag:Q.strong,fontWeight:`bold`},{tag:Q.emphasis,fontStyle:`italic`},{tag:Q.strikethrough,textDecoration:`line-through`},{tag:Q.link,color:_D,textDecoration:`underline`},{tag:Q.heading,fontWeight:`bold`,color:pD},{tag:[Q.atom,Q.bool,Q.special(Q.variableName)],color:bD},{tag:[Q.processingInstruction,Q.string,Q.inserted],color:yD},{tag:Q.invalid,color:hD}]))],kD=R(`<span class="text-[10px] text-dim ml-auto"> </span>`),AD=R('<button class="h-7 w-full border-t border-border flex items-center px-3 shrink-0 cursor-pointer hover:bg-muted/50 transition-colors"><span class="text-[10px] text-muted-foreground">REPL</span> <span class="text-[10px] text-dim ml-2">Ctrl+`</span> <!></button>'),jD=R(`<option> </option>`),MD=R(`<select class="text-[11px] bg-transparent text-muted-foreground border border-border rounded px-1.5 py-0.5 cursor-pointer hover:text-foreground focus:outline-none focus:border-accent max-w-60 truncate"></select>`),ND=R(`<span class="text-[10px] text-dim">No browsers connected</span>`),PD=R(`<div class="text-dim py-2">Enter to run · Shift+Enter for newline · eval() in browser</div>`),FD=R(`<div class="py-0.5"><div class="text-dim"><span class="text-accent"></span> </div> <pre> </pre></div>`),ID=R(`<span>Run</span> <span class="text-[9px] opacity-70 font-mono">↵</span>`,1),LD=R('<div class="border-t border-border flex flex-col shrink-0" style="height: 280px;"><div class="flex items-center gap-2 px-3 py-1 border-b border-border shrink-0"><button class="text-[10px] text-muted-foreground hover:text-foreground" title="Collapse (Ctrl+`)">▾ REPL</button> <!> <div class="flex-1"></div> <span class="text-[10px] text-dim"> </span> <button class="text-[10px] text-muted-foreground hover:text-foreground transition-colors">Clear</button></div> <div class="flex-1 overflow-y-auto font-mono text-[11px] leading-[18px] px-3 py-1"><!></div> <div class="border-t border-border shrink-0"><div class="flex items-center gap-1 px-2"><span class="text-accent text-[11px] shrink-0"></span> <div class="flex-1 overflow-hidden"></div> <button title="Run (Enter) · Shift+Enter for newline" class="text-[10px] px-2 py-0.5 rounded bg-accent text-accent-foreground hover:bg-accent/90 disabled:opacity-30 shrink-0 cursor-pointer flex items-center gap-1"><!></button></div></div></div>');function RD(e,t){Ke(t,!0);let n=Vi(t,`open`,15,!1),r=Wo(),i=k(!1),a=fn([]),o=k(void 0),s=k(void 0),c=null,l=k(``),u=`admin-svelte:repl:history`,d=[],f=-1,p=``;try{let e=localStorage.getItem(u);e&&(d=JSON.parse(e))}catch{}function m(){try{localStorage.setItem(u,JSON.stringify(d))}catch{}}function h(e){e&&d[d.length-1]!==e&&(d.push(e),d.length>100&&d.splice(0,d.length-100),m())}function g(e,t=!0){c&&c.dispatch({changes:{from:0,to:c.state.doc.length,insert:e},selection:t?{anchor:e.length}:void 0})}function _(e){let t=e.state.selection.main.head;if(e.state.doc.lineAt(t).number!==1)return!1;if(d.length===0)return!0;if(f===-1)p=e.state.doc.toString(),f=d.length-1;else if(f>0)f--;else return!0;return g(d[f]),!0}function v(e){let t=e.state.selection.main.head;return e.state.doc.lineAt(t).number!==e.state.doc.lines||f===-1?!1:(f<d.length-1?(f++,g(d[f])):(f=-1,g(p),p=``),!0)}let y=O(()=>{let e=[];for(let n of r.projects)if(!(t.route.view===`project`&&n.projectId!==t.route.projectId)&&!(t.route.view===`server`&&n.projectId!==t.route.projectId)&&!(t.route.view===`browser`&&n.projectId!==t.route.projectId))for(let r of n.browsers){if(t.route.view===`browser`&&(r.browserId??r.connId)!==t.route.browserId)continue;let i=n.servers.find(e=>e.id===r.serverId),a=i?.endpoints[0]?.port?`:${i.endpoints[0].port}`:``,o=(r.browserId??r.connId)?.slice(0,6)??`?`;e.push({label:`${n.projectId}${a} / ${o}`,serverId:r.serverId??``,browserId:r.browserId??r.connId})}return e});Ln(()=>{I(y).length>0&&!I(y).find(e=>e.serverId===I(l))&&A(l,I(y)[0].serverId,!0)});async function b(){if(I(i)||!c)return;let e=c.state.doc.toString().trim();if(!e)return;let t=I(y).find(e=>e.serverId===I(l));if(!t){a.push({code:e,result:`No browser target selected`,isError:!0,target:`—`,timestamp:Date.now()});return}h(e),f=-1,p=``,g(``),A(i,!0);try{let n=Po();if(!n)throw Error(`Not connected`);let r=await n.evalInBrowser(e,t.serverId),i=x(String(r))??String(r);a.push({code:e,result:i,isError:!1,target:t.label,timestamp:Date.now()})}catch(n){a.push({code:e,result:n.message??String(n),isError:!0,target:t.label,timestamp:Date.now()})}finally{A(i,!1),S()}}function x(e){try{let t=JSON.parse(e);return JSON.stringify(t,null,2)}catch{return null}}function S(){requestAnimationFrame(()=>{I(s)&&(I(s).scrollTop=I(s).scrollHeight)})}function ee(){a.splice(0,a.length)}Hi(()=>{function e(e){e.key==="`"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),n(!n()))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}),Ln(()=>{n()&&I(o)&&!c&&(c=new Y({doc:`document.title`,extensions:[jT,sD(),OD,hc.highest(Pm.of([{key:`Enter`,run:()=>(b(),!0)},{key:`Shift-Enter`,run:Xx},{key:`Mod-Enter`,run:()=>(b(),!0)},{key:`ArrowUp`,run:_},{key:`ArrowDown`,run:v}])),Y.theme({"&":{fontSize:`12px`,maxHeight:`120px`},".cm-scroller":{overflow:`auto`},".cm-gutters":{display:`none`}})],parent:I(o)}),c.focus())});var C=Yr(),te=Cn(C),ne=e=>{var t=AD(),r=M(j(t),4),i=e=>{var t=kD(),n=j(t);E(t),N(()=>B(n,`${a.length??``} entries`)),z(e,t)};V(r,e=>{a.length>0&&e(i)}),E(t),L(`click`,t,()=>n(!0)),z(e,t)},re=e=>{var t=LD(),r=j(t),c=j(r),u=M(c,2),d=e=>{var t=MD();ai(t,21,()=>I(y),ti,(e,t)=>{var n=jD(),r=j(n,!0);E(n);var i={};N(()=>{B(r,I(t).label),i!==(i=I(t).serverId)&&(n.value=(n.__value=I(t).serverId)??``)}),z(e,n)}),E(t),Ei(t,()=>I(l),e=>A(l,e)),z(e,t)},f=e=>{z(e,ND())};V(u,e=>{I(y).length>0?e(d):e(f,-1)});var p=M(u,4),m=j(p,!0);E(p);var h=M(p,2);E(r);var g=M(r,2),_=j(g),v=e=>{z(e,PD())},x=e=>{var t=Yr();ai(Cn(t),17,()=>a,ti,(e,t)=>{var n=FD(),r=j(n),i=j(r);i.textContent=`>`;var a=M(i);E(r);var o=M(r,2),s=j(o,!0);E(o),E(n),N(e=>{B(a,` ${e??``}`),xi(o,1,`${I(t).isError?`text-destructive`:`text-foreground`} whitespace-pre-wrap pl-3`),B(s,I(t).result)},[()=>I(t).code.length>100?I(t).code.slice(0,100)+`...`:I(t).code]),z(e,n)}),z(e,t)};V(_,e=>{a.length===0?e(v):e(x,-1)}),E(g),Bi(g,e=>A(s,e),()=>I(s));var S=M(g,2),C=j(S),te=j(C);te.textContent=`>`;var ne=M(te,2);Bi(ne,e=>A(o,e),()=>I(o));var re=M(ne,2),ie=j(re),ae=e=>{z(e,Jr(`...`))},oe=e=>{var t=ID();Pe(2),z(e,t)};V(ie,e=>{I(i)?e(ae):e(oe,-1)}),E(re),E(C),E(S),E(t),N(()=>{B(m,a.length),re.disabled=I(i)||I(y).length===0}),L(`click`,c,()=>n(!1)),L(`click`,h,ee),L(`click`,re,b),z(e,t)};V(te,e=>{n()?e(re,-1):e(ne)}),z(e,C),qe()}zr([`click`]);var zD=R(`<div><!></div>`);function BD(e,t){Ke(t,!0);let n=Vi(t,`target`,3,`body`),r=(e,t)=>{async function n(t){let n=document.querySelector(t);if(n===null&&(await Er(),n=document.querySelector(t)),n===null)throw Error(`No element found matching selector`);n.appendChild(e)}function r(){e.parentNode&&e.parentNode.removeChild(e)}return n(t),{update:n,destroy:r}};var i=zD(),a=j(i),o=e=>{var n=Yr();di(Cn(n),()=>t.children),z(e,n)};V(a,e=>{t.children&&e(o)}),E(i),fi(i,(e,t)=>r?.(e,t),n),z(e,i),qe()}var VD=ut({isVisible:!1,textInput:``,commands:[],storeMethods:{},actionMap:{},activeCommandId:0,selectedCommandId:0,calledActions:[],results:[]});function HD(e){return Array.isArray?Array.isArray(e):QD(e)===`[object Array]`}function UD(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function WD(e){return e==null?``:UD(e)}function GD(e){return typeof e==`string`}function KD(e){return typeof e==`number`}function qD(e){return e===!0||e===!1||YD(e)&&QD(e)==`[object Boolean]`}function JD(e){return typeof e==`object`}function YD(e){return JD(e)&&e!==null}function XD(e){return e!=null}function ZD(e){return!e.trim().length}function QD(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var $D=`Incorrect 'index' type`,eO=e=>`Invalid value for key ${e}`,tO=e=>`Pattern length exceeds max of ${e}.`,nO=e=>`Missing ${e} property in key`,rO=e=>`Property 'weight' in key '${e}' must be a positive integer`,iO=Object.prototype.hasOwnProperty,aO=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=oO(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function oO(e){let t=null,n=null,r=null,i=1,a=null;if(GD(e)||HD(e))r=e,t=sO(e),n=cO(e);else{if(!iO.call(e,`name`))throw Error(nO(`name`));let o=e.name;if(r=o,iO.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(rO(o));t=sO(o),n=cO(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function sO(e){return HD(e)?e:e.split(`.`)}function cO(e){return HD(e)?e.join(`.`):e}function lO(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(XD(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!XD(s))return;if(a===t.length-1&&(GD(s)||KD(s)||qD(s)||typeof s==`bigint`))n.push(o===void 0?WD(s):{v:WD(s),i:o});else if(HD(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,GD(t)?t.split(`.`):t,0),r?n:n[0]}var uO={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},dO={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},fO={location:0,threshold:.6,distance:100},pO={useExtendedSearch:!1,useTokenSearch:!1,getFn:lO,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},$=Object.freeze({...dO,...uO,...fO,...pO}),mO=/[^ ]+/g;function hO(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(mO).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var gO=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=hO(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,GD(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();GD(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!XD(e)||ZD(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(XD(i)){if(HD(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(XD(n)){if(GD(n)){if(!ZD(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(XD(n.v)){let t=GD(n.v)?n.v:WD(n.v);if(!ZD(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(GD(i)&&!ZD(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function _O(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new gO({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(oO)),i.setSources(t),i.create(),i}function vO(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new gO({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function yO(e=[],t=$.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var bO=32;function xO(e,t,n,{location:r=$.location,distance:i=$.distance,threshold:a=$.threshold,findAllMatches:o=$.findAllMatches,minMatchCharLength:s=$.minMatchCharLength,includeMatches:c=$.includeMatches,ignoreLocation:l=$.ignoreLocation}={}){if(t.length>bO)throw Error(tO(bO));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let ee={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=yO(_,s);e.length?c&&(ee.indices=e):ee.isMatch=!1}return ee}function SO(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function CO(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var wO={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},TO=RegExp(`[`+Object.keys(wO).join(``)+`]`,`g`),EO=String.prototype.normalize?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(TO,e=>wO[e]):e=>e,DO=class{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?EO(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:SO(e),startIndex:t})},d=this.pattern.length;if(d>bO){let e=0,t=d%bO,n=d-t;for(;e<n;)u(this.pattern.substr(e,bO),e),e+=bO;if(t){let e=d-bO;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?EO(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=xO(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=CO(u)),p}},OO=class{constructor(e){this.pattern=e}static isMultiMatch(e){return kO(e,this.multiRegex)}static isSingleMatch(e){return kO(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function kO(e,t){let n=e.match(t);return n?n[1]:null}var AO=class extends OO{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},jO=class extends OO{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},MO=class extends OO{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},NO=class extends OO{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},PO=class extends OO{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},FO=class extends OO{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},IO=class extends OO{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){super(e),this._bitapSearch=new DO(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},LO=class extends OO{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},RO=[AO,LO,MO,NO,FO,PO,jO,IO],zO=RO.length,BO=`\0`,VO=`|`;function HO(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function UO(e,t={}){return e.replace(/\\\|/g,BO).split(VO).map(e=>{let n=HO(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<zO;){let e=RO[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<zO;){let e=RO[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var WO=new Set([IO.type,LO.type]),GO=class{constructor(e,{isCaseSensitive:t=$.isCaseSensitive,ignoreDiacritics:n=$.ignoreDiacritics,includeMatches:r=$.includeMatches,minMatchCharLength:i=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:o=$.findAllMatches,location:s=$.location,threshold:c=$.threshold,distance:l=$.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?EO(e):e,this.pattern=e,this.query=UO(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?EO(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l){a+=1,s+=d;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(WO.has(e)?o.push(...u):o.push(u))}else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=CO(o)),e}}return{isMatch:!1,score:1}}},KO=[];function qO(...e){KO.push(...e)}function JO(e,t){for(let n=0,r=KO.length;n<r;n+=1){let r=KO[n];if(r.condition(e,t))return new r(e,t)}return new DO(e,t)}var YO={AND:`$and`,OR:`$or`},XO={PATH:`$path`,PATTERN:`$val`},ZO=e=>!!(e[YO.AND]||e[YO.OR]),QO=e=>!!e[XO.PATH],$O=e=>!HD(e)&&JD(e)&&!ZO(e),ek=e=>({[YO.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function tk(e,t,{auto:n=!0}={}){let r=e=>{if(GD(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=JO(e,t)),r}let i=Object.keys(e),a=QO(e);if(!a&&i.length>1&&!ZO(e))return r(ek(e));if($O(e)){let r=a?e[XO.PATH]:i[0],o=a?e[XO.PATTERN]:e[r];if(!GD(o))throw Error(eO(r));let s={keyId:cO(r),pattern:o};return n&&(s.searcher=JO(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];HD(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return ZO(e)||(e=ek(e)),r(e)}function nk(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function rk(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{e.score=nk(e.matches,{ignoreFieldNorm:t})})}var ik=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function ak(e,t){let n=e.matches;t.matches=[],XD(n)&&n.forEach(e=>{if(!XD(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ok(e,t){t.score=e.score}function sk(e,t,{includeMatches:n=$.includeMatches,includeScore:r=$.includeScore}={}){let i=[];return n&&i.push(ak),r&&i.push(ok),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var ck=/\b\w+\b/g;function lk({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=EO(n)),n.match(ck)||[]}}}function uk(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function dk(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function fk(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var pk=class{constructor(e,t,n){this.options={...$,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new aO(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=JO(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof gO))throw Error($D);if(this._myIndex=t||_O(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=lk({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=uk(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(XD(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=lk({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});dk(this._invertedIndex,e,this._myIndex.keys.length,t)}}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){if(this._invertedIndex)for(let e of n)fk(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&fk(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(GD(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return KD(n)&&n>-1&&(e=e.slice(0,n)),e}let c=KD(n)&&n>0&&GD(e),l;if(c){let t=new ik(n);GD(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=GD(e)?GD(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),rk(l,{ignoreFieldNorm:s}),a&&l.sort(o),KD(n)&&n>-1&&(l=l.slice(0,n));return sk(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!XD(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=nk(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=tk(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===YO.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(XD(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!XD(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=nk(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!XD(t))return[];let r=[];if(HD(t))t.forEach(({v:t,i,n:a})=>{if(!XD(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},mk=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=lk({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new DO(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=CO(t)),o}};pk.version=`7.3.0`,pk.createIndex=_O,pk.parseIndex=vO,pk.config=$,pk.match=function(e,t,n){return JO(e,{...$,...n}).searchIn(t)},pk.parseQuery=tk,qO(GO),qO(mk),pk.use=function(...e){e.forEach(e=>qO(e))};var hk=()=>!0,gk=(e=[])=>e.map(({actionId:e=Math.random(),canActionRun:t=hk,title:n=``,subTitle:r=``,onRun:i=hk,description:a,keywords:o=[],shortcut:s=``,icon:c,group:l})=>({actionId:e,canActionRun:t,title:n,subTitle:r,onRun:i,description:a,keywords:o,shortcut:s,icon:c,group:l})),_k=e=>e.map(({item:e})=>e),vk=e=>{VD.update(t=>({...t,isVisible:!1,textInput:``,activeCommandId:null,selectedCommandId:null,results:[],calledActions:[...t.calledActions,e]}))},yk=({action:e})=>{let{onRun:t,canActionRun:n=hk,actionId:r=``}=e||{},i=dt(VD),{storeMethods:a}=i;return n({action:e,storeProps:i,storeMethods:a})&&t?(vk(r),t?.({action:e,storeProps:i,storeMethods:a}),!0):(VD.update(e=>({...e,isVisible:!1})),!1)},bk=e=>new pk(e,{keys:[{name:`title`,weight:1},{name:`subTitle`,weight:.7},{name:`description`,weight:.6},{name:`keywords`,weight:.5}],threshold:.4,ignoreLocation:!0}),xk=(...e)=>e.find((e=[])=>e.length>0)||[],Sk=e=>e.replace(/([a-zA-Z])(?=[A-Z])/g,`$1-`).toLowerCase(),Ck=(e={})=>e?Object.keys(e).reduce((t,n)=>`${t}; ${Sk(n)}: ${e[n]}`,``):``,wk=e=>{let t=new Map,n=[];if(e.forEach(e=>{if(e.group){let n=t.get(e.group)||[];t.set(e.group,[...n,e])}else n.push(e)}),n.length>0){let e=new Map;return e.set(``,n),t.forEach((t,n)=>e.set(n,t)),e}return t},Tk={isVisible:!1,textInput:``,activeCommandId:null,selectedCommandId:null,results:[]},Ek=`themeContext`,Dk=R(`<kbd role="button"><!></kbd>`);function Ok(e,t){Ke(t,!0);let n=()=>ht(o,`$themeCtx`,r),[r,i]=gt(),a=e=>{e.stopPropagation(),t.onKeyboardButtonClicked?.({event:e})},o=We(Ek),{unstyled:s,keyboardButtonClass:c,keyboardButtonStyle:l}=n();var u=Dk();let d;var f=j(u),p=e=>{var n=Yr();di(Cn(n),()=>t.children),z(e,n)};V(f,e=>{t.children&&e(p)}),E(u),N(()=>{Mi(u,`tabindex`,t.onKeyboardButtonClicked?0:-1),Ci(u,l),d=xi(u,1,hi(c),`svelte-1jb7ii0`,d,{"cp-kbd":!s})}),L(`click`,u,a),L(`keydown`,u,e=>e.key===`Enter`&&a(e)),z(e,u),qe(),i()}zr([`click`,`keydown`]);var kk=`modulepreload`,Ak=function(e){return`/__admin/`+e},jk={},Mk=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ak(t,n),t in jk)return;jk[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:kk,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Nk=R(`<img alt="" width="20" height="20" class="svelte-14d0jbk"/>`),Pk=R(`<span class="cp-result-emoji svelte-14d0jbk"> </span>`),Fk=R(`<div class="cp-result-icon svelte-14d0jbk"><!></div>`),Ik=R(`<div> </div>`),Lk=R(`<div> </div>`),Rk=R(`<span> </span>`),zk=R(`<div class="cp-result-shortcuts svelte-14d0jbk"></div>`),Bk=R(`<div role="option"><!> <div class="cp-result-content svelte-14d0jbk"><div><span> </span></div> <!> <!></div> <!></div>`);function Vk(e,t){Ke(t,!0);let n=()=>ht(l,`$themeCtx`,i),r=()=>ht(VD,`$paletteStore`,i),[i,a]=gt(),o=k(void 0),s=k(!1),c=k(fn([])),l=We(Ek),{resultContainerClass:u,unstyled:d,optionSelectedClass:f,titleClass:p,subtitleClass:m,descriptionClass:h,resultContainerStyle:g,titleStyle:_,subtitleStyle:v,descriptionStyle:y,optionSelectedStyle:b}=n();Ln(()=>{t.action.actionId===r().activeCommandId&&I(o)?(A(s,!0),requestAnimationFrame(()=>{I(o)?.scrollIntoView?.({behavior:`smooth`,block:`nearest`})})):A(s,!1)});let x=()=>{yk({action:t.action})};Hi(async()=>{let{parseKeybinding:e}=await Mk(()=>import(`./tinykeys.module-CjuTRcEz.js`),[]);t.action.shortcut&&A(c,e(t.action.shortcut).flat().filter(e=>e.length>0),!0)});let S=()=>{A(s,!0),VD.update(e=>({...e,activeCommandId:t.action.actionId||``,selectedCommandId:t.action.actionId||``}))},ee=()=>{A(s,!1)};var C=Bk();let te;Mi(C,`tabindex`,-1);var ne=j(C),re=e=>{var n=Fk(),r=j(n),i=e=>{var n=Yr();di(Cn(n),()=>t.action.icon),z(e,n)},a=e=>{var n=Yr(),r=Cn(n),i=e=>{var n=Nk();N(()=>Mi(n,`src`,t.action.icon)),z(e,n)},a=O(()=>t.action.icon.startsWith(`http`)||t.action.icon.startsWith(`/`)),o=e=>{var n=Pk(),r=j(n,!0);E(n),N(()=>B(r,t.action.icon)),z(e,n)};V(r,e=>{I(a)?e(i):e(o,-1)}),z(e,n)};V(r,e=>{typeof t.action.icon==`function`?e(i):typeof t.action.icon==`string`&&e(a,1)}),E(n),z(e,n)};V(ne,e=>{t.action.icon&&e(re)});var ie=M(ne,2),ae=j(ie);let oe;var se=j(ae),ce=j(se,!0);E(se),E(ae);var le=M(ae,2),ue=e=>{var n=Ik(),r=j(n,!0);E(n),N(()=>{xi(n,1,`cp-result-subtitle ${m||``}`,`svelte-14d0jbk`),Ci(n,v||``),B(r,t.action.subTitle)}),z(e,n)};V(le,e=>{t.action.subTitle&&e(ue)});var de=M(le,2),fe=e=>{var n=Lk(),r=j(n,!0);E(n),N(()=>{xi(n,1,`cp-result-description ${h||``}`,`svelte-14d0jbk`),Ci(n,y||``),B(r,t.action.description)}),z(e,n)};V(de,e=>{t.action.description&&e(fe)}),E(ie);var pe=M(ie,2),me=e=>{var t=zk();ai(t,21,()=>I(c),ti,(e,t)=>{Ok(e,{children:e=>{var n=Rk(),r=j(n,!0);E(n),N(()=>B(r,I(t))),z(e,n)},$$slots:{default:!0}})}),E(t),z(e,t)};V(pe,e=>{I(c).length>0&&e(me)}),E(C),Bi(C,e=>A(o,e),()=>I(o)),N(()=>{te=xi(C,1,`${u||``} ${I(s)&&d&&f||``}`,`svelte-14d0jbk`,te,{"cp-result":!d,"cp-result-active":!d&&I(s)}),Ci(C,`${g||``} ${I(s)&&b||``}`),Mi(C,`aria-selected`,I(s)),Mi(C,`id`,`palette-${t.action.actionId}`),oe=xi(ae,1,`cp-result-title ${p||``}`,`svelte-14d0jbk`,oe,{title:!d}),Ci(ae,_||``),B(ce,t.action.title)}),L(`click`,C,x),L(`keydown`,C,e=>e.key===`Enter`&&x()),Rr(`mouseenter`,C,S),Rr(`mouseleave`,C,ee),z(e,C),qe(),a()}zr([`click`,`keydown`]);var Hk=R(`<div class="cp-group-header svelte-1lunvte"> </div>`),Uk=R(`<!> <!>`,1),Wk=R(`<div role="listbox" id="command-palette-results"></div>`),Gk=R(`<div class="cp-empty-content svelte-1lunvte"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg> <p class="svelte-1lunvte">No results found</p> <span class="svelte-1lunvte">Try a different search term</span></div>`),Kk=R(`<div class="cp-empty svelte-1lunvte"><!></div>`);function qk(e,t){Ke(t,!0);let n=()=>ht(s,`$themeCtx`,r),[r,i]=gt(),a=k(fn([])),o=VD.subscribe(e=>{A(a,e.results.length>0?xk(e.results):xk(e.commands),!0)}),s=We(Ek),{resultsContainerClass:c,unstyled:l,resultsContainerStyle:u}=n(),d=O(()=>wk(I(a)));Ui(o);var f=Yr(),p=Cn(f),h=e=>{var t=Wk();let n;ai(t,21,()=>[...I(d).entries()],ti,(e,t,n,r)=>{var i=O(()=>m(I(t),2));let a=()=>I(i)[0],o=()=>I(i)[1];var s=Uk(),c=Cn(s),l=e=>{var t=Hk(),n=j(t,!0);E(t),N(()=>B(n,a())),z(e,t)};V(c,e=>{a()&&e(l)}),ai(M(c,2),17,o,e=>e.actionId,(e,t)=>{Vk(e,{get action(){return I(t)}})}),z(e,s)}),E(t),N(()=>{n=xi(t,1,hi(c),`svelte-1lunvte`,n,{"cp-results":!l}),Ci(t,u)}),z(e,t)},g=e=>{var n=Kk(),r=j(n),i=e=>{var n=Yr();di(Cn(n),()=>t.emptyState),z(e,n)},a=e=>{z(e,Gk())};V(r,e=>{t.emptyState?e(i):e(a,-1)}),E(n),z(e,n)};V(p,e=>{I(a).length>0?e(h):e(g,-1)}),z(e,f),qe(),i()}var Jk=({actions:e=[]})=>e.reduce((e,t)=>{let n=e=>{let{isVisible:n}=dt(VD);n||(e.preventDefault(),yk({action:t}))},{shortcut:r}=t;return r&&(e[r]=n),e},{}),Yk=()=>{let e=dt(VD),t=()=>{VD.update(e=>({...e,...Tk}))};return{togglePalette:()=>{VD.update(e=>({...e,isVisible:!e.isVisible,activeCommandId:``}))},getAllCalledActions:()=>e.calledActions||[],storeCalledAction:t=>{let{calledActions:n}=e;n.push(t),VD.update(e=>({...e,calledActions:n}))},revertLastAction:t=>{let{calledActions:n}=e;n.pop(),VD.update(e=>({...e,calledActions:n}))},resetActionLog:()=>{VD.update(e=>({...e,calledActions:[]}))},openPalette:()=>{VD.update(e=>({...e,isVisible:!0}))},closePalette:()=>{t()},resetPaletteStore:t}},Xk=(e=[])=>e.reduce((e,t)=>{let{actionId:n=``}=t;return n!==null&&(e[n]=t),e},{}),Zk=R(`<div id="command-palette-overlay" role="presentation"><div class="cp-wrapper" role="dialog" aria-modal="true" aria-label="Command palette"><div role="combobox" aria-expanded="true" aria-haspopup="listbox" aria-controls="command-palette-results"><form autocomplete="off" role="search" novalidate="" class="svelte-jdivt1"><label class="sr-only svelte-jdivt1">Search for an action</label> <div class="cp-input-wrapper svelte-jdivt1"><svg class="cp-search-icon svelte-jdivt1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg> <input type="text" aria-autocomplete="list" autocomplete="off" autocapitalize="off"/> <!></div></form> <!></div></div></div>`);function Qk(e,t){Ke(t,!0);let n=()=>ht(VD,`$paletteStore`,r),[r,i]=gt(),a=Vi(t,`commands`,19,()=>[]),o=Vi(t,`placeholder`,3,`Search for an action...`),s=Vi(t,`shortcut`,3,`$mod+k`),c=Vi(t,`inputClass`,3,null),l=Vi(t,`overlayClass`,3,null),u=Vi(t,`paletteWrapperInnerClass`,3,null),d=Vi(t,`resultsContainerClass`,3,null),f=Vi(t,`resultContainerClass`,3,null),p=Vi(t,`optionSelectedClass`,3,null),m=Vi(t,`titleClass`,3,null),h=Vi(t,`subtitleClass`,3,null),g=Vi(t,`descriptionClass`,3,null),_=Vi(t,`keyboardButtonClass`,3,null),v=Vi(t,`unstyled`,3,!1),y=Vi(t,`inputStyle`,19,()=>({})),b=Vi(t,`overlayStyle`,19,()=>({})),x=Vi(t,`paletteWrapperInnerStyle`,19,()=>({})),S=Vi(t,`resultsContainerStyle`,19,()=>({})),ee=Vi(t,`resultContainerStyle`,19,()=>({})),C=Vi(t,`optionSelectedStyle`,19,()=>({})),te=Vi(t,`titleStyle`,19,()=>({})),ne=Vi(t,`subtitleStyle`,19,()=>({})),re=Vi(t,`descriptionStyle`,19,()=>({})),ie=Vi(t,`keyboardButtonStyle`,19,()=>({})),ae=k(void 0),oe=k(void 0),se=k(void 0),ce,le=k(!1),ue=k(null),de=null,fe=k(fn([])),pe=`paletteInput`,me=k(fn([])),he=ut({});Ge(Ek,he);let ge=Yk(),_e=k(``),{togglePalette:ve,closePalette:ye}=ge,be=O(()=>Xk(a())),xe=()=>{VD.update(e=>({...e,commands:a(),storeMethods:ge,actionMap:Xk(a()),activeCommandId:null,results:a()}))};Ln(()=>{xe()});let Se=!1,Ce=VD.subscribe(e=>{let n=Se;A(le,e.isVisible,!0),A(me,e.commands,!0),A(ue,e.activeCommandId??null,!0),A(fe,xk(e.results,e.commands,[]),!0),!n&&e.isVisible?(de=document.activeElement,t.onOpen?.()):n&&!e.isVisible&&t.onClose?.(),Se=e.isVisible}),we=()=>{de&&typeof de.focus==`function`&&de.focus()},Te=e=>{e?.preventDefault?.(),ye(),we()},Ee=()=>{I(le)&&I(oe)&&I(oe).focus()},De=e=>{VD.update(t=>({...t,activeCommandId:e}))},Oe=e=>{if(!I(le))return;e.preventDefault();let t=I(fe).findIndex(e=>e.actionId===I(ue))??0;t=t===-1?0:t;let n=I(fe).length,r=(n+t-1)%n,i=I(fe)[r]?r:t;De(I(fe)[i]?.actionId||``)},ke=e=>{if(I(le)&&(e.preventDefault(),I(fe).length)){let e=I(fe).findIndex(e=>e.actionId===I(ue))??0;e=e===-1?-1:e;let t=I(fe).length,n=(e+1)%t,r=I(fe)[n]?n:e;De(I(fe)[r]?.actionId||``)}},Ae=e=>{if(!I(le))return;e.preventDefault();let n=I(be)[I(ue)];n&&(t.onActionSelect?.(n),yk({action:n}))},w=e=>{I(se)&&!I(se).contains(e.target)&&Te()},je=e=>{e.preventDefault(),ve()},T=e=>{if(!I(le)||!I(se))return;let t=I(se).querySelectorAll(`input, button, [tabindex]:not([tabindex="-1"])`),n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())};Hi(async()=>{let{tinykeys:e,parseKeybinding:t}=await Mk(async()=>{let{tinykeys:e,parseKeybinding:t}=await import(`./tinykeys.module-CjuTRcEz.js`);return{tinykeys:e,parseKeybinding:t}},[]);A(_e,t(`Esc`).flat().join(``),!0);let n={...Jk({actions:a()}),[s()]:je,Escape:Te,ArrowUp:Oe,ArrowDown:ke,Enter:Ae,Tab:T};ce=e(window,n)});let Me=O(()=>bk(I(me))),Ne=e=>{VD.update(t=>({...t,results:e,activeCommandId:e?.[0]?.actionId||``}))},Fe=e=>{e.preventDefault();let t=[...I(me)];if(n().textInput){let e=n().textInput;t=_k(I(Me).search(e))}Ne(t)};Ln(()=>(I(le)&&(Ee(),I(ae)&&I(ae).addEventListener(`click`,w)),()=>{I(ae)?.removeEventListener(`click`,w)})),Ln(()=>{he.set({inputClass:c(),overlayClass:l(),paletteWrapperInnerClass:u(),resultsContainerClass:d(),resultContainerClass:f(),optionSelectedClass:p(),titleClass:m(),subtitleClass:h(),descriptionClass:g(),keyboardButtonClass:_(),unstyled:v(),inputStyle:Ck(y()),overlayStyle:Ck(b()),paletteWrapperInnerStyle:Ck(x()),resultsContainerStyle:Ck(S()),resultContainerStyle:Ck(ee()),optionSelectedStyle:Ck(C()),titleStyle:Ck(te()),subtitleStyle:Ck(ne()),descriptionStyle:Ck(re()),keyboardButtonStyle:Ck(ie()),emptyState:t.emptyState})}),Ui(()=>{ce?.(),Ce(),we()});let Ie=e=>e.preventDefault();BD(e,{target:`body`,children:e=>{var r=Yr(),i=Cn(r),a=e=>{var r=Zk();let i;var a=j(r),s=j(a);let d;var f=j(s),p=j(f);Mi(p,`for`,pe);var m=M(p,2),h=M(j(m),2);ji(h);let g;Mi(h,`spellcheck`,!1),Mi(h,`id`,pe),Bi(h,e=>A(oe,e),()=>I(oe)),Ok(M(h,2),{onKeyboardButtonClicked:()=>Te(),children:e=>{Pe();var t=Jr();N(()=>B(t,I(_e))),z(e,t)},$$slots:{default:!0}}),E(m),E(f),qk(M(f,2),{get emptyState(){return t.emptyState}}),E(s),Bi(s,e=>A(se,e),()=>I(se)),E(a),E(r),Bi(r,e=>A(ae,e),()=>I(ae)),N((e,t,n)=>{i=xi(r,1,hi(l()),`svelte-jdivt1`,i,{"cp-overlay":!v()}),Ci(r,e),d=xi(s,1,hi(u()),`svelte-jdivt1`,d,{"cp-container":!v()}),Ci(s,t),g=xi(h,1,hi(c()),`svelte-jdivt1`,g,{"cp-input":!v()}),Ci(h,n),Mi(h,`placeholder`,o()),Mi(h,`aria-activedescendant`,I(ue)?`palette-${I(ue)}`:void 0)},[()=>Ck(b()),()=>Ck(x()),()=>Ck(y())]),Rr(`submit`,f,Ie),L(`input`,h,Fe),Ii(h,()=>n().textInput,e=>vt(VD,kr(n).textInput=e,kr(n))),z(e,r)};V(i,e=>{I(le)&&e(a)}),z(e,r)},$$slots:{default:!0}}),qe(),i()}zr([`input`]);var $k=Qk;function eA(e){return e.servers[0]}function tA(e,t){return t.filter(t=>t.serverId===e.id)}function nA(e){let t=[];t.push({actionId:`nav-gateway`,title:`Gateway`,description:`${e.projects.length} projects · ${e.browsers.length} browsers`,group:`Navigate`,keywords:[`gateway`,`__gateway`,`home`],onRun:()=>ia(`#/gateway`)});for(let n of e.projects){let e=n.servers.length<=1,r=eA(n),i=n.browsers.length;if(t.push({actionId:`nav-project-${n.projectId}`,title:n.name,description:e?`${r?.type??``} · ${i} browser${i===1?``:`s`}`:`${n.servers.length} servers · ${i} browsers`,group:`Navigate`,keywords:[n.projectId,n.name,r?.type??``].filter(Boolean),onRun:()=>ia(`#/project/${n.projectId}`)}),!e)for(let e of n.servers){let r=tA(e,n.browsers);t.push({actionId:`nav-server-${n.projectId}-${e.type}`,title:`${n.name} · ${e.type}`,description:`${r.length} browser${r.length===1?``:`s`}`,group:`Navigate`,keywords:[n.name,e.type],onRun:()=>ia(`#/project/${n.projectId}/${e.type}`)})}for(let e of n.browsers){let r=n.servers.find(t=>t.id===e.serverId),i=e.browserId??e.connId,a=[...n.browsers.filter(t=>t.serverId===e.serverId)].sort((e,t)=>e.connectedAt-t.connectedAt).findIndex(e=>(e.browserId??e.connId)===i)+1;t.push({actionId:`nav-browser-${i}`,title:`${n.name} · ${r?.type??``}`,subTitle:`Browser ${a}`,group:`Navigate`,keywords:[n.name,r?.type??``,i,`browser`],onRun:()=>ia(`#/project/${n.projectId}/${r?.type??``}/${i}`)})}}return t}function rA(e){let t=is(),n=nA(e),r=[],i=0;for(let e of t){if(i>=5)break;let t=n.find(t=>{if(t.actionId===`nav-gateway`)return e===`#/gateway`;let n=String(t.actionId);if(n.startsWith(`nav-browser-`)){let t=n.replace(`nav-browser-`,``);return e.endsWith(`/${t}`)}if(n.startsWith(`nav-server-`)){let t=n.replace(`nav-server-`,``).split(`-`);return e===`#/project/${t.slice(0,-1).join(`-`)}/${t[t.length-1]}`}return n.startsWith(`nav-project-`)?e===`#/project/${n.replace(`nav-project-`,``)}`:!1});t&&(r.push({...t,actionId:`recent-${t.actionId}`,group:`Recent`}),i++)}return r}function iA(e){let t=[...e.browsers].sort((e,t)=>t.connectedAt-e.connectedAt),n=[];for(let r of t.slice(0,5)){let t=e.servers.find(e=>e.id===r.serverId),i=e.projects.find(e=>e.servers.some(e=>e.id===r.serverId));if(!i||!t)continue;let a=r.browserId??r.connId,o=aA(r.connectedAt),s=[...e.browsers.filter(e=>e.serverId===r.serverId)].sort((e,t)=>e.connectedAt-t.connectedAt).findIndex(e=>(e.browserId??e.connId)===a)+1;n.push({actionId:`active-${a}`,title:`${i.name} · ${t.type}`,subTitle:`Browser ${s} · connected ${o}`,group:`Active`,keywords:[i.name,t.type,a,`active`,`connected`],onRun:()=>ia(`#/project/${i.projectId}/${t.type}/${a}`)})}return n}function aA(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function oA(e){return[{actionId:`cmd-toggle-theme`,title:`Toggle theme`,description:`Switch between light and dark mode`,group:`Commands`,keywords:[`theme`,`dark`,`light`,`mode`],onRun:()=>e.onToggleTheme()},{actionId:`cmd-toggle-repl`,title:`Toggle REPL`,description:`Open or close the REPL panel`,shortcut:"Control+`",group:`Commands`,keywords:[`repl`,`console`,`eval`],onRun:()=>e.onToggleRepl()},{actionId:`cmd-clear-logs`,title:`Clear log stream`,description:`Clear all visible log entries and purge server files`,group:`Commands`,keywords:[`clear`,`logs`,`clean`],onRun:()=>{Ho()}}]}function sA(e,t){return gk([...rA(e),...iA(e),...nA(e),...oA(t)])}function cA(e,t){Ke(t,!0);let n=O(()=>sA(t.registry,t.callbacks));$k(e,{get commands(){return I(n)},placeholder:`Search actions, navigate...`,shortcut:`$mod+k`}),qe()}var lA=R(`<span> </span>`);function uA(e,t){Ke(t,!0);let n=k(fn(Date.now()));Ln(()=>{let e=setInterval(()=>{A(n,Date.now(),!0)},1e3);return()=>clearInterval(e)});function r(e,t){let n=Math.floor((t-e)/1e3);if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m ${n%60}s`:`${Math.floor(r/60)}h ${r%60}m`}let i=O(()=>r(t.since,I(n)));var a=lA(),o=j(a,!0);E(a),N(()=>B(o,I(i))),z(e,a),qe()}var dA=R(`<div class="border-b border-border flex items-center gap-1 px-3 shrink-0 h-8"><a>Overview</a> <a>Logs</a></div>`);function fA(e,t){Ke(t,!0);function n(e){return na({...t.route,tab:e})}function r(e){return t.route.tab===e}var i=dA(),a=j(i),o=M(a,2);E(i),N((e,t,n,r)=>{Mi(a,`href`,e),xi(a,1,`text-xs px-2 py-1 border-b-2 -mb-px transition-colors
|
|
62
62
|
${t??``}`),Mi(o,`href`,n),xi(o,1,`text-xs px-2 py-1 border-b-2 -mb-px transition-colors
|
|
63
63
|
${r??``}`)},[()=>n(`overview`),()=>r(`overview`)?`border-accent text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`,()=>n(`logs`),()=>r(`logs`)?`border-accent text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`]),L(`click`,a,e=>{e.preventDefault(),ia(n(`overview`))}),L(`click`,o,e=>{e.preventDefault(),ia(n(`logs`))}),z(e,i),qe()}zr([`click`]);var pA=R(`<option> </option>`),mA=R(`<div class="flex items-center justify-end px-3 py-1 border-b border-border"><button class="text-[10px] text-muted-foreground hover:text-foreground">Clear filter</button></div>`),hA=R(`<div class="px-3 py-2 text-[11px] text-dim">No channels yet</div>`),gA=R(`<button><span class="w-3 text-[10px]"> </span> <span class="font-mono"> </span></button>`),_A=R(`<div class="absolute left-0 top-full mt-1 bg-card border border-border rounded shadow-lg z-30 py-1 min-w-48 max-h-80 overflow-y-auto"><!> <!></div>`),vA=R(`<div class="absolute right-0 top-full mt-1 bg-card border border-border rounded shadow-lg z-30 py-1 min-w-24"><button class="block w-full text-left px-3 py-1 text-[11px] text-foreground hover:bg-muted/50">.jsonl</button> <button class="block w-full text-left px-3 py-1 text-[11px] text-foreground hover:bg-muted/50">.log</button> <button class="block w-full text-left px-3 py-1 text-[11px] text-foreground hover:bg-muted/50">.csv</button></div>`),yA=R(`<div class="flex items-center justify-center h-full text-dim text-xs">Waiting for logs...</div>`),bA=R(`<a class="font-semibold text-foreground hover:underline"> </a>`),xA=R(`<span class="font-semibold text-foreground"> </span>`),SA=R(`<span class="text-dim">·</span>`),CA=R(`<a class="text-muted-foreground hover:text-foreground hover:underline"> </a>`),wA=R(`<span class="text-muted-foreground"> </span>`),TA=R(`<span class="text-dim">·</span>`),EA=R(`<a class="text-muted-foreground hover:text-foreground hover:underline"> </a>`),DA=R(`<span class="text-muted-foreground"> </span>`),OA=R(`<div class="sticky top-0 z-20 flex items-center gap-2 px-3 h-[18px] bg-background border-b border-border/40 text-[10px] uppercase tracking-wide"><!> <!> <!> <!> <!></div>`),kA=R(`<div> </div>`),AA=R(`<div><div class="flex gap-2 py-px text-[11px] leading-[18px]"><span class="text-dim shrink-0 w-16"> </span> <span> </span> <span class="shrink-0 w-20 text-dim truncate"> </span> <span> </span></div> <!></div>`),jA=R(`<button class="absolute bottom-2 right-4 px-2 py-1 rounded bg-accent text-accent-foreground text-[10px] shadow-lg">Jump to bottom</button>`),MA=R(`<div class="flex flex-col h-full overflow-hidden relative"><div class="flex items-center gap-2 px-3 py-1 border-b border-border shrink-0"><select class="text-[11px] bg-transparent text-muted-foreground border border-border rounded px-1.5 py-0.5 cursor-pointer hover:text-foreground focus:outline-none focus:border-accent"></select> <div class="relative"><button class="text-[11px] bg-transparent text-muted-foreground border border-border rounded px-1.5 py-0.5 cursor-pointer hover:text-foreground focus:outline-none focus:border-accent inline-flex items-center gap-1" title="Filter channels"><span> </span> <span class="text-dim">▾</span></button> <!></div> <div class="flex-1"></div> <span class="text-[10px] text-dim"> </span> <div class="relative"><button class="text-[10px] text-muted-foreground hover:text-foreground transition-colors disabled:opacity-30" title="Export logs">Export</button> <!></div> <button class="text-[10px] text-muted-foreground hover:text-foreground transition-colors" title="Clear logs in view">Clear</button></div> <div class="flex-1 overflow-y-auto font-mono text-[11px] leading-[18px]"><!></div> <!></div>`);function NA(e,t){Ke(t,!0);let n=Vi(t,`filter`,19,()=>({})),r=Vi(t,`historyServerIds`,19,()=>[]),i=Wo();function a(e){let t={};if(e.serverId){t.serverId=e.serverId;let n=i.servers.find(t=>t.id===e.serverId);if(n){t.projectId=n.projectId;let e=i.projects.find(e=>e.projectId===n.projectId);t.projectLabel=e&&e.name&&e.name!==e.projectId?e.name:n.directory?.split(`/`).pop()??n.projectId,t.projectHref=na({view:`project`,projectId:n.projectId,tab:`logs`}),t.serverLabel=n.type,t.serverHref=na({view:`server`,projectId:n.projectId,type:n.type,tab:`logs`})}else t.serverLabel=e.serverId}let n=e.browserId??e.connId;if(n){let e=i.browsers.find(e=>(e.browserId??e.connId)===n||e.connId===n);if(e&&e.serverId){let n=i.browsers.filter(t=>t.serverId===e.serverId),r=e.browserId??e.connId;t.browserKey=r,t.browserLabel=`Browser ${Ko(e,n)}`;let a=i.servers.find(t=>t.id===e.serverId);a&&(t.browserHref=na({view:`browser`,projectId:a.projectId,type:a.type,browserId:r,tab:`logs`}))}else t.browserKey=n,t.browserLabel=`Browser ·${n.slice(0,6)}`}else e.serverId&&(t.browserKey=`${e.serverId}:server`,t.browserLabel=`Server`,t.browserHref=t.serverHref);return t}function o(e){ra({...aa(),channels:e&&e.length>0?e:void 0})}function s(e){let t=new Set(n().channels??I(v));t.has(e)?t.delete(e):t.add(e);let r=[...t];r.length===I(v).length&&I(v).every(e=>t.has(e))?o(void 0):o(r)}let c=k(!1),l=k(void 0);Ln(()=>{if(!I(c))return;function e(e){I(l)&&!I(l).contains(e.target)&&A(c,!1)}return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)});let u=k(``);Ln(()=>{let e=r().join(`,`);e&&e!==I(u)&&(A(u,e,!0),r().forEach(e=>Bo(e)))});let d=[{id:`error`,label:`Error`},{id:`warn`,label:`Warn`},{id:`info`,label:`Info`},{id:`log`,label:`Log`},{id:`debug`,label:`Debug`}],f={error:0,warn:1,info:2,log:3,debug:4},p=k(`debug`),m=k(!0),h=k(void 0),g=Lo(),_=O(()=>{g.length;let e=g;if(n().browserId&&(e=e.filter(e=>e.browserId===n().browserId||e.connId===n().browserId)),n().serverId&&(e=e.filter(e=>e.serverId===n().serverId)),n().serverIds&&n().serverIds.length>0){let t=new Set(n().serverIds);e=e.filter(e=>e.serverId!==void 0&&t.has(e.serverId))}return e}),v=O(()=>{let e=new Set;for(let t of I(_))e.add(t.channel);return[...e].sort()}),y=O(()=>n().channels??I(v)),b=O(()=>!n().channels||n().channels.length===0?`All channels`:n().channels.length===1?n().channels[0]:`${n().channels.length} channels`),x=O(()=>{let e=g;if(n().browserId&&(e=e.filter(e=>e.browserId===n().browserId||e.connId===n().browserId)),n().serverId&&(e=e.filter(e=>e.serverId===n().serverId)),n().serverIds&&n().serverIds.length>0){let t=new Set(n().serverIds);e=e.filter(e=>e.serverId!==void 0&&t.has(e.serverId))}if(n().channels&&n().channels.length>0){let t=new Set(n().channels);e=e.filter(e=>t.has(e.channel))}if(I(p)!==`debug`){let t=f[I(p)]??4;e=e.filter(e=>(f[e.payload?.level??`log`]??3)<=t)}return e}),S=O(()=>{let e=new Set,t=new Set,n=new Set;for(let r of I(x)){let i=a(r);i.projectId&&e.add(i.projectId),i.serverId&&t.add(i.serverId),i.browserKey&&n.add(i.browserKey)}return{project:e.size>1,server:t.size>1,browser:n.size>1}}),ee=O(()=>{let e=I(S),t=[];if(!e.project&&!e.server&&!e.browser){for(let e=0;e<I(x).length;e++)t.push({kind:`entry`,key:`e:${e}`,entry:I(x)[e]});return t}let n,r,i;for(let o=0;o<I(x).length;o++){let s=I(x)[o],c=a(s),l=e.project&&c.projectId!==n,u=e.server&&c.serverId!==r,d=e.browser&&c.browserKey!==i;if(l||u||d){let n=e.project?c.projectLabel??c.projectId:void 0,r=e.server?c.serverLabel??c.serverId:void 0,i=e.browser?c.browserLabel??c.browserKey:void 0;t.push({kind:`hdr`,key:`h:${o}`,project:n?{label:n,href:c.projectHref}:void 0,server:r?{label:r,href:c.serverHref}:void 0,browser:i?{label:i,href:c.browserHref}:void 0})}e.project&&(n=c.projectId),e.server&&(r=c.serverId),e.browser&&(i=c.browserKey),t.push({kind:`entry`,key:`e:${o}`,entry:s})}return t});Ln(()=>{I(x).length,I(m)&&I(h)&&requestAnimationFrame(()=>{I(h)&&(I(h).scrollTop=I(h).scrollHeight)})});function C(){if(!I(h))return;let{scrollTop:e,scrollHeight:t,clientHeight:n}=I(h);A(m,t-e-n<50)}function te(){A(m,!0),I(h)&&(I(h).scrollTop=I(h).scrollHeight)}function ne(e){return new Date(e).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function re(e){let t=e.payload?.level??e.channel;return t===`error`||e.channel===`errors`?`text-destructive`:t===`warn`?`text-warning`:t===`info`?`text-info`:t===`debug`?`text-dim`:`text-foreground`}function ie(e){let t=e.payload?.level??``;return t===`error`||e.channel===`errors`?`err`:t===`warn`?`wrn`:t===`info`?`inf`:t===`debug`?`dbg`:`log`}function ae(e){let t=e.payload;return t?typeof t==`string`?t:t.message?String(t.message):t.args?.length?t.args.map(String).join(` `):t.text?String(t.text):t.url?`${t.method??`GET`} ${t.url} ${t.status??``}`:JSON.stringify(t):``}let oe=k(fn(new Set));function se(e){let t=new Set(I(oe));t.has(e)?t.delete(e):t.add(e),A(oe,t,!0)}let ce=k(!1),le=k(void 0);Ln(()=>{if(!I(ce))return;function e(e){I(le)&&!I(le).contains(e.target)&&A(ce,!1)}return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)});function ue(e){let t=e.payload?.level??``;return t===`error`||e.channel===`errors`?`error`:t===`warn`?`warn`:t===`info`?`info`:t===`debug`?`debug`:`log`}function de(e,t,n){let r=new Blob([t],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,a.click(),URL.revokeObjectURL(i),A(ce,!1)}function fe(){de(`logs.jsonl`,I(x).map(e=>JSON.stringify({ts:new Date(e.timestamp).toISOString(),level:ue(e),channel:e.channel,message:ae(e),payload:e.payload,browserId:e.browserId,serverId:e.serverId})).join(`
|
|
64
64
|
`)+`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-4{right:calc(var(--spacing) * 4)}.bottom-2{bottom:calc(var(--spacing) * 2)}.left-0{left:calc(var(--spacing) * 0)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.-mb-px{margin-bottom:-1px}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-\[72px\]{margin-left:72px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-\[18px\]{height:18px}.h-full{height:100%}.h-screen{height:100vh}.max-h-80{max-height:calc(var(--spacing) * 80)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-full{width:100%}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-96{max-width:calc(var(--spacing) * 96)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-48{min-width:calc(var(--spacing) * 48)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border-color)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent{border-color:var(--accent)}.border-border,.border-border\/40{border-color:var(--border-color)}@supports (color:color-mix(in lab, red, red)){.border-border\/40{border-color:color-mix(in oklab, var(--border-color) 40%, transparent)}}.border-border\/50{border-color:var(--border-color)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border-color) 50%, transparent)}}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--accent)}.bg-background,.bg-background\/60{background-color:var(--bg)}@supports (color:color-mix(in lab, red, red)){.bg-background\/60{background-color:color-mix(in oklab, var(--bg) 60%, transparent)}}.bg-card{background-color:var(--card)}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/5{background-color:color-mix(in oklab, var(--destructive) 5%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-muted{background-color:var(--muted)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning{background-color:var(--warning)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-\[18px\]{--tw-leading:18px;line-height:18px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-accent-foreground{color:var(--accent-fg)}.text-destructive{color:var(--destructive)}.text-dim{color:var(--dim)}.text-foreground{color:var(--fg)}.text-info{color:var(--info)}.text-muted-foreground{color:var(--muted-fg)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[contain-intrinsic-size\:auto_20px\]{contain-intrinsic-size:auto 20px}.\[content-visibility\:auto\]{content-visibility:auto}@media (hover:hover){.hover\:bg-accent\/90:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/90:hover{background-color:color-mix(in oklab, var(--accent) 90%, transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/30:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-foreground:hover{color:var(--fg)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-accent:focus{border-color:var(--accent)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:opacity-30:disabled{opacity:.3}@media (width>=48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}:root{--bg:#f4f4f4;--fg:#111;--muted:#e8e8e8;--muted-fg:#5a5a5a;--dim:#707070;--card:#fff;--card-fg:#111;--border-color:#d0d0d0;--accent:#3b82f6;--accent-fg:#fff;--info:#3b82f6;--destructive:#ef4444;--success:#22c55e;--warning:#f59e0b}.dark{--bg:#0f0f0f;--fg:#e8e8e8;--muted:#262626;--muted-fg:#a3a3a3;--dim:#848484;--card:#1c1c1c;--card-fg:#e8e8e8;--border-color:#333;--accent:#3b82f6;--accent-fg:#fff;--info:#3b82f6;--destructive:#ef4444;--success:#22c55e;--warning:#f59e0b}body{background-color:var(--bg);color:var(--fg);-webkit-font-smoothing:antialiased;margin:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:13px}.cp-container{background:var(--card)!important;box-shadow:0 25px 50px -12px #0006, 0 0 0 1px var(--border-color)!important;border-radius:8px!important;font-family:inherit!important}.cp-container form{border-bottom-color:var(--border-color)!important}.cp-input{color:var(--fg)!important;font-family:inherit!important;font-size:13px!important}.cp-input::placeholder,.cp-search-icon{color:var(--muted-fg)!important}.cp-group-header{color:var(--muted-fg)!important;font-family:inherit!important;font-size:10px!important}.cp-result:hover,.cp-result-active,.cp-result-icon{background:var(--muted)!important}.cp-result-title{color:var(--fg)!important;font-size:12px!important}.cp-result-subtitle{color:var(--muted-fg)!important;font-size:11px!important}.cp-result-description{opacity:.7;color:var(--muted-fg)!important;font-size:10px!important}.cp-empty-content{color:var(--muted-fg)!important}.cp-empty-content p{color:var(--fg)!important}.cp-kbd{color:var(--muted-fg)!important;background:var(--muted)!important;border-color:var(--border-color)!important;font-family:inherit!important}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}.cp-kbd.svelte-1jb7ii0{color:#9ca3af;background:#374151;border:1px solid #4b5563;border-radius:4px;justify-content:center;align-items:center;min-width:1.5rem;height:1.5rem;padding:0 .375rem;font-family:inherit;font-size:.75rem;font-weight:500;display:inline-flex;box-shadow:0 1px 2px #0003}.light .cp-kbd.svelte-1jb7ii0,html.light .cp-kbd.svelte-1jb7ii0,body.light .cp-kbd.svelte-1jb7ii0{color:#6b7280;background:#f3f4f6;border-color:#e5e7eb;box-shadow:0 1px 2px #0000000d}@media (prefers-color-scheme:light){.cp-kbd.svelte-1jb7ii0{color:#6b7280;background:#f3f4f6;border-color:#e5e7eb;box-shadow:0 1px 2px #0000000d}}.cp-result.svelte-14d0jbk{cursor:pointer;border-radius:8px;align-items:center;gap:.75rem;padding:.75rem;transition:background-color .1s;display:flex}.cp-result.svelte-14d0jbk:hover,.cp-result-active.svelte-14d0jbk{background:#374151}.cp-result-icon.svelte-14d0jbk{background:#374151;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.cp-result-emoji.svelte-14d0jbk{font-size:1.25rem}.cp-result-icon.svelte-14d0jbk img:where(.svelte-14d0jbk){border-radius:4px}.cp-result-content.svelte-14d0jbk{flex:1;min-width:0}.cp-result-title.svelte-14d0jbk{color:#f9fafb;white-space:nowrap;text-overflow:ellipsis;font-weight:500;overflow:hidden}.cp-result-subtitle.svelte-14d0jbk{color:#9ca3af;white-space:nowrap;text-overflow:ellipsis;margin-top:.125rem;font-size:.875rem;overflow:hidden}.cp-result-description.svelte-14d0jbk{color:#6b7280;margin-top:.25rem;font-size:.75rem}.cp-result-shortcuts.svelte-14d0jbk{flex-shrink:0;gap:.25rem;display:flex}.light .cp-result.svelte-14d0jbk:hover,.light .cp-result-active.svelte-14d0jbk,html.light .cp-result.svelte-14d0jbk:hover,html.light .cp-result-active.svelte-14d0jbk,body.light .cp-result.svelte-14d0jbk:hover,body.light .cp-result-active.svelte-14d0jbk,.light .cp-result-icon.svelte-14d0jbk,html.light .cp-result-icon.svelte-14d0jbk,body.light .cp-result-icon.svelte-14d0jbk{background:#f3f4f6}.light .cp-result-title.svelte-14d0jbk,html.light .cp-result-title.svelte-14d0jbk,body.light .cp-result-title.svelte-14d0jbk{color:#111827}.light .cp-result-subtitle.svelte-14d0jbk,html.light .cp-result-subtitle.svelte-14d0jbk,body.light .cp-result-subtitle.svelte-14d0jbk{color:#6b7280}.light .cp-result-description.svelte-14d0jbk,html.light .cp-result-description.svelte-14d0jbk,body.light .cp-result-description.svelte-14d0jbk{color:#9ca3af}@media (prefers-color-scheme:light){.cp-result.svelte-14d0jbk:hover,.cp-result-active.svelte-14d0jbk,.cp-result-icon.svelte-14d0jbk{background:#f3f4f6}.cp-result-title.svelte-14d0jbk{color:#111827}.cp-result-subtitle.svelte-14d0jbk{color:#6b7280}.cp-result-description.svelte-14d0jbk{color:#9ca3af}}.cp-results.svelte-1lunvte{width:100%;max-height:calc(70vh - 60px);padding:.5rem;overflow-y:auto}.cp-group-header.svelte-1lunvte{text-transform:uppercase;letter-spacing:.05em;color:#9ca3af;margin-top:.5rem;padding:.75rem .75rem .5rem;font-size:.75rem;font-weight:600}.cp-group-header.svelte-1lunvte:first-child{margin-top:0}.cp-empty.svelte-1lunvte{justify-content:center;align-items:center;padding:3rem 1rem;display:flex}.cp-empty-content.svelte-1lunvte{color:#6b7280;text-align:center;flex-direction:column;align-items:center;gap:.75rem;display:flex}.cp-empty-content.svelte-1lunvte p:where(.svelte-1lunvte){color:#9ca3af;margin:0;font-weight:500}.cp-empty-content.svelte-1lunvte span:where(.svelte-1lunvte){font-size:.875rem}@media (width<=640px){.cp-results.svelte-1lunvte{max-height:calc(85vh - 60px)}}.light .cp-group-header.svelte-1lunvte,html.light .cp-group-header.svelte-1lunvte,body.light .cp-group-header.svelte-1lunvte{color:#6b7280}.light .cp-empty-content.svelte-1lunvte,html.light .cp-empty-content.svelte-1lunvte,body.light .cp-empty-content.svelte-1lunvte{color:#9ca3af}.light .cp-empty-content.svelte-1lunvte p:where(.svelte-1lunvte),html.light .cp-empty-content.svelte-1lunvte p:where(.svelte-1lunvte),body.light .cp-empty-content.svelte-1lunvte p:where(.svelte-1lunvte){color:#6b7280}@media (prefers-color-scheme:light){.cp-group-header.svelte-1lunvte{color:#6b7280}.cp-empty-content.svelte-1lunvte{color:#9ca3af}.cp-empty-content.svelte-1lunvte p:where(.svelte-1lunvte){color:#6b7280}}.sr-only.svelte-jdivt1{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.cp-overlay.svelte-jdivt1{z-index:9999;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0009;justify-content:center;align-items:flex-start;padding:10vh 1rem 1rem;animation:.15s ease-out svelte-jdivt1-fadeIn;display:flex;position:fixed;inset:0}@keyframes svelte-jdivt1-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes svelte-jdivt1-slideIn{0%{opacity:0;transform:scale(.96)translateY(-10px)}to{opacity:1;transform:scale(1)translateY(0)}}.cp-wrapper{width:100%;max-width:640px;animation:.2s ease-out svelte-jdivt1-slideIn}.cp-wrapper *{box-sizing:border-box}.cp-container.svelte-jdivt1{background:#1f2937;border-radius:12px;flex-direction:column;width:100%;max-height:70vh;display:flex;overflow:hidden;box-shadow:0 25px 50px -12px #00000080,0 0 0 1px #ffffff1a}form.svelte-jdivt1{border-bottom:1px solid #374151;width:100%}.cp-input-wrapper.svelte-jdivt1{align-items:center;gap:.75rem;padding:.875rem 1rem;display:flex}.cp-search-icon.svelte-jdivt1{color:#6b7280;flex-shrink:0}.cp-input.svelte-jdivt1{color:#f9fafb;background:0 0;border:none;outline:none;flex:1;font-size:1rem}.cp-input.svelte-jdivt1::placeholder{color:#6b7280}@media (width<=640px){.cp-overlay.svelte-jdivt1{align-items:flex-end;padding:0}.cp-wrapper{max-width:100%}.cp-container.svelte-jdivt1{border-radius:12px 12px 0 0;max-height:85vh}}.light .cp-container.svelte-jdivt1,html.light .cp-container.svelte-jdivt1,body.light .cp-container.svelte-jdivt1{background:#fff;box-shadow:0 25px 50px -12px #00000026,0 0 0 1px #00000014}.light form.svelte-jdivt1,html.light form.svelte-jdivt1,body.light form.svelte-jdivt1{border-bottom-color:#e5e7eb}.light .cp-input.svelte-jdivt1,html.light .cp-input.svelte-jdivt1,body.light .cp-input.svelte-jdivt1{color:#111827}.light .cp-input.svelte-jdivt1::-moz-placeholder{color:#9ca3af}html.light .cp-input.svelte-jdivt1::-moz-placeholder{color:#9ca3af}body.light .cp-input.svelte-jdivt1::-moz-placeholder{color:#9ca3af}.light .cp-input.svelte-jdivt1::placeholder,html.light .cp-input.svelte-jdivt1::placeholder,body.light .cp-input.svelte-jdivt1::placeholder,.light .cp-search-icon.svelte-jdivt1,html.light .cp-search-icon.svelte-jdivt1,body.light .cp-search-icon.svelte-jdivt1{color:#9ca3af}@media (prefers-color-scheme:light){.cp-container.svelte-jdivt1{background:#fff;box-shadow:0 25px 50px -12px #00000026,0 0 0 1px #00000014}form.svelte-jdivt1{border-bottom-color:#e5e7eb}.cp-input.svelte-jdivt1{color:#111827}.cp-input.svelte-jdivt1::placeholder{color:#9ca3af}.cp-search-icon.svelte-jdivt1{color:#9ca3af}}
|
package/dist/admin/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>webdev-mcp admin</title>
|
|
7
|
-
<script type="module" crossorigin src="/__admin/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/__admin/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/__admin/assets/index-BfKsjNMA.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/__admin/assets/index-CSkuHbTu.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@winstonfassett/webdev-gateway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-alpha.1",
|
|
4
4
|
"description": "Universal web development MCP gateway — proxy any dev server with live browser observability for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
],
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/WinstonFassett/webdev.git",
|
|
46
|
+
"url": "git+https://github.com/WinstonFassett/webdev-ai.git",
|
|
47
47
|
"directory": "apps/gateway"
|
|
48
48
|
},
|
|
49
49
|
"homepage": "https://github.com/WinstonFassett/webdev",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-4{right:calc(var(--spacing) * 4)}.bottom-2{bottom:calc(var(--spacing) * 2)}.left-0{left:calc(var(--spacing) * 0)}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.-mb-px{margin-bottom:-1px}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-\[72px\]{margin-left:72px}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-\[18px\]{height:18px}.h-full{height:100%}.h-screen{height:100vh}.max-h-80{max-height:calc(var(--spacing) * 80)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-48{width:calc(var(--spacing) * 48)}.w-full{width:100%}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-96{max-width:calc(var(--spacing) * 96)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-48{min-width:calc(var(--spacing) * 48)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--border-color)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent{border-color:var(--accent)}.border-border,.border-border\/40{border-color:var(--border-color)}@supports (color:color-mix(in lab, red, red)){.border-border\/40{border-color:color-mix(in oklab, var(--border-color) 40%, transparent)}}.border-border\/50{border-color:var(--border-color)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border-color) 50%, transparent)}}.border-transparent{border-color:#0000}.bg-accent{background-color:var(--accent)}.bg-background,.bg-background\/60{background-color:var(--bg)}@supports (color:color-mix(in lab, red, red)){.bg-background\/60{background-color:color-mix(in oklab, var(--bg) 60%, transparent)}}.bg-card{background-color:var(--card)}.bg-destructive,.bg-destructive\/5{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/5{background-color:color-mix(in oklab, var(--destructive) 5%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-muted{background-color:var(--muted)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning{background-color:var(--warning)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-\[18px\]{--tw-leading:18px;line-height:18px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--accent)}.text-accent-foreground{color:var(--accent-fg)}.text-destructive{color:var(--destructive)}.text-dim{color:var(--dim)}.text-foreground{color:var(--fg)}.text-info{color:var(--info)}.text-muted-foreground,.text-muted-foreground\/50{color:var(--muted-fg)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/50{color:color-mix(in oklab, var(--muted-fg) 50%, transparent)}}.text-muted-foreground\/60{color:var(--muted-fg)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/60{color:color-mix(in oklab, var(--muted-fg) 60%, transparent)}}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.\[contain-intrinsic-size\:auto_20px\]{contain-intrinsic-size:auto 20px}.\[content-visibility\:auto\]{content-visibility:auto}@media (hover:hover){.hover\:bg-accent\/90:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/90:hover{background-color:color-mix(in oklab, var(--accent) 90%, transparent)}}.hover\:bg-muted:hover,.hover\:bg-muted\/30:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/30:hover{background-color:color-mix(in oklab, var(--muted) 30%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:text-accent:hover{color:var(--accent)}.hover\:text-foreground:hover{color:var(--fg)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-accent:focus{border-color:var(--accent)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:opacity-30:disabled{opacity:.3}@media (width>=48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}:root{--bg:#f4f4f4;--fg:#111;--muted:#e8e8e8;--muted-fg:#5a5a5a;--dim:#707070;--card:#fff;--card-fg:#111;--border-color:#d0d0d0;--accent:#3b82f6;--accent-fg:#fff;--info:#3b82f6;--destructive:#ef4444;--success:#22c55e;--warning:#f59e0b}.dark{--bg:#0f0f0f;--fg:#e8e8e8;--muted:#262626;--muted-fg:#a3a3a3;--dim:#848484;--card:#1c1c1c;--card-fg:#e8e8e8;--border-color:#333;--accent:#3b82f6;--accent-fg:#fff;--info:#3b82f6;--destructive:#ef4444;--success:#22c55e;--warning:#f59e0b}body{background-color:var(--bg);color:var(--fg);-webkit-font-smoothing:antialiased;margin:0;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,monospace;font-size:13px}.cp-container{background:var(--card)!important;box-shadow:0 25px 50px -12px #0006, 0 0 0 1px var(--border-color)!important;border-radius:8px!important;font-family:inherit!important}.cp-container form{border-bottom-color:var(--border-color)!important}.cp-input{color:var(--fg)!important;font-family:inherit!important;font-size:13px!important}.cp-input::placeholder,.cp-search-icon{color:var(--muted-fg)!important}.cp-group-header{color:var(--muted-fg)!important;font-family:inherit!important;font-size:10px!important}.cp-result:hover,.cp-result-active,.cp-result-icon{background:var(--muted)!important}.cp-result-title{color:var(--fg)!important;font-size:12px!important}.cp-result-subtitle{color:var(--muted-fg)!important;font-size:11px!important}.cp-result-description{opacity:.7;color:var(--muted-fg)!important;font-size:10px!important}.cp-empty-content{color:var(--muted-fg)!important}.cp-empty-content p{color:var(--fg)!important}.cp-kbd{color:var(--muted-fg)!important;background:var(--muted)!important;border-color:var(--border-color)!important;font-family:inherit!important}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}.cp-kbd.svelte-1vzpvtd{color:#9ca3af;background:#374151;border:1px solid #4b5563;border-radius:4px;justify-content:center;align-items:center;min-width:1.5rem;height:1.5rem;padding:0 .375rem;font-family:inherit;font-size:.75rem;font-weight:500;display:inline-flex;box-shadow:0 1px 2px #0003}.light .cp-kbd.svelte-1vzpvtd,html.light .cp-kbd.svelte-1vzpvtd,body.light .cp-kbd.svelte-1vzpvtd{color:#6b7280;background:#f3f4f6;border-color:#e5e7eb;box-shadow:0 1px 2px #0000000d}@media (prefers-color-scheme:light){.cp-kbd.svelte-1vzpvtd{color:#6b7280;background:#f3f4f6;border-color:#e5e7eb;box-shadow:0 1px 2px #0000000d}}.cp-result.svelte-16igsvt{cursor:pointer;border-radius:8px;align-items:center;gap:.75rem;padding:.75rem;transition:background-color .1s;display:flex}.cp-result.svelte-16igsvt:hover,.cp-result-active.svelte-16igsvt{background:#374151}.cp-result-icon.svelte-16igsvt{background:#374151;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:36px;height:36px;display:flex}.cp-result-emoji.svelte-16igsvt{font-size:1.25rem}.cp-result-icon.svelte-16igsvt img:where(.svelte-16igsvt){border-radius:4px}.cp-result-content.svelte-16igsvt{flex:1;min-width:0}.cp-result-title.svelte-16igsvt{color:#f9fafb;white-space:nowrap;text-overflow:ellipsis;font-weight:500;overflow:hidden}.cp-result-subtitle.svelte-16igsvt{color:#9ca3af;white-space:nowrap;text-overflow:ellipsis;margin-top:.125rem;font-size:.875rem;overflow:hidden}.cp-result-description.svelte-16igsvt{color:#6b7280;margin-top:.25rem;font-size:.75rem}.cp-result-shortcuts.svelte-16igsvt{flex-shrink:0;gap:.25rem;display:flex}.light .cp-result.svelte-16igsvt:hover,.light .cp-result-active.svelte-16igsvt,html.light .cp-result.svelte-16igsvt:hover,html.light .cp-result-active.svelte-16igsvt,body.light .cp-result.svelte-16igsvt:hover,body.light .cp-result-active.svelte-16igsvt,.light .cp-result-icon.svelte-16igsvt,html.light .cp-result-icon.svelte-16igsvt,body.light .cp-result-icon.svelte-16igsvt{background:#f3f4f6}.light .cp-result-title.svelte-16igsvt,html.light .cp-result-title.svelte-16igsvt,body.light .cp-result-title.svelte-16igsvt{color:#111827}.light .cp-result-subtitle.svelte-16igsvt,html.light .cp-result-subtitle.svelte-16igsvt,body.light .cp-result-subtitle.svelte-16igsvt{color:#6b7280}.light .cp-result-description.svelte-16igsvt,html.light .cp-result-description.svelte-16igsvt,body.light .cp-result-description.svelte-16igsvt{color:#9ca3af}@media (prefers-color-scheme:light){.cp-result.svelte-16igsvt:hover,.cp-result-active.svelte-16igsvt,.cp-result-icon.svelte-16igsvt{background:#f3f4f6}.cp-result-title.svelte-16igsvt{color:#111827}.cp-result-subtitle.svelte-16igsvt{color:#6b7280}.cp-result-description.svelte-16igsvt{color:#9ca3af}}.cp-results.svelte-17am6af{width:100%;max-height:calc(70vh - 60px);padding:.5rem;overflow-y:auto}.cp-group-header.svelte-17am6af{text-transform:uppercase;letter-spacing:.05em;color:#9ca3af;margin-top:.5rem;padding:.75rem .75rem .5rem;font-size:.75rem;font-weight:600}.cp-group-header.svelte-17am6af:first-child{margin-top:0}.cp-empty.svelte-17am6af{justify-content:center;align-items:center;padding:3rem 1rem;display:flex}.cp-empty-content.svelte-17am6af{color:#6b7280;text-align:center;flex-direction:column;align-items:center;gap:.75rem;display:flex}.cp-empty-content.svelte-17am6af p:where(.svelte-17am6af){color:#9ca3af;margin:0;font-weight:500}.cp-empty-content.svelte-17am6af span:where(.svelte-17am6af){font-size:.875rem}@media (width<=640px){.cp-results.svelte-17am6af{max-height:calc(85vh - 60px)}}.light .cp-group-header.svelte-17am6af,html.light .cp-group-header.svelte-17am6af,body.light .cp-group-header.svelte-17am6af{color:#6b7280}.light .cp-empty-content.svelte-17am6af,html.light .cp-empty-content.svelte-17am6af,body.light .cp-empty-content.svelte-17am6af{color:#9ca3af}.light .cp-empty-content.svelte-17am6af p:where(.svelte-17am6af),html.light .cp-empty-content.svelte-17am6af p:where(.svelte-17am6af),body.light .cp-empty-content.svelte-17am6af p:where(.svelte-17am6af){color:#6b7280}@media (prefers-color-scheme:light){.cp-group-header.svelte-17am6af{color:#6b7280}.cp-empty-content.svelte-17am6af{color:#9ca3af}.cp-empty-content.svelte-17am6af p:where(.svelte-17am6af){color:#6b7280}}.sr-only.svelte-sfqeu0{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.cp-overlay.svelte-sfqeu0{z-index:9999;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#0009;justify-content:center;align-items:flex-start;padding:10vh 1rem 1rem;animation:.15s ease-out svelte-sfqeu0-fadeIn;display:flex;position:fixed;inset:0}@keyframes svelte-sfqeu0-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes svelte-sfqeu0-slideIn{0%{opacity:0;transform:scale(.96)translateY(-10px)}to{opacity:1;transform:scale(1)translateY(0)}}.cp-wrapper{width:100%;max-width:640px;animation:.2s ease-out svelte-sfqeu0-slideIn}.cp-wrapper *{box-sizing:border-box}.cp-container.svelte-sfqeu0{background:#1f2937;border-radius:12px;flex-direction:column;width:100%;max-height:70vh;display:flex;overflow:hidden;box-shadow:0 25px 50px -12px #00000080,0 0 0 1px #ffffff1a}form.svelte-sfqeu0{border-bottom:1px solid #374151;width:100%}.cp-input-wrapper.svelte-sfqeu0{align-items:center;gap:.75rem;padding:.875rem 1rem;display:flex}.cp-search-icon.svelte-sfqeu0{color:#6b7280;flex-shrink:0}.cp-input.svelte-sfqeu0{color:#f9fafb;background:0 0;border:none;outline:none;flex:1;font-size:1rem}.cp-input.svelte-sfqeu0::placeholder{color:#6b7280}@media (width<=640px){.cp-overlay.svelte-sfqeu0{align-items:flex-end;padding:0}.cp-wrapper{max-width:100%}.cp-container.svelte-sfqeu0{border-radius:12px 12px 0 0;max-height:85vh}}.light .cp-container.svelte-sfqeu0,html.light .cp-container.svelte-sfqeu0,body.light .cp-container.svelte-sfqeu0{background:#fff;box-shadow:0 25px 50px -12px #00000026,0 0 0 1px #00000014}.light form.svelte-sfqeu0,html.light form.svelte-sfqeu0,body.light form.svelte-sfqeu0{border-bottom-color:#e5e7eb}.light .cp-input.svelte-sfqeu0,html.light .cp-input.svelte-sfqeu0,body.light .cp-input.svelte-sfqeu0{color:#111827}.light .cp-input.svelte-sfqeu0::-moz-placeholder{color:#9ca3af}html.light .cp-input.svelte-sfqeu0::-moz-placeholder{color:#9ca3af}body.light .cp-input.svelte-sfqeu0::-moz-placeholder{color:#9ca3af}.light .cp-input.svelte-sfqeu0::placeholder,html.light .cp-input.svelte-sfqeu0::placeholder,body.light .cp-input.svelte-sfqeu0::placeholder,.light .cp-search-icon.svelte-sfqeu0,html.light .cp-search-icon.svelte-sfqeu0,body.light .cp-search-icon.svelte-sfqeu0{color:#9ca3af}@media (prefers-color-scheme:light){.cp-container.svelte-sfqeu0{background:#fff;box-shadow:0 25px 50px -12px #00000026,0 0 0 1px #00000014}form.svelte-sfqeu0{border-bottom-color:#e5e7eb}.cp-input.svelte-sfqeu0{color:#111827}.cp-input.svelte-sfqeu0::placeholder{color:#9ca3af}.cp-search-icon.svelte-sfqeu0{color:#9ca3af}}
|