mcp-memory-bucket 0.5.0 → 0.5.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.
@@ -2,22 +2,22 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const X=globalThis,xe=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,me=Symbol(),De=new WeakMap;let nt=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==me)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(xe&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=De.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&De.set(t,e))}return e}toString(){return this.cssText}};const Ct=r=>new nt(typeof r=="string"?r:r+"",void 0,me),V=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,n)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new nt(t,r,me)},Et=(r,e)=>{if(xe)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=X.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},Oe=xe?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Ct(t)})(r):r;/**
5
+ */const X=globalThis,me=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ke=Symbol(),Le=new WeakMap;let at=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==ke)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(me&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=Le.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&Le.set(t,e))}return e}toString(){return this.cssText}};const Et=r=>new at(typeof r=="string"?r:r+"",void 0,ke),q=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,n)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new at(t,r,ke)},zt=(r,e)=>{if(me)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=X.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},Oe=me?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return Et(t)})(r):r;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:zt,defineProperty:Pt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Ot,getPrototypeOf:It}=Object,re=globalThis,Ie=re.trustedTypes,Mt=Ie?Ie.emptyScript:"",Nt=re.reactiveElementPolyfillSupport,Z=(r,e)=>r,pe={toAttribute(r,e){switch(e){case Boolean:r=r?Mt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},at=(r,e)=>!zt(r,e),Me={attribute:!0,type:String,converter:pe,reflect:!1,useDefault:!1,hasChanged:at};Symbol.metadata??=Symbol("metadata"),re.litPropertyMetadata??=new WeakMap;let M=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Me){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Pt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:n}=Lt(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){const o=i?.call(this);n?.call(this,a),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Me}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;const e=It(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){const t=this.properties,s=[...Dt(t),...Ot(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Oe(i))}else e!==void 0&&t.push(Oe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Et(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:pe).toAttribute(t,s.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:pe;this._$Em=i;const o=a.fromAttribute(t,n.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,s,i=!1,n){if(e!==void 0){const a=this.constructor;if(i===!1&&(n=this[e]),s??=a.getPropertyOptions(e),!((s.hasChanged??at)(n,t)||s.useDefault&&s.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:n},a){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),n!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:a}=n,o=this[i];a!==!0||this._$AL.has(i)||o===void 0||this.C(i,void 0,n,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[Z("elementProperties")]=new Map,M[Z("finalized")]=new Map,Nt?.({ReactiveElement:M}),(re.reactiveElementVersions??=[]).push("2.1.2");/**
9
+ */const{is:Pt,defineProperty:Dt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Ot,getOwnPropertySymbols:Mt,getPrototypeOf:It}=Object,re=globalThis,Me=re.trustedTypes,Nt=Me?Me.emptyScript:"",qt=re.reactiveElementPolyfillSupport,K=(r,e)=>r,de={toAttribute(r,e){switch(e){case Boolean:r=r?Nt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},ot=(r,e)=>!Pt(r,e),Ie={attribute:!0,type:String,converter:de,reflect:!1,useDefault:!1,hasChanged:ot};Symbol.metadata??=Symbol("metadata"),re.litPropertyMetadata??=new WeakMap;let I=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Ie){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&Dt(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:n}=Lt(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){const o=i?.call(this);n?.call(this,a),this.requestUpdate(e,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Ie}static _$Ei(){if(this.hasOwnProperty(K("elementProperties")))return;const e=It(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(K("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(K("properties"))){const t=this.properties,s=[...Ot(t),...Mt(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(Oe(i))}else e!==void 0&&t.push(Oe(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return zt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:de).toAttribute(t,s.type);this._$Em=e,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:de;this._$Em=i;const o=a.fromAttribute(t,n.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,s,i=!1,n){if(e!==void 0){const a=this.constructor;if(i===!1&&(n=this[e]),s??=a.getPropertyOptions(e),!((s.hasChanged??ot)(n,t)||s.useDefault&&s.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:n},a){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),n!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:a}=n,o=this[i];a!==!0||this._$AL.has(i)||o===void 0||this.C(i,void 0,n,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};I.elementStyles=[],I.shadowRootOptions={mode:"open"},I[K("elementProperties")]=new Map,I[K("finalized")]=new Map,qt?.({ReactiveElement:I}),(re.reactiveElementVersions??=[]).push("2.1.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const ke=globalThis,Ne=r=>r,ee=ke.trustedTypes,qe=ee?ee.createPolicy("lit-html",{createHTML:r=>r}):void 0,ot="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,lt="?"+R,qt=`<${lt}>`,P=document,K=()=>P.createComment(""),Q=r=>r===null||typeof r!="object"&&typeof r!="function",ve=Array.isArray,Ut=r=>ve(r)||typeof r?.[Symbol.iterator]=="function",le=`[
14
- \f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ue=/-->/g,He=/>/g,C=RegExp(`>|${le}(?:([^\\s"'>=/]+)(${le}*=${le}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,Fe=/"/g,ct=/^(?:script|style|textarea|title)$/i,Ht=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),p=Ht(1),L=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),je=new WeakMap,z=P.createTreeWalker(P,129);function ht(r,e){if(!ve(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return qe!==void 0?qe.createHTML(e):e}const Bt=(r,e)=>{const t=r.length-1,s=[];let i,n=e===2?"<svg>":e===3?"<math>":"",a=B;for(let o=0;o<t;o++){const l=r[o];let c,d,h=-1,g=0;for(;g<l.length&&(a.lastIndex=g,d=a.exec(l),d!==null);)g=a.lastIndex,a===B?d[1]==="!--"?a=Ue:d[1]!==void 0?a=He:d[2]!==void 0?(ct.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=C):d[3]!==void 0&&(a=C):a===C?d[0]===">"?(a=i??B,h=-1):d[1]===void 0?h=-2:(h=a.lastIndex-d[2].length,c=d[1],a=d[3]===void 0?C:d[3]==='"'?Fe:Be):a===Fe||a===Be?a=C:a===Ue||a===He?a=B:(a=C,i=void 0);const k=a===C&&r[o+1].startsWith("/>")?" ":"";n+=a===B?l+qt:h>=0?(s.push(c),l.slice(0,h)+ot+l.slice(h)+R+k):l+R+(h===-2?o:k)}return[ht(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let de=class pt{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,a=0;const o=e.length-1,l=this.parts,[c,d]=Bt(e,t);if(this.el=pt.createElement(c,s),z.currentNode=this.el.content,t===2||t===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=z.nextNode())!==null&&l.length<o;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(ot)){const g=d[a++],k=i.getAttribute(h).split(R),b=/([.?@])?(.*)/.exec(g);l.push({type:1,index:n,name:b[2],strings:k,ctor:b[1]==="."?jt:b[1]==="?"?Zt:b[1]==="@"?Kt:ne}),i.removeAttribute(h)}else h.startsWith(R)&&(l.push({type:6,index:n}),i.removeAttribute(h));if(ct.test(i.tagName)){const h=i.textContent.split(R),g=h.length-1;if(g>0){i.textContent=ee?ee.emptyScript:"";for(let k=0;k<g;k++)i.append(h[k],K()),z.nextNode(),l.push({type:2,index:++n});i.append(h[g],K())}}}else if(i.nodeType===8)if(i.data===lt)l.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(R,h+1))!==-1;)l.push({type:7,index:n}),h+=R.length-1}n++}}static createElement(e,t){const s=P.createElement("template");return s.innerHTML=e,s}};function N(r,e,t=r,s){if(e===L)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const n=Q(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=N(r,i._$AS(r,e.values),i,s)),e}let Ft=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??P).importNode(t,!0);z.currentNode=i;let n=z.nextNode(),a=0,o=0,l=s[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new W(n,n.nextSibling,this,e):l.type===1?c=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(c=new Qt(n,this,e)),this._$AV.push(c),l=s[++o]}a!==l?.index&&(n=z.nextNode(),a++)}return z.currentNode=P,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class W{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=N(this,e,t),Q(e)?e===x||e==null||e===""?(this._$AH!==x&&this._$AR(),this._$AH=x):e!==this._$AH&&e!==L&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ut(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==x&&Q(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=de.createElement(ht(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new Ft(i,this),a=n.u(this.options);n.p(t),this.T(a),this._$AH=n}}_$AC(e){let t=je.get(e.strings);return t===void 0&&je.set(e.strings,t=new de(e)),t}k(e){ve(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new W(this.O(K()),this.O(K()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=Ne(e).nextSibling;Ne(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,n){this.type=1,this._$AH=x,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=x}_$AI(e,t=this,s,i){const n=this.strings;let a=!1;if(n===void 0)e=N(this,e,t,0),a=!Q(e)||e!==this._$AH&&e!==L,a&&(this._$AH=e);else{const o=e;let l,c;for(e=n[0],l=0;l<n.length-1;l++)c=N(this,o[s+l],t,l),c===L&&(c=this._$AH[l]),a||=!Q(c)||c!==this._$AH[l],c===x?e=x:e!==x&&(e+=(c??"")+n[l+1]),this._$AH[l]=c}a&&!i&&this.j(e)}j(e){e===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},jt=class extends ne{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===x?void 0:e}},Zt=class extends ne{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==x)}},Kt=class extends ne{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){if((e=N(this,e,t,0)??x)===L)return;const s=this._$AH,i=e===x&&s!==x||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==x&&(s===x||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Qt=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){N(this,e)}};const Vt=ke.litHtmlPolyfillSupport;Vt?.(de,W),(ke.litHtmlVersions??=[]).push("3.3.3");const Wt=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const n=t?.renderBefore??null;s._$litPart$=i=new W(e.insertBefore(K(),n),n,void 0,t??{})}return i._$AI(r),i};/**
13
+ */const ve=globalThis,Ne=r=>r,ee=ve.trustedTypes,qe=ee?ee.createPolicy("lit-html",{createHTML:r=>r}):void 0,lt="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,ct="?"+C,Ut=`<${ct}>`,P=document,Q=()=>P.createComment(""),V=r=>r===null||typeof r!="object"&&typeof r!="function",$e=Array.isArray,Ft=r=>$e(r)||typeof r?.[Symbol.iterator]=="function",ce=`[
14
+ \f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ue=/-->/g,Fe=/>/g,R=RegExp(`>|${ce}(?:([^\\s"'>=/]+)(${ce}*=${ce}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),He=/'/g,Be=/"/g,ht=/^(?:script|style|textarea|title)$/i,Ht=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),h=Ht(1),D=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),je=new WeakMap,z=P.createTreeWalker(P,129);function pt(r,e){if(!$e(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return qe!==void 0?qe.createHTML(e):e}const Bt=(r,e)=>{const t=r.length-1,s=[];let i,n=e===2?"<svg>":e===3?"<math>":"",a=B;for(let o=0;o<t;o++){const l=r[o];let c,d,p=-1,g=0;for(;g<l.length&&(a.lastIndex=g,d=a.exec(l),d!==null);)g=a.lastIndex,a===B?d[1]==="!--"?a=Ue:d[1]!==void 0?a=Fe:d[2]!==void 0?(ht.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=R):d[3]!==void 0&&(a=R):a===R?d[0]===">"?(a=i??B,p=-1):d[1]===void 0?p=-2:(p=a.lastIndex-d[2].length,c=d[1],a=d[3]===void 0?R:d[3]==='"'?Be:He):a===Be||a===He?a=R:a===Ue||a===Fe?a=B:(a=R,i=void 0);const k=a===R&&r[o+1].startsWith("/>")?" ":"";n+=a===B?l+Ut:p>=0?(s.push(c),l.slice(0,p)+lt+l.slice(p)+C+k):l+C+(p===-2?o:k)}return[pt(r,n+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};let ue=class dt{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,a=0;const o=e.length-1,l=this.parts,[c,d]=Bt(e,t);if(this.el=dt.createElement(c,s),z.currentNode=this.el.content,t===2||t===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=z.nextNode())!==null&&l.length<o;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(lt)){const g=d[a++],k=i.getAttribute(p).split(C),b=/([.?@])?(.*)/.exec(g);l.push({type:1,index:n,name:b[2],strings:k,ctor:b[1]==="."?Zt:b[1]==="?"?Kt:b[1]==="@"?Qt:ne}),i.removeAttribute(p)}else p.startsWith(C)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(ht.test(i.tagName)){const p=i.textContent.split(C),g=p.length-1;if(g>0){i.textContent=ee?ee.emptyScript:"";for(let k=0;k<g;k++)i.append(p[k],Q()),z.nextNode(),l.push({type:2,index:++n});i.append(p[g],Q())}}}else if(i.nodeType===8)if(i.data===ct)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(C,p+1))!==-1;)l.push({type:7,index:n}),p+=C.length-1}n++}}static createElement(e,t){const s=P.createElement("template");return s.innerHTML=e,s}};function N(r,e,t=r,s){if(e===D)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const n=V(e)?void 0:e._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=N(r,i._$AS(r,e.values),i,s)),e}let jt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??P).importNode(t,!0);z.currentNode=i;let n=z.nextNode(),a=0,o=0,l=s[0];for(;l!==void 0;){if(a===l.index){let c;l.type===2?c=new W(n,n.nextSibling,this,e):l.type===1?c=new l.ctor(n,l.name,l.strings,this,e):l.type===6&&(c=new Vt(n,this,e)),this._$AV.push(c),l=s[++o]}a!==l?.index&&(n=z.nextNode(),a++)}return z.currentNode=P,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}};class W{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=N(this,e,t),V(e)?e===x||e==null||e===""?(this._$AH!==x&&this._$AR(),this._$AH=x):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ft(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==x&&V(this._$AH)?this._$AA.nextSibling.data=e:this.T(P.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ue.createElement(pt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const n=new jt(i,this),a=n.u(this.options);n.p(t),this.T(a),this._$AH=n}}_$AC(e){let t=je.get(e.strings);return t===void 0&&je.set(e.strings,t=new ue(e)),t}k(e){$e(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new W(this.O(Q()),this.O(Q()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=Ne(e).nextSibling;Ne(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}let ne=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,n){this.type=1,this._$AH=x,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=x}_$AI(e,t=this,s,i){const n=this.strings;let a=!1;if(n===void 0)e=N(this,e,t,0),a=!V(e)||e!==this._$AH&&e!==D,a&&(this._$AH=e);else{const o=e;let l,c;for(e=n[0],l=0;l<n.length-1;l++)c=N(this,o[s+l],t,l),c===D&&(c=this._$AH[l]),a||=!V(c)||c!==this._$AH[l],c===x?e=x:e!==x&&(e+=(c??"")+n[l+1]),this._$AH[l]=c}a&&!i&&this.j(e)}j(e){e===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Zt=class extends ne{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===x?void 0:e}},Kt=class extends ne{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==x)}},Qt=class extends ne{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){if((e=N(this,e,t,0)??x)===D)return;const s=this._$AH,i=e===x&&s!==x||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,n=e!==x&&(s===x||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Vt=class{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){N(this,e)}};const Wt=ve.litHtmlPolyfillSupport;Wt?.(ue,W),(ve.litHtmlVersions??=[]).push("3.3.3");const Yt=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const n=t?.renderBefore??null;s._$litPart$=i=new W(e.insertBefore(Q(),n),n,void 0,t??{})}return i._$AI(r),i};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const $e=globalThis;let S=class extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Wt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return L}};S._$litElement$=!0,S.finalized=!0,$e.litElementHydrateSupport?.({LitElement:S});const Yt=$e.litElementPolyfillSupport;Yt?.({LitElement:S});($e.litElementVersions??=[]).push("4.2.2");var dt;let ce=0;const Ze=new Set;function Gt(r){ce++;try{r()}finally{ce--,ce===0&&Jt()}}function Jt(){const r=new Set(Ze);Ze.clear();for(const e of r)e()}function Xt(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function es(r){return r&&typeof r.deref=="function"}class ye{static#e=0;#t;#s;#i=new Set;#r=dt.#e++;name;constructor(e,t){this.#t=e,this.#s=e,this.name=t}_get(){return u.activeConsumer&&u.activeConsumer.track(this),this.#t}_set(e){return Xt(e,this.#t)?(this.#s=this.#t,this.#t=e,this._notify(),!0):!1}subscribe(e,t=!1){let s=e;return t&&(s=new WeakRef(e)),this.#i.add(s),()=>this.#i.delete(s)}_notify(){const e=[...this.#i];for(const t of e){let s;if(es(t)){if(s=t.deref(),!s){this.#i.delete(t);continue}}else s=t;s()}}get id(){return this.#r}get previousValue(){return this.#s}toString(){return this.name?`${this.constructor.name}(${this.name})`:`${this.constructor.name}#${this.id}`}}dt=ye;class u extends ye{static#e=[];constructor(e,t){super(e,t)}static get activeConsumer(){return this.#e[this.#e.length-1]}static push(e){this.#e.push(e)}static pop(){this.#e.pop()}get(){return this._get()}set(e){Gt(()=>{this._set(e)})}get value(){return this.get()}set value(e){this.set(e)}update(e){this.set(e(this.get()))}}class ts extends ye{#e;#t=!0;#s=!1;#i=new Map;_debugParent;#r;#h=()=>{this.#t||(this.#t=!0,this._notify())};constructor(e,t,s){super(void 0,t),this.#e=e,this.#r=s?.weak??!0}track(e){if(this.#i.has(e))return;const t=e.subscribe(this.#h,this.#r);this.#i.set(e,t)}dispose(){this.#o()}#o(){for(const e of this.#i.values())e();this.#i.clear()}get(){if(u.activeConsumer&&u.activeConsumer.track(this),!this.#t)return this._get();if(this.#s)throw new Error(`Cycle detected in ${this}
20
- ↳ while computing ${this._debugParent??"root"}`);this.#s=!0,this.#o(),u.push(this);try{const e=this.#e();this._set(e)}finally{u.pop(),this.#t=!1,this.#s=!1}return this._get()}get value(){return this.get()}set value(e){throw new Error(`Cannot set value of Computed ${this}. Computed values are read-only.`)}subscribe(e,t=!1){const s=super.subscribe(e,t);return u.activeConsumer||this.get(),s}}class we{#e;#t=new Map;_debugParent;constructor(e){this.#e=e,e.addController(this);const t=e,s=t.update,i=this;t.update=function(n){u.push(i);try{s.call(this,n)}finally{u.pop()}}}track(e){this.#t.has(e)||this.#t.set(e,e.subscribe(this.#s,!0))}#s=()=>{this.#e.requestUpdate()};hostUpdate(){for(const e of this.#t.values())e();this.#t.clear()}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}toString(){const e=this.#e;return`SignalWatcher(${e?.localName??e?.tagName??e?.constructor?.name??"unknown"})`}}const ss=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"});function is(r){if(!r)return"unknown age";const e=new Date(r);return Number.isNaN(e.getTime())?"unknown age":ss.format(e)}class rs extends S{static{this.properties={results:{attribute:!1},showRoot:{attribute:!1},onSelect:{attribute:!1},selectedIds:{attribute:!1},onToggleSelect:{attribute:!1}}}static{this.styles=V`
19
+ */const ye=globalThis;let S=class extends I{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Yt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return D}};S._$litElement$=!0,S.finalized=!0,ye.litElementHydrateSupport?.({LitElement:S});const Gt=ye.litElementPolyfillSupport;Gt?.({LitElement:S});(ye.litElementVersions??=[]).push("4.2.2");var ut;let he=0;const Ze=new Set;function Jt(r){he++;try{r()}finally{he--,he===0&&Xt()}}function Xt(){const r=new Set(Ze);Ze.clear();for(const e of r)e()}function es(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}function ts(r){return r&&typeof r.deref=="function"}class we{static#e=0;#t;#s;#r=new Set;#i=ut.#e++;name;constructor(e,t){this.#t=e,this.#s=e,this.name=t}_get(){return u.activeConsumer&&u.activeConsumer.track(this),this.#t}_set(e){return es(e,this.#t)?(this.#s=this.#t,this.#t=e,this._notify(),!0):!1}subscribe(e,t=!1){let s=e;return t&&(s=new WeakRef(e)),this.#r.add(s),()=>this.#r.delete(s)}_notify(){const e=[...this.#r];for(const t of e){let s;if(ts(t)){if(s=t.deref(),!s){this.#r.delete(t);continue}}else s=t;s()}}get id(){return this.#i}get previousValue(){return this.#s}toString(){return this.name?`${this.constructor.name}(${this.name})`:`${this.constructor.name}#${this.id}`}}ut=we;class u extends we{static#e=[];constructor(e,t){super(e,t)}static get activeConsumer(){return this.#e[this.#e.length-1]}static push(e){this.#e.push(e)}static pop(){this.#e.pop()}get(){return this._get()}set(e){Jt(()=>{this._set(e)})}get value(){return this.get()}set value(e){this.set(e)}update(e){this.set(e(this.get()))}}class ss extends we{#e;#t=!0;#s=!1;#r=new Map;_debugParent;#i;#d=()=>{this.#t||(this.#t=!0,this._notify())};constructor(e,t,s){super(void 0,t),this.#e=e,this.#i=s?.weak??!0}track(e){if(this.#r.has(e))return;const t=e.subscribe(this.#d,this.#i);this.#r.set(e,t)}dispose(){this.#a()}#a(){for(const e of this.#r.values())e();this.#r.clear()}get(){if(u.activeConsumer&&u.activeConsumer.track(this),!this.#t)return this._get();if(this.#s)throw new Error(`Cycle detected in ${this}
20
+ ↳ while computing ${this._debugParent??"root"}`);this.#s=!0,this.#a(),u.push(this);try{const e=this.#e();this._set(e)}finally{u.pop(),this.#t=!1,this.#s=!1}return this._get()}get value(){return this.get()}set value(e){throw new Error(`Cannot set value of Computed ${this}. Computed values are read-only.`)}subscribe(e,t=!1){const s=super.subscribe(e,t);return u.activeConsumer||this.get(),s}}class ae{#e;#t=new Map;_debugParent;constructor(e){this.#e=e,e.addController(this);const t=e,s=t.update,i=this;t.update=function(n){u.push(i);try{s.call(this,n)}finally{u.pop()}}}track(e){this.#t.has(e)||this.#t.set(e,e.subscribe(this.#s,!0))}#s=()=>{this.#e.requestUpdate()};hostUpdate(){for(const e of this.#t.values())e();this.#t.clear()}hostDisconnected(){for(const e of this.#t.values())e();this.#t.clear()}toString(){const e=this.#e;return`SignalWatcher(${e?.localName??e?.tagName??e?.constructor?.name??"unknown"})`}}const is=new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"});function rs(r){if(!r)return"unknown age";const e=new Date(r);return Number.isNaN(e.getTime())?"unknown age":is.format(e)}class ns extends S{static{this.properties={results:{attribute:!1},showRoot:{attribute:!1},onSelect:{attribute:!1},selectedIds:{attribute:!1},onToggleSelect:{attribute:!1}}}static{this.styles=q`
21
21
  :host { display: block; }
22
22
  .count-header {
23
23
  padding: 8px 14px;
@@ -55,9 +55,9 @@
55
55
  color: var(--accent); background: var(--accent-tint); border-radius: 4px; padding: 0 4px;
56
56
  }
57
57
  .empty { padding: 24px; opacity: 0.6; font-size: 13px; }
58
- `}render(){return!this.results||this.results.length===0?p`<div class="empty">No results.</div>`:p`
58
+ `}render(){return!this.results||this.results.length===0?h`<div class="empty">No results.</div>`:h`
59
59
  <div class="count-header">${this.results.length} result${this.results.length===1?"":"s"}</div>
60
- ${this.results.map(e=>{const t=e._table==="skills"&&e.root==="builtin";return p`
60
+ ${this.results.map(e=>{const t=e._table==="skills"&&e.root==="builtin";return h`
61
61
  <div class="row ${e.deprecated?"deprecated":""} ${e.paused?"paused":""}" @click=${()=>this.onSelect(e)}>
62
62
  <input
63
63
  type="checkbox"
@@ -70,25 +70,25 @@
70
70
  <div class="row-body">
71
71
  <div class="top">
72
72
  <span class="name">${e.name}</span>
73
- <span class="meta">${is(e.created_at)} · ${e.owner??"—"} · ${e.status}</span>
73
+ <span class="meta">${rs(e.created_at)} · ${e.owner??"—"} · ${e.status}</span>
74
74
  </div>
75
75
  <div class="desc">${e.description}</div>
76
76
  <div class="tags">
77
77
  <span class="type-badge">${e._table==="skills"?"skill":"memory"}</span>
78
- ${this.showRoot&&e.root?p`<span class="root-badge">${e.root}</span>`:""}
79
- ${e.deprecated?p`<span class="deprecated-badge">deprecated</span>`:""}
80
- ${e.paused?p`<span class="paused-badge">paused</span>`:""}
81
- ${e.tags.map(s=>p`<span class="tag">${s}</span>`)}
78
+ ${this.showRoot&&e.root?h`<span class="root-badge">${e.root}</span>`:""}
79
+ ${e.deprecated?h`<span class="deprecated-badge">deprecated</span>`:""}
80
+ ${e.paused?h`<span class="paused-badge">paused</span>`:""}
81
+ ${e.tags.map(s=>h`<span class="tag">${s}</span>`)}
82
82
  </div>
83
83
  </div>
84
84
  </div>
85
85
  `})}
86
- `}}customElements.define("result-list",rs);function _e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=_e();function ut(r){O=r}var E={exec:()=>null};function I(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),i=e[s];return i||(i=r(s),e[s]=i),i}}function f(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(i,n)=>{let a=typeof n=="string"?n:n.source;return a=a.replace(v.caret,"$1"),t=t.replace(i,a),s},getRegex:()=>new RegExp(t,e)};return s}var ns=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),v={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:I(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:I(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:I(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:I(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:I(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:I(r=>new RegExp(`^ {0,${r}}>`))},as=/^(?:[ \t]*(?:\n|$))+/,os=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ls=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Se=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ft=f(gt).replace(/bull/g,Se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),hs=f(gt).replace(/bull/g,Se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ae=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ps=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ds=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),us=f(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Se).getRegex(),ae="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Re=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gs=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Re).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bt=r=>f(Ae).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),fs=bt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),bs=bt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),xs=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bs).getRegex(),Ce={blockquote:xs,code:os,def:ds,fences:ls,heading:cs,hr:Y,html:gs,lheading:ft,list:us,newline:as,paragraph:fs,table:E,text:ps},Ke=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex(),ms={...Ce,lheading:hs,table:Ke,paragraph:f(Ae).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ke).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ae).getRegex()},ks={...Ce,html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Re).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(Ae).replace("hr",Y).replace("heading",` *#{1,6} *[^
87
- ]`).replace("lheading",ft).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vs=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$s=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xt=/^( {2,}|\\)\n(?!\s*$)/,ys=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,A=/[\p{P}\p{S}]/u,q=/[\s\p{P}\p{S}]/u,G=/[^\s\p{P}\p{S}]/u,ws=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,q).getRegex(),_s=/[\p{Pi}\p{Ps}"']/u,mt=/(?!~)[\p{P}\p{S}]/u,Ss=/(?!~)[\s\p{P}\p{S}]/u,As=/(?:[^\s\p{P}\p{S}]|~)/u,Ts=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ns?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),kt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Rs=f(kt,"u").replace(/punct/g,A).getRegex(),Cs=f(kt,"u").replace(/punct/g,mt).getRegex(),Es=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,zs=f(Es,"u").replace(/openQuote/g,_s).replace(/punct/g,A).getRegex(),vt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ps=f(vt,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,q).replace(/punct/g,A).getRegex(),Ls=f(vt,"gu").replace(/notPunctSpace/g,As).replace(/punctSpace/g,Ss).replace(/punct/g,mt).getRegex(),Ds="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Os=f(Ds,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,q).replace(/punct/g,A).getRegex(),Is=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,q).replace(/punct/g,A).getRegex(),Ms="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Ns=f(Ms,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,q).replace(/punct/g,A).getRegex(),qs=f(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,A).getRegex(),Us="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Hs=f(Us,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,q).replace(/punct/g,A).getRegex(),Bs=f(/\\(punct)/,"gu").replace(/punct/g,A).getRegex(),Fs=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),js=f(Re).replace("(?:-->|$)","-->").getRegex(),Zs=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",js).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ks=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$t=f(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),yt=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Qs=f("reflink|nolink(?!\\()","g").replace("reflink",$t).replace("nolink",yt).getRegex(),Qe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ee={_backpedal:E,anyPunctuation:Bs,autolink:Fs,blockSkip:Ts,br:xt,code:$s,del:E,delLDelim:E,delRDelim:E,emStrongLDelim:Rs,emStrongRDelimAst:Ps,emStrongRDelimUnd:Is,escape:vs,link:Ks,nolink:yt,punctuation:ws,reflink:$t,reflinkSearch:Qs,tag:Zs,text:ys,url:E},Vs={...Ee,emStrongLDelim:zs,emStrongRDelimAst:Os,emStrongRDelimUnd:Ns,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},ue={...Ee,emStrongRDelimAst:Ls,emStrongLDelim:Cs,delLDelim:qs,delRDelim:Hs,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qe).getRegex()},Ws={...ue,br:f(xt).replace("{2,}","*").getRegex(),text:f(ue.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J={normal:Ce,gfm:ms,pedantic:ks},F={normal:Ee,gfm:ue,breaks:Ws,pedantic:Vs},Ys={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ve=r=>Ys[r];function _(r,e){if(e){if(v.escapeTest.test(r))return r.replace(v.escapeReplace,Ve)}else if(v.escapeTestNoEncode.test(r))return r.replace(v.escapeReplaceNoEncode,Ve);return r}function We(r){try{r=encodeURI(r).replace(v.percentDecode,"%")}catch{return null}return r}function Ye(r,e){let t=r.replace(v.findPipe,(n,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),s=t.split(v.splitPipe),i=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;i<s.length;i++)s[i]=s[i].trim().replace(v.slashPipe,"|");return s}function T(r,e,t){let s=r.length;if(s===0)return"";let i=0;for(;i<s&&r.charAt(s-i-1)===e;)i++;return r.slice(0,s-i)}function Ge(r){let e=r.split(`
86
+ `}}customElements.define("result-list",ns);function _e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=_e();function gt(r){O=r}var E={exec:()=>null};function M(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),i=e[s];return i||(i=r(s),e[s]=i),i}}function f(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(i,n)=>{let a=typeof n=="string"?n:n.source;return a=a.replace(v.caret,"$1"),t=t.replace(i,a),s},getRegex:()=>new RegExp(t,e)};return s}var as=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),v={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:M(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:M(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:M(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:M(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:M(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:M(r=>new RegExp(`^ {0,${r}}>`))},os=/^(?:[ \t]*(?:\n|$))+/,ls=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cs=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hs=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Se=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ft=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bt=f(ft).replace(/bull/g,Se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ps=f(ft).replace(/bull/g,Se).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ae=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ds=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,us=f(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),gs=f(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Se).getRegex(),oe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ce=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fs=f("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ce).replace("tag",oe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xt=r=>f(Ae).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe).getRegex(),bs=xt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),xs=xt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),ms=f(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",xs).getRegex(),Re={blockquote:ms,code:ls,def:us,fences:cs,heading:hs,hr:Y,html:fs,lheading:bt,list:gs,newline:os,paragraph:bs,table:E,text:ds},Ke=f("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe).getRegex(),ks={...Re,lheading:ps,table:Ke,paragraph:f(Ae).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ke).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",oe).getRegex()},vs={...Re,html:f(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:f(Ae).replace("hr",Y).replace("heading",` *#{1,6} *[^
87
+ ]`).replace("lheading",bt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$s=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ys=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,mt=/^( {2,}|\\)\n(?!\s*$)/,ws=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,A=/[\p{P}\p{S}]/u,U=/[\s\p{P}\p{S}]/u,G=/[^\s\p{P}\p{S}]/u,_s=f(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,U).getRegex(),Ss=/[\p{Pi}\p{Ps}"']/u,kt=/(?!~)[\p{P}\p{S}]/u,As=/(?!~)[\s\p{P}\p{S}]/u,Ts=/(?:[^\s\p{P}\p{S}]|~)/u,Cs=f(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",as?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),vt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Rs=f(vt,"u").replace(/punct/g,A).getRegex(),Es=f(vt,"u").replace(/punct/g,kt).getRegex(),zs=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ps=f(zs,"u").replace(/openQuote/g,Ss).replace(/punct/g,A).getRegex(),$t="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ds=f($t,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Ls=f($t,"gu").replace(/notPunctSpace/g,Ts).replace(/punctSpace/g,As).replace(/punct/g,kt).getRegex(),Os="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Ms=f(Os,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Is=f("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Ns="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",qs=f(Ns,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Us=f(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,A).getRegex(),Fs="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Hs=f(Fs,"gu").replace(/notPunctSpace/g,G).replace(/punctSpace/g,U).replace(/punct/g,A).getRegex(),Bs=f(/\\(punct)/,"gu").replace(/punct/g,A).getRegex(),js=f(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Zs=f(Ce).replace("(?:-->|$)","-->").getRegex(),Ks=f("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Zs).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Qs=f(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),yt=f(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),wt=f(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Vs=f("reflink|nolink(?!\\()","g").replace("reflink",yt).replace("nolink",wt).getRegex(),Qe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ee={_backpedal:E,anyPunctuation:Bs,autolink:js,blockSkip:Cs,br:mt,code:ys,del:E,delLDelim:E,delRDelim:E,emStrongLDelim:Rs,emStrongRDelimAst:Ds,emStrongRDelimUnd:Is,escape:$s,link:Qs,nolink:wt,punctuation:_s,reflink:yt,reflinkSearch:Vs,tag:Ks,text:ws,url:E},Ws={...Ee,emStrongLDelim:Ps,emStrongRDelimAst:Ms,emStrongRDelimUnd:qs,link:f(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:f(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},ge={...Ee,emStrongRDelimAst:Ls,emStrongLDelim:Es,delLDelim:Us,delRDelim:Hs,url:f(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:f(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qe).getRegex()},Ys={...ge,br:f(mt).replace("{2,}","*").getRegex(),text:f(ge.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},J={normal:Re,gfm:ks,pedantic:vs},j={normal:Ee,gfm:ge,breaks:Ys,pedantic:Ws},Gs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ve=r=>Gs[r];function _(r,e){if(e){if(v.escapeTest.test(r))return r.replace(v.escapeReplace,Ve)}else if(v.escapeTestNoEncode.test(r))return r.replace(v.escapeReplaceNoEncode,Ve);return r}function We(r){try{r=encodeURI(r).replace(v.percentDecode,"%")}catch{return null}return r}function Ye(r,e){let t=r.replace(v.findPipe,(n,a,o)=>{let l=!1,c=a;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),s=t.split(v.splitPipe),i=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;i<s.length;i++)s[i]=s[i].trim().replace(v.slashPipe,"|");return s}function T(r,e,t){let s=r.length;if(s===0)return"";let i=0;for(;i<s&&r.charAt(s-i-1)===e;)i++;return r.slice(0,s-i)}function Ge(r){let e=r.split(`
88
88
  `),t=e.length-1;for(;t>=0&&v.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
89
- `)}function Gs(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Js(r,e=0){let t=e,s="";for(let i of r)if(i===" "){let n=4-t%4;s+=" ".repeat(n),t+=n}else s+=i,t++;return s}function Je(r,e,t,s,i){let n=e.href,a=e.title||null,o=r[1].replace(i.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:a,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,l}function Xs(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let i=s[1];return e.split(`
89
+ `)}function Js(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Xs(r,e=0){let t=e,s="";for(let i of r)if(i===" "){let n=4-t%4;s+=" ".repeat(n),t+=n}else s+=i,t++;return s}function Je(r,e,t,s,i){let n=e.href,a=e.title||null,o=r[1].replace(i.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:n,title:a,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,l}function ei(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let i=s[1];return e.split(`
90
90
  `).map(n=>{let a=n.match(t.other.beginningSpace);if(a===null)return n;let[o]=a;return o.length>=i.length?n.slice(i.length):n}).join(`
91
- `)}var se=class{options;rules;lexer;constructor(r){this.options=r||O}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Ge(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=Xs(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=T(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:T(e[0],`
91
+ `)}var se=class{options;rules;lexer;constructor(r){this.options=r||O}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Ge(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ei(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=T(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:T(e[0],`
92
92
  `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:T(e[0],`
93
93
  `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=T(e[0],`
94
94
  `).split(`
@@ -96,25 +96,25 @@
96
96
  `),d=c.replace(this.rules.other.blockquoteSetextReplace,`
97
97
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
98
98
  ${c}`:c,i=i?`${i}
99
- ${d}`:d;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=h,t.length===0)break;let g=n.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let k=g,b=t.join(`
99
+ ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=p,t.length===0)break;let g=n.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let k=g,b=t.join(`
100
100
  `),w=k.raw+`
101
- `+b.replace(this.rules.other.blockquoteSetextReplace2,""),U=this.blockquote(w);n[n.length-1]=U,s=`${s}
102
- ${b}`,i=i.substring(0,i.length-k.text.length)+U.text;break}else if(g?.type==="list"){let k=g,b=k.raw+`
101
+ `+b.replace(this.rules.other.blockquoteSetextReplace2,""),F=this.blockquote(w);n[n.length-1]=F,s=`${s}
102
+ ${b}`,i=i.substring(0,i.length-k.text.length)+F.text;break}else if(g?.type==="list"){let k=g,b=k.raw+`
103
103
  `+t.join(`
104
104
  `),w=this.list(b);n[n.length-1]=w,s=s.substring(0,s.length-g.raw.length)+w.raw,i=i.substring(0,i.length-k.raw.length)+w.raw,t=b.substring(n.at(-1).raw.length).split(`
105
- `);continue}}return{type:"blockquote",raw:s,tokens:n,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,i={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let n=this.rules.other.listItemRegex(t),a=!1;for(;r;){let l=!1,c="",d="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;c=e[0],r=r.substring(c.length);let h=Js(e[2].split(`
105
+ `);continue}}return{type:"blockquote",raw:s,tokens:n,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,i={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let n=this.rules.other.listItemRegex(t),a=!1;for(;r;){let l=!1,c="",d="";if(!(e=n.exec(r))||this.rules.block.hr.test(r))break;c=e[0],r=r.substring(c.length);let p=Xs(e[2].split(`
106
106
  `,1)[0],e[1].length),g=r.split(`
107
- `,1)[0],k=!h.trim(),b=0;if(this.options.pedantic?(b=2,d=h.trimStart()):k?b=e[1].length+1:(b=h.search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=h.slice(b),b+=e[1].length),k&&this.rules.other.blankLine.test(g)&&(c+=g+`
108
- `,r=r.substring(g.length+1),l=!0),!l){let w=this.rules.other.nextBulletRegex(b),U=this.rules.other.hrRegex(b),Pe=this.rules.other.fencesBeginRegex(b),Le=this.rules.other.headingBeginRegex(b),Tt=this.rules.other.htmlBeginRegex(b),Rt=this.rules.other.blockquoteBeginRegex(b);for(;r;){let oe=r.split(`
109
- `,1)[0],H;if(g=oe,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),H=g):H=g.replace(this.rules.other.tabCharGlobal," "),Pe.test(g)||Le.test(g)||Tt.test(g)||Rt.test(g)||w.test(g)||U.test(g))break;if(H.search(this.rules.other.nonSpaceChar)>=b||!g.trim())d+=`
110
- `+H.slice(b);else{if(k||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Pe.test(h)||Le.test(h)||U.test(h))break;d+=`
111
- `+g}k=!g.trim(),c+=oe+`
112
- `,r=r.substring(oe.length+1),h=H.slice(b)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=c}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!i.loose){let c=l.tokens.filter(h=>h.type==="space"),d=c.length>0&&c.some(h=>this.rules.other.anyLine.test(h.raw));i.loose=d}for(let l of i.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let h={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=h.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=h.raw+l.tokens[0].raw,l.tokens[0].text=h.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(h)):l.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):l.tokens.unshift(h)}}else l.task&&(l.task=!1)}if(i.loose)for(let l of i.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Ge(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:T(e[0],`
107
+ `,1)[0],k=!p.trim(),b=0;if(this.options.pedantic?(b=2,d=p.trimStart()):k?b=e[1].length+1:(b=p.search(this.rules.other.nonSpaceChar),b=b>4?1:b,d=p.slice(b),b+=e[1].length),k&&this.rules.other.blankLine.test(g)&&(c+=g+`
108
+ `,r=r.substring(g.length+1),l=!0),!l){let w=this.rules.other.nextBulletRegex(b),F=this.rules.other.hrRegex(b),Pe=this.rules.other.fencesBeginRegex(b),De=this.rules.other.headingBeginRegex(b),Ct=this.rules.other.htmlBeginRegex(b),Rt=this.rules.other.blockquoteBeginRegex(b);for(;r;){let le=r.split(`
109
+ `,1)[0],H;if(g=le,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),H=g):H=g.replace(this.rules.other.tabCharGlobal," "),Pe.test(g)||De.test(g)||Ct.test(g)||Rt.test(g)||w.test(g)||F.test(g))break;if(H.search(this.rules.other.nonSpaceChar)>=b||!g.trim())d+=`
110
+ `+H.slice(b);else{if(k||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Pe.test(p)||De.test(p)||F.test(p))break;d+=`
111
+ `+g}k=!g.trim(),c+=le+`
112
+ `,r=r.substring(le.length+1),p=H.slice(b)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0)),i.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),i.raw+=c}let o=i.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l of i.items)if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),!i.loose){let c=l.tokens.filter(p=>p.type==="space"),d=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=d}for(let l of i.items){let c=l.tokens[0];if(l.task&&(c?.type==="text"||c?.type==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=p.checked,i.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1)}if(i.loose)for(let l of i.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return i}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Ge(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:T(e[0],`
113
113
  `),href:s,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Ye(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
114
114
  `):[],n={type:"table",raw:T(e[0],`
115
115
  `),header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?n.align.push("right"):this.rules.other.tableAlignCenter.test(a)?n.align.push("center"):this.rules.other.tableAlignLeft.test(a)?n.align.push("left"):n.align.push(null);for(let a=0;a<t.length;a++)n.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:n.align[a]});for(let a of i)n.rows.push(Ye(a,n.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:n.align[l]})));return n}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:T(e[0],`
116
116
  `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
117
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=T(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=Gs(e[2],"()");if(n===-2)return;if(n>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Je(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return Je(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,a,o=i,l=0,c=s[0][0],d=t===c,h=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+i);(s=h.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(a=[...n].length,s[3]||s[4]){o+=a;continue}else if(s[5]||s[6]){if(i%3&&!((i+a)%3)){l+=a;continue}if(d)break}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let g=[...s[0]][0].length,k=r.slice(0,i+s.index+g+a);if(Math.min(i,a)%2){let w=k.slice(1,-1);return{type:"em",raw:k,text:w,tokens:this.lexer.inlineTokens(w)}}let b=k.slice(2,-2);return{type:"strong",raw:k,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(s=l.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n||(a=[...n].length,a!==i))continue;if(s[3]||s[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let c=[...s[0]][0].length,d=r.slice(0,i+s.index+c+a),h=d.slice(i,-i);return{type:"del",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$=class ge{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||O,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:v,block:J.normal,inline:F.normal};this.options.pedantic?(t.block=J.pedantic,t.inline=F.pedantic):this.options.gfm&&(t.block=J.gfm,this.options.breaks?t.inline=F.breaks:t.inline=F.gfm),this.tokenizer.rules=t}static get rules(){return{block:J,inline:F}}static lex(e,t){return new ge(t).lex(e)}static lexInline(e,t){return new ge(t).inlineTokens(e)}lex(e){e=e.replace(v.carriageReturn,`
117
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let n=T(t.slice(0,-1),"\\");if((t.length-n.length)%2===0)return}else{let n=Js(e[2],"()");if(n===-2)return;if(n>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+n;e[2]=e[2].substring(0,n),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],i="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],i=n[3])}else i=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Je(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[s.toLowerCase()];if(!i){let n=t[0].charAt(0);return{type:"text",raw:n,text:n}}return Je(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,a,o=i,l=0,c=s[0][0],d=t===c,p=c==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*r.length+i);(s=p.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(a=[...n].length,s[3]||s[4]){o+=a;continue}else if(s[5]||s[6]){if(i%3&&!((i+a)%3)){l+=a;continue}if(d)break}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let g=[...s[0]][0].length,k=r.slice(0,i+s.index+g+a);if(Math.min(i,a)%2){let w=k.slice(1,-1);return{type:"em",raw:k,text:w,tokens:this.lexer.inlineTokens(w)}}let b=k.slice(2,-2);return{type:"strong",raw:k,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...s[0]].length-1,n,a,o=i,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*r.length+i);(s=l.exec(e))!==null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n||(a=[...n].length,a!==i))continue;if(s[3]||s[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let c=[...s[0]][0].length,d=r.slice(0,i+s.index+c+a),p=d.slice(i,-i);return{type:"del",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$=class fe{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||O,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:v,block:J.normal,inline:j.normal};this.options.pedantic?(t.block=J.pedantic,t.inline=j.pedantic):this.options.gfm&&(t.block=J.gfm,this.options.breaks?t.inline=j.breaks:t.inline=j.gfm),this.tokenizer.rules=t}static get rules(){return{block:J,inline:j}}static lex(e,t){return new fe(t).lex(e)}static lexInline(e,t){return new fe(t).inlineTokens(e)}lex(e){e=e.replace(v.carriageReturn,`
118
118
  `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(v.tabCharGlobal," ").replace(v.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},e,t))?(e=e.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(e)){e=e.substring(n.raw.length);let o=t.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
119
119
  `:t.push(n);continue}if(n=this.tokenizer.code(e)){e=e.substring(n.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
120
120
  `)?"":`
@@ -128,7 +128,7 @@ ${b}`,i=i.substring(0,i.length-k.text.length)+U.text;break}else if(g?.type==="li
128
128
  `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n),s=a.length!==e.length,e=e.substring(n.raw.length);continue}if(n=this.tokenizer.text(e)){e=e.substring(n.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
129
129
  `)?"":`
130
130
  `)+n.raw,o.text+=`
131
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e;if(this.tokens.links){let o=Object.keys(this.tokens.links);o.length>0&&(s=s.replace(this.tokenizer.rules.inline.reflinkSearch,l=>o.includes(l.slice(l.lastIndexOf("[")+1,-1))?"["+"a".repeat(l.length-2)+"]":l))}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,o=>"+".repeat(o.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(o,l,c)=>{let d=c?c.length:0;return o.slice(0,d)+"["+"a".repeat(o.length-d-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,n="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(n=""),i=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=t.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,s,n)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,s,n)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),h;this.options.extensions.startInline.forEach(g=>{h=g.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(n=o.raw.slice(-1)),i=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},ie=class{options;parser;constructor(r){this.options=r||O}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(v.notSpaceStart)?.[0],i=r.replace(v.endingNewline,"")+`
131
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e;if(this.tokens.links){let o=Object.keys(this.tokens.links);o.length>0&&(s=s.replace(this.tokenizer.rules.inline.reflinkSearch,l=>o.includes(l.slice(l.lastIndexOf("[")+1,-1))?"["+"a".repeat(l.length-2)+"]":l))}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,o=>"+".repeat(o.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(o,l,c)=>{let d=c?c.length:0;return o.slice(0,d)+"["+"a".repeat(o.length-d-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,n="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(n=""),i=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=t.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,s,n)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,s,n)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let l=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),p;this.options.extensions.startInline.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(n=o.raw.slice(-1)),i=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},ie=class{options;parser;constructor(r){this.options=r||O}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(v.notSpaceStart)?.[0],i=r.replace(v.endingNewline,"")+`
132
132
  `;return s?'<pre><code class="language-'+_(s)+'">'+(t?i:_(i,!0))+`</code></pre>
133
133
  `:"<pre><code>"+(t?i:_(i,!0))+`</code></pre>
134
134
  `}blockquote({tokens:r}){return`<blockquote>
@@ -146,16 +146,16 @@ ${this.parser.parse(r)}</blockquote>
146
146
  `}tablerow({text:r}){return`<tr>
147
147
  ${r}</tr>
148
148
  `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
149
- `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${_(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),i=We(r);if(i===null)return s;r=i;let n='<a href="'+r+'"';return e&&(n+=' title="'+_(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let i=We(r);if(i===null)return _(t);r=i;let n=`<img src="${r}" alt="${_(t)}"`;return e&&(n+=` title="${_(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:_(r.text)}},ze=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},y=class fe{options;renderer;textRenderer;constructor(e){this.options=e||O,this.options.renderer=this.options.renderer||new ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ze}static parse(e,t){return new fe(t).parse(e)}static parseInline(e,t){return new fe(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let i=e[s];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=o||"";continue}}let n=i;switch(n.type){case"space":{t+=this.renderer.space(n);break}case"hr":{t+=this.renderer.hr(n);break}case"heading":{t+=this.renderer.heading(n);break}case"code":{t+=this.renderer.code(n);break}case"table":{t+=this.renderer.table(n);break}case"blockquote":{t+=this.renderer.blockquote(n);break}case"list":{t+=this.renderer.list(n);break}case"checkbox":{t+=this.renderer.checkbox(n);break}case"html":{t+=this.renderer.html(n);break}case"def":{t+=this.renderer.def(n);break}case"paragraph":{t+=this.renderer.paragraph(n);break}case"text":{t+=this.renderer.text(n);break}default:{let a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){s+=o||"";continue}}let a=n;switch(a.type){case"escape":{s+=t.text(a);break}case"html":{s+=t.html(a);break}case"link":{s+=t.link(a);break}case"image":{s+=t.image(a);break}case"checkbox":{s+=t.checkbox(a);break}case"strong":{s+=t.strong(a);break}case"em":{s+=t.em(a);break}case"codespan":{s+=t.codespan(a);break}case"br":{s+=t.br(a);break}case"del":{s+=t.del(a);break}case"text":{s+=t.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},j=class{options;block;constructor(r){this.options=r||O}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?$.lex:$.lexInline}provideParser(r=this.block){return r?y.parse:y.parseInline}},ei=class{defaults=_e();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=ie;TextRenderer=ze;Lexer=$;Tokenizer=se;Hooks=j;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let i=s;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let a of n)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=s;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let a=i[n].flat(1/0);t=t.concat(this.walkTokens(a,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=n.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),s.extensions=e),t.renderer){let i=this.defaults.renderer||new ie(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let a=n,o=t.renderer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d||""}}s.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new se(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,o=t.tokenizer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new j;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let a=n,o=t.hooks[a],l=i[a];j.passThroughHooks.has(n)?i[a]=c=>{if(this.defaults.async&&j.passThroughHooksRespectAsync.has(n))return(async()=>{let h=await o.call(i,c);return l.call(i,h)})();let d=o.call(i,c);return l.call(i,d)}:i[a]=(...c)=>{if(this.defaults.async)return(async()=>{let h=await o.apply(i,c);return h===!1&&(h=await l.apply(i,c)),h})();let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;s.walkTokens=function(a){let o=[];return o.push(n.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return $.lex(r,e??this.defaults)}parser(r,e){return y.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},i={...this.defaults,...s},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(r):r?$.lex:$.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser(r):r?y.parse:y.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(r):r?$.lex:$.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(r):r?y.parse:y.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return n(a)}}}onError(r,e){return t=>{if(t.message+=`
150
- Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+_(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},D=new ei;function m(r,e){return D.parse(r,e)}m.options=m.setOptions=function(r){return D.setOptions(r),m.defaults=D.defaults,ut(m.defaults),m};m.getDefaults=_e;m.defaults=O;function ti(...r){return D.use(...r),m.defaults=D.defaults,ut(m.defaults),m}m.use=ti;m.walkTokens=function(r,e){return D.walkTokens(r,e)};m.parseInline=D.parseInline;m.Parser=y;m.parser=y.parse;m.Renderer=ie;m.TextRenderer=ze;m.Lexer=$;m.lexer=$.lex;m.Tokenizer=se;m.Hooks=j;m.parse=m;m.options;m.setOptions;m.walkTokens;m.parseInline;y.parse;$.lex;/**
149
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${_(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),i=We(r);if(i===null)return s;r=i;let n='<a href="'+r+'"';return e&&(n+=' title="'+_(e)+'"'),n+=">"+s+"</a>",n}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let i=We(r);if(i===null)return _(t);r=i;let n=`<img src="${r}" alt="${_(t)}"`;return e&&(n+=` title="${_(e)}"`),n+=">",n}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:_(r.text)}},ze=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},y=class be{options;renderer;textRenderer;constructor(e){this.options=e||O,this.options.renderer=this.options.renderer||new ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ze}static parse(e,t){return new be(t).parse(e)}static parseInline(e,t){return new be(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let i=e[s];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=o||"";continue}}let n=i;switch(n.type){case"space":{t+=this.renderer.space(n);break}case"hr":{t+=this.renderer.hr(n);break}case"heading":{t+=this.renderer.heading(n);break}case"code":{t+=this.renderer.code(n);break}case"table":{t+=this.renderer.table(n);break}case"blockquote":{t+=this.renderer.blockquote(n);break}case"list":{t+=this.renderer.list(n);break}case"checkbox":{t+=this.renderer.checkbox(n);break}case"html":{t+=this.renderer.html(n);break}case"def":{t+=this.renderer.def(n);break}case"paragraph":{t+=this.renderer.paragraph(n);break}case"text":{t+=this.renderer.text(n);break}default:{let a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let o=this.options.extensions.renderers[n.type].call({parser:this},n);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(n.type)){s+=o||"";continue}}let a=n;switch(a.type){case"escape":{s+=t.text(a);break}case"html":{s+=t.html(a);break}case"link":{s+=t.link(a);break}case"image":{s+=t.image(a);break}case"checkbox":{s+=t.checkbox(a);break}case"strong":{s+=t.strong(a);break}case"em":{s+=t.em(a);break}case"codespan":{s+=t.codespan(a);break}case"br":{s+=t.br(a);break}case"del":{s+=t.del(a);break}case"text":{s+=t.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},Z=class{options;block;constructor(r){this.options=r||O}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?$.lex:$.lexInline}provideParser(r=this.block){return r?y.parse:y.parseInline}},ti=class{defaults=_e();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=y;Renderer=ie;TextRenderer=ze;Lexer=$;Tokenizer=se;Hooks=Z;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let i=s;for(let n of i.header)t=t.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let a of n)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let i=s;t=t.concat(this.walkTokens(i.items,e));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let a=i[n].flat(1/0);t=t.concat(this.walkTokens(a,e))}):i.tokens&&(t=t.concat(this.walkTokens(i.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let n=e.renderers[i.name];n?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=n.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=e[i.level];n?n.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),s.extensions=e),t.renderer){let i=this.defaults.renderer||new ie(this.defaults);for(let n in t.renderer){if(!(n in i))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let a=n,o=t.renderer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d||""}}s.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new se(this.defaults);for(let n in t.tokenizer){if(!(n in i))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let a=n,o=t.tokenizer[a],l=i[a];i[a]=(...c)=>{let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new Z;for(let n in t.hooks){if(!(n in i))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let a=n,o=t.hooks[a],l=i[a];Z.passThroughHooks.has(n)?i[a]=c=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(n))return(async()=>{let p=await o.call(i,c);return l.call(i,p)})();let d=o.call(i,c);return l.call(i,d)}:i[a]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(i,c);return p===!1&&(p=await l.apply(i,c)),p})();let d=o.apply(i,c);return d===!1&&(d=l.apply(i,c)),d}}s.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,n=t.walkTokens;s.walkTokens=function(a){let o=[];return o.push(n.call(this,a)),i&&(o=o.concat(i.call(this,a))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return $.lex(r,e??this.defaults)}parser(r,e){return y.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},i={...this.defaults,...s},n=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(r):r?$.lex:$.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser(r):r?y.parse:y.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(n);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(r):r?$.lex:$.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(r):r?y.parse:y.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return n(a)}}}onError(r,e){return t=>{if(t.message+=`
150
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+_(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},L=new ti;function m(r,e){return L.parse(r,e)}m.options=m.setOptions=function(r){return L.setOptions(r),m.defaults=L.defaults,gt(m.defaults),m};m.getDefaults=_e;m.defaults=O;function si(...r){return L.use(...r),m.defaults=L.defaults,gt(m.defaults),m}m.use=si;m.walkTokens=function(r,e){return L.walkTokens(r,e)};m.parseInline=L.parseInline;m.Parser=y;m.parser=y.parse;m.Renderer=ie;m.TextRenderer=ze;m.Lexer=$;m.lexer=$.lex;m.Tokenizer=se;m.Hooks=Z;m.parse=m;m.options;m.setOptions;m.walkTokens;m.parseInline;y.parse;$.lex;/**
151
151
  * @license
152
152
  * Copyright 2017 Google LLC
153
153
  * SPDX-License-Identifier: BSD-3-Clause
154
- */const si={CHILD:2},ii=r=>(...e)=>({_$litDirective$:r,values:e});class ri{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
154
+ */const ii={CHILD:2},ri=r=>(...e)=>({_$litDirective$:r,values:e});class ni{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}/**
155
155
  * @license
156
156
  * Copyright 2017 Google LLC
157
157
  * SPDX-License-Identifier: BSD-3-Clause
158
- */class be extends ri{constructor(e){if(super(e),this.it=x,e.type!==si.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===x||e==null)return this._t=void 0,this.it=e;if(e===L)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}be.directiveName="unsafeHTML",be.resultType=1;const ni=ii(be);let Xe=0;class ai extends S{static{this.properties={tags:{attribute:!1},active:{attribute:!1},onToggle:{attribute:!1},allowCreate:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#i;#r;static{this.styles=V`
158
+ */class xe extends ni{constructor(e){if(super(e),this.it=x,e.type!==ii.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===x||e==null)return this._t=void 0,this.it=e;if(e===D)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}xe.directiveName="unsafeHTML",xe.resultType=1;const ai=ri(xe);let Xe=0;class oi extends S{static{this.properties={tags:{attribute:!1},active:{attribute:!1},onToggle:{attribute:!1},allowCreate:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#r;#i;static{this.styles=q`
159
159
  :host {
160
160
  display: inline-block;
161
161
  position: relative;
@@ -166,7 +166,6 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
166
166
  .field {
167
167
  display: flex;
168
168
  align-items: center;
169
- flex-wrap: wrap;
170
169
  gap: 4px;
171
170
  border: 1px solid var(--border-strong);
172
171
  border-radius: 6px;
@@ -175,6 +174,14 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
175
174
  min-height: 30px;
176
175
  box-sizing: border-box;
177
176
  }
177
+ .chips-and-input {
178
+ display: flex;
179
+ align-items: center;
180
+ flex-wrap: wrap;
181
+ gap: 4px;
182
+ flex: 1 1 auto;
183
+ min-width: 0;
184
+ }
178
185
  .field:focus-within {
179
186
  border-color: var(--accent);
180
187
  box-shadow: 0 0 0 2px var(--accent-tint);
@@ -260,50 +267,52 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
260
267
  .option input { margin: 0; pointer-events: none; }
261
268
  .empty { padding: 6px 8px; opacity: 0.6; font-style: italic; font-size: 12px; }
262
269
  .create-option { color: var(--accent); font-style: italic; }
263
- `}constructor(){super(),new we(this),this.tags=[],this.active=[],this.onToggle=()=>{},this.allowCreate=!1,this.#i=`--tag-multiselect-${++Xe}`,this.#r=`tag-multiselect-listbox-${Xe}`}#h=e=>{e.composedPath().includes(this)||this.#u()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#h)}disconnectedCallback(){document.removeEventListener("click",this.#h),super.disconnectedCallback()}get#o(){const e=this.#e.value.trim().toLowerCase();return e?this.tags.filter(t=>t.toLowerCase().includes(e)):this.tags}#c(){this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#u(){this.#t.set(!1),this.#s.set(-1),this.renderRoot.querySelector(".menu")?.hidePopover()}#l(){this.#t.value?this.#u():(this.#c(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#c()}#p(e){this.onToggle(e),this.#e.set(""),this.#s.set(-1)}get#b(){if(!this.allowCreate)return!1;const e=this.#e.value.trim();return e.length>0&&!this.tags.includes(e)&&!this.active.includes(e)}#x(e){e.stopPropagation(),this.active.forEach(t=>this.onToggle(t)),this.#e.set(""),this.renderRoot.querySelector(".input")?.focus(),this.#c()}#g(e){const t=this.#o;if(e.key==="ArrowDown")e.preventDefault(),this.#c(),t.length&&this.#s.set((this.#s.value+1)%t.length);else if(e.key==="ArrowUp")e.preventDefault(),this.#c(),t.length&&this.#s.set((this.#s.value-1+t.length)%t.length);else if(e.key==="Enter"||this.allowCreate&&e.key===","){const s=t[this.#s.value];s!==void 0?(e.preventDefault(),this.#p(s)):this.#b&&(e.preventDefault(),this.#p(this.#e.value.trim()))}else if(e.key==="Backspace"&&!this.#e.value&&this.active.length>0){const s=this.active[this.active.length-1];s!==void 0&&this.onToggle(s)}else e.key==="Escape"&&this.#u()}render(){const e=this.active,t=this.#o,s=this.#t.value,i=this.#s.value;return p`
264
- <div class="field" style=${`anchor-name: ${this.#i}`}>
265
- ${e.map(n=>p`
266
- <span class="selected-chip">
267
- ${n}
268
- <span class="remove" @click=${()=>this.onToggle(n)}>✕</span>
269
- </span>
270
- `)}
271
- <input
272
- class="input"
273
- role="combobox"
274
- aria-autocomplete="list"
275
- aria-expanded=${s}
276
- aria-controls=${this.#r}
277
- aria-activedescendant=${i>=0?`${this.#r}-opt-${i}`:""}
278
- placeholder=${e.length===0?"Filter by tag…":""}
279
- .value=${this.#e.value}
280
- @input=${n=>this.#n(n)}
281
- @focus=${()=>this.#c()}
282
- @click=${()=>this.#c()}
283
- @keydown=${n=>this.#g(n)}
284
- />
285
- ${e.length>0?p`<button class="clear-btn" tabindex="-1" @mousedown=${n=>n.preventDefault()} @click=${n=>this.#x(n)}>✕</button>`:""}
270
+ `}constructor(){super(),new ae(this),this.tags=[],this.active=[],this.onToggle=()=>{},this.allowCreate=!1,this.#r=`--tag-multiselect-${++Xe}`,this.#i=`tag-multiselect-listbox-${Xe}`}#d=e=>{e.composedPath().includes(this)||this.#c()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#d)}disconnectedCallback(){document.removeEventListener("click",this.#d),super.disconnectedCallback()}get#a(){const e=this.#e.value.trim().toLowerCase();return e?this.tags.filter(t=>t.toLowerCase().includes(e)):this.tags}#o(){this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#c(){this.#t.set(!1),this.#s.set(-1),this.renderRoot.querySelector(".menu")?.hidePopover()}#h(){this.#t.value?this.#c():(this.#o(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#o()}#p(e){this.onToggle(e),this.#e.set(""),this.#s.set(-1)}get#u(){if(!this.allowCreate)return!1;const e=this.#e.value.trim();return e.length>0&&!this.tags.includes(e)&&!this.active.includes(e)}#f(e){e.stopPropagation(),this.active.forEach(t=>this.onToggle(t)),this.#e.set(""),this.renderRoot.querySelector(".input")?.focus(),this.#o()}#b(e){const t=this.#a;if(e.key==="ArrowDown")e.preventDefault(),this.#o(),t.length&&this.#s.set((this.#s.value+1)%t.length);else if(e.key==="ArrowUp")e.preventDefault(),this.#o(),t.length&&this.#s.set((this.#s.value-1+t.length)%t.length);else if(e.key==="Enter"||this.allowCreate&&e.key===","){const s=t[this.#s.value];s!==void 0?(e.preventDefault(),this.#p(s)):this.#u&&(e.preventDefault(),this.#p(this.#e.value.trim()))}else if(e.key==="Backspace"&&!this.#e.value&&this.active.length>0){const s=this.active[this.active.length-1];s!==void 0&&this.onToggle(s)}else e.key==="Escape"&&this.#c()}render(){const e=this.active,t=this.#a,s=this.#t.value,i=this.#s.value;return h`
271
+ <div class="field" style=${`anchor-name: ${this.#r}`}>
272
+ <div class="chips-and-input">
273
+ ${e.map(n=>h`
274
+ <span class="selected-chip">
275
+ ${n}
276
+ <span class="remove" @click=${()=>this.onToggle(n)}>✕</span>
277
+ </span>
278
+ `)}
279
+ <input
280
+ class="input"
281
+ role="combobox"
282
+ aria-autocomplete="list"
283
+ aria-expanded=${s}
284
+ aria-controls=${this.#i}
285
+ aria-activedescendant=${i>=0?`${this.#i}-opt-${i}`:""}
286
+ placeholder=${e.length===0?"Filter by tag…":""}
287
+ .value=${this.#e.value}
288
+ @input=${n=>this.#n(n)}
289
+ @focus=${()=>this.#o()}
290
+ @click=${()=>this.#o()}
291
+ @keydown=${n=>this.#b(n)}
292
+ />
293
+ </div>
294
+ ${e.length>0?h`<button class="clear-btn" tabindex="-1" @mousedown=${n=>n.preventDefault()} @click=${n=>this.#f(n)}>✕</button>`:""}
286
295
  <button
287
296
  class="chevron-btn ${s?"open":""}"
288
297
  tabindex="-1"
289
298
  @mousedown=${n=>n.preventDefault()}
290
- @click=${()=>this.#l()}
299
+ @click=${()=>this.#h()}
291
300
  >
292
301
 
293
302
  </button>
294
303
  </div>
295
304
 
296
305
  <ul
297
- id=${this.#r}
306
+ id=${this.#i}
298
307
  class="menu ${s?"visible":""}"
299
308
  role="listbox"
300
309
  aria-multiselectable="true"
301
310
  popover="manual"
302
- style=${`position-anchor: ${this.#i}`}
311
+ style=${`position-anchor: ${this.#r}`}
303
312
  >
304
- ${t.length?t.map((n,a)=>p`
313
+ ${t.length?t.map((n,a)=>h`
305
314
  <li
306
- id=${`${this.#r}-opt-${a}`}
315
+ id=${`${this.#i}-opt-${a}`}
307
316
  role="option"
308
317
  aria-selected=${e.includes(n)}
309
318
  class=${a===i?"option highlighted":"option"}
@@ -313,7 +322,7 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
313
322
  <input type="checkbox" .checked=${e.includes(n)} tabindex="-1" />
314
323
  ${n}
315
324
  </li>
316
- `):this.#b?p`
325
+ `):this.#u?h`
317
326
  <li
318
327
  class="option create-option"
319
328
  @mousedown=${n=>n.preventDefault()}
@@ -321,9 +330,154 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
321
330
  >
322
331
  No match. Create '${this.#e.value.trim()}'
323
332
  </li>
324
- `:p`<li class="empty">${this.allowCreate?"Type to create a tag":"No matches"}</li>`}
333
+ `:h`<li class="empty">${this.allowCreate?"Type to create a tag":"No matches"}</li>`}
325
334
  </ul>
326
- `}}customElements.define("tag-multiselect",ai);const et="mem-bucket-detail-view-mode";function oi(r){return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(r))}const li=["stable","beta","unreviewed"],ci=["active","shipped","abandoned"],tt=["plan","spec","sql","testing-todo","discovery","session-summary","other"],hi=["ticket","freeform"];function st(r){return{description:r.description??"",tags:r.tags??[],status:r.status??"",name:r.name??"",owner:r.owner??"",extends:r.extends??"",trigger_phrases:r.trigger_phrases??[],key:r.key??"",key_type:r.key_type??"",doc_type:r.doc_type??"",related_to:r.related_to??""}}class pi extends S{constructor(){super(...arguments),this._viewMode=localStorage.getItem(et)??"markdown",this._editing=!1,this._draft=null,this._addingFrontmatter=!1,this._renaming=!1,this._renameValue=""}static{this.properties={selected:{attribute:!1},onChanged:{attribute:!1},facets:{attribute:!1},onTagClick:{attribute:!1},onRootClick:{attribute:!1},onDateClick:{attribute:!1},_doc:{state:!0},_viewMode:{state:!0},_editing:{state:!0},_draft:{state:!0},_addingFrontmatter:{state:!0},_renaming:{state:!0},_renameValue:{state:!0}}}static{this.styles=V`
335
+ `}}customElements.define("tag-multiselect",oi);let et=0;class li extends S{static{this.properties={options:{attribute:!1},value:{attribute:!1},onChange:{attribute:!1}}}#e=new u("");#t=new u(!1);#s=new u(-1);#r;#i;static{this.styles=q`
336
+ :host {
337
+ display: inline-block;
338
+ position: relative;
339
+ width: 100%;
340
+ max-width: 320px;
341
+ font: inherit;
342
+ font-size: 13px;
343
+ }
344
+ .field {
345
+ display: flex;
346
+ align-items: center;
347
+ gap: 4px;
348
+ border: 1px solid var(--border-strong);
349
+ border-radius: 6px;
350
+ background: var(--bg);
351
+ padding: 3px 4px 3px 8px;
352
+ min-height: 30px;
353
+ box-sizing: border-box;
354
+ }
355
+ .field:focus-within {
356
+ border-color: var(--accent);
357
+ box-shadow: 0 0 0 2px var(--accent-tint);
358
+ }
359
+ .input {
360
+ flex: 1 1 auto;
361
+ min-width: 0;
362
+ border: none;
363
+ outline: none;
364
+ padding: 5px 2px;
365
+ font: inherit;
366
+ font-size: 13px;
367
+ background: transparent;
368
+ color: inherit;
369
+ }
370
+ .chevron-btn {
371
+ border: none;
372
+ background: transparent;
373
+ cursor: pointer;
374
+ color: inherit;
375
+ opacity: 0.6;
376
+ font-size: 12px;
377
+ padding: 2px 5px;
378
+ line-height: 1;
379
+ flex: 0 0 auto;
380
+ }
381
+ .chevron-btn:hover { opacity: 1; }
382
+ .chevron-btn { transition: transform 0.15s ease; }
383
+ .chevron-btn.open { transform: rotate(180deg); }
384
+
385
+ .menu {
386
+ position: fixed;
387
+ margin: 0;
388
+ inset: auto;
389
+ top: anchor(bottom);
390
+ left: anchor(left);
391
+ width: anchor-size(width);
392
+ position-try-fallbacks: flip-block;
393
+ list-style: none;
394
+ padding: 4px;
395
+ margin: 0;
396
+ border: 1px solid var(--border);
397
+ border-radius: 8px;
398
+ background: var(--bg);
399
+ color: inherit;
400
+ box-shadow: 0 8px 24px var(--shadow);
401
+ max-height: 260px;
402
+ overflow-y: auto;
403
+ box-sizing: border-box;
404
+ }
405
+ .menu:popover-open { margin-top: 4px; }
406
+ .menu[popover] { display: none; }
407
+ .menu.visible[popover] { display: block; }
408
+
409
+ .option {
410
+ display: flex;
411
+ align-items: center;
412
+ gap: 8px;
413
+ padding: 6px 8px;
414
+ border-radius: 5px;
415
+ cursor: pointer;
416
+ font-size: 13px;
417
+ }
418
+ .option:hover, .option.highlighted { background: var(--hover); }
419
+ .option.selected { font-weight: 600; }
420
+ .empty { padding: 6px 8px; opacity: 0.6; font-style: italic; font-size: 12px; }
421
+ .create-option { color: var(--accent); font-style: italic; }
422
+ `}constructor(){super(),new ae(this),this.options=[],this.value="",this.onChange=()=>{},this.#r=`--status-select-${++et}`,this.#i=`status-select-listbox-${et}`}#d=e=>{e.composedPath().includes(this)||this.#c()};connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.#d)}disconnectedCallback(){document.removeEventListener("click",this.#d),super.disconnectedCallback()}get#a(){const e=this.#e.value.trim().toLowerCase();return!e||e===this.value.trim().toLowerCase()?this.options:this.options.filter(t=>t.toLowerCase().includes(e))}#o(){this.#e.set(this.value),this.#t.set(!0),this.updateComplete.then(()=>{this.renderRoot.querySelector(".menu")?.showPopover()})}#c(){this.#t.set(!1),this.#s.set(-1),this.#e.set(this.value),this.renderRoot.querySelector(".menu")?.hidePopover()}#h(){this.#t.value?this.#c():(this.#o(),this.renderRoot.querySelector(".input")?.focus())}#n(e){this.#e.set(e.target.value),this.#s.set(-1),this.#t.value||this.#o()}#p(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}#u(e){const t=this.#p(e);if(!t)return this.#c();this.onChange(t),this.#e.set(t),this.#s.set(-1),this.#c()}get#f(){const e=this.#p(this.#e.value);return e.length>0&&!this.options.some(t=>t.toLowerCase()===e)}get#b(){return this.#a.length+(this.#f?1:0)}#x(e){const t=this.#b;if(e.key==="ArrowDown")e.preventDefault(),this.#o(),t&&this.#s.set((this.#s.value+1)%t);else if(e.key==="ArrowUp")e.preventDefault(),this.#o(),t&&this.#s.set((this.#s.value-1+t)%t);else if(e.key==="Enter"){e.preventDefault();const s=this.#a,i=s[this.#s.value];i!==void 0?this.#u(i):this.#s.value===s.length&&this.#f?this.#u(this.#e.value):this.#e.value.trim()&&this.#u(this.#e.value)}else e.key==="Escape"&&(e.preventDefault(),this.#c())}render(){const e=this.value,t=this.#a,s=this.#t.value,i=this.#s.value;return h`
423
+ <div class="field" style=${`anchor-name: ${this.#r}`}>
424
+ <input
425
+ class="input"
426
+ role="combobox"
427
+ aria-autocomplete="list"
428
+ aria-expanded=${s}
429
+ aria-controls=${this.#i}
430
+ aria-activedescendant=${i>=0?`${this.#i}-opt-${i}`:""}
431
+ .value=${s?this.#e.value:e}
432
+ @input=${n=>this.#n(n)}
433
+ @focus=${()=>this.#o()}
434
+ @click=${()=>this.#o()}
435
+ @keydown=${n=>this.#x(n)}
436
+ @blur=${()=>{this.#t.value&&this.#e.value.trim()&&this.#p(this.#e.value)!==e?this.#u(this.#e.value):this.#c()}}
437
+ />
438
+ <button
439
+ class="chevron-btn ${s?"open":""}"
440
+ tabindex="-1"
441
+ @mousedown=${n=>n.preventDefault()}
442
+ @click=${()=>this.#h()}
443
+ >
444
+
445
+ </button>
446
+ </div>
447
+
448
+ <ul
449
+ id=${this.#i}
450
+ class="menu ${s?"visible":""}"
451
+ role="listbox"
452
+ popover="manual"
453
+ style=${`position-anchor: ${this.#r}`}
454
+ >
455
+ ${t.map((n,a)=>h`
456
+ <li
457
+ id=${`${this.#i}-opt-${a}`}
458
+ role="option"
459
+ aria-selected=${n===e}
460
+ class=${`option ${n===e?"selected":""} ${a===i?"highlighted":""}`}
461
+ @mousedown=${o=>o.preventDefault()}
462
+ @click=${()=>this.#u(n)}
463
+ >
464
+ ${n}
465
+ </li>
466
+ `)}
467
+ ${this.#f?h`
468
+ <li
469
+ id=${`${this.#i}-opt-${t.length}`}
470
+ role="option"
471
+ class=${`option create-option ${t.length===i?"highlighted":""}`}
472
+ @mousedown=${n=>n.preventDefault()}
473
+ @click=${()=>this.#u(this.#e.value)}
474
+ >
475
+ ${t.length?"Create":"No match. Create"} '${this.#p(this.#e.value)}'
476
+ </li>
477
+ `:""}
478
+ ${!t.length&&!this.#f?h`<li class="empty">No options</li>`:""}
479
+ </ul>
480
+ `}}customElements.define("status-select",li);const tt="mem-bucket-detail-view-mode";function ci(r){return new Intl.DateTimeFormat("en-CA",{year:"numeric",month:"2-digit",day:"2-digit"}).format(new Date(r))}const hi=["stable","beta","unreviewed"],pi=["active","shipped","abandoned"],st=["plan","spec","sql","testing-todo","discovery","session-summary","other"],di=["ticket","freeform"];function it(r){return{description:r.description??"",tags:r.tags??[],status:r.status??"",name:r.name??"",owner:r.owner??"",extends:r.extends??"",trigger_phrases:r.trigger_phrases??[],key:r.key??"",key_type:r.key_type??"",doc_type:r.doc_type??"",related_to:r.related_to??""}}class ui extends S{constructor(){super(...arguments),this._viewMode=localStorage.getItem(tt)??"markdown",this._editing=!1,this._draft=null,this._addingFrontmatter=!1,this._renaming=!1,this._renameValue=""}static{this.properties={selected:{attribute:!1},onChanged:{attribute:!1},facets:{attribute:!1},onTagClick:{attribute:!1},onRootClick:{attribute:!1},onDateClick:{attribute:!1},_doc:{state:!0},_viewMode:{state:!0},_editing:{state:!0},_draft:{state:!0},_addingFrontmatter:{state:!0},_renaming:{state:!0},_renameValue:{state:!0}}}static{this.styles=q`
327
481
  :host { display: block; padding: 16px; }
328
482
  h2 { margin: 0 0 4px; font-size: 16px; }
329
483
  .title-row {
@@ -520,6 +674,10 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
520
674
  color: inherit;
521
675
  font-family: inherit;
522
676
  }
677
+ .field input[type='text'],
678
+ .field select {
679
+ max-width: 320px;
680
+ }
523
681
  .field textarea {
524
682
  min-height: 60px;
525
683
  resize: vertical;
@@ -565,32 +723,32 @@ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error
565
723
  color: inherit;
566
724
  }
567
725
  .hint { font-size: 11px; opacity: 0.6; }
568
- `}updated(e){e.has("selected")&&this.selected&&(this._editing=!1,this._addingFrontmatter=!1,this._renaming=!1,this.#e(),this.scrollTop=0)}async#e(){const{table:e,id:t}=this.selected,s=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`);this._doc=s.ok?await s.json():null,await this.updateComplete,this.shadowRoot?.querySelector(".markdown-body")?.scrollTo(0,0),this.shadowRoot?.querySelector("pre")?.scrollTo(0,0)}#t(){this._doc?.source_path&&navigator.clipboard?.writeText(this._doc.source_path)}#s(e){this._viewMode=e,localStorage.setItem(et,e)}async#i(){const{table:e,id:t}=this.selected,s=!this._doc?.deprecated;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/deprecated`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({deprecated:s})}),await this.#e(),this.onChanged?.()}async#r(){const{table:e,id:t}=this.selected,s=!this._doc?.paused;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/paused`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({paused:s})}),await this.#e(),this.onChanged?.()}async#h(){if(!window.confirm("Delete this doc? This can't be undone."))return;const{table:e,id:t}=this.selected;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"DELETE"}),this._doc=null,this.onChanged?.()}#o(){this._doc&&(this._draft=st(this._doc),this._editing=!0,this._addingFrontmatter=!1)}#c(){this._doc&&(this._draft=st(this._doc),this._addingFrontmatter=!0,this._editing=!1)}#u(e){this._draft&&(this._draft={...this._draft,doc_type:e},this._addingFrontmatter=!1,this._editing=!0)}#l(){this._editing=!1,this._addingFrontmatter=!1,this._draft=null}#n(e){this._draft&&(this._draft={...this._draft,...e})}#p(e){if(!this._draft)return;const t=this._draft.tags.includes(e)?this._draft.tags.filter(s=>s!==e):[...this._draft.tags,e];this.#n({tags:t})}#b(e){if(!this._draft)return;const t=this._draft.trigger_phrases.includes(e)?this._draft.trigger_phrases.filter(s=>s!==e):[...this._draft.trigger_phrases,e];this.#n({trigger_phrases:t})}async#x(){if(!this._draft||!this.selected)return;const{table:e,id:t}=this.selected,s=e==="skills",i={description:this._draft.description,tags:this._draft.tags,status:this._draft.status};s?(i.owner=this._draft.owner||null,i.extends=this._draft.extends||null,i.trigger_phrases=this._draft.trigger_phrases):(i.key=this._draft.key,i.key_type=this._draft.key_type,i.doc_type=this._draft.doc_type,i.related_to=this._draft.related_to||null);const n=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({frontmatter:i})});if(!n.ok){const a=await n.json().catch(()=>({}));window.alert(`Save failed: ${a.error??n.statusText}`);return}this._editing=!1,this._draft=null,await this.#e(),this.onChanged?.()}async#g(){if(!this.selected||!this._doc||this.selected.table!=="memory_docs")return;const{table:e,id:t}=this.selected;if(!window.confirm(`Delete frontmatter for "${this._doc.key}"?
726
+ `}updated(e){e.has("selected")&&this.selected&&(this._editing=!1,this._addingFrontmatter=!1,this._renaming=!1,this.#e(),this.scrollTop=0)}async#e(){const{table:e,id:t}=this.selected,s=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`);this._doc=s.ok?await s.json():null,await this.updateComplete,this.shadowRoot?.querySelector(".markdown-body")?.scrollTo(0,0),this.shadowRoot?.querySelector("pre")?.scrollTo(0,0)}#t(){this._doc?.source_path&&navigator.clipboard?.writeText(this._doc.source_path)}#s(e){this._viewMode=e,localStorage.setItem(tt,e)}async#r(){const{table:e,id:t}=this.selected,s=!this._doc?.deprecated;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/deprecated`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({deprecated:s})}),await this.#e(),this.onChanged?.()}async#i(){const{table:e,id:t}=this.selected,s=!this._doc?.paused;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/paused`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({paused:s})}),await this.#e(),this.onChanged?.()}async#d(){if(!window.confirm("Delete this doc? This can't be undone."))return;const{table:e,id:t}=this.selected;await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"DELETE"}),this._doc=null,this.onChanged?.()}#a(){this._doc&&(this._draft=it(this._doc),this._editing=!0,this._addingFrontmatter=!1)}#o(){this._doc&&(this._draft=it(this._doc),this._addingFrontmatter=!0,this._editing=!1)}#c(e){this._draft&&(this._draft={...this._draft,doc_type:e},this._addingFrontmatter=!1,this._editing=!0)}#h(){this._editing=!1,this._addingFrontmatter=!1,this._draft=null}#n(e){this._draft&&(this._draft={...this._draft,...e})}#p(e){if(!this._draft)return;const t=this._draft.tags.includes(e)?this._draft.tags.filter(s=>s!==e):[...this._draft.tags,e];this.#n({tags:t})}#u(e){if(!this._draft)return;const t=this._draft.trigger_phrases.includes(e)?this._draft.trigger_phrases.filter(s=>s!==e):[...this._draft.trigger_phrases,e];this.#n({trigger_phrases:t})}async#f(){if(!this._draft||!this.selected)return;const{table:e,id:t}=this.selected,s=e==="skills",i={description:this._draft.description,tags:this._draft.tags,status:this._draft.status};s?(i.owner=this._draft.owner||null,i.extends=this._draft.extends||null,i.trigger_phrases=this._draft.trigger_phrases):(i.key=this._draft.key,i.key_type=this._draft.key_type,i.doc_type=this._draft.doc_type,i.related_to=this._draft.related_to||null);const n=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({frontmatter:i})});if(!n.ok){const a=await n.json().catch(()=>({}));window.alert(`Save failed: ${a.error??n.statusText}`);return}this._editing=!1,this._draft=null,await this.#e(),this.onChanged?.()}async#b(){if(!this.selected||!this._doc||this.selected.table!=="memory_docs")return;const{table:e,id:t}=this.selected;if(!window.confirm(`Delete frontmatter for "${this._doc.key}"?
569
727
 
570
- This removes the doc's key, tags, and status — it drops out of key-based lookup and full-text search, and becomes a plain unmanaged file, until frontmatter is added again.`))return;const i=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/frontmatter`,{method:"DELETE"});if(!i.ok){const n=await i.json().catch(()=>({}));window.alert(`Delete failed: ${n.error??i.statusText}`);return}this._doc=null,this.selected=null,this.onChanged?.()}#m(){this._doc&&(this._renameValue=this._doc.name??"",this._renaming=!0)}async#k(){if(!this._doc||!this._renameValue.trim())return;const e=this._renameValue.trim();if(e===this._doc.name){this._renaming=!1;return}const t=await fetch(`/api/entries/skills/${encodeURIComponent(this._doc.name)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({new_name:e})});if(!t.ok){const s=await t.json().catch(()=>({}));window.alert(`Rename failed: ${s.error??t.statusText}`);return}this._renaming=!1,this.selected={table:"skills",id:e},await this.#e(),this.onChanged?.()}#f(){return p`
728
+ This removes the doc's key, tags, and status — it drops out of key-based lookup and full-text search, and becomes a plain unmanaged file, until frontmatter is added again.`))return;const i=await fetch(`/api/entries/${e}/${encodeURIComponent(t)}/frontmatter`,{method:"DELETE"});if(!i.ok){const n=await i.json().catch(()=>({}));window.alert(`Delete failed: ${n.error??i.statusText}`);return}this._doc=null,this.selected=null,this.onChanged?.()}#x(){this._doc&&(this._renameValue=this._doc.name??"",this._renaming=!0)}async#k(){if(!this._doc||!this._renameValue.trim())return;const e=this._renameValue.trim();if(e===this._doc.name){this._renaming=!1;return}const t=await fetch(`/api/entries/skills/${encodeURIComponent(this._doc.name)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({new_name:e})});if(!t.ok){const s=await t.json().catch(()=>({}));window.alert(`Rename failed: ${s.error??t.statusText}`);return}this._renaming=!1,this.selected={table:"skills",id:e},await this.#e(),this.onChanged?.()}#m(){return h`
571
729
  <div class="edit-form">
572
730
  <div class="hint">What kind of doc is this? This shapes which fields apply next.</div>
573
731
  <div class="field">
574
732
  <label>doc_type</label>
575
733
  <select
576
- @change=${e=>this.#u(e.target.value)}
734
+ @change=${e=>this.#c(e.target.value)}
577
735
  >
578
736
  <option value="" selected disabled>Choose…</option>
579
- ${tt.map(e=>p`<option value=${e}>${e}</option>`)}
737
+ ${st.map(e=>h`<option value=${e}>${e}</option>`)}
580
738
  </select>
581
739
  </div>
582
740
  <div class="form-actions">
583
- <button class="cancel" @click=${()=>this.#l()}>Cancel</button>
741
+ <button class="cancel" @click=${()=>this.#h()}>Cancel</button>
584
742
  </div>
585
743
  </div>
586
- `}#v(e){const t=this._draft,s=this.facets;return p`
744
+ `}#v(e){const t=this._draft,s=this.facets;return h`
587
745
  <div class="edit-form">
588
- ${e?p`
746
+ ${e?h`
589
747
  <div class="field">
590
748
  <label>name</label>
591
749
  <div class="hint">Renaming moves the skill's folder on disk — kept as a separate action.</div>
592
750
  </div>
593
- `:p`
751
+ `:h`
594
752
  <div class="field-row">
595
753
  <div class="field">
596
754
  <label>key</label>
@@ -606,7 +764,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
606
764
  .value=${t.key_type}
607
765
  @change=${i=>this.#n({key_type:i.target.value})}
608
766
  >
609
- ${hi.map(i=>p`<option value=${i} ?selected=${i===t.key_type}>${i}</option>`)}
767
+ ${di.map(i=>h`<option value=${i} ?selected=${i===t.key_type}>${i}</option>`)}
610
768
  </select>
611
769
  </div>
612
770
  </div>
@@ -616,7 +774,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
616
774
  .value=${t.doc_type}
617
775
  @change=${i=>this.#n({doc_type:i.target.value})}
618
776
  >
619
- ${tt.map(i=>p`<option value=${i} ?selected=${i===t.doc_type}>${i}</option>`)}
777
+ ${st.map(i=>h`<option value=${i} ?selected=${i===t.doc_type}>${i}</option>`)}
620
778
  </select>
621
779
  </div>
622
780
  `}
@@ -638,14 +796,13 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
638
796
  </div>
639
797
  <div class="field">
640
798
  <label>status</label>
641
- <select
799
+ <status-select
800
+ .options=${[...new Set([...e?hi:pi,...s?.statuses??[]])]}
642
801
  .value=${t.status}
643
- @change=${i=>this.#n({status:i.target.value})}
644
- >
645
- ${(e?li:ci).map(i=>p`<option value=${i} ?selected=${i===t.status}>${i}</option>`)}
646
- </select>
802
+ .onChange=${i=>this.#n({status:i})}
803
+ ></status-select>
647
804
  </div>
648
- ${e?p`
805
+ ${e?h`
649
806
  <div class="field-row">
650
807
  <div class="field">
651
808
  <label>owner</label>
@@ -670,10 +827,10 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
670
827
  .tags=${[]}
671
828
  .active=${t.trigger_phrases}
672
829
  .allowCreate=${!0}
673
- .onToggle=${i=>this.#b(i)}
830
+ .onToggle=${i=>this.#u(i)}
674
831
  ></tag-multiselect>
675
832
  </div>
676
- `:p`
833
+ `:h`
677
834
  <div class="field">
678
835
  <label>related_to</label>
679
836
  <input
@@ -684,44 +841,44 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
684
841
  </div>
685
842
  `}
686
843
  <div class="form-actions">
687
- <button class="save" @click=${()=>this.#x()}>Save</button>
688
- <button class="cancel" @click=${()=>this.#l()}>Cancel</button>
844
+ <button class="save" @click=${()=>this.#f()}>Save</button>
845
+ <button class="cancel" @click=${()=>this.#h()}>Cancel</button>
689
846
  </div>
690
847
  </div>
691
- `}#d(e){return p`
848
+ `}#g(e){return h`
692
849
  <div class="title-row">
693
850
  <h2>${e.name??e.key??e.id}</h2>
694
851
  <button class="pill root-pill" title="Filter by root '${e.root}'" @click=${()=>this.onRootClick?.(e.root)}>
695
852
  ${e.root}
696
853
  </button>
697
854
  </div>
698
- `}#$(e,t){const s=e.created_at?oi(e.created_at):null;return p`
855
+ `}#y(e,t){const s=e.created_at?ci(e.created_at):null;return h`
699
856
  <dl class="info-grid">
700
857
  <dt>Description</dt>
701
858
  <dd class="description">${e.description||"—"}</dd>
702
859
 
703
860
  <dt>Tags</dt>
704
861
  <dd>
705
- ${e.tags?.length?e.tags.map(i=>p`<button class="pill tag-pill" @click=${()=>this.onTagClick?.(i)}>${i}</button>`):p`<span class="hint">no tags</span>`}
862
+ ${e.tags?.length?e.tags.map(i=>h`<button class="pill tag-pill" @click=${()=>this.onTagClick?.(i)}>${i}</button>`):h`<span class="hint">no tags</span>`}
706
863
  </dd>
707
864
 
708
865
  <dt>Status</dt>
709
866
  <dd>${e.status}</dd>
710
867
 
711
- ${e.deprecated||e.paused?p`
868
+ ${e.deprecated||e.paused?h`
712
869
  <dt>Flags</dt>
713
870
  <dd>
714
- ${e.deprecated?p`<span class="pill warn-pill">deprecated</span>`:x}
715
- ${e.paused?p`<span class="pill muted-pill">paused</span>`:x}
871
+ ${e.deprecated?h`<span class="pill warn-pill">deprecated</span>`:x}
872
+ ${e.paused?h`<span class="pill muted-pill">paused</span>`:x}
716
873
  </dd>
717
874
  `:x}
718
875
 
719
- ${t?p`
720
- ${e.owner?p`<dt>Owner</dt>
876
+ ${t?h`
877
+ ${e.owner?h`<dt>Owner</dt>
721
878
  <dd>${e.owner}</dd>`:x}
722
- ${e.extends?p`<dt>Extends</dt>
879
+ ${e.extends?h`<dt>Extends</dt>
723
880
  <dd>${e.extends}</dd>`:x}
724
- `:p`
881
+ `:h`
725
882
  <dt>Key</dt>
726
883
  <dd>${e.key}</dd>
727
884
 
@@ -731,32 +888,32 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
731
888
  <dt>Doc type</dt>
732
889
  <dd>${e.doc_type}</dd>
733
890
 
734
- ${e.related_to?p`<dt>Related to</dt>
891
+ ${e.related_to?h`<dt>Related to</dt>
735
892
  <dd>${e.related_to}</dd>`:x}
736
893
  `}
737
894
 
738
895
  <dt>Created</dt>
739
896
  <dd>
740
- ${s?p`<span class="date-value" title="Filter to this day" @click=${()=>this.onDateClick?.(s)}
897
+ ${s?h`<span class="date-value" title="Filter to this day" @click=${()=>this.onDateClick?.(s)}
741
898
  >${s}</span
742
- >`:p`<span class="hint">unknown</span>`}
899
+ >`:h`<span class="hint">unknown</span>`}
743
900
  </dd>
744
901
  </dl>
745
- `}render(){if(!this.selected)return p`<div class="empty">Select an entry to view its details.</div>`;if(!this._doc)return x;const e=this._doc,t=this.selected.table==="skills",s=t&&e.root==="builtin",i=!t&&e.has_frontmatter===!1;return this._addingFrontmatter?p`${this.#d(e)}${this.#f()}`:this._editing&&this._draft?p`${this.#d(e)}${this.#v(t)}`:p`
746
- ${this.#d(e)}
747
- ${i?p`<div class="bare-notice">No frontmatter — this is a plain, unmanaged file.</div>`:this.#$(e,t)}
748
- ${s?x:p`
902
+ `}render(){if(!this.selected)return h`<div class="empty">Select an entry to view its details.</div>`;if(!this._doc)return x;const e=this._doc,t=this.selected.table==="skills",s=t&&e.root==="builtin",i=!t&&e.has_frontmatter===!1;return this._addingFrontmatter?h`${this.#g(e)}${this.#m()}`:this._editing&&this._draft?h`${this.#g(e)}${this.#v(t)}`:h`
903
+ ${this.#g(e)}
904
+ ${i?h`<div class="bare-notice">No frontmatter — this is a plain, unmanaged file.</div>`:this.#y(e,t)}
905
+ ${s?x:h`
749
906
  <div class="actions">
750
- ${i?p`<button class="primary" @click=${()=>this.#c()}>Add frontmatter</button>`:p`
751
- <button @click=${()=>this.#o()}>Edit</button>
752
- ${t?p`<button @click=${()=>this.#m()}>Rename</button>`:x}
753
- <button @click=${()=>this.#i()}>${e.deprecated?"Un-deprecate":"Mark deprecated"}</button>
754
- <button @click=${()=>this.#r()}>${e.paused?"Resume":"Pause"}</button>
755
- ${t?x:p`<button class="danger" @click=${()=>this.#g()}>Delete frontmatter</button>`}
907
+ ${i?h`<button class="primary" @click=${()=>this.#o()}>Add frontmatter</button>`:h`
908
+ <button @click=${()=>this.#a()}>Edit</button>
909
+ ${t?h`<button @click=${()=>this.#x()}>Rename</button>`:x}
910
+ <button @click=${()=>this.#r()}>${e.deprecated?"Un-deprecate":"Mark deprecated"}</button>
911
+ <button @click=${()=>this.#i()}>${e.paused?"Resume":"Pause"}</button>
912
+ ${t?x:h`<button class="danger" @click=${()=>this.#b()}>Delete frontmatter</button>`}
756
913
  `}
757
- <button class="danger" @click=${()=>this.#h()}>Delete</button>
914
+ <button class="danger" @click=${()=>this.#d()}>Delete</button>
758
915
  </div>
759
- ${this._renaming?p`
916
+ ${this._renaming?h`
760
917
  <div class="rename-row">
761
918
  <input
762
919
  type="text"
@@ -783,9 +940,9 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
783
940
  Raw
784
941
  </button>
785
942
  </div>
786
- ${this._viewMode==="markdown"?p`<div class="markdown-body">${ni(m.parse(e.body??"",{async:!1}))}</div>`:p`<pre>${e.raw_file??e.body}</pre>`}
943
+ ${this._viewMode==="markdown"?h`<div class="markdown-body">${ai(m.parse(e.body??"",{async:!1}))}</div>`:h`<pre>${e.raw_file??e.body}</pre>`}
787
944
  <div class="source-path" title="click to copy" @click=${()=>this.#t()}>${e.source_path}</div>
788
- `}}customElements.define("detail-panel",pi);class di extends S{static{this.properties={defaultKind:{attribute:!1},lockKind:{attribute:!1},onAdded:{attribute:!1},onCancel:{attribute:!1}}}#e=new u("skill");#t=new u("");#s=new u([]);#i=new u(null);#r=new u("");#h=new u("");#o=new u("");#c=new u(!1);#u=new u(!1);#l=new u(!1);#n=new u("");static{this.styles=V`
945
+ `}}customElements.define("detail-panel",ui);class gi extends S{static{this.properties={defaultKind:{attribute:!1},lockKind:{attribute:!1},onAdded:{attribute:!1},onCancel:{attribute:!1}}}#e=new u("skill");#t=new u("");#s=new u([]);#r=new u(null);#i=new u("");#d=new u("");#a=new u("");#o=new u(!1);#c=new u(!1);#h=new u(!1);#n=new u("");static{this.styles=q`
789
946
  :host { display: block; }
790
947
  .backdrop {
791
948
  position: fixed; inset: 0; background: var(--overlay);
@@ -868,11 +1025,11 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
868
1025
  border-radius: 6px; cursor: pointer; font-size: 13px;
869
1026
  }
870
1027
  .error { color: var(--danger); font-size: 12px; }
871
- `}constructor(){super(),new we(this),this.defaultKind="skill",this.lockKind=!1}connectedCallback(){super.connectedCallback(),this.#e.set(this.defaultKind),this.#p()}async#p(e){const t=new URLSearchParams;e&&t.set("path",e),this.#u.value&&t.set("hidden","1");const s=await fetch(`/api/fs/list?${t.toString()}`);if(!s.ok){this.#o.set((await s.json()).error??"failed to list directory");return}const i=await s.json();this.#t.set(i.path),this.#i.set(i.parent),this.#s.set(i.entries),this.#o.set(""),this.renderRoot.querySelector(".browser")?.scrollTo(0,0)}#b(){this.#u.set(!this.#u.value),this.#p(this.#t.value)}#x(){this.#n.set(""),this.#l.set(!0)}#g(){this.#l.set(!1),this.#n.set("")}async#m(){const e=this.#n.value.trim();if(e){this.#o.set("");try{const t=await fetch("/api/fs/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:this.#t.value,name:e})}),s=await t.json();if(!t.ok){this.#o.set(s.error??"failed to create folder");return}this.#l.set(!1),this.#n.set(""),await this.#p(this.#t.value)}catch(t){this.#o.set(t.message)}}}#k(){this.#r.set(this.#t.value),this.#h.value||this.#h.set(this.#t.value.split("/").filter(Boolean).pop()??"")}async#f(){const e=this.#r.value||this.#t.value;if(e){this.#c.set(!0),this.#o.set("");try{const t=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:this.#e.value,name:this.#h.value||void 0,path:e})}),s=await t.json();if(!t.ok){this.#o.set(s.error??"failed to add root");return}this.onAdded()}finally{this.#c.set(!1)}}}render(){const e=this.#s.value;return p`
1028
+ `}constructor(){super(),new ae(this),this.defaultKind="skill",this.lockKind=!1}connectedCallback(){super.connectedCallback(),this.#e.set(this.defaultKind),this.#p()}async#p(e){const t=new URLSearchParams;e&&t.set("path",e),this.#c.value&&t.set("hidden","1");const s=await fetch(`/api/fs/list?${t.toString()}`);if(!s.ok){this.#a.set((await s.json()).error??"failed to list directory");return}const i=await s.json();this.#t.set(i.path),this.#r.set(i.parent),this.#s.set(i.entries),this.#a.set(""),this.renderRoot.querySelector(".browser")?.scrollTo(0,0)}#u(){this.#c.set(!this.#c.value),this.#p(this.#t.value)}#f(){this.#n.set(""),this.#h.set(!0)}#b(){this.#h.set(!1),this.#n.set("")}async#x(){const e=this.#n.value.trim();if(e){this.#a.set("");try{const t=await fetch("/api/fs/mkdir",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:this.#t.value,name:e})}),s=await t.json();if(!t.ok){this.#a.set(s.error??"failed to create folder");return}this.#h.set(!1),this.#n.set(""),await this.#p(this.#t.value)}catch(t){this.#a.set(t.message)}}}#k(){this.#i.set(this.#t.value),this.#d.value||this.#d.set(this.#t.value.split("/").filter(Boolean).pop()??"")}async#m(){const e=this.#i.value||this.#t.value;if(e){this.#o.set(!0),this.#a.set("");try{const t=await fetch("/api/roots",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({kind:this.#e.value,name:this.#d.value||void 0,path:e})}),s=await t.json();if(!t.ok){this.#a.set(s.error??"failed to add root");return}this.onAdded()}finally{this.#o.set(!1)}}}render(){const e=this.#s.value;return h`
872
1029
  <div class="backdrop" @click=${t=>t.target===t.currentTarget&&this.onCancel()}>
873
1030
  <div class="modal">
874
1031
  <div class="header"><h2>Add a root</h2></div>
875
- ${this.lockKind?p``:p`
1032
+ ${this.lockKind?h``:h`
876
1033
  <div class="kind-toggle">
877
1034
  <button
878
1035
  class=${this.#e.value==="skill"?"active":""}
@@ -890,30 +1047,30 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
890
1047
  `}
891
1048
  <div class="breadcrumb-row">
892
1049
  <div class="breadcrumb">${this.#t.value}</div>
893
- <button class="new-folder-btn" @click=${()=>this.#x()}>+ New folder</button>
1050
+ <button class="new-folder-btn" @click=${()=>this.#f()}>+ New folder</button>
894
1051
  <label class="hidden-toggle">
895
- <input type="checkbox" .checked=${this.#u.value} @change=${()=>this.#b()} />
1052
+ <input type="checkbox" .checked=${this.#c.value} @change=${()=>this.#u()} />
896
1053
  Show hidden
897
1054
  </label>
898
1055
  </div>
899
- ${this.#l.value?p`
1056
+ ${this.#h.value?h`
900
1057
  <div class="new-folder-row">
901
1058
  <input
902
1059
  type="text"
903
1060
  placeholder="Folder name"
904
1061
  .value=${this.#n.value}
905
1062
  @input=${t=>this.#n.set(t.target.value)}
906
- @keydown=${t=>{t.key==="Enter"&&this.#m(),t.key==="Escape"&&this.#g()}}
1063
+ @keydown=${t=>{t.key==="Enter"&&this.#x(),t.key==="Escape"&&this.#b()}}
907
1064
  />
908
- <button @click=${()=>this.#m()}>Create</button>
909
- <button @click=${()=>this.#g()}>Cancel</button>
1065
+ <button @click=${()=>this.#x()}>Create</button>
1066
+ <button @click=${()=>this.#b()}>Cancel</button>
910
1067
  </div>
911
1068
  `:""}
912
1069
  <div class="browser">
913
- ${this.#i.value?p`<div class="entry up" @click=${()=>this.#p(this.#i.value)}>
1070
+ ${this.#r.value?h`<div class="entry up" @click=${()=>this.#p(this.#r.value)}>
914
1071
  <span class="icon">📁</span> ..
915
1072
  </div>`:""}
916
- ${e.length===0&&!this.#i.value?p`<div class="empty">No subdirectories here.</div>`:e.map(t=>p`<div class="entry" @click=${()=>this.#p(t.path)}>
1073
+ ${e.length===0&&!this.#r.value?h`<div class="empty">No subdirectories here.</div>`:e.map(t=>h`<div class="entry" @click=${()=>this.#p(t.path)}>
917
1074
  <span class="icon">📁</span> ${t.name}
918
1075
  </div>`)}
919
1076
  </div>
@@ -921,31 +1078,31 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
921
1078
  <button class="secondary" @click=${()=>this.#k()}>
922
1079
  Select this folder
923
1080
  </button>
924
- ${this.#r.value?p`<div class="selected-row">Selected: <span class="path">${this.#r.value}</span></div>`:""}
1081
+ ${this.#i.value?h`<div class="selected-row">Selected: <span class="path">${this.#i.value}</span></div>`:""}
925
1082
  <div>
926
1083
  <label>Root name</label>
927
1084
  <input
928
1085
  type="text"
929
- .value=${this.#h.value}
1086
+ .value=${this.#d.value}
930
1087
  placeholder="e.g. personal, company"
931
- @input=${t=>this.#h.set(t.target.value)}
1088
+ @input=${t=>this.#d.set(t.target.value)}
932
1089
  />
933
1090
  </div>
934
- ${this.#o.value?p`<div class="error">${this.#o.value}</div>`:""}
1091
+ ${this.#a.value?h`<div class="error">${this.#a.value}</div>`:""}
935
1092
  <div class="actions">
936
1093
  <button class="secondary" @click=${()=>this.onCancel()}>Cancel</button>
937
1094
  <button
938
1095
  class="primary"
939
- ?disabled=${!this.#r.value||this.#c.value}
940
- @click=${()=>this.#f()}
1096
+ ?disabled=${!this.#i.value||this.#o.value}
1097
+ @click=${()=>this.#m()}
941
1098
  >
942
- ${this.#c.value?"Adding…":"Add root"}
1099
+ ${this.#o.value?"Adding…":"Add root"}
943
1100
  </button>
944
1101
  </div>
945
1102
  </div>
946
1103
  </div>
947
1104
  </div>
948
- `}}customElements.define("add-root-modal",di);const ui=[{value:"all",label:"All"},{value:"skill",label:"Skills"},{value:"memory",label:"Memories"}],it=[{value:"all",label:"Show all"},{value:"hide",label:"Hide"},{value:"only",label:"Only"}],gi={tags:[],statuses:[],owners:[],doc_types:[],key_types:[],roots:[]},fi={skill:[],memory:[]},wt="mem-bucket-split-pct",_t=20,St=80;function bi(){const r=Number(localStorage.getItem(wt));return Number.isFinite(r)&&r>=_t&&r<=St?r:40}const At="mem-bucket-theme",he=["system","light","dark"],xi={system:"◐",light:"☀",dark:"☾"},mi={system:"Auto",light:"Light",dark:"Dark"};function ki(){const r=localStorage.getItem(At);return r==="light"||r==="dark"?r:"system"}function rt(r){r==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",r)}function vi(){const r=location.hash.slice(1);if(!r)return{};const e=new URLSearchParams(r),t={},s=e.get("q");s&&(t.query=s);const i=e.get("type");(i==="skill"||i==="memory"||i==="all")&&(t.typeFilter=i);const n=e.getAll("tag");n.length&&(t.activeTags=n);const a=e.getAll("root");a.length&&(t.activeRoots=a);const o=e.get("sort");o&&(t.sort=o);const l=e.get("deprecated");l==="0"?t.deprecatedFilter="hide":l==="1"&&(t.deprecatedFilter="only");const c=e.get("paused");c==="0"?t.pausedFilter="hide":c==="1"&&(t.pausedFilter="only");const d=e.get("date_from");d&&(t.dateFrom=d);const h=e.get("date_to");return h&&(t.dateTo=h),t}class $i extends S{static{this.styles=V`
1105
+ `}}customElements.define("add-root-modal",gi);const fi=[{value:"all",label:"All"},{value:"skill",label:"Skills"},{value:"memory",label:"Memories"}],rt=[{value:"all",label:"Show all"},{value:"hide",label:"Hide"},{value:"only",label:"Only"}],bi={tags:[],statuses:[],owners:[],doc_types:[],key_types:[],roots:[]},xi={skill:[],memory:[]},_t="mem-bucket-split-pct",St=20,At=80;function mi(){const r=Number(localStorage.getItem(_t));return Number.isFinite(r)&&r>=St&&r<=At?r:40}const Tt="mem-bucket-theme",pe=["system","light","dark"],ki={system:"◐",light:"☀",dark:"☾"},vi={system:"Auto",light:"Light",dark:"Dark"};function $i(){const r=localStorage.getItem(Tt);return r==="light"||r==="dark"?r:"system"}function nt(r){r==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",r)}function yi(){const r=location.hash.slice(1);if(!r)return{};const e=new URLSearchParams(r),t={},s=e.get("q");s&&(t.query=s);const i=e.get("type");(i==="skill"||i==="memory"||i==="all")&&(t.typeFilter=i);const n=e.getAll("tag");n.length&&(t.activeTags=n);const a=e.getAll("root");a.length&&(t.activeRoots=a);const o=e.get("sort");o&&(t.sort=o);const l=e.get("deprecated");l==="0"?t.deprecatedFilter="hide":l==="1"&&(t.deprecatedFilter="only");const c=e.get("paused");c==="0"?t.pausedFilter="hide":c==="1"&&(t.pausedFilter="only");const d=e.get("date_from");d&&(t.dateFrom=d);const p=e.get("date_to");return p&&(t.dateTo=p),t}class wi extends S{static{this.styles=q`
949
1106
  :host { display: flex; flex-direction: column; height: 100vh; }
950
1107
  .theme-toggle {
951
1108
  position: fixed;
@@ -1150,16 +1307,16 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1150
1307
  cursor: pointer;
1151
1308
  }
1152
1309
  .bulk-bar button.danger { border-color: var(--danger); color: var(--danger); }
1153
- `}#e=vi();#t=new u(this.#e.query??"");#s=new u(this.#e.typeFilter??"all");#i=new u(this.#e.activeTags??[]);#r=new u(this.#e.activeRoots??[]);#h=new u([]);#o=new u(gi);#c=new u(null);#u=new u(fi);#l=new u(!1);#n=new u("");#p=new u(!1);#b=new u(bi());#x=new u(!1);#g=new u(this.#e.sort??"mtime_desc");#m=new u(this.#e.deprecatedFilter??"all");#k=new u(this.#e.pausedFilter??"all");#f=new u(this.#e.dateFrom??"");#v=new u(this.#e.dateTo??"");#d=new u(new Set);#$=new u(ki());#_=new u(!1);#T=e=>this.#M(e);#R=()=>this.#N();constructor(){super(),new we(this),rt(this.#$.value)}#L(e){this.#$.set(e),localStorage.setItem(At,e),rt(e)}#D(){const e=he[(he.indexOf(this.#$.value)+1)%he.length];this.#L(e)}async#O(){if(!this.#_.value){this.#_.set(!0);try{await fetch("/api/rebuild-cache",{method:"POST"}),await Promise.all([this.#w(),this.#y(),this.#a()])}finally{this.#_.set(!1)}}}#I(e){e.preventDefault(),this.#x.set(!0),document.addEventListener("pointermove",this.#T),document.addEventListener("pointerup",this.#R)}#M(e){const t=this.renderRoot.querySelector(".body-region");if(!t)return;const s=t.getBoundingClientRect(),i=(e.clientX-s.left)/s.width*100;this.#b.set(Math.min(St,Math.max(_t,i)))}#N(){this.#x.set(!1),document.removeEventListener("pointermove",this.#T),document.removeEventListener("pointerup",this.#R),localStorage.setItem(wt,String(this.#b.value))}#q=new ts(()=>{const e=new URLSearchParams;this.#s.value!=="all"&&e.set("type",this.#s.value),this.#t.value.trim()&&e.set("q",this.#t.value.trim());for(const t of this.#i.value)e.append("tag",t);for(const t of this.#r.value)e.append("root",t);return this.#g.value!=="mtime_desc"&&e.set("sort",this.#g.value),this.#m.value==="hide"?e.set("deprecated","0"):this.#m.value==="only"&&e.set("deprecated","1"),this.#k.value==="hide"?e.set("paused","0"):this.#k.value==="only"&&e.set("paused","1"),this.#f.value&&e.set("date_from",this.#f.value),this.#v.value&&e.set("date_to",this.#v.value),e.toString()});#S=()=>this.#U();connectedCallback(){super.connectedCallback(),this.#a(),this.#y(),this.#w(),window.addEventListener("focus",this.#S),document.addEventListener("visibilitychange",this.#S)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("focus",this.#S),document.removeEventListener("visibilitychange",this.#S)}#U(){document.visibilityState==="visible"&&(this.#a(),this.#y(),this.#w())}async#a(){const e=this.#q.value;history.replaceState(null,"",e?`#${e}`:location.pathname+location.search);const t=await fetch(`/api/entries?${e}`);this.#h.set(await t.json()),this.renderRoot.querySelector("result-list")?.scrollTo(0,0)}async#y(){const e=this.#s.value==="all"?"":`?type=${this.#s.value}`,t=await fetch(`/api/facets${e}`);this.#o.set(await t.json())}async#w(){const e=await fetch("/api/roots");this.#u.set(await e.json()),this.#p.set(!0)}#H(e){const t=this.#r.value;this.#r.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#a()}async#B(e,t){if(t.stopPropagation(),window.prompt(`Type "${e.name}" to remove this ${e.kind} root (files on disk are untouched):`)===e.name){this.#n.set(e.name);try{await fetch(`/api/roots/${e.kind}/${encodeURIComponent(e.name)}`,{method:"DELETE"}),this.#r.set(this.#r.value.filter(i=>i!==e.name)),await Promise.all([this.#w(),this.#y(),this.#a()])}finally{this.#n.set("")}}}#C(){this.#l.set(!1),this.#w(),this.#y(),this.#a()}#F(){return[...this.#u.value.skill,...this.#u.value.memory]}#j(e){this.#s.set(e),this.#i.set([]),this.#y(),this.#a()}#Z(e){const t=this.#i.value;this.#i.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#a()}#K(e){this.#i.value.includes(e)||this.#i.set([...this.#i.value,e]),this.#a()}#Q(e){this.#r.value.includes(e)||this.#r.set([...this.#r.value,e]),this.#a()}#V(e){this.#f.set(e),this.#v.set(e),this.#a()}#W(e){this.#t.set(e.target.value),this.#a()}#Y(){this.#t.set(""),this.#a()}#G(e){this.#c.set({table:e._table,id:e.id})}#J(e){this.#g.set(e.target.value),this.#a()}#X(e){this.#m.set(e.target.value),this.#a()}#ee(e){this.#k.set(e.target.value),this.#a()}#te(e){this.#f.set(e.target.value),this.#a()}#se(e){this.#v.set(e.target.value),this.#a()}#ie(){this.#f.set(""),this.#v.set(""),this.#a()}#re(e){const t=new Set(this.#d.value);t.has(e.id)?t.delete(e.id):t.add(e.id),this.#d.set(t)}#ne(){return new Map(this.#h.value.map(e=>[e.id,e]))}#A(){const e=new Map,t=this.#ne();for(const s of this.#d.value){const i=t.get(s);if(!i)continue;const n=e.get(i._table)??[];n.push(s),e.set(i._table,n)}return e}async#E(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/deprecated`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,deprecated:e})}))),this.#d.set(new Set),await this.#a()}async#z(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/paused`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,paused:e})}))),this.#d.set(new Set),await this.#a()}async#ae(){if(!window.confirm(`Delete ${this.#d.value.size} doc(s)? This can't be undone.`))return;const e=this.#A();await Promise.all([...e.entries()].map(([t,s])=>fetch(`/api/entries/${t}/bulk/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s})}))),this.#d.set(new Set),await this.#a()}#P(){const e=this.#$.value;return p`
1310
+ `}#e=yi();#t=new u(this.#e.query??"");#s=new u(this.#e.typeFilter??"all");#r=new u(this.#e.activeTags??[]);#i=new u(this.#e.activeRoots??[]);#d=new u([]);#a=new u(bi);#o=new u(null);#c=new u(xi);#h=new u(!1);#n=new u("");#p=new u(!1);#u=new u(mi());#f=new u(!1);#b=new u(this.#e.sort??"mtime_desc");#x=new u(this.#e.deprecatedFilter??"all");#k=new u(this.#e.pausedFilter??"all");#m=new u(this.#e.dateFrom??"");#v=new u(this.#e.dateTo??"");#g=new u(new Set);#y=new u($i());#_=new u(!1);#T=e=>this.#I(e);#C=()=>this.#N();constructor(){super(),new ae(this),nt(this.#y.value)}#D(e){this.#y.set(e),localStorage.setItem(Tt,e),nt(e)}#L(){const e=pe[(pe.indexOf(this.#y.value)+1)%pe.length];this.#D(e)}async#O(){if(!this.#_.value){this.#_.set(!0);try{await fetch("/api/rebuild-cache",{method:"POST"}),await Promise.all([this.#w(),this.#$(),this.#l()])}finally{this.#_.set(!1)}}}#M(e){e.preventDefault(),this.#f.set(!0),document.addEventListener("pointermove",this.#T),document.addEventListener("pointerup",this.#C)}#I(e){const t=this.renderRoot.querySelector(".body-region");if(!t)return;const s=t.getBoundingClientRect(),i=(e.clientX-s.left)/s.width*100;this.#u.set(Math.min(At,Math.max(St,i)))}#N(){this.#f.set(!1),document.removeEventListener("pointermove",this.#T),document.removeEventListener("pointerup",this.#C),localStorage.setItem(_t,String(this.#u.value))}#q=new ss(()=>{const e=new URLSearchParams;this.#s.value!=="all"&&e.set("type",this.#s.value),this.#t.value.trim()&&e.set("q",this.#t.value.trim());for(const t of this.#r.value)e.append("tag",t);for(const t of this.#i.value)e.append("root",t);return this.#b.value!=="mtime_desc"&&e.set("sort",this.#b.value),this.#x.value==="hide"?e.set("deprecated","0"):this.#x.value==="only"&&e.set("deprecated","1"),this.#k.value==="hide"?e.set("paused","0"):this.#k.value==="only"&&e.set("paused","1"),this.#m.value&&e.set("date_from",this.#m.value),this.#v.value&&e.set("date_to",this.#v.value),e.toString()});#S=()=>this.#U();connectedCallback(){super.connectedCallback(),this.#l(),this.#$(),this.#w(),window.addEventListener("focus",this.#S),document.addEventListener("visibilitychange",this.#S)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("focus",this.#S),document.removeEventListener("visibilitychange",this.#S)}#U(){document.visibilityState==="visible"&&(this.#l(),this.#$(),this.#w())}async#l(){const e=this.#q.value;history.replaceState(null,"",e?`#${e}`:location.pathname+location.search);const t=await fetch(`/api/entries?${e}`);this.#d.set(await t.json()),this.renderRoot.querySelector("result-list")?.scrollTo(0,0)}async#$(){const e=this.#s.value==="all"?"":`?type=${this.#s.value}`,t=await fetch(`/api/facets${e}`);this.#a.set(await t.json())}async#w(){const e=await fetch("/api/roots");this.#c.set(await e.json()),this.#p.set(!0)}#F(e){const t=this.#i.value;this.#i.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#l()}async#H(e,t){if(t.stopPropagation(),window.prompt(`Type "${e.name}" to remove this ${e.kind} root (files on disk are untouched):`)===e.name){this.#n.set(e.name);try{await fetch(`/api/roots/${e.kind}/${encodeURIComponent(e.name)}`,{method:"DELETE"}),this.#i.set(this.#i.value.filter(i=>i!==e.name)),await Promise.all([this.#w(),this.#$(),this.#l()])}finally{this.#n.set("")}}}#R(){this.#h.set(!1),this.#w(),this.#$(),this.#l()}#B(){return[...this.#c.value.skill,...this.#c.value.memory]}#j(e){this.#s.set(e),this.#r.set([]),this.#$(),this.#l()}#Z(e){const t=this.#r.value;this.#r.set(t.includes(e)?t.filter(s=>s!==e):[...t,e]),this.#l()}#K(e){this.#r.value.includes(e)||this.#r.set([...this.#r.value,e]),this.#l()}#Q(e){this.#i.value.includes(e)||this.#i.set([...this.#i.value,e]),this.#l()}#V(e){this.#m.set(e),this.#v.set(e),this.#l()}#W(e){this.#t.set(e.target.value),this.#l()}#Y(){this.#t.set(""),this.#l()}#G(e){this.#o.set({table:e._table,id:e.id})}#J(e){this.#b.set(e.target.value),this.#l()}#X(e){this.#x.set(e.target.value),this.#l()}#ee(e){this.#k.set(e.target.value),this.#l()}#te(e){this.#m.set(e.target.value),this.#l()}#se(e){this.#v.set(e.target.value),this.#l()}#ie(){this.#m.set(""),this.#v.set(""),this.#l()}#re(e){const t=new Set(this.#g.value);t.has(e.id)?t.delete(e.id):t.add(e.id),this.#g.set(t)}#ne(){return new Map(this.#d.value.map(e=>[e.id,e]))}#A(){const e=new Map,t=this.#ne();for(const s of this.#g.value){const i=t.get(s);if(!i)continue;const n=e.get(i._table)??[];n.push(s),e.set(i._table,n)}return e}async#E(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/deprecated`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,deprecated:e})}))),this.#g.set(new Set),await this.#l()}async#z(e){const t=this.#A();await Promise.all([...t.entries()].map(([s,i])=>fetch(`/api/entries/${s}/bulk/paused`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:i,paused:e})}))),this.#g.set(new Set),await this.#l()}async#ae(){if(!window.confirm(`Delete ${this.#g.value.size} doc(s)? This can't be undone.`))return;const e=this.#A();await Promise.all([...e.entries()].map(([t,s])=>fetch(`/api/entries/${t}/bulk/delete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s})}))),this.#g.set(new Set),await this.#l()}#P(){const e=this.#y.value;return h`
1154
1311
  <button
1155
1312
  class="theme-toggle"
1156
- title=${`Theme: ${mi[e]} (click to change)`}
1313
+ title=${`Theme: ${vi[e]} (click to change)`}
1157
1314
  aria-label="Toggle color theme"
1158
- @click=${()=>this.#D()}
1315
+ @click=${()=>this.#L()}
1159
1316
  >
1160
- ${xi[e]}
1317
+ ${ki[e]}
1161
1318
  </button>
1162
- `}#oe(){const e=this.#_.value;return p`
1319
+ `}#oe(){const e=this.#_.value;return h`
1163
1320
  <button
1164
1321
  class=${`reindex-toggle${e?" spinning":""}`}
1165
1322
  title=${e?"Reindexing…":"Rebuild cache from disk"}
@@ -1169,7 +1326,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1169
1326
  >
1170
1327
 
1171
1328
  </button>
1172
- `}render(){const e=this.#o.value,t=this.#F();return this.#p.value&&t.length===0&&!this.#l.value?p`
1329
+ `}render(){const e=this.#a.value,t=this.#B();return this.#p.value&&t.length===0&&!this.#h.value?h`
1173
1330
  ${this.#P()}
1174
1331
  <div class="first-run">
1175
1332
  <h1>No roots configured yet</h1>
@@ -1177,35 +1334,35 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1177
1334
  Add a folder of skills or memory docs to get started. You can add more roots later —
1178
1335
  e.g. a personal skills repo plus a shared company repo.
1179
1336
  </p>
1180
- <button class="add-root-btn" @click=${()=>this.#l.set(!0)}>+ Add your first root</button>
1337
+ <button class="add-root-btn" @click=${()=>this.#h.set(!0)}>+ Add your first root</button>
1181
1338
  </div>
1182
- ${this.#l.value?p`<add-root-modal
1339
+ ${this.#h.value?h`<add-root-modal
1183
1340
  .defaultKind=${"skill"}
1184
1341
  .lockKind=${!1}
1185
- .onAdded=${()=>this.#C()}
1186
- .onCancel=${()=>this.#l.set(!1)}
1342
+ .onAdded=${()=>this.#R()}
1343
+ .onCancel=${()=>this.#h.set(!1)}
1187
1344
  ></add-root-modal>`:""}
1188
- `:p`
1345
+ `:h`
1189
1346
  ${this.#oe()}
1190
1347
  ${this.#P()}
1191
1348
  <div class="roots-bar">
1192
1349
  <span class="filter-label">Roots:</span>
1193
- ${t.map(s=>p`
1350
+ ${t.map(s=>h`
1194
1351
  <button
1195
- class="root-chip ${this.#r.value.includes(s.name)?"active":""}"
1352
+ class="root-chip ${this.#i.value.includes(s.name)?"active":""}"
1196
1353
  title=${s.path}
1197
- @click=${()=>this.#H(s.name)}
1354
+ @click=${()=>this.#F(s.name)}
1198
1355
  >
1199
1356
  ${s.name}
1200
1357
  <span
1201
1358
  class="remove"
1202
1359
  title="Remove root"
1203
- @click=${i=>this.#B(s,i)}
1360
+ @click=${i=>this.#H(s,i)}
1204
1361
  >${this.#n.value===s.name?"…":"✕"}</span
1205
1362
  >
1206
1363
  </button>
1207
1364
  `)}
1208
- <button class="add-root-btn" @click=${()=>this.#l.set(!0)}>+ Add root</button>
1365
+ <button class="add-root-btn" @click=${()=>this.#h.set(!0)}>+ Add root</button>
1209
1366
  </div>
1210
1367
  <div class="filters">
1211
1368
  <div class="row search-row">
@@ -1216,7 +1373,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1216
1373
  .value=${this.#t.value}
1217
1374
  @input=${s=>this.#W(s)}
1218
1375
  />
1219
- ${this.#t.value?p`
1376
+ ${this.#t.value?h`
1220
1377
  <button
1221
1378
  class="search-clear-btn"
1222
1379
  title="Clear search"
@@ -1228,7 +1385,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1228
1385
  `:""}
1229
1386
  </div>
1230
1387
  <div class="row type-toggle">
1231
- ${ui.map(s=>p`
1388
+ ${fi.map(s=>h`
1232
1389
  <button
1233
1390
  class=${this.#s.value===s.value?"active":""}
1234
1391
  @click=${()=>this.#j(s.value)}
@@ -1237,10 +1394,10 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1237
1394
  </button>
1238
1395
  `)}
1239
1396
  </div>
1240
- ${e.tags.length===0?p`<span class="filter-label">Tags:</span> <label class="small">no tags yet</label>`:p`
1397
+ ${e.tags.length===0?h`<span class="filter-label">Tags:</span> <label class="small">no tags yet</label>`:h`
1241
1398
  <tag-multiselect
1242
1399
  .tags=${e.tags}
1243
- .active=${this.#i.value}
1400
+ .active=${this.#r.value}
1244
1401
  .onToggle=${s=>this.#Z(s)}
1245
1402
  ></tag-multiselect>
1246
1403
  `}
@@ -1249,7 +1406,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1249
1406
  <input
1250
1407
  type="date"
1251
1408
  aria-label="From date"
1252
- .value=${this.#f.value}
1409
+ .value=${this.#m.value}
1253
1410
  @change=${s=>this.#te(s)}
1254
1411
  />
1255
1412
  <span class="date-range-sep">–</span>
@@ -1259,7 +1416,7 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1259
1416
  .value=${this.#v.value}
1260
1417
  @change=${s=>this.#se(s)}
1261
1418
  />
1262
- ${this.#f.value||this.#v.value?p`
1419
+ ${this.#m.value||this.#v.value?h`
1263
1420
  <button
1264
1421
  class="date-range-clear"
1265
1422
  title="Clear date range"
@@ -1271,59 +1428,59 @@ This removes the doc's key, tags, and status — it drops out of key-based looku
1271
1428
  `:""}
1272
1429
  </div>
1273
1430
  <span class="filter-label">Sort:</span>
1274
- <select .value=${this.#g.value} @change=${s=>this.#J(s)}>
1431
+ <select .value=${this.#b.value} @change=${s=>this.#J(s)}>
1275
1432
  <option value="mtime_desc">Recently touched</option>
1276
1433
  <option value="mtime_asc">Least recently touched</option>
1277
1434
  <option value="created_at_asc">Oldest first</option>
1278
1435
  <option value="name_asc">Name</option>
1279
1436
  </select>
1280
1437
  <span class="filter-label">Deprecated:</span>
1281
- <select .value=${this.#m.value} @change=${s=>this.#X(s)}>
1282
- ${it.map(s=>p`<option value=${s.value}>${s.label}</option>`)}
1438
+ <select .value=${this.#x.value} @change=${s=>this.#X(s)}>
1439
+ ${rt.map(s=>h`<option value=${s.value}>${s.label}</option>`)}
1283
1440
  </select>
1284
1441
  <span class="filter-label">Paused:</span>
1285
1442
  <select .value=${this.#k.value} @change=${s=>this.#ee(s)}>
1286
- ${it.map(s=>p`<option value=${s.value}>${s.label}</option>`)}
1443
+ ${rt.map(s=>h`<option value=${s.value}>${s.label}</option>`)}
1287
1444
  </select>
1288
1445
  </div>
1289
1446
  </div>
1290
- ${this.#d.value.size>0?p`
1447
+ ${this.#g.value.size>0?h`
1291
1448
  <div class="bulk-bar">
1292
- <span>${this.#d.value.size} selected</span>
1449
+ <span>${this.#g.value.size} selected</span>
1293
1450
  <button @click=${()=>this.#E(!0)}>Mark deprecated</button>
1294
1451
  <button @click=${()=>this.#E(!1)}>Un-deprecate</button>
1295
1452
  <button @click=${()=>this.#z(!0)}>Pause</button>
1296
1453
  <button @click=${()=>this.#z(!1)}>Resume</button>
1297
1454
  <button class="danger" @click=${()=>this.#ae()}>Delete</button>
1298
- <button @click=${()=>this.#d.set(new Set)}>Clear</button>
1455
+ <button @click=${()=>this.#g.set(new Set)}>Clear</button>
1299
1456
  </div>
1300
1457
  `:""}
1301
1458
  <div class="body-region">
1302
1459
  <result-list
1303
- style=${`width: ${this.#b.value}%; border-right: 1px solid var(--border);`}
1304
- .results=${this.#h.value}
1460
+ style=${`width: ${this.#u.value}%; border-right: 1px solid var(--border);`}
1461
+ .results=${this.#d.value}
1305
1462
  .showRoot=${t.length>1}
1306
1463
  .onSelect=${s=>this.#G(s)}
1307
- .selectedIds=${this.#d.value}
1464
+ .selectedIds=${this.#g.value}
1308
1465
  .onToggleSelect=${s=>this.#re(s)}
1309
1466
  ></result-list>
1310
1467
  <div
1311
- class="splitter ${this.#x.value?"dragging":""}"
1312
- @pointerdown=${s=>this.#I(s)}
1468
+ class="splitter ${this.#f.value?"dragging":""}"
1469
+ @pointerdown=${s=>this.#M(s)}
1313
1470
  ></div>
1314
1471
  <detail-panel
1315
- .selected=${this.#c.value}
1472
+ .selected=${this.#o.value}
1316
1473
  .facets=${e}
1317
- .onChanged=${()=>this.#a()}
1474
+ .onChanged=${()=>{this.#l(),this.#$()}}
1318
1475
  .onTagClick=${s=>this.#K(s)}
1319
1476
  .onRootClick=${s=>this.#Q(s)}
1320
1477
  .onDateClick=${s=>this.#V(s)}
1321
1478
  ></detail-panel>
1322
1479
  </div>
1323
- ${this.#l.value?p`<add-root-modal
1480
+ ${this.#h.value?h`<add-root-modal
1324
1481
  .defaultKind=${"skill"}
1325
1482
  .lockKind=${!1}
1326
- .onAdded=${()=>this.#C()}
1327
- .onCancel=${()=>this.#l.set(!1)}
1483
+ .onAdded=${()=>this.#R()}
1484
+ .onCancel=${()=>this.#h.set(!1)}
1328
1485
  ></add-root-modal>`:""}
1329
- `}}customElements.define("mem-bucket-app",$i);
1486
+ `}}customElements.define("mem-bucket-app",wi);