@vibe-flags/core 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -50,9 +50,9 @@ export declare class VibeFlagBoolean extends LitElement {
50
50
  description: string;
51
51
  value: string;
52
52
  private isMatch;
53
- private ready;
54
53
  connectedCallback(): void;
55
54
  disconnectedCallback(): void;
55
+ protected firstUpdated(): void;
56
56
  protected willUpdate(changed: Map<string, unknown>): void;
57
57
  private registerFlag;
58
58
  private onFlagChange;
@@ -73,9 +73,9 @@ export declare class VibeFlags extends LitElement {
73
73
  export declare class VibeFlagSelect extends LitElement {
74
74
  name: string;
75
75
  description: string;
76
- private ready;
77
76
  connectedCallback(): void;
78
77
  disconnectedCallback(): void;
78
+ protected firstUpdated(): void;
79
79
  protected willUpdate(changed: Map<string, unknown>): void;
80
80
  private getOptions;
81
81
  private registerFlag;
@@ -2,33 +2,33 @@ var VibeFlags=(function(l){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const R=globalThis,q=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),te=new WeakMap;let se=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(q&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=te.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&te.set(t,e))}return e}toString(){return this.cssText}};const ye=r=>new se(typeof r=="string"?r:r+"",void 0,W),K=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);return new se(t,r,W)},$e=(r,e)=>{if(q)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=R.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},ie=q?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ye(t)})(r):r;/**
5
+ */const R=globalThis,L=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,q=Symbol(),te=new WeakMap;let se=class{constructor(e,t,s){if(this._$cssResult$=!0,s!==q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(L&&e===void 0){const s=t!==void 0&&t.length===1;s&&(e=te.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),s&&te.set(t,e))}return e}toString(){return this.cssText}};const ye=r=>new se(typeof r=="string"?r:r+"",void 0,q),W=(r,...e)=>{const t=r.length===1?r[0]:e.reduce((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);return new se(t,r,q)},$e=(r,e)=>{if(L)r.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const t of e){const s=document.createElement("style"),i=R.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=t.cssText,r.appendChild(s)}},ie=L?r=>r:r=>r instanceof CSSStyleSheet?(e=>{let t="";for(const s of e.cssRules)t+=s.cssText;return ye(t)})(r):r;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:me,defineProperty:_e,getOwnPropertyDescriptor:xe,getOwnPropertyNames:we,getOwnPropertySymbols:Se,getPrototypeOf:Ae}=Object,j=globalThis,re=j.trustedTypes,Ee=re?re.emptyScript:"",Ce=j.reactiveElementPolyfillSupport,O=(r,e)=>r,B={toAttribute(r,e){switch(e){case Boolean:r=r?Ee:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},J=(r,e)=>!me(r,e),oe={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:J};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;let A=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=oe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&_e(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:o}=xe(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:i,set(n){const h=i?.call(this);o?.call(this,n),this.requestUpdate(e,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??oe}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;const e=Ae(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){const t=this.properties,s=[...we(t),...Se(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(ie(i))}else e!==void 0&&t.push(ie(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $e(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:B).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:B;this._$Em=i;const h=n.fromAttribute(t,o.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(e,t,s,i=!1,o){if(e!==void 0){const n=this.constructor;if(i===!1&&(o=this[e]),s??=n.getPropertyOptions(e),!((s.hasChanged??J)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),o!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,o]of s){const{wrapped:n}=o,h=this[i];n!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,o,h)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[O("elementProperties")]=new Map,A[O("finalized")]=new Map,Ce?.({ReactiveElement:A}),(j.reactiveElementVersions??=[]).push("2.1.2");/**
9
+ */const{is:me,defineProperty:xe,getOwnPropertyDescriptor:_e,getOwnPropertyNames:we,getOwnPropertySymbols:Ae,getPrototypeOf:Se}=Object,j=globalThis,re=j.trustedTypes,Ee=re?re.emptyScript:"",Ce=j.reactiveElementPolyfillSupport,C=(r,e)=>r,B={toAttribute(r,e){switch(e){case Boolean:r=r?Ee:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,e){let t=r;switch(e){case Boolean:t=r!==null;break;case Number:t=r===null?null:Number(r);break;case Object:case Array:try{t=JSON.parse(r)}catch{t=null}}return t}},K=(r,e)=>!me(r,e),oe={attribute:!0,type:String,converter:B,reflect:!1,useDefault:!1,hasChanged:K};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;let A=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=oe){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(e,s,t);i!==void 0&&xe(this.prototype,e,i)}}static getPropertyDescriptor(e,t,s){const{get:i,set:o}=_e(this.prototype,e)??{get(){return this[t]},set(n){this[t]=n}};return{get:i,set(n){const h=i?.call(this);o?.call(this,n),this.requestUpdate(e,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??oe}static _$Ei(){if(this.hasOwnProperty(C("elementProperties")))return;const e=Se(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(C("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(C("properties"))){const t=this.properties,s=[...we(t),...Ae(t)];for(const i of s)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[s,i]of t)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const s=new Set(e.flat(1/0).reverse());for(const i of s)t.unshift(ie(i))}else e!==void 0&&t.push(ie(e));return t}static _$Eu(e,t){const s=t.attribute;return s===!1?void 0:typeof s=="string"?s:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const s of t.keys())this.hasOwnProperty(s)&&(e.set(s,this[s]),delete this[s]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $e(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,s){this._$AK(e,s)}_$ET(e,t){const s=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,s);if(i!==void 0&&s.reflect===!0){const o=(s.converter?.toAttribute!==void 0?s.converter:B).toAttribute(t,s.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){const s=this.constructor,i=s._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const o=s.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:B;this._$Em=i;const h=n.fromAttribute(t,o.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(e,t,s,i=!1,o){if(e!==void 0){const n=this.constructor;if(i===!1&&(o=this[e]),s??=n.getPropertyOptions(e),!((s.hasChanged??K)(o,t)||s.useDefault&&s.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(n._$Eu(e,s))))return;this.C(e,t,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,n??t??this[e]),o!==!0||n!==void 0)||(this._$AL.has(e)||(this.hasUpdated||s||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,o]of s){const{wrapped:n}=o,h=this[i];n!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,o,h)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(t)):this._$EM()}catch(s){throw e=!1,this._$EM(),s}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[C("elementProperties")]=new Map,A[C("finalized")]=new Map,Ce?.({ReactiveElement:A}),(j.reactiveElementVersions??=[]).push("2.1.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const X=globalThis,ne=r=>r,I=X.trustedTypes,ae=I?I.createPolicy("lit-html",{createHTML:r=>r}):void 0,le="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,he="?"+y,ke=`<${he}>`,_=document,P=()=>_.createComment(""),F=r=>r===null||typeof r!="object"&&typeof r!="function",Y=Array.isArray,Oe=r=>Y(r)||typeof r?.[Symbol.iterator]=="function",Z=`[
14
- \f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ce=/-->/g,de=/>/g,x=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),pe=/'/g,fe=/"/g,ge=/^(?:script|style|textarea|title)$/i,Pe=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),g=Pe(1),E=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ue=new WeakMap,w=_.createTreeWalker(_,129);function ve(r,e){if(!Y(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ae!==void 0?ae.createHTML(e):e}const Fe=(r,e)=>{const t=r.length-1,s=[];let i,o=e===2?"<svg>":e===3?"<math>":"",n=M;for(let h=0;h<t;h++){const a=r[h];let p,f,c=-1,b=0;for(;b<a.length&&(n.lastIndex=b,f=n.exec(a),f!==null);)b=n.lastIndex,n===M?f[1]==="!--"?n=ce:f[1]!==void 0?n=de:f[2]!==void 0?(ge.test(f[2])&&(i=RegExp("</"+f[2],"g")),n=x):f[3]!==void 0&&(n=x):n===x?f[0]===">"?(n=i??M,c=-1):f[1]===void 0?c=-2:(c=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?x:f[3]==='"'?fe:pe):n===fe||n===pe?n=x:n===ce||n===de?n=M:(n=x,i=void 0);const m=n===x&&r[h+1].startsWith("/>")?" ":"";o+=n===M?a+ke:c>=0?(s.push(p),a.slice(0,c)+le+a.slice(c)+y+m):a+y+(c===-2?h:m)}return[ve(r,o+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class T{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let o=0,n=0;const h=e.length-1,a=this.parts,[p,f]=Fe(e,t);if(this.el=T.createElement(p,s),w.currentNode=this.el.content,t===2||t===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=w.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const c of i.getAttributeNames())if(c.endsWith(le)){const b=f[n++],m=i.getAttribute(c).split(y),L=/([.?@])?(.*)/.exec(b);a.push({type:1,index:o,name:L[2],strings:m,ctor:L[1]==="."?Te:L[1]==="?"?Ve:L[1]==="@"?Ue:D}),i.removeAttribute(c)}else c.startsWith(y)&&(a.push({type:6,index:o}),i.removeAttribute(c));if(ge.test(i.tagName)){const c=i.textContent.split(y),b=c.length-1;if(b>0){i.textContent=I?I.emptyScript:"";for(let m=0;m<b;m++)i.append(c[m],P()),w.nextNode(),a.push({type:2,index:++o});i.append(c[b],P())}}}else if(i.nodeType===8)if(i.data===he)a.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(y,c+1))!==-1;)a.push({type:7,index:o}),c+=y.length-1}o++}}static createElement(e,t){const s=_.createElement("template");return s.innerHTML=e,s}}function C(r,e,t=r,s){if(e===E)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const o=F(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=C(r,i._$AS(r,e.values),i,s)),e}class Me{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??_).importNode(t,!0);w.currentNode=i;let o=w.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new V(o,o.nextSibling,this,e):a.type===1?p=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(p=new Ne(o,this,e)),this._$AV.push(p),a=s[++h]}n!==a?.index&&(o=w.nextNode(),n++)}return w.currentNode=_,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class V{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=C(this,e,t),F(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==E&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Oe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&F(this._$AH)?this._$AA.nextSibling.data=e:this.T(_.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=T.createElement(ve(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const o=new Me(i,this),n=o.u(this.options);o.p(t),this.T(n),this._$AH=o}}_$AC(e){let t=ue.get(e.strings);return t===void 0&&ue.set(e.strings,t=new T(e)),t}k(e){Y(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const o of e)i===t.length?t.push(s=new V(this.O(P()),this.O(P()),this,this.options)):s=t[i],s._$AI(o),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=ne(e).nextSibling;ne(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class D{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(e,t=this,s,i){const o=this.strings;let n=!1;if(o===void 0)e=C(this,e,t,0),n=!F(e)||e!==this._$AH&&e!==E,n&&(this._$AH=e);else{const h=e;let a,p;for(e=o[0],a=0;a<o.length-1;a++)p=C(this,h[s+a],t,a),p===E&&(p=this._$AH[a]),n||=!F(p)||p!==this._$AH[a],p===d?e=d:e!==d&&(e+=(p??"")+o[a+1]),this._$AH[a]=p}n&&!i&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Te extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}}class Ve extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}}class Ue extends D{constructor(e,t,s,i,o){super(e,t,s,i,o),this.type=5}_$AI(e,t=this){if((e=C(this,e,t,0)??d)===E)return;const s=this._$AH,i=e===d&&s!==d||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Ne{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){C(this,e)}}const He=X.litHtmlPolyfillSupport;He?.(T,V),(X.litHtmlVersions??=[]).push("3.3.2");const Re=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const o=t?.renderBefore??null;s._$litPart$=i=new V(e.insertBefore(P(),o),o,void 0,t??{})}return i._$AI(r),i};/**
13
+ */const J=globalThis,ne=r=>r,I=J.trustedTypes,ae=I?I.createPolicy("lit-html",{createHTML:r=>r}):void 0,le="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,he="?"+y,ke=`<${he}>`,x=document,k=()=>x.createComment(""),O=r=>r===null||typeof r!="object"&&typeof r!="function",X=Array.isArray,Oe=r=>X(r)||typeof r?.[Symbol.iterator]=="function",Y=`[
14
+ \f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ce=/-->/g,de=/>/g,_=RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),pe=/'/g,fe=/"/g,ge=/^(?:script|style|textarea|title)$/i,Pe=r=>(e,...t)=>({_$litType$:r,strings:e,values:t}),g=Pe(1),S=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ue=new WeakMap,w=x.createTreeWalker(x,129);function ve(r,e){if(!X(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return ae!==void 0?ae.createHTML(e):e}const Fe=(r,e)=>{const t=r.length-1,s=[];let i,o=e===2?"<svg>":e===3?"<math>":"",n=P;for(let h=0;h<t;h++){const a=r[h];let p,f,c=-1,b=0;for(;b<a.length&&(n.lastIndex=b,f=n.exec(a),f!==null);)b=n.lastIndex,n===P?f[1]==="!--"?n=ce:f[1]!==void 0?n=de:f[2]!==void 0?(ge.test(f[2])&&(i=RegExp("</"+f[2],"g")),n=_):f[3]!==void 0&&(n=_):n===_?f[0]===">"?(n=i??P,c=-1):f[1]===void 0?c=-2:(c=n.lastIndex-f[2].length,p=f[1],n=f[3]===void 0?_:f[3]==='"'?fe:pe):n===fe||n===pe?n=_:n===ce||n===de?n=P:(n=_,i=void 0);const m=n===_&&r[h+1].startsWith("/>")?" ":"";o+=n===P?a+ke:c>=0?(s.push(p),a.slice(0,c)+le+a.slice(c)+y+m):a+y+(c===-2?h:m)}return[ve(r,o+(r[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),s]};class F{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let o=0,n=0;const h=e.length-1,a=this.parts,[p,f]=Fe(e,t);if(this.el=F.createElement(p,s),w.currentNode=this.el.content,t===2||t===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=w.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const c of i.getAttributeNames())if(c.endsWith(le)){const b=f[n++],m=i.getAttribute(c).split(y),z=/([.?@])?(.*)/.exec(b);a.push({type:1,index:o,name:z[2],strings:m,ctor:z[1]==="."?Te:z[1]==="?"?Ue:z[1]==="@"?Ve:D}),i.removeAttribute(c)}else c.startsWith(y)&&(a.push({type:6,index:o}),i.removeAttribute(c));if(ge.test(i.tagName)){const c=i.textContent.split(y),b=c.length-1;if(b>0){i.textContent=I?I.emptyScript:"";for(let m=0;m<b;m++)i.append(c[m],k()),w.nextNode(),a.push({type:2,index:++o});i.append(c[b],k())}}}else if(i.nodeType===8)if(i.data===he)a.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(y,c+1))!==-1;)a.push({type:7,index:o}),c+=y.length-1}o++}}static createElement(e,t){const s=x.createElement("template");return s.innerHTML=e,s}}function E(r,e,t=r,s){if(e===S)return e;let i=s!==void 0?t._$Co?.[s]:t._$Cl;const o=O(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,t,s)),s!==void 0?(t._$Co??=[])[s]=i:t._$Cl=i),i!==void 0&&(e=E(r,i._$AS(r,e.values),i,s)),e}class Me{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:s}=this._$AD,i=(e?.creationScope??x).importNode(t,!0);w.currentNode=i;let o=w.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new M(o,o.nextSibling,this,e):a.type===1?p=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(p=new Ne(o,this,e)),this._$AV.push(p),a=s[++h]}n!==a?.index&&(o=w.nextNode(),n++)}return w.currentNode=x,i}p(e){let t=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=E(this,e,t),O(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==S&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Oe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==d&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(x.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:s}=e,i=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=F.createElement(ve(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(t);else{const o=new Me(i,this),n=o.u(this.options);o.p(t),this.T(n),this._$AH=o}}_$AC(e){let t=ue.get(e.strings);return t===void 0&&ue.set(e.strings,t=new F(e)),t}k(e){X(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const o of e)i===t.length?t.push(s=new M(this.O(k()),this.O(k()),this,this.options)):s=t[i],s._$AI(o),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const s=ne(e).nextSibling;ne(e).remove(),e=s}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class D{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(e,t=this,s,i){const o=this.strings;let n=!1;if(o===void 0)e=E(this,e,t,0),n=!O(e)||e!==this._$AH&&e!==S,n&&(this._$AH=e);else{const h=e;let a,p;for(e=o[0],a=0;a<o.length-1;a++)p=E(this,h[s+a],t,a),p===S&&(p=this._$AH[a]),n||=!O(p)||p!==this._$AH[a],p===d?e=d:e!==d&&(e+=(p??"")+o[a+1]),this._$AH[a]=p}n&&!i&&this.j(e)}j(e){e===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Te extends D{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===d?void 0:e}}class Ue extends D{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==d)}}class Ve extends D{constructor(e,t,s,i,o){super(e,t,s,i,o),this.type=5}_$AI(e,t=this){if((e=E(this,e,t,0)??d)===S)return;const s=this._$AH,i=e===d&&s!==d||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Ne{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){E(this,e)}}const He=J.litHtmlPolyfillSupport;He?.(F,M),(J.litHtmlVersions??=[]).push("3.3.2");const Re=(r,e,t)=>{const s=t?.renderBefore??e;let i=s._$litPart$;if(i===void 0){const o=t?.renderBefore??null;s._$litPart$=i=new M(e.insertBefore(k(),o),o,void 0,t??{})}return i._$AI(r),i};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const G=globalThis;class v extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Re(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return E}}v._$litElement$=!0,v.finalized=!0,G.litElementHydrateSupport?.({LitElement:v});const je=G.litElementPolyfillSupport;je?.({LitElement:v}),(G.litElementVersions??=[]).push("4.2.2");/**
19
+ */const Z=globalThis;class v extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Re(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}}v._$litElement$=!0,v.finalized=!0,Z.litElementHydrateSupport?.({LitElement:v});const je=Z.litElementPolyfillSupport;je?.({LitElement:v}),(Z.litElementVersions??=[]).push("4.2.2");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const U=r=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};/**
23
+ */const T=r=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(r,e)}):customElements.define(r,e)};/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const Be={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:J},Ie=(r=Be,e,t)=>{const{kind:s,metadata:i}=t;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(t.name,r),s==="accessor"){const{name:n}=t;return{set(h){const a=e.get.call(this);e.set.call(this,h),this.requestUpdate(n,a,r,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,r,h),h}}}if(s==="setter"){const{name:n}=t;return function(h){const a=this[n];e.call(this,h),this.requestUpdate(n,a,r,!0,h)}}throw Error("Unsupported decorator location: "+s)};function S(r){return(e,t)=>typeof t=="object"?Ie(r,e,t):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,e,t)}/**
27
+ */const Be={attribute:!0,type:String,converter:B,reflect:!1,hasChanged:K},Ie=(r=Be,e,t)=>{const{kind:s,metadata:i}=t;let o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(t.name,r),s==="accessor"){const{name:n}=t;return{set(h){const a=e.get.call(this);e.set.call(this,h),this.requestUpdate(n,a,r,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,r,h),h}}}if(s==="setter"){const{name:n}=t;return function(h){const a=this[n];e.call(this,h),this.requestUpdate(n,a,r,!0,h)}}throw Error("Unsupported decorator location: "+s)};function $(r){return(e,t)=>typeof t=="object"?Ie(r,e,t):((s,i,o)=>{const n=i.hasOwnProperty(o);return i.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,e,t)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function $(r){return S({...r,state:!0,attribute:!1})}var De=Object.getOwnPropertyDescriptor,ze=(r,e,t,s)=>{for(var i=s>1?void 0:s?De(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(i)||i);return i};l.VibeFlags=class extends v{render(){return g`<slot></slot>`}},l.VibeFlags=ze([U("vibe-flags")],l.VibeFlags);const N="vibe-flags:";function Q(r){return r.type==="boolean"?!1:r.options[0]||""}class Le extends EventTarget{constructor(){super(...arguments),this.configs=new Map,this.state={},this.listening=!1,this.onStorageEvent=e=>{if(!e.key?.startsWith(N))return;const t=e.key.slice(N.length),s=this.configs.get(t);if(s)try{const i=e.newValue?JSON.parse(e.newValue):Q(s);this.state[t]=i,this.dispatch(t)}catch{}}}register(e){this.configs.set(e.key,e);const t=this.readFromStorage(e.key);this.state[e.key]=t??Q(e),this.listening||(this.listening=!0,typeof window<"u"&&window.addEventListener("storage",this.onStorageEvent)),this.dispatch(e.key)}unregister(e){this.configs.delete(e),delete this.state[e],this.dispatch()}get(e){return this.state[e]}set(e,t){const s=this.configs.get(e);s&&(s.type==="boolean"&&typeof t!="boolean"||s.type==="select"&&(typeof t!="string"||!s.options.includes(t))||(this.state[e]=t,this.writeToStorage(e,t),this.dispatch(e)))}getAll(){return{...this.state}}getConfig(){return Array.from(this.configs.values())}getConfigForKey(e){return this.configs.get(e)}reset(){for(const[e,t]of this.configs)this.state[e]=Q(t),this.removeFromStorage(e);this.dispatch()}readFromStorage(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(N+e);return t===null?null:JSON.parse(t)}catch{return null}}writeToStorage(e,t){if(!(typeof window>"u"))try{localStorage.setItem(N+e,JSON.stringify(t))}catch{}}removeFromStorage(e){if(!(typeof window>"u"))try{localStorage.removeItem(N+e)}catch{}}dispatch(e){const t={key:e,state:this.getAll()},s=new CustomEvent("vibe-flags-changed",{detail:t,bubbles:!0});this.dispatchEvent(s),typeof window<"u"&&window.dispatchEvent(new CustomEvent("vibe-flags-changed",{detail:t}))}}const u=new Le;var qe=Object.defineProperty,We=Object.getOwnPropertyDescriptor,k=(r,e,t,s)=>{for(var i=s>1?void 0:s?We(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&qe(e,t,i),i};if(typeof document<"u"&&!document.getElementById("vibe-flag-fouc")){const r=document.createElement("style");r.id="vibe-flag-fouc",r.textContent="vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{visibility:hidden}",document.head.appendChild(r)}l.VibeFlagBoolean=class extends v{constructor(){super(...arguments),this.name="",this.description="",this.value="",this.isMatch=!1,this.ready=!1,this.onFlagChange=()=>{this.evaluate()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),this.registerFlag()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}willUpdate(e){(e.has("name")||e.has("description"))&&this.registerFlag()}registerFlag(){this.name&&(u.getConfigForKey(this.name)||u.register({key:this.name,type:"boolean",label:this.description||void 0}),this.evaluate())}evaluate(){const e=u.get(this.name);e===void 0?this.isMatch=!1:this.value===""?this.isMatch=!0:this.isMatch=String(e)===this.value,this.ready||(this.ready=!0,this.style.visibility="visible")}render(){return this.isMatch?g`<slot></slot>`:d}},k([S({type:String})],l.VibeFlagBoolean.prototype,"name",2),k([S({type:String})],l.VibeFlagBoolean.prototype,"description",2),k([S({type:String})],l.VibeFlagBoolean.prototype,"value",2),k([$()],l.VibeFlagBoolean.prototype,"isMatch",2),k([$()],l.VibeFlagBoolean.prototype,"ready",2),l.VibeFlagBoolean=k([U("vibe-flag-boolean")],l.VibeFlagBoolean);var Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,z=(r,e,t,s)=>{for(var i=s>1?void 0:s?Je(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Ke(e,t,i),i};l.VibeFlagSelect=class extends v{constructor(){super(...arguments),this.name="",this.description="",this.ready=!1,this.onFlagChange=()=>{this.syncOptions()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),queueMicrotask(()=>this.registerFlag())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}willUpdate(e){(e.has("name")||e.has("description"))&&this.registerFlag()}getOptions(){return Array.from(this.querySelectorAll("vibe-flag-option"))}registerFlag(){if(!this.name)return;const e=this.getOptions().map(t=>t.value).filter(Boolean);e.length!==0&&(u.getConfigForKey(this.name)||u.register({key:this.name,type:"select",options:e,label:this.description||void 0}),this.syncOptions())}syncOptions(){const e=u.get(this.name);for(const t of this.getOptions())t.active=t.value===e;this.ready||(this.ready=!0,this.style.visibility="visible")}render(){return g`<slot></slot>`}},z([S({type:String})],l.VibeFlagSelect.prototype,"name",2),z([S({type:String})],l.VibeFlagSelect.prototype,"description",2),z([$()],l.VibeFlagSelect.prototype,"ready",2),l.VibeFlagSelect=z([U("vibe-flag-select")],l.VibeFlagSelect);var Xe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,ee=(r,e,t,s)=>{for(var i=s>1?void 0:s?Ye(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Xe(e,t,i),i};l.VibeFlagOption=class extends v{constructor(){super(...arguments),this.value="",this.active=!1}render(){return this.active?g`<slot></slot>`:d}},ee([S({type:String})],l.VibeFlagOption.prototype,"value",2),ee([$()],l.VibeFlagOption.prototype,"active",2),l.VibeFlagOption=ee([U("vibe-flag-option")],l.VibeFlagOption);const Ze=K`
31
+ */function U(r){return $({...r,state:!0,attribute:!1})}var De=Object.getOwnPropertyDescriptor,ze=(r,e,t,s)=>{for(var i=s>1?void 0:s?De(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(i)||i);return i};l.VibeFlags=class extends v{render(){return g`<slot></slot>`}},l.VibeFlags=ze([T("vibe-flags")],l.VibeFlags);const V="vibe-flags:";function G(r){return r.type==="boolean"?!1:r.options[0]||""}class Le extends EventTarget{constructor(){super(...arguments),this.configs=new Map,this.state={},this.listening=!1,this.onStorageEvent=e=>{if(!e.key?.startsWith(V))return;const t=e.key.slice(V.length),s=this.configs.get(t);if(s)try{const i=e.newValue?JSON.parse(e.newValue):G(s);this.state[t]=i,this.dispatch(t)}catch{}}}register(e){this.configs.set(e.key,e);const t=this.readFromStorage(e.key);this.state[e.key]=t??G(e),this.listening||(this.listening=!0,typeof window<"u"&&window.addEventListener("storage",this.onStorageEvent)),this.dispatch(e.key)}unregister(e){this.configs.delete(e),delete this.state[e],this.dispatch()}get(e){return this.state[e]}set(e,t){const s=this.configs.get(e);s&&(s.type==="boolean"&&typeof t!="boolean"||s.type==="select"&&(typeof t!="string"||!s.options.includes(t))||(this.state[e]=t,this.writeToStorage(e,t),this.dispatch(e)))}getAll(){return{...this.state}}getConfig(){return Array.from(this.configs.values())}getConfigForKey(e){return this.configs.get(e)}reset(){for(const[e,t]of this.configs)this.state[e]=G(t),this.removeFromStorage(e);this.dispatch()}readFromStorage(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(V+e);return t===null?null:JSON.parse(t)}catch{return null}}writeToStorage(e,t){if(!(typeof window>"u"))try{localStorage.setItem(V+e,JSON.stringify(t))}catch{}}removeFromStorage(e){if(!(typeof window>"u"))try{localStorage.removeItem(V+e)}catch{}}dispatch(e){const t={key:e,state:this.getAll()},s=new CustomEvent("vibe-flags-changed",{detail:t,bubbles:!0});this.dispatchEvent(s),typeof window<"u"&&window.dispatchEvent(new CustomEvent("vibe-flags-changed",{detail:t}))}}const u=new Le;var qe=Object.defineProperty,We=Object.getOwnPropertyDescriptor,N=(r,e,t,s)=>{for(var i=s>1?void 0:s?We(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&qe(e,t,i),i};if(typeof document<"u"&&!document.getElementById("vibe-flag-fouc")){const r=document.createElement("style");r.id="vibe-flag-fouc",r.textContent="vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{display:none}",document.head.appendChild(r)}l.VibeFlagBoolean=class extends v{constructor(){super(...arguments),this.name="",this.description="",this.value="",this.isMatch=!1,this.onFlagChange=()=>{this.evaluate()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),this.registerFlag()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}firstUpdated(){this.style.display="contents"}willUpdate(e){(e.has("name")||e.has("description"))&&this.registerFlag()}registerFlag(){this.name&&(u.getConfigForKey(this.name)||u.register({key:this.name,type:"boolean",label:this.description||void 0}),this.evaluate())}evaluate(){const e=u.get(this.name);e===void 0?this.isMatch=!1:this.value===""?this.isMatch=!0:this.isMatch=String(e)===this.value,this.isMatch?this.setAttribute("active",""):this.removeAttribute("active")}render(){return this.isMatch?g`<slot></slot>`:d}},N([$({type:String})],l.VibeFlagBoolean.prototype,"name",2),N([$({type:String})],l.VibeFlagBoolean.prototype,"description",2),N([$({type:String})],l.VibeFlagBoolean.prototype,"value",2),N([U()],l.VibeFlagBoolean.prototype,"isMatch",2),l.VibeFlagBoolean=N([T("vibe-flag-boolean")],l.VibeFlagBoolean);var Ke=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Q=(r,e,t,s)=>{for(var i=s>1?void 0:s?Je(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Ke(e,t,i),i};l.VibeFlagSelect=class extends v{constructor(){super(...arguments),this.name="",this.description="",this.onFlagChange=()=>{this.syncOptions()}}connectedCallback(){super.connectedCallback(),window.addEventListener("vibe-flags-changed",this.onFlagChange),queueMicrotask(()=>this.registerFlag())}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("vibe-flags-changed",this.onFlagChange)}firstUpdated(){this.style.display="contents"}willUpdate(e){(e.has("name")||e.has("description"))&&this.registerFlag()}getOptions(){return Array.from(this.querySelectorAll("vibe-flag-option"))}registerFlag(){if(!this.name)return;const e=this.getOptions().map(t=>t.value).filter(Boolean);e.length!==0&&(u.getConfigForKey(this.name)||u.register({key:this.name,type:"select",options:e,label:this.description||void 0}),this.syncOptions())}syncOptions(){const e=u.get(this.name);for(const t of this.getOptions())t.active=t.value===e}render(){return g`<slot></slot>`}},Q([$({type:String})],l.VibeFlagSelect.prototype,"name",2),Q([$({type:String})],l.VibeFlagSelect.prototype,"description",2),l.VibeFlagSelect=Q([T("vibe-flag-select")],l.VibeFlagSelect);var Xe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,ee=(r,e,t,s)=>{for(var i=s>1?void 0:s?Ye(e,t):e,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(e,t,i):n(i))||i);return s&&i&&Xe(e,t,i),i};l.VibeFlagOption=class extends v{constructor(){super(...arguments),this.value="",this.active=!1}render(){return this.active?g`<slot></slot>`:d}},ee([$({type:String})],l.VibeFlagOption.prototype,"value",2),ee([$({type:Boolean,reflect:!0})],l.VibeFlagOption.prototype,"active",2),l.VibeFlagOption=ee([T("vibe-flag-option")],l.VibeFlagOption);const Ze=W`
32
32
  :host {
33
33
  --vf-bg: #0a0a0a;
34
34
  --vf-bg-muted: #171717;
@@ -52,7 +52,7 @@ var VibeFlags=(function(l){"use strict";/**
52
52
  --vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
53
53
  0 8px 10px -6px rgba(0, 0, 0, 0.6);
54
54
  }
55
- `,Ge=K`
55
+ `,Ge=W`
56
56
  :host {
57
57
  --vf-bg: #ffffff;
58
58
  --vf-bg-muted: #f5f5f5;
@@ -151,7 +151,7 @@ var VibeFlags=(function(l){"use strict";/**
151
151
  </button>
152
152
  </div>
153
153
  </div>
154
- `}},l.VibeToolbar.styles=[K`
154
+ `}},l.VibeToolbar.styles=[W`
155
155
  * {
156
156
  box-sizing: border-box;
157
157
  margin: 0;
@@ -465,4 +465,4 @@ var VibeFlags=(function(l){"use strict";/**
465
465
  color: var(--vf-text-muted);
466
466
  font-size: 13px;
467
467
  }
468
- `],H([$()],l.VibeToolbar.prototype,"open",2),H([$()],l.VibeToolbar.prototype,"flags",2),H([$()],l.VibeToolbar.prototype,"configs",2),H([$()],l.VibeToolbar.prototype,"darkMode",2),l.VibeToolbar=H([U("vibe-toolbar")],l.VibeToolbar),l.flagStore=u,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),l})({});
468
+ `],H([U()],l.VibeToolbar.prototype,"open",2),H([U()],l.VibeToolbar.prototype,"flags",2),H([U()],l.VibeToolbar.prototype,"configs",2),H([U()],l.VibeToolbar.prototype,"darkMode",2),l.VibeToolbar=H([T("vibe-toolbar")],l.VibeToolbar),l.flagStore=u,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),l})({});
@@ -3,16 +3,16 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const z = globalThis, Y = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), re = /* @__PURE__ */ new WeakMap();
6
+ const D = globalThis, X = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Y = Symbol(), re = /* @__PURE__ */ new WeakMap();
7
7
  let be = class {
8
8
  constructor(e, t, s) {
9
- if (this._$cssResult$ = !0, s !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, s !== Y) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
10
  this.cssText = e, this.t = t;
11
11
  }
12
12
  get styleSheet() {
13
13
  let e = this.o;
14
14
  const t = this.t;
15
- if (Y && e === void 0) {
15
+ if (X && e === void 0) {
16
16
  const s = t !== void 0 && t.length === 1;
17
17
  s && (e = re.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && re.set(t, e));
18
18
  }
@@ -22,20 +22,20 @@ let be = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const _e = (i) => new be(typeof i == "string" ? i : i + "", void 0, Z), G = (i, ...e) => {
25
+ const _e = (i) => new be(typeof i == "string" ? i : i + "", void 0, Y), Z = (i, ...e) => {
26
26
  const t = i.length === 1 ? i[0] : e.reduce((s, r, o) => s + ((n) => {
27
27
  if (n._$cssResult$ === !0) return n.cssText;
28
28
  if (typeof n == "number") return n;
29
29
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
30
  })(r) + i[o + 1], i[0]);
31
- return new be(t, i, Z);
31
+ return new be(t, i, Y);
32
32
  }, we = (i, e) => {
33
- if (Y) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
33
+ if (X) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
34
34
  else for (const t of e) {
35
- const s = document.createElement("style"), r = z.litNonce;
35
+ const s = document.createElement("style"), r = D.litNonce;
36
36
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, i.appendChild(s);
37
37
  }
38
- }, oe = Y ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
38
+ }, oe = X ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
39
39
  let t = "";
40
40
  for (const s of e.cssRules) t += s.cssText;
41
41
  return _e(t);
@@ -45,7 +45,7 @@ const _e = (i) => new be(typeof i == "string" ? i : i + "", void 0, Z), G = (i,
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Ae, defineProperty: Se, getOwnPropertyDescriptor: Ee, getOwnPropertyNames: Ce, getOwnPropertySymbols: ke, getPrototypeOf: Pe } = Object, q = globalThis, ne = q.trustedTypes, Oe = ne ? ne.emptyScript : "", Me = q.reactiveElementPolyfillSupport, T = (i, e) => i, B = { toAttribute(i, e) {
48
+ const { is: Ae, defineProperty: Se, getOwnPropertyDescriptor: Ee, getOwnPropertyNames: Ce, getOwnPropertySymbols: ke, getPrototypeOf: Pe } = Object, q = globalThis, ne = q.trustedTypes, Oe = ne ? ne.emptyScript : "", Me = q.reactiveElementPolyfillSupport, O = (i, e) => i, z = { toAttribute(i, e) {
49
49
  switch (e) {
50
50
  case Boolean:
51
51
  i = i ? Oe : null;
@@ -73,9 +73,9 @@ const { is: Ae, defineProperty: Se, getOwnPropertyDescriptor: Ee, getOwnProperty
73
73
  }
74
74
  }
75
75
  return t;
76
- } }, Q = (i, e) => !Ae(i, e), ae = { attribute: !0, type: String, converter: B, reflect: !1, useDefault: !1, hasChanged: Q };
76
+ } }, G = (i, e) => !Ae(i, e), ae = { attribute: !0, type: String, converter: z, reflect: !1, useDefault: !1, hasChanged: G };
77
77
  Symbol.metadata ??= Symbol("metadata"), q.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let E = class extends HTMLElement {
78
+ let A = class extends HTMLElement {
79
79
  static addInitializer(e) {
80
80
  this._$Ei(), (this.l ??= []).push(e);
81
81
  }
@@ -103,13 +103,13 @@ let E = class extends HTMLElement {
103
103
  return this.elementProperties.get(e) ?? ae;
104
104
  }
105
105
  static _$Ei() {
106
- if (this.hasOwnProperty(T("elementProperties"))) return;
106
+ if (this.hasOwnProperty(O("elementProperties"))) return;
107
107
  const e = Pe(this);
108
108
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
109
  }
110
110
  static finalize() {
111
- if (this.hasOwnProperty(T("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
111
+ if (this.hasOwnProperty(O("finalized"))) return;
112
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
113
113
  const t = this.properties, s = [...Ce(t), ...ke(t)];
114
114
  for (const r of s) this.createProperty(r, t[r]);
115
115
  }
@@ -172,14 +172,14 @@ let E = class extends HTMLElement {
172
172
  _$ET(e, t) {
173
173
  const s = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, s);
174
174
  if (r !== void 0 && s.reflect === !0) {
175
- const o = (s.converter?.toAttribute !== void 0 ? s.converter : B).toAttribute(t, s.type);
175
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : z).toAttribute(t, s.type);
176
176
  this._$Em = e, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
177
177
  }
178
178
  }
179
179
  _$AK(e, t) {
180
180
  const s = this.constructor, r = s._$Eh.get(e);
181
181
  if (r !== void 0 && this._$Em !== r) {
182
- const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : B;
182
+ const o = s.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : z;
183
183
  this._$Em = r;
184
184
  const l = n.fromAttribute(t, o.type);
185
185
  this[r] = l ?? this._$Ej?.get(r) ?? l, this._$Em = null;
@@ -188,7 +188,7 @@ let E = class extends HTMLElement {
188
188
  requestUpdate(e, t, s, r = !1, o) {
189
189
  if (e !== void 0) {
190
190
  const n = this.constructor;
191
- if (r === !1 && (o = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? Q)(o, t) || s.useDefault && s.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
191
+ if (r === !1 && (o = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? G)(o, t) || s.useDefault && s.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
192
192
  this.C(e, t, s);
193
193
  }
194
194
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -256,59 +256,59 @@ let E = class extends HTMLElement {
256
256
  firstUpdated(e) {
257
257
  }
258
258
  };
259
- E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[T("elementProperties")] = /* @__PURE__ */ new Map(), E[T("finalized")] = /* @__PURE__ */ new Map(), Me?.({ ReactiveElement: E }), (q.reactiveElementVersions ??= []).push("2.1.2");
259
+ A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[O("elementProperties")] = /* @__PURE__ */ new Map(), A[O("finalized")] = /* @__PURE__ */ new Map(), Me?.({ ReactiveElement: A }), (q.reactiveElementVersions ??= []).push("2.1.2");
260
260
  /**
261
261
  * @license
262
262
  * Copyright 2017 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
264
  */
265
- const ee = globalThis, le = (i) => i, L = ee.trustedTypes, he = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ye = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, $e = "?" + y, Te = `<${$e}>`, w = document, U = () => w.createComment(""), F = (i) => i === null || typeof i != "object" && typeof i != "function", te = Array.isArray, Ue = (i) => te(i) || typeof i?.[Symbol.iterator] == "function", J = `[
266
- \f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ce = /-->/g, de = />/g, x = RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, fe = /"/g, me = /^(?:script|style|textarea|title)$/i, Fe = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), f = Fe(1), C = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ue = /* @__PURE__ */ new WeakMap(), _ = w.createTreeWalker(w, 129);
265
+ const Q = globalThis, le = (i) => i, B = Q.trustedTypes, he = B ? B.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $e = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, ye = "?" + $, Te = `<${ye}>`, w = document, M = () => w.createComment(""), T = (i) => i === null || typeof i != "object" && typeof i != "function", ee = Array.isArray, Ue = (i) => ee(i) || typeof i?.[Symbol.iterator] == "function", K = `[
266
+ \f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ce = /-->/g, de = />/g, x = RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), pe = /'/g, fe = /"/g, me = /^(?:script|style|textarea|title)$/i, Fe = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), f = Fe(1), S = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ue = /* @__PURE__ */ new WeakMap(), _ = w.createTreeWalker(w, 129);
268
268
  function xe(i, e) {
269
- if (!te(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
269
+ if (!ee(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
270
  return he !== void 0 ? he.createHTML(e) : e;
271
271
  }
272
272
  const Ne = (i, e) => {
273
273
  const t = i.length - 1, s = [];
274
- let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = O;
274
+ let r, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = k;
275
275
  for (let l = 0; l < t; l++) {
276
276
  const a = i[l];
277
277
  let d, p, h = -1, g = 0;
278
- for (; g < a.length && (n.lastIndex = g, p = n.exec(a), p !== null); ) g = n.lastIndex, n === O ? p[1] === "!--" ? n = ce : p[1] !== void 0 ? n = de : p[2] !== void 0 ? (me.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = x) : p[3] !== void 0 && (n = x) : n === x ? p[0] === ">" ? (n = r ?? O, h = -1) : p[1] === void 0 ? h = -2 : (h = n.lastIndex - p[2].length, d = p[1], n = p[3] === void 0 ? x : p[3] === '"' ? fe : pe) : n === fe || n === pe ? n = x : n === ce || n === de ? n = O : (n = x, r = void 0);
278
+ for (; g < a.length && (n.lastIndex = g, p = n.exec(a), p !== null); ) g = n.lastIndex, n === k ? p[1] === "!--" ? n = ce : p[1] !== void 0 ? n = de : p[2] !== void 0 ? (me.test(p[2]) && (r = RegExp("</" + p[2], "g")), n = x) : p[3] !== void 0 && (n = x) : n === x ? p[0] === ">" ? (n = r ?? k, h = -1) : p[1] === void 0 ? h = -2 : (h = n.lastIndex - p[2].length, d = p[1], n = p[3] === void 0 ? x : p[3] === '"' ? fe : pe) : n === fe || n === pe ? n = x : n === ce || n === de ? n = k : (n = x, r = void 0);
279
279
  const b = n === x && i[l + 1].startsWith("/>") ? " " : "";
280
- o += n === O ? a + Te : h >= 0 ? (s.push(d), a.slice(0, h) + ye + a.slice(h) + y + b) : a + y + (h === -2 ? l : b);
280
+ o += n === k ? a + Te : h >= 0 ? (s.push(d), a.slice(0, h) + $e + a.slice(h) + $ + b) : a + $ + (h === -2 ? l : b);
281
281
  }
282
282
  return [xe(i, o + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
283
283
  };
284
- class N {
284
+ class U {
285
285
  constructor({ strings: e, _$litType$: t }, s) {
286
286
  let r;
287
287
  this.parts = [];
288
288
  let o = 0, n = 0;
289
289
  const l = e.length - 1, a = this.parts, [d, p] = Ne(e, t);
290
- if (this.el = N.createElement(d, s), _.currentNode = this.el.content, t === 2 || t === 3) {
290
+ if (this.el = U.createElement(d, s), _.currentNode = this.el.content, t === 2 || t === 3) {
291
291
  const h = this.el.content.firstChild;
292
292
  h.replaceWith(...h.childNodes);
293
293
  }
294
294
  for (; (r = _.nextNode()) !== null && a.length < l; ) {
295
295
  if (r.nodeType === 1) {
296
- if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(ye)) {
297
- const g = p[n++], b = r.getAttribute(h).split(y), D = /([.?@])?(.*)/.exec(g);
298
- a.push({ type: 1, index: o, name: D[2], strings: b, ctor: D[1] === "." ? Re : D[1] === "?" ? je : D[1] === "@" ? Ie : W }), r.removeAttribute(h);
299
- } else h.startsWith(y) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
296
+ if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith($e)) {
297
+ const g = p[n++], b = r.getAttribute(h).split($), I = /([.?@])?(.*)/.exec(g);
298
+ a.push({ type: 1, index: o, name: I[2], strings: b, ctor: I[1] === "." ? Re : I[1] === "?" ? je : I[1] === "@" ? Ie : W }), r.removeAttribute(h);
299
+ } else h.startsWith($) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
300
300
  if (me.test(r.tagName)) {
301
- const h = r.textContent.split(y), g = h.length - 1;
301
+ const h = r.textContent.split($), g = h.length - 1;
302
302
  if (g > 0) {
303
- r.textContent = L ? L.emptyScript : "";
304
- for (let b = 0; b < g; b++) r.append(h[b], U()), _.nextNode(), a.push({ type: 2, index: ++o });
305
- r.append(h[g], U());
303
+ r.textContent = B ? B.emptyScript : "";
304
+ for (let b = 0; b < g; b++) r.append(h[b], M()), _.nextNode(), a.push({ type: 2, index: ++o });
305
+ r.append(h[g], M());
306
306
  }
307
307
  }
308
- } else if (r.nodeType === 8) if (r.data === $e) a.push({ type: 2, index: o });
308
+ } else if (r.nodeType === 8) if (r.data === ye) a.push({ type: 2, index: o });
309
309
  else {
310
310
  let h = -1;
311
- for (; (h = r.data.indexOf(y, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += y.length - 1;
311
+ for (; (h = r.data.indexOf($, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += $.length - 1;
312
312
  }
313
313
  o++;
314
314
  }
@@ -318,11 +318,11 @@ class N {
318
318
  return s.innerHTML = e, s;
319
319
  }
320
320
  }
321
- function k(i, e, t = i, s) {
322
- if (e === C) return e;
321
+ function E(i, e, t = i, s) {
322
+ if (e === S) return e;
323
323
  let r = s !== void 0 ? t._$Co?.[s] : t._$Cl;
324
- const o = F(e) ? void 0 : e._$litDirective$;
325
- return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = k(i, r._$AS(i, e.values), r, s)), e;
324
+ const o = T(e) ? void 0 : e._$litDirective$;
325
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = r : t._$Cl = r), r !== void 0 && (e = E(i, r._$AS(i, e.values), r, s)), e;
326
326
  }
327
327
  class He {
328
328
  constructor(e, t) {
@@ -341,7 +341,7 @@ class He {
341
341
  for (; a !== void 0; ) {
342
342
  if (n === a.index) {
343
343
  let d;
344
- a.type === 2 ? d = new R(o, o.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (d = new De(o, this, e)), this._$AV.push(d), a = s[++l];
344
+ a.type === 2 ? d = new F(o, o.nextSibling, this, e) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (d = new De(o, this, e)), this._$AV.push(d), a = s[++l];
345
345
  }
346
346
  n !== a?.index && (o = _.nextNode(), n++);
347
347
  }
@@ -352,7 +352,7 @@ class He {
352
352
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
353
353
  }
354
354
  }
355
- class R {
355
+ class F {
356
356
  get _$AU() {
357
357
  return this._$AM?._$AU ?? this._$Cv;
358
358
  }
@@ -371,7 +371,7 @@ class R {
371
371
  return this._$AB;
372
372
  }
373
373
  _$AI(e, t = this) {
374
- e = k(this, e, t), F(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== C && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ue(e) ? this.k(e) : this._(e);
374
+ e = E(this, e, t), T(e) ? e === c || e == null || e === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Ue(e) ? this.k(e) : this._(e);
375
375
  }
376
376
  O(e) {
377
377
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -380,10 +380,10 @@ class R {
380
380
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
381
381
  }
382
382
  _(e) {
383
- this._$AH !== c && F(this._$AH) ? this._$AA.nextSibling.data = e : this.T(w.createTextNode(e)), this._$AH = e;
383
+ this._$AH !== c && T(this._$AH) ? this._$AA.nextSibling.data = e : this.T(w.createTextNode(e)), this._$AH = e;
384
384
  }
385
385
  $(e) {
386
- const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = N.createElement(xe(s.h, s.h[0]), this.options)), s);
386
+ const { values: t, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = U.createElement(xe(s.h, s.h[0]), this.options)), s);
387
387
  if (this._$AH?._$AD === r) this._$AH.p(t);
388
388
  else {
389
389
  const o = new He(r, this), n = o.u(this.options);
@@ -392,13 +392,13 @@ class R {
392
392
  }
393
393
  _$AC(e) {
394
394
  let t = ue.get(e.strings);
395
- return t === void 0 && ue.set(e.strings, t = new N(e)), t;
395
+ return t === void 0 && ue.set(e.strings, t = new U(e)), t;
396
396
  }
397
397
  k(e) {
398
- te(this._$AH) || (this._$AH = [], this._$AR());
398
+ ee(this._$AH) || (this._$AH = [], this._$AR());
399
399
  const t = this._$AH;
400
400
  let s, r = 0;
401
- for (const o of e) r === t.length ? t.push(s = new R(this.O(U()), this.O(U()), this, this.options)) : s = t[r], s._$AI(o), r++;
401
+ for (const o of e) r === t.length ? t.push(s = new F(this.O(M()), this.O(M()), this, this.options)) : s = t[r], s._$AI(o), r++;
402
402
  r < t.length && (this._$AR(s && s._$AB.nextSibling, r), t.length = r);
403
403
  }
404
404
  _$AR(e = this._$AA.nextSibling, t) {
@@ -424,11 +424,11 @@ class W {
424
424
  _$AI(e, t = this, s, r) {
425
425
  const o = this.strings;
426
426
  let n = !1;
427
- if (o === void 0) e = k(this, e, t, 0), n = !F(e) || e !== this._$AH && e !== C, n && (this._$AH = e);
427
+ if (o === void 0) e = E(this, e, t, 0), n = !T(e) || e !== this._$AH && e !== S, n && (this._$AH = e);
428
428
  else {
429
429
  const l = e;
430
430
  let a, d;
431
- for (e = o[0], a = 0; a < o.length - 1; a++) d = k(this, l[s + a], t, a), d === C && (d = this._$AH[a]), n ||= !F(d) || d !== this._$AH[a], d === c ? e = c : e !== c && (e += (d ?? "") + o[a + 1]), this._$AH[a] = d;
431
+ for (e = o[0], a = 0; a < o.length - 1; a++) d = E(this, l[s + a], t, a), d === S && (d = this._$AH[a]), n ||= !T(d) || d !== this._$AH[a], d === c ? e = c : e !== c && (e += (d ?? "") + o[a + 1]), this._$AH[a] = d;
432
432
  }
433
433
  n && !r && this.j(e);
434
434
  }
@@ -457,7 +457,7 @@ class Ie extends W {
457
457
  super(e, t, s, r, o), this.type = 5;
458
458
  }
459
459
  _$AI(e, t = this) {
460
- if ((e = k(this, e, t, 0) ?? c) === C) return;
460
+ if ((e = E(this, e, t, 0) ?? c) === S) return;
461
461
  const s = this._$AH, r = e === c && s !== c || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, o = e !== c && (s === c || r);
462
462
  r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
463
463
  }
@@ -473,17 +473,17 @@ class De {
473
473
  return this._$AM._$AU;
474
474
  }
475
475
  _$AI(e) {
476
- k(this, e);
476
+ E(this, e);
477
477
  }
478
478
  }
479
- const ze = ee.litHtmlPolyfillSupport;
480
- ze?.(N, R), (ee.litHtmlVersions ??= []).push("3.3.2");
479
+ const ze = Q.litHtmlPolyfillSupport;
480
+ ze?.(U, F), (Q.litHtmlVersions ??= []).push("3.3.2");
481
481
  const Be = (i, e, t) => {
482
482
  const s = t?.renderBefore ?? e;
483
483
  let r = s._$litPart$;
484
484
  if (r === void 0) {
485
485
  const o = t?.renderBefore ?? null;
486
- s._$litPart$ = r = new R(e.insertBefore(U(), o), o, void 0, t ?? {});
486
+ s._$litPart$ = r = new F(e.insertBefore(M(), o), o, void 0, t ?? {});
487
487
  }
488
488
  return r._$AI(i), r;
489
489
  };
@@ -492,8 +492,8 @@ const Be = (i, e, t) => {
492
492
  * Copyright 2017 Google LLC
493
493
  * SPDX-License-Identifier: BSD-3-Clause
494
494
  */
495
- const se = globalThis;
496
- class v extends E {
495
+ const te = globalThis;
496
+ class v extends A {
497
497
  constructor() {
498
498
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
499
  }
@@ -512,19 +512,19 @@ class v extends E {
512
512
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
513
  }
514
514
  render() {
515
- return C;
515
+ return S;
516
516
  }
517
517
  }
518
- v._$litElement$ = !0, v.finalized = !0, se.litElementHydrateSupport?.({ LitElement: v });
519
- const Le = se.litElementPolyfillSupport;
518
+ v._$litElement$ = !0, v.finalized = !0, te.litElementHydrateSupport?.({ LitElement: v });
519
+ const Le = te.litElementPolyfillSupport;
520
520
  Le?.({ LitElement: v });
521
- (se.litElementVersions ??= []).push("4.2.2");
521
+ (te.litElementVersions ??= []).push("4.2.2");
522
522
  /**
523
523
  * @license
524
524
  * Copyright 2017 Google LLC
525
525
  * SPDX-License-Identifier: BSD-3-Clause
526
526
  */
527
- const j = (i) => (e, t) => {
527
+ const N = (i) => (e, t) => {
528
528
  t !== void 0 ? t.addInitializer(() => {
529
529
  customElements.define(i, e);
530
530
  }) : customElements.define(i, e);
@@ -534,7 +534,7 @@ const j = (i) => (e, t) => {
534
534
  * Copyright 2017 Google LLC
535
535
  * SPDX-License-Identifier: BSD-3-Clause
536
536
  */
537
- const Ve = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged: Q }, qe = (i = Ve, e, t) => {
537
+ const Ve = { attribute: !0, type: String, converter: z, reflect: !1, hasChanged: G }, qe = (i = Ve, e, t) => {
538
538
  const { kind: s, metadata: r } = t;
539
539
  let o = globalThis.litPropertyMetadata.get(r);
540
540
  if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(t.name, i), s === "accessor") {
@@ -555,7 +555,7 @@ const Ve = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged:
555
555
  }
556
556
  throw Error("Unsupported decorator location: " + s);
557
557
  };
558
- function S(i) {
558
+ function m(i) {
559
559
  return (e, t) => typeof t == "object" ? qe(i, e, t) : ((s, r, o) => {
560
560
  const n = r.hasOwnProperty(o);
561
561
  return r.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
@@ -566,8 +566,8 @@ function S(i) {
566
566
  * Copyright 2017 Google LLC
567
567
  * SPDX-License-Identifier: BSD-3-Clause
568
568
  */
569
- function m(i) {
570
- return S({ ...i, state: !0, attribute: !1 });
569
+ function H(i) {
570
+ return m({ ...i, state: !0, attribute: !1 });
571
571
  }
572
572
  var We = Object.getOwnPropertyDescriptor, Ke = (i, e, t, s) => {
573
573
  for (var r = s > 1 ? void 0 : s ? We(e, t) : e, o = i.length - 1, n; o >= 0; o--)
@@ -580,20 +580,20 @@ let ge = class extends v {
580
580
  }
581
581
  };
582
582
  ge = Ke([
583
- j("vibe-flags")
583
+ N("vibe-flags")
584
584
  ], ge);
585
- const M = "vibe-flags:";
586
- function X(i) {
585
+ const P = "vibe-flags:";
586
+ function J(i) {
587
587
  return i.type === "boolean" ? !1 : i.options[0] || "";
588
588
  }
589
589
  class Je extends EventTarget {
590
590
  constructor() {
591
591
  super(...arguments), this.configs = /* @__PURE__ */ new Map(), this.state = {}, this.listening = !1, this.onStorageEvent = (e) => {
592
- if (!e.key?.startsWith(M)) return;
593
- const t = e.key.slice(M.length), s = this.configs.get(t);
592
+ if (!e.key?.startsWith(P)) return;
593
+ const t = e.key.slice(P.length), s = this.configs.get(t);
594
594
  if (s)
595
595
  try {
596
- const r = e.newValue ? JSON.parse(e.newValue) : X(s);
596
+ const r = e.newValue ? JSON.parse(e.newValue) : J(s);
597
597
  this.state[t] = r, this.dispatch(t);
598
598
  } catch {
599
599
  }
@@ -602,7 +602,7 @@ class Je extends EventTarget {
602
602
  register(e) {
603
603
  this.configs.set(e.key, e);
604
604
  const t = this.readFromStorage(e.key);
605
- this.state[e.key] = t ?? X(e), this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
605
+ this.state[e.key] = t ?? J(e), this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
606
606
  }
607
607
  unregister(e) {
608
608
  this.configs.delete(e), delete this.state[e], this.dispatch();
@@ -625,13 +625,13 @@ class Je extends EventTarget {
625
625
  }
626
626
  reset() {
627
627
  for (const [e, t] of this.configs)
628
- this.state[e] = X(t), this.removeFromStorage(e);
628
+ this.state[e] = J(t), this.removeFromStorage(e);
629
629
  this.dispatch();
630
630
  }
631
631
  readFromStorage(e) {
632
632
  if (typeof window > "u") return null;
633
633
  try {
634
- const t = localStorage.getItem(M + e);
634
+ const t = localStorage.getItem(P + e);
635
635
  return t === null ? null : JSON.parse(t);
636
636
  } catch {
637
637
  return null;
@@ -640,14 +640,14 @@ class Je extends EventTarget {
640
640
  writeToStorage(e, t) {
641
641
  if (!(typeof window > "u"))
642
642
  try {
643
- localStorage.setItem(M + e, JSON.stringify(t));
643
+ localStorage.setItem(P + e, JSON.stringify(t));
644
644
  } catch {
645
645
  }
646
646
  }
647
647
  removeFromStorage(e) {
648
648
  if (!(typeof window > "u"))
649
649
  try {
650
- localStorage.removeItem(M + e);
650
+ localStorage.removeItem(P + e);
651
651
  } catch {
652
652
  }
653
653
  }
@@ -660,18 +660,18 @@ class Je extends EventTarget {
660
660
  }
661
661
  }
662
662
  const u = new Je();
663
- var Xe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, P = (i, e, t, s) => {
663
+ var Xe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, R = (i, e, t, s) => {
664
664
  for (var r = s > 1 ? void 0 : s ? Ye(e, t) : e, o = i.length - 1, n; o >= 0; o--)
665
665
  (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
666
666
  return s && r && Xe(e, t, r), r;
667
667
  };
668
668
  if (typeof document < "u" && !document.getElementById("vibe-flag-fouc")) {
669
669
  const i = document.createElement("style");
670
- i.id = "vibe-flag-fouc", i.textContent = "vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{visibility:hidden}", document.head.appendChild(i);
670
+ i.id = "vibe-flag-fouc", i.textContent = "vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{display:none}", document.head.appendChild(i);
671
671
  }
672
- let A = class extends v {
672
+ let C = class extends v {
673
673
  constructor() {
674
- super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.ready = !1, this.onFlagChange = () => {
674
+ super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.onFlagChange = () => {
675
675
  this.evaluate();
676
676
  };
677
677
  }
@@ -681,6 +681,9 @@ let A = class extends v {
681
681
  disconnectedCallback() {
682
682
  super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
683
683
  }
684
+ firstUpdated() {
685
+ this.style.display = "contents";
686
+ }
684
687
  willUpdate(i) {
685
688
  (i.has("name") || i.has("description")) && this.registerFlag();
686
689
  }
@@ -693,38 +696,35 @@ let A = class extends v {
693
696
  }
694
697
  evaluate() {
695
698
  const i = u.get(this.name);
696
- i === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(i) === this.value, this.ready || (this.ready = !0, this.style.visibility = "visible");
699
+ i === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(i) === this.value, this.isMatch ? this.setAttribute("active", "") : this.removeAttribute("active");
697
700
  }
698
701
  render() {
699
702
  return this.isMatch ? f`<slot></slot>` : c;
700
703
  }
701
704
  };
702
- P([
703
- S({ type: String })
704
- ], A.prototype, "name", 2);
705
- P([
706
- S({ type: String })
707
- ], A.prototype, "description", 2);
708
- P([
709
- S({ type: String })
710
- ], A.prototype, "value", 2);
711
- P([
712
- m()
713
- ], A.prototype, "isMatch", 2);
714
- P([
715
- m()
716
- ], A.prototype, "ready", 2);
717
- A = P([
718
- j("vibe-flag-boolean")
719
- ], A);
720
- var Ze = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, K = (i, e, t, s) => {
705
+ R([
706
+ m({ type: String })
707
+ ], C.prototype, "name", 2);
708
+ R([
709
+ m({ type: String })
710
+ ], C.prototype, "description", 2);
711
+ R([
712
+ m({ type: String })
713
+ ], C.prototype, "value", 2);
714
+ R([
715
+ H()
716
+ ], C.prototype, "isMatch", 2);
717
+ C = R([
718
+ N("vibe-flag-boolean")
719
+ ], C);
720
+ var Ze = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, se = (i, e, t, s) => {
721
721
  for (var r = s > 1 ? void 0 : s ? Ge(e, t) : e, o = i.length - 1, n; o >= 0; o--)
722
722
  (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
723
723
  return s && r && Ze(e, t, r), r;
724
724
  };
725
- let H = class extends v {
725
+ let L = class extends v {
726
726
  constructor() {
727
- super(...arguments), this.name = "", this.description = "", this.ready = !1, this.onFlagChange = () => {
727
+ super(...arguments), this.name = "", this.description = "", this.onFlagChange = () => {
728
728
  this.syncOptions();
729
729
  };
730
730
  }
@@ -734,6 +734,9 @@ let H = class extends v {
734
734
  disconnectedCallback() {
735
735
  super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
736
736
  }
737
+ firstUpdated() {
738
+ this.style.display = "contents";
739
+ }
737
740
  willUpdate(i) {
738
741
  (i.has("name") || i.has("description")) && this.registerFlag();
739
742
  }
@@ -754,24 +757,20 @@ let H = class extends v {
754
757
  const i = u.get(this.name);
755
758
  for (const e of this.getOptions())
756
759
  e.active = e.value === i;
757
- this.ready || (this.ready = !0, this.style.visibility = "visible");
758
760
  }
759
761
  render() {
760
762
  return f`<slot></slot>`;
761
763
  }
762
764
  };
763
- K([
764
- S({ type: String })
765
- ], H.prototype, "name", 2);
766
- K([
767
- S({ type: String })
768
- ], H.prototype, "description", 2);
769
- K([
770
- m()
771
- ], H.prototype, "ready", 2);
772
- H = K([
773
- j("vibe-flag-select")
774
- ], H);
765
+ se([
766
+ m({ type: String })
767
+ ], L.prototype, "name", 2);
768
+ se([
769
+ m({ type: String })
770
+ ], L.prototype, "description", 2);
771
+ L = se([
772
+ N("vibe-flag-select")
773
+ ], L);
775
774
  var Qe = Object.defineProperty, et = Object.getOwnPropertyDescriptor, ie = (i, e, t, s) => {
776
775
  for (var r = s > 1 ? void 0 : s ? et(e, t) : e, o = i.length - 1, n; o >= 0; o--)
777
776
  (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
@@ -786,15 +785,15 @@ let V = class extends v {
786
785
  }
787
786
  };
788
787
  ie([
789
- S({ type: String })
788
+ m({ type: String })
790
789
  ], V.prototype, "value", 2);
791
790
  ie([
792
- m()
791
+ m({ type: Boolean, reflect: !0 })
793
792
  ], V.prototype, "active", 2);
794
793
  V = ie([
795
- j("vibe-flag-option")
794
+ N("vibe-flag-option")
796
795
  ], V);
797
- const tt = G`
796
+ const tt = Z`
798
797
  :host {
799
798
  --vf-bg: #0a0a0a;
800
799
  --vf-bg-muted: #171717;
@@ -818,7 +817,7 @@ const tt = G`
818
817
  --vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
819
818
  0 8px 10px -6px rgba(0, 0, 0, 0.6);
820
819
  }
821
- `, st = G`
820
+ `, st = Z`
822
821
  :host {
823
822
  --vf-bg: #ffffff;
824
823
  --vf-bg-muted: #f5f5f5;
@@ -843,13 +842,13 @@ const tt = G`
843
842
  0 8px 10px -6px rgba(0, 0, 0, 0.1);
844
843
  }
845
844
  `;
846
- var it = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, I = (i, e, t, s) => {
845
+ var it = Object.defineProperty, rt = Object.getOwnPropertyDescriptor, j = (i, e, t, s) => {
847
846
  for (var r = s > 1 ? void 0 : s ? rt(e, t) : e, o = i.length - 1, n; o >= 0; o--)
848
847
  (n = i[o]) && (r = (s ? n(e, t, r) : n(r)) || r);
849
848
  return s && r && it(e, t, r), r;
850
849
  };
851
850
  const ve = "vibeFlagsTheme";
852
- let $ = class extends v {
851
+ let y = class extends v {
853
852
  constructor() {
854
853
  super(...arguments), this.open = !1, this.flags = {}, this.configs = [], this.darkMode = !0, this.onFlagChange = () => {
855
854
  this.syncFromStore();
@@ -872,7 +871,7 @@ let $ = class extends v {
872
871
  applyTheme() {
873
872
  const i = this.darkMode ? tt : st, e = new CSSStyleSheet();
874
873
  e.replaceSync(i.cssText), this.shadowRoot.adoptedStyleSheets = [
875
- ...$.elementStyles.map((t) => t.styleSheet),
874
+ ...y.elementStyles.map((t) => t.styleSheet),
876
875
  e
877
876
  ];
878
877
  }
@@ -1003,8 +1002,8 @@ let $ = class extends v {
1003
1002
  `;
1004
1003
  }
1005
1004
  };
1006
- $.styles = [
1007
- G`
1005
+ y.styles = [
1006
+ Z`
1008
1007
  * {
1009
1008
  box-sizing: border-box;
1010
1009
  margin: 0;
@@ -1320,26 +1319,26 @@ $.styles = [
1320
1319
  }
1321
1320
  `
1322
1321
  ];
1323
- I([
1324
- m()
1325
- ], $.prototype, "open", 2);
1326
- I([
1327
- m()
1328
- ], $.prototype, "flags", 2);
1329
- I([
1330
- m()
1331
- ], $.prototype, "configs", 2);
1332
- I([
1333
- m()
1334
- ], $.prototype, "darkMode", 2);
1335
- $ = I([
1336
- j("vibe-toolbar")
1337
- ], $);
1322
+ j([
1323
+ H()
1324
+ ], y.prototype, "open", 2);
1325
+ j([
1326
+ H()
1327
+ ], y.prototype, "flags", 2);
1328
+ j([
1329
+ H()
1330
+ ], y.prototype, "configs", 2);
1331
+ j([
1332
+ H()
1333
+ ], y.prototype, "darkMode", 2);
1334
+ y = j([
1335
+ N("vibe-toolbar")
1336
+ ], y);
1338
1337
  export {
1339
- A as VibeFlagBoolean,
1338
+ C as VibeFlagBoolean,
1340
1339
  V as VibeFlagOption,
1341
- H as VibeFlagSelect,
1340
+ L as VibeFlagSelect,
1342
1341
  ge as VibeFlags,
1343
- $ as VibeToolbar,
1342
+ y as VibeToolbar,
1344
1343
  u as flagStore
1345
1344
  };
@@ -1,30 +1,30 @@
1
- import { LitElement as u, html as a, nothing as y, css as S } from "lit";
2
- import { customElement as b, property as f, state as c } from "lit/decorators.js";
3
- var O = Object.getOwnPropertyDescriptor, _ = (t, e, r, o) => {
4
- for (var s = o > 1 ? void 0 : o ? O(e, r) : e, i = t.length - 1, n; i >= 0; i--)
5
- (n = t[i]) && (s = n(s) || s);
1
+ import { LitElement as g, html as a, nothing as x, css as k } from "lit";
2
+ import { customElement as h, property as c, state as v } from "lit/decorators.js";
3
+ var M = Object.getOwnPropertyDescriptor, O = (t, e, r, o) => {
4
+ for (var s = o > 1 ? void 0 : o ? M(e, r) : e, n = t.length - 1, i; n >= 0; n--)
5
+ (i = t[n]) && (s = i(s) || s);
6
6
  return s;
7
7
  };
8
- let F = class extends u {
8
+ let F = class extends g {
9
9
  render() {
10
10
  return a`<slot></slot>`;
11
11
  }
12
12
  };
13
- F = _([
14
- b("vibe-flags")
13
+ F = O([
14
+ h("vibe-flags")
15
15
  ], F);
16
- const h = "vibe-flags:";
17
- function k(t) {
16
+ const f = "vibe-flags:";
17
+ function w(t) {
18
18
  return t.type === "boolean" ? !1 : t.options[0] || "";
19
19
  }
20
- class M extends EventTarget {
20
+ class _ extends EventTarget {
21
21
  constructor() {
22
22
  super(...arguments), this.configs = /* @__PURE__ */ new Map(), this.state = {}, this.listening = !1, this.onStorageEvent = (e) => {
23
- if (!e.key?.startsWith(h)) return;
24
- const r = e.key.slice(h.length), o = this.configs.get(r);
23
+ if (!e.key?.startsWith(f)) return;
24
+ const r = e.key.slice(f.length), o = this.configs.get(r);
25
25
  if (o)
26
26
  try {
27
- const s = e.newValue ? JSON.parse(e.newValue) : k(o);
27
+ const s = e.newValue ? JSON.parse(e.newValue) : w(o);
28
28
  this.state[r] = s, this.dispatch(r);
29
29
  } catch {
30
30
  }
@@ -33,7 +33,7 @@ class M extends EventTarget {
33
33
  register(e) {
34
34
  this.configs.set(e.key, e);
35
35
  const r = this.readFromStorage(e.key);
36
- this.state[e.key] = r ?? k(e), this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
36
+ this.state[e.key] = r ?? w(e), this.listening || (this.listening = !0, typeof window < "u" && window.addEventListener("storage", this.onStorageEvent)), this.dispatch(e.key);
37
37
  }
38
38
  unregister(e) {
39
39
  this.configs.delete(e), delete this.state[e], this.dispatch();
@@ -56,13 +56,13 @@ class M extends EventTarget {
56
56
  }
57
57
  reset() {
58
58
  for (const [e, r] of this.configs)
59
- this.state[e] = k(r), this.removeFromStorage(e);
59
+ this.state[e] = w(r), this.removeFromStorage(e);
60
60
  this.dispatch();
61
61
  }
62
62
  readFromStorage(e) {
63
63
  if (typeof window > "u") return null;
64
64
  try {
65
- const r = localStorage.getItem(h + e);
65
+ const r = localStorage.getItem(f + e);
66
66
  return r === null ? null : JSON.parse(r);
67
67
  } catch {
68
68
  return null;
@@ -71,14 +71,14 @@ class M extends EventTarget {
71
71
  writeToStorage(e, r) {
72
72
  if (!(typeof window > "u"))
73
73
  try {
74
- localStorage.setItem(h + e, JSON.stringify(r));
74
+ localStorage.setItem(f + e, JSON.stringify(r));
75
75
  } catch {
76
76
  }
77
77
  }
78
78
  removeFromStorage(e) {
79
79
  if (!(typeof window > "u"))
80
80
  try {
81
- localStorage.removeItem(h + e);
81
+ localStorage.removeItem(f + e);
82
82
  } catch {
83
83
  }
84
84
  }
@@ -90,19 +90,19 @@ class M extends EventTarget {
90
90
  this.dispatchEvent(o), typeof window < "u" && window.dispatchEvent(new CustomEvent("vibe-flags-changed", { detail: r }));
91
91
  }
92
92
  }
93
- const l = new M();
94
- var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor, g = (t, e, r, o) => {
95
- for (var s = o > 1 ? void 0 : o ? P(e, r) : e, i = t.length - 1, n; i >= 0; i--)
96
- (n = t[i]) && (s = (o ? n(e, r, s) : n(s)) || s);
93
+ const l = new _();
94
+ var E = Object.defineProperty, P = Object.getOwnPropertyDescriptor, u = (t, e, r, o) => {
95
+ for (var s = o > 1 ? void 0 : o ? P(e, r) : e, n = t.length - 1, i; n >= 0; n--)
96
+ (i = t[n]) && (s = (o ? i(e, r, s) : i(s)) || s);
97
97
  return o && s && E(e, r, s), s;
98
98
  };
99
99
  if (typeof document < "u" && !document.getElementById("vibe-flag-fouc")) {
100
100
  const t = document.createElement("style");
101
- t.id = "vibe-flag-fouc", t.textContent = "vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{visibility:hidden}", document.head.appendChild(t);
101
+ t.id = "vibe-flag-fouc", t.textContent = "vibe-flag-boolean:not(:defined),vibe-flag-boolean:defined,vibe-flag-select:not(:defined),vibe-flag-select:defined,vibe-flag-option:not(:defined),vibe-flag-option:defined{display:none}", document.head.appendChild(t);
102
102
  }
103
- let p = class extends u {
103
+ let p = class extends g {
104
104
  constructor() {
105
- super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.ready = !1, this.onFlagChange = () => {
105
+ super(...arguments), this.name = "", this.description = "", this.value = "", this.isMatch = !1, this.onFlagChange = () => {
106
106
  this.evaluate();
107
107
  };
108
108
  }
@@ -112,6 +112,9 @@ let p = class extends u {
112
112
  disconnectedCallback() {
113
113
  super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
114
114
  }
115
+ firstUpdated() {
116
+ this.style.display = "contents";
117
+ }
115
118
  willUpdate(t) {
116
119
  (t.has("name") || t.has("description")) && this.registerFlag();
117
120
  }
@@ -124,38 +127,35 @@ let p = class extends u {
124
127
  }
125
128
  evaluate() {
126
129
  const t = l.get(this.name);
127
- t === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(t) === this.value, this.ready || (this.ready = !0, this.style.visibility = "visible");
130
+ t === void 0 ? this.isMatch = !1 : this.value === "" ? this.isMatch = !0 : this.isMatch = String(t) === this.value, this.isMatch ? this.setAttribute("active", "") : this.removeAttribute("active");
128
131
  }
129
132
  render() {
130
- return this.isMatch ? a`<slot></slot>` : y;
133
+ return this.isMatch ? a`<slot></slot>` : x;
131
134
  }
132
135
  };
133
- g([
134
- f({ type: String })
136
+ u([
137
+ c({ type: String })
135
138
  ], p.prototype, "name", 2);
136
- g([
137
- f({ type: String })
139
+ u([
140
+ c({ type: String })
138
141
  ], p.prototype, "description", 2);
139
- g([
140
- f({ type: String })
142
+ u([
143
+ c({ type: String })
141
144
  ], p.prototype, "value", 2);
142
- g([
143
- c()
145
+ u([
146
+ v()
144
147
  ], p.prototype, "isMatch", 2);
145
- g([
146
- c()
147
- ], p.prototype, "ready", 2);
148
- p = g([
149
- b("vibe-flag-boolean")
148
+ p = u([
149
+ h("vibe-flag-boolean")
150
150
  ], p);
151
- var T = Object.defineProperty, j = Object.getOwnPropertyDescriptor, w = (t, e, r, o) => {
152
- for (var s = o > 1 ? void 0 : o ? j(e, r) : e, i = t.length - 1, n; i >= 0; i--)
153
- (n = t[i]) && (s = (o ? n(e, r, s) : n(s)) || s);
151
+ var T = Object.defineProperty, j = Object.getOwnPropertyDescriptor, S = (t, e, r, o) => {
152
+ for (var s = o > 1 ? void 0 : o ? j(e, r) : e, n = t.length - 1, i; n >= 0; n--)
153
+ (i = t[n]) && (s = (o ? i(e, r, s) : i(s)) || s);
154
154
  return o && s && T(e, r, s), s;
155
155
  };
156
- let v = class extends u {
156
+ let y = class extends g {
157
157
  constructor() {
158
- super(...arguments), this.name = "", this.description = "", this.ready = !1, this.onFlagChange = () => {
158
+ super(...arguments), this.name = "", this.description = "", this.onFlagChange = () => {
159
159
  this.syncOptions();
160
160
  };
161
161
  }
@@ -165,6 +165,9 @@ let v = class extends u {
165
165
  disconnectedCallback() {
166
166
  super.disconnectedCallback(), window.removeEventListener("vibe-flags-changed", this.onFlagChange);
167
167
  }
168
+ firstUpdated() {
169
+ this.style.display = "contents";
170
+ }
168
171
  willUpdate(t) {
169
172
  (t.has("name") || t.has("description")) && this.registerFlag();
170
173
  }
@@ -185,47 +188,43 @@ let v = class extends u {
185
188
  const t = l.get(this.name);
186
189
  for (const e of this.getOptions())
187
190
  e.active = e.value === t;
188
- this.ready || (this.ready = !0, this.style.visibility = "visible");
189
191
  }
190
192
  render() {
191
193
  return a`<slot></slot>`;
192
194
  }
193
195
  };
194
- w([
195
- f({ type: String })
196
- ], v.prototype, "name", 2);
197
- w([
198
- f({ type: String })
199
- ], v.prototype, "description", 2);
200
- w([
201
- c()
202
- ], v.prototype, "ready", 2);
203
- v = w([
204
- b("vibe-flag-select")
205
- ], v);
196
+ S([
197
+ c({ type: String })
198
+ ], y.prototype, "name", 2);
199
+ S([
200
+ c({ type: String })
201
+ ], y.prototype, "description", 2);
202
+ y = S([
203
+ h("vibe-flag-select")
204
+ ], y);
206
205
  var I = Object.defineProperty, z = Object.getOwnPropertyDescriptor, C = (t, e, r, o) => {
207
- for (var s = o > 1 ? void 0 : o ? z(e, r) : e, i = t.length - 1, n; i >= 0; i--)
208
- (n = t[i]) && (s = (o ? n(e, r, s) : n(s)) || s);
206
+ for (var s = o > 1 ? void 0 : o ? z(e, r) : e, n = t.length - 1, i; n >= 0; n--)
207
+ (i = t[n]) && (s = (o ? i(e, r, s) : i(s)) || s);
209
208
  return o && s && I(e, r, s), s;
210
209
  };
211
- let m = class extends u {
210
+ let m = class extends g {
212
211
  constructor() {
213
212
  super(...arguments), this.value = "", this.active = !1;
214
213
  }
215
214
  render() {
216
- return this.active ? a`<slot></slot>` : y;
215
+ return this.active ? a`<slot></slot>` : x;
217
216
  }
218
217
  };
219
218
  C([
220
- f({ type: String })
219
+ c({ type: String })
221
220
  ], m.prototype, "value", 2);
222
221
  C([
223
- c()
222
+ c({ type: Boolean, reflect: !0 })
224
223
  ], m.prototype, "active", 2);
225
224
  m = C([
226
- b("vibe-flag-option")
225
+ h("vibe-flag-option")
227
226
  ], m);
228
- const D = S`
227
+ const A = k`
229
228
  :host {
230
229
  --vf-bg: #0a0a0a;
231
230
  --vf-bg-muted: #171717;
@@ -249,7 +248,7 @@ const D = S`
249
248
  --vf-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6),
250
249
  0 8px 10px -6px rgba(0, 0, 0, 0.6);
251
250
  }
252
- `, B = S`
251
+ `, B = k`
253
252
  :host {
254
253
  --vf-bg: #ffffff;
255
254
  --vf-bg-muted: #f5f5f5;
@@ -274,13 +273,13 @@ const D = S`
274
273
  0 8px 10px -6px rgba(0, 0, 0, 0.1);
275
274
  }
276
275
  `;
277
- var A = Object.defineProperty, V = Object.getOwnPropertyDescriptor, x = (t, e, r, o) => {
278
- for (var s = o > 1 ? void 0 : o ? V(e, r) : e, i = t.length - 1, n; i >= 0; i--)
279
- (n = t[i]) && (s = (o ? n(e, r, s) : n(s)) || s);
280
- return o && s && A(e, r, s), s;
276
+ var D = Object.defineProperty, V = Object.getOwnPropertyDescriptor, b = (t, e, r, o) => {
277
+ for (var s = o > 1 ? void 0 : o ? V(e, r) : e, n = t.length - 1, i; n >= 0; n--)
278
+ (i = t[n]) && (s = (o ? i(e, r, s) : i(s)) || s);
279
+ return o && s && D(e, r, s), s;
281
280
  };
282
281
  const $ = "vibeFlagsTheme";
283
- let d = class extends u {
282
+ let d = class extends g {
284
283
  constructor() {
285
284
  super(...arguments), this.open = !1, this.flags = {}, this.configs = [], this.darkMode = !0, this.onFlagChange = () => {
286
285
  this.syncFromStore();
@@ -301,7 +300,7 @@ let d = class extends u {
301
300
  this.darkMode = !this.darkMode, localStorage.setItem($, this.darkMode ? "dark" : "light"), this.applyTheme();
302
301
  }
303
302
  applyTheme() {
304
- const t = this.darkMode ? D : B, e = new CSSStyleSheet();
303
+ const t = this.darkMode ? A : B, e = new CSSStyleSheet();
305
304
  e.replaceSync(t.cssText), this.shadowRoot.adoptedStyleSheets = [
306
305
  ...d.elementStyles.map((r) => r.styleSheet),
307
306
  e
@@ -365,7 +364,7 @@ let d = class extends u {
365
364
  `;
366
365
  }
367
366
  renderSelectFlag(t) {
368
- if (t.type !== "select") return y;
367
+ if (t.type !== "select") return x;
369
368
  const e = this.flags[t.key];
370
369
  return a`
371
370
  <div class="flag-item">
@@ -394,7 +393,7 @@ let d = class extends u {
394
393
  }
395
394
  render() {
396
395
  return a`
397
- ${this.open ? y : a`
396
+ ${this.open ? x : a`
398
397
  <button class="fab" @click=${this.toggleSidebar} aria-label="Toggle feature flags">
399
398
  ${this.renderFlagIcon()}
400
399
  </button>
@@ -435,7 +434,7 @@ let d = class extends u {
435
434
  }
436
435
  };
437
436
  d.styles = [
438
- S`
437
+ k`
439
438
  * {
440
439
  box-sizing: border-box;
441
440
  margin: 0;
@@ -751,25 +750,25 @@ d.styles = [
751
750
  }
752
751
  `
753
752
  ];
754
- x([
755
- c()
753
+ b([
754
+ v()
756
755
  ], d.prototype, "open", 2);
757
- x([
758
- c()
756
+ b([
757
+ v()
759
758
  ], d.prototype, "flags", 2);
760
- x([
761
- c()
759
+ b([
760
+ v()
762
761
  ], d.prototype, "configs", 2);
763
- x([
764
- c()
762
+ b([
763
+ v()
765
764
  ], d.prototype, "darkMode", 2);
766
- d = x([
767
- b("vibe-toolbar")
765
+ d = b([
766
+ h("vibe-toolbar")
768
767
  ], d);
769
768
  export {
770
769
  p as VibeFlagBoolean,
771
770
  m as VibeFlagOption,
772
- v as VibeFlagSelect,
771
+ y as VibeFlagSelect,
773
772
  F as VibeFlags,
774
773
  d as VibeToolbar,
775
774
  l as flagStore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-flags/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "main": "./dist/vibe-flags.js",
6
6
  "module": "./dist/vibe-flags.js",