Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@benev/slate

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@benev/slate - npm Package Compare versions

Comparing version 0.1.0-x.4 to 0.1.0-x.5

2

package.json
{
"name": "@benev/slate",
"version": "0.1.0-x.4",
"version": "0.1.0-x.5",
"description": "frontend web stuff",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -6,2 +6,3 @@

import {Init, Mount, Unmount} from "./types.js"
import {deep} from "../../../../tools/deep/deep.js"
import {Signal} from "../../../../signals/signal.js"

@@ -11,3 +12,2 @@ import {maptool} from "../../../../tools/maptool.js"

import {OpSignal} from "../../../../signals/op_signal.js"
import { deep } from "../../../../pure.js"

@@ -14,0 +14,0 @@ export class Use<C extends Context = Context> {

@@ -1,2 +0,2 @@

Array.prototype.at=function(t){return t>=0?this[t]:this[this.length+t]};const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),s=new WeakMap;let n=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const r=this.t;if(e&&void 0===t){const e=void 0!==r&&1===r.length;e&&(t=s.get(r)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(r,t))}return t}toString(){return this.cssText}};const i=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,r,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1]),t[0]);return new n(s,t,r)},o=(r,s)=>{if(e)r.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),n=t.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=e.cssText,r.appendChild(s)}},a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:c,defineProperty:h,getOwnPropertyDescriptor:l,getOwnPropertyNames:f,getOwnPropertySymbols:u,getPrototypeOf:d}=Object,p=globalThis,w=p.trustedTypes,m=w?w.emptyScript:"",v=p.reactiveElementPolyfillSupport,y=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},g=(t,e)=>!c(t,e),$={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:g};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class _ extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,e);void 0!==s&&h(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){const{get:s,set:n}=l(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const i=s?.call(this);n.call(this,e),this.requestUpdate(t,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??$}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=d(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...f(t),...u(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return o(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EO(t,e){const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(void 0!==s&&!0===r.reflect){const n=(void 0!==r.converter?.toAttribute?r.converter:b).toAttribute(e,r.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){const r=this.constructor,s=r._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=r.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=s,this[s]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,r,s=!1,n){if(void 0!==t){if(r??=this.constructor.getPropertyOptions(t),!(r.hasChanged??g)(s?n:this[t],e))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),!0===r.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t)!0!==r.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[y("elementProperties")]=new Map,_[y("finalized")]=new Map,v?.({ReactiveElement:_}),(p.reactiveElementVersions??=[]).push("2.0.0");const E=globalThis,A=E.trustedTypes,k=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",C=`lit$${(Math.random()+"").slice(9)}$`,M="?"+C,P=`<${M}>`,S=document,x=()=>S.createComment(""),W=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,U="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,H=/>/g,R=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,q=/"/g,D=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),B=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),V=new WeakMap,Z=S.createTreeWalker(S,129);function F(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}const J=(t,e)=>{const r=t.length-1,s=[];let n,i=2===e?"<svg>":"",o=O;for(let e=0;e<r;e++){const r=t[e];let a,c,h=-1,l=0;for(;l<r.length&&(o.lastIndex=l,c=o.exec(r),null!==c);)l=o.lastIndex,o===O?"!--"===c[1]?o=N:void 0!==c[1]?o=H:void 0!==c[2]?(D.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=R):void 0!==c[3]&&(o=R):o===R?">"===c[0]?(o=n??O,h=-1):void 0===c[1]?h=-2:(h=o.lastIndex-c[2].length,a=c[1],o=void 0===c[3]?R:'"'===c[3]?q:z):o===q||o===z?o=R:o===N||o===H?o=O:(o=R,n=void 0);const f=o===R&&t[e+1].startsWith("/>")?" ":"";i+=o===O?r+P:h>=0?(s.push(a),r.slice(0,h)+T+r.slice(h)+C+f):r+C+(-2===h?e:f)}return[F(t,i+(t[r]||"<?>")+(2===e?"</svg>":"")),s]};class K{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let n=0,i=0;const o=t.length-1,a=this.parts,[c,h]=J(t,e);if(this.el=K.createElement(c,r),Z.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<o;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(T)){const e=h[i++],r=s.getAttribute(t).split(C),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:r,ctor:"."===o[1]?tt:"?"===o[1]?et:"@"===o[1]?rt:Y}),s.removeAttribute(t)}else t.startsWith(C)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(D.test(s.tagName)){const t=s.textContent.split(C),e=t.length-1;if(e>0){s.textContent=A?A.emptyScript:"";for(let r=0;r<e;r++)s.append(t[r],x()),Z.nextNode(),a.push({type:2,index:++n});s.append(t[e],x())}}}else if(8===s.nodeType)if(s.data===M)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(C,t+1));)a.push({type:7,index:n}),t+=C.length-1}n++}}static createElement(t,e){const r=S.createElement("template");return r.innerHTML=t,r}}function G(t,e,r=t,s){if(e===B)return e;let n=void 0!==s?r._$Co?.[s]:r._$Cl;const i=W(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),void 0===i?n=void 0:(n=new i(t),n._$AT(t,r,s)),void 0!==s?(r._$Co??=[])[s]=n:r._$Cl=n),void 0!==n&&(e=G(t,n._$AS(t,e.values),n,s)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??S).importNode(e,!0);Z.currentNode=s;let n=Z.nextNode(),i=0,o=0,a=r[0];for(;void 0!==a;){if(i===a.index){let e;2===a.type?e=new X(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new st(n,this,t)),this._$AV.push(e),a=r[++o]}i!==a?.index&&(n=Z.nextNode(),i++)}return Z.currentNode=S,s}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),W(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==I&&W(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:r}=t,s="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=K.createElement(F(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new Q(s,this),r=t.u(this.options);t.p(e),this.$(r),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new K(t)),e}T(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,s=0;for(const n of t)s===e.length?e.push(r=new X(this.k(x()),this.k(x()),this,this.options)):r=e[s],r._$AI(n),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,n){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=I}_$AI(t,e=this,r,s){const n=this.strings;let i=!1;if(void 0===n)t=G(this,t,e,0),i=!W(t)||t!==this._$AH&&t!==B,i&&(this._$AH=t);else{const s=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=G(this,s[r+o],e,o),a===B&&(a=this._$AH[o]),i||=!W(a)||a!==this._$AH[o],a===I?t=I:t!==I&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}i&&!s&&this.O(t)}O(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===I?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==I)}}class rt extends Y{constructor(t,e,r,s,n){super(t,e,r,s,n),this.type=5}_$AI(t,e=this){if((t=G(this,t,e,0)??I)===B)return;const r=this._$AH,s=t===I&&r!==I||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==I&&(r===I||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class st{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const nt=E.litHtmlPolyfillSupport;nt?.(K,X),(E.litHtmlVersions??=[]).push("3.1.0");const it=(t,e,r)=>{const s=r?.renderBefore??e;let n=s._$litPart$;if(void 0===n){const t=r?.renderBefore??null;s._$litPart$=n=new X(e.insertBefore(x(),t),t,void 0,r??{})}return n._$AI(t),n};let ot=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=it(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}};ot._$litElement$=!0,ot.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ot});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:ot}),(globalThis.litElementVersions??=[]).push("4.0.0");var ct,ht=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},lt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class ft{constructor(){ct.set(this,!1)}lock(t){ht(this,ct,!0,"f");const e=t();return ht(this,ct,!1,"f"),e}get locked(){return lt(this,ct,"f")}}ct=new WeakMap;const ut=()=>new Map,dt=()=>new Set;function pt(t){return{guarantee:(e,r)=>function(t,e,r){if(t.has(e))return t.get(e);{const s=r();return t.set(e,s),s}}(t,e,r)}}var wt,mt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},vt=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class yt{constructor(){wt.set(this,new WeakMap)}grab_keymap(t){const e=pt(mt(this,wt,"f")).guarantee(t,ut);return{keymap:e,grab_symbolmap:t=>pt(e).guarantee(t,ut)}}clear(){vt(this,wt,new WeakMap,"f")}}wt=new WeakMap;var bt,gt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class $t{constructor(){bt.set(this,new Map)}stop(t){const e=gt(this,bt,"f").get(t);e&&(gt(this,bt,"f").delete(t),e())}add(t,e){gt(this,bt,"f").set(t,e)}}bt=new WeakMap;var _t,Et=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class At{constructor(){_t.set(this,[])}record(t){const e=ut();Et(this,_t,"f").push(e);const r=t();return Et(this,_t,"f").pop(),{payload:r,recording:e}}record_that_key_was_accessed(t,e){const r=Et(this,_t,"f").at(-1);if(r){pt(r).guarantee(t,dt).add(e)}}}_t=new WeakMap;class kt extends Error{constructor(){super(...arguments),this.name=this.constructor.name}}class Tt extends kt{constructor(t){super(`forbidden circularity, rejected assignment to "${t}"`)}}class Ct extends kt{constructor(t){super(`forbidden assignment to readonly property "${t}"`)}}function Mt(t,e){let r,s,n=[];function i(){r=[],s&&clearTimeout(s),s=void 0,n=[]}return i(),(...o)=>{r=o,s&&clearTimeout(s);const a=new Promise(((t,e)=>{n.push({resolve:t,reject:e})}));return s=setTimeout((()=>{Promise.resolve().then((()=>e(...r))).then((t=>{for(const{resolve:e}of n)e(t);i()})).catch((t=>{for(const{reject:e}of n)e(t);i()}))}),t),a}}var Pt,St,xt,Wt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},jt=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class Ut{constructor(){Pt.set(this,new Map),St.set(this,Promise.resolve()),xt.set(this,Mt(0,(()=>{const t=[...Wt(this,Pt,"f").values()];Wt(this,Pt,"f").clear();for(const e of t)e()})))}get wait(){return Wt(this,St,"f")}add(t,e){Wt(this,Pt,"f").set(t,e),jt(this,St,Wt(this,xt,"f").call(this),"f")}}function Ot(t,e,r,s){const n=[];for(const[i,o]of e){const{grab_symbolmap:e}=r.grab_keymap(i);for(const r of o){const i=e(r);i.set(t,s),n.push((()=>i.delete(t)))}}return()=>n.forEach((t=>t()))}Pt=new WeakMap,St=new WeakMap,xt=new WeakMap;var Nt,Ht,Rt,zt,qt,Dt,Lt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Bt{constructor(){Nt.set(this,new yt),Ht.set(this,new At),Rt.set(this,new ft),zt.set(this,new $t),qt.set(this,new Ut),Dt.set(this,function(t,e,r,s,n){function i([r,n]){if("lean"in n)n.actor();else{const{payload:i,recording:o}=e.record(n.collector);s.add(r,Ot(r,o,t,n)),n.responder&&n.responder(i)}}return{get:(t,r)=>(e.record_that_key_was_accessed(t,r),t[r]),set:(e,s,o)=>{if(r.locked)throw new Tt(s);e[s]=o;const a=[...t.grab_keymap(e).grab_symbolmap(s)];for(const t of a){const[e]=t;n.add(e,(()=>r.lock((()=>i(t)))))}return!0}}}(Lt(this,Nt,"f"),Lt(this,Ht,"f"),Lt(this,Rt,"f"),Lt(this,zt,"f"),Lt(this,qt,"f")))}get wait(){return Lt(this,qt,"f").wait}state(t){return new Proxy(t,Lt(this,Dt,"f"))}reaction(t,e){const r=Symbol(),{recording:s}=Lt(this,Ht,"f").record((()=>Lt(this,Rt,"f").lock(t)));return Lt(this,zt,"f").add(r,Ot(r,s,Lt(this,Nt,"f"),{collector:t,responder:e})),()=>Lt(this,zt,"f").stop(r)}lean(t){const e=Symbol();return{stop:()=>Lt(this,zt,"f").stop(e),collect:r=>{const{payload:s,recording:n}=Lt(this,Ht,"f").record((()=>Lt(this,Rt,"f").lock(r)));return Lt(this,zt,"f").add(e,Ot(e,n,Lt(this,Nt,"f"),{lean:!0,actor:t})),s}}}clear(){Lt(this,Nt,"f").clear()}}Nt=new WeakMap,Ht=new WeakMap,Rt=new WeakMap,zt=new WeakMap,qt=new WeakMap,Dt=new WeakMap,Bt.readonly=function(t){return new Proxy(t,{get:(t,e)=>t[e],set(t,e){throw new Ct(e)}})},Bt.collectivize=function(t){return function(e){return()=>{const r="function"==typeof t?t():t;return e(r)}}};var It,Vt=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},Zt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Ft{constructor(t){It.set(this,void 0),Vt(this,It,t,"f")}get state(){return Zt(this,It,"f").getter(Zt(this,It,"f").parent.state)}transmute(t){Zt(this,It,"f").parent.transmute((e=>{const r=Zt(this,It,"f").getter(e),s=t(r);return Zt(this,It,"f").setter(e,s)}))}slice({getter:t,setter:e}){return new Ft({parent:this,getter:t,setter:e})}}It=new WeakMap;const Jt=t=>"object"==typeof t&&null!==t;const Kt={equal:(t,e)=>function t(e,r,s){if(!Jt(e)||!Jt(r))return e===r;if(s.includes(e))throw new Error("forbidden circularity detected in deep equal comparison");const n=[...s,e];if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[s,i]of e)if(!r.has(s)||!t(i,r.get(s),n))return!1}else if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const s of e)if(!Array.from(r).some((e=>t(s,e,n))))return!1}else{const s=Object.keys(e),i=Object.keys(r);if(s.length!==i.length)return!1;for(const o of s){if(!i.includes(o))return!1;if(!t(e[o],r[o],n))return!1}}return!0}(t,e,[]),freeze:function(t){return function t(e,r){if(!Jt(e)||r.includes(e))return e;const s=[...r,e];if(e instanceof Map)for(const r of e.entries())for(const e of r)t(e,s);else if(e instanceof Set)for(const r of e)t(r,s);else if(Array.isArray(e))for(const r of e)t(r,s);else for(const r of Object.values(e))t(r,s);return Object.freeze(e)}(t,[])}};var Gt,Qt,Xt,Yt,te,ee,re=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},se=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class ne{constructor(t,e=(()=>{})){Gt.add(this),Qt.set(this,void 0),Xt.set(this,void 0),Yt.set(this,void 0),te.set(this,!1),se(this,Qt,structuredClone(t),"f"),se(this,Xt,re(this,Gt,"m",ee).call(this),"f"),se(this,Yt,e,"f")}get state(){return re(this,Xt,"f")}transmute(t){if(re(this,te,"f"))throw new Error("circular error");se(this,te,!0,"f"),se(this,Qt,t(structuredClone(re(this,Qt,"f"))),"f"),se(this,Xt,re(this,Gt,"m",ee).call(this),"f"),re(this,Yt,"f").call(this),se(this,te,!1,"f")}slice({getter:t,setter:e}){return new Ft({parent:this,getter:t,setter:e})}}Qt=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap,Gt=new WeakSet,ee=function(){return Kt.freeze(structuredClone(re(this,Qt,"f")))};var ie,oe,ae,ce,he=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},le=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};ie=new WeakMap,oe=new WeakMap,ae=new WeakMap,ce=new WeakMap;var fe,ue=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};fe=new WeakMap;const de=Error;var pe;function we(t){return{map:e=>me(t,e),filter:e=>ve(t,e)}}!function(t){function e(t,e){switch(t.status){case"loading":return e.loading();case"error":return e.error(t.reason);case"ready":return e.ready(t.payload);default:throw console.error("op",t),new de("invalid op status")}}t.loading=()=>({status:"loading"}),t.error=t=>({status:"error",reason:t}),t.ready=t=>({status:"ready",payload:t}),t.is=Object.freeze({loading:t=>"loading"===t.status,error:t=>"error"===t.status,ready:t=>"ready"===t.status}),t.payload=function(t){return"ready"===t.status?t.payload:void 0},t.reason=function(t){return"error"===t.status?t.reason:void 0},t.select=e,t.load=async function(e,r){e(t.loading());try{const s=await r();return e(t.ready(s)),s}catch(r){const s=r instanceof de?r.message:"string"==typeof r?r:"error";e(t.error(s))}},t.morph=function(r,s){return e(r,{loading:()=>t.loading(),error:e=>t.error(e),ready:e=>t.ready(s(e))})}}(pe||(pe={})),we.pipe=Object.freeze({map:t=>e=>me(e,t),filter:t=>e=>ve(e,t)});const me=(t,e)=>Object.fromEntries(Object.entries(t).map((([t,r])=>[t,e(r,t)]))),ve=(t,e)=>Object.fromEntries(Object.entries(t).filter((([t,r])=>e(r,t)))),ye=Symbol();class be extends Error{constructor(){super(...arguments),this.name=this.constructor.name}}var ge,$e,_e,Ee,Ae,ke,Te=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},Ce=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Me{constructor(t){ge.set(this,void 0),$e.set(this,!1),_e.set(this,void 0),Ee.set(this,new Set),this[ke]=!1,Ae.set(this,Mt(0,(()=>{const t=Ce(this,ge,"f");Te(this,$e,!0,"f");for(const e of Ce(this,Ee,"f"))e(t);return Te(this,$e,!1,"f"),t}))),Te(this,ge,t,"f"),Te(this,_e,Promise.resolve(t),"f")}subscribe(t){return Ce(this,Ee,"f").add(t),()=>{Ce(this,Ee,"f").delete(t)}}once(t){const e=r=>{t(r),Ce(this,Ee,"f").delete(e)};return Ce(this,Ee,"f").add(e),()=>{Ce(this,Ee,"f").delete(e)}}clear(){return Ce(this,Ee,"f").clear()}async publish(){Te(this,_e,Ce(this,Ae,"f").call(this),"f"),await Ce(this,_e,"f")}get wait(){return Ce(this,_e,"f")}get value(){return this[ye]=!0,Ce(this,ge,"f")}set value(t){if(Ce(this,$e,"f"))throw new be("you can't set a signal in a signal's subscription listener (infinite loop forbidden)");Te(this,ge,t,"f"),this.publish()}}ge=new WeakMap,$e=new WeakMap,_e=new WeakMap,Ee=new WeakMap,Ae=new WeakMap,ke=ye,Me.unwrap=t=>t instanceof Me?t.value:t;class Pe extends Me{constructor(t){super(t)}async load(t){return pe.load((t=>this.value=t),t)}setLoading(){this.value=pe.loading()}setError(t){this.value=pe.error(t)}setReady(t){this.value=pe.ready(t)}isLoading(){return pe.is.loading(this.value)}isError(){return pe.is.error(this.value)}isReady(){return pe.is.ready(this.value)}get payload(){return pe.payload(this.value)}select(t){return pe.select(this.value,t)}}var Se,xe,We,je,Ue,Oe,Ne,He,Re,ze=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},qe=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class De{constructor({all_signals:t,waiters:e}){Se.add(this),xe.set(this,!0),We.set(this,void 0),je.set(this,void 0),Ue.set(this,new Set),Oe.set(this,new Set),Ne.set(this,Mt(0,(t=>{if(qe(this,xe,"f"))if("lean"in t)t.actor();else{const{payload:e,recording:r}=this.observe(t.collector);this.add_listeners(t,r),t.responder&&t.responder(e)}}))),ze(this,We,t,"f"),ze(this,je,e,"f")}observe(t){qe(this,Se,"m",He).call(this);return{payload:t(),recording:qe(this,Se,"a",Re)}}add_listeners(t,e){for(const r of e)qe(this,Ue,"f").add(r),qe(this,Oe,"f").add(r.subscribe((()=>qe(this,je,"f").add(qe(this,Ne,"f").call(this,t)))))}shutdown(){ze(this,xe,!1,"f"),qe(this,Oe,"f").forEach((t=>t()))}}xe=new WeakMap,We=new WeakMap,je=new WeakMap,Ue=new WeakMap,Oe=new WeakMap,Ne=new WeakMap,Se=new WeakSet,He=function(){for(const t of qe(this,We,"f"))t[ye]=!1},Re=function(){return[...qe(this,We,"f")].filter((t=>t[ye]&&!qe(this,Ue,"f").has(t)))};var Le,Be,Ie=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};Le=new WeakMap,Be=new WeakMap;const Ve=new Bt,Ze=new class{constructor(){Le.set(this,new Set),Be.set(this,new Set)}signal(t){const e=new Me(t);return Ie(this,Le,"f").add(e),e}computed(t){const e=this.signal(t());return this.reaction((()=>{e.value=t()})),e}op(t=pe.loading()){const e=new Pe(t);return Ie(this,Le,"f").add(e),e}many(t){return we(t).map((t=>this.signal(t)))}reaction(t,e){const r=new De({waiters:Ie(this,Be,"f"),all_signals:Ie(this,Le,"f")}),s={collector:t,responder:e},{recording:n}=r.observe(s.collector);return r.add_listeners(s,n),()=>r.shutdown()}lean(t){const e=new De({waiters:Ie(this,Be,"f"),all_signals:Ie(this,Le,"f")}),r={lean:!0,actor:t};return{stop:()=>e.shutdown(),collect:t=>{const{payload:s,recording:n}=e.observe(t);return e.add_listeners(r,n),s}}}get wait(){return Promise.all([...Ie(this,Le,"f")].map((t=>t.wait))).then((()=>Promise.all([...Ie(this,Be,"f")]))).then((()=>{Ie(this,Be,"f").clear()}))}},Fe=new class{constructor(t){ie.set(this,void 0),oe.set(this,new Set),ae.set(this,new Set),ce.set(this,new Map),he(this,ie,t,"f")}dispatch(){for(const t of le(this,oe,"f"))t();for(const t of le(this,ae,"f"))t()}computed(t){const e=le(this,ie,"f").signal(t());return le(this,oe,"f").add((()=>{e.value=t()})),e}track(t,e){let r=!0;const s=()=>{const s=t(),n=le(this,ce,"f").get(t);!r&&Kt.equal(s,n)||(r=!1,le(this,ce,"f").set(t,s),e(s))};return s(),le(this,ae,"f").add(s),t()}stateTree(t){return new ne(t,(()=>this.dispatch()))}}(Ze);Ve.state.bind(Ve),Ze.signal.bind(Ze);const Je=new class{constructor(t,e){this.flat=t,this.signals=e,fe.set(this,Promise.resolve())}get wait(){return Promise.all([this.flat.wait,this.signals.wait]).then((()=>ue(this,fe,"f")))}reaction(t,e){const r=e?()=>e(n()):()=>n(),s=this.lean(r),n=()=>s.collect(t);return n(),s.stop}lean(t){const e=this.flat.lean(t),r=this.signals.lean(t);return{stop(){e.stop(),r.stop()},collect:t=>e.collect((()=>r.collect(t)))}}}(Ve,Ze);var Ke=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Ge extends(function(t){var e,r,s;return s=class extends t{constructor(){super(...arguments),e.set(this,(new Set).add((()=>this.setup()))),r.set(this,new Set)}register_setup(t){Ke(this,e,"f").add(t)}setup(){return()=>{}}connectedCallback(){for(const t of Ke(this,e,"f"))Ke(this,r,"f").add(t())}disconnectedCallback(){for(const t of Ke(this,r,"f"))t();Ke(this,r,"f").clear()}},e=new WeakMap,r=new WeakMap,s}(HTMLElement)){}function Qe(){let t,e;return{promise:new Promise(((r,s)=>{t=r,e=s})),resolve:t,reject:e}}function Xe(t,e){o(t,function(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}(e))}var Ye,tr,er,rr,sr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},nr=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class ir extends Ge{static get styles(){}init(){}constructor(){super(),Ye.set(this,void 0),tr.set(this,Qe()),er.set(this,nr(this,tr,"f").promise),rr.set(this,Mt(0,(()=>{const t=nr(this,Ye,"f"),e=this.render();e&&it(e,t,{host:this})}))),sr(this,Ye,this.attachShadow({mode:"open"}),"f");const t=this.constructor;Xe(nr(this,Ye,"f"),t.styles),this.init()}get root(){return nr(this,Ye,"f")}get updateComplete(){return nr(this,er,"f").then((()=>!0))}render(){}async requestUpdate(){const t=nr(this,rr,"f").call(this);return nr(this,tr,"f")&&(t.then(nr(this,tr,"f").resolve),sr(this,tr,void 0,"f")),sr(this,er,t,"f"),t}connectedCallback(){super.connectedCallback(),this.requestUpdate()}}Ye=new WeakMap,tr=new WeakMap,er=new WeakMap,rr=new WeakMap;var or,ar=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};or=new WeakMap;var cr,hr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},lr=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class fr{constructor(t){cr.set(this,void 0),hr(this,cr,t,"f")}get context(){if(lr(this,cr,"f"))return lr(this,cr,"f");throw new Error("nexus.context was not set, but it's necessary")}set context(t){hr(this,cr,t,"f")}}cr=new WeakMap;var ur,dr=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},pr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};function wr(t){return[t].flat().filter((t=>!!t))}!function(t){t.css=function(...t){return function(e){return class extends e{static get styles(){return vr(e.styles,t)}}}},t.css_deferred=function(t){return function(e){return class extends e{static get styles(){return vr(e.styles,t())}}}},t.signals=function(t){return function(e){var r,s;return s=class extends e{constructor(){super(...arguments),r.set(this,null)}render(){var t;return null===(t=dr(this,r,"f"))||void 0===t?void 0:t.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),pr(this,r,t.lean((()=>this.requestUpdate())),"f")}disconnectedCallback(){super.disconnectedCallback(),dr(this,r,"f")&&(dr(this,r,"f").stop(),pr(this,r,null,"f"))}},r=new WeakMap,s}},t.flat=function(t){return function(e){var r,s;return s=class extends e{constructor(){super(...arguments),r.set(this,null)}render(){var t;return null===(t=dr(this,r,"f"))||void 0===t?void 0:t.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),pr(this,r,t.lean((()=>this.requestUpdate())),"f")}disconnectedCallback(){super.disconnectedCallback(),dr(this,r,"f")&&(dr(this,r,"f").stop(),pr(this,r,null,"f"))}},r=new WeakMap,s}},t.reactor=function(t=Je){return function(e){var r,s;return s=class extends e{constructor(){super(...arguments),r.set(this,null)}render(){var t;return null===(t=dr(this,r,"f"))||void 0===t?void 0:t.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),pr(this,r,t.lean((()=>this.requestUpdate())),"f")}disconnectedCallback(){super.disconnectedCallback(),dr(this,r,"f")&&(dr(this,r,"f").stop(),pr(this,r,null,"f"))}},r=new WeakMap,s}}}(ur||(ur={}));const mr=t=>void 0!==t;function vr(t,e){var r;return[...null!==(r=wr(t))&&void 0!==r?r:[],...wr(e)].flat().filter(mr)}var yr,br,gr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},$r=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class _r{static with(t){return new this(t)}constructor(t){yr.set(this,void 0),gr(this,yr,t,"f")}to(t){return new _r(t($r(this,yr,"f")))}done(){return $r(this,yr,"f")}}yr=new WeakMap,function(t){t.css=t=>e=>we(e).map((e=>ur.css(t)(e))),t.flat=t=>e=>we(e).map((e=>ur.flat(t)(e))),t.signals=t=>e=>we(e).map((e=>ur.signals(t)(e))),t.reactor=(t=Je)=>e=>we(e).map((e=>ur.reactor(t)(e))),t.context=e=>r=>_r.with(r).to(t.css(e.theme)).to(t.reactor()).done()}(br||(br={}));const Er=2;class Ar{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const kr=(t,e)=>{const r=t._$AN;if(void 0===r)return!1;for(const t of r)t._$AO?.(e,!1),kr(t,e);return!0},Tr=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===r?.size)},Cr=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(void 0===r)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),Sr(e)}};function Mr(t){void 0!==this._$AN?(Tr(this),this._$AM=t,Cr(this)):this._$AM=t}function Pr(t,e=!1,r=0){const s=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(s))for(let t=r;t<s.length;t++)kr(s[t],!1),Tr(s[t]);else null!=s&&(kr(s,!1),Tr(s));else kr(this,t)}const Sr=t=>{t.type==Er&&(t._$AP??=Pr,t._$AQ??=Mr)};class xr extends Ar{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Cr(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(kr(this,t),Tr(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Wr=Symbol();var jr,Ur,Or=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Nr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class Hr{constructor(){jr.set(this,0)}pull(){var t,e;return Nr(this,jr,(e=Or(this,jr,"f"),t=e++,e),"f"),t}reset(){Nr(this,jr,0,"f")}}function Rr(){const t=new Set;function e(e){return t.add(e),()=>{t.delete(e)}}return e.publish=e=>{for(const r of t)r(e)},e.clear=()=>t.clear(),e.once=e=>{const r=s=>{e(s),t.delete(r)};return t.add(r),()=>{t.delete(r)}},e}jr=new WeakMap,function(t){t.actualize=function t(e,r){return we(r).map((r=>"function"==typeof r?(...t)=>{e.transmute((e=>(r(e,(t=>{e=t}))(...t),e)))}:t(e,r)))},t.fn=function(){return t=>t},t.blueprint=function(){return t=>t},t.prepFn=t=>e=>(r,s)=>(...n)=>(e(t(r,s))(...n),r),t.prepBlueprint=e=>r=>r(t.prepFn(e)),t.prep=function(e){return{action:t.prepFn(e),blueprint:t.prepBlueprint(e)}}}(Ur||(Ur={}));var zr,qr,Dr,Lr,Br,Ir,Vr,Zr,Fr,Jr,Kr,Gr,Qr,Xr,Yr,ts,es,rs=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},ss=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class ns{constructor(t,e){this[es]={wrap:t=>(...e)=>(ss(this,Dr,"f").reset(),t(...e)),disconnect:()=>{for(const t of ss(this,Br,"f"))t();ss(this,Br,"f").clear();for(const t of ss(this,Zr,"f"))t();ss(this,Zr,"f").clear(),ss(this,Vr,"f").clear()},reconnect:()=>{for(const t of ss(this,Lr,"f").values())ss(this,Br,"f").add(t());for(const[t,e]of ss(this,Ir,"f").entries()){const[r,s]=e();ss(this,Vr,"f").set(t,r),ss(this,Zr,"f").add(s)}},afterRender:()=>{for(const[t,e]of ss(this,Jr,"f")){const r=e();ss(this,Kr,"f").set(t,r)}}},zr.set(this,void 0),qr.set(this,void 0),Dr.set(this,new Hr),Lr.set(this,new Map),Br.set(this,new Set),Ir.set(this,new Map),Vr.set(this,new Map),Zr.set(this,new Set),Fr.set(this,new Map),Jr.set(this,new Map),Kr.set(this,new Map),Gr.set(this,new Map),Qr.set(this,new Map),Xr.set(this,new Map),Yr.set(this,new Map),ts.set(this,new Map),rs(this,qr,t,"f"),rs(this,zr,e,"f")}get context(){return ss(this,zr,"f")}rerender(){ss(this,qr,"f").call(this)}mount(t){const e=ss(this,Dr,"f").pull();ss(this,Lr,"f").has(e)||(ss(this,Lr,"f").set(e,t),ss(this,Br,"f").add(t()))}init(t){const e=ss(this,Dr,"f").pull();if(!ss(this,Ir,"f").has(e)){ss(this,Ir,"f").set(e,t);const[r,s]=t();return ss(this,Vr,"f").set(e,r),ss(this,Zr,"f").add(s),r}return ss(this,Vr,"f").get(e)}once(t){const e=ss(this,Dr,"f").pull();return pt(ss(this,Fr,"f")).guarantee(e,t)}defer(t){const e=ss(this,Dr,"f").pull();return ss(this,Jr,"f").has(e)||ss(this,Jr,"f").set(e,t),ss(this,Kr,"f").get(e)}state(t){const e=ss(this,Dr,"f").pull();return[pt(ss(this,Gr,"f")).guarantee(e,(()=>"function"==typeof t?t():t)),t=>{ss(this,Gr,"f").set(e,t),ss(this,qr,"f").call(this)},()=>ss(this,Gr,"f").get(e)]}flatstate(t){const e=ss(this,Dr,"f").pull();return pt(ss(this,Qr,"f")).guarantee(e,(()=>Ve.state("function"==typeof t?t():t)))}signal(t){const e=ss(this,Dr,"f").pull();return pt(ss(this,Xr,"f")).guarantee(e,(()=>Ze.signal("function"==typeof t?t():t)))}computed(t){const e=ss(this,Dr,"f").pull();return pt(ss(this,Xr,"f")).guarantee(e,(()=>Ze.computed(t)))}op(){const t=ss(this,Dr,"f").pull();return pt(ss(this,Xr,"f")).guarantee(t,(()=>Ze.op()))}watch(t){const e=ss(this,Dr,"f").pull();return pt(ss(this,Yr,"f")).guarantee(e,(()=>Fe.track(t,(t=>{ss(this,Yr,"f").set(e,t),ss(this,qr,"f").call(this)}))))}effect(t,e){e=e.map(Me.unwrap);const r=ss(this,Dr,"f").pull(),s=ss(this,ts,"f").get(r);if(s){const[n,i]=s;Kt.equal(e,i)||(n(),ss(this,ts,"f").set(r,[t(),e]))}else{ss(this,Lr,"f").set(r,t);const s=t();ss(this,Br,"f").add(s),ss(this,ts,"f").set(r,[s,e])}}}zr=new WeakMap,qr=new WeakMap,Dr=new WeakMap,Lr=new WeakMap,Br=new WeakMap,Ir=new WeakMap,Vr=new WeakMap,Zr=new WeakMap,Fr=new WeakMap,Jr=new WeakMap,Kr=new WeakMap,Gr=new WeakMap,Qr=new WeakMap,Xr=new WeakMap,Yr=new WeakMap,ts=new WeakMap,es=Wr;var is,os,as,cs=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},hs=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class ls extends ns{get element(){return cs(this,is,"f")}get shadow(){return cs(this,os,"f")}styles(t){this.once((()=>Xe(this.shadow,[this.context.theme,null!=t?t:i``])))}constructor(t,e,r,s){super(r,s),is.set(this,void 0),os.set(this,void 0),hs(this,is,t,"f"),hs(this,os,e,"f")}}function fs(t){let e;return function(r){return e||(e=function(t,e){return as.on_change(t,(()=>t.requestUpdate())),as.proxy(t,e)}(t,r)),e}}is=new WeakMap,os=new WeakMap,function(t){t.proxy=(t,e)=>new Proxy(e,{get:(r,s)=>{const n=e[s],i=t.getAttribute(s);switch(n){case String:return null!=i?i:void 0;case Number:return null!==i?Number(i):void 0;case Boolean:return null!==i;default:throw new Error(`invalid attribute type for "${s}"`)}},set:(r,s,n)=>{switch(e[s]){case String:return t.setAttribute(s,n),!0;case Number:return t.setAttribute(s,n.toString()),!0;case Boolean:return n?t.setAttribute(s,""):t.removeAttribute(s),!0;default:throw new Error(`invalid attribute type for "${s}"`)}}}),t.on_change=function(t,e){const r=new MutationObserver(e);return r.observe(t,{attributes:!0}),()=>r.disconnect()}}(as||(as={}));class us extends ls{constructor(t,e,r,s){super(t,e,r,s),this.attrs=fs(t)}}var ds,ps=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},ws=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class ms extends ns{get element(){return ps(this,ds,"f")}constructor(t,e,r){super(e,r),ds.set(this,void 0),ws(this,ds,t,"f"),this.attrs=fs(t)}}ds=new WeakMap;class vs extends us{}class ys extends ms{}class bs extends ns{name(t){this.once((()=>this.element.setAttribute("view",t)))}constructor(t,e,r){super(e,r),this.element=t}}class gs extends ls{name(t){this.once((()=>this.element.setAttribute("view",t)))}}const $s=t=>{for(const[e,r]of Object.entries(t))customElements.define(e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase(),r)};class _s extends HTMLElement{constructor(){super(...arguments),this.onConnected=Rr(),this.onDisconnected=Rr()}connectedCallback(){this.onConnected.publish()}disconnectedCallback(){this.onDisconnected.publish()}}function Es(t,e){const r=Je.lean(e);return{stop:r.stop,render:(...e)=>r.collect((()=>t(...e)))}}_s.tag="slate-view",$s({SlateView:_s});var As=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},ks=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const Ts=t=>e=>{var r,s,n,i,o,a,c,h,l;return(t=>(...e)=>({_$litDirective$:t,values:e}))((l=class extends xr{constructor(){super(...arguments),r.add(this),s.set(this,void 0),n.set(this,document.createElement(_s.tag)),o.set(this,Mt(0,(()=>{As(this,s,"f")&&this.isConnected&&this.setValue(As(this,r,"m",i).call(this,this.render(...As(this,s,"f"))))}))),a.set(this,new bs(As(this,n,"f"),As(this,o,"f"),t.context)),c.set(this,As(this,a,"f")[Wr].wrap(e(As(this,a,"f")))),h.set(this,Es(As(this,c,"f"),As(this,o,"f")))}update(t,e){return As(this,r,"m",i).call(this,this.render(...e))}render(...t){var e;return ks(this,s,t,"f"),null===(e=As(this,h,"f"))||void 0===e?void 0:e.render(...t)}reconnected(){As(this,a,"f")[Wr].reconnect(),ks(this,h,Es(As(this,c,"f"),As(this,o,"f")),"f")}disconnected(){As(this,a,"f")[Wr].disconnect(),As(this,h,"f")&&(As(this,h,"f").stop(),ks(this,h,void 0,"f"))}},s=new WeakMap,n=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,h=new WeakMap,r=new WeakSet,i=function(t){return it(t,As(this,n,"f")),As(this,a,"f")[Wr].afterRender(),As(this,n,"f")},l))};function Cs(...t){const e=new Set,r=t.map((t=>null!=t?t:"")).flatMap(Ms);for(const t of r)e.add(t);return e}function Ms(t){return t.split(/\s+/).map((t=>t.trim())).filter((t=>!!t))}function Ps(t){return t.split(",").map((t=>t.trim())).filter((t=>!!t)).map((t=>t.includes(":")?t.split(":").map((t=>t.trim()))[1]:t))}function Ss(t,e){const r=Cs(t.getAttribute("part")),s=Cs(t.getAttribute("data-gpart")),n=function(t,e){return Object.fromEntries(Object.entries(e).map((([e,r])=>[e,Array.from(t.querySelectorAll(`[${r}]`)).map((t=>t.getAttribute(r)))])))}(e,{part:"part",gpart:"data-gpart",exportparts:"exportparts",gexportparts:"gexportparts"}),i=new Set([...n.part.flatMap(Ms),...n.exportparts.flatMap(Ps)]),o=new Set([...n.gpart.flatMap(Ms),...n.gexportparts.flatMap(Ms)]);i.size&&t.setAttribute("exportparts",[...r].flatMap(function(t,e){return r=>[...t].flatMap((t=>[`${t}:${r}-${t}`,...e.has(t)?[t]:[]]))}(i,o)).join(", ")),(o.size||t.hasAttribute("data-gpart"))&&t.setAttribute("gexportparts",[...o,...[...s].flatMap((t=>[...i].map((e=>`${t}-${e}`))))].join(" "))}function xs(t,e={},r={}){const{content:s,attrs:n={}}=e,{attrs:i={}}=r;function o(e,r,s,n){e!==r&&(void 0===e?t.removeAttribute(s):t.setAttribute(s,n()))}n&&function(t,e){for(const[r,s]of Object.entries(e))"string"==typeof s?t.setAttribute(r,s):"number"==typeof s?t.setAttribute(r,s.toString()):"boolean"==typeof s?!0===s?t.setAttribute(r,""):t.removeAttribute(r):void 0===s?t.removeAttribute(r):console.warn(`invalid attribute type ${r} is ${typeof s}`)}(t,n),o(n.class,null==i?void 0:i.class,"class",(()=>n.class)),o(n.part,null==i?void 0:i.part,"part",(()=>n.part)),o(n.gpart,null==i?void 0:i.gpart,"data-gpart",(()=>n.gpart)),s&&it(s,t,{host:t})}var Ws=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},js=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const Us=t=>e=>{var r,s,n,i,o,a,c,h;return(t=>(e,r={})=>({_$litDirective$:t,values:[{meta:r,props:e}]}))((h=class extends xr{constructor(){super(...arguments),r.set(this,void 0),s.set(this,!0),n.set(this,function({afterRender:t,onConnected:e,onDisconnected:r}){const s=document.createElement(_s.tag);s.onConnected(e),s.onDisconnected(r);const n=s.attachShadow({mode:"open"});let i=!1;return{container:s,shadow:n,set auto_exportparts(t){i=t},render_into_shadow:e=>(it(e,n),i&&Ss(s,n),t(),s)}}({afterRender:()=>Ws(this,o,"f")[Wr].afterRender(),onDisconnected:()=>this.disconnected(),onConnected:()=>{Ws(this,s,"f")||this.reconnected(),js(this,s,!1,"f")}})),i.set(this,Mt(0,(()=>{Ws(this,r,"f")&&this.isConnected&&this.setValue(Ws(this,n,"f").render_into_shadow(this.render(Ws(this,r,"f"))))}))),o.set(this,new gs(Ws(this,n,"f").container,Ws(this,n,"f").shadow,Ws(this,i,"f"),t.context)),a.set(this,Ws(this,o,"f")[Wr].wrap(e(Ws(this,o,"f")))),c.set(this,Es(Ws(this,a,"f"),Ws(this,i,"f")))}update(t,e){return Ws(this,n,"f").render_into_shadow(this.render(...e))}render(t){var e,s,i;return xs(Ws(this,n,"f").container,t.meta,null===(e=Ws(this,r,"f"))||void 0===e?void 0:e.meta),js(this,r,t,"f"),Ws(this,n,"f").auto_exportparts=null===(s=t.meta.auto_exportparts)||void 0===s||s,null===(i=Ws(this,c,"f"))||void 0===i?void 0:i.render(...t.props)}reconnected(){Ws(this,o,"f")[Wr].reconnect(),js(this,c,Es(Ws(this,a,"f"),Ws(this,i,"f")),"f")}disconnected(){Ws(this,o,"f")[Wr].disconnect(),Ws(this,c,"f")&&(Ws(this,c,"f").stop(),js(this,c,void 0,"f"))}},r=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,h))};var Os,Ns,Hs,Rs=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},zs=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class qs extends Ge{init(){}constructor(){super(),Os.set(this,Qe()),Ns.set(this,Rs(this,Os,"f").promise),Hs.set(this,Mt(0,(()=>{const t=this.render();it(t,this,{host:this})}))),this.init()}get updateComplete(){return Rs(this,Ns,"f").then((()=>!0))}render(){}async requestUpdate(){const t=Rs(this,Hs,"f").call(this);return Rs(this,Os,"f")&&(t.then(Rs(this,Os,"f").resolve),zs(this,Os,void 0,"f")),zs(this,Ns,t,"f"),t}connectedCallback(){super.connectedCallback(),this.requestUpdate()}}Os=new WeakMap,Ns=new WeakMap,Hs=new WeakMap;var Ds=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Ls=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const Bs=t=>e=>{var r,s,n,i;return i=class extends qs{constructor(){super(...arguments),r.set(this,new ys(this,(()=>{this.requestUpdate()}),t.context)),s.set(this,Ds(this,r,"f")[Wr].wrap((()=>e(Ds(this,r,"f"))))),n.set(this,void 0)}render(){var t;return this.updateComplete.then((()=>Ds(this,r,"f")[Wr].afterRender())),null===(t=Ds(this,n,"f"))||void 0===t?void 0:t.render()}connectedCallback(){super.connectedCallback(),Ls(this,n,Es(Ds(this,s,"f"),(()=>{this.requestUpdate()})),"f"),Ds(this,r,"f")[Wr].reconnect()}disconnectedCallback(){super.disconnectedCallback(),Ds(this,n,"f")&&(Ds(this,n,"f").stop(),Ls(this,n,void 0,"f")),Ds(this,r,"f")[Wr].disconnect()}},r=new WeakMap,s=new WeakMap,n=new WeakMap,i};var Is=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Vs=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const Zs=t=>e=>{var r,s,n,i;return i=class extends ir{constructor(){super(...arguments),r.set(this,new vs(this,this.root,(()=>{this.requestUpdate()}),t.context)),s.set(this,Is(this,r,"f")[Wr].wrap((()=>e(Is(this,r,"f"))))),n.set(this,void 0)}render(){var t;return this.updateComplete.then((()=>Is(this,r,"f")[Wr].afterRender())),null===(t=Is(this,n,"f"))||void 0===t?void 0:t.render()}connectedCallback(){super.connectedCallback(),Is(this,r,"f")[Wr].reconnect(),Vs(this,n,Es(Is(this,s,"f"),(()=>{this.requestUpdate()})),"f")}disconnectedCallback(){super.disconnectedCallback(),Is(this,r,"f")[Wr].disconnect(),Is(this,n,"f")&&(Is(this,n,"f").stop(),Vs(this,n,void 0,"f"))}},r=new WeakMap,s=new WeakMap,n=new WeakMap,i};class Fs{constructor(){this.theme=i`
Array.prototype.at=function(t){return t>=0?this[t]:this[this.length+t]};const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),s=new WeakMap;let n=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const r=this.t;if(e&&void 0===t){const e=void 0!==r&&1===r.length;e&&(t=s.get(r)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&s.set(r,t))}return t}toString(){return this.cssText}};const i=(t,...e)=>{const s=1===t.length?t[0]:e.reduce(((e,r,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1]),t[0]);return new n(s,t,r)},o=(r,s)=>{if(e)r.adoptedStyleSheets=s.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of s){const s=document.createElement("style"),n=t.litNonce;void 0!==n&&s.setAttribute("nonce",n),s.textContent=e.cssText,r.appendChild(s)}},a=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new n("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:c,defineProperty:h,getOwnPropertyDescriptor:l,getOwnPropertyNames:f,getOwnPropertySymbols:d,getPrototypeOf:u}=Object,p=globalThis,w=p.trustedTypes,m=w?w.emptyScript:"",v=p.reactiveElementPolyfillSupport,y=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},g=(t,e)=>!c(t,e),$={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:g};Symbol.metadata??=Symbol("metadata"),p.litPropertyMetadata??=new WeakMap;class _ extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(t,r,e);void 0!==s&&h(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){const{get:s,set:n}=l(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const i=s?.call(this);n.call(this,e),this.requestUpdate(t,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??$}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...f(t),...d(t)];for(const r of e)this.createProperty(r,t[r])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,r]of e)this.elementProperties.set(t,r)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const r=this._$Eu(t,e);void 0!==r&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return o(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EO(t,e){const r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(void 0!==s&&!0===r.reflect){const n=(void 0!==r.converter?.toAttribute?r.converter:b).toAttribute(e,r.type);this._$Em=t,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(t,e){const r=this.constructor,s=r._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=r.getPropertyOptions(s),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this._$Em=s,this[s]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,r,s=!1,n){if(void 0!==t){if(r??=this.constructor.getPropertyOptions(t),!(r.hasChanged??g)(s?n:this[t],e))return;this.C(t,e,r)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,e,r){this._$AL.has(t)||this._$AL.set(t,e),!0===r.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,r]of t)!0!==r.wrapped||this._$AL.has(e)||void 0===this[e]||this.C(e,this[e],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$ET()}catch(e){throw t=!1,this._$ET(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[y("elementProperties")]=new Map,_[y("finalized")]=new Map,v?.({ReactiveElement:_}),(p.reactiveElementVersions??=[]).push("2.0.0");const E=globalThis,A=E.trustedTypes,k=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",C=`lit$${(Math.random()+"").slice(9)}$`,M="?"+C,P=`<${M}>`,S=document,x=()=>S.createComment(""),W=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,U="[ \t\n\f\r]",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,H=/>/g,R=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,q=/"/g,D=/^(?:script|style|textarea|title)$/i,L=(t=>(e,...r)=>({_$litType$:t,strings:e,values:r}))(1),B=Symbol.for("lit-noChange"),I=Symbol.for("lit-nothing"),V=new WeakMap,Z=S.createTreeWalker(S,129);function J(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==k?k.createHTML(e):e}const K=(t,e)=>{const r=t.length-1,s=[];let n,i=2===e?"<svg>":"",o=O;for(let e=0;e<r;e++){const r=t[e];let a,c,h=-1,l=0;for(;l<r.length&&(o.lastIndex=l,c=o.exec(r),null!==c);)l=o.lastIndex,o===O?"!--"===c[1]?o=N:void 0!==c[1]?o=H:void 0!==c[2]?(D.test(c[2])&&(n=RegExp("</"+c[2],"g")),o=R):void 0!==c[3]&&(o=R):o===R?">"===c[0]?(o=n??O,h=-1):void 0===c[1]?h=-2:(h=o.lastIndex-c[2].length,a=c[1],o=void 0===c[3]?R:'"'===c[3]?q:z):o===q||o===z?o=R:o===N||o===H?o=O:(o=R,n=void 0);const f=o===R&&t[e+1].startsWith("/>")?" ":"";i+=o===O?r+P:h>=0?(s.push(a),r.slice(0,h)+T+r.slice(h)+C+f):r+C+(-2===h?e:f)}return[J(t,i+(t[r]||"<?>")+(2===e?"</svg>":"")),s]};class G{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let n=0,i=0;const o=t.length-1,a=this.parts,[c,h]=K(t,e);if(this.el=G.createElement(c,r),Z.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<o;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(T)){const e=h[i++],r=s.getAttribute(t).split(C),o=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:o[2],strings:r,ctor:"."===o[1]?tt:"?"===o[1]?et:"@"===o[1]?rt:Y}),s.removeAttribute(t)}else t.startsWith(C)&&(a.push({type:6,index:n}),s.removeAttribute(t));if(D.test(s.tagName)){const t=s.textContent.split(C),e=t.length-1;if(e>0){s.textContent=A?A.emptyScript:"";for(let r=0;r<e;r++)s.append(t[r],x()),Z.nextNode(),a.push({type:2,index:++n});s.append(t[e],x())}}}else if(8===s.nodeType)if(s.data===M)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=s.data.indexOf(C,t+1));)a.push({type:7,index:n}),t+=C.length-1}n++}}static createElement(t,e){const r=S.createElement("template");return r.innerHTML=t,r}}function Q(t,e,r=t,s){if(e===B)return e;let n=void 0!==s?r._$Co?.[s]:r._$Cl;const i=W(e)?void 0:e._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),void 0===i?n=void 0:(n=new i(t),n._$AT(t,r,s)),void 0!==s?(r._$Co??=[])[s]=n:r._$Cl=n),void 0!==n&&(e=Q(t,n._$AS(t,e.values),n,s)),e}class F{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??S).importNode(e,!0);Z.currentNode=s;let n=Z.nextNode(),i=0,o=0,a=r[0];for(;void 0!==a;){if(i===a.index){let e;2===a.type?e=new X(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new st(n,this,t)),this._$AV.push(e),a=r[++o]}i!==a?.index&&(n=Z.nextNode(),i++)}return Z.currentNode=S,s}p(t){let e=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),W(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>j(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==I&&W(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){const{values:e,_$litType$:r}=t,s="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=G.createElement(J(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new F(s,this),r=t.u(this.options);t.p(e),this.$(r),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new G(t)),e}T(t){j(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,s=0;for(const n of t)s===e.length?e.push(r=new X(this.k(x()),this.k(x()),this,this.options)):r=e[s],r._$AI(n),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,n){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=I}_$AI(t,e=this,r,s){const n=this.strings;let i=!1;if(void 0===n)t=Q(this,t,e,0),i=!W(t)||t!==this._$AH&&t!==B,i&&(this._$AH=t);else{const s=t;let o,a;for(t=n[0],o=0;o<n.length-1;o++)a=Q(this,s[r+o],e,o),a===B&&(a=this._$AH[o]),i||=!W(a)||a!==this._$AH[o],a===I?t=I:t!==I&&(t+=(a??"")+n[o+1]),this._$AH[o]=a}i&&!s&&this.O(t)}O(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}O(t){this.element[this.name]=t===I?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}O(t){this.element.toggleAttribute(this.name,!!t&&t!==I)}}class rt extends Y{constructor(t,e,r,s,n){super(t,e,r,s,n),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??I)===B)return;const r=this._$AH,s=t===I&&r!==I||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==I&&(r===I||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class st{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const nt=E.litHtmlPolyfillSupport;nt?.(G,X),(E.litHtmlVersions??=[]).push("3.1.0");const it=(t,e,r)=>{const s=r?.renderBefore??e;let n=s._$litPart$;if(void 0===n){const t=r?.renderBefore??null;s._$litPart$=n=new X(e.insertBefore(x(),t),t,void 0,r??{})}return n._$AI(t),n};let ot=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=it(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return B}};ot._$litElement$=!0,ot.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ot});const at=globalThis.litElementPolyfillSupport;at?.({LitElement:ot}),(globalThis.litElementVersions??=[]).push("4.0.0");var ct,ht=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},lt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class ft{constructor(){ct.set(this,!1)}lock(t){ht(this,ct,!0,"f");const e=t();return ht(this,ct,!1,"f"),e}get locked(){return lt(this,ct,"f")}}ct=new WeakMap;const dt=()=>new Map,ut=()=>new Set;function pt(t){return{guarantee:(e,r)=>function(t,e,r){if(t.has(e))return t.get(e);{const s=r();return t.set(e,s),s}}(t,e,r)}}var wt,mt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},vt=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class yt{constructor(){wt.set(this,new WeakMap)}grab_keymap(t){const e=pt(mt(this,wt,"f")).guarantee(t,dt);return{keymap:e,grab_symbolmap:t=>pt(e).guarantee(t,dt)}}clear(){vt(this,wt,new WeakMap,"f")}}wt=new WeakMap;var bt,gt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class $t{constructor(){bt.set(this,new Map)}stop(t){const e=gt(this,bt,"f").get(t);e&&(gt(this,bt,"f").delete(t),e())}add(t,e){gt(this,bt,"f").set(t,e)}}bt=new WeakMap;var _t,Et=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class At{constructor(){_t.set(this,[])}record(t){const e=dt();Et(this,_t,"f").push(e);const r=t();return Et(this,_t,"f").pop(),{payload:r,recording:e}}record_that_key_was_accessed(t,e){const r=Et(this,_t,"f").at(-1);if(r){pt(r).guarantee(t,ut).add(e)}}}_t=new WeakMap;class kt extends Error{constructor(){super(...arguments),this.name=this.constructor.name}}class Tt extends kt{constructor(t){super(`forbidden circularity, rejected assignment to "${t}"`)}}class Ct extends kt{constructor(t){super(`forbidden assignment to readonly property "${t}"`)}}function Mt(t,e){let r,s,n=[];function i(){r=[],s&&clearTimeout(s),s=void 0,n=[]}return i(),(...o)=>{r=o,s&&clearTimeout(s);const a=new Promise(((t,e)=>{n.push({resolve:t,reject:e})}));return s=setTimeout((()=>{Promise.resolve().then((()=>e(...r))).then((t=>{for(const{resolve:e}of n)e(t);i()})).catch((t=>{for(const{reject:e}of n)e(t);i()}))}),t),a}}var Pt,St,xt,Wt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},jt=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class Ut{constructor(){Pt.set(this,new Map),St.set(this,Promise.resolve()),xt.set(this,Mt(0,(()=>{const t=[...Wt(this,Pt,"f").values()];Wt(this,Pt,"f").clear();for(const e of t)e()})))}get wait(){return Wt(this,St,"f")}add(t,e){Wt(this,Pt,"f").set(t,e),jt(this,St,Wt(this,xt,"f").call(this),"f")}}function Ot(t,e,r,s){const n=[];for(const[i,o]of e){const{grab_symbolmap:e}=r.grab_keymap(i);for(const r of o){const i=e(r);i.set(t,s),n.push((()=>i.delete(t)))}}return()=>n.forEach((t=>t()))}Pt=new WeakMap,St=new WeakMap,xt=new WeakMap;var Nt,Ht,Rt,zt,qt,Dt,Lt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Bt{constructor(){Nt.set(this,new yt),Ht.set(this,new At),Rt.set(this,new ft),zt.set(this,new $t),qt.set(this,new Ut),Dt.set(this,function(t,e,r,s,n){function i([r,n]){if("lean"in n)n.actor();else{const{payload:i,recording:o}=e.record(n.collector);s.add(r,Ot(r,o,t,n)),n.responder&&n.responder(i)}}return{get:(t,r)=>(e.record_that_key_was_accessed(t,r),t[r]),set:(e,s,o)=>{if(r.locked)throw new Tt(s);e[s]=o;const a=[...t.grab_keymap(e).grab_symbolmap(s)];for(const t of a){const[e]=t;n.add(e,(()=>r.lock((()=>i(t)))))}return!0}}}(Lt(this,Nt,"f"),Lt(this,Ht,"f"),Lt(this,Rt,"f"),Lt(this,zt,"f"),Lt(this,qt,"f")))}get wait(){return Lt(this,qt,"f").wait}state(t){return new Proxy(t,Lt(this,Dt,"f"))}reaction(t,e){const r=Symbol(),{recording:s}=Lt(this,Ht,"f").record((()=>Lt(this,Rt,"f").lock(t)));return Lt(this,zt,"f").add(r,Ot(r,s,Lt(this,Nt,"f"),{collector:t,responder:e})),()=>Lt(this,zt,"f").stop(r)}lean(t){const e=Symbol();return{stop:()=>Lt(this,zt,"f").stop(e),collect:r=>{const{payload:s,recording:n}=Lt(this,Ht,"f").record((()=>Lt(this,Rt,"f").lock(r)));return Lt(this,zt,"f").add(e,Ot(e,n,Lt(this,Nt,"f"),{lean:!0,actor:t})),s}}}clear(){Lt(this,Nt,"f").clear()}}Nt=new WeakMap,Ht=new WeakMap,Rt=new WeakMap,zt=new WeakMap,qt=new WeakMap,Dt=new WeakMap,Bt.readonly=function(t){return new Proxy(t,{get:(t,e)=>t[e],set(t,e){throw new Ct(e)}})},Bt.collectivize=function(t){return function(e){return()=>{const r="function"==typeof t?t():t;return e(r)}}};var It,Vt=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},Zt=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Jt{constructor(t){It.set(this,void 0),Vt(this,It,t,"f")}get state(){return Zt(this,It,"f").getter(Zt(this,It,"f").parent.state)}transmute(t){Zt(this,It,"f").parent.transmute((e=>{const r=Zt(this,It,"f").getter(e),s=t(r);return Zt(this,It,"f").setter(e,s)}))}slice({getter:t,setter:e}){return new Jt({parent:this,getter:t,setter:e})}}It=new WeakMap;const Kt=t=>"object"==typeof t&&null!==t;const Gt={equal:(t,e)=>function t(e,r,s){if(!Kt(e)||!Kt(r))return e===r;if(s.includes(e))throw new Error("forbidden circularity detected in deep equal comparison");const n=[...s,e];if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[s,i]of e)if(!r.has(s)||!t(i,r.get(s),n))return!1}else if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const s of e)if(!Array.from(r).some((e=>t(s,e,n))))return!1}else{const s=Object.keys(e),i=Object.keys(r);if(s.length!==i.length)return!1;for(const o of s){if(!i.includes(o))return!1;if(!t(e[o],r[o],n))return!1}}return!0}(t,e,[]),freeze:function(t){return function t(e,r){if(!Kt(e)||r.includes(e))return e;const s=[...r,e];if(e instanceof Map)for(const r of e.entries())for(const e of r)t(e,s);else if(e instanceof Set)for(const r of e)t(r,s);else if(Array.isArray(e))for(const r of e)t(r,s);else for(const r of Object.values(e))t(r,s);return Object.freeze(e)}(t,[])}};var Qt,Ft,Xt,Yt,te,ee,re=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},se=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class ne{constructor(t,e=(()=>{})){Qt.add(this),Ft.set(this,void 0),Xt.set(this,void 0),Yt.set(this,void 0),te.set(this,!1),se(this,Ft,structuredClone(t),"f"),se(this,Xt,re(this,Qt,"m",ee).call(this),"f"),se(this,Yt,e,"f")}get state(){return re(this,Xt,"f")}transmute(t){if(re(this,te,"f"))throw new Error("circular error");se(this,te,!0,"f"),se(this,Ft,t(structuredClone(re(this,Ft,"f"))),"f"),se(this,Xt,re(this,Qt,"m",ee).call(this),"f"),re(this,Yt,"f").call(this),se(this,te,!1,"f")}slice({getter:t,setter:e}){return new Jt({parent:this,getter:t,setter:e})}}Ft=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap,Qt=new WeakSet,ee=function(){return Gt.freeze(structuredClone(re(this,Ft,"f")))};var ie,oe,ae,ce,he=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},le=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};ie=new WeakMap,oe=new WeakMap,ae=new WeakMap,ce=new WeakMap;var fe,de=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};fe=new WeakMap;const ue=Error;var pe;function we(t){return{map:e=>me(t,e),filter:e=>ve(t,e)}}!function(t){function e(t,e){switch(t.status){case"loading":return e.loading();case"error":return e.error(t.reason);case"ready":return e.ready(t.payload);default:throw console.error("op",t),new ue("invalid op status")}}t.loading=()=>({status:"loading"}),t.error=t=>({status:"error",reason:t}),t.ready=t=>({status:"ready",payload:t}),t.is=Object.freeze({loading:t=>"loading"===t.status,error:t=>"error"===t.status,ready:t=>"ready"===t.status}),t.payload=function(t){return"ready"===t.status?t.payload:void 0},t.reason=function(t){return"error"===t.status?t.reason:void 0},t.select=e,t.load=async function(e,r){e(t.loading());try{const s=await r();return e(t.ready(s)),s}catch(r){const s=r instanceof ue?r.message:"string"==typeof r?r:"error";e(t.error(s))}},t.morph=function(r,s){return e(r,{loading:()=>t.loading(),error:e=>t.error(e),ready:e=>t.ready(s(e))})}}(pe||(pe={})),we.pipe=Object.freeze({map:t=>e=>me(e,t),filter:t=>e=>ve(e,t)});const me=(t,e)=>Object.fromEntries(Object.entries(t).map((([t,r])=>[t,e(r,t)]))),ve=(t,e)=>Object.fromEntries(Object.entries(t).filter((([t,r])=>e(r,t)))),ye=Symbol();class be extends Error{constructor(){super(...arguments),this.name=this.constructor.name}}var ge,$e,_e,Ee,Ae,ke,Te=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},Ce=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Me{constructor(t){ge.set(this,void 0),$e.set(this,!1),_e.set(this,void 0),Ee.set(this,new Set),this[ke]=!1,Ae.set(this,Mt(0,(()=>{const t=Ce(this,ge,"f");Te(this,$e,!0,"f");for(const e of Ce(this,Ee,"f"))e(t);return Te(this,$e,!1,"f"),t}))),Te(this,ge,t,"f"),Te(this,_e,Promise.resolve(t),"f")}subscribe(t){return Ce(this,Ee,"f").add(t),()=>{Ce(this,Ee,"f").delete(t)}}once(t){const e=r=>{t(r),Ce(this,Ee,"f").delete(e)};return Ce(this,Ee,"f").add(e),()=>{Ce(this,Ee,"f").delete(e)}}clear(){return Ce(this,Ee,"f").clear()}async publish(){Te(this,_e,Ce(this,Ae,"f").call(this),"f"),await Ce(this,_e,"f")}get wait(){return Ce(this,_e,"f")}get value(){return this[ye]=!0,Ce(this,ge,"f")}set value(t){if(Ce(this,$e,"f"))throw new be("you can't set a signal in a signal's subscription listener (infinite loop forbidden)");Te(this,ge,t,"f"),this.publish()}}ge=new WeakMap,$e=new WeakMap,_e=new WeakMap,Ee=new WeakMap,Ae=new WeakMap,ke=ye,Me.unwrap=t=>t instanceof Me?t.value:t;class Pe extends Me{constructor(t){super(t)}async load(t){return pe.load((t=>this.value=t),t)}setLoading(){this.value=pe.loading()}setError(t){this.value=pe.error(t)}setReady(t){this.value=pe.ready(t)}isLoading(){return pe.is.loading(this.value)}isError(){return pe.is.error(this.value)}isReady(){return pe.is.ready(this.value)}get payload(){return pe.payload(this.value)}select(t){return pe.select(this.value,t)}}var Se,xe,We,je,Ue,Oe,Ne,He,Re,ze=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},qe=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class De{constructor({all_signals:t,waiters:e}){Se.add(this),xe.set(this,!0),We.set(this,void 0),je.set(this,void 0),Ue.set(this,new Set),Oe.set(this,new Set),Ne.set(this,Mt(0,(t=>{if(qe(this,xe,"f"))if("lean"in t)t.actor();else{const{payload:e,recording:r}=this.observe(t.collector);this.add_listeners(t,r),t.responder&&t.responder(e)}}))),ze(this,We,t,"f"),ze(this,je,e,"f")}observe(t){qe(this,Se,"m",He).call(this);return{payload:t(),recording:qe(this,Se,"a",Re)}}add_listeners(t,e){for(const r of e)qe(this,Ue,"f").add(r),qe(this,Oe,"f").add(r.subscribe((()=>qe(this,je,"f").add(qe(this,Ne,"f").call(this,t)))))}shutdown(){ze(this,xe,!1,"f"),qe(this,Oe,"f").forEach((t=>t()))}}xe=new WeakMap,We=new WeakMap,je=new WeakMap,Ue=new WeakMap,Oe=new WeakMap,Ne=new WeakMap,Se=new WeakSet,He=function(){for(const t of qe(this,We,"f"))t[ye]=!1},Re=function(){return[...qe(this,We,"f")].filter((t=>t[ye]&&!qe(this,Ue,"f").has(t)))};var Le,Be,Ie=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};Le=new WeakMap,Be=new WeakMap;const Ve=new Bt,Ze=new class{constructor(){Le.set(this,new Set),Be.set(this,new Set)}signal(t){const e=new Me(t);return Ie(this,Le,"f").add(e),e}computed(t){const e=this.signal(t());return this.reaction((()=>{e.value=t()})),e}op(t=pe.loading()){const e=new Pe(t);return Ie(this,Le,"f").add(e),e}many(t){return we(t).map((t=>this.signal(t)))}reaction(t,e){const r=new De({waiters:Ie(this,Be,"f"),all_signals:Ie(this,Le,"f")}),s={collector:t,responder:e},{recording:n}=r.observe(s.collector);return r.add_listeners(s,n),()=>r.shutdown()}lean(t){const e=new De({waiters:Ie(this,Be,"f"),all_signals:Ie(this,Le,"f")}),r={lean:!0,actor:t};return{stop:()=>e.shutdown(),collect:t=>{const{payload:s,recording:n}=e.observe(t);return e.add_listeners(r,n),s}}}get wait(){return Promise.all([...Ie(this,Le,"f")].map((t=>t.wait))).then((()=>Promise.all([...Ie(this,Be,"f")]))).then((()=>{Ie(this,Be,"f").clear()}))}},Je=new class{constructor(t){ie.set(this,void 0),oe.set(this,new Set),ae.set(this,new Set),ce.set(this,new Map),he(this,ie,t,"f")}dispatch(){for(const t of le(this,oe,"f"))t();for(const t of le(this,ae,"f"))t()}computed(t){const e=le(this,ie,"f").signal(t());return le(this,oe,"f").add((()=>{e.value=t()})),e}track(t,e){let r=!0;const s=()=>{const s=t(),n=le(this,ce,"f").get(t);!r&&Gt.equal(s,n)||(r=!1,le(this,ce,"f").set(t,s),e(s))};return s(),le(this,ae,"f").add(s),t()}stateTree(t){return new ne(t,(()=>this.dispatch()))}}(Ze);Ve.state.bind(Ve),Ze.signal.bind(Ze);const Ke=new class{constructor(t,e){this.flat=t,this.signals=e,fe.set(this,Promise.resolve())}get wait(){return Promise.all([this.flat.wait,this.signals.wait]).then((()=>de(this,fe,"f")))}reaction(t,e){const r=e?()=>e(n()):()=>n(),s=this.lean(r),n=()=>s.collect(t);return n(),s.stop}lean(t){const e=this.flat.lean(t),r=this.signals.lean(t);return{stop(){e.stop(),r.stop()},collect:t=>e.collect((()=>r.collect(t)))}}}(Ve,Ze);var Ge=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class Qe extends(function(t){var e,r,s;return s=class extends t{constructor(){super(...arguments),e.set(this,(new Set).add((()=>this.setup()))),r.set(this,new Set)}register_setup(t){Ge(this,e,"f").add(t)}setup(){return()=>{}}connectedCallback(){for(const t of Ge(this,e,"f"))Ge(this,r,"f").add(t())}disconnectedCallback(){for(const t of Ge(this,r,"f"))t();Ge(this,r,"f").clear()}},e=new WeakMap,r=new WeakMap,s}(HTMLElement)){}function Fe(){let t,e;return{promise:new Promise(((r,s)=>{t=r,e=s})),resolve:t,reject:e}}function Xe(t,e){o(t,function(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}(e))}var Ye,tr,er,rr,sr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},nr=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class ir extends Qe{static get styles(){}init(){}constructor(){super(),Ye.set(this,void 0),tr.set(this,Fe()),er.set(this,nr(this,tr,"f").promise),rr.set(this,Mt(0,(()=>{const t=nr(this,Ye,"f"),e=this.render();e&&it(e,t,{host:this})}))),sr(this,Ye,this.attachShadow({mode:"open"}),"f");const t=this.constructor;Xe(nr(this,Ye,"f"),t.styles),this.init()}get root(){return nr(this,Ye,"f")}get updateComplete(){return nr(this,er,"f").then((()=>!0))}render(){}async requestUpdate(){const t=nr(this,rr,"f").call(this);return nr(this,tr,"f")&&(t.then(nr(this,tr,"f").resolve),sr(this,tr,void 0,"f")),sr(this,er,t,"f"),t}connectedCallback(){super.connectedCallback(),this.requestUpdate()}}Ye=new WeakMap,tr=new WeakMap,er=new WeakMap,rr=new WeakMap;var or,ar=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};or=new WeakMap;var cr,hr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},lr=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class fr{constructor(t){cr.set(this,void 0),hr(this,cr,t,"f")}get context(){if(lr(this,cr,"f"))return lr(this,cr,"f");throw new Error("nexus.context was not set, but it's necessary")}set context(t){hr(this,cr,t,"f")}}cr=new WeakMap;var dr,ur=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},pr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};function wr(t){return[t].flat().filter((t=>!!t))}!function(t){t.css=function(...t){return function(e){return class extends e{static get styles(){return vr(e.styles,t)}}}},t.css_deferred=function(t){return function(e){return class extends e{static get styles(){return vr(e.styles,t())}}}},t.signals=function(t){return function(e){var r,s;return s=class extends e{constructor(){super(...arguments),r.set(this,null)}render(){var t;return null===(t=ur(this,r,"f"))||void 0===t?void 0:t.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),pr(this,r,t.lean((()=>this.requestUpdate())),"f")}disconnectedCallback(){super.disconnectedCallback(),ur(this,r,"f")&&(ur(this,r,"f").stop(),pr(this,r,null,"f"))}},r=new WeakMap,s}},t.flat=function(t){return function(e){var r,s;return s=class extends e{constructor(){super(...arguments),r.set(this,null)}render(){var t;return null===(t=ur(this,r,"f"))||void 0===t?void 0:t.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),pr(this,r,t.lean((()=>this.requestUpdate())),"f")}disconnectedCallback(){super.disconnectedCallback(),ur(this,r,"f")&&(ur(this,r,"f").stop(),pr(this,r,null,"f"))}},r=new WeakMap,s}},t.reactor=function(t=Ke){return function(e){var r,s;return s=class extends e{constructor(){super(...arguments),r.set(this,null)}render(){var t;return null===(t=ur(this,r,"f"))||void 0===t?void 0:t.collect((()=>super.render()))}connectedCallback(){super.connectedCallback(),pr(this,r,t.lean((()=>this.requestUpdate())),"f")}disconnectedCallback(){super.disconnectedCallback(),ur(this,r,"f")&&(ur(this,r,"f").stop(),pr(this,r,null,"f"))}},r=new WeakMap,s}}}(dr||(dr={}));const mr=t=>void 0!==t;function vr(t,e){var r;return[...null!==(r=wr(t))&&void 0!==r?r:[],...wr(e)].flat().filter(mr)}var yr,br,gr=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},$r=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class _r{static with(t){return new this(t)}constructor(t){yr.set(this,void 0),gr(this,yr,t,"f")}to(t){return new _r(t($r(this,yr,"f")))}done(){return $r(this,yr,"f")}}yr=new WeakMap,function(t){t.css=t=>e=>we(e).map((e=>dr.css(t)(e))),t.flat=t=>e=>we(e).map((e=>dr.flat(t)(e))),t.signals=t=>e=>we(e).map((e=>dr.signals(t)(e))),t.reactor=(t=Ke)=>e=>we(e).map((e=>dr.reactor(t)(e))),t.context=e=>r=>_r.with(r).to(t.css(e.theme)).to(t.reactor()).done()}(br||(br={}));const Er=2;class Ar{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const kr=(t,e)=>{const r=t._$AN;if(void 0===r)return!1;for(const t of r)t._$AO?.(e,!1),kr(t,e);return!0},Tr=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===r?.size)},Cr=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(void 0===r)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),Sr(e)}};function Mr(t){void 0!==this._$AN?(Tr(this),this._$AM=t,Cr(this)):this._$AM=t}function Pr(t,e=!1,r=0){const s=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(s))for(let t=r;t<s.length;t++)kr(s[t],!1),Tr(s[t]);else null!=s&&(kr(s,!1),Tr(s));else kr(this,t)}const Sr=t=>{t.type==Er&&(t._$AP??=Pr,t._$AQ??=Mr)};class xr extends Ar{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Cr(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(kr(this,t),Tr(this))}setValue(t){if((t=>void 0===t.strings)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}const Wr=Symbol();var jr,Ur=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Or=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class Nr{constructor(){jr.set(this,0)}pull(){var t,e;return Or(this,jr,(e=Ur(this,jr,"f"),t=e++,e),"f"),t}reset(){Or(this,jr,0,"f")}}jr=new WeakMap;var Hr,Rr,zr,qr,Dr,Lr,Br,Ir,Vr,Zr,Jr,Kr,Gr,Qr,Fr,Xr,Yr,ts=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r},es=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)};class rs{constructor(t,e){this[Yr]={wrap:t=>(...e)=>(es(this,zr,"f").reset(),t(...e)),disconnect:()=>{for(const t of es(this,Dr,"f"))t();es(this,Dr,"f").clear();for(const t of es(this,Ir,"f"))t();es(this,Ir,"f").clear(),es(this,Br,"f").clear()},reconnect:()=>{for(const t of es(this,qr,"f").values())es(this,Dr,"f").add(t());for(const[t,e]of es(this,Lr,"f").entries()){const[r,s]=e();es(this,Br,"f").set(t,r),es(this,Ir,"f").add(s)}},afterRender:()=>{for(const[t,e]of es(this,Zr,"f")){const r=e();es(this,Jr,"f").set(t,r)}}},Hr.set(this,void 0),Rr.set(this,void 0),zr.set(this,new Nr),qr.set(this,new Map),Dr.set(this,new Set),Lr.set(this,new Map),Br.set(this,new Map),Ir.set(this,new Set),Vr.set(this,new Map),Zr.set(this,new Map),Jr.set(this,new Map),Kr.set(this,new Map),Gr.set(this,new Map),Qr.set(this,new Map),Fr.set(this,new Map),Xr.set(this,new Map),ts(this,Rr,t,"f"),ts(this,Hr,e,"f")}get context(){return es(this,Hr,"f")}rerender(){es(this,Rr,"f").call(this)}mount(t){const e=es(this,zr,"f").pull();es(this,qr,"f").has(e)||(es(this,qr,"f").set(e,t),es(this,Dr,"f").add(t()))}init(t){const e=es(this,zr,"f").pull();if(!es(this,Lr,"f").has(e)){es(this,Lr,"f").set(e,t);const[r,s]=t();return es(this,Br,"f").set(e,r),es(this,Ir,"f").add(s),r}return es(this,Br,"f").get(e)}once(t){const e=es(this,zr,"f").pull();return pt(es(this,Vr,"f")).guarantee(e,t)}defer(t){const e=es(this,zr,"f").pull();return es(this,Zr,"f").has(e)||es(this,Zr,"f").set(e,t),es(this,Jr,"f").get(e)}state(t){const e=es(this,zr,"f").pull();return[pt(es(this,Kr,"f")).guarantee(e,(()=>"function"==typeof t?t():t)),t=>{es(this,Kr,"f").set(e,t),es(this,Rr,"f").call(this)},()=>es(this,Kr,"f").get(e)]}flatstate(t){const e=es(this,zr,"f").pull();return pt(es(this,Gr,"f")).guarantee(e,(()=>Ve.state("function"==typeof t?t():t)))}signal(t){const e=es(this,zr,"f").pull();return pt(es(this,Qr,"f")).guarantee(e,(()=>Ze.signal("function"==typeof t?t():t)))}computed(t){const e=es(this,zr,"f").pull();return pt(es(this,Qr,"f")).guarantee(e,(()=>Ze.computed(t)))}op(){const t=es(this,zr,"f").pull();return pt(es(this,Qr,"f")).guarantee(t,(()=>Ze.op()))}watch(t){const e=es(this,zr,"f").pull();return pt(es(this,Fr,"f")).guarantee(e,(()=>Je.track(t,(t=>{es(this,Fr,"f").set(e,t),es(this,Rr,"f").call(this)}))))}effect(t,e){e=e.map(Me.unwrap);const r=es(this,zr,"f").pull(),s=es(this,Xr,"f").get(r);if(s){const[n,i]=s;Gt.equal(e,i)||(n(),es(this,Xr,"f").set(r,[t(),e]))}else{es(this,qr,"f").set(r,t);const s=t();es(this,Dr,"f").add(s),es(this,Xr,"f").set(r,[s,e])}}}Hr=new WeakMap,Rr=new WeakMap,zr=new WeakMap,qr=new WeakMap,Dr=new WeakMap,Lr=new WeakMap,Br=new WeakMap,Ir=new WeakMap,Vr=new WeakMap,Zr=new WeakMap,Jr=new WeakMap,Kr=new WeakMap,Gr=new WeakMap,Qr=new WeakMap,Fr=new WeakMap,Xr=new WeakMap,Yr=Wr;var ss,ns,is,os=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},as=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class cs extends rs{get element(){return os(this,ss,"f")}get shadow(){return os(this,ns,"f")}styles(t){this.once((()=>Xe(this.shadow,[this.context.theme,null!=t?t:i``])))}constructor(t,e,r,s){super(r,s),ss.set(this,void 0),ns.set(this,void 0),as(this,ss,t,"f"),as(this,ns,e,"f")}}function hs(t){let e;return function(r){return e||(e=function(t,e){return is.on_change(t,(()=>t.requestUpdate())),is.proxy(t,e)}(t,r)),e}}ss=new WeakMap,ns=new WeakMap,function(t){t.proxy=(t,e)=>new Proxy(e,{get:(r,s)=>{const n=e[s],i=t.getAttribute(s);switch(n){case String:return null!=i?i:void 0;case Number:return null!==i?Number(i):void 0;case Boolean:return null!==i;default:throw new Error(`invalid attribute type for "${s}"`)}},set:(r,s,n)=>{switch(e[s]){case String:return t.setAttribute(s,n),!0;case Number:return t.setAttribute(s,n.toString()),!0;case Boolean:return n?t.setAttribute(s,""):t.removeAttribute(s),!0;default:throw new Error(`invalid attribute type for "${s}"`)}}}),t.on_change=function(t,e){const r=new MutationObserver(e);return r.observe(t,{attributes:!0}),()=>r.disconnect()}}(is||(is={}));class ls extends cs{constructor(t,e,r,s){super(t,e,r,s),this.attrs=hs(t)}}var fs,ds=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},us=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class ps extends rs{get element(){return ds(this,fs,"f")}constructor(t,e,r){super(e,r),fs.set(this,void 0),us(this,fs,t,"f"),this.attrs=hs(t)}}fs=new WeakMap;class ws extends ls{}class ms extends ps{}class vs extends rs{name(t){this.once((()=>this.element.setAttribute("view",t)))}constructor(t,e,r){super(e,r),this.element=t}}class ys extends cs{name(t){this.once((()=>this.element.setAttribute("view",t)))}}function bs(){const t=new Set;function e(e){return t.add(e),()=>{t.delete(e)}}return e.publish=e=>{for(const r of t)r(e)},e.clear=()=>t.clear(),e.once=e=>{const r=s=>{e(s),t.delete(r)};return t.add(r),()=>{t.delete(r)}},e}const gs=t=>{for(const[e,r]of Object.entries(t))customElements.define(e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase(),r)};class $s extends HTMLElement{constructor(){super(...arguments),this.onConnected=bs(),this.onDisconnected=bs()}connectedCallback(){this.onConnected.publish()}disconnectedCallback(){this.onDisconnected.publish()}}function _s(t,e){const r=Ke.lean(e);return{stop:r.stop,render:(...e)=>r.collect((()=>t(...e)))}}$s.tag="slate-view",gs({SlateView:$s});var Es=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},As=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const ks=t=>e=>{var r,s,n,i,o,a,c,h,l;return(t=>(...e)=>({_$litDirective$:t,values:e}))((l=class extends xr{constructor(){super(...arguments),r.add(this),s.set(this,void 0),n.set(this,document.createElement($s.tag)),o.set(this,Mt(0,(()=>{Es(this,s,"f")&&this.isConnected&&this.setValue(Es(this,r,"m",i).call(this,this.render(...Es(this,s,"f"))))}))),a.set(this,new vs(Es(this,n,"f"),Es(this,o,"f"),t.context)),c.set(this,Es(this,a,"f")[Wr].wrap(e(Es(this,a,"f")))),h.set(this,_s(Es(this,c,"f"),Es(this,o,"f")))}update(t,e){return Es(this,r,"m",i).call(this,this.render(...e))}render(...t){var e;return As(this,s,t,"f"),null===(e=Es(this,h,"f"))||void 0===e?void 0:e.render(...t)}reconnected(){Es(this,a,"f")[Wr].reconnect(),As(this,h,_s(Es(this,c,"f"),Es(this,o,"f")),"f")}disconnected(){Es(this,a,"f")[Wr].disconnect(),Es(this,h,"f")&&(Es(this,h,"f").stop(),As(this,h,void 0,"f"))}},s=new WeakMap,n=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,h=new WeakMap,r=new WeakSet,i=function(t){return it(t,Es(this,n,"f")),Es(this,a,"f")[Wr].afterRender(),Es(this,n,"f")},l))};function Ts(...t){const e=new Set,r=t.map((t=>null!=t?t:"")).flatMap(Cs);for(const t of r)e.add(t);return e}function Cs(t){return t.split(/\s+/).map((t=>t.trim())).filter((t=>!!t))}function Ms(t){return t.split(",").map((t=>t.trim())).filter((t=>!!t)).map((t=>t.includes(":")?t.split(":").map((t=>t.trim()))[1]:t))}function Ps(t,e){const r=Ts(t.getAttribute("part")),s=Ts(t.getAttribute("data-gpart")),n=function(t,e){return Object.fromEntries(Object.entries(e).map((([e,r])=>[e,Array.from(t.querySelectorAll(`[${r}]`)).map((t=>t.getAttribute(r)))])))}(e,{part:"part",gpart:"data-gpart",exportparts:"exportparts",gexportparts:"gexportparts"}),i=new Set([...n.part.flatMap(Cs),...n.exportparts.flatMap(Ms)]),o=new Set([...n.gpart.flatMap(Cs),...n.gexportparts.flatMap(Cs)]);i.size&&t.setAttribute("exportparts",[...r].flatMap(function(t,e){return r=>[...t].flatMap((t=>[`${t}:${r}-${t}`,...e.has(t)?[t]:[]]))}(i,o)).join(", ")),(o.size||t.hasAttribute("data-gpart"))&&t.setAttribute("gexportparts",[...o,...[...s].flatMap((t=>[...i].map((e=>`${t}-${e}`))))].join(" "))}function Ss(t,e={},r={}){const{content:s,attrs:n={}}=e,{attrs:i={}}=r;function o(e,r,s,n){e!==r&&(void 0===e?t.removeAttribute(s):t.setAttribute(s,n()))}n&&function(t,e){for(const[r,s]of Object.entries(e))"string"==typeof s?t.setAttribute(r,s):"number"==typeof s?t.setAttribute(r,s.toString()):"boolean"==typeof s?!0===s?t.setAttribute(r,""):t.removeAttribute(r):void 0===s?t.removeAttribute(r):console.warn(`invalid attribute type ${r} is ${typeof s}`)}(t,n),o(n.class,null==i?void 0:i.class,"class",(()=>n.class)),o(n.part,null==i?void 0:i.part,"part",(()=>n.part)),o(n.gpart,null==i?void 0:i.gpart,"data-gpart",(()=>n.gpart)),s&&it(s,t,{host:t})}var xs=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Ws=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const js=t=>e=>{var r,s,n,i,o,a,c,h;return(t=>(e,r={})=>({_$litDirective$:t,values:[{meta:r,props:e}]}))((h=class extends xr{constructor(){super(...arguments),r.set(this,void 0),s.set(this,!0),n.set(this,function({afterRender:t,onConnected:e,onDisconnected:r}){const s=document.createElement($s.tag);s.onConnected(e),s.onDisconnected(r);const n=s.attachShadow({mode:"open"});let i=!1;return{container:s,shadow:n,set auto_exportparts(t){i=t},render_into_shadow:e=>(it(e,n),i&&Ps(s,n),t(),s)}}({afterRender:()=>xs(this,o,"f")[Wr].afterRender(),onDisconnected:()=>this.disconnected(),onConnected:()=>{xs(this,s,"f")||this.reconnected(),Ws(this,s,!1,"f")}})),i.set(this,Mt(0,(()=>{xs(this,r,"f")&&this.isConnected&&this.setValue(xs(this,n,"f").render_into_shadow(this.render(xs(this,r,"f"))))}))),o.set(this,new ys(xs(this,n,"f").container,xs(this,n,"f").shadow,xs(this,i,"f"),t.context)),a.set(this,xs(this,o,"f")[Wr].wrap(e(xs(this,o,"f")))),c.set(this,_s(xs(this,a,"f"),xs(this,i,"f")))}update(t,e){return xs(this,n,"f").render_into_shadow(this.render(...e))}render(t){var e,s,i;return Ss(xs(this,n,"f").container,t.meta,null===(e=xs(this,r,"f"))||void 0===e?void 0:e.meta),Ws(this,r,t,"f"),xs(this,n,"f").auto_exportparts=null===(s=t.meta.auto_exportparts)||void 0===s||s,null===(i=xs(this,c,"f"))||void 0===i?void 0:i.render(...t.props)}reconnected(){xs(this,o,"f")[Wr].reconnect(),Ws(this,c,_s(xs(this,a,"f"),xs(this,i,"f")),"f")}disconnected(){xs(this,o,"f")[Wr].disconnect(),xs(this,c,"f")&&(xs(this,c,"f").stop(),Ws(this,c,void 0,"f"))}},r=new WeakMap,s=new WeakMap,n=new WeakMap,i=new WeakMap,o=new WeakMap,a=new WeakMap,c=new WeakMap,h))};var Us,Os,Ns,Hs=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Rs=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};class zs extends Qe{init(){}constructor(){super(),Us.set(this,Fe()),Os.set(this,Hs(this,Us,"f").promise),Ns.set(this,Mt(0,(()=>{const t=this.render();it(t,this,{host:this})}))),this.init()}get updateComplete(){return Hs(this,Os,"f").then((()=>!0))}render(){}async requestUpdate(){const t=Hs(this,Ns,"f").call(this);return Hs(this,Us,"f")&&(t.then(Hs(this,Us,"f").resolve),Rs(this,Us,void 0,"f")),Rs(this,Os,t,"f"),t}connectedCallback(){super.connectedCallback(),this.requestUpdate()}}Us=new WeakMap,Os=new WeakMap,Ns=new WeakMap;var qs=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Ds=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const Ls=t=>e=>{var r,s,n,i;return i=class extends zs{constructor(){super(...arguments),r.set(this,new ms(this,(()=>{this.requestUpdate()}),t.context)),s.set(this,qs(this,r,"f")[Wr].wrap((()=>e(qs(this,r,"f"))))),n.set(this,void 0)}render(){var t;return this.updateComplete.then((()=>qs(this,r,"f")[Wr].afterRender())),null===(t=qs(this,n,"f"))||void 0===t?void 0:t.render()}connectedCallback(){super.connectedCallback(),Ds(this,n,_s(qs(this,s,"f"),(()=>{this.requestUpdate()})),"f"),qs(this,r,"f")[Wr].reconnect()}disconnectedCallback(){super.disconnectedCallback(),qs(this,n,"f")&&(qs(this,n,"f").stop(),Ds(this,n,void 0,"f")),qs(this,r,"f")[Wr].disconnect()}},r=new WeakMap,s=new WeakMap,n=new WeakMap,i};var Bs=function(t,e,r,s){if("a"===r&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?s:"a"===r?s.call(t):s?s.value:e.get(t)},Is=function(t,e,r,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(t,r):n?n.value=r:e.set(t,r),r};const Vs=t=>e=>{var r,s,n,i;return i=class extends ir{constructor(){super(...arguments),r.set(this,new ws(this,this.root,(()=>{this.requestUpdate()}),t.context)),s.set(this,Bs(this,r,"f")[Wr].wrap((()=>e(Bs(this,r,"f"))))),n.set(this,void 0)}render(){var t;return this.updateComplete.then((()=>Bs(this,r,"f")[Wr].afterRender())),null===(t=Bs(this,n,"f"))||void 0===t?void 0:t.render()}connectedCallback(){super.connectedCallback(),Bs(this,r,"f")[Wr].reconnect(),Is(this,n,_s(Bs(this,s,"f"),(()=>{this.requestUpdate()})),"f")}disconnectedCallback(){super.disconnectedCallback(),Bs(this,r,"f")[Wr].disconnect(),Bs(this,n,"f")&&(Bs(this,n,"f").stop(),Is(this,n,void 0,"f"))}},r=new WeakMap,s=new WeakMap,n=new WeakMap,i};class Zs{constructor(){this.theme=i`
* {

@@ -7,10 +7,10 @@ margin: 0;

}
`}}const Js=new class extends fr{constructor(t){super(t),this.light_component=Bs(this),this.shadow_component=Zs(this),this.light_view=Ts(this),this.shadow_view=Us(this)}components(t){return br.context(this.context)(t)}},Ks=(t,...e)=>L(t,...e.map(Me.unwrap)),Gs=i`span { color: green }`;let Qs=0,Xs=0;const Ys=Js.shadow_view((t=>e=>{t.styles(Gs);const r=++Qs,s=t.signal(e);return Ks`
`}}const Js=new class extends fr{constructor(t){super(t),this.light_component=Ls(this),this.shadow_component=Vs(this),this.light_view=ks(this),this.shadow_view=js(this)}components(t){return br.context(this.context)(t)}},Ks=(t,...e)=>L(t,...e.map(Me.unwrap)),Gs=i`span { color: green }`;let Qs=0,Fs=0;const Xs=Js.shadow_view((t=>e=>{t.styles(Gs);const r=++Qs,s=t.signal(e);return Ks`
<span>${s} (renders ${r})</span>
<button @click=${()=>s.value+=1}>outer</button>
${tn([1])}
`})),tn=Js.shadow_view((t=>e=>{t.styles(Gs);const r=++Xs,s=t.signal(e);return Ks`
${Ys([1])}
`})),Ys=Js.shadow_view((t=>e=>{t.styles(Gs);const r=++Fs,s=t.signal(e);return Ks`
<span>${s} (renders ${r})</span>
<button @click=${()=>s.value+=1}>inner</button>
`})),en=Js.light_view((t=>e=>{t.name("quartz-tripler");const[r,s]=t.state(e),n=t.flatstate({count:e}),i=t.signal(e);return Ks`
`})),tn=Js.light_view((t=>e=>{t.name("quartz-tripler");const[r,s]=t.state(e),n=t.flatstate({count:e}),i=t.signal(e);return Ks`
<span>${r}</span>

@@ -24,12 +24,12 @@ <button @click=${()=>s(3*r)}>quartz-a</button>

<button @click=${()=>i.value*=3}>quartz-c</button>
`})),rn=Js.shadow_view((t=>e=>{t.name("quadrupler"),t.styles(i`span { color: yellow }`);const r=t.signal(e);return Ks`
`})),en=Js.shadow_view((t=>e=>{t.name("quadrupler"),t.styles(i`span { color: yellow }`);const r=t.signal(e);return Ks`
<span>${r}</span>
<button @click=${()=>r.value*=4}>obsidian</button>
`}));const sn=()=>Math.ceil(1e3*Math.random()),nn=Js.shadow_component((t=>{t.styles(i`button { color: green }`);const e=t.signal(sn);return Ks`
`}));const rn=()=>Math.ceil(1e3*Math.random()),sn=Js.shadow_component((t=>{t.styles(i`button { color: green }`);const e=t.signal(rn);return Ks`
<span>${e}</span>
<button @click=${()=>e.value=sn()}>carbon</button>
`})),on=Js.light_component((t=>{const e=t.signal(256);return Ks`
<button @click=${()=>e.value=rn()}>carbon</button>
`})),nn=Js.light_component((t=>{const e=t.signal(256);return Ks`
<span>${e}</span>
<button @click=${()=>e.value-=8}>oxygen</button>
`}));Js.context=new class extends Fs{constructor(t){super(),this.theme=t}}(i`
`}));Js.context=new class extends Zs{constructor(t){super(),this.theme=t}}(i`
button {

@@ -39,10 +39,10 @@ font-weight: bold;

}
`),$s({SlateCarbon:nn,SlateOxygen:on,...Js.components({SlateGold:class extends ir{constructor(){super(...arguments),or.set(this,Ve.state({count:0}))}static get styles(){return i`span {color: orange}`}render(){return L`
`),gs({SlateCarbon:sn,SlateOxygen:nn,...Js.components({SlateGold:class extends ir{constructor(){super(...arguments),or.set(this,Ve.state({count:0}))}static get styles(){return i`span {color: orange}`}render(){return L`
<span>${ar(this,or,"f").count}</span>
<button @click=${()=>ar(this,or,"f").count++}>gold</button>
`}},SlateSilver:class extends qs{render(){return L`
${en(1)}
${rn([33])}
`}},SlateSilver:class extends zs{render(){return L`
${tn(1)}
${en([33])}
<br/>
${Ys([1])}
${Xs([1])}
`}}})});

@@ -15,6 +15,6 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {

import { Counter } from "./utils/counter.js";
import { deep } from "../../../../tools/deep/deep.js";
import { Signal } from "../../../../signals/signal.js";
import { maptool } from "../../../../tools/maptool.js";
import { flat, signals, watch } from "../../../state.js";
import { deep } from "../../../../pure.js";
export class Use {

@@ -21,0 +21,0 @@ constructor(rerender, context) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc