@spectric/ui 0.0.16 → 0.0.17

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.
Files changed (45) hide show
  1. package/dist/classes/DisposibleElement.d.ts +1 -0
  2. package/dist/classes/index.d.ts +2 -0
  3. package/dist/components/color_picker/ColorPicker.d.ts +59 -0
  4. package/dist/components/color_picker/index.d.ts +0 -0
  5. package/dist/components/index.d.ts +2 -0
  6. package/dist/components/input.d.ts +3 -1
  7. package/dist/components/table/body.d.ts +2 -2
  8. package/dist/components/table/cell.d.ts +2 -2
  9. package/dist/components/table/header.d.ts +9 -3
  10. package/dist/components/table/table.d.ts +18 -6
  11. package/dist/components/table/virtualBody.d.ts +2 -2
  12. package/dist/components/tooltip/popover.d.ts +85 -0
  13. package/dist/components/tooltip/tooltip.d.ts +14 -15
  14. package/dist/custom-elements.json +83 -8
  15. package/dist/index.d.ts +58 -0
  16. package/dist/index.es.js +2635 -2249
  17. package/dist/index.es.js.map +1 -1
  18. package/dist/index.umd.js +183 -132
  19. package/dist/index.umd.js.map +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/utils/index.d.ts +3 -0
  22. package/package.json +6 -2
  23. package/src/classes/DisposibleElement.ts +3 -0
  24. package/src/classes/index.ts +2 -0
  25. package/src/components/color_picker/ColorPicker.css +4 -0
  26. package/src/components/color_picker/ColorPicker.ts +244 -0
  27. package/src/components/color_picker/index.ts +1 -0
  28. package/src/components/index.ts +3 -1
  29. package/src/components/input.css +38 -1
  30. package/src/components/input.ts +34 -7
  31. package/src/components/table/__tests__/table.spec.ts +91 -0
  32. package/src/components/table/body.ts +2 -2
  33. package/src/components/table/cell.ts +11 -5
  34. package/src/components/table/header.css +54 -0
  35. package/src/components/table/header.ts +144 -49
  36. package/src/components/table/table.css +11 -34
  37. package/src/components/table/table.ts +50 -16
  38. package/src/components/table/virtualBody.ts +2 -2
  39. package/src/components/tooltip/popover.ts +221 -0
  40. package/src/components/tooltip/tooltip.css +21 -16
  41. package/src/components/tooltip/tooltip.ts +17 -124
  42. package/src/index.ts +8 -1
  43. package/src/stories/fixtures/ExampleContent.ts +3 -3
  44. package/src/stories/table.stories.ts +5 -5
  45. package/src/utils/index.ts +3 -0
package/dist/index.umd.js CHANGED
@@ -1,30 +1,30 @@
1
- (function(d,te){typeof exports=="object"&&typeof module<"u"?te(exports):typeof define=="function"&&define.amd?define(["exports"],te):(d=typeof globalThis<"u"?globalThis:d||self,te(d["Spectric-UI"]={}))})(this,function(d){"use strict";/**
1
+ (function(h,se){typeof exports=="object"&&typeof module<"u"?se(exports):typeof define=="function"&&define.amd?define(["exports"],se):(h=typeof globalThis<"u"?globalThis:h||self,se(h["Spectric-UI"]={}))})(this,function(h){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */var _i;const te=globalThis,Dt=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Lt=Symbol(),Sr=new WeakMap;let Ar=class{constructor(t,s,i){if(this._$cssResult$=!0,i!==Lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=s}get styleSheet(){let t=this.o;const s=this.t;if(Dt&&t===void 0){const i=s!==void 0&&s.length===1;i&&(t=Sr.get(s)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Sr.set(s,t))}return t}toString(){return this.cssText}};const Ts=o=>new Ar(typeof o=="string"?o:o+"",void 0,Lt),F=(o,...t)=>{const s=o.length===1?o[0]:t.reduce((i,n,e)=>i+(p=>{if(p._$cssResult$===!0)return p.cssText;if(typeof p=="number")return p;throw Error("Value passed to 'css' function must be a 'css' function result: "+p+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[e+1],o[0]);return new Ar(s,o,Lt)},Os=(o,t)=>{if(Dt)o.adoptedStyleSheets=t.map(s=>s instanceof CSSStyleSheet?s:s.styleSheet);else for(const s of t){const i=document.createElement("style"),n=te.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=s.cssText,o.appendChild(i)}},xr=Dt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let s="";for(const i of t.cssRules)s+=i.cssText;return Ts(s)})(o):o;/**
5
+ */var Ni;const se=globalThis,Mt=se.ShadowRoot&&(se.ShadyCSS===void 0||se.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),Qr=new WeakMap;let qr=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==It)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(Mt&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=Qr.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Qr.set(n,e))}return e}toString(){return this.cssText}};const Us=s=>new qr(typeof s=="string"?s:s+"",void 0,It),I=(s,...e)=>{const n=s.length===1?s[0]:e.reduce((i,o,t)=>i+(c=>{if(c._$cssResult$===!0)return c.cssText;if(typeof c=="number")return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[t+1],s[0]);return new qr(n,s,It)},Fs=(s,e)=>{if(Mt)s.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),o=se.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=n.cssText,s.appendChild(i)}},Wr=Mt?s=>s:s=>s instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return Us(n)})(s):s;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Ds,defineProperty:Ls,getOwnPropertyDescriptor:Ns,getOwnPropertyNames:Bs,getOwnPropertySymbols:js,getPrototypeOf:zs}=Object,re=globalThis,Er=re.trustedTypes,Rs=Er?Er.emptyScript:"",Nt=re.reactiveElementPolyfillSupport,Me=(o,t)=>o,st={toAttribute(o,t){switch(t){case Boolean:o=o?Rs:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let s=o;switch(t){case Boolean:s=o!==null;break;case Number:s=o===null?null:Number(o);break;case Object:case Array:try{s=JSON.parse(o)}catch{s=null}}return s}},Bt=(o,t)=>!Ds(o,t),Cr={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Bt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),re.litPropertyMetadata??(re.litPropertyMetadata=new WeakMap);class Se extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=Cr){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),n=this.getPropertyDescriptor(t,i,s);n!==void 0&&Ls(this.prototype,t,n)}}static getPropertyDescriptor(t,s,i){const{get:n,set:e}=Ns(this.prototype,t)??{get(){return this[s]},set(p){this[s]=p}};return{get(){return n==null?void 0:n.call(this)},set(p){const h=n==null?void 0:n.call(this);e.call(this,p),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Cr}static _$Ei(){if(this.hasOwnProperty(Me("elementProperties")))return;const t=zs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Me("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Me("properties"))){const s=this.properties,i=[...Bs(s),...js(s)];for(const n of i)this.createProperty(n,s[n])}const t=this[Symbol.metadata];if(t!==null){const s=litPropertyMetadata.get(t);if(s!==void 0)for(const[i,n]of s)this.elementProperties.set(i,n)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const n=this._$Eu(s,i);n!==void 0&&this._$Eh.set(n,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const s=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const n of i)s.unshift(xr(n))}else t!==void 0&&s.push(xr(t));return s}static _$Eu(t,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(s=>this.enableUpdating=s),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(s=>s(this))}addController(t){var s;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var s;(s=this._$EO)==null||s.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Os(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(s=>{var i;return(i=s.hostDisconnected)==null?void 0:i.call(s)})}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){var e;const i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){const p=(((e=i.converter)==null?void 0:e.toAttribute)!==void 0?i.converter:st).toAttribute(s,i.type);this._$Em=t,p==null?this.removeAttribute(n):this.setAttribute(n,p),this._$Em=null}}_$AK(t,s){var e;const i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const p=i.getPropertyOptions(n),h=typeof p.converter=="function"?{fromAttribute:p.converter}:((e=p.converter)==null?void 0:e.fromAttribute)!==void 0?p.converter:st;this._$Em=n,this[n]=h.fromAttribute(s,p.type),this._$Em=null}}requestUpdate(t,s,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Bt)(this[t],s))return;this.P(t,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[e,p]of this._$Ep)this[e]=p;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[e,p]of n)p.wrapped!==!0||this._$AL.has(e)||this[e]===void 0||this.P(e,this[e],p)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),(i=this._$EO)==null||i.forEach(n=>{var e;return(e=n.hostUpdate)==null?void 0:e.call(n)}),this.update(s)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(s)}willUpdate(t){}_$AE(t){var s;(s=this._$EO)==null||s.forEach(i=>{var n;return(n=i.hostUpdated)==null?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(s=>this._$EC(s,this[s]))),this._$EU()}updated(t){}firstUpdated(t){}}Se.elementStyles=[],Se.shadowRootOptions={mode:"open"},Se[Me("elementProperties")]=new Map,Se[Me("finalized")]=new Map,Nt==null||Nt({ReactiveElement:Se}),(re.reactiveElementVersions??(re.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:Qs,defineProperty:qs,getOwnPropertyDescriptor:Ws,getOwnPropertyNames:Vs,getOwnPropertySymbols:Ys,getPrototypeOf:Ks}=Object,ne=globalThis,Vr=ne.trustedTypes,Zs=Vr?Vr.emptyScript:"",Ht=ne.reactiveElementPolyfillSupport,qe=(s,e)=>s,pt={toAttribute(s,e){switch(e){case Boolean:s=s?Zs:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,e){let n=s;switch(e){case Boolean:n=s!==null;break;case Number:n=s===null?null:Number(s);break;case Object:case Array:try{n=JSON.parse(s)}catch{n=null}}return n}},Ut=(s,e)=>!Qs(s,e),Yr={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:Ut};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),ne.litPropertyMetadata??(ne.litPropertyMetadata=new WeakMap);class Te extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??(this.l=[])).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=Yr){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,n);o!==void 0&&qs(this.prototype,e,o)}}static getPropertyDescriptor(e,n,i){const{get:o,set:t}=Ws(this.prototype,e)??{get(){return this[n]},set(c){this[n]=c}};return{get(){return o==null?void 0:o.call(this)},set(c){const d=o==null?void 0:o.call(this);t.call(this,c),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Yr}static _$Ei(){if(this.hasOwnProperty(qe("elementProperties")))return;const e=Ks(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(qe("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qe("properties"))){const n=this.properties,i=[...Vs(n),...Ys(n)];for(const o of i)this.createProperty(o,n[o])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,o]of n)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const o=this._$Eu(n,i);o!==void 0&&this._$Eh.set(o,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const o of i)n.unshift(Wr(o))}else e!==void 0&&n.push(Wr(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i: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(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n;(this._$EO??(this._$EO=new Set)).add(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)==null||n.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Fs(e,this.constructor.elementStyles),e}connectedCallback(){var e;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostConnected)==null?void 0:i.call(n)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var t;const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(o!==void 0&&i.reflect===!0){const c=(((t=i.converter)==null?void 0:t.toAttribute)!==void 0?i.converter:pt).toAttribute(n,i.type);this._$Em=e,c==null?this.removeAttribute(o):this.setAttribute(o,c),this._$Em=null}}_$AK(e,n){var t;const i=this.constructor,o=i._$Eh.get(e);if(o!==void 0&&this._$Em!==o){const c=i.getPropertyOptions(o),d=typeof c.converter=="function"?{fromAttribute:c.converter}:((t=c.converter)==null?void 0:t.fromAttribute)!==void 0?c.converter:pt;this._$Em=o,this[o]=d.fromAttribute(n,c.type),this._$Em=null}}requestUpdate(e,n,i){if(e!==void 0){if(i??(i=this.constructor.getPropertyOptions(e)),!(i.hasChanged??Ut)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&(this._$Ej??(this._$Ej=new Set)).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,c]of this._$Ep)this[t]=c;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[t,c]of o)c.wrapped!==!0||this._$AL.has(t)||this[t]===void 0||this.P(t,this[t],c)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(i=this._$EO)==null||i.forEach(o=>{var t;return(t=o.hostUpdate)==null?void 0:t.call(o)}),this.update(n)):this._$EU()}catch(o){throw e=!1,this._$EU(),o}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}Te.elementStyles=[],Te.shadowRootOptions={mode:"open"},Te[qe("elementProperties")]=new Map,Te[qe("finalized")]=new Map,Ht==null||Ht({ReactiveElement:Te}),(ne.reactiveElementVersions??(ne.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const Ie=globalThis,ot=Ie.trustedTypes,kr=ot?ot.createPolicy("lit-html",{createHTML:o=>o}):void 0,jt="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,zt="?"+X,Ms=`<${zt}>`,pe=document,Ue=()=>pe.createComment(""),Fe=o=>o===null||typeof o!="object"&&typeof o!="function",Rt=Array.isArray,Pr=o=>Rt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Mt=`[
14
- \f\r]`,He=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tr=/-->/g,Or=/>/g,ue=RegExp(`>|${Mt}(?:([^\\s"'>=/]+)(${Mt}*=${Mt}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Dr=/'/g,Lr=/"/g,Nr=/^(?:script|style|textarea|title)$/i,Is=o=>(t,...s)=>({_$litType$:o,strings:t,values:s}),A=Is(1),ie=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),Br=new WeakMap,de=pe.createTreeWalker(pe,129);function jr(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return kr!==void 0?kr.createHTML(t):t}const zr=(o,t)=>{const s=o.length-1,i=[];let n,e=t===2?"<svg>":t===3?"<math>":"",p=He;for(let h=0;h<s;h++){const g=o[h];let $,C,y=-1,E=0;for(;E<g.length&&(p.lastIndex=E,C=p.exec(g),C!==null);)E=p.lastIndex,p===He?C[1]==="!--"?p=Tr:C[1]!==void 0?p=Or:C[2]!==void 0?(Nr.test(C[2])&&(n=RegExp("</"+C[2],"g")),p=ue):C[3]!==void 0&&(p=ue):p===ue?C[0]===">"?(p=n??He,y=-1):C[1]===void 0?y=-2:(y=p.lastIndex-C[2].length,$=C[1],p=C[3]===void 0?ue:C[3]==='"'?Lr:Dr):p===Lr||p===Dr?p=ue:p===Tr||p===Or?p=He:(p=ue,n=void 0);const x=p===ue&&o[h+1].startsWith("/>")?" ":"";e+=p===He?g+Ms:y>=0?(i.push($),g.slice(0,y)+jt+g.slice(y)+X+x):g+X+(y===-2?h:x)}return[jr(o,e+(o[s]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Qe{constructor({strings:t,_$litType$:s},i){let n;this.parts=[];let e=0,p=0;const h=t.length-1,g=this.parts,[$,C]=zr(t,s);if(this.el=Qe.createElement($,i),de.currentNode=this.el.content,s===2||s===3){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(n=de.nextNode())!==null&&g.length<h;){if(n.nodeType===1){if(n.hasAttributes())for(const y of n.getAttributeNames())if(y.endsWith(jt)){const E=C[p++],x=n.getAttribute(y).split(X),k=/([.?@])?(.*)/.exec(E);g.push({type:1,index:e,name:k[2],strings:x,ctor:k[1]==="."?Mr:k[1]==="?"?Ir:k[1]==="@"?Ur:qe}),n.removeAttribute(y)}else y.startsWith(X)&&(g.push({type:6,index:e}),n.removeAttribute(y));if(Nr.test(n.tagName)){const y=n.textContent.split(X),E=y.length-1;if(E>0){n.textContent=ot?ot.emptyScript:"";for(let x=0;x<E;x++)n.append(y[x],Ue()),de.nextNode(),g.push({type:2,index:++e});n.append(y[E],Ue())}}}else if(n.nodeType===8)if(n.data===zt)g.push({type:2,index:e});else{let y=-1;for(;(y=n.data.indexOf(X,y+1))!==-1;)g.push({type:7,index:e}),y+=X.length-1}e++}}static createElement(t,s){const i=pe.createElement("template");return i.innerHTML=t,i}}function he(o,t,s=o,i){var p,h;if(t===ie)return t;let n=i!==void 0?(p=s._$Co)==null?void 0:p[i]:s._$Cl;const e=Fe(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==e&&((h=n==null?void 0:n._$AO)==null||h.call(n,!1),e===void 0?n=void 0:(n=new e(o),n._$AT(o,s,i)),i!==void 0?(s._$Co??(s._$Co=[]))[i]=n:s._$Cl=n),n!==void 0&&(t=he(o,n._$AS(o,t.values),n,i)),t}let Rr=class{constructor(t,s){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:s},parts:i}=this._$AD,n=((t==null?void 0:t.creationScope)??pe).importNode(s,!0);de.currentNode=n;let e=de.nextNode(),p=0,h=0,g=i[0];for(;g!==void 0;){if(p===g.index){let $;g.type===2?$=new Ae(e,e.nextSibling,this,t):g.type===1?$=new g.ctor(e,g.name,g.strings,this,t):g.type===6&&($=new Fr(e,this,t)),this._$AV.push($),g=i[++h]}p!==(g==null?void 0:g.index)&&(e=de.nextNode(),p++)}return de.currentNode=pe,n}p(t){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,s),s+=i.strings.length-2):i._$AI(t[s])),s++}};class Ae{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,s,i,n){this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=t,this._$AB=s,this._$AM=i,this.options=n,this._$Cv=(n==null?void 0:n.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=s.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,s=this){t=he(this,t,s),Fe(t)?t===P||t==null||t===""?(this._$AH!==P&&this._$AR(),this._$AH=P):t!==this._$AH&&t!==ie&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pr(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==P&&Fe(this._$AH)?this._$AA.nextSibling.data=t:this.T(pe.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Qe.createElement(jr(i.h,i.h[0]),this.options)),i);if(((e=this._$AH)==null?void 0:e._$AD)===n)this._$AH.p(s);else{const p=new Rr(n,this),h=p.u(this.options);p.p(s),this.T(h),this._$AH=p}}_$AC(t){let s=Br.get(t.strings);return s===void 0&&Br.set(t.strings,s=new Qe(t)),s}k(t){Rt(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,n=0;for(const e of t)n===s.length?s.push(i=new Ae(this.O(Ue()),this.O(Ue()),this,this.options)):i=s[n],i._$AI(e),n++;n<s.length&&(this._$AR(i&&i._$AB.nextSibling,n),s.length=n)}_$AR(t=this._$AA.nextSibling,s){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,s);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var s;this._$AM===void 0&&(this._$Cv=t,(s=this._$AP)==null||s.call(this,t))}}class qe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,s,i,n,e){this.type=1,this._$AH=P,this._$AN=void 0,this.element=t,this.name=s,this._$AM=n,this.options=e,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=P}_$AI(t,s=this,i,n){const e=this.strings;let p=!1;if(e===void 0)t=he(this,t,s,0),p=!Fe(t)||t!==this._$AH&&t!==ie,p&&(this._$AH=t);else{const h=t;let g,$;for(t=e[0],g=0;g<e.length-1;g++)$=he(this,h[i+g],s,g),$===ie&&($=this._$AH[g]),p||(p=!Fe($)||$!==this._$AH[g]),$===P?t=P:t!==P&&(t+=($??"")+e[g+1]),this._$AH[g]=$}p&&!n&&this.j(t)}j(t){t===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Mr extends qe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===P?void 0:t}}class Ir extends qe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==P)}}class Ur extends qe{constructor(t,s,i,n,e){super(t,s,i,n,e),this.type=5}_$AI(t,s=this){if((t=he(this,t,s,0)??P)===ie)return;const i=this._$AH,n=t===P&&i!==P||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,e=t!==P&&(i===P||n);n&&this.element.removeEventListener(this.name,this,i),e&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var s;typeof this._$AH=="function"?this._$AH.call(((s=this.options)==null?void 0:s.host)??this.element,t):this._$AH.handleEvent(t)}}class Fr{constructor(t,s,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){he(this,t)}}const Us={M:jt,P:X,A:zt,C:1,L:zr,R:Rr,D:Pr,V:he,I:Ae,H:qe,N:Ir,U:Ur,B:Mr,F:Fr},It=Ie.litHtmlPolyfillSupport;It==null||It(Qe,Ae),(Ie.litHtmlVersions??(Ie.litHtmlVersions=[])).push("3.2.1");const We=(o,t,s)=>{const i=(s==null?void 0:s.renderBefore)??t;let n=i._$litPart$;if(n===void 0){const e=(s==null?void 0:s.renderBefore)??null;i._$litPart$=n=new Ae(t.insertBefore(Ue(),e),e,void 0,s??{})}return n._$AI(o),n};/**
13
+ */const We=globalThis,ut=We.trustedTypes,Kr=ut?ut.createPolicy("lit-html",{createHTML:s=>s}):void 0,Ft="$lit$",te=`lit$${Math.random().toFixed(9).slice(2)}$`,Qt="?"+te,Xs=`<${Qt}>`,ge=document,Ve=()=>ge.createComment(""),Ye=s=>s===null||typeof s!="object"&&typeof s!="function",qt=Array.isArray,Zr=s=>qt(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",Wt=`[
14
+ \f\r]`,Ke=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Xr=/-->/g,Gr=/>/g,ve=RegExp(`>|${Wt}(?:([^\\s"'>=/]+)(${Wt}*=${Wt}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Jr=/'/g,ei=/"/g,ti=/^(?:script|style|textarea|title)$/i,Gs=s=>(e,...n)=>({_$litType$:s,strings:e,values:n}),S=Gs(1),oe=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),ri=new WeakMap,be=ge.createTreeWalker(ge,129);function ii(s,e){if(!qt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Kr!==void 0?Kr.createHTML(e):e}const si=(s,e)=>{const n=s.length-1,i=[];let o,t=e===2?"<svg>":e===3?"<math>":"",c=Ke;for(let d=0;d<n;d++){const f=s[d];let y,x,$=-1,E=0;for(;E<f.length&&(c.lastIndex=E,x=c.exec(f),x!==null);)E=c.lastIndex,c===Ke?x[1]==="!--"?c=Xr:x[1]!==void 0?c=Gr:x[2]!==void 0?(ti.test(x[2])&&(o=RegExp("</"+x[2],"g")),c=ve):x[3]!==void 0&&(c=ve):c===ve?x[0]===">"?(c=o??Ke,$=-1):x[1]===void 0?$=-2:($=c.lastIndex-x[2].length,y=x[1],c=x[3]===void 0?ve:x[3]==='"'?ei:Jr):c===ei||c===Jr?c=ve:c===Xr||c===Gr?c=Ke:(c=ve,o=void 0);const C=c===ve&&s[d+1].startsWith("/>")?" ":"";t+=c===Ke?f+Xs:$>=0?(i.push(y),f.slice(0,$)+Ft+f.slice($)+te+C):f+te+($===-2?d:C)}return[ii(s,t+(s[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class Ze{constructor({strings:e,_$litType$:n},i){let o;this.parts=[];let t=0,c=0;const d=e.length-1,f=this.parts,[y,x]=si(e,n);if(this.el=Ze.createElement(y,i),be.currentNode=this.el.content,n===2||n===3){const $=this.el.content.firstChild;$.replaceWith(...$.childNodes)}for(;(o=be.nextNode())!==null&&f.length<d;){if(o.nodeType===1){if(o.hasAttributes())for(const $ of o.getAttributeNames())if($.endsWith(Ft)){const E=x[c++],C=o.getAttribute($).split(te),k=/([.?@])?(.*)/.exec(E);f.push({type:1,index:t,name:k[2],strings:C,ctor:k[1]==="."?oi:k[1]==="?"?ai:k[1]==="@"?li:Xe}),o.removeAttribute($)}else $.startsWith(te)&&(f.push({type:6,index:t}),o.removeAttribute($));if(ti.test(o.tagName)){const $=o.textContent.split(te),E=$.length-1;if(E>0){o.textContent=ut?ut.emptyScript:"";for(let C=0;C<E;C++)o.append($[C],Ve()),be.nextNode(),f.push({type:2,index:++t});o.append($[E],Ve())}}}else if(o.nodeType===8)if(o.data===Qt)f.push({type:2,index:t});else{let $=-1;for(;($=o.data.indexOf(te,$+1))!==-1;)f.push({type:7,index:t}),$+=te.length-1}t++}}static createElement(e,n){const i=ge.createElement("template");return i.innerHTML=e,i}}function me(s,e,n=s,i){var c,d;if(e===oe)return e;let o=i!==void 0?(c=n._$Co)==null?void 0:c[i]:n._$Cl;const t=Ye(e)?void 0:e._$litDirective$;return(o==null?void 0:o.constructor)!==t&&((d=o==null?void 0:o._$AO)==null||d.call(o,!1),t===void 0?o=void 0:(o=new t(s),o._$AT(s,n,i)),i!==void 0?(n._$Co??(n._$Co=[]))[i]=o:n._$Cl=o),o!==void 0&&(e=me(s,o._$AS(s,e.values),o,i)),e}let ni=class{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:n},parts:i}=this._$AD,o=((e==null?void 0:e.creationScope)??ge).importNode(n,!0);be.currentNode=o;let t=be.nextNode(),c=0,d=0,f=i[0];for(;f!==void 0;){if(c===f.index){let y;f.type===2?y=new Oe(t,t.nextSibling,this,e):f.type===1?y=new f.ctor(t,f.name,f.strings,this,e):f.type===6&&(y=new ci(t,this,e)),this._$AV.push(y),f=i[++d]}c!==(f==null?void 0:f.index)&&(t=be.nextNode(),c++)}return be.currentNode=ge,o}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}};class Oe{get _$AU(){var e;return((e=this._$AM)==null?void 0:e._$AU)??this._$Cv}constructor(e,n,i,o){this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=o,this._$Cv=(o==null?void 0:o.isConnected)??!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=me(this,e,n),Ye(e)?e===P||e==null||e===""?(this._$AH!==P&&this._$AR(),this._$AH=P):e!==this._$AH&&e!==oe&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Zr(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!==P&&Ye(this._$AH)?this._$AA.nextSibling.data=e:this.T(ge.createTextNode(e)),this._$AH=e}$(e){var t;const{values:n,_$litType$:i}=e,o=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Ze.createElement(ii(i.h,i.h[0]),this.options)),i);if(((t=this._$AH)==null?void 0:t._$AD)===o)this._$AH.p(n);else{const c=new ni(o,this),d=c.u(this.options);c.p(n),this.T(d),this._$AH=c}}_$AC(e){let n=ri.get(e.strings);return n===void 0&&ri.set(e.strings,n=new Ze(e)),n}k(e){qt(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,o=0;for(const t of e)o===n.length?n.push(i=new Oe(this.O(Ve()),this.O(Ve()),this,this.options)):i=n[o],i._$AI(t),o++;o<n.length&&(this._$AR(i&&i._$AB.nextSibling,o),n.length=o)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var n;this._$AM===void 0&&(this._$Cv=e,(n=this._$AP)==null||n.call(this,e))}}class Xe{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,o,t){this.type=1,this._$AH=P,this._$AN=void 0,this.element=e,this.name=n,this._$AM=o,this.options=t,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=P}_$AI(e,n=this,i,o){const t=this.strings;let c=!1;if(t===void 0)e=me(this,e,n,0),c=!Ye(e)||e!==this._$AH&&e!==oe,c&&(this._$AH=e);else{const d=e;let f,y;for(e=t[0],f=0;f<t.length-1;f++)y=me(this,d[i+f],n,f),y===oe&&(y=this._$AH[f]),c||(c=!Ye(y)||y!==this._$AH[f]),y===P?e=P:e!==P&&(e+=(y??"")+t[f+1]),this._$AH[f]=y}c&&!o&&this.j(e)}j(e){e===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class oi extends Xe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===P?void 0:e}}class ai extends Xe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==P)}}class li extends Xe{constructor(e,n,i,o,t){super(e,n,i,o,t),this.type=5}_$AI(e,n=this){if((e=me(this,e,n,0)??P)===oe)return;const i=this._$AH,o=e===P&&i!==P||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,t=e!==P&&(i===P||o);o&&this.element.removeEventListener(this.name,this,i),t&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,e):this._$AH.handleEvent(e)}}class ci{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){me(this,e)}}const Js={M:Ft,P:te,A:Qt,C:1,L:si,R:ni,D:Zr,V:me,I:Oe,H:Xe,N:ai,U:li,B:oi,F:ci},Vt=We.litHtmlPolyfillSupport;Vt==null||Vt(Ze,Oe),(We.litHtmlVersions??(We.litHtmlVersions=[])).push("3.2.1");const Ge=(s,e,n)=>{const i=(n==null?void 0:n.renderBefore)??e;let o=i._$litPart$;if(o===void 0){const t=(n==null?void 0:n.renderBefore)??null;i._$litPart$=o=new Oe(e.insertBefore(Ve(),t),t,void 0,n??{})}return o._$AI(s),o};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */let O=class extends Se{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var s;const t=super.createRenderRoot();return(s=this.renderOptions).renderBefore??(s.renderBefore=t.firstChild),t}update(t){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=We(s,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return ie}};O._$litElement$=!0,O.finalized=!0,(_i=globalThis.litElementHydrateSupport)==null||_i.call(globalThis,{LitElement:O});const Ut=globalThis.litElementPolyfillSupport;Ut==null||Ut({LitElement:O}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
19
+ */let D=class extends Te{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n;const e=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ge(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return oe}};D._$litElement$=!0,D.finalized=!0,(Ni=globalThis.litElementHydrateSupport)==null||Ni.call(globalThis,{LitElement:D});const Yt=globalThis.litElementPolyfillSupport;Yt==null||Yt({LitElement:D}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const Ft={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ve=o=>(...t)=>({_$litDirective$:o,values:t});let nt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,s,i){this._$Ct=t,this._$AM=s,this._$Ci=i}_$AS(t,s){return this.update(t,s)}update(t,s){return this.render(...s)}};/**
23
+ */const Kt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Je=s=>(...e)=>({_$litDirective$:s,values:e});let ht=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this._$Ct=e,this._$AM=n,this._$Ci=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};/**
24
24
  * @license
25
25
  * Copyright 2018 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const Hr="important",Fs=" !"+Hr,Ht=Ve(class extends nt{constructor(o){var t;if(super(o),o.type!==Ft.ATTRIBUTE||o.name!=="style"||((t=o.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,s)=>{const i=o[s];return i==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(o,[t]){const{style:s}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in t){const n=t[i];if(n!=null){this.ft.add(i);const e=typeof n=="string"&&n.endsWith(Fs);i.includes("-")||e?s.setProperty(i,e?n.slice(0,-11):n,e?Hr:""):s[i]=n}}return ie}}),Hs=F`
27
+ */const pi="important",en=" !"+pi,Zt=Je(class extends ht{constructor(s){var e;if(super(s),s.type!==Kt.ATTRIBUTE||s.name!=="style"||((e=s.strings)==null?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((e,n)=>{const i=s[n];return i==null?e:e+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}update(s,[e]){const{style:n}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?n.removeProperty(i):n[i]=null);for(const i in e){const o=e[i];if(o!=null){this.ft.add(i);const t=typeof o=="string"&&o.endsWith(en);i.includes("-")||t?n.setProperty(i,t?o.slice(0,-11):o,t?pi:""):n[i]=o}}return oe}}),tn=I`
28
28
  :host{
29
29
  display: inline-block;
30
30
  --text-on-color: var(--spectric-text-on-color, #ffffff);
@@ -269,68 +269,72 @@ opacity:1
269
269
  * @license
270
270
  * Copyright 2017 Google LLC
271
271
  * SPDX-License-Identifier: BSD-3-Clause
272
- */const D=o=>(t,s)=>{s!==void 0?s.addInitializer(()=>{customElements.define(o,t)}):customElements.define(o,t)};/**
272
+ */const O=s=>(e,n)=>{n!==void 0?n.addInitializer(()=>{customElements.define(s,e)}):customElements.define(s,e)};/**
273
273
  * @license
274
274
  * Copyright 2017 Google LLC
275
275
  * SPDX-License-Identifier: BSD-3-Clause
276
- */const Qs={attribute:!0,type:String,converter:st,reflect:!1,hasChanged:Bt},qs=(o=Qs,t,s)=>{const{kind:i,metadata:n}=s;let e=globalThis.litPropertyMetadata.get(n);if(e===void 0&&globalThis.litPropertyMetadata.set(n,e=new Map),e.set(s.name,o),i==="accessor"){const{name:p}=s;return{set(h){const g=t.get.call(this);t.set.call(this,h),this.requestUpdate(p,g,o)},init(h){return h!==void 0&&this.P(p,void 0,o),h}}}if(i==="setter"){const{name:p}=s;return function(h){const g=this[p];t.call(this,h),this.requestUpdate(p,g,o)}}throw Error("Unsupported decorator location: "+i)};function v(o){return(t,s)=>typeof s=="object"?qs(o,t,s):((i,n,e)=>{const p=n.hasOwnProperty(e);return n.constructor.createProperty(e,p?{...i,wrapped:!0}:i),p?Object.getOwnPropertyDescriptor(n,e):void 0})(o,t,s)}/**
276
+ */const rn={attribute:!0,type:String,converter:pt,reflect:!1,hasChanged:Ut},sn=(s=rn,e,n)=>{const{kind:i,metadata:o}=n;let t=globalThis.litPropertyMetadata.get(o);if(t===void 0&&globalThis.litPropertyMetadata.set(o,t=new Map),t.set(n.name,s),i==="accessor"){const{name:c}=n;return{set(d){const f=e.get.call(this);e.set.call(this,d),this.requestUpdate(c,f,s)},init(d){return d!==void 0&&this.P(c,void 0,s),d}}}if(i==="setter"){const{name:c}=n;return function(d){const f=this[c];e.call(this,d),this.requestUpdate(c,f,s)}}throw Error("Unsupported decorator location: "+i)};function b(s){return(e,n)=>typeof n=="object"?sn(s,e,n):((i,o,t)=>{const c=o.hasOwnProperty(t);return o.constructor.createProperty(t,c?{...i,wrapped:!0}:i),c?Object.getOwnPropertyDescriptor(o,t):void 0})(s,e,n)}/**
277
277
  * @license
278
278
  * Copyright 2017 Google LLC
279
279
  * SPDX-License-Identifier: BSD-3-Clause
280
- */function xe(o){return v({...o,state:!0,attribute:!1})}/**
280
+ */function F(s){return b({...s,state:!0,attribute:!1})}/**
281
281
  * @license
282
282
  * Copyright 2017 Google LLC
283
283
  * SPDX-License-Identifier: BSD-3-Clause
284
- */const Qr=(o,t,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,s),s);/**
284
+ */function nn(s){return(e,n)=>{const i=typeof e=="function"?e:e[n];Object.assign(i,s)}}/**
285
285
  * @license
286
286
  * Copyright 2017 Google LLC
287
287
  * SPDX-License-Identifier: BSD-3-Clause
288
- */function fe(o,t){return(s,i,n)=>{const e=p=>{var h;return((h=p.renderRoot)==null?void 0:h.querySelector(o))??null};return Qr(s,i,{get(){return e(this)}})}}/**
288
+ */const ui=(s,e,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(s,e,n),n);/**
289
289
  * @license
290
290
  * Copyright 2017 Google LLC
291
291
  * SPDX-License-Identifier: BSD-3-Clause
292
- */function at(o){return(t,s)=>Qr(t,s,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(o))??null}})}class qr{constructor(t,s,i,n){this._handler=i,this._type=s,this._handler=i,this._options=n||!1,t instanceof Promise?t.then(e=>{this._handler&&(this._node=e,this._node.addEventListener(this._type,this._handler,this._options))}):typeof t=="function"?(this._node=t(),this._node.addEventListener(this._type,this._handler,this._options)):(this._node=t,this._node.addEventListener(this._type,this._handler,this._options))}dispose(){this._handler&&(this._node&&this._node.removeEventListener(this._type,this._handler,this._options),this._node=void 0,this._handler=void 0)}}class Ye extends O{constructor(){super(...arguments),this._disposables=new Set,this._isDisposed=!1,this._disposableListeners=[],this._connected=!1}addDisposableListener(t,s,i,n){if(this._disposableListeners.find(p=>p.event===s&&p.target===t&&p.handler===i)){console.warn("Event handler already exists best practice is to add the this in the constructor");return}this._disposableListeners.push({target:t,event:s,handler:i,options:n}),this._connected&&this.registerDisposable(new qr(t,s,i,n))}registerDisposable(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to something that has already been disposed of. The added object will be leaked!").stack):this._disposables.add(t),t}connectedCallback(){super.connectedCallback(),this._connected=!0,this._isDisposed=!1,this._disposableListeners.forEach(({target:t,event:s,handler:i,options:n})=>{this.registerDisposable(new qr(t,s,i,n))})}disconnectedCallback(){super.disconnectedCallback(),this._connected=!1,this._disposables.forEach(t=>{t.dispose()}),this._isDisposed=!0}}var Ws=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,q=(o,t,s,i)=>{for(var n=i>1?void 0:i?Vs(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Ws(t,s,n),n},Wr=(o=>(o.large="large",o.medium="medium",o.small="small",o.xsmall="xsmall",o.xxsmall="xxsmall",o.tiny="tiny",o))(Wr||{}),Vr=(o=>(o.primary="primary",o.secondary="secondary",o.text="text",o))(Vr||{});const Ys={primary:"spectric-button--primary",secondary:"spectric-button--secondary",text:"spectric-button--text"};d.SpectricButton=class extends Ye{constructor(){super(),this.variant="primary",this.disabled=!1,this.size="small",this.label="",this.danger=!1,this.icon=!1,this.tooltipPosition="right",this._onClick=t=>{if(t instanceof CustomEvent||(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),this.disabled))return;const s={bubbles:!0,composed:!0,detail:t};this.dispatchEvent(new CustomEvent("click",s))},this.addDisposableListener(this,"click",this._onClick,{capture:!0})}render(){const t=Ys[this.variant]||"spectric-button--primary";return A`
293
- ${this.tooltip?A`<spectric-tooltip .text=${this.tooltip} .position=${this.tooltipPosition||"right"} .triggerTarget=${this}></spectric-tooltip>`:null}
292
+ */function ye(s,e){return(n,i,o)=>{const t=c=>{var d;return((d=c.renderRoot)==null?void 0:d.querySelector(s))??null};return ui(n,i,{get(){return t(this)}})}}/**
293
+ * @license
294
+ * Copyright 2017 Google LLC
295
+ * SPDX-License-Identifier: BSD-3-Clause
296
+ */function dt(s){return(e,n)=>ui(e,n,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(s))??null}})}let Xt=0;const hi=()=>Xt;class di{constructor(e,n,i,o){this._handler=i,this._type=n,this._handler=i,this._options=o||!1,e instanceof Promise?e.then(t=>{this._handler&&(this._node=t,this._node.addEventListener(this._type,this._handler,this._options))}):typeof e=="function"?(this._node=e(),this._node.addEventListener(this._type,this._handler,this._options)):(this._node=e,this._node.addEventListener(this._type,this._handler,this._options)),Xt+=1}dispose(){this._handler&&(this._node&&(Xt-=1,this._node.removeEventListener(this._type,this._handler,this._options)),this._node=void 0,this._handler=void 0)}}class ae extends D{constructor(){super(...arguments),this._disposables=new Set,this._isDisposed=!1,this._disposableListeners=[],this._connected=!1}addDisposableListener(e,n,i,o){if(this._disposableListeners.find(c=>c.event===n&&c.target===e&&c.handler===i)){console.warn("Event handler already exists best practice is to add the this in the constructor");return}this._disposableListeners.push({target:e,event:n,handler:i,options:o}),this._connected&&this.registerDisposable(new di(e,n,i,o))}registerDisposable(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?console.warn(new Error("Trying to add a disposable to something that has already been disposed of. The added object will be leaked!").stack):this._disposables.add(e),e}connectedCallback(){super.connectedCallback(),this._connected=!0,this._isDisposed=!1,this._disposableListeners.forEach(({target:e,event:n,handler:i,options:o})=>{this.registerDisposable(new di(e,n,i,o))})}disconnectedCallback(){super.disconnectedCallback(),this._connected=!1,this._disposables.forEach(e=>{e.dispose()}),this._isDisposed=!0}}var on=Object.defineProperty,an=Object.getOwnPropertyDescriptor,V=(s,e,n,i)=>{for(var o=i>1?void 0:i?an(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&on(e,n,o),o},Gt=(s=>(s.large="large",s.medium="medium",s.small="small",s.xsmall="xsmall",s.xxsmall="xxsmall",s.tiny="tiny",s))(Gt||{}),Jt=(s=>(s.primary="primary",s.secondary="secondary",s.text="text",s))(Jt||{});const ln={primary:"spectric-button--primary",secondary:"spectric-button--secondary",text:"spectric-button--text"};h.SpectricButton=class extends ae{constructor(){super(),this.variant="primary",this.disabled=!1,this.size="small",this.label="",this.danger=!1,this.icon=!1,this.tooltipPosition="right",this._onClick=e=>{if(e instanceof CustomEvent||(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),this.disabled))return;const n={bubbles:!0,composed:!0,detail:e};this.dispatchEvent(new CustomEvent("click",n))},this.addDisposableListener(this,"click",this._onClick,{capture:!0})}render(){const e=ln[this.variant]||"spectric-button--primary";return S`
297
+ ${this.tooltip?S`<spectric-tooltip .text=${this.tooltip} .position=${this.tooltipPosition||"right"} .triggerTarget=${this}></spectric-tooltip>`:null}
294
298
  <button
295
299
  type="button"
296
300
  ?disabled=${this.disabled}
297
- class=${["spectric-button",`spectric-button-danger--${this.danger||!1}`,`spectric-button--${this.size||"medium"}`,t].join(" ")}
298
- style=${Ht({backgroundColor:this.backgroundColor})}
301
+ class=${["spectric-button",`spectric-button-danger--${this.danger||!1}`,`spectric-button--${this.size||"medium"}`,e].join(" ")}
302
+ style=${Zt({backgroundColor:this.backgroundColor})}
299
303
  >
300
304
  <span class="animation"></span>
301
305
  <slot>${this.label}</slot>
302
306
  </button>
303
- `}},d.SpectricButton.styles=Hs,q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"variant",2),q([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"disabled",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"backgroundColor",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"size",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"label",2),q([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"danger",2),q([v({type:Boolean,reflect:!0})],d.SpectricButton.prototype,"icon",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"tooltip",2),q([v({type:String,reflect:!0})],d.SpectricButton.prototype,"tooltipPosition",2),d.SpectricButton=q([D("spectric-button")],d.SpectricButton);/**
307
+ `}},h.SpectricButton.styles=tn,V([b({type:String,reflect:!0})],h.SpectricButton.prototype,"variant",2),V([b({type:Boolean,reflect:!0})],h.SpectricButton.prototype,"disabled",2),V([b({type:String,reflect:!0})],h.SpectricButton.prototype,"backgroundColor",2),V([b({type:String,reflect:!0})],h.SpectricButton.prototype,"size",2),V([b({type:String,reflect:!0})],h.SpectricButton.prototype,"label",2),V([b({type:Boolean,reflect:!0})],h.SpectricButton.prototype,"danger",2),V([b({type:Boolean,reflect:!0})],h.SpectricButton.prototype,"icon",2),V([b({type:String,reflect:!0})],h.SpectricButton.prototype,"tooltip",2),V([b({type:String,reflect:!0})],h.SpectricButton.prototype,"tooltipPosition",2),h.SpectricButton=V([O("spectric-button")],h.SpectricButton);/**
304
308
  * @license
305
309
  * Copyright 2020 Google LLC
306
310
  * SPDX-License-Identifier: BSD-3-Clause
307
- */const{I:Ks}=Us,Yr=(o,t)=>(o==null?void 0:o._$litType$)!==void 0,Zs=o=>{var t;return((t=o==null?void 0:o._$litType$)==null?void 0:t.h)!=null},Xs=o=>o.strings===void 0,Kr=()=>document.createComment(""),ge=(o,t,s)=>{var e;const i=o._$AA.parentNode,n=t===void 0?o._$AB:t._$AA;if(s===void 0){const p=i.insertBefore(Kr(),n),h=i.insertBefore(Kr(),n);s=new Ks(p,h,o,o.options)}else{const p=s._$AB.nextSibling,h=s._$AM,g=h!==o;if(g){let $;(e=s._$AQ)==null||e.call(s,o),s._$AM=o,s._$AP!==void 0&&($=o._$AU)!==h._$AU&&s._$AP($)}if(p!==n||g){let $=s._$AA;for(;$!==p;){const C=$.nextSibling;i.insertBefore($,n),$=C}}}return s},be=(o,t,s=o)=>(o._$AI(t,s),o),Gs={},Qt=(o,t=Gs)=>o._$AH=t,qt=o=>o._$AH,Wt=o=>{var i;(i=o._$AP)==null||i.call(o,!1,!0);let t=o._$AA;const s=o._$AB.nextSibling;for(;t!==s;){const n=t.nextSibling;t.remove(),t=n}},Js=o=>{o._$AR()};/**
311
+ */const{I:cn}=Js,fi=(s,e)=>(s==null?void 0:s._$litType$)!==void 0,pn=s=>{var e;return((e=s==null?void 0:s._$litType$)==null?void 0:e.h)!=null},un=s=>s.strings===void 0,gi=()=>document.createComment(""),$e=(s,e,n)=>{var t;const i=s._$AA.parentNode,o=e===void 0?s._$AB:e._$AA;if(n===void 0){const c=i.insertBefore(gi(),o),d=i.insertBefore(gi(),o);n=new cn(c,d,s,s.options)}else{const c=n._$AB.nextSibling,d=n._$AM,f=d!==s;if(f){let y;(t=n._$AQ)==null||t.call(n,s),n._$AM=s,n._$AP!==void 0&&(y=s._$AU)!==d._$AU&&n._$AP(y)}if(c!==o||f){let y=n._$AA;for(;y!==c;){const x=y.nextSibling;i.insertBefore(y,o),y=x}}}return n},we=(s,e,n=s)=>(s._$AI(e,n),s),hn={},er=(s,e=hn)=>s._$AH=e,tr=s=>s._$AH,rr=s=>{var i;(i=s._$AP)==null||i.call(s,!1,!0);let e=s._$AA;const n=s._$AB.nextSibling;for(;e!==n;){const o=e.nextSibling;e.remove(),e=o}},dn=s=>{s._$AR()};/**
308
312
  * @license
309
313
  * Copyright 2017 Google LLC
310
314
  * SPDX-License-Identifier: BSD-3-Clause
311
- */const Ke=(o,t)=>{var i;const s=o._$AN;if(s===void 0)return!1;for(const n of s)(i=n._$AO)==null||i.call(n,t,!1),Ke(n,t);return!0},ct=o=>{let t,s;do{if((t=o._$AM)===void 0)break;s=t._$AN,s.delete(o),o=t}while((s==null?void 0:s.size)===0)},Zr=o=>{for(let t;t=o._$AM;o=t){let s=t._$AN;if(s===void 0)t._$AN=s=new Set;else if(s.has(o))break;s.add(o),ro(t)}};function eo(o){this._$AN!==void 0?(ct(this),this._$AM=o,Zr(this)):this._$AM=o}function to(o,t=!1,s=0){const i=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(i))for(let e=s;e<i.length;e++)Ke(i[e],!1),ct(i[e]);else i!=null&&(Ke(i,!1),ct(i));else Ke(this,o)}const ro=o=>{o.type==Ft.CHILD&&(o._$AP??(o._$AP=to),o._$AQ??(o._$AQ=eo))};class Xr extends nt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,s,i){super._$AT(t,s,i),Zr(this),this.isConnected=t._$AU}_$AO(t,s=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(n=this.disconnected)==null||n.call(this)),s&&(Ke(this,t),ct(this))}setValue(t){if(Xs(this._$Ct))this._$Ct._$AI(t,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=t,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
315
+ */const et=(s,e)=>{var i;const n=s._$AN;if(n===void 0)return!1;for(const o of n)(i=o._$AO)==null||i.call(o,e,!1),et(o,e);return!0},ft=s=>{let e,n;do{if((e=s._$AM)===void 0)break;n=e._$AN,n.delete(s),s=e}while((n==null?void 0:n.size)===0)},vi=s=>{for(let e;e=s._$AM;s=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(s))break;n.add(s),vn(e)}};function fn(s){this._$AN!==void 0?(ft(this),this._$AM=s,vi(this)):this._$AM=s}function gn(s,e=!1,n=0){const i=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(i))for(let t=n;t<i.length;t++)et(i[t],!1),ft(i[t]);else i!=null&&(et(i,!1),ft(i));else et(this,s)}const vn=s=>{s.type==Kt.CHILD&&(s._$AP??(s._$AP=gn),s._$AQ??(s._$AQ=fn))};class bi extends ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),vi(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,o;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(o=this.disconnected)==null||o.call(this)),n&&(et(this,e),ft(this))}setValue(e){if(un(this._$Ct))this._$Ct._$AI(e,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=e,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
312
316
  * @license
313
317
  * Copyright 2020 Google LLC
314
318
  * SPDX-License-Identifier: BSD-3-Clause
315
- */const lt=()=>new io;let io=class{};const Vt=new WeakMap,pt=Ve(class extends Xr{render(o){return P}update(o,[t]){var i;const s=t!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=t,this.ht=(i=o.options)==null?void 0:i.host,this.rt(this.ct=o.element)),P}rt(o){if(this.isConnected||(o=void 0),typeof this.Y=="function"){const t=this.ht??globalThis;let s=Vt.get(t);s===void 0&&(s=new WeakMap,Vt.set(t,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,t;return typeof this.Y=="function"?(o=Vt.get(this.ht??globalThis))==null?void 0:o.get(this.Y):(t=this.Y)==null?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),so=class{constructor(t){return this.buffer=t,this.u8=new Uint8Array(t),new Proxy(this,{get(s,i){return s[i]?s[i]:s.getBit(i)}})}getBit(t){var s=this.u8[t>>3],i=t&7;return s>>7-i&1}setBit(t,s){var i=t&7;s?this.u8[t>>3]|=128>>i:this.u8[t>>3]&=~(128>>i)}get length(){return this.u8.byteLength*8}set(t,s){for(let i=s||0,n=0,e=t.length;n<e;i++,n++)this.setBit(i,t[n])}subarray(t,s){let i=[];t=t||0,s=s||this.length,s=s>this.length?this.length:s;for(let n=t;n<s;n++)i.push(this.getBit(n));return i}},Gr=o=>{var t;return(...s)=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{o.apply(void 0,s)})}};var oo=Object.defineProperty,no=Object.getOwnPropertyDescriptor,ve=(o,t,s,i)=>{for(var n=i>1?void 0:i?no(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&oo(t,s,n),n};const ao=["mousemove","click","dblclick","mousedown","mouseup","contextmenu"],ut={width:200,height:200},dt={width:10,height:10};d.BitDisplayCanvas=class extends Ye{constructor(){super(),this.arrayBuffer=new ArrayBuffer(0),this.frameWidth=100,this.scale=1,this.width=200,this.height=200,this.state={},this.yStart=0,this.xStart=0,this.refs={viewport:lt(),canvas:lt(),scrollDiv:lt()},this.color="#000000",this.onThemeChange=()=>{let i=getComputedStyle(this);this.color!=i.color&&(this.color=i.color,this.paint())},this.onResize=()=>{this.calculateViewport()},this.handleScroll=()=>{if(!this.refs.viewport.value)return;const i=this.getPxPerBit();this.yStart=this.refs.viewport.value.scrollTop?Math.floor(this.refs.viewport.value.scrollTop/i)+1:0,this.xStart=this.refs.viewport.value.scrollLeft?Math.floor(this.refs.viewport.value.scrollLeft/i)+1:0,this.paint()};let t=new ResizeObserver(this.onResize);t.dispose=()=>{this.resizeObserver.disconnect()},this.resizeObserver=t,this.addDisposableListener(document.body,"theme-change",this.onThemeChange);var s={};ao.forEach(i=>{this.addDisposableListener(this._canvas,i,Gr(async n=>{n.stopImmediatePropagation(),n.stopPropagation(),n.preventDefault();var e=await this._canvas;let p=e.getBoundingClientRect(),h={x:Math.floor(Math.abs(n.clientX-p.left)),y:Math.floor(Math.abs(n.clientY-p.top))},g=this.canvasPositionToBit(h);if(i==="mousemove"&&s[i]==g)return;s[i]=g;let $="bit"+String(i).charAt(0).toUpperCase()+String(i).slice(1);if(g!=-1){let C=new CustomEvent($,{detail:{bitIndex:g,position:h,nativeEvent:n}});this.dispatchEvent(C)}}))})}connectedCallback(){this.onResize(),super.connectedCallback(),this.registerDisposable(this.resizeObserver),this.resizeObserver.observe(this)}updated(t){t.has("arrayBuffer")&&this.arrayBuffer&&(this._bitArray=new so(this.arrayBuffer));const s=["arrayBuffer","scale","frameWidth","width","height"];for(const i of s)if(t.has(i)){this.paint();return}}canvasPositionToBit(t){let s=Math.floor(t.x/this.scale),i=Math.floor(t.y/this.scale);return s>this.frameWidth-1?-1:this.yStart*this.frameWidth+this.xStart+(i*this.frameWidth+s)}paint(){if(!this.refs.canvas.value||!this._bitArray)return;const{frameWidth:t,_bitArray:s}=this;if(t<=0)return;this.calculateViewport();const{width:i=ut.width,height:n=ut.height}=this,e=this.getPxPerBit(),p=this.refs.canvas.value.getContext("2d");if(!p)return;this.state.scale!=e&&(p.reset(),p.scale(e,e));let h=getComputedStyle(this);p.fillStyle=h.color,p.clearRect(0,0,i,n);let g=0;for(let $=this.yStart*t+this.xStart,C=s.length;$<C;$++){let y=$%t-this.xStart;if(!(y<0)){if(Math.floor(y*e)>i){g++,$=g*t+this.yStart*t+this.xStart-1;continue}if(Math.floor(g*e)>n)break;s.getBit($)===1&&p.fillRect(y,g,1,1),($+1)%t===0&&$>=t-1&&g++}}}getPxPerBit(){return this.scale>0?this.scale:1}calculateViewport(){const{frameWidth:t,_bitArray:s}=this;if(this.refs.scrollDiv.value){var i=this.getPxPerBit();const n=s.length/t*i,e=t*i,p=this.refs.scrollDiv.value;p.style.width=e+"px",p.style.height=n+"px"}}render(){const{height:t=ut.height,width:s=ut.width}=this;return A`
319
+ */const tt=()=>new bn;let bn=class{};const ir=new WeakMap,rt=Je(class extends bi{render(s){return P}update(s,[e]){var i;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=s.options)==null?void 0:i.host,this.rt(this.ct=s.element)),P}rt(s){if(this.isConnected||(s=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let n=ir.get(e);n===void 0&&(n=new WeakMap,ir.set(e,n)),n.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),n.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){var s,e;return typeof this.Y=="function"?(s=ir.get(this.ht??globalThis))==null?void 0:s.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}}),sr=class{constructor(e){return this.buffer=e,this.u8=new Uint8Array(e),new Proxy(this,{get(n,i){return n[i]?n[i]:n.getBit(i)}})}getBit(e){var n=this.u8[e>>3],i=e&7;return n>>7-i&1}setBit(e,n){var i=e&7;n?this.u8[e>>3]|=128>>i:this.u8[e>>3]&=~(128>>i)}get length(){return this.u8.byteLength*8}set(e,n){for(let i=n||0,o=0,t=e.length;o<t;i++,o++)this.setBit(i,e[o])}subarray(e,n){let i=[];e=e||0,n=n||this.length,n=n>this.length?this.length:n;for(let o=e;o<n;o++)i.push(this.getBit(o));return i}},mi=(s,e)=>{let n;return(...i)=>{clearTimeout(n),n=window.setTimeout(()=>s.apply(void 0,i),e)}},gt=s=>{var e;return(...n)=>{e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{s.apply(void 0,n)})}};var mn=Object.defineProperty,yn=Object.getOwnPropertyDescriptor,_e=(s,e,n,i)=>{for(var o=i>1?void 0:i?yn(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&mn(e,n,o),o};const $n=["mousemove","click","dblclick","mousedown","mouseup","contextmenu"],vt={width:200,height:200},bt={width:10,height:10};h.BitDisplayCanvas=class extends ae{constructor(){super(),this.arrayBuffer=new ArrayBuffer(0),this.frameWidth=100,this.scale=1,this.width=200,this.height=200,this.state={},this.yStart=0,this.xStart=0,this.refs={viewport:tt(),canvas:tt(),scrollDiv:tt()},this.color="#000000",this.onThemeChange=()=>{let i=getComputedStyle(this);this.color!=i.color&&(this.color=i.color,this.paint())},this.onResize=()=>{this.calculateViewport()},this.handleScroll=()=>{if(!this.refs.viewport.value)return;const i=this.getPxPerBit();this.yStart=this.refs.viewport.value.scrollTop?Math.floor(this.refs.viewport.value.scrollTop/i)+1:0,this.xStart=this.refs.viewport.value.scrollLeft?Math.floor(this.refs.viewport.value.scrollLeft/i)+1:0,this.paint()};let e=new ResizeObserver(this.onResize);e.dispose=()=>{this.resizeObserver.disconnect()},this.resizeObserver=e,this.addDisposableListener(document.body,"theme-change",this.onThemeChange);var n={};$n.forEach(i=>{this.addDisposableListener(this._canvas,i,gt(async o=>{o.stopImmediatePropagation(),o.stopPropagation(),o.preventDefault();var t=await this._canvas;let c=t.getBoundingClientRect(),d={x:Math.floor(Math.abs(o.clientX-c.left)),y:Math.floor(Math.abs(o.clientY-c.top))},f=this.canvasPositionToBit(d);if(i==="mousemove"&&n[i]==f)return;n[i]=f;let y="bit"+String(i).charAt(0).toUpperCase()+String(i).slice(1);if(f!=-1){let x=new CustomEvent(y,{detail:{bitIndex:f,position:d,nativeEvent:o}});this.dispatchEvent(x)}}))})}connectedCallback(){this.onResize(),super.connectedCallback(),this.registerDisposable(this.resizeObserver),this.resizeObserver.observe(this)}updated(e){e.has("arrayBuffer")&&this.arrayBuffer&&(this._bitArray=new sr(this.arrayBuffer));const n=["arrayBuffer","scale","frameWidth","width","height"];for(const i of n)if(e.has(i)){this.paint();return}}canvasPositionToBit(e){let n=Math.floor(e.x/this.scale),i=Math.floor(e.y/this.scale);return n>this.frameWidth-1?-1:this.yStart*this.frameWidth+this.xStart+(i*this.frameWidth+n)}paint(){if(!this.refs.canvas.value||!this._bitArray)return;const{frameWidth:e,_bitArray:n}=this;if(e<=0)return;this.calculateViewport();const{width:i=vt.width,height:o=vt.height}=this,t=this.getPxPerBit(),c=this.refs.canvas.value.getContext("2d");if(!c)return;this.state.scale!=t&&(c.reset(),c.scale(t,t));let d=getComputedStyle(this);c.fillStyle=d.color,c.clearRect(0,0,i,o);let f=0;for(let y=this.yStart*e+this.xStart,x=n.length;y<x;y++){let $=y%e-this.xStart;if(!($<0)){if(Math.floor($*t)>i){f++,y=f*e+this.yStart*e+this.xStart-1;continue}if(Math.floor(f*t)>o)break;n.getBit(y)===1&&c.fillRect($,f,1,1),(y+1)%e===0&&y>=e-1&&f++}}}getPxPerBit(){return this.scale>0?this.scale:1}calculateViewport(){const{frameWidth:e,_bitArray:n}=this;if(this.refs.scrollDiv.value){var i=this.getPxPerBit();const o=n.length/e*i,t=e*i,c=this.refs.scrollDiv.value;c.style.width=t+"px",c.style.height=o+"px"}}render(){const{height:e=vt.height,width:n=vt.width}=this;return S`
316
320
  <div
317
321
  id="viewport"
318
- ${pt(this.refs.viewport)}
322
+ ${rt(this.refs.viewport)}
319
323
  @scroll=${this.handleScroll}
320
- style=${`width:${s+dt.width}px;height:${t+dt.height}px;overflow:auto;position:relative`}
324
+ style=${`width:${n+bt.width}px;height:${e+bt.height}px;overflow:auto;position:relative`}
321
325
  >
322
326
  <div
323
327
  id="fakescrolldiv"
324
- ${pt(this.refs.scrollDiv)}
328
+ ${rt(this.refs.scrollDiv)}
325
329
  >
326
330
  </div>
327
331
  </div>
328
332
  <canvas
329
- ${pt(this.refs.canvas)}
330
- width=${s}
331
- height=${t}
333
+ ${rt(this.refs.canvas)}
334
+ width=${n}
335
+ height=${e}
332
336
  ></canvas>
333
- `}},d.BitDisplayCanvas.styles=F`
337
+ `}},h.BitDisplayCanvas.styles=I`
334
338
  :host{
335
339
  position: relative;
336
340
  --border-radius: var(--spectric-border-radius,4em);
@@ -354,8 +358,8 @@ opacity:1
354
358
  background-color:var(--background-color);
355
359
  }
356
360
  ::-webkit-scrollbar {
357
- height: ${dt.height}px;
358
- width: ${dt.width}px;
361
+ height: ${bt.height}px;
362
+ width: ${bt.width}px;
359
363
 
360
364
  }
361
365
 
@@ -426,7 +430,7 @@ opacity:1
426
430
 
427
431
  }
428
432
 
429
- `,ve([v({type:Object,attribute:!1})],d.BitDisplayCanvas.prototype,"arrayBuffer",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"frameWidth",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"scale",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"width",2),ve([v({type:Number})],d.BitDisplayCanvas.prototype,"height",2),ve([at("canvas")],d.BitDisplayCanvas.prototype,"_canvas",2),d.BitDisplayCanvas=ve([D("spectric-bit-display")],d.BitDisplayCanvas);const co=F`.spectric-header {
433
+ `,_e([b({type:Object,attribute:!1})],h.BitDisplayCanvas.prototype,"arrayBuffer",2),_e([b({type:Number})],h.BitDisplayCanvas.prototype,"frameWidth",2),_e([b({type:Number})],h.BitDisplayCanvas.prototype,"scale",2),_e([b({type:Number})],h.BitDisplayCanvas.prototype,"width",2),_e([b({type:Number})],h.BitDisplayCanvas.prototype,"height",2),_e([dt("canvas")],h.BitDisplayCanvas.prototype,"_canvas",2),h.BitDisplayCanvas=_e([O("spectric-bit-display")],h.BitDisplayCanvas);const wn=I`.spectric-header {
430
434
  display: flex;
431
435
  justify-content: space-between;
432
436
  align-items: center;
@@ -461,7 +465,7 @@ opacity:1
461
465
  color: #333;
462
466
  font-size: 14px;
463
467
  }
464
- `;var lo=Object.defineProperty,po=Object.getOwnPropertyDescriptor,ht=(o,t,s,i)=>{for(var n=i>1?void 0:i?po(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&lo(t,s,n),n};d.Header=class extends O{constructor(){super(...arguments),this.showCreateAccount=!1,this.showLoginButton=!1,this.username="",this.onLogout=()=>{const t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("logout",t))},this.onLogin=()=>{const t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("login",t))},this.onCreateAccount=()=>{const t={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("createAccount",t))}}render(){return A`
468
+ `;var _n=Object.defineProperty,Sn=Object.getOwnPropertyDescriptor,mt=(s,e,n,i)=>{for(var o=i>1?void 0:i?Sn(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&_n(e,n,o),o};h.Header=class extends D{constructor(){super(...arguments),this.showCreateAccount=!1,this.showLoginButton=!1,this.username="",this.onLogout=()=>{const e={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("logout",e))},this.onLogin=()=>{const e={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("login",e))},this.onCreateAccount=()=>{const e={bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("createAccount",e))}}render(){return S`
465
469
  <header>
466
470
  <div class="spectric-header">
467
471
  <div style="flex-grow:1;">
@@ -469,10 +473,10 @@ opacity:1
469
473
  <h1><slot name="name"></slot></h1>
470
474
  <slot name="center"></slot>
471
475
  </div>
472
- ${this.showLoginButton!==!1?A`
476
+ ${this.showLoginButton!==!1?S`
473
477
  <div>
474
- ${this.username&&this.username!==""?A`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>`:A`
475
- ${this.showCreateAccount!==!1?A`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>`:null}
478
+ ${this.username&&this.username!==""?S`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>`:S`
479
+ ${this.showCreateAccount!==!1?S`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>`:null}
476
480
  <spectric-button variant="primary" size="small" @click=${this.onLogin}>Log in</spectric-button>`}
477
481
 
478
482
 
@@ -480,12 +484,12 @@ opacity:1
480
484
  <slot name="end"></slot>
481
485
  </div>
482
486
  </header>
483
- `}},d.Header.styles=co,ht([v({type:Boolean,reflect:!0})],d.Header.prototype,"showCreateAccount",2),ht([v({type:Boolean,reflect:!0})],d.Header.prototype,"showLoginButton",2),ht([v({type:String,reflect:!0})],d.Header.prototype,"username",2),d.Header=ht([D("spectric-header")],d.Header);var uo=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,Ee=(o,t,s,i)=>{for(var n=i>1?void 0:i?ho(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&uo(t,s,n),n};const fo={display:"flex",alignItems:"center",backgroundColor:"black",color:"white",textAlign:"center"};let me=class extends O{constructor(){super(...arguments),this.dismissable=!1,this.text="",this.bannerId="",this.headerStyle={},this._dismissed=!1,this.onDismiss=o=>{o.preventDefault(),o.stopPropagation();const t={bubbles:!0,composed:!0};this._dismissed=!0;let{bannerId:s,text:i,headerStyle:n,dismissable:e}=this;this.dispatchEvent(new CustomEvent("bannerDismissed",{detail:{bannerId:s,text:i,headerStyle:n,dismissable:e},...t}))}}render(){if(!this._dismissed)return A`
484
- <header style=${Ht({...fo,...this.headerStyle})}>
487
+ `}},h.Header.styles=wn,mt([b({type:Boolean,reflect:!0})],h.Header.prototype,"showCreateAccount",2),mt([b({type:Boolean,reflect:!0})],h.Header.prototype,"showLoginButton",2),mt([b({type:String,reflect:!0})],h.Header.prototype,"username",2),h.Header=mt([O("spectric-header")],h.Header);var An=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,De=(s,e,n,i)=>{for(var o=i>1?void 0:i?xn(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&An(e,n,o),o};const Cn={display:"flex",alignItems:"center",backgroundColor:"black",color:"white",textAlign:"center"};let Se=class extends D{constructor(){super(...arguments),this.dismissable=!1,this.text="",this.bannerId="",this.headerStyle={},this._dismissed=!1,this.onDismiss=s=>{s.preventDefault(),s.stopPropagation();const e={bubbles:!0,composed:!0};this._dismissed=!0;let{bannerId:n,text:i,headerStyle:o,dismissable:t}=this;this.dispatchEvent(new CustomEvent("bannerDismissed",{detail:{bannerId:n,text:i,headerStyle:o,dismissable:t},...e}))}}render(){if(!this._dismissed)return S`
488
+ <header style=${Zt({...Cn,...this.headerStyle})}>
485
489
  <div style="flex-grow:1"><slot name="text">${this.text}</slot><slot></slot></div>
486
- ${this.dismissable?A`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>`:null}
490
+ ${this.dismissable?S`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>`:null}
487
491
  </header>
488
- `}};Ee([v({type:Boolean,reflect:!0})],me.prototype,"dismissable",2),Ee([v({type:String,reflect:!0})],me.prototype,"text",2),Ee([v({type:String,reflect:!0})],me.prototype,"bannerId",2),Ee([v({type:Object})],me.prototype,"headerStyle",2),Ee([v({state:!0,type:Boolean,attribute:!1})],me.prototype,"_dismissed",2),me=Ee([D("spectric-banner")],me);const go=F`
492
+ `}};De([b({type:Boolean,reflect:!0})],Se.prototype,"dismissable",2),De([b({type:String,reflect:!0})],Se.prototype,"text",2),De([b({type:String,reflect:!0})],Se.prototype,"bannerId",2),De([b({type:Object})],Se.prototype,"headerStyle",2),De([b({state:!0,type:Boolean,attribute:!1})],Se.prototype,"_dismissed",2),Se=De([O("spectric-banner")],Se);const En=I`
489
493
 
490
494
  :host {
491
495
  height:100vh;
@@ -645,30 +649,30 @@ article{
645
649
  * @license
646
650
  * Copyright 2018 Google LLC
647
651
  * SPDX-License-Identifier: BSD-3-Clause
648
- */const Yt=o=>o??P;class bo extends Xr{constructor(){super(...arguments),this.prevData={}}render(t){return P}update(t,[s]){var i;this.element!==t.element&&(this.element=t.element),this.host=((i=t.options)==null?void 0:i.host)||this.element,this.apply(s),this.groom(s),this.prevData={...s}}apply(t){if(!t)return;const{element:s}=this;for(const i in t){const n=t[i];s[i]!==n&&(s[i]=n)}}groom(t){const{prevData:s,element:i}=this;if(s)for(const n in s)(!t||!(n in t)&&i[n]===s[n])&&(i[n]=void 0)}}const Ze=Ve(bo);var Kt=(o=>(o.None="none",o.Uscui="us.cui",o.Usclassified="us.classified",o.Usunclassified="us.unclassified",o.Usconfidential="us.confidential",o.Ussecret="us.secret",o.Ustopsecret="us.topsecret",o.UstopsecretSi="us.topsecret.si",o.Uknotset="uk.notset",o.Ukofficial="uk.official",o.Uksecret="uk.secret",o.Uktopsecret="uk.topsecret",o.Caprotected_a="ca.protected_a",o.Caprotected_b="ca.protected_b",o.Caprotected_c="ca.protected_c",o.Caconfidential="ca.confidential",o.Casecret="ca.secret",o.Catopsecret="ca.topsecret",o.Auunofficial="au.unofficial",o.Auofficial="au.official",o.Auofficialsensitive="au.officialsensitive",o.Auconfidential="au.confidential",o.Ausecret="au.secret",o.Autopsecret="au.topsecret",o))(Kt||{});const ft={none:{},"us.cui":{color:"white",backgroundColor:"#3D1E5A",content:"Controlled Unclassified Information"},"us.classified":{color:"white",backgroundColor:"#723D9A",content:"Classified"},"us.unclassified":{color:"white",backgroundColor:"#007A33",content:"Unclassified"},"us.confidential":{color:"white",backgroundColor:"#0033A0",content:"Confidential"},"us.secret":{color:"white",backgroundColor:"#C8102E",content:"Secret"},"us.topsecret":{color:"white",backgroundColor:"#FF671F",content:"Top Secret"},"us.topsecret.si":{color:"black",backgroundColor:"#F7EA48",content:"Top Secret//SI"},"uk.notset":{color:"white",backgroundColor:" #616161",content:"Not Set"},"uk.official":{color:"white",backgroundColor:"#2B71C7",content:"For Offical Use"},"uk.secret":{color:"white",backgroundColor:"#F39C2C",content:"Secret"},"uk.topsecret":{color:"white",backgroundColor:"#AA0000",content:"Top Secret"},"ca.protected_a":{color:"white",backgroundColor:"#227ABC",content:"PROTECTED A"},"ca.protected_b":{color:"white",backgroundColor:"#900FB5",content:"PROTECTED B"},"ca.protected_c":{color:"white",backgroundColor:"#460FB5",content:"PROTECTED C"},"ca.confidential":{color:"white",backgroundColor:"#0033a0",content:"Confidential"},"ca.secret":{color:"white",backgroundColor:"#c8102e",content:"Secret"},"ca.topsecret":{color:"white",backgroundColor:"#ff671f",content:"Top Secret"},"au.unofficial":{color:"#666",backgroundColor:"#ffffffff",content:"Unofficial"},"au.official":{color:"#666",backgroundColor:"#ffffffff",content:"Official"},"au.officialsensitive":{color:"#666",backgroundColor:"#ffffffff",content:"Official Sentitive"},"au.confidential":{color:"white",backgroundColor:"#4F81BD",content:"Confidential"},"au.secret":{color:"black",backgroundColor:" #E5B8B7",content:"Secret"},"au.topsecret":{color:"black",backgroundColor:"#AA0000",content:"Top Secret"}};var vo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,W=(o,t,s,i)=>{for(var n=i>1?void 0:i?mo(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&vo(t,s,n),n};d.SpectricPage=class extends O{constructor(){super(...arguments),this.showHeader=!0,this.headerSticky=!0,this.classificationLevel=Kt.None,this.classificationText="",this.notifications=[],this.showCreateAccount=!1,this.showLoginButton=!0,this.username=""}render(){this.classificationLevel&&!ft[this.classificationLevel]&&(console.warn("Unknown classification",this.classificationLevel),this.classificationLevel=Kt.None);const t=this.classificationLevel?this.classificationText||ft[this.classificationLevel].content:"",s=this.showHeader?A`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Yt(this.username)}>
652
+ */const nr=s=>s??P;class or extends bi{constructor(){super(...arguments),this.prevData={}}render(e){return P}update(e,[n]){var i;this.element!==e.element&&(this.element=e.element),this.host=((i=e.options)==null?void 0:i.host)||this.element,this.apply(n),this.groom(n),this.prevData={...n}}apply(e){if(!e)return;const{element:n}=this;for(const i in e){const o=e[i];n[i]!==o&&(n[i]=o)}}groom(e){const{prevData:n,element:i}=this;if(n)for(const o in n)(!e||!(o in e)&&i[o]===n[o])&&(i[o]=void 0)}}const Ae=Je(or);var ar=(s=>(s.None="none",s.Uscui="us.cui",s.Usclassified="us.classified",s.Usunclassified="us.unclassified",s.Usconfidential="us.confidential",s.Ussecret="us.secret",s.Ustopsecret="us.topsecret",s.UstopsecretSi="us.topsecret.si",s.Uknotset="uk.notset",s.Ukofficial="uk.official",s.Uksecret="uk.secret",s.Uktopsecret="uk.topsecret",s.Caprotected_a="ca.protected_a",s.Caprotected_b="ca.protected_b",s.Caprotected_c="ca.protected_c",s.Caconfidential="ca.confidential",s.Casecret="ca.secret",s.Catopsecret="ca.topsecret",s.Auunofficial="au.unofficial",s.Auofficial="au.official",s.Auofficialsensitive="au.officialsensitive",s.Auconfidential="au.confidential",s.Ausecret="au.secret",s.Autopsecret="au.topsecret",s))(ar||{});const yt={none:{},"us.cui":{color:"white",backgroundColor:"#3D1E5A",content:"Controlled Unclassified Information"},"us.classified":{color:"white",backgroundColor:"#723D9A",content:"Classified"},"us.unclassified":{color:"white",backgroundColor:"#007A33",content:"Unclassified"},"us.confidential":{color:"white",backgroundColor:"#0033A0",content:"Confidential"},"us.secret":{color:"white",backgroundColor:"#C8102E",content:"Secret"},"us.topsecret":{color:"white",backgroundColor:"#FF671F",content:"Top Secret"},"us.topsecret.si":{color:"black",backgroundColor:"#F7EA48",content:"Top Secret//SI"},"uk.notset":{color:"white",backgroundColor:" #616161",content:"Not Set"},"uk.official":{color:"white",backgroundColor:"#2B71C7",content:"For Offical Use"},"uk.secret":{color:"white",backgroundColor:"#F39C2C",content:"Secret"},"uk.topsecret":{color:"white",backgroundColor:"#AA0000",content:"Top Secret"},"ca.protected_a":{color:"white",backgroundColor:"#227ABC",content:"PROTECTED A"},"ca.protected_b":{color:"white",backgroundColor:"#900FB5",content:"PROTECTED B"},"ca.protected_c":{color:"white",backgroundColor:"#460FB5",content:"PROTECTED C"},"ca.confidential":{color:"white",backgroundColor:"#0033a0",content:"Confidential"},"ca.secret":{color:"white",backgroundColor:"#c8102e",content:"Secret"},"ca.topsecret":{color:"white",backgroundColor:"#ff671f",content:"Top Secret"},"au.unofficial":{color:"#666",backgroundColor:"#ffffffff",content:"Unofficial"},"au.official":{color:"#666",backgroundColor:"#ffffffff",content:"Official"},"au.officialsensitive":{color:"#666",backgroundColor:"#ffffffff",content:"Official Sentitive"},"au.confidential":{color:"white",backgroundColor:"#4F81BD",content:"Confidential"},"au.secret":{color:"black",backgroundColor:" #E5B8B7",content:"Secret"},"au.topsecret":{color:"black",backgroundColor:"#AA0000",content:"Top Secret"}};var kn=Object.defineProperty,Pn=Object.getOwnPropertyDescriptor,Y=(s,e,n,i)=>{for(var o=i>1?void 0:i?Pn(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&kn(e,n,o),o};h.SpectricPage=class extends D{constructor(){super(...arguments),this.showHeader=!0,this.headerSticky=!0,this.classificationLevel=ar.None,this.classificationText="",this.notifications=[],this.showCreateAccount=!1,this.showLoginButton=!0,this.username=""}render(){this.classificationLevel&&!yt[this.classificationLevel]&&(console.warn("Unknown classification",this.classificationLevel),this.classificationLevel=ar.None);const e=this.classificationLevel?this.classificationText||yt[this.classificationLevel].content:"",n=this.showHeader?S`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${nr(this.username)}>
649
653
  <slot name="branding" slot="branding"></slot>
650
654
  <slot name="name" slot="name"></slot>
651
655
  <slot name="center" slot="center"></slot>
652
656
  <slot name="end" slot="end"></slot>
653
- </spectric-header>`:null;return A`
654
- ${this.classificationLevel&&t?A`
657
+ </spectric-header>`:null;return S`
658
+ ${this.classificationLevel&&e?S`
655
659
  <!-- Classification Banner -->
656
- <spectric-banner ${Ze({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>
660
+ <spectric-banner ${Ae({text:e,headerStyle:yt[this.classificationLevel]})}></spectric-banner>
657
661
  `:null}
658
- <spectric-theme theme=${Yt(this.theme)}>
659
- ${this.notifications?this.notifications.map(i=>A`<spectric-banner ${Ze(i)} ></spectric-banner>`):null}
660
- ${this.headerSticky?s:null}
662
+ <spectric-theme theme=${nr(this.theme)}>
663
+ ${this.notifications?this.notifications.map(i=>S`<spectric-banner ${Ae(i)} ></spectric-banner>`):null}
664
+ ${this.headerSticky?n:null}
661
665
  <article>
662
- ${this.headerSticky?null:s}
666
+ ${this.headerSticky?null:n}
663
667
  <section class="spectric-page">
664
668
  <slot name="content"></slot>
665
669
  <slot></slot>
666
670
  </section>
667
671
  </article>
668
672
  </spectric-theme>
669
- ${this.classificationLevel&&t?A`<spectric-banner ${Ze({text:t,headerStyle:ft[this.classificationLevel]})}></spectric-banner>`:null}
673
+ ${this.classificationLevel&&e?S`<spectric-banner ${Ae({text:e,headerStyle:yt[this.classificationLevel]})}></spectric-banner>`:null}
670
674
 
671
- `}},d.SpectricPage.styles=go,W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showHeader",2),W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"headerSticky",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationLevel",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"classificationText",2),W([v({type:Array,reflect:!0})],d.SpectricPage.prototype,"notifications",2),W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showCreateAccount",2),W([v({type:Boolean,reflect:!0})],d.SpectricPage.prototype,"showLoginButton",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"username",2),W([v({type:String,reflect:!0})],d.SpectricPage.prototype,"theme",2),d.SpectricPage=W([D("spectric-page")],d.SpectricPage);var yo=Object.defineProperty,$o=Object.getOwnPropertyDescriptor,T=(o,t,s,i)=>{for(var n=i>1?void 0:i?$o(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&yo(t,s,n),n},Jr=(o=>(o.Text="text",o.TextArea="text-area",o.number="number",o.color="color",o.date="date",o.datetime="datetime-local",o.email="email",o.file="file",o.hidden="hidden",o.password="password",o.checkbox="checkbox",o))(Jr||{});d.SpectricInput=class extends O{constructor(){super(...arguments),this.placeholder="",this.readonly=!1,this.variant="text",this.disabled=!1,this.label="",this.hidePasswordLabel="Hide",this.showPasswordLabel="Show",this.showPasswordVisibilityToggle=!0,this.helperText="",this.invalid=!1,this.required=!1,this.invalidText="",this.name="",this.pattern="",this.maxCount=0,this._value="",this._showPassword=!1,this.autocomplete="off",this._handleInput=({target:t})=>{const s=t;this.value=s.value,this.invalid=!s.validity.valid},this.handleTogglePasswordVisibility=()=>{this._showPassword=!this._showPassword,this.requestUpdate()}}createRenderRoot(){return this}get selectionStart(){return this._input?this._input.selectionStart:null}get value(){return this._input?this.variant=="number"?parseFloat(this._input.value):this._input.value:this._value}set value(t){const s=this._value;this._value=t,this.requestUpdate("value",s),this._input&&(this._input.value=String(t))}blur(){this._input&&this._input.blur()}focus(t){this._input&&(this._input.blur(),this._input.focus(t))}setSelectionRange(t,s,i="none"){this._input&&this._input.setSelectionRange(t,s,i)}updated(t){t.has("checked")&&this.dispatchEvent(new Event("change",{bubbles:!0}))}render(){switch(this.variant){case"text":case"password":case"number":case"email":case"date":case"datetime-local":case"file":case"color":return A`
675
+ `}},h.SpectricPage.styles=En,Y([b({type:Boolean,reflect:!0})],h.SpectricPage.prototype,"showHeader",2),Y([b({type:Boolean,reflect:!0})],h.SpectricPage.prototype,"headerSticky",2),Y([b({type:String,reflect:!0})],h.SpectricPage.prototype,"classificationLevel",2),Y([b({type:String,reflect:!0})],h.SpectricPage.prototype,"classificationText",2),Y([b({type:Array,reflect:!0})],h.SpectricPage.prototype,"notifications",2),Y([b({type:Boolean,reflect:!0})],h.SpectricPage.prototype,"showCreateAccount",2),Y([b({type:Boolean,reflect:!0})],h.SpectricPage.prototype,"showLoginButton",2),Y([b({type:String,reflect:!0})],h.SpectricPage.prototype,"username",2),Y([b({type:String,reflect:!0})],h.SpectricPage.prototype,"theme",2),h.SpectricPage=Y([O("spectric-page")],h.SpectricPage);var Tn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,T=(s,e,n,i)=>{for(var o=i>1?void 0:i?On(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&Tn(e,n,o),o},lr=(s=>(s.Text="text",s.TextArea="text-area",s.number="number",s.color="color",s.date="date",s.datetime="datetime-local",s.email="email",s.file="file",s.hidden="hidden",s.password="password",s.checkbox="checkbox",s.range="range",s))(lr||{});h.SpectricInput=class extends D{constructor(){super(...arguments),this.placeholder="",this.readonly=!1,this.variant="text",this.disabled=!1,this.label="",this.hidePasswordLabel="Hide",this.showPasswordLabel="Show",this.showPasswordVisibilityToggle=!0,this.helperText="",this.invalid=!1,this.required=!1,this.invalidText="",this.name="",this.pattern="",this.maxCount=0,this._value="",this._showPassword=!1,this.autocomplete="off",this._handleInput=({target:e})=>{const n=e;this.value=n.value,this.invalid=!n.validity.valid},this.handleTogglePasswordVisibility=()=>{this._showPassword=!this._showPassword,this.requestUpdate()}}createRenderRoot(){return this}get selectionStart(){return this._input?this._input.selectionStart:null}get value(){return this._input?this.variant=="number"?parseFloat(this._input.value):this._input.value:this._value}set value(e){const n=this._value;this._value=e,this.requestUpdate("value",n),this._input&&(this._input.value=String(e))}blur(){this._input&&this._input.blur()}focus(e){this._input&&(this._input.blur(),this._input.focus(e))}setSelectionRange(e,n,i="none"){this._input&&this._input.setSelectionRange(e,n,i)}updated(e){e.has("checked")&&this.dispatchEvent(new Event("change",{bubbles:!0}))}_handleChange(e){e.stopPropagation(),this.dispatchEvent(new Event("change",{bubbles:!0}))}render(){switch(this.variant){case"text":case"password":case"number":case"email":case"date":case"datetime-local":case"file":case"range":return S`
672
676
  <div class="inputWrapper">
673
677
  <div class="text-input__label-helper-wrapper">
674
678
  <div class="--text-input__label-wrapper">
@@ -682,20 +686,20 @@ article{
682
686
  ?disabled="${this.disabled}"
683
687
  aria-describedby="helper-text"
684
688
  id="input"
685
- name="${Ce(this.name)}"
686
- pattern="${Ce(this.pattern)}"
687
- placeholder="${Ce(this.placeholder)}"
688
- autocomplete="${Ce(this.autocomplete)}"
689
+ name="${Le(this.name)}"
690
+ pattern="${Le(this.pattern)}"
691
+ placeholder="${Le(this.placeholder)}"
692
+ autocomplete="${Le(this.autocomplete)}"
689
693
  ?readonly="${this.readonly}"
690
694
  ?required="${this.required}"
691
- type="${Ce(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
695
+ type="${Le(this.variant!=="password"?this.variant:this._showPassword?"text":"password")}"
692
696
  .value="${this._value}"
693
- maxlength="${Ce(this.maxCount>0?this.maxCount:void 0)}"
697
+ maxlength="${Le(this.maxCount>0?this.maxCount:void 0)}"
694
698
  @input="${this._handleInput}"
695
- @change=${()=>{this.dispatchEvent(new Event("change",{bubbles:!0}))}}
699
+ @change=${this._handleChange}
696
700
  />
697
701
 
698
- ${this.variant==="password"&&this.showPasswordVisibilityToggle?A`
702
+ ${this.variant==="password"&&this.showPasswordVisibilityToggle?S`
699
703
  <spectric-button
700
704
  size="small"
701
705
  type="button"
@@ -707,24 +711,43 @@ article{
707
711
  </div>
708
712
  <div
709
713
  id="helper-text"
714
+ class="${this.helperText||this.invalid?"":"hidden"}"
710
715
  >
711
716
  <slot name="helper-text"> ${this.invalid?this.invalidText:this.helperText} </slot>
712
717
  </div>
713
718
 
714
719
  </div>
715
720
  </div>
716
- `;case"hidden":return A`<input type="hidden"></input>`;case"checkbox":return A`
721
+ `;case"color":return S`<div class="inputWrapper">
722
+ <div class="text-input__label-helper-wrapper">
723
+ <div class="--text-input__label-wrapper">
724
+ ${this.label} ${this.maxCount>0&&this._value?`${this._value.length}/${this.maxCount}`:null}
725
+ </div>
726
+ </div>
727
+ <div class="fieldwrapper">
728
+ <div ?data-invalid="${this.invalid}" class="inputContainer">
729
+ <spectric-colorpicker @change=${e=>{this.value=e.target.value,this._handleChange(e)}}></spectric-colorpicker>
730
+ </div>
731
+ <div
732
+ id="helper-text"
733
+ class="${this.helperText||this.invalid?"":"hidden"}"
734
+ >
735
+ <slot name="helper-text"> ${this.invalid?this.invalidText:this.helperText} </slot>
736
+ </div>
737
+
738
+ </div>
739
+ </div>`;case"hidden":return S`<input type="hidden"/>`;case"checkbox":return S`
717
740
  <div class="checkbox">
718
741
  <spectric-button @click=${()=>{this.checked=!this.checked,this.value=!!this.checked}} icon size=${this.size||"xxsmall"} variant=${this.checked?"primary":"secondary"}>${this.checked?"✓":" "}</spectric-button>
719
- ${this.invalid||this.helperText?A`<spectric-tooltip text=${this.invalid||this.helperText}></spectric-tooltip>`:null}
742
+ ${this.invalid||this.helperText?S`<spectric-tooltip text=${this.invalid||this.helperText}></spectric-tooltip>`:null}
720
743
  ${this.label}
721
744
  </div>
722
745
  </label>
723
- `}return`Not yet implemented ${this.variant}`}},T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"checked",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"placeholder",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"readonly",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"variant",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"disabled",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"label",2),T([v()],d.SpectricInput.prototype,"hidePasswordLabel",2),T([v()],d.SpectricInput.prototype,"showPasswordLabel",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"showPasswordVisibilityToggle",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"helperText",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"invalid",2),T([v({type:Boolean,reflect:!0})],d.SpectricInput.prototype,"required",2),T([v({type:String,reflect:!0})],d.SpectricInput.prototype,"invalidText",2),T([v()],d.SpectricInput.prototype,"name",2),T([v()],d.SpectricInput.prototype,"pattern",2),T([v({type:Number,reflect:!0})],d.SpectricInput.prototype,"maxCount",2),T([v({reflect:!0})],d.SpectricInput.prototype,"autocomplete",2),T([v({reflect:!0})],d.SpectricInput.prototype,"value",1),T([fe("input")],d.SpectricInput.prototype,"_input",2),d.SpectricInput=T([D("spectric-input")],d.SpectricInput);const Ce=o=>Yt(o===""?void 0:o??void 0),wo="end of input",_o={fieldName:"field name",value:"value",literal:"literal",whitespace:"whitespace"};class ei extends Error{constructor(t,s){let i=t.message;if(t.expected){const p=t.expected.map(g=>_o[g.description]||g.description).join(", ");let h=t.found?`"${t.found}"`:wo;i=`Expected ${p} but ${h} found.`}const n=[i,s,"-".repeat(t.location.start.offset)+"^"].join(`
724
- `);super(n),this.name="DQLSyntaxError",this.shortMessage=i}}function ke(o){return{type:"literal",value:o}}function Zt(o){return o.value}const So=Object.freeze(Object.defineProperty({__proto__:null,buildNode:ke,toOpenSearchQuery:Zt},Symbol.toStringTag,{value:"Module"})),{SyntaxError:Hc,parse:gt}=function(){function o(i,n){function e(){this.constructor=i}e.prototype=n.prototype,i.prototype=new e}function t(i,n,e,p){this.message=i,this.expected=n,this.found=e,this.location=p,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,t)}o(t,Error);function s(i){var n=arguments.length>1?arguments[1]:{},e={},p={start:us,Literal:$r},h=us,g=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r!==null?r:_e.function.buildNode("is","*","*")},$=function(){return jc},C=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l||Z("or",[r,a])},y=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l||Z("and",[r,a])},E=function(r){return r.type==="cursor"?r:Z("not",[r])},x="(",k={type:"literal",value:"(",description:'"("'},N=")",z={type:"literal",value:")",description:'")"'},M=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},Y=":",U={type:"literal",value:":",description:'":"'},Le="{",nr={type:"literal",value:"{",description:'"{"'},ar="}",cr={type:"literal",value:"}",description:'"}"'},la=function(r,a,l){return a.type==="cursor"?{...a,nestedPath:a.nestedPath?`${r.value}.${a.nestedPath}`:r.value}:l.type==="cursor"?{...l,suggestionTypes:["conjunction"]}:Z("nested",[r,a])},pa={type:"other",description:"fieldName"},ua=function(r,a,l){if(l.type==="cursor")return{...l,suggestionTypes:["conjunction"]};const u=Uc(a,l);return Z("range",[r,u])},da=function(r,a){return a.type==="cursor"?{...a,fieldName:r.value,suggestionTypes:["value","conjunction"]}:a(r)},ha=function(r){if(r.type==="cursor"){const l=`${r.prefix}${r.suffix}`.trim();return{...r,fieldName:l,suggestionTypes:["field","operator","conjunction"]}}const a=ce(null);return r(a)},fa=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},ga=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>Z("or",[r(u),a(u)])},ba=function(r,a){const l=[r,a].find(u=>u.type==="cursor");return l?{...l,suggestionTypes:["value"]}:u=>Z("and",[r(u),a(u)])},va=function(r){return r.type==="cursor"?{...list,suggestionTypes:["value"]}:a=>Z("not",[r(a)])},ma={type:"other",description:"value"},ya=function(r){if(r.type==="cursor")return r;const a=ce(!0);return l=>Z("is",[l,r,a])},$a=function(r){if(r.type==="cursor")return r;!Mc&&r.type==="wildcard"&&_e.wildcard.hasLeadingWildcard(r)&&H("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");const a=ce(!1);return l=>Z("is",[l,r,a])},wa={type:"other",description:"OR"},Si="or",Ai={type:"literal",value:"or",description:'"or"'},_a={type:"other",description:"AND"},xi="and",Ei={type:"literal",value:"and",description:'"and"'},Sa={type:"other",description:"NOT"},Ci="not",ki={type:"literal",value:"not",description:'"not"'},Aa={type:"other",description:"literal"},Ge='"',Je={type:"literal",value:'"',description:'"\\""'},lr=function(r,a,l){const{start:u,end:b}=fc();return{type:"cursor",start:u.offset,end:b.offset-a.length,prefix:r.join(""),suffix:l.join(""),text:hc().replace(a,"")}},xa=function(r){return ce(r.join(""))},et="\\",tt={type:"literal",value:"\\",description:'"\\\\"'},Ea=/^[\\"]/,Ca={type:"class",value:'[\\\\"]',description:'[\\\\"]'},yt=function(r){return r},ka=/^[^"]/,Pa={type:"class",value:'[^"]',description:'[^"]'},Ta=function(r){const a=r.join("").trim();return a==="null"?ce(null):a==="true"?ce(!0):a==="false"?ce(!1):r.includes(Cs)?Ic(a):ce(/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(a)?isFinite(a)&&(a>Number.MAX_SAFE_INTEGER||a<Number.MIN_SAFE_INTEGER)?BigInt(a):Number(a):a)},Pi={type:"any",description:"any character"},$t="*",wt={type:"literal",value:"*",description:'"*"'},Oa=function(){return Cs},Ti="\\t",Da={type:"literal",value:"\\t",description:'"\\\\t"'},La=function(){return" "},Oi="\\r",Na={type:"literal",value:"\\r",description:'"\\\\r"'},Ba=function(){return"\r"},Di="\\n",ja={type:"literal",value:"\\n",description:'"\\\\n"'},za=function(){return`
725
- `},Ra=function(r){return r},Ma=/^[\\():<>"*{}]/,Ia={type:"class",value:'[\\\\():<>"*{}]',description:'[\\\\():<>"*{}]'},Li="<=",Ua={type:"literal",value:"<=",description:'"<="'},Fa=function(){return"lte"},Ni=">=",Ha={type:"literal",value:">=",description:'">="'},Qa=function(){return"gte"},Bi="<",ji={type:"literal",value:"<",description:'"<"'},qa=function(){return"lt"},zi=">",Ri={type:"literal",value:">",description:'">"'},Wa=function(){return"gt"},Va={type:"other",description:"whitespace"},Ya=/^[ \t\r\n]/,Ka={type:"class",value:"[\\ \\t\\r\\n]",description:"[\\ \\t\\r\\n]"},Za=function(){return zc},Mi="@kuery-cursor@",Xa={type:"literal",value:"@kuery-cursor@",description:'"@kuery-cursor@"'},Ga=function(){return Rc},Ii="||",Ja={type:"literal",value:"||",description:'"||"'},ec=function(){H("LuceneOr")},Ui="&&",tc={type:"literal",value:"&&",description:'"&&"'},Fi=function(){H("LuceneAnd")},Hi="+",Qi={type:"literal",value:"+",description:'"+"'},qi="-",Wi={type:"literal",value:"-",description:'"-"'},Vi=function(){H("LuceneNot")},Yi="!",Ki={type:"literal",value:"!",description:'"!"'},Zi="_exists_",rc={type:"literal",value:"_exists_",description:'"_exists_"'},ic=function(){H("LuceneExists")},Xi=function(){H("LuceneRange")},Gi="?",Ji={type:"literal",value:"?",description:'"?"'},sc=function(){H("LuceneWildcard")},pr="/",ur={type:"literal",value:"/",description:'"/"'},es=/^[^\/]/,ts={type:"class",value:"[^/]",description:"[^/]"},oc=function(){H("LuceneRegex")},dr="~",hr={type:"literal",value:"~",description:'"~"'},Ne=/^[0-9]/,Be={type:"class",value:"[0-9]",description:"[0-9]"},nc=function(){H("LuceneFuzzy")},ac=function(){H("LuceneProximity")},rs="^",is={type:"literal",value:"^",description:'"^"'},cc=function(){H("LuceneBoost")},lc=function(){return char},pc="=",uc={type:"literal",value:"=",description:'"="'},ss="[",os={type:"literal",value:"[",description:'"["'},ns="]",as={type:"literal",value:"]",description:'"]"'},cs="TO",dc={type:"literal",value:"TO",description:'"TO"'},c=0,S=0,_t=[{line:1,column:1,seenCR:!1}],K=0,fr=[],f=0,St;if("startRule"in n){if(!(n.startRule in p))throw new Error(`Can't start parsing from rule "`+n.startRule+'".');h=p[n.startRule]}function hc(){return i.substring(S,c)}function fc(){return At(S,c)}function H(r){throw ps(r,null,i.substring(S,c),At(S,c))}function ls(r){var a=_t[r],l,u;if(a)return a;for(l=r-1;!_t[l];)l--;for(a=_t[l],a={line:a.line,column:a.column,seenCR:a.seenCR};l<r;)u=i.charAt(l),u===`
726
- `?(a.seenCR||a.line++,a.column=1,a.seenCR=!1):u==="\r"||u==="\u2028"||u==="\u2029"?(a.line++,a.column=1,a.seenCR=!0):(a.column++,a.seenCR=!1),l++;return _t[r]=a,a}function At(r,a){var l=ls(r),u=ls(a);return{start:{offset:r,line:l.line,column:l.column},end:{offset:a,line:u.line,column:u.column}}}function m(r){c<K||(c>K&&(K=c,fr=[]),fr.push(r))}function ps(r,a,l,u){function b(L){var B=1;for(L.sort(function(le,Q){return le.description<Q.description?-1:le.description>Q.description?1:0});B<L.length;)L[B-1]===L[B]?L.splice(B,1):B++}function _(L,B){function le(Fc){function Ot(ee){return ee.charCodeAt(0).toString(16).toUpperCase()}return Fc.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(ee){return"\\x0"+Ot(ee)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(ee){return"\\x"+Ot(ee)}).replace(/[\u0100-\u0FFF]/g,function(ee){return"\\u0"+Ot(ee)}).replace(/[\u1000-\uFFFF]/g,function(ee){return"\\u"+Ot(ee)})}var Q=new Array(L.length),ks,Ps,it;for(it=0;it<L.length;it++)Q[it]=L[it].description;return ks=L.length>1?Q.slice(0,-1).join(", ")+" or "+Q[L.length-1]:Q[0],Ps=B?'"'+le(B)+'"':"end of input","Expected "+ks+" but "+Ps+" found."}return a!==null&&b(a),new t(r!==null?r:_(a,l),a,l,u)}function us(){var r,a,l,u;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();return a!==e?(l=xt(),l===e&&(l=null),l!==e?(u=Pt(),u!==e?(S=r,a=g(l,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r}function xt(){var r,a,l,u;return r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=Ac(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=gr(),a!==e?(l=Et(),l!==e?(u=xt(),u!==e?(S=r,a=C(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=gr())),r}function gr(){var r,a,l,u;return r=c,a=ds(),a!==e?(l=Ct(),l!==e?(u=gr(),u!==e?(S=r,a=y(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=ds()),r}function ds(){var r,a,l;return r=c,a=yr(),a!==e?(l=hs(),l!==e?(S=r,a=E(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=hs()),r}function hs(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(k)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=xt(),u!==e?(b=Pt(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=M(u,b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r===e&&(r=gc()),r}function gc(){var r,a,l,u,b,_,L,B,le,Q;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();if(b!==e)if(i.charCodeAt(c)===123?(_=Le,c++):(_=e,f===0&&m(nr)),_!==e){for(L=[],B=w();B!==e;)L.push(B),B=w();L!==e?(B=xt(),B!==e?(le=Pt(),le!==e?(i.charCodeAt(c)===125?(Q=ar,c++):(Q=e,f===0&&m(cr)),Q!==e?(S=r,a=la(a,B,le),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r===e&&(r=bc()),r}function bc(){var r;return r=vc(),r===e&&(r=mc(),r===e&&(r=yc())),r}function br(){var r;return f++,r=$r(),f--,r===e&&f===0&&m(pa),r}function vc(){var r,a,l,u,b,_;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(u=ys(),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=$r(),_!==e?(S=r,a=ua(a,u,_),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function mc(){var r,a,l,u,b,_;if(r=c,a=br(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=vr(),_!==e?(S=r,a=da(a,_),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function yc(){var r,a;return r=c,a=bs(),a!==e&&(S=r,a=ha(a)),r=a,r}function vr(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===40?(a=x,c++):(a=e,f===0&&m(k)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=fs(),u!==e?(b=Pt(),b!==e?(i.charCodeAt(c)===41?(_=N,c++):(_=e,f===0&&m(z)),_!==e?(S=r,a=fa(u,b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r===e&&(r=bs()),r}function fs(){var r,a,l,u;return r=c,a=mr(),a!==e?(l=Et(),l!==e?(u=fs(),u!==e?(S=r,a=ga(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=mr()),r}function mr(){var r,a,l,u;return r=c,a=gs(),a!==e?(l=Ct(),l!==e?(u=mr(),u!==e?(S=r,a=ba(a,u),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e),r===e&&(r=gs()),r}function gs(){var r,a,l;return r=c,a=yr(),a!==e?(l=vr(),l!==e?(S=r,a=va(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=vr()),r}function bs(){var r,a;return f++,r=c,a=kt(),a!==e&&(S=r,a=ya(a)),r=a,r===e&&(r=c,a=vs(),a!==e&&(S=r,a=$a(a)),r=a),f--,r===e&&(a=e,f===0&&m(ma)),r}function Et(){var r,a,l,u,b;if(f++,r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,2).toLowerCase()===Si?(l=i.substr(c,2),c+=2):(l=e,f===0&&m(Ai)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=$s(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(wa)),r}function Ct(){var r,a,l,u,b;if(f++,r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,3).toLowerCase()===xi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ei)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=ws(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(_a)),r}function yr(){var r,a,l,u;if(f++,r=c,i.substr(c,3).toLowerCase()===Ci?(a=i.substr(c,3),c+=3):(a=e,f===0&&m(ki)),a!==e){if(l=[],u=w(),u!==e)for(;u!==e;)l.push(u),u=w();else l=e;l!==e?(a=[a,l],r=a):(c=r,r=e)}else c=r,r=e;return r===e&&(r=c,S=c,a=$(),a?a=void 0:a=e,a!==e?(l=_s(),l!==e?(a=[a,l],r=a):(c=r,r=e)):(c=r,r=e)),f--,r===e&&(a=e,f===0&&m(Sa)),r}function $r(){var r;return f++,r=kt(),r===e&&(r=vs()),f--,r===e&&f===0&&m(Aa),r}function kt(){var r,a,l,u,b,_;if(r=c,i.charCodeAt(c)===34?(a=Ge,c++):(a=e,f===0&&m(Je)),a!==e){for(l=[],u=je();u!==e;)l.push(u),u=je();if(l!==e)if(u=rt(),u!==e){for(b=[],_=je();_!==e;)b.push(_),_=je();b!==e?(i.charCodeAt(c)===34?(_=Ge,c++):(_=e,f===0&&m(Je)),_!==e?(S=r,a=lr(l,u,b),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;if(r===e)if(r=c,i.charCodeAt(c)===34?(a=Ge,c++):(a=e,f===0&&m(Je)),a!==e){for(l=[],u=je();u!==e;)l.push(u),u=je();l!==e?(i.charCodeAt(c)===34?(u=Ge,c++):(u=e,f===0&&m(Je)),u!==e?(S=r,a=xa(l),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function je(){var r,a,l;return r=wr(),r===e&&(r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(Ea.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Ca)),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e),r===e&&(r=c,a=c,f++,l=rt(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(ka.test(i.charAt(c))?(l=i.charAt(c),c++):(l=e,f===0&&m(Pa)),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e))),r}function vs(){var r,a,l,u,b;for(r=c,a=[],l=ze();l!==e;)a.push(l),l=ze();if(a!==e)if(l=rt(),l!==e){for(u=[],b=ze();b!==e;)u.push(b),b=ze();u!==e?(S=r,a=lr(a,l,u),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;if(r===e){if(r=c,a=[],l=ze(),l!==e)for(;l!==e;)a.push(l),l=ze();else a=e;a!==e&&(S=r,a=Ta(a)),r=a}return r}function ze(){var r,a,l,u,b;return r=wr(),r===e&&(r=wc(),r===e&&(r=_c(),r===e&&(r=$c(),r===e&&(r=c,a=c,f++,l=ms(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=Sc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(u=c,f++,b=rt(),f--,b===e?u=void 0:(c=u,u=e),u!==e?(i.length>c?(b=i.charAt(c),c++):(b=e,f===0&&m(Pi)),b!==e?(S=r,a=yt(b),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))))),r}function $c(){var r,a;return r=c,i.charCodeAt(c)===42?(a=$t,c++):(a=e,f===0&&m(wt)),a!==e&&(S=r,a=Oa()),r=a,r}function Pt(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(l=rt(),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=lr(a,l,u),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;if(r===e)for(r=[],a=w();a!==e;)r.push(a),a=w();return r}function wr(){var r,a;return r=c,i.substr(c,2)===Ti?(a=Ti,c+=2):(a=e,f===0&&m(Da)),a!==e&&(S=r,a=La()),r=a,r===e&&(r=c,i.substr(c,2)===Oi?(a=Oi,c+=2):(a=e,f===0&&m(Na)),a!==e&&(S=r,a=Ba()),r=a,r===e&&(r=c,i.substr(c,2)===Di?(a=Di,c+=2):(a=e,f===0&&m(ja)),a!==e&&(S=r,a=za()),r=a)),r}function wc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(l=ms(),l!==e?(S=r,a=yt(l),r=a):(c=r,r=e)):(c=r,r=e),r}function _c(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(i.substr(c,2).toLowerCase()===Si?(l=i.substr(c,2),c+=2):(l=e,f===0&&m(Ai)),l===e&&(i.substr(c,3).toLowerCase()===xi?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(Ei)),l===e&&(i.substr(c,3).toLowerCase()===Ci?(l=i.substr(c,3),c+=3):(l=e,f===0&&m(ki)))),l!==e?(S=r,a=Ra(l),r=a):(c=r,r=e)):(c=r,r=e),r}function Sc(){var r;return r=Et(),r===e&&(r=Ct(),r===e&&(r=yr())),r}function ms(){var r;return Ma.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ia)),r}function ys(){var r,a;return r=c,i.substr(c,2)===Li?(a=Li,c+=2):(a=e,f===0&&m(Ua)),a!==e&&(S=r,a=Fa()),r=a,r===e&&(r=c,i.substr(c,2)===Ni?(a=Ni,c+=2):(a=e,f===0&&m(Ha)),a!==e&&(S=r,a=Qa()),r=a,r===e&&(r=c,i.charCodeAt(c)===60?(a=Bi,c++):(a=e,f===0&&m(ji)),a!==e&&(S=r,a=qa()),r=a,r===e&&(r=c,i.charCodeAt(c)===62?(a=zi,c++):(a=e,f===0&&m(Ri)),a!==e&&(S=r,a=Wa()),r=a))),r}function w(){var r;return f++,Ya.test(i.charAt(c))?(r=i.charAt(c),c++):(r=e,f===0&&m(Ka)),f--,r===e&&f===0&&m(Va),r}function rt(){var r,a,l;return r=c,S=c,a=Za(),a?a=void 0:a=e,a!==e?(i.substr(c,14)===Mi?(l=Mi,c+=14):(l=e,f===0&&m(Xa)),l!==e?(S=r,a=Ga(),r=a):(c=r,r=e)):(c=r,r=e),r}function $s(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(i.substr(c,2)===Ii?(l=Ii,c+=2):(l=e,f===0&&m(Ja)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=ec(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function ws(){var r,a,l,u,b;for(r=c,a=[],l=w();l!==e;)a.push(l),l=w();if(a!==e)if(i.substr(c,2)===Ui?(l=Ui,c+=2):(l=e,f===0&&m(tc)),l!==e){for(u=[],b=w();b!==e;)u.push(b),b=w();u!==e?(S=r,a=Fi(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r===e&&(r=c,i.charCodeAt(c)===43?(a=Hi,c++):(a=e,f===0&&m(Qi)),a!==e&&(S=r,a=Fi()),r=a),r}function _s(){var r,a;return r=c,i.charCodeAt(c)===45?(a=qi,c++):(a=e,f===0&&m(Wi)),a!==e&&(S=r,a=Vi()),r=a,r===e&&(r=c,i.charCodeAt(c)===33?(a=Yi,c++):(a=e,f===0&&m(Ki)),a!==e&&(S=r,a=Vi()),r=a),r}function Ac(){var r;return r=xc(),r===e&&(r=Ss(),r===e&&(r=Ec())),r}function xc(){var r,a,l,u,b,_;if(r=c,a=Re(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=Ss(),_!==e?(a=[a,l,u,b,_],r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function Ss(){var r;return r=Cc(),r===e&&(r=_r(),r===e&&(r=kc(),r===e&&(r=Pc(),r===e&&(r=Tc(),r===e&&(r=Oc()))))),r}function Ec(){var r,a,l,u,b,_;if(r=c,i.substr(c,8)===Zi?(a=Zi,c+=8):(a=e,f===0&&m(rc)),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();if(l!==e)if(i.charCodeAt(c)===58?(u=Y,c++):(u=e,f===0&&m(U)),u!==e){for(b=[],_=w();_!==e;)b.push(_),_=w();b!==e?(_=Re(),_!==e?(S=r,a=ic(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;else c=r,r=e}else c=r,r=e;return r}function Cc(){var r,a,l,u,b,_,L;if(r=c,a=ys(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=Re(),u!==e?(S=r,a=Xi(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;if(r===e)if(r=c,a=Nc(),a!==e){for(l=[],u=w();u!==e;)l.push(u),u=w();l!==e?(u=Re(),u!==e?(b=Es(),b!==e?(_=Re(),_!==e?(L=Bc(),L!==e?(S=r,a=Xi(),r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function _r(){var r,a,l,u,b;for(r=c,a=[],l=Tt(),l===e&&(i.charCodeAt(c)===42?(l=$t,c++):(l=e,f===0&&m(wt)));l!==e;)a.push(l),l=Tt(),l===e&&(i.charCodeAt(c)===42?(l=$t,c++):(l=e,f===0&&m(wt)));if(a!==e)if(i.charCodeAt(c)===63?(l=Gi,c++):(l=e,f===0&&m(Ji)),l!==e){for(u=[],b=_r();b!==e;)u.push(b),b=_r();u!==e?(S=r,a=sc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function kc(){var r,a,l,u;if(r=c,i.charCodeAt(c)===47?(a=pr,c++):(a=e,f===0&&m(ur)),a!==e){for(l=[],es.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(ts));u!==e;)l.push(u),es.test(i.charAt(c))?(u=i.charAt(c),c++):(u=e,f===0&&m(ts));l!==e?(i.charCodeAt(c)===47?(u=pr,c++):(u=e,f===0&&m(ur)),u!==e?(S=r,a=oc(),r=a):(c=r,r=e)):(c=r,r=e)}else c=r,r=e;return r}function Pc(){var r,a,l,u,b;if(r=c,a=As(),a!==e)if(i.charCodeAt(c)===126?(l=dr,c++):(l=e,f===0&&m(hr)),l!==e){for(u=[],Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));b!==e;)u.push(b),Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));u!==e?(S=r,a=nc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Tc(){var r,a,l,u,b;if(r=c,a=kt(),a!==e)if(i.charCodeAt(c)===126?(l=dr,c++):(l=e,f===0&&m(hr)),l!==e){for(u=[],Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));b!==e;)u.push(b),Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));u!==e?(S=r,a=ac(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Oc(){var r,a,l,u,b;if(r=c,a=Re(),a!==e)if(i.charCodeAt(c)===94?(l=rs,c++):(l=e,f===0&&m(is)),l!==e){for(u=[],Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));b!==e;)u.push(b),Ne.test(i.charAt(c))?(b=i.charAt(c),c++):(b=e,f===0&&m(Be));u!==e?(S=r,a=cc(),r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Re(){var r;return r=kt(),r===e&&(r=As()),r}function As(){var r,a;if(r=[],a=Tt(),a!==e)for(;a!==e;)r.push(a),a=Tt();else r=e;return r}function Tt(){var r,a,l,u;return r=wr(),r===e&&(r=Lc(),r===e&&(r=c,a=c,f++,l=xs(),f--,l===e?a=void 0:(c=a,a=e),a!==e?(l=c,f++,u=Dc(),f--,u===e?l=void 0:(c=l,l=e),l!==e?(i.length>c?(u=i.charAt(c),c++):(u=e,f===0&&m(Pi)),u!==e?(a=[a,l,u],r=a):(c=r,r=e)):(c=r,r=e)):(c=r,r=e))),r}function Dc(){var r;return r=Et(),r===e&&(r=Ct(),r===e&&(r=$s(),r===e&&(r=ws(),r===e&&(r=_s(),r===e&&(r=Es()))))),r}function Lc(){var r,a,l;return r=c,i.charCodeAt(c)===92?(a=et,c++):(a=e,f===0&&m(tt)),a!==e?(l=xs(),l!==e?(S=r,a=lc(),r=a):(c=r,r=e)):(c=r,r=e),r}function xs(){var r;return i.charCodeAt(c)===43?(r=Hi,c++):(r=e,f===0&&m(Qi)),r===e&&(i.charCodeAt(c)===45?(r=qi,c++):(r=e,f===0&&m(Wi)),r===e&&(i.charCodeAt(c)===61?(r=pc,c++):(r=e,f===0&&m(uc)),r===e&&(i.charCodeAt(c)===62?(r=zi,c++):(r=e,f===0&&m(Ri)),r===e&&(i.charCodeAt(c)===60?(r=Bi,c++):(r=e,f===0&&m(ji)),r===e&&(i.charCodeAt(c)===33?(r=Yi,c++):(r=e,f===0&&m(Ki)),r===e&&(i.charCodeAt(c)===40?(r=x,c++):(r=e,f===0&&m(k)),r===e&&(i.charCodeAt(c)===41?(r=N,c++):(r=e,f===0&&m(z)),r===e&&(i.charCodeAt(c)===123?(r=Le,c++):(r=e,f===0&&m(nr)),r===e&&(i.charCodeAt(c)===125?(r=ar,c++):(r=e,f===0&&m(cr)),r===e&&(i.charCodeAt(c)===91?(r=ss,c++):(r=e,f===0&&m(os)),r===e&&(i.charCodeAt(c)===93?(r=ns,c++):(r=e,f===0&&m(as)),r===e&&(i.charCodeAt(c)===94?(r=rs,c++):(r=e,f===0&&m(is)),r===e&&(i.charCodeAt(c)===34?(r=Ge,c++):(r=e,f===0&&m(Je)),r===e&&(i.charCodeAt(c)===126?(r=dr,c++):(r=e,f===0&&m(hr)),r===e&&(i.charCodeAt(c)===42?(r=$t,c++):(r=e,f===0&&m(wt)),r===e&&(i.charCodeAt(c)===63?(r=Gi,c++):(r=e,f===0&&m(Ji)),r===e&&(i.charCodeAt(c)===58?(r=Y,c++):(r=e,f===0&&m(U)),r===e&&(i.charCodeAt(c)===92?(r=et,c++):(r=e,f===0&&m(tt)),r===e&&(i.charCodeAt(c)===47?(r=pr,c++):(r=e,f===0&&m(ur))))))))))))))))))))),r}function Es(){var r,a,l,u,b;if(r=c,a=[],l=w(),l!==e)for(;l!==e;)a.push(l),l=w();else a=e;if(a!==e)if(i.substr(c,2)===cs?(l=cs,c+=2):(l=e,f===0&&m(dc)),l!==e){if(u=[],b=w(),b!==e)for(;b!==e;)u.push(b),b=w();else u=e;u!==e?(a=[a,l,u],r=a):(c=r,r=e)}else c=r,r=e;else c=r,r=e;return r}function Nc(){var r;return i.charCodeAt(c)===91?(r=ss,c++):(r=e,f===0&&m(os)),r===e&&(i.charCodeAt(c)===123?(r=Le,c++):(r=e,f===0&&m(nr))),r}function Bc(){var r;return i.charCodeAt(c)===93?(r=ns,c++):(r=e,f===0&&m(as)),r===e&&(i.charCodeAt(c)===125?(r=ar,c++):(r=e,f===0&&m(cr))),r}const{errorOnLuceneSyntax:jc,parseCursor:zc,cursorSymbol:Rc,allowLeadingWildcards:Mc=!0,helpers:{nodeTypes:_e}}=n,Z=_e.function.buildNodeWithArgumentNodes,ce=_e.literal.buildNode,Ic=_e.wildcard.buildNode,Uc=_e.namedArg.buildNode,{wildcardSymbol:Cs}=_e.wildcard;if(St=h(),St!==e&&c===i.length)return St;throw St!==e&&c<i.length&&m({type:"end",description:"end of input"}),ps(null,fr,K<i.length?i.charAt(K):null,K<i.length?At(K,K+1):At(K,K))}return{SyntaxError:t,parse:s}}(),Xt=(o,t={},s=gt)=>{if(typeof o>"u")throw new Error("expression must be a string, got undefined instead");return s(o,{...t,helpers:{nodeTypes:J}})},Pe=(o,t={})=>Xt(o,{...t,startRule:"Literal"},gt),bt=(o,t={})=>{try{return Xt(o,t,gt)}catch(s){throw s.name==="SyntaxError"?new ei(s,o):s}},Ao=o=>{try{return Xt(o,{errorOnLuceneSyntax:!0},gt),!1}catch(t){return t.message.startsWith("Lucene")}},j=(o,t,s,i)=>(t=void 0,!o||!o.type||!J[o.type]?j(J.function.buildNode("and",[]),t):J[o.type].toOpenSearchQuery(o,t,s,i)),G="@kuery-wildcard@";function xo(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Eo(o){return o.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function Co(o){return o.includes(G)?{type:"wildcard",value:o}:Pe(o)}function ti(o,t){const{value:s}=o,i=s.split(G).map(xo).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(t)}function ko(o){const{value:t}=o;return t.split(G).join("*")}function Gt(o){const{value:t}=o;return t.split(G).map(Eo).join("*")}function Po(o){const{value:t}=o;return t.startsWith(G)&&t.replace(G,"").length>0}const To=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Co,hasLeadingWildcard:Po,test:ti,toOpenSearchQuery:ko,toQueryStringQuery:Gt,wildcardSymbol:G},Symbol.toStringTag,{value:"Module"}));function Jt(o,t){if(!t)return[];if(o.type==="literal"){const s=Zt(o),i=t.fields.find(n=>n.name===s);return i?[i]:[]}else if(o.type==="wildcard")return t.fields.filter(i=>ti(o,i.name))}function Qc(o){return o}function ri(o,t,s){const i={...o,value:s?`${s}.${o.value}`:o.value};if(!t||i.type==="wildcard"&&!s)return i;const e=Jt(i,t).reduce((p,h)=>{const g=h.subType&&h.subType.nested?h.subType.nested.path:void 0;return s&&!g?[...p,`${h.name} is not a nested field but is in nested group "${s}" in the DQL expression.`]:g&&!s?[...p,`${h.name} is a nested field, but is not in a nested group in the DQL expression.`]:g!==s?[...p,`Nested field ${h.name} is being queried with the incorrect nested path. The correct path is ${h.subType.nested.path}.`]:p},[]);if(e.length>0)throw new Error(e.join(`
727
- `));return i}function Oo(o,t,s=!1){if(o===void 0)throw new Error("fieldName is a required argument");if(t===void 0)throw new Error("value is a required argument");const i=typeof o=="string"?Pe(o):ke(o),n=typeof t=="string"?Pe(t):ke(t),e=ke(s);return{arguments:[i,n,e]}}function Do(o,t,s={},i={}){const{arguments:[n,e,p]}=o,h=ri(n,t,i!=null&&i.nested?i.nested.path:void 0),g=j(h),$=e!==void 0?j(e):e,C=p.value?"phrase":"best_fields";if(h.value===null)return e.type==="wildcard"?{query_string:{query:Gt(e)}}:{multi_match:{type:C,query:$,lenient:!0}};const y=t?Jt(h,t):[];y&&y.length===0&&y.push({name:j(h),scripted:!1,type:""});const E=e.type==="wildcard"&&$==="*",x=h.type==="wildcard"&&g==="*"||y&&t&&y.length===t.fields.length;return E&&x?{match_all:{}}:{bool:{should:y.reduce((z,M)=>{const Y=U=>{var Le;return h.type!=="wildcard"||!((Le=M.subType)!=null&&Le.nested)||i!=null&&i.nested?U:{nested:{path:M.subType.nested.path,query:U,score_mode:"none"}}};if(M.scripted)return[];if(E)return[...z,Y({exists:{field:M.name}})];if(e.type==="wildcard")return[...z,Y({query_string:{fields:[M.name],query:Gt(e)}})];if(M.type==="date"){const U=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return[...z,Y({range:{[M.name]:{gte:$,lte:$,...U}}})]}else{const U=C==="phrase"?"match_phrase":"match";return[...z,Y({[U]:{[M.name]:$}})]}},[])||[],minimum_should_match:1}}}const Lo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Oo,toOpenSearchQuery:Do},Symbol.toStringTag,{value:"Module"}));function No(o){return{arguments:o}}function Bo(o,t,s={},i={}){return{bool:{filter:(o.arguments||[]).map(e=>j(e,t,s,i))}}}const jo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:No,toOpenSearchQuery:Bo},Symbol.toStringTag,{value:"Module"}));function zo(o){return{arguments:o}}function Ro(o,t,s={},i={}){return{bool:{should:(o.arguments||[]).map(e=>j(e,t,s,i)),minimum_should_match:1}}}const Mo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:zo,toOpenSearchQuery:Ro},Symbol.toStringTag,{value:"Module"}));function Io(o){return{arguments:[o]}}function Uo(o,t,s={},i={}){const[n]=o.arguments;return{bool:{must_not:j(n,t,s,i)}}}const Fo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Io,toOpenSearchQuery:Uo},Symbol.toStringTag,{value:"Module"}));function Ho(o,...t){let s={};for(let i of t)s[i]=o[i];return s}function Qo(o,t){const s=Ho(t,"gt","lt","gte","lte","format"),i=typeof o=="string"?Pe(o):J.literal.buildNode(o),n=Object.entries(s).map(e=>{let[p,h]=e;return J.namedArg.buildNode(p,h)});return{arguments:[i,...n]}}function qo(o,t,s={},i={}){const[n,...e]=o.arguments,p=ri(n,t,i!=null&&i.nested?i.nested.path:void 0),h=t?Jt(p,t):[],g=Wo(e),$=Object.fromEntries(Object.entries(g).map(([y,E])=>[y,j(E)]));return h&&h.length===0&&h.push({name:j(p),scripted:!1,type:""}),{bool:{should:h.map(y=>{const E=x=>{var k;return p.type!=="wildcard"||!((k=y.subType)!=null&&k.nested)||i.nested?x:{nested:{path:y.subType.nested.path,query:x,score_mode:"none"}}};if(y.scripted)return{};if(y.type==="date"){const x=s.dateFormatTZ?{time_zone:s.dateFormatTZ}:{};return E({range:{[y.name]:{...$,...x}}})}return E({range:{[y.name]:$}})}),minimum_should_match:1}}}function Wo(o){if(o.gt&&o.gte||o.lt&&o.lte)throw new Error("range ends cannot be both inclusive and exclusive");const t=["gte","lte","format"];return o.reduce((s,i,n)=>(i.type==="namedArg"?s[i.name]=i.value:s[t[n]]=i,s),{})}const Vo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Qo,toOpenSearchQuery:qo},Symbol.toStringTag,{value:"Module"}));function Yo(o){return{arguments:[ke(o)]}}function Ko(o,t,s={},i={}){const{arguments:[n]}=o,e={...n,value:i!=null&&i.nested?`${i.nested.path}.${n.value}`:n.value},p=Zt(e),h=((t==null?void 0:t.fields)||[]).find(g=>g.name===p);if(h&&h.scripted)throw new Error("Exists query does not support scripted fields");return{exists:{field:p}}}const Zo=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Yo,toOpenSearchQuery:Ko},Symbol.toStringTag,{value:"Module"}));function Xo(o,t){return{arguments:[typeof o=="string"?Pe(o):ke(o),t]}}function Go(o,t,s={},i={}){var g;const[n,e]=o.arguments,p=j(n),h=(g=i==null?void 0:i.nested)!=null&&g.path?`${i.nested.path}.${p}`:p;return{nested:{path:h,query:j(e,t,s,{...i,nested:{path:h}}),score_mode:"none"}}}const er={is:Lo,and:jo,or:Mo,not:Fo,range:Vo,exists:Zo,nested:Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Xo,toOpenSearchQuery:Go},Symbol.toStringTag,{value:"Module"}))};function Jo(o,...t){const s=er[o];if(s===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,...s.buildNodeParams(...t)}}function en(o,t){if(er[o]===void 0)throw new Error(`Unknown function "${o}"`);return{type:"function",function:o,arguments:t}}function tn(o,t,s,i){return er[o.function].toOpenSearchQuery(o,t,s,i)}const rn=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Jo,buildNodeWithArgumentNodes:en,toOpenSearchQuery:tn},Symbol.toStringTag,{value:"Module"}));function sn(o,t){const s=t.type==="literal"?t:J.literal.buildNode(t);return{type:"namedArg",name:o,value:s}}function on(o){return j(o.value)}const J={function:rn,literal:So,namedArg:Object.freeze(Object.defineProperty({__proto__:null,buildNode:sn,toOpenSearchQuery:on},Symbol.toStringTag,{value:"Module"})),wildcard:To},nn=G,an=(o,t)=>"("+(o.arguments||[]).map(i=>ye(i,t)).join(" AND ")+")",cn=(o,t)=>{var{arguments:[s,i,n]}=o;let e="=";i.type==="wildcard"&&(e="");let p=ye(i);n=n.value||typeof p=="string",i.type==="literal"&&n&&(p=`'${p}'`),i.type==="literal"&&!n&&(p=`${p}`);let h=ye(s);return h==null?t&&n?`(${t.filter(g=>g.type==="string").map(g=>`${g.name} ILIKE '%${i.value}%'`).join(" OR ")})`:t&&!n&&(i.value===!0||i.value===!1)?`(${t.filter(g=>g.type==="boolean").map(g=>`${g.name}=${i.value}`).join(" OR ")})`:"":h+e+p},ln=(o,t)=>"("+(o.arguments||[]).map(i=>ye(i,t)).join(" OR ")+")",pn=(o,t)=>{const[s]=o.arguments;return"NOT ("+ye(s,t)+")"},un={gt:">",lt:"<",gte:">=",lte:"<="},dn={is:cn,and:an,or:ln,not:pn,range:o=>{const[t,s]=o.arguments;let i=s.value;const n=un[s.name];let e=ye(i);return i.type==="literal"&&(e=`${e}`),`${t.value} ${n} ${e}`},exists:o=>{const[t]=o.arguments;return`${t.value} IS NOT NULL`},nested:o=>(console.warn("Nested types dont exist in CQL",o),"")},hn={function:(o,t)=>dn[o.function](o,t),literal:o=>o.value,wildcard:o=>{const{value:t}=o;return` LIKE '${t.split(nn).join("%")}'`}},ye=(o,t)=>{const s=hn[o.type];return s(o,t)},fn=G,gn=o=>({$and:(o.arguments||[]).map(i=>se(i))}),bn=o=>{const{arguments:[t,s]}=o;let i=se(s);if(s.type==="wildcard"&&s.value==="@kuery-wildcard@")return ii(o);let e={};return e[se(t)]={$eq:i},e},vn=o=>({$or:(o.arguments||[]).map(s=>se(s))}),mn=o=>{const[t]=o.arguments;let s={};return s={$ne:se(t)},s},yn={gt:"$gt",lt:"$lt",gte:"$gte",lte:"$lte"},$n=o=>{const[t,s]=o.arguments;let i=s.value;const n=yn[s.name];let e=se(i),p={};return p[t.value]={},p[t.value][n]=e,p},ii=o=>{const[t]=o.arguments;return{[se(t)]:{$ne:null}}},wn={is:bn,and:gn,or:vn,not:mn,range:$n,exists:ii,nested:o=>(console.warn("TODO Implement nested search",o),"")},_n={function:o=>wn[o.function](o),literal:o=>o.value,wildcard:o=>{const{value:t}=o;return`/${t.split(fn).join(".*")}/`}},se=(o,t)=>{const s=_n[o.type];return s(o,t)},Sn=Object.freeze(Object.defineProperty({__proto__:null,DQLSyntaxError:ei,doesKueryExpressionHaveLuceneSyntaxError:Ao,fromKueryExpression:bt,fromLiteralExpression:Pe,nodeTypes:J,parse:bt,toCql:ye,toDSL:j,toMongo:se,toOpenSearchQuery:j},Symbol.toStringTag,{value:"Module"})),An=F`
746
+ `}return`Not yet implemented ${this.variant}`}},T([b({type:Boolean,reflect:!0})],h.SpectricInput.prototype,"checked",2),T([b({type:String,reflect:!0})],h.SpectricInput.prototype,"placeholder",2),T([b({type:Boolean,reflect:!0})],h.SpectricInput.prototype,"readonly",2),T([b({type:String,reflect:!0})],h.SpectricInput.prototype,"variant",2),T([b({type:Boolean,reflect:!0})],h.SpectricInput.prototype,"disabled",2),T([b({type:String,reflect:!0})],h.SpectricInput.prototype,"label",2),T([b()],h.SpectricInput.prototype,"hidePasswordLabel",2),T([b()],h.SpectricInput.prototype,"showPasswordLabel",2),T([b({type:Boolean,reflect:!0})],h.SpectricInput.prototype,"showPasswordVisibilityToggle",2),T([b({type:String,reflect:!0})],h.SpectricInput.prototype,"helperText",2),T([b({type:Boolean,reflect:!0})],h.SpectricInput.prototype,"invalid",2),T([b({type:Boolean,reflect:!0})],h.SpectricInput.prototype,"required",2),T([b({type:String,reflect:!0})],h.SpectricInput.prototype,"invalidText",2),T([b()],h.SpectricInput.prototype,"name",2),T([b()],h.SpectricInput.prototype,"pattern",2),T([b({type:Number,reflect:!0})],h.SpectricInput.prototype,"maxCount",2),T([b({reflect:!0})],h.SpectricInput.prototype,"autocomplete",2),T([b({reflect:!0})],h.SpectricInput.prototype,"value",1),T([ye("input")],h.SpectricInput.prototype,"_input",2),T([nn({capture:!0})],h.SpectricInput.prototype,"_handleChange",1),h.SpectricInput=T([O("spectric-input")],h.SpectricInput);const Le=s=>nr(s===""?void 0:s??void 0),Dn="end of input",Ln={fieldName:"field name",value:"value",literal:"literal",whitespace:"whitespace"};class yi extends Error{constructor(e,n){let i=e.message;if(e.expected){const c=e.expected.map(f=>Ln[f.description]||f.description).join(", ");let d=e.found?`"${e.found}"`:Dn;i=`Expected ${c} but ${d} found.`}const o=[i,n,"-".repeat(e.location.start.offset)+"^"].join(`
747
+ `);super(o),this.name="DQLSyntaxError",this.shortMessage=i}}function Ne(s){return{type:"literal",value:s}}function cr(s){return s.value}const Nn=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Ne,toOpenSearchQuery:cr},Symbol.toStringTag,{value:"Module"})),{SyntaxError:lc,parse:$t}=function(){function s(i,o){function t(){this.constructor=i}t.prototype=o.prototype,i.prototype=new t}function e(i,o,t,c){this.message=i,this.expected=o,this.found=t,this.location=c,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,e)}s(e,Error);function n(i){var o=arguments.length>1?arguments[1]:{},t={},c={start:Ss,Literal:Hr},d=Ss,f=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r!==null?r:Pe.function.buildNode("is","*","*")},y=function(){return tc},x=function(r,a){const p=[r,a].find(u=>u.type==="cursor");return p||ee("or",[r,a])},$=function(r,a){const p=[r,a].find(u=>u.type==="cursor");return p||ee("and",[r,a])},E=function(r){return r.type==="cursor"?r:ee("not",[r])},C="(",k={type:"literal",value:"(",description:'"("'},N=")",R={type:"literal",value:")",description:'")"'},M=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},G=":",U={type:"literal",value:":",description:'":"'},Me="{",Er={type:"literal",value:"{",description:'"{"'},kr="}",Pr={type:"literal",value:"}",description:'"}"'},ka=function(r,a,p){return a.type==="cursor"?{...a,nestedPath:a.nestedPath?`${r.value}.${a.nestedPath}`:r.value}:p.type==="cursor"?{...p,suggestionTypes:["conjunction"]}:ee("nested",[r,a])},Pa={type:"other",description:"fieldName"},Ta=function(r,a,p){if(p.type==="cursor")return{...p,suggestionTypes:["conjunction"]};const u=oc(a,p);return ee("range",[r,u])},Oa=function(r,a){return a.type==="cursor"?{...a,fieldName:r.value,suggestionTypes:["value","conjunction"]}:a(r)},Da=function(r){if(r.type==="cursor"){const p=`${r.prefix}${r.suffix}`.trim();return{...r,fieldName:p,suggestionTypes:["field","operator","conjunction"]}}const a=de(null);return r(a)},La=function(r,a){return a.type==="cursor"?{...a,suggestionTypes:["conjunction"]}:r},Na=function(r,a){const p=[r,a].find(u=>u.type==="cursor");return p?{...p,suggestionTypes:["value"]}:u=>ee("or",[r(u),a(u)])},za=function(r,a){const p=[r,a].find(u=>u.type==="cursor");return p?{...p,suggestionTypes:["value"]}:u=>ee("and",[r(u),a(u)])},ja=function(r){return r.type==="cursor"?{...list,suggestionTypes:["value"]}:a=>ee("not",[r(a)])},Ba={type:"other",description:"value"},Ra=function(r){if(r.type==="cursor")return r;const a=de(!0);return p=>ee("is",[p,r,a])},Ma=function(r){if(r.type==="cursor")return r;!sc&&r.type==="wildcard"&&Pe.wildcard.hasLeadingWildcard(r)&&q("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");const a=de(!1);return p=>ee("is",[p,r,a])},Ia={type:"other",description:"OR"},zi="or",ji={type:"literal",value:"or",description:'"or"'},Ha={type:"other",description:"AND"},Bi="and",Ri={type:"literal",value:"and",description:'"and"'},Ua={type:"other",description:"NOT"},Mi="not",Ii={type:"literal",value:"not",description:'"not"'},Fa={type:"other",description:"literal"},st='"',nt={type:"literal",value:'"',description:'"\\""'},Tr=function(r,a,p){const{start:u,end:v}=Ll();return{type:"cursor",start:u.offset,end:v.offset-a.length,prefix:r.join(""),suffix:p.join(""),text:Dl().replace(a,"")}},Qa=function(r){return de(r.join(""))},ot="\\",at={type:"literal",value:"\\",description:'"\\\\"'},qa=/^[\\"]/,Wa={type:"class",value:'[\\\\"]',description:'[\\\\"]'},Ct=function(r){return r},Va=/^[^"]/,Ya={type:"class",value:'[^"]',description:'[^"]'},Ka=function(r){const a=r.join("").trim();return a==="null"?de(null):a==="true"?de(!0):a==="false"?de(!1):r.includes(Ms)?nc(a):de(/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(a)?isFinite(a)&&(a>Number.MAX_SAFE_INTEGER||a<Number.MIN_SAFE_INTEGER)?BigInt(a):Number(a):a)},Hi={type:"any",description:"any character"},Et="*",kt={type:"literal",value:"*",description:'"*"'},Za=function(){return Ms},Ui="\\t",Xa={type:"literal",value:"\\t",description:'"\\\\t"'},Ga=function(){return" "},Fi="\\r",Ja={type:"literal",value:"\\r",description:'"\\\\r"'},el=function(){return"\r"},Qi="\\n",tl={type:"literal",value:"\\n",description:'"\\\\n"'},rl=function(){return`
748
+ `},il=function(r){return r},sl=/^[\\():<>"*{}]/,nl={type:"class",value:'[\\\\():<>"*{}]',description:'[\\\\():<>"*{}]'},qi="<=",ol={type:"literal",value:"<=",description:'"<="'},al=function(){return"lte"},Wi=">=",ll={type:"literal",value:">=",description:'">="'},cl=function(){return"gte"},Vi="<",Yi={type:"literal",value:"<",description:'"<"'},pl=function(){return"lt"},Ki=">",Zi={type:"literal",value:">",description:'">"'},ul=function(){return"gt"},hl={type:"other",description:"whitespace"},dl=/^[ \t\r\n]/,fl={type:"class",value:"[\\ \\t\\r\\n]",description:"[\\ \\t\\r\\n]"},gl=function(){return rc},Xi="@kuery-cursor@",vl={type:"literal",value:"@kuery-cursor@",description:'"@kuery-cursor@"'},bl=function(){return ic},Gi="||",ml={type:"literal",value:"||",description:'"||"'},yl=function(){q("LuceneOr")},Ji="&&",$l={type:"literal",value:"&&",description:'"&&"'},es=function(){q("LuceneAnd")},ts="+",rs={type:"literal",value:"+",description:'"+"'},is="-",ss={type:"literal",value:"-",description:'"-"'},ns=function(){q("LuceneNot")},os="!",as={type:"literal",value:"!",description:'"!"'},ls="_exists_",wl={type:"literal",value:"_exists_",description:'"_exists_"'},_l=function(){q("LuceneExists")},cs=function(){q("LuceneRange")},ps="?",us={type:"literal",value:"?",description:'"?"'},Sl=function(){q("LuceneWildcard")},Or="/",Dr={type:"literal",value:"/",description:'"/"'},hs=/^[^\/]/,ds={type:"class",value:"[^/]",description:"[^/]"},Al=function(){q("LuceneRegex")},Lr="~",Nr={type:"literal",value:"~",description:'"~"'},Ie=/^[0-9]/,He={type:"class",value:"[0-9]",description:"[0-9]"},xl=function(){q("LuceneFuzzy")},Cl=function(){q("LuceneProximity")},fs="^",gs={type:"literal",value:"^",description:'"^"'},El=function(){q("LuceneBoost")},kl=function(){return char},Pl="=",Tl={type:"literal",value:"=",description:'"="'},vs="[",bs={type:"literal",value:"[",description:'"["'},ms="]",ys={type:"literal",value:"]",description:'"]"'},$s="TO",Ol={type:"literal",value:"TO",description:'"TO"'},l=0,A=0,Pt=[{line:1,column:1,seenCR:!1}],J=0,zr=[],g=0,Tt;if("startRule"in o){if(!(o.startRule in c))throw new Error(`Can't start parsing from rule "`+o.startRule+'".');d=c[o.startRule]}function Dl(){return i.substring(A,l)}function Ll(){return Ot(A,l)}function q(r){throw _s(r,null,i.substring(A,l),Ot(A,l))}function ws(r){var a=Pt[r],p,u;if(a)return a;for(p=r-1;!Pt[p];)p--;for(a=Pt[p],a={line:a.line,column:a.column,seenCR:a.seenCR};p<r;)u=i.charAt(p),u===`
749
+ `?(a.seenCR||a.line++,a.column=1,a.seenCR=!1):u==="\r"||u==="\u2028"||u==="\u2029"?(a.line++,a.column=1,a.seenCR=!0):(a.column++,a.seenCR=!1),p++;return Pt[r]=a,a}function Ot(r,a){var p=ws(r),u=ws(a);return{start:{offset:r,line:p.line,column:p.column},end:{offset:a,line:u.line,column:u.column}}}function m(r){l<J||(l>J&&(J=l,zr=[]),zr.push(r))}function _s(r,a,p,u){function v(L){var z=1;for(L.sort(function(fe,W){return fe.description<W.description?-1:fe.description>W.description?1:0});z<L.length;)L[z-1]===L[z]?L.splice(z,1):z++}function _(L,z){function fe(ac){function Rt(ie){return ie.charCodeAt(0).toString(16).toUpperCase()}return ac.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(ie){return"\\x0"+Rt(ie)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(ie){return"\\x"+Rt(ie)}).replace(/[\u0100-\u0FFF]/g,function(ie){return"\\u0"+Rt(ie)}).replace(/[\u1000-\uFFFF]/g,function(ie){return"\\u"+Rt(ie)})}var W=new Array(L.length),Is,Hs,ct;for(ct=0;ct<L.length;ct++)W[ct]=L[ct].description;return Is=L.length>1?W.slice(0,-1).join(", ")+" or "+W[L.length-1]:W[0],Hs=z?'"'+fe(z)+'"':"end of input","Expected "+Is+" but "+Hs+" found."}return a!==null&&v(a),new e(r!==null?r:_(a,p),a,p,u)}function Ss(){var r,a,p,u;for(r=l,a=[],p=w();p!==t;)a.push(p),p=w();return a!==t?(p=Dt(),p===t&&(p=null),p!==t?(u=jt(),u!==t?(A=r,a=f(p,u),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t),r}function Dt(){var r,a,p,u;return r=l,A=l,a=y(),a?a=void 0:a=t,a!==t?(p=Fl(),p!==t?(a=[a,p],r=a):(l=r,r=t)):(l=r,r=t),r===t&&(r=l,a=jr(),a!==t?(p=Lt(),p!==t?(u=Dt(),u!==t?(A=r,a=x(a,u),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t),r===t&&(r=jr())),r}function jr(){var r,a,p,u;return r=l,a=As(),a!==t?(p=Nt(),p!==t?(u=jr(),u!==t?(A=r,a=$(a,u),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t),r===t&&(r=As()),r}function As(){var r,a,p;return r=l,a=Ir(),a!==t?(p=xs(),p!==t?(A=r,a=E(p),r=a):(l=r,r=t)):(l=r,r=t),r===t&&(r=xs()),r}function xs(){var r,a,p,u,v,_;if(r=l,i.charCodeAt(l)===40?(a=C,l++):(a=t,g===0&&m(k)),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();p!==t?(u=Dt(),u!==t?(v=jt(),v!==t?(i.charCodeAt(l)===41?(_=N,l++):(_=t,g===0&&m(R)),_!==t?(A=r,a=M(u,v),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;return r===t&&(r=Nl()),r}function Nl(){var r,a,p,u,v,_,L,z,fe,W;if(r=l,a=Br(),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();if(p!==t)if(i.charCodeAt(l)===58?(u=G,l++):(u=t,g===0&&m(U)),u!==t){for(v=[],_=w();_!==t;)v.push(_),_=w();if(v!==t)if(i.charCodeAt(l)===123?(_=Me,l++):(_=t,g===0&&m(Er)),_!==t){for(L=[],z=w();z!==t;)L.push(z),z=w();L!==t?(z=Dt(),z!==t?(fe=jt(),fe!==t?(i.charCodeAt(l)===125?(W=kr,l++):(W=t,g===0&&m(Pr)),W!==t?(A=r,a=ka(a,z,fe),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;else l=r,r=t}else l=r,r=t;else l=r,r=t}else l=r,r=t;return r===t&&(r=zl()),r}function zl(){var r;return r=jl(),r===t&&(r=Bl(),r===t&&(r=Rl())),r}function Br(){var r;return g++,r=Hr(),g--,r===t&&g===0&&m(Pa),r}function jl(){var r,a,p,u,v,_;if(r=l,a=Br(),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();if(p!==t)if(u=Os(),u!==t){for(v=[],_=w();_!==t;)v.push(_),_=w();v!==t?(_=Hr(),_!==t?(A=r,a=Ta(a,u,_),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;else l=r,r=t}else l=r,r=t;return r}function Bl(){var r,a,p,u,v,_;if(r=l,a=Br(),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();if(p!==t)if(i.charCodeAt(l)===58?(u=G,l++):(u=t,g===0&&m(U)),u!==t){for(v=[],_=w();_!==t;)v.push(_),_=w();v!==t?(_=Rr(),_!==t?(A=r,a=Oa(a,_),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;else l=r,r=t}else l=r,r=t;return r}function Rl(){var r,a;return r=l,a=ks(),a!==t&&(A=r,a=Da(a)),r=a,r}function Rr(){var r,a,p,u,v,_;if(r=l,i.charCodeAt(l)===40?(a=C,l++):(a=t,g===0&&m(k)),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();p!==t?(u=Cs(),u!==t?(v=jt(),v!==t?(i.charCodeAt(l)===41?(_=N,l++):(_=t,g===0&&m(R)),_!==t?(A=r,a=La(u,v),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;return r===t&&(r=ks()),r}function Cs(){var r,a,p,u;return r=l,a=Mr(),a!==t?(p=Lt(),p!==t?(u=Cs(),u!==t?(A=r,a=Na(a,u),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t),r===t&&(r=Mr()),r}function Mr(){var r,a,p,u;return r=l,a=Es(),a!==t?(p=Nt(),p!==t?(u=Mr(),u!==t?(A=r,a=za(a,u),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t),r===t&&(r=Es()),r}function Es(){var r,a,p;return r=l,a=Ir(),a!==t?(p=Rr(),p!==t?(A=r,a=ja(p),r=a):(l=r,r=t)):(l=r,r=t),r===t&&(r=Rr()),r}function ks(){var r,a;return g++,r=l,a=zt(),a!==t&&(A=r,a=Ra(a)),r=a,r===t&&(r=l,a=Ps(),a!==t&&(A=r,a=Ma(a)),r=a),g--,r===t&&(a=t,g===0&&m(Ba)),r}function Lt(){var r,a,p,u,v;if(g++,r=l,a=[],p=w(),p!==t)for(;p!==t;)a.push(p),p=w();else a=t;if(a!==t)if(i.substr(l,2).toLowerCase()===zi?(p=i.substr(l,2),l+=2):(p=t,g===0&&m(ji)),p!==t){if(u=[],v=w(),v!==t)for(;v!==t;)u.push(v),v=w();else u=t;u!==t?(a=[a,p,u],r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r===t&&(r=l,A=l,a=y(),a?a=void 0:a=t,a!==t?(p=Ds(),p!==t?(a=[a,p],r=a):(l=r,r=t)):(l=r,r=t)),g--,r===t&&(a=t,g===0&&m(Ia)),r}function Nt(){var r,a,p,u,v;if(g++,r=l,a=[],p=w(),p!==t)for(;p!==t;)a.push(p),p=w();else a=t;if(a!==t)if(i.substr(l,3).toLowerCase()===Bi?(p=i.substr(l,3),l+=3):(p=t,g===0&&m(Ri)),p!==t){if(u=[],v=w(),v!==t)for(;v!==t;)u.push(v),v=w();else u=t;u!==t?(a=[a,p,u],r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r===t&&(r=l,A=l,a=y(),a?a=void 0:a=t,a!==t?(p=Ls(),p!==t?(a=[a,p],r=a):(l=r,r=t)):(l=r,r=t)),g--,r===t&&(a=t,g===0&&m(Ha)),r}function Ir(){var r,a,p,u;if(g++,r=l,i.substr(l,3).toLowerCase()===Mi?(a=i.substr(l,3),l+=3):(a=t,g===0&&m(Ii)),a!==t){if(p=[],u=w(),u!==t)for(;u!==t;)p.push(u),u=w();else p=t;p!==t?(a=[a,p],r=a):(l=r,r=t)}else l=r,r=t;return r===t&&(r=l,A=l,a=y(),a?a=void 0:a=t,a!==t?(p=Ns(),p!==t?(a=[a,p],r=a):(l=r,r=t)):(l=r,r=t)),g--,r===t&&(a=t,g===0&&m(Ua)),r}function Hr(){var r;return g++,r=zt(),r===t&&(r=Ps()),g--,r===t&&g===0&&m(Fa),r}function zt(){var r,a,p,u,v,_;if(r=l,i.charCodeAt(l)===34?(a=st,l++):(a=t,g===0&&m(nt)),a!==t){for(p=[],u=Ue();u!==t;)p.push(u),u=Ue();if(p!==t)if(u=lt(),u!==t){for(v=[],_=Ue();_!==t;)v.push(_),_=Ue();v!==t?(i.charCodeAt(l)===34?(_=st,l++):(_=t,g===0&&m(nt)),_!==t?(A=r,a=Tr(p,u,v),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;else l=r,r=t}else l=r,r=t;if(r===t)if(r=l,i.charCodeAt(l)===34?(a=st,l++):(a=t,g===0&&m(nt)),a!==t){for(p=[],u=Ue();u!==t;)p.push(u),u=Ue();p!==t?(i.charCodeAt(l)===34?(u=st,l++):(u=t,g===0&&m(nt)),u!==t?(A=r,a=Qa(p),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;return r}function Ue(){var r,a,p;return r=Ur(),r===t&&(r=l,i.charCodeAt(l)===92?(a=ot,l++):(a=t,g===0&&m(at)),a!==t?(qa.test(i.charAt(l))?(p=i.charAt(l),l++):(p=t,g===0&&m(Wa)),p!==t?(A=r,a=Ct(p),r=a):(l=r,r=t)):(l=r,r=t),r===t&&(r=l,a=l,g++,p=lt(),g--,p===t?a=void 0:(l=a,a=t),a!==t?(Va.test(i.charAt(l))?(p=i.charAt(l),l++):(p=t,g===0&&m(Ya)),p!==t?(A=r,a=Ct(p),r=a):(l=r,r=t)):(l=r,r=t))),r}function Ps(){var r,a,p,u,v;for(r=l,a=[],p=Fe();p!==t;)a.push(p),p=Fe();if(a!==t)if(p=lt(),p!==t){for(u=[],v=Fe();v!==t;)u.push(v),v=Fe();u!==t?(A=r,a=Tr(a,p,u),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;if(r===t){if(r=l,a=[],p=Fe(),p!==t)for(;p!==t;)a.push(p),p=Fe();else a=t;a!==t&&(A=r,a=Ka(a)),r=a}return r}function Fe(){var r,a,p,u,v;return r=Ur(),r===t&&(r=Il(),r===t&&(r=Hl(),r===t&&(r=Ml(),r===t&&(r=l,a=l,g++,p=Ts(),g--,p===t?a=void 0:(l=a,a=t),a!==t?(p=l,g++,u=Ul(),g--,u===t?p=void 0:(l=p,p=t),p!==t?(u=l,g++,v=lt(),g--,v===t?u=void 0:(l=u,u=t),u!==t?(i.length>l?(v=i.charAt(l),l++):(v=t,g===0&&m(Hi)),v!==t?(A=r,a=Ct(v),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)):(l=r,r=t))))),r}function Ml(){var r,a;return r=l,i.charCodeAt(l)===42?(a=Et,l++):(a=t,g===0&&m(kt)),a!==t&&(A=r,a=Za()),r=a,r}function jt(){var r,a,p,u,v;for(r=l,a=[],p=w();p!==t;)a.push(p),p=w();if(a!==t)if(p=lt(),p!==t){for(u=[],v=w();v!==t;)u.push(v),v=w();u!==t?(A=r,a=Tr(a,p,u),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;if(r===t)for(r=[],a=w();a!==t;)r.push(a),a=w();return r}function Ur(){var r,a;return r=l,i.substr(l,2)===Ui?(a=Ui,l+=2):(a=t,g===0&&m(Xa)),a!==t&&(A=r,a=Ga()),r=a,r===t&&(r=l,i.substr(l,2)===Fi?(a=Fi,l+=2):(a=t,g===0&&m(Ja)),a!==t&&(A=r,a=el()),r=a,r===t&&(r=l,i.substr(l,2)===Qi?(a=Qi,l+=2):(a=t,g===0&&m(tl)),a!==t&&(A=r,a=rl()),r=a)),r}function Il(){var r,a,p;return r=l,i.charCodeAt(l)===92?(a=ot,l++):(a=t,g===0&&m(at)),a!==t?(p=Ts(),p!==t?(A=r,a=Ct(p),r=a):(l=r,r=t)):(l=r,r=t),r}function Hl(){var r,a,p;return r=l,i.charCodeAt(l)===92?(a=ot,l++):(a=t,g===0&&m(at)),a!==t?(i.substr(l,2).toLowerCase()===zi?(p=i.substr(l,2),l+=2):(p=t,g===0&&m(ji)),p===t&&(i.substr(l,3).toLowerCase()===Bi?(p=i.substr(l,3),l+=3):(p=t,g===0&&m(Ri)),p===t&&(i.substr(l,3).toLowerCase()===Mi?(p=i.substr(l,3),l+=3):(p=t,g===0&&m(Ii)))),p!==t?(A=r,a=il(p),r=a):(l=r,r=t)):(l=r,r=t),r}function Ul(){var r;return r=Lt(),r===t&&(r=Nt(),r===t&&(r=Ir())),r}function Ts(){var r;return sl.test(i.charAt(l))?(r=i.charAt(l),l++):(r=t,g===0&&m(nl)),r}function Os(){var r,a;return r=l,i.substr(l,2)===qi?(a=qi,l+=2):(a=t,g===0&&m(ol)),a!==t&&(A=r,a=al()),r=a,r===t&&(r=l,i.substr(l,2)===Wi?(a=Wi,l+=2):(a=t,g===0&&m(ll)),a!==t&&(A=r,a=cl()),r=a,r===t&&(r=l,i.charCodeAt(l)===60?(a=Vi,l++):(a=t,g===0&&m(Yi)),a!==t&&(A=r,a=pl()),r=a,r===t&&(r=l,i.charCodeAt(l)===62?(a=Ki,l++):(a=t,g===0&&m(Zi)),a!==t&&(A=r,a=ul()),r=a))),r}function w(){var r;return g++,dl.test(i.charAt(l))?(r=i.charAt(l),l++):(r=t,g===0&&m(fl)),g--,r===t&&g===0&&m(hl),r}function lt(){var r,a,p;return r=l,A=l,a=gl(),a?a=void 0:a=t,a!==t?(i.substr(l,14)===Xi?(p=Xi,l+=14):(p=t,g===0&&m(vl)),p!==t?(A=r,a=bl(),r=a):(l=r,r=t)):(l=r,r=t),r}function Ds(){var r,a,p,u,v;for(r=l,a=[],p=w();p!==t;)a.push(p),p=w();if(a!==t)if(i.substr(l,2)===Gi?(p=Gi,l+=2):(p=t,g===0&&m(ml)),p!==t){for(u=[],v=w();v!==t;)u.push(v),v=w();u!==t?(A=r,a=yl(),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r}function Ls(){var r,a,p,u,v;for(r=l,a=[],p=w();p!==t;)a.push(p),p=w();if(a!==t)if(i.substr(l,2)===Ji?(p=Ji,l+=2):(p=t,g===0&&m($l)),p!==t){for(u=[],v=w();v!==t;)u.push(v),v=w();u!==t?(A=r,a=es(),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r===t&&(r=l,i.charCodeAt(l)===43?(a=ts,l++):(a=t,g===0&&m(rs)),a!==t&&(A=r,a=es()),r=a),r}function Ns(){var r,a;return r=l,i.charCodeAt(l)===45?(a=is,l++):(a=t,g===0&&m(ss)),a!==t&&(A=r,a=ns()),r=a,r===t&&(r=l,i.charCodeAt(l)===33?(a=os,l++):(a=t,g===0&&m(as)),a!==t&&(A=r,a=ns()),r=a),r}function Fl(){var r;return r=Ql(),r===t&&(r=zs(),r===t&&(r=ql())),r}function Ql(){var r,a,p,u,v,_;if(r=l,a=Qe(),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();if(p!==t)if(i.charCodeAt(l)===58?(u=G,l++):(u=t,g===0&&m(U)),u!==t){for(v=[],_=w();_!==t;)v.push(_),_=w();v!==t?(_=zs(),_!==t?(a=[a,p,u,v,_],r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;else l=r,r=t}else l=r,r=t;return r}function zs(){var r;return r=Wl(),r===t&&(r=Fr(),r===t&&(r=Vl(),r===t&&(r=Yl(),r===t&&(r=Kl(),r===t&&(r=Zl()))))),r}function ql(){var r,a,p,u,v,_;if(r=l,i.substr(l,8)===ls?(a=ls,l+=8):(a=t,g===0&&m(wl)),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();if(p!==t)if(i.charCodeAt(l)===58?(u=G,l++):(u=t,g===0&&m(U)),u!==t){for(v=[],_=w();_!==t;)v.push(_),_=w();v!==t?(_=Qe(),_!==t?(A=r,a=_l(),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;else l=r,r=t}else l=r,r=t;return r}function Wl(){var r,a,p,u,v,_,L;if(r=l,a=Os(),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();p!==t?(u=Qe(),u!==t?(A=r,a=cs(),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;if(r===t)if(r=l,a=Jl(),a!==t){for(p=[],u=w();u!==t;)p.push(u),u=w();p!==t?(u=Qe(),u!==t?(v=Rs(),v!==t?(_=Qe(),_!==t?(L=ec(),L!==t?(A=r,a=cs(),r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;return r}function Fr(){var r,a,p,u,v;for(r=l,a=[],p=Bt(),p===t&&(i.charCodeAt(l)===42?(p=Et,l++):(p=t,g===0&&m(kt)));p!==t;)a.push(p),p=Bt(),p===t&&(i.charCodeAt(l)===42?(p=Et,l++):(p=t,g===0&&m(kt)));if(a!==t)if(i.charCodeAt(l)===63?(p=ps,l++):(p=t,g===0&&m(us)),p!==t){for(u=[],v=Fr();v!==t;)u.push(v),v=Fr();u!==t?(A=r,a=Sl(),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r}function Vl(){var r,a,p,u;if(r=l,i.charCodeAt(l)===47?(a=Or,l++):(a=t,g===0&&m(Dr)),a!==t){for(p=[],hs.test(i.charAt(l))?(u=i.charAt(l),l++):(u=t,g===0&&m(ds));u!==t;)p.push(u),hs.test(i.charAt(l))?(u=i.charAt(l),l++):(u=t,g===0&&m(ds));p!==t?(i.charCodeAt(l)===47?(u=Or,l++):(u=t,g===0&&m(Dr)),u!==t?(A=r,a=Al(),r=a):(l=r,r=t)):(l=r,r=t)}else l=r,r=t;return r}function Yl(){var r,a,p,u,v;if(r=l,a=js(),a!==t)if(i.charCodeAt(l)===126?(p=Lr,l++):(p=t,g===0&&m(Nr)),p!==t){for(u=[],Ie.test(i.charAt(l))?(v=i.charAt(l),l++):(v=t,g===0&&m(He));v!==t;)u.push(v),Ie.test(i.charAt(l))?(v=i.charAt(l),l++):(v=t,g===0&&m(He));u!==t?(A=r,a=xl(),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r}function Kl(){var r,a,p,u,v;if(r=l,a=zt(),a!==t)if(i.charCodeAt(l)===126?(p=Lr,l++):(p=t,g===0&&m(Nr)),p!==t){for(u=[],Ie.test(i.charAt(l))?(v=i.charAt(l),l++):(v=t,g===0&&m(He));v!==t;)u.push(v),Ie.test(i.charAt(l))?(v=i.charAt(l),l++):(v=t,g===0&&m(He));u!==t?(A=r,a=Cl(),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r}function Zl(){var r,a,p,u,v;if(r=l,a=Qe(),a!==t)if(i.charCodeAt(l)===94?(p=fs,l++):(p=t,g===0&&m(gs)),p!==t){for(u=[],Ie.test(i.charAt(l))?(v=i.charAt(l),l++):(v=t,g===0&&m(He));v!==t;)u.push(v),Ie.test(i.charAt(l))?(v=i.charAt(l),l++):(v=t,g===0&&m(He));u!==t?(A=r,a=El(),r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r}function Qe(){var r;return r=zt(),r===t&&(r=js()),r}function js(){var r,a;if(r=[],a=Bt(),a!==t)for(;a!==t;)r.push(a),a=Bt();else r=t;return r}function Bt(){var r,a,p,u;return r=Ur(),r===t&&(r=Gl(),r===t&&(r=l,a=l,g++,p=Bs(),g--,p===t?a=void 0:(l=a,a=t),a!==t?(p=l,g++,u=Xl(),g--,u===t?p=void 0:(l=p,p=t),p!==t?(i.length>l?(u=i.charAt(l),l++):(u=t,g===0&&m(Hi)),u!==t?(a=[a,p,u],r=a):(l=r,r=t)):(l=r,r=t)):(l=r,r=t))),r}function Xl(){var r;return r=Lt(),r===t&&(r=Nt(),r===t&&(r=Ds(),r===t&&(r=Ls(),r===t&&(r=Ns(),r===t&&(r=Rs()))))),r}function Gl(){var r,a,p;return r=l,i.charCodeAt(l)===92?(a=ot,l++):(a=t,g===0&&m(at)),a!==t?(p=Bs(),p!==t?(A=r,a=kl(),r=a):(l=r,r=t)):(l=r,r=t),r}function Bs(){var r;return i.charCodeAt(l)===43?(r=ts,l++):(r=t,g===0&&m(rs)),r===t&&(i.charCodeAt(l)===45?(r=is,l++):(r=t,g===0&&m(ss)),r===t&&(i.charCodeAt(l)===61?(r=Pl,l++):(r=t,g===0&&m(Tl)),r===t&&(i.charCodeAt(l)===62?(r=Ki,l++):(r=t,g===0&&m(Zi)),r===t&&(i.charCodeAt(l)===60?(r=Vi,l++):(r=t,g===0&&m(Yi)),r===t&&(i.charCodeAt(l)===33?(r=os,l++):(r=t,g===0&&m(as)),r===t&&(i.charCodeAt(l)===40?(r=C,l++):(r=t,g===0&&m(k)),r===t&&(i.charCodeAt(l)===41?(r=N,l++):(r=t,g===0&&m(R)),r===t&&(i.charCodeAt(l)===123?(r=Me,l++):(r=t,g===0&&m(Er)),r===t&&(i.charCodeAt(l)===125?(r=kr,l++):(r=t,g===0&&m(Pr)),r===t&&(i.charCodeAt(l)===91?(r=vs,l++):(r=t,g===0&&m(bs)),r===t&&(i.charCodeAt(l)===93?(r=ms,l++):(r=t,g===0&&m(ys)),r===t&&(i.charCodeAt(l)===94?(r=fs,l++):(r=t,g===0&&m(gs)),r===t&&(i.charCodeAt(l)===34?(r=st,l++):(r=t,g===0&&m(nt)),r===t&&(i.charCodeAt(l)===126?(r=Lr,l++):(r=t,g===0&&m(Nr)),r===t&&(i.charCodeAt(l)===42?(r=Et,l++):(r=t,g===0&&m(kt)),r===t&&(i.charCodeAt(l)===63?(r=ps,l++):(r=t,g===0&&m(us)),r===t&&(i.charCodeAt(l)===58?(r=G,l++):(r=t,g===0&&m(U)),r===t&&(i.charCodeAt(l)===92?(r=ot,l++):(r=t,g===0&&m(at)),r===t&&(i.charCodeAt(l)===47?(r=Or,l++):(r=t,g===0&&m(Dr))))))))))))))))))))),r}function Rs(){var r,a,p,u,v;if(r=l,a=[],p=w(),p!==t)for(;p!==t;)a.push(p),p=w();else a=t;if(a!==t)if(i.substr(l,2)===$s?(p=$s,l+=2):(p=t,g===0&&m(Ol)),p!==t){if(u=[],v=w(),v!==t)for(;v!==t;)u.push(v),v=w();else u=t;u!==t?(a=[a,p,u],r=a):(l=r,r=t)}else l=r,r=t;else l=r,r=t;return r}function Jl(){var r;return i.charCodeAt(l)===91?(r=vs,l++):(r=t,g===0&&m(bs)),r===t&&(i.charCodeAt(l)===123?(r=Me,l++):(r=t,g===0&&m(Er))),r}function ec(){var r;return i.charCodeAt(l)===93?(r=ms,l++):(r=t,g===0&&m(ys)),r===t&&(i.charCodeAt(l)===125?(r=kr,l++):(r=t,g===0&&m(Pr))),r}const{errorOnLuceneSyntax:tc,parseCursor:rc,cursorSymbol:ic,allowLeadingWildcards:sc=!0,helpers:{nodeTypes:Pe}}=o,ee=Pe.function.buildNodeWithArgumentNodes,de=Pe.literal.buildNode,nc=Pe.wildcard.buildNode,oc=Pe.namedArg.buildNode,{wildcardSymbol:Ms}=Pe.wildcard;if(Tt=d(),Tt!==t&&l===i.length)return Tt;throw Tt!==t&&l<i.length&&m({type:"end",description:"end of input"}),_s(null,zr,J<i.length?i.charAt(J):null,J<i.length?Ot(J,J+1):Ot(J,J))}return{SyntaxError:e,parse:n}}(),pr=(s,e={},n=$t)=>{if(typeof s>"u")throw new Error("expression must be a string, got undefined instead");return n(s,{...e,helpers:{nodeTypes:K}})},ze=(s,e={})=>pr(s,{...e,startRule:"Literal"},$t),wt=(s,e={})=>{try{return pr(s,e,$t)}catch(n){throw n.name==="SyntaxError"?new yi(n,s):n}},zn=s=>{try{return pr(s,{errorOnLuceneSyntax:!0},$t),!1}catch(e){return e.message.startsWith("Lucene")}},j=(s,e,n,i)=>(e=void 0,!s||!s.type||!K[s.type]?j(K.function.buildNode("and",[]),e):K[s.type].toOpenSearchQuery(s,e,n,i)),re="@kuery-wildcard@";function jn(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bn(s){return s.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g,"\\$&")}function Rn(s){return s.includes(re)?{type:"wildcard",value:s}:ze(s)}function $i(s,e){const{value:n}=s,i=n.split(re).map(jn).join("[\\s\\S]*");return new RegExp(`^${i}$`).test(e)}function Mn(s){const{value:e}=s;return e.split(re).join("*")}function ur(s){const{value:e}=s;return e.split(re).map(Bn).join("*")}function In(s){const{value:e}=s;return e.startsWith(re)&&e.replace(re,"").length>0}const Hn=Object.freeze(Object.defineProperty({__proto__:null,buildNode:Rn,hasLeadingWildcard:In,test:$i,toOpenSearchQuery:Mn,toQueryStringQuery:ur,wildcardSymbol:re},Symbol.toStringTag,{value:"Module"}));function hr(s,e){if(!e)return[];if(s.type==="literal"){const n=cr(s),i=e.fields.find(o=>o.name===n);return i?[i]:[]}else if(s.type==="wildcard")return e.fields.filter(i=>$i(s,i.name))}function cc(s){return s}function wi(s,e,n){const i={...s,value:n?`${n}.${s.value}`:s.value};if(!e||i.type==="wildcard"&&!n)return i;const t=hr(i,e).reduce((c,d)=>{const f=d.subType&&d.subType.nested?d.subType.nested.path:void 0;return n&&!f?[...c,`${d.name} is not a nested field but is in nested group "${n}" in the DQL expression.`]:f&&!n?[...c,`${d.name} is a nested field, but is not in a nested group in the DQL expression.`]:f!==n?[...c,`Nested field ${d.name} is being queried with the incorrect nested path. The correct path is ${d.subType.nested.path}.`]:c},[]);if(t.length>0)throw new Error(t.join(`
750
+ `));return i}function Un(s,e,n=!1){if(s===void 0)throw new Error("fieldName is a required argument");if(e===void 0)throw new Error("value is a required argument");const i=typeof s=="string"?ze(s):Ne(s),o=typeof e=="string"?ze(e):Ne(e),t=Ne(n);return{arguments:[i,o,t]}}function Fn(s,e,n={},i={}){const{arguments:[o,t,c]}=s,d=wi(o,e,i!=null&&i.nested?i.nested.path:void 0),f=j(d),y=t!==void 0?j(t):t,x=c.value?"phrase":"best_fields";if(d.value===null)return t.type==="wildcard"?{query_string:{query:ur(t)}}:{multi_match:{type:x,query:y,lenient:!0}};const $=e?hr(d,e):[];$&&$.length===0&&$.push({name:j(d),scripted:!1,type:""});const E=t.type==="wildcard"&&y==="*",C=d.type==="wildcard"&&f==="*"||$&&e&&$.length===e.fields.length;return E&&C?{match_all:{}}:{bool:{should:$.reduce((R,M)=>{const G=U=>{var Me;return d.type!=="wildcard"||!((Me=M.subType)!=null&&Me.nested)||i!=null&&i.nested?U:{nested:{path:M.subType.nested.path,query:U,score_mode:"none"}}};if(M.scripted)return[];if(E)return[...R,G({exists:{field:M.name}})];if(t.type==="wildcard")return[...R,G({query_string:{fields:[M.name],query:ur(t)}})];if(M.type==="date"){const U=n.dateFormatTZ?{time_zone:n.dateFormatTZ}:{};return[...R,G({range:{[M.name]:{gte:y,lte:y,...U}}})]}else{const U=x==="phrase"?"match_phrase":"match";return[...R,G({[U]:{[M.name]:y}})]}},[])||[],minimum_should_match:1}}}const Qn=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Un,toOpenSearchQuery:Fn},Symbol.toStringTag,{value:"Module"}));function qn(s){return{arguments:s}}function Wn(s,e,n={},i={}){return{bool:{filter:(s.arguments||[]).map(t=>j(t,e,n,i))}}}const Vn=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:qn,toOpenSearchQuery:Wn},Symbol.toStringTag,{value:"Module"}));function Yn(s){return{arguments:s}}function Kn(s,e,n={},i={}){return{bool:{should:(s.arguments||[]).map(t=>j(t,e,n,i)),minimum_should_match:1}}}const Zn=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Yn,toOpenSearchQuery:Kn},Symbol.toStringTag,{value:"Module"}));function Xn(s){return{arguments:[s]}}function Gn(s,e,n={},i={}){const[o]=s.arguments;return{bool:{must_not:j(o,e,n,i)}}}const Jn=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:Xn,toOpenSearchQuery:Gn},Symbol.toStringTag,{value:"Module"}));function eo(s,...e){let n={};for(let i of e)n[i]=s[i];return n}function to(s,e){const n=eo(e,"gt","lt","gte","lte","format"),i=typeof s=="string"?ze(s):K.literal.buildNode(s),o=Object.entries(n).map(t=>{let[c,d]=t;return K.namedArg.buildNode(c,d)});return{arguments:[i,...o]}}function ro(s,e,n={},i={}){const[o,...t]=s.arguments,c=wi(o,e,i!=null&&i.nested?i.nested.path:void 0),d=e?hr(c,e):[],f=io(t),y=Object.fromEntries(Object.entries(f).map(([$,E])=>[$,j(E)]));return d&&d.length===0&&d.push({name:j(c),scripted:!1,type:""}),{bool:{should:d.map($=>{const E=C=>{var k;return c.type!=="wildcard"||!((k=$.subType)!=null&&k.nested)||i.nested?C:{nested:{path:$.subType.nested.path,query:C,score_mode:"none"}}};if($.scripted)return{};if($.type==="date"){const C=n.dateFormatTZ?{time_zone:n.dateFormatTZ}:{};return E({range:{[$.name]:{...y,...C}}})}return E({range:{[$.name]:y}})}),minimum_should_match:1}}}function io(s){if(s.gt&&s.gte||s.lt&&s.lte)throw new Error("range ends cannot be both inclusive and exclusive");const e=["gte","lte","format"];return s.reduce((n,i,o)=>(i.type==="namedArg"?n[i.name]=i.value:n[e[o]]=i,n),{})}const so=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:to,toOpenSearchQuery:ro},Symbol.toStringTag,{value:"Module"}));function no(s){return{arguments:[Ne(s)]}}function oo(s,e,n={},i={}){const{arguments:[o]}=s,t={...o,value:i!=null&&i.nested?`${i.nested.path}.${o.value}`:o.value},c=cr(t),d=((e==null?void 0:e.fields)||[]).find(f=>f.name===c);if(d&&d.scripted)throw new Error("Exists query does not support scripted fields");return{exists:{field:c}}}const ao=Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:no,toOpenSearchQuery:oo},Symbol.toStringTag,{value:"Module"}));function lo(s,e){return{arguments:[typeof s=="string"?ze(s):Ne(s),e]}}function co(s,e,n={},i={}){var f;const[o,t]=s.arguments,c=j(o),d=(f=i==null?void 0:i.nested)!=null&&f.path?`${i.nested.path}.${c}`:c;return{nested:{path:d,query:j(t,e,n,{...i,nested:{path:d}}),score_mode:"none"}}}const dr={is:Qn,and:Vn,or:Zn,not:Jn,range:so,exists:ao,nested:Object.freeze(Object.defineProperty({__proto__:null,buildNodeParams:lo,toOpenSearchQuery:co},Symbol.toStringTag,{value:"Module"}))};function po(s,...e){const n=dr[s];if(n===void 0)throw new Error(`Unknown function "${s}"`);return{type:"function",function:s,...n.buildNodeParams(...e)}}function uo(s,e){if(dr[s]===void 0)throw new Error(`Unknown function "${s}"`);return{type:"function",function:s,arguments:e}}function ho(s,e,n,i){return dr[s.function].toOpenSearchQuery(s,e,n,i)}const fo=Object.freeze(Object.defineProperty({__proto__:null,buildNode:po,buildNodeWithArgumentNodes:uo,toOpenSearchQuery:ho},Symbol.toStringTag,{value:"Module"}));function go(s,e){const n=e.type==="literal"?e:K.literal.buildNode(e);return{type:"namedArg",name:s,value:n}}function vo(s){return j(s.value)}const K={function:fo,literal:Nn,namedArg:Object.freeze(Object.defineProperty({__proto__:null,buildNode:go,toOpenSearchQuery:vo},Symbol.toStringTag,{value:"Module"})),wildcard:Hn},bo=re,mo=(s,e)=>"("+(s.arguments||[]).map(i=>xe(i,e)).join(" AND ")+")",yo=(s,e)=>{var{arguments:[n,i,o]}=s;let t="=";i.type==="wildcard"&&(t="");let c=xe(i);o=o.value||typeof c=="string",i.type==="literal"&&o&&(c=`'${c}'`),i.type==="literal"&&!o&&(c=`${c}`);let d=xe(n);return d==null?e&&o?`(${e.filter(f=>f.type==="string").map(f=>`${f.name} ILIKE '%${i.value}%'`).join(" OR ")})`:e&&!o&&(i.value===!0||i.value===!1)?`(${e.filter(f=>f.type==="boolean").map(f=>`${f.name}=${i.value}`).join(" OR ")})`:"":d+t+c},$o=(s,e)=>"("+(s.arguments||[]).map(i=>xe(i,e)).join(" OR ")+")",wo=(s,e)=>{const[n]=s.arguments;return"NOT ("+xe(n,e)+")"},_o={gt:">",lt:"<",gte:">=",lte:"<="},So={is:yo,and:mo,or:$o,not:wo,range:s=>{const[e,n]=s.arguments;let i=n.value;const o=_o[n.name];let t=xe(i);return i.type==="literal"&&(t=`${t}`),`${e.value} ${o} ${t}`},exists:s=>{const[e]=s.arguments;return`${e.value} IS NOT NULL`},nested:s=>(console.warn("Nested types dont exist in CQL",s),"")},Ao={function:(s,e)=>So[s.function](s,e),literal:s=>s.value,wildcard:s=>{const{value:e}=s;return` LIKE '${e.split(bo).join("%")}'`}},xe=(s,e)=>{const n=Ao[s.type];return n(s,e)},xo=re,Co=s=>({$and:(s.arguments||[]).map(i=>le(i))}),Eo=s=>{const{arguments:[e,n]}=s;let i=le(n);if(n.type==="wildcard"&&n.value==="@kuery-wildcard@")return _i(s);let t={};return t[le(e)]={$eq:i},t},ko=s=>({$or:(s.arguments||[]).map(n=>le(n))}),Po=s=>{const[e]=s.arguments;let n={};return n={$ne:le(e)},n},To={gt:"$gt",lt:"$lt",gte:"$gte",lte:"$lte"},Oo=s=>{const[e,n]=s.arguments;let i=n.value;const o=To[n.name];let t=le(i),c={};return c[e.value]={},c[e.value][o]=t,c},_i=s=>{const[e]=s.arguments;return{[le(e)]:{$ne:null}}},Do={is:Eo,and:Co,or:ko,not:Po,range:Oo,exists:_i,nested:s=>(console.warn("TODO Implement nested search",s),"")},Lo={function:s=>Do[s.function](s),literal:s=>s.value,wildcard:s=>{const{value:e}=s;return`/${e.split(xo).join(".*")}/`}},le=(s,e)=>{const n=Lo[s.type];return n(s,e)},No=Object.freeze(Object.defineProperty({__proto__:null,DQLSyntaxError:yi,doesKueryExpressionHaveLuceneSyntaxError:zn,fromKueryExpression:wt,fromLiteralExpression:ze,nodeTypes:K,parse:wt,toCql:xe,toDSL:j,toMongo:le,toOpenSearchQuery:j},Symbol.toStringTag,{value:"Module"})),zo=I`
728
751
  :host {
729
752
  --dialog-padding: var(--spectric-dialog-padding, 5px);
730
753
  --dialog-background:var(--spectric-background,rgb(246, 249, 252));
@@ -771,11 +794,11 @@ spectric-button{
771
794
  right: 0;
772
795
  top: 0;
773
796
  }
774
- `;var xn=Object.defineProperty,En=Object.getOwnPropertyDescriptor,oe=(o,t,s,i)=>{for(var n=i>1?void 0:i?En(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&xn(t,s,n),n};const tr="spectric-dialog";d.DialogElement=class extends O{constructor(){super(...arguments),this.open=!1,this.dismissable=!0,this.hideBackdrop=!1,this.title="",this.closeOnEscape=!0,this.closeOnOutsideClick=!0,this.clickHandler=async t=>{const s=await this.dialogElement;!this.dismissable||!this.closeOnOutsideClick||s===t.target&&(this.open=!1)},this._handleKeyDown=t=>{this.closeOnEscape||t.preventDefault(),this.open&&this.closeOnEscape&&t.key==="Escape"&&(this.open=!1)},this._onClose=t=>{t.preventDefault(),t.stopPropagation(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static display(t,s){let i=document.createElement(tr);i.addEventListener("close",()=>{i.remove()});for(let e in t)i[e]=t[e];let n=document.createDocumentFragment();return We(s,n),i.appendChild(n),i.open=!0,document.body.appendChild(i),i}connectedCallback(){super.connectedCallback(),this.dialogElement.then(t=>t.addEventListener("keydown",this._handleKeyDown))}disconnectedCallback(){super.disconnectedCallback(),this.dialogElement.then(t=>t.removeEventListener("keydown",this._handleKeyDown))}updated(t){t.has("open")&&this.dialogElement.then(s=>{this.open?s.showModal():s.close()})}render(){return A`
797
+ `;var jo=Object.defineProperty,Bo=Object.getOwnPropertyDescriptor,ce=(s,e,n,i)=>{for(var o=i>1?void 0:i?Bo(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&jo(e,n,o),o};const _t="spectric-dialog";h.DialogElement=class extends D{constructor(){super(...arguments),this.open=!1,this.dismissable=!0,this.hideBackdrop=!1,this.title="",this.closeOnEscape=!0,this.closeOnOutsideClick=!0,this.clickHandler=async e=>{const n=await this.dialogElement;!this.dismissable||!this.closeOnOutsideClick||n===e.target&&(this.open=!1)},this._handleKeyDown=e=>{this.closeOnEscape||e.preventDefault(),this.open&&this.closeOnEscape&&e.key==="Escape"&&(this.open=!1)},this._onClose=e=>{e.preventDefault(),e.stopPropagation(),this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static display(e,n){let i=document.createElement(_t);i.addEventListener("close",()=>{i.remove()});for(let t in e)i[t]=e[t];let o=document.createDocumentFragment();return Ge(n,o),i.appendChild(o),i.open=!0,document.body.appendChild(i),i}connectedCallback(){super.connectedCallback(),this.dialogElement.then(e=>e.addEventListener("keydown",this._handleKeyDown))}disconnectedCallback(){super.disconnectedCallback(),this.dialogElement.then(e=>e.removeEventListener("keydown",this._handleKeyDown))}updated(e){e.has("open")&&this.dialogElement.then(n=>{this.open?n.showModal():n.close()})}render(){return S`
775
798
  <dialog class=${this.hideBackdrop?"":"backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
776
799
  <spectric-panel>
777
800
  <div class="modal">
778
- ${this.dismissable?A`<spectric-button variant="text" size="small" @click=${()=>{this.open=!1}}>X</spectric-button>`:null}
801
+ ${this.dismissable?S`<spectric-button variant="text" size="small" @click=${()=>{this.open=!1}}>X</spectric-button>`:null}
779
802
  <h3 >
780
803
  <slot name="title">
781
804
  ${this.title.length?this.title:null}
@@ -787,17 +810,17 @@ spectric-button{
787
810
  </div>
788
811
  </spectric-panel>
789
812
  </dialog>
790
- `}},d.DialogElement.styles=An,oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"open",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"dismissable",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"hideBackdrop",2),oe([v({type:String,reflect:!0})],d.DialogElement.prototype,"title",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnEscape",2),oe([v({type:Boolean,reflect:!0})],d.DialogElement.prototype,"closeOnOutsideClick",2),oe([at("dialog")],d.DialogElement.prototype,"dialogElement",2),d.DialogElement=oe([D(tr)],d.DialogElement);var Cn=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,V=(o,t,s,i)=>{for(var n=i>1?void 0:i?kn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Cn(t,s,n),n},si=(o=>(o.MONGO="toMongo",o.CQL="toCql",o.DSL="toDSL",o.AST="AST",o))(si||{});const oi={eq:{value:" : ",label:" equals some value"},gt:{value:" > ",label:" is greater than some value"},lt:{value:" < ",label:" is less than some value"},gte:{value:" >= ",label:" is greater than or equal to some value"},lte:{value:" <= ",label:" is less than or equal to some value"}},Pn={eq:{value:": ",label:" equals some value"},exists:{value:": *",label:" exists in any form"}},Tn=[{value:": true",label:" value is true"},{value:": false",label:"value is false"}],On=Object.fromEntries(Object.entries(oi).map(([o,t])=>[o,{value:t.value,label:(t.label||"").replace("value","date-time")}]));d.SpectricQuery=class extends O{constructor(){super(),this.placeholder="",this._value="",this.value="",this.outputLanguage="AST",this.completions=[],this.completionIndex=0,this.fields=[],this._parseQuery=(t=void 0)=>{let s;if(t&&(t!=null&&t.currentTarget)&&(this.value=t.currentTarget.value),this.value)try{t&&t.data=="("&&(this.value=this.value+" )",this._input.setSelectionRange(this.value.length-2,this.value.length-2));let e=this.value;this._input.selectionStart!==null&&(e=e.substring(0,this._input.selectionStart)+"@kuery-cursor@"+e.substring(this._input.selectionStart));let p=bt(e,{parseCursor:!0,cursorSymbol:"@kuery-cursor@",allowLeadingWildcards:!1});this.autoComplete(p)}catch{return}try{s=bt(this.value,{allowLeadingWildcards:!1})}catch{return}let i;this.outputLanguage=="AST"?i=s:i=Sn[this.outputLanguage](s,this.fields);let n=new CustomEvent("change",{detail:i});this.dispatchEvent(n)},this.getValuesForField=async(t,s)=>(console.log("getValuesForField isn't set no values returned",t,s),[]),this._selectCompletion=async()=>{if(!this.suggestion)return;let t=this.completions[this.completionIndex],s=this.value.substring(0,t.start)+t.value,i=s.length,n=this.value.substring(t.end);if(t.value.includes(n)?this.value=s:this.value=s+this.value.substring(t.end),this._input.value=this.value,this._input.setSelectionRange(i,i),t.onSelect){let e=await t.onSelect();e!==void 0&&(this.value+=e,setTimeout(()=>{this._input.focus()}))}this.completionIndex=0,this.completions=[],this._parseQuery(),this._input.focus()},this._handleArrows=t=>{var s;t.key==="Escape"&&(this.completions=[]),(t.key=="ArrowLeft"||t.key==="ArrowRight")&&setTimeout(this._parseQuery,100),this.completions.length&&["ArrowUp","ArrowDown","Enter","Tab"].includes(t.key)&&this.suggestion&&(t.preventDefault(),(t.key==="ArrowDown"||t.key==="Tab")&&(this.completionIndex+=1,this.completionIndex>this.completions.length-1&&(this.completionIndex=0)),t.key==="ArrowUp"&&(this.completionIndex-=1,this.completionIndex<0&&(this.completionIndex=this.completions.length-1)),(s=this._asyncAutocomplete)==null||s.then(i=>{let n=i.querySelector(".option.active");n&&n.scrollIntoView({block:"nearest"})}),t.key==="Enter"&&this._selectCompletion())},this.uuid=crypto.randomUUID()}createRenderRoot(){return this}async autoComplete(t){if(this.completions=[],t.type!=="cursor")return;let s=[];this.suggestion=t;let{start:i,end:n}=t;for(let e of t.suggestionTypes){if(e=="conjunction"&&t.text.endsWith(" ")&&s.push(...["and ","or "].map(p=>({type:e,value:p,start:n,end:n}))),e==="field"){let p=this.fields.filter(h=>h.name.includes(t.fieldName)||h.name.includes(t.prefix)).map(h=>[{type:e,value:h.name,start:i,end:n}]).flat();s.push(...p)}if(e==="operator"){let p=this.fields.find(h=>h.name===t.fieldName);p&&(p.type==="number"?s.push(...Object.values(oi).map(h=>({type:e,...h,start:n,end:n}))):p.type==="string"?p.format==="date-time"?s.push(...Object.values(On).map(h=>({type:e,...h,start:n,end:n,onSelect:async()=>{let g=await this.getValuesForField(t.fieldName,t.prefix);g.length===0&&(g=["now-1m","now-1d","now-1M"]);let $,C=lt();return await new Promise(y=>{let E=d.DialogElement.display({},A`
813
+ `}},h.DialogElement.styles=zo,ce([b({type:Boolean,reflect:!0})],h.DialogElement.prototype,"open",2),ce([b({type:Boolean,reflect:!0})],h.DialogElement.prototype,"dismissable",2),ce([b({type:Boolean,reflect:!0})],h.DialogElement.prototype,"hideBackdrop",2),ce([b({type:String,reflect:!0})],h.DialogElement.prototype,"title",2),ce([b({type:Boolean,reflect:!0})],h.DialogElement.prototype,"closeOnEscape",2),ce([b({type:Boolean,reflect:!0})],h.DialogElement.prototype,"closeOnOutsideClick",2),ce([dt("dialog")],h.DialogElement.prototype,"dialogElement",2),h.DialogElement=ce([O(_t)],h.DialogElement);var Ro=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,Z=(s,e,n,i)=>{for(var o=i>1?void 0:i?Mo(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&Ro(e,n,o),o},fr=(s=>(s.MONGO="toMongo",s.CQL="toCql",s.DSL="toDSL",s.AST="AST",s))(fr||{});const Si={eq:{value:" : ",label:" equals some value"},gt:{value:" > ",label:" is greater than some value"},lt:{value:" < ",label:" is less than some value"},gte:{value:" >= ",label:" is greater than or equal to some value"},lte:{value:" <= ",label:" is less than or equal to some value"}},Io={eq:{value:": ",label:" equals some value"},exists:{value:": *",label:" exists in any form"}},Ho=[{value:": true",label:" value is true"},{value:": false",label:"value is false"}],Uo=Object.fromEntries(Object.entries(Si).map(([s,e])=>[s,{value:e.value,label:(e.label||"").replace("value","date-time")}]));h.SpectricQuery=class extends D{constructor(){super(),this.placeholder="",this._value="",this.value="",this.outputLanguage="AST",this.completions=[],this.completionIndex=0,this.fields=[],this._parseQuery=(e=void 0)=>{let n;if(e&&(e!=null&&e.currentTarget)&&(this.value=e.currentTarget.value),this.value)try{e&&e.data=="("&&(this.value=this.value+" )",this._input.setSelectionRange(this.value.length-2,this.value.length-2));let t=this.value;this._input.selectionStart!==null&&(t=t.substring(0,this._input.selectionStart)+"@kuery-cursor@"+t.substring(this._input.selectionStart));let c=wt(t,{parseCursor:!0,cursorSymbol:"@kuery-cursor@",allowLeadingWildcards:!1});this.autoComplete(c)}catch{return}try{n=wt(this.value,{allowLeadingWildcards:!1})}catch{return}let i;this.outputLanguage=="AST"?i=n:i=No[this.outputLanguage](n,this.fields);let o=new CustomEvent("change",{detail:i});this.dispatchEvent(o)},this.getValuesForField=async(e,n)=>(console.log("getValuesForField isn't set no values returned",e,n),[]),this._selectCompletion=async()=>{if(!this.suggestion)return;let e=this.completions[this.completionIndex],n=this.value.substring(0,e.start)+e.value,i=n.length,o=this.value.substring(e.end);if(e.value.includes(o)?this.value=n:this.value=n+this.value.substring(e.end),this._input.value=this.value,this._input.setSelectionRange(i,i),e.onSelect){let t=await e.onSelect();t!==void 0&&(this.value+=t,setTimeout(()=>{this._input.focus()}))}this.completionIndex=0,this.completions=[],this._parseQuery(),this._input.focus()},this._handleArrows=e=>{var n;e.key==="Escape"&&(this.completions=[]),(e.key=="ArrowLeft"||e.key==="ArrowRight")&&setTimeout(this._parseQuery,100),this.completions.length&&["ArrowUp","ArrowDown","Enter","Tab"].includes(e.key)&&this.suggestion&&(e.preventDefault(),(e.key==="ArrowDown"||e.key==="Tab")&&(this.completionIndex+=1,this.completionIndex>this.completions.length-1&&(this.completionIndex=0)),e.key==="ArrowUp"&&(this.completionIndex-=1,this.completionIndex<0&&(this.completionIndex=this.completions.length-1)),(n=this._asyncAutocomplete)==null||n.then(i=>{let o=i.querySelector(".option.active");o&&o.scrollIntoView({block:"nearest"})}),e.key==="Enter"&&this._selectCompletion())},this.uuid=crypto.randomUUID()}createRenderRoot(){return this}async autoComplete(e){if(this.completions=[],e.type!=="cursor")return;let n=[];this.suggestion=e;let{start:i,end:o}=e;for(let t of e.suggestionTypes){if(t=="conjunction"&&e.text.endsWith(" ")&&n.push(...["and ","or "].map(c=>({type:t,value:c,start:o,end:o}))),t==="field"){let c=this.fields.filter(d=>d.name.includes(e.fieldName)||d.name.includes(e.prefix)).map(d=>[{type:t,value:d.name,start:i,end:o}]).flat();n.push(...c)}if(t==="operator"){let c=this.fields.find(d=>d.name===e.fieldName);c&&(c.type==="number"?n.push(...Object.values(Si).map(d=>({type:t,...d,start:o,end:o}))):c.type==="string"?c.format==="date-time"?n.push(...Object.values(Uo).map(d=>({type:t,...d,start:o,end:o,onSelect:async()=>{let f=await this.getValuesForField(e.fieldName,e.prefix);f.length===0&&(f=["now-1m","now-1d","now-1M"]);let y,x=tt();return await new Promise($=>{let E=h.DialogElement.display({},S`
791
814
  <div class="query-bar-date-quick-select">
792
- ${g.map(x=>A`<a href="#" @click=${k=>{k.preventDefault(),$=`"${x}"`,y($),E.open=!1}}>${x}</a>`)}
815
+ ${f.map(C=>S`<a href="#" @click=${k=>{k.preventDefault(),y=`"${C}"`,$(y),E.open=!1}}>${C}</a>`)}
793
816
  </div>
794
- <spectric-input variant="datetime-local" @change=${x=>{if(!x.target)return;$=`"${new Date(x.target.value+":00.000Z").toISOString()}"`,C.value.disabled=$===void 0}}></spectric-input>
795
- <spectric-button ${pt(C)} .disabled=${!0} @click=${()=>{y($),E.open=!1}}>Submit</spectric-button>
796
- `)}),$}}))):s.push(...Object.values(Pn).map(h=>({type:e,...h,start:n,end:n}))):p.type==="boolean"&&s.push(...Tn.map(h=>({type:e,...h,start:n,end:n}))))}if(e==="value"){let p=this.fields.find(h=>h.name===t.fieldName);if(p&&p.type=="boolean")s.push({type:e,value:"true",start:i,end:n},{type:e,value:"false",start:i,end:n});else{console.log(`invoke callback to get values for ${t.fieldName}`);let h=await this.getValuesForField(t.fieldName,t.prefix);(p==null?void 0:p.type)==="string"&&(h=h.map(g=>`"${g}"`)),s.push(...h.map(g=>({type:e,value:g,start:i,end:n})))}}}if(this.completions=s,this.completions.length&&this._autocomplete){let{width:e,left:p,bottom:h}=this._input.getBoundingClientRect();this._autocomplete.showPopover(),"anchorName"in document.documentElement.style||(this._autocomplete.style.left=`${p+3.75}px`,this._autocomplete.style.top=`${h}px`),this._autocomplete.style.width=`${e-15}px`}}updated(t){t.has("outputLanguage")&&this._parseQuery()}render(){return A`
797
- <spectric-input .value=${this.value} .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${t=>t.stopPropagation()}></spectric-input>
817
+ <spectric-input variant="datetime-local" @change=${C=>{if(!C.target)return;y=`"${new Date(C.target.value+":00.000Z").toISOString()}"`,x.value.disabled=y===void 0}}></spectric-input>
818
+ <spectric-button ${rt(x)} .disabled=${!0} @click=${()=>{$(y),E.open=!1}}>Submit</spectric-button>
819
+ `)}),y}}))):n.push(...Object.values(Io).map(d=>({type:t,...d,start:o,end:o}))):c.type==="boolean"&&n.push(...Ho.map(d=>({type:t,...d,start:o,end:o}))))}if(t==="value"){let c=this.fields.find(d=>d.name===e.fieldName);if(c&&c.type=="boolean")n.push({type:t,value:"true",start:i,end:o},{type:t,value:"false",start:i,end:o});else{console.log(`invoke callback to get values for ${e.fieldName}`);let d=await this.getValuesForField(e.fieldName,e.prefix);(c==null?void 0:c.type)==="string"&&(d=d.map(f=>`"${f}"`)),n.push(...d.map(f=>({type:t,value:f,start:i,end:o})))}}}if(this.completions=n,this.completions.length&&this._autocomplete){let{width:t,left:c,bottom:d}=this._input.getBoundingClientRect();this._autocomplete.showPopover(),"anchorName"in document.documentElement.style||(this._autocomplete.style.left=`${c+3.75}px`,this._autocomplete.style.top=`${d}px`),this._autocomplete.style.width=`${t-15}px`}}updated(e){e.has("outputLanguage")&&this._parseQuery()}render(){return S`
820
+ <spectric-input .value=${this.value} .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${e=>e.stopPropagation()}></spectric-input>
798
821
  <div class="autocomplete" popover style=${`position-anchor: --${this.uuid};`}>
799
- ${this.completions.map((t,s)=>A`<div @click=${()=>{this.completionIndex=s,this._selectCompletion()}} class=${this.completionIndex==s?"option active":"option"}><span class="optiontype ${t.type}">${t.type}</span> <span class="value">${t.value}</span> <span class="label">${t.label}</span></span> </div></div>`)}
800
- </div>`}},V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"placeholder",2),V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"value",2),V([v({type:String,reflect:!0})],d.SpectricQuery.prototype,"outputLanguage",2),V([xe()],d.SpectricQuery.prototype,"completions",2),V([xe()],d.SpectricQuery.prototype,"completionIndex",2),V([v({type:Array,reflect:!0})],d.SpectricQuery.prototype,"fields",2),V([fe(".autocomplete")],d.SpectricQuery.prototype,"_autocomplete",2),V([at(".autocomplete")],d.SpectricQuery.prototype,"_asyncAutocomplete",2),V([fe("spectric-input")],d.SpectricQuery.prototype,"_input",2),d.SpectricQuery=V([D("spectric-query")],d.SpectricQuery);const ni=F`
822
+ ${this.completions.map((e,n)=>S`<div @click=${()=>{this.completionIndex=n,this._selectCompletion()}} class=${this.completionIndex==n?"option active":"option"}><span class="optiontype ${e.type}">${e.type}</span> <span class="value">${e.value}</span> <span class="label">${e.label}</span></span> </div></div>`)}
823
+ </div>`}},Z([b({type:String,reflect:!0})],h.SpectricQuery.prototype,"placeholder",2),Z([b({type:String,reflect:!0})],h.SpectricQuery.prototype,"value",2),Z([b({type:String,reflect:!0})],h.SpectricQuery.prototype,"outputLanguage",2),Z([F()],h.SpectricQuery.prototype,"completions",2),Z([F()],h.SpectricQuery.prototype,"completionIndex",2),Z([b({type:Array,reflect:!0})],h.SpectricQuery.prototype,"fields",2),Z([ye(".autocomplete")],h.SpectricQuery.prototype,"_autocomplete",2),Z([dt(".autocomplete")],h.SpectricQuery.prototype,"_asyncAutocomplete",2),Z([ye("spectric-input")],h.SpectricQuery.prototype,"_input",2),h.SpectricQuery=Z([O("spectric-query")],h.SpectricQuery);const Ai=I`
801
824
  border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
802
825
  background-color: var(--panel-color,#0b0b0b);
803
826
  --spectric-input-color: var(--spectric-background);
@@ -805,7 +828,7 @@ spectric-button{
805
828
  --spectric-text-primary:var(--text-primary);
806
829
  --spectric-text-secondary:var(--text-secondary);
807
830
  filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
808
- `,ai=F`
831
+ `,xi=I`
809
832
  border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
810
833
  background-color: var(--panel-color-inverse,#0b0b0b);
811
834
  color:var(--text-primary,#3c4c5b);
@@ -813,7 +836,7 @@ spectric-button{
813
836
  --spectric-text-primary:var(--text-secondary);
814
837
  --spectric-text-secondary:var(--text-primary);
815
838
  filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
816
- `,Dn=F`
839
+ `,Fo=I`
817
840
  :host{
818
841
  display:block;
819
842
  border:2px solid black;
@@ -823,20 +846,20 @@ spectric-button{
823
846
 
824
847
  }
825
848
  :host(spectric-panel[level='0']) {
826
- ${ni};
849
+ ${Ai};
827
850
  }
828
851
 
829
852
  :host(spectric-panel[level='1']) {
830
- ${ai};
853
+ ${xi};
831
854
  }
832
855
 
833
856
  :host(spectric-panel[level='2']) {
834
- ${ni};
857
+ ${Ai};
835
858
  }
836
859
  :host(spectric-panel[level='3']) {
837
- ${ai};
860
+ ${xi};
838
861
  }
839
- `;var Ln=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,rr=(o,t,s,i)=>{for(var n=i>1?void 0:i?Nn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Ln(t,s,n),n};d.SpectricPanel=class extends O{constructor(){super(...arguments),this.level=0}updated(){this.layers||(this.layers=this.querySelectorAll("spectric-panel")),this.layers.forEach(t=>{t.setAttribute("level",((this.level+1)%4).toString())}),this.dispatchEvent(new CustomEvent("use-layer",{bubbles:!0,cancelable:!0,composed:!0,detail:{layer:this,level:this.level}}))}render(){return A` <slot></slot> `}},d.SpectricPanel.styles=Dn,rr([v({type:Number,reflect:!0})],d.SpectricPanel.prototype,"level",2),rr([v({attribute:!1})],d.SpectricPanel.prototype,"layers",2),d.SpectricPanel=rr([D("spectric-panel")],d.SpectricPanel);var Bn=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,ci=(o,t,s,i)=>{for(var n=i>1?void 0:i?jn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Bn(t,s,n),n};const zn={"--primary":{control:"color"},"--secondary":{control:"color"},"--tertiary":{control:"color"},"--disabled":{control:"color"},"--background":{control:"color"},"--background-inverse":{control:"color"},"--text-primary":{control:"color"},"--text-secondary":{control:"color"},"--text-on-color":{control:"color"},"--border-radius":{control:"text"}},li={"--secondary":"#77878b","--tertiary":"#c7c7c7","--disabled":"#000000","--text-primary":"#cccccc","--text-secondary":"#cccccc","--text-on-color":"#ededed","--background":"#181818","--background-inverse":"#37373d"},pi={...li,"--primary":"#ffd45a","--text-on-color":"#4f4f4f"},ir={undefined:{},light:{},dark:li,spectric:pi,spectricFlat:{...pi,"--border-radius":"1px"}},Rn=Object.fromEntries(Object.keys(ir).map(o=>[o,o])),Mn=`
862
+ `;var Qo=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,gr=(s,e,n,i)=>{for(var o=i>1?void 0:i?qo(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&Qo(e,n,o),o};h.SpectricPanel=class extends D{constructor(){super(...arguments),this.level=0}updated(){this.layers||(this.layers=this.querySelectorAll("spectric-panel")),this.layers.forEach(e=>{e.setAttribute("level",((this.level+1)%4).toString())}),this.dispatchEvent(new CustomEvent("use-layer",{bubbles:!0,cancelable:!0,composed:!0,detail:{layer:this,level:this.level}}))}render(){return S` <slot></slot> `}},h.SpectricPanel.styles=Fo,gr([b({type:Number,reflect:!0})],h.SpectricPanel.prototype,"level",2),gr([b({attribute:!1})],h.SpectricPanel.prototype,"layers",2),h.SpectricPanel=gr([O("spectric-panel")],h.SpectricPanel);var Wo=Object.defineProperty,Vo=Object.getOwnPropertyDescriptor,Ci=(s,e,n,i)=>{for(var o=i>1?void 0:i?Vo(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&Wo(e,n,o),o};const Ei={"--primary":{control:"color"},"--secondary":{control:"color"},"--tertiary":{control:"color"},"--disabled":{control:"color"},"--background":{control:"color"},"--background-inverse":{control:"color"},"--text-primary":{control:"color"},"--text-secondary":{control:"color"},"--text-on-color":{control:"color"},"--border-radius":{control:"text"}},ki={"--secondary":"#77878b","--tertiary":"#c7c7c7","--disabled":"#000000","--text-primary":"#cccccc","--text-secondary":"#cccccc","--text-on-color":"#ededed","--background":"#181818","--background-inverse":"#37373d"},Pi={...ki,"--primary":"#ffd45a","--text-on-color":"#4f4f4f"},vr={undefined:{},light:{},dark:ki,spectric:Pi,spectricFlat:{...Pi,"--border-radius":"1px"}},Ti=Object.fromEntries(Object.keys(vr).map(s=>[s,s])),Yo=`
840
863
  --spectric-background: var(--background,#ffffff);
841
864
  --spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
842
865
  --spectric-background-inverse: var(--background-inverse,#f4f4f4);
@@ -879,12 +902,12 @@ spectric-button{
879
902
  --spectric-text-on-color-disabled: var(--disabled,#c6c6c6)
880
903
  --spectric-button-disabled: #c6c6c6;
881
904
  color: var(--spectric-text-primary);
882
- `;d.SpectricThemeProvider=class extends O{constructor(){super(...arguments),this.theme="undefined"}updated(t){if(t.has("theme")&&this.theme!=t.get("theme")){const s={old:t.get("theme"),new:this.theme};this.dispatchEvent(new CustomEvent("theme-change",{detail:s,bubbles:!0,composed:!0}))}}render(){let t=Object.keys(ir).includes(this.theme)?this.theme:"undefined",s=Object.entries(ir[t]).map(i=>`${i[0]}:${i[1]};`).join(`
883
- `);return A`
884
- ${this.theme&&this.theme!=="light"?A`
905
+ `;h.SpectricThemeProvider=class extends D{constructor(){super(...arguments),this.theme="undefined"}updated(e){if(e.has("theme")&&this.theme!=e.get("theme")){const n={old:e.get("theme"),new:this.theme};this.dispatchEvent(new CustomEvent("theme-change",{detail:n,bubbles:!0,composed:!0}))}}render(){let e=Object.keys(vr).includes(this.theme)?this.theme:"undefined",n=Object.entries(vr[e]).map(i=>`${i[0]}:${i[1]};`).join(`
906
+ `);return S`
907
+ ${this.theme&&this.theme!=="light"?S`
885
908
  <style>:host{
886
- ${s};
887
- ${Mn}
909
+ ${n};
910
+ ${Yo}
888
911
  }
889
912
  /* Webkit psudo elements don't pick up variables defined by the host */
890
913
  ::-webkit-scrollbar-thumb {
@@ -955,9 +978,9 @@ spectric-button{
955
978
  }
956
979
  </style>`:null}
957
980
  <slot></slot>
958
- `}},d.SpectricThemeProvider.styles=F`:host{
981
+ `}},h.SpectricThemeProvider.styles=I`:host{
959
982
  display:contents;
960
- }`,ci([v({reflect:!0})],d.SpectricThemeProvider.prototype,"theme",2),d.SpectricThemeProvider=ci([D("spectric-theme")],d.SpectricThemeProvider);const In=F`
983
+ }`,Ci([b({reflect:!0})],h.SpectricThemeProvider.prototype,"theme",2),h.SpectricThemeProvider=Ci([O("spectric-theme")],h.SpectricThemeProvider);const Ko=I`
961
984
  :host {
962
985
  display: block;
963
986
  height: 100%;
@@ -1020,7 +1043,7 @@ spectric-button{
1020
1043
  width: 5px;
1021
1044
  cursor: ew-resize;
1022
1045
  }
1023
- `;var Un=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,I=(o,t,s,i)=>{for(var n=i>1?void 0:i?Fn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Un(t,s,n),n},ui=(o=>(o.horizontal="horizontal",o.vertical="vertical",o))(ui||{});const di="spectric-splitview";d.SplitView=class extends Ye{constructor(){super(),this.orientation="horizontal",this.percentage=50,this.invisible=!1,this.min=10,this.max=90,this.useSavedState=!0,this.isDragging=!1,this._error=!1,this._emitChange=()=>{let{percentage:s,orientation:i,invisible:n,min:e,max:p,useSavedState:h}=this,g=this.getAttribute("id");g&&this.useSavedState&&localStorage.setItem(`splitview-${g}`,String(s)),this.dispatchEvent(new CustomEvent("change",{detail:{orientation:i,percentage:s,invisible:n,min:e,max:p,useSavedState:h}}))},this._onMouseMove=Gr(s=>{if(this.isDragging){const i=this.getBoundingClientRect();let n,e;this.orientation==="horizontal"?(n=s.clientX-i.left,e=n/i.width*100):(n=s.clientY-i.top,e=n/i.height*100),e=Math.min(Math.max(e,this.min),this.max),this.percentage=e,this._emitChange()}}),this._assignSlot=s=>{if(!s.target)return;let n=s.target.assignedNodes().filter(e=>e instanceof HTMLElement);n.length>2&&console.log("cannot assign more than 2 elements to a split view"),n.forEach(e=>{if(this._panel1.assignedNodes().length===0){e.slot="panel1";return}if(this._panel2.assignedNodes().length===0){e.slot="panel2";return}this._error="Too many element assigned to split view splitter can only have a maximum of 2 children",console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children")})};let t=this.getAttribute("id");if(t&&this.useSavedState){let s=localStorage.getItem(`splitview-${t}`);s&&(this.percentage=parseFloat(s))}this.addDisposableListener(this._splitter,"mousedown",()=>{this.isDragging=!0}),this.addDisposableListener(this._splitter,"dblclick",()=>{this.percentage=50,this._emitChange()}),this.addDisposableListener(document.body,"mousemove",this._onMouseMove),this.addDisposableListener(document.body,"mouseup",()=>{this.isDragging=!1})}updated(t){t.has("percentage")&&(this.percentage=Math.min(Math.max(Number(this.percentage),this.min),this.max))}render(){return A`
1046
+ `;var Zo=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,H=(s,e,n,i)=>{for(var o=i>1?void 0:i?Xo(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&Zo(e,n,o),o},br=(s=>(s.horizontal="horizontal",s.vertical="vertical",s))(br||{});const mr="spectric-splitview";h.SplitView=class extends ae{constructor(){super(),this.orientation="horizontal",this.percentage=50,this.invisible=!1,this.min=10,this.max=90,this.useSavedState=!0,this.isDragging=!1,this._error=!1,this._emitChange=()=>{let{percentage:n,orientation:i,invisible:o,min:t,max:c,useSavedState:d}=this,f=this.getAttribute("id");f&&this.useSavedState&&localStorage.setItem(`splitview-${f}`,String(n)),this.dispatchEvent(new CustomEvent("change",{detail:{orientation:i,percentage:n,invisible:o,min:t,max:c,useSavedState:d}}))},this._onMouseMove=gt(n=>{if(this.isDragging){const i=this.getBoundingClientRect();let o,t;this.orientation==="horizontal"?(o=n.clientX-i.left,t=o/i.width*100):(o=n.clientY-i.top,t=o/i.height*100),t=Math.min(Math.max(t,this.min),this.max),this.percentage=t,this._emitChange()}}),this._assignSlot=n=>{if(!n.target)return;let o=n.target.assignedNodes().filter(t=>t instanceof HTMLElement);o.length>2&&console.log("cannot assign more than 2 elements to a split view"),o.forEach(t=>{if(this._panel1.assignedNodes().length===0){t.slot="panel1";return}if(this._panel2.assignedNodes().length===0){t.slot="panel2";return}this._error="Too many element assigned to split view splitter can only have a maximum of 2 children",console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children")})};let e=this.getAttribute("id");if(e&&this.useSavedState){let n=localStorage.getItem(`splitview-${e}`);n&&(this.percentage=parseFloat(n))}this.addDisposableListener(this._splitter,"mousedown",()=>{this.isDragging=!0}),this.addDisposableListener(this._splitter,"dblclick",()=>{this.percentage=50,this._emitChange()}),this.addDisposableListener(document.body,"mousemove",this._onMouseMove),this.addDisposableListener(document.body,"mouseup",()=>{this.isDragging=!1})}updated(e){e.has("percentage")&&(this.percentage=Math.min(Math.max(Number(this.percentage),this.min),this.max))}render(){return S`
1024
1047
  <div class="split-view ${this.orientation} ${this._error?"error":""} ${this.isDragging?"active":""}" style="--split-percentage: ${this.percentage}%;">
1025
1048
  <span class="error-display">${this._error}</span>
1026
1049
  <div class="panel" style="${this.orientation==="horizontal"?"flex: var(--split-percentage, 50%)":"max-height: var(--split-percentage, 50%)"}">
@@ -1032,15 +1055,15 @@ spectric-button{
1032
1055
  </div>
1033
1056
  </div>
1034
1057
  <slot @slotchange=${this._assignSlot} style="display:none"></slot>
1035
- `}},d.SplitView.styles=In,I([v({type:String})],d.SplitView.prototype,"orientation",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"percentage",2),I([v({type:Boolean})],d.SplitView.prototype,"invisible",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"min",2),I([v({type:Number,reflect:!0})],d.SplitView.prototype,"max",2),I([v({type:Boolean,reflect:!0})],d.SplitView.prototype,"useSavedState",2),I([xe()],d.SplitView.prototype,"isDragging",2),I([xe()],d.SplitView.prototype,"_error",2),I([at(".splitter")],d.SplitView.prototype,"_splitter",2),I([fe("slot[name='panel1']")],d.SplitView.prototype,"_panel1",2),I([fe("slot[name='panel2']")],d.SplitView.prototype,"_panel2",2),d.SplitView=I([D(di)],d.SplitView);var Hn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor,$e=(o,t,s,i)=>{for(var n=i>1?void 0:i?Qn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Hn(t,s,n),n};const hi="spectric-pagination";console.log("Pagination"),d.PaginationElement=class extends O{constructor(){super(...arguments),this.page=1,this.pageSize=10,this.pageSizeOptions=[10,20,50,100,1e3],this.size="xsmall",this._handlePageUp=()=>{this.page+=1,this._emitChange()},this._handlePageDown=()=>{this.page-=1,this._emitChange()},this._handleSizeChange=t=>{t.stopPropagation(),t.preventDefault();let s=parseInt(t.target.value);this.pageSize=s,this._emitChange()},this._emitChange=()=>{let{page:t,pageSize:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{page:t,pageSize:s}}))}}createRenderRoot(){return this}updated(t){t.has("pageSize")&&!this.pageSizeOptions.includes(this.pageSize)&&(this.pageSizeOptions=[...this.pageSizeOptions,this.pageSize].sort((s,i)=>s-i),requestAnimationFrame(()=>{this.select&&this.select.value!==String(this.pageSize)&&(this.select.value=String(this.pageSize))}))}render(){let t=this.page*this.pageSize,s=!0;this.totalItems&&t<this.totalItems&&(s=!1);let i="";return this.totalItems&&(i=`${this.page} of ${Math.ceil(this.totalItems/this.pageSize)}`),A`
1058
+ `}},h.SplitView.styles=Ko,H([b({type:String})],h.SplitView.prototype,"orientation",2),H([b({type:Number,reflect:!0})],h.SplitView.prototype,"percentage",2),H([b({type:Boolean})],h.SplitView.prototype,"invisible",2),H([b({type:Number,reflect:!0})],h.SplitView.prototype,"min",2),H([b({type:Number,reflect:!0})],h.SplitView.prototype,"max",2),H([b({type:Boolean,reflect:!0})],h.SplitView.prototype,"useSavedState",2),H([F()],h.SplitView.prototype,"isDragging",2),H([F()],h.SplitView.prototype,"_error",2),H([dt(".splitter")],h.SplitView.prototype,"_splitter",2),H([ye("slot[name='panel1']")],h.SplitView.prototype,"_panel1",2),H([ye("slot[name='panel2']")],h.SplitView.prototype,"_panel2",2),h.SplitView=H([O(mr)],h.SplitView);var Go=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,Ce=(s,e,n,i)=>{for(var o=i>1?void 0:i?Jo(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&Go(e,n,o),o};const yr="spectric-pagination";console.log("Pagination"),h.PaginationElement=class extends D{constructor(){super(...arguments),this.page=1,this.pageSize=10,this.pageSizeOptions=[10,20,50,100,1e3],this.size="xsmall",this._handlePageUp=()=>{this.page+=1,this._emitChange()},this._handlePageDown=()=>{this.page-=1,this._emitChange()},this._handleSizeChange=e=>{e.stopPropagation(),e.preventDefault();let n=parseInt(e.target.value);this.pageSize=n,this._emitChange()},this._emitChange=()=>{let{page:e,pageSize:n}=this;this.dispatchEvent(new CustomEvent("change",{detail:{page:e,pageSize:n}}))}}createRenderRoot(){return this}updated(e){e.has("pageSize")&&!this.pageSizeOptions.includes(this.pageSize)&&(this.pageSizeOptions=[...this.pageSizeOptions,this.pageSize].sort((n,i)=>n-i),requestAnimationFrame(()=>{this.select&&this.select.value!==String(this.pageSize)&&(this.select.value=String(this.pageSize))}))}render(){let e=this.page*this.pageSize,n=!0;this.totalItems&&e<this.totalItems&&(n=!1);let i="";return this.totalItems&&(i=`${this.page} of ${Math.ceil(this.totalItems/this.pageSize)}`),S`
1036
1059
  <div class="spectric-pagination-container">
1037
1060
  <div>
1038
1061
  <!-- TODO/FIXME Make a select component and use it for cross browser styling-->
1039
1062
  <select @change=${this._handleSizeChange} .value=${String(this.pageSize)}>
1040
- ${this.pageSizeOptions.map(n=>A`<option .value=${String(n)} class=${String(n)===String(this.pageSize)?"selected":""}>${n}</option>`)}
1063
+ ${this.pageSizeOptions.map(o=>S`<option .value=${String(o)} class=${String(o)===String(this.pageSize)?"selected":""}>${o}</option>`)}
1041
1064
  </select>
1042
1065
  </div>
1043
- ${this.totalItems?A`
1066
+ ${this.totalItems?S`
1044
1067
  <div class="spectric-pagination-text">${`Items ${(this.page-1)*this.pageSize}-${Math.min(this.page*this.pageSize,this.totalItems)} of ${this.totalItems}`}</div>
1045
1068
  <div class="spectric-pagination-container">
1046
1069
  <div>
@@ -1048,76 +1071,104 @@ spectric-button{
1048
1071
  </div>
1049
1072
  <div>
1050
1073
  <spectric-button size=${this.size} ?disabled=${this.page===1} @click=${this._handlePageDown} icon>🠈</spectric-button>
1051
- <spectric-button size=${this.size} ?disabled=${s} @click=${this._handlePageUp} icon>🠊</spectric-button>
1074
+ <spectric-button size=${this.size} ?disabled=${n} @click=${this._handlePageUp} icon>🠊</spectric-button>
1052
1075
  </div>
1053
1076
  </div>
1054
1077
  `:null}
1055
1078
  </div>
1056
- `}},$e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"page",2),$e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"pageSize",2),$e([v({type:Number,reflect:!0})],d.PaginationElement.prototype,"totalItems",2),$e([v({type:Array})],d.PaginationElement.prototype,"pageSizeOptions",2),$e([fe("select")],d.PaginationElement.prototype,"select",2),$e([v({type:String,reflect:!0})],d.PaginationElement.prototype,"size",2),d.PaginationElement=$e([D(hi)],d.PaginationElement);var qn=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,fi=(o,t,s,i)=>{for(var n=i>1?void 0:i?Wn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&qn(t,s,n),n};const Vn="spectric-table-header";let sr=class extends O{constructor(){super(...arguments),this.columns=[],this._handleSortChange=o=>{o=JSON.parse(JSON.stringify(o)),o.sortable&&(o.sortDirection===R.none||o.sortDirection===void 0?o.sortDirection=R.ascending:o.sortDirection===R.ascending?o.sortDirection=R.descending:o.sortDirection===R.descending&&(o.sortDirection=R.none),this.dispatchEvent(new CustomEvent("sortChange",{composed:!0,bubbles:!0,detail:o})))}}createRenderRoot(){return this}render(){return A`
1057
- <tr>
1058
- ${this.columns.map(o=>{let t=["header-contents"];o.filterable,o.sortable&&t.push("sortable");let s=o.width?`width:${o.width}px;`:"",i=o.sortDirection===R.ascending?"🠉":o.sortDirection==R.descending?"🠋":"",n=o.sortDirection||R.none;return A`
1059
- <td @click=${()=>this._handleSortChange(o)} style="${s}">
1060
- <div class=${t.join(" ")} >${o.title||o.key}
1061
- <span class="sort-direction ${n}">${i}</span>
1062
- </div>
1063
- </td>`})}
1064
- </tr>
1065
- `}};fi([v({type:Array,attribute:!1})],sr.prototype,"columns",2),sr=fi([D(Vn)],sr);/**
1079
+ `}},Ce([b({type:Number,reflect:!0})],h.PaginationElement.prototype,"page",2),Ce([b({type:Number,reflect:!0})],h.PaginationElement.prototype,"pageSize",2),Ce([b({type:Number,reflect:!0})],h.PaginationElement.prototype,"totalItems",2),Ce([b({type:Array})],h.PaginationElement.prototype,"pageSizeOptions",2),Ce([ye("select")],h.PaginationElement.prototype,"select",2),Ce([b({type:String,reflect:!0})],h.PaginationElement.prototype,"size",2),h.PaginationElement=Ce([O(yr)],h.PaginationElement);const ea=Object.freeze(Object.defineProperty({__proto__:null,BitArray:sr,DisposableElement:ae,getListeners:hi},Symbol.toStringTag,{value:"Module"}));var ta=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,$r=(s,e,n,i)=>{for(var o=i>1?void 0:i?ra(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&ta(e,n,o),o};const ia="spectric-table-header";let St=class extends ae{constructor(){super(),this.columns=[],this._handleSortChange=s=>{this._resizeStart||(s=JSON.parse(JSON.stringify(s)),s.sortable&&(s.sortDirection===B.none||s.sortDirection===void 0?s.sortDirection=B.ascending:s.sortDirection===B.ascending?s.sortDirection=B.descending:s.sortDirection===B.descending&&(s.sortDirection=B.none),this.dispatchEvent(new CustomEvent("sortChange",{composed:!0,bubbles:!0,detail:s}))))},this._handleResizeStart=(s,e)=>{this._resizeStart={event:s,column:e}},this._handleResizeEnd=s=>{var i;if(!this._resizeStart)return;let e=s.pageX-((i=this._resizeStart)==null?void 0:i.event.pageX),n=this._resizeStart.column.width;if(console.log(e),this._resizeStart.column.width)this._resizeStart.column.width=this._resizeStart.column.width+e;else{let o=this._resizeStart.event.target.closest("td");this._resizeStart.column.width=o.getBoundingClientRect().width+e}console.log(n,this._resizeStart.column.width),this.dispatchEvent(new CustomEvent("columnResize",{detail:this._resizeStart.column})),requestAnimationFrame(()=>{if(this._resizeStart=void 0,window.getSelection){let o=window.getSelection();o&&o.removeAllRanges()}})},this.addDisposableListener(()=>document.body,"mouseup",this._handleResizeEnd)}createRenderRoot(){return this}render(){return S`
1080
+ <tr>
1081
+ ${this.columns.map(s=>this.renderCell(s))}
1082
+ </tr>
1083
+ `}renderCell(s){let e=["header-contents"];s.filterable,s.sortable&&e.push("sortable"),this._resizeStart&&e.push("resizing");let n=s.width?`min-width:${s.width}px;max-width:${s.width}px;`:"",i=s.sortDirection===B.ascending?"🠉":s.sortDirection==B.descending?"🠋":"",o=s.sortDirection||B.none,c=s.allowResize||s.allowResize===void 0?S`<div
1084
+ class="header-resize-handle"
1085
+ @mousedown=${d=>{this._handleResizeStart(d,s)}}
1086
+ @mouseup=${this._handleResizeEnd}
1087
+ ></div>`:null;return S` <td
1088
+ @click=${()=>this._handleSortChange(s)}
1089
+ style="${n}"
1090
+ >
1091
+ ${c}
1092
+ <div class=${e.join(" ")}>
1093
+ ${s.title||s.key}
1094
+ <span class="sort-direction ${o}">${i}</span>
1095
+ </div>
1096
+ </td>`}};$r([b({type:Array,attribute:!1})],St.prototype,"columns",2),$r([F()],St.prototype,"_resizeStart",2),St=$r([O(ia)],St);/**
1066
1097
  * @license
1067
1098
  * Copyright 2017 Google LLC
1068
1099
  * SPDX-License-Identifier: BSD-3-Clause
1069
- */const gi=o=>Zs(o)?o._$litType$.h:o.strings,Yn=Ve(class extends nt{constructor(o){super(o),this.et=new WeakMap}render(o){return[o]}update(o,[t]){const s=Yr(this.it)?gi(this.it):null,i=Yr(t)?gi(t):null;if(s!==null&&(i===null||s!==i)){const n=qt(o).pop();let e=this.et.get(s);if(e===void 0){const p=document.createDocumentFragment();e=We(P,p),e.setConnected(!1),this.et.set(s,e)}Qt(e,[n]),ge(e,void 0,n)}if(i!==null){if(s===null||s!==i){const n=this.et.get(i);if(n!==void 0){const e=qt(n).pop();Js(o),ge(o,void 0,e),Qt(o,[e])}}this.it=t}else this.it=void 0;return this.render(t)}});var Kn=Object.defineProperty,Zn=Object.getOwnPropertyDescriptor,Te=(o,t,s,i)=>{for(var n=i>1?void 0:i?Zn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Kn(t,s,n),n};const Xn="spectric-table-cell";let we=class extends O{constructor(){super(...arguments),this.overflow="",this.styleRules={whiteSpace:"",width:""},this._handleFilterOut=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=Oe(this.row,this.column.key)),this._emitFilter({include:!1,row:this.row,value:o,column:this.column})},this._handleFilterFor=()=>{let o;this.column.key&&typeof this.row=="object"&&(o=Oe(this.row,this.column.key)),this._emitFilter({include:!0,row:this.row,value:o,column:this.column})},this._displayTooltip=()=>{let o=this.querySelector("div"),t=this.querySelector("span");if(o&&t){let s=t.getBoundingClientRect(),i=o.getBoundingClientRect();s.width*s.height>i.width*i.height?(console.log("We need to show a tooltip witht he content because we are overflowing"),this.overflow=this.getRenderedValue()):this.overflow=""}}}createRenderRoot(){return this}updated(o){}_emitFilter(o){this.dispatchEvent(new CustomEvent("filter",{composed:!0,bubbles:!0,detail:o}))}getRenderedValue(){let o;return this.column.render?o=this.column.render(this.row,this.index,this.table):this.column.key&&typeof this.row=="object"?o=Oe(this.row,this.column.key):o=A`error`,o}render(){let o=this.getRenderedValue(),t=["cell-contents"];this.column.filterable&&t.push("filterable");let s=Yn(this.column.filterable?A`<div class="table-cell-actions">
1100
+ */const Oi=s=>pn(s)?s._$litType$.h:s.strings,sa=Je(class extends ht{constructor(s){super(s),this.et=new WeakMap}render(s){return[s]}update(s,[e]){const n=fi(this.it)?Oi(this.it):null,i=fi(e)?Oi(e):null;if(n!==null&&(i===null||n!==i)){const o=tr(s).pop();let t=this.et.get(n);if(t===void 0){const c=document.createDocumentFragment();t=Ge(P,c),t.setConnected(!1),this.et.set(n,t)}er(t,[o]),$e(t,void 0,o)}if(i!==null){if(n===null||n!==i){const o=this.et.get(i);if(o!==void 0){const t=tr(o).pop();dn(s),$e(s,void 0,t),er(s,[t])}}this.it=e}else this.it=void 0;return this.render(e)}});var na=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,je=(s,e,n,i)=>{for(var o=i>1?void 0:i?oa(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&na(e,n,o),o};const aa="spectric-table-cell";let Ee=class extends D{constructor(){super(...arguments),this.overflow="",this.styleRules={whiteSpace:"",width:""},this._handleFilterOut=()=>{let s;this.column.key&&typeof this.row=="object"&&(s=Be(this.row,this.column.key)),this._emitFilter({include:!1,row:this.row,value:s,column:this.column})},this._handleFilterFor=()=>{let s;this.column.key&&typeof this.row=="object"&&(s=Be(this.row,this.column.key)),this._emitFilter({include:!0,row:this.row,value:s,column:this.column})},this._displayTooltip=()=>{let s=this.querySelector("div.cell-contents"),e=this.querySelector("span");if(s&&e){let n=e.getBoundingClientRect(),i=s.getBoundingClientRect();n.width*n.height>i.width*i.height?(console.log("We need to show a tooltip witht he content because we are overflowing"),this.overflow=this.getRenderedValue(),this.updateComplete.then(()=>{let o=this.querySelector("spectric-tooltip");o&&o.showToolTip()})):this.overflow=""}}}createRenderRoot(){return this}updated(s){}_emitFilter(s){this.dispatchEvent(new CustomEvent("filter",{composed:!0,bubbles:!0,detail:s}))}getRenderedValue(){let s;return this.column.render?s=this.column.render(this.row,this.index,this.table):this.column.key&&typeof this.row=="object"?s=Be(this.row,this.column.key):s=S`error`,s}render(){let s=this.getRenderedValue(),e=["cell-contents"];this.column.filterable&&e.push("filterable");let n=sa(this.column.filterable?S`<div class="table-cell-actions">
1070
1101
  <spectric-button @click=${this._handleFilterOut} size="tiny" variant="text" icon tooltip="Filter Out Value">-</spectric-button>
1071
- <spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon tooltip="Filter For Value">+</spectric-button></div>`:null);return this.styleRules={width:this.column.width?this.column.width+"px":"",whiteSpace:this.column.whiteSpace||""},A`
1072
- <td style=${Ht(this.styleRules)} @mouseenter=${this._displayTooltip}>
1073
- ${s}
1074
- <div class=${t.join(" ")}>${this.overflow?A`<spectric-tooltip .text=${this.overflow}></spectric-tooltip>`:null}<span>${o}</span></div>
1102
+ <spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon tooltip="Filter For Value">+</spectric-button></div>`:null);return this.styleRules={width:this.column.width?this.column.width+"px":null,whiteSpace:this.column.whiteSpace||null},S`
1103
+ <td style=${Zt(this.styleRules)} @mouseenter=${this._displayTooltip}>
1104
+ ${n}
1105
+ <div class=${e.join(" ")}>${this.overflow?S`<spectric-tooltip .text=${this.overflow}></spectric-tooltip>`:null}<span>${s}</span></div>
1075
1106
  </td>
1076
- `}};Te([v({type:Object,attribute:!1})],we.prototype,"row",2),Te([v({type:Number,attribute:!1})],we.prototype,"index",2),Te([v({type:Object,attribute:!1})],we.prototype,"column",2),Te([xe()],we.prototype,"overflow",2),Te([fe("td")],we.prototype,"td",2),we=Te([D(Xn)],we);const Oe=(o,t)=>{let s=t.split("."),i=o[s[0]];return i==null||s.length>1&&(i=Oe(i,s.slice(1).join("."))),i};/**
1107
+ `}};je([b({type:Object,attribute:!1})],Ee.prototype,"row",2),je([b({type:Number,attribute:!1})],Ee.prototype,"index",2),je([b({type:Object,attribute:!1})],Ee.prototype,"column",2),je([F()],Ee.prototype,"overflow",2),je([ye("td")],Ee.prototype,"td",2),Ee=je([O(aa)],Ee);const Be=(s,e)=>{let n=e.split("."),i=s[n[0]];return i==null||n.length>1&&(i=Be(i,n.slice(1).join("."))),i};/**
1077
1108
  * @license
1078
1109
  * Copyright 2017 Google LLC
1079
1110
  * SPDX-License-Identifier: BSD-3-Clause
1080
- */const bi=(o,t,s)=>{const i=new Map;for(let n=t;n<=s;n++)i.set(o[n],n);return i},vt=Ve(class extends nt{constructor(o){if(super(o),o.type!==Ft.CHILD)throw Error("repeat() can only be used in text expressions")}dt(o,t,s){let i;s===void 0?s=t:t!==void 0&&(i=t);const n=[],e=[];let p=0;for(const h of o)n[p]=i?i(h,p):p,e[p]=s(h,p),p++;return{values:e,keys:n}}render(o,t,s){return this.dt(o,t,s).values}update(o,[t,s,i]){const n=qt(o),{values:e,keys:p}=this.dt(t,s,i);if(!Array.isArray(n))return this.ut=p,e;const h=this.ut??(this.ut=[]),g=[];let $,C,y=0,E=n.length-1,x=0,k=e.length-1;for(;y<=E&&x<=k;)if(n[y]===null)y++;else if(n[E]===null)E--;else if(h[y]===p[x])g[x]=be(n[y],e[x]),y++,x++;else if(h[E]===p[k])g[k]=be(n[E],e[k]),E--,k--;else if(h[y]===p[k])g[k]=be(n[y],e[k]),ge(o,g[k+1],n[y]),y++,k--;else if(h[E]===p[x])g[x]=be(n[E],e[x]),ge(o,n[y],n[E]),E--,x++;else if($===void 0&&($=bi(p,x,k),C=bi(h,y,E)),$.has(h[y]))if($.has(h[E])){const N=C.get(p[x]),z=N!==void 0?n[N]:null;if(z===null){const M=ge(o,n[y]);be(M,e[x]),g[x]=M}else g[x]=be(z,e[x]),ge(o,n[y],z),n[N]=null;x++}else Wt(n[E]),E--;else Wt(n[y]),y++;for(;x<=k;){const N=ge(o,g[k+1]);be(N,e[x]),g[x++]=N}for(;y<=E;){const N=n[y++];N!==null&&Wt(N)}return this.ut=p,Qt(o,g),ie}});var Gn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor,or=(o,t,s,i)=>{for(var n=i>1?void 0:i?Jn(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&Gn(t,s,n),n};const ea="spectric-table-body";let mt=class extends O{constructor(){super(...arguments),this.data=[],this.columns=[]}createRenderRoot(){return this}firstUpdated(o){this.data.length>100&&console.warn("Table is rendering excessive amounts of data to the DOM you should set rowHeight and use a virtualized scroll or use pagination")}render(){return A`
1111
+ */const Di=(s,e,n)=>{const i=new Map;for(let o=e;o<=n;o++)i.set(s[o],o);return i},At=Je(class extends ht{constructor(s){if(super(s),s.type!==Kt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,e,n){let i;n===void 0?n=e:e!==void 0&&(i=e);const o=[],t=[];let c=0;for(const d of s)o[c]=i?i(d,c):c,t[c]=n(d,c),c++;return{values:t,keys:o}}render(s,e,n){return this.dt(s,e,n).values}update(s,[e,n,i]){const o=tr(s),{values:t,keys:c}=this.dt(e,n,i);if(!Array.isArray(o))return this.ut=c,t;const d=this.ut??(this.ut=[]),f=[];let y,x,$=0,E=o.length-1,C=0,k=t.length-1;for(;$<=E&&C<=k;)if(o[$]===null)$++;else if(o[E]===null)E--;else if(d[$]===c[C])f[C]=we(o[$],t[C]),$++,C++;else if(d[E]===c[k])f[k]=we(o[E],t[k]),E--,k--;else if(d[$]===c[k])f[k]=we(o[$],t[k]),$e(s,f[k+1],o[$]),$++,k--;else if(d[E]===c[C])f[C]=we(o[E],t[C]),$e(s,o[$],o[E]),E--,C++;else if(y===void 0&&(y=Di(c,C,k),x=Di(d,$,E)),y.has(d[$]))if(y.has(d[E])){const N=x.get(c[C]),R=N!==void 0?o[N]:null;if(R===null){const M=$e(s,o[$]);we(M,t[C]),f[C]=M}else f[C]=we(R,t[C]),$e(s,o[$],R),o[N]=null;C++}else rr(o[E]),E--;else rr(o[$]),$++;for(;C<=k;){const N=$e(s,f[k+1]);we(N,t[C]),f[C++]=N}for(;$<=E;){const N=o[$++];N!==null&&rr(N)}return this.ut=c,er(s,f),oe}});var la=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,wr=(s,e,n,i)=>{for(var o=i>1?void 0:i?ca(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&la(e,n,o),o};const pa="spectric-table-body";let xt=class extends D{constructor(){super(...arguments),this.data=[],this.columns=[]}createRenderRoot(){return this}firstUpdated(s){this.data.length>100&&console.warn("Table is rendering excessive amounts of data to the DOM you should set rowHeight and use a virtualized scroll or use pagination")}render(){return S`
1081
1112
  <body>
1082
- ${vt(this.data,(o,t)=>A`
1083
- <tr class="${t%2===0?"odd":""}">
1084
- ${vt(this.columns,s=>A`<spectric-table-cell .column=${s} .index=${t} .row=${o} .columns=${this.columns}></spectric-table-cell>`)}
1113
+ ${At(this.data,(s,e)=>S`
1114
+ <tr class="${e%2===0?"odd":""}">
1115
+ ${At(this.columns,n=>S`<spectric-table-cell .column=${n} .index=${e} .row=${s} .columns=${this.columns}></spectric-table-cell>`)}
1085
1116
  </tr>`)}
1086
1117
 
1087
1118
  </body>
1088
- `}};or([v({type:Array,attribute:!1})],mt.prototype,"data",2),or([v({type:Array,attribute:!1})],mt.prototype,"columns",2),mt=or([D(ea)],mt);var ta=Object.defineProperty,ra=Object.getOwnPropertyDescriptor,Xe=(o,t,s,i)=>{for(var n=i>1?void 0:i?ra(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&ta(t,s,n),n};const ia="spectric-table-virtual-body";let De=class extends Ye{constructor(){super(),this.data=[],this.columns=[],this.rowHeight=30,this.startIndex=0,this.addDisposableListener(()=>this.table.querySelector(".table-wrapper"),"scroll",()=>{const o=this.table.querySelector(".table-wrapper").scrollTop;requestAnimationFrame(()=>{this.startIndex=Math.floor(o/this.rowHeight)})})}firstUpdated(){this.columns.forEach(o=>{o.width||console.warn("When using virtual scrolling it is recomended to set the width of the columns to prevent columns widths from jittering during scroll")})}createRenderRoot(){return this}render(){let o=this.data.length,t=10,s=this.table.querySelector("spectric-table-header").clientHeight,i=this.table.querySelector(".table-wrapper"),n=Math.max(this.startIndex-t,0);const e=Math.ceil((i.clientHeight-s)/this.rowHeight),p=Math.min(n+e+t,o),h=p-n;let g=o*this.rowHeight,$=n*this.rowHeight+(i.scrollTop-n*this.rowHeight);p===o&&($=n*this.rowHeight);let C=h*this.rowHeight,y=g-$-C,E=this.startIndex!=0?A`
1089
- <tr style="height:${$}px" class="virtual-scroll-spacer">
1090
- <td colspan="${this.columns.length}"></td></tr>`:null,x=A`
1119
+ `}};wr([b({type:Array,attribute:!1})],xt.prototype,"data",2),wr([b({type:Array,attribute:!1})],xt.prototype,"columns",2),xt=wr([O(pa)],xt);var ua=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,it=(s,e,n,i)=>{for(var o=i>1?void 0:i?ha(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&ua(e,n,o),o};const da="spectric-table-virtual-body";let Re=class extends ae{constructor(){super(),this.data=[],this.columns=[],this.rowHeight=30,this.startIndex=0,this.addDisposableListener(()=>this.table.querySelector(".table-wrapper"),"scroll",()=>{const s=this.table.querySelector(".table-wrapper").scrollTop;requestAnimationFrame(()=>{this.startIndex=Math.floor(s/this.rowHeight)})})}firstUpdated(){this.columns.forEach(s=>{s.width||console.warn("When using virtual scrolling it is recomended to set the width of the columns to prevent columns widths from jittering during scroll")})}createRenderRoot(){return this}render(){let s=this.data.length,e=10,n=this.table.querySelector("spectric-table-header").clientHeight,i=this.table.querySelector(".table-wrapper"),o=Math.max(this.startIndex-e,0);const t=Math.ceil((i.clientHeight-n)/this.rowHeight),c=Math.min(o+t+e,s),d=c-o;let f=s*this.rowHeight,y=o*this.rowHeight+(i.scrollTop-o*this.rowHeight);c===s&&(y=o*this.rowHeight);let x=d*this.rowHeight,$=f-y-x,E=this.startIndex!=0?S`
1091
1120
  <tr style="height:${y}px" class="virtual-scroll-spacer">
1092
- <td colspan="${this.columns.length}"></td></tr>`;return A`
1093
- <div style="height:${g}px;position: absolute;overflow-x: hidden;overflow-y: hidden;z-index:-1;width:1px;"></div>
1121
+ <td colspan="${this.columns.length}"></td></tr>`:null,C=S`
1122
+ <tr style="height:${$}px" class="virtual-scroll-spacer">
1123
+ <td colspan="${this.columns.length}"></td></tr>`;return S`
1124
+ <div style="height:${f}px;position: absolute;overflow-x: hidden;overflow-y: hidden;z-index:-1;width:1px;"></div>
1094
1125
  <tbody>
1095
1126
  ${E}
1096
1127
  </tbody>
1097
- <div style="display:table-row-group;max-height:${C}px; overflow:hidden;">
1128
+ <div style="display:table-row-group;max-height:${x}px; overflow:hidden;">
1098
1129
 
1099
- ${vt(this.data.slice(Math.max(n,0),p),(k,N)=>A`
1100
- <tr class="${(N+n)%2===0?"odd":""}">
1101
- ${vt(this.columns,z=>A`<spectric-table-cell .column=${z} .row=${k} .index=${N+n} .columns=${this.columns}></spectric-table-cell>`)}
1130
+ ${At(this.data.slice(Math.max(o,0),c),(k,N)=>S`
1131
+ <tr class="${(N+o)%2===0?"odd":""}">
1132
+ ${At(this.columns,R=>S`<spectric-table-cell .column=${R} .row=${k} .index=${N+o} .columns=${this.columns}></spectric-table-cell>`)}
1102
1133
  </tr>`)}
1103
1134
  </div>
1104
1135
  <tbody>
1105
- ${y>0?x:null}
1136
+ ${$>0?C:null}
1106
1137
  </tbody>
1107
1138
 
1108
- `}};Xe([v({type:Array,attribute:!1})],De.prototype,"data",2),Xe([v({type:Array,attribute:!1})],De.prototype,"columns",2),Xe([v({type:Number,attribute:!1})],De.prototype,"rowHeight",2),Xe([v({type:Number,state:!0})],De.prototype,"startIndex",2),De=Xe([D(ia)],De);const sa=o=>o.map(({key:t,sortDirection:s,compareFn:i})=>(n,e)=>{if(!t)return;let p=Oe(n,t),h=Oe(e,t);if(i)return i(n,e);if(typeof p=="number"||typeof p=="bigint"||typeof p=="boolean"){let g=p-h;return s===R.descending&&(g=g*-1),g}else if(typeof p=="string")return p.localeCompare(h)*(s===R.descending?-1:1)});var oa=Object.defineProperty,na=Object.getOwnPropertyDescriptor,ne=(o,t,s,i)=>{for(var n=i>1?void 0:i?na(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&oa(t,s,n),n};const vi="spectric-table";var mi=(o=>(o.multi="multi",o.single="single",o.none="none",o))(mi||{}),yi=(o=>(o.multi="multi",o.single="single",o))(yi||{}),R=(o=>(o.ascending="ascending",o.descending="descending",o.none="none",o))(R||{});d.TableElement=class extends O{constructor(){super(...arguments),this.data=[],this.columns=[],this.select="none",this.sort="single",this.rowHeight=25,this._handlePaginationChange=t=>{if(this.pagination){let s={...this.pagination,...t.detail},{totalItems:i,page:n,pageSize:e}=s;i&&n&&e&&(n-1)*e>i&&(s.page=1),this.pagination=s}this.dispatchEvent(new CustomEvent("paginationChange",{detail:t.detail})),this._emitChange()},this._handleSortChange=t=>{let s=t.detail,i=this.columns.find(n=>n.key==s.key);if(!i){console.warn("Unable to find sort column");return}this.sort=="single"&&this.columns.forEach(n=>{n.sortDirection="none"}),i.sortDirection=s.sortDirection,this.columns=[...this.columns],this._emitChange()},this._emitChange=()=>{let{pagination:t,columns:s}=this;this.dispatchEvent(new CustomEvent("change",{detail:{pagination:t,columns:s}}))},this.__DO_NOT_USE_filter=()=>{this.dispatchEvent(new CustomEvent("filter")),this.dispatchEvent(new CustomEvent("sortChange"))},this.selected=[],this._handleSelectAllChange=t=>{t.stopPropagation(),t.target.checked?this.selectAll():this.deselectAll()}}static getDefaultDataSorterAndPaginatior(t){return s=>{let i=s.columns.filter(h=>h.sortable&&h.sortDirection&&h.sortDirection!=="none"),n=[...t];if(i.length){let h=sa(i);n.sort((g,$)=>{for(let C of h){let y=C(g,$);if(y)return y}return 0})}if(!s.pagination)return n;let{page:e,pageSize:p}=s.pagination;return!e||!p?n:s.pagination?n.slice((e-1)*p,e*p):n}}createRenderRoot(){return this}deselectAll(){this.selected=[],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}selectAll(){this.selected=[...this.data],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}update(t){t.has("select")&&this.select==="single"&&this.selected.length>1&&(this.selected=[this.selected[0]],this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))),super.update(t)}render(){let t=this.columns.filter(i=>!i.hidden);return this.select!=="none"&&t.unshift({title:this.select==="multi"?A`<spectric-input variant="checkbox" @change=${this._handleSelectAllChange} .helperText=${"Select All"}></spectric-input>`:null,render:i=>{let n=document.createElement("div"),e=this.selected.includes(i),p=A`<spectric-input variant="checkbox" class="table-checkbox-${this.select}" ${Ze({checked:e})} @change=${h=>{h.stopPropagation();let g=this.selected.findIndex($=>$===i);if(!(h.target.checked&&g!==-1)){{if(!h.target.checked&&g===-1)return;!h.target.checked&&g!==-1&&this.selected.splice(g,1)}h.target.checked&&(this.select==="single"&&(this.selected=[]),this.selected.push(i)),this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))}}}></spectric-input>`;return We(p,n),p}}),A`
1109
- <div class="table-wrapper" style="--rowHeight:${this.rowHeight-4}px">
1139
+ `}};it([b({type:Array,attribute:!1})],Re.prototype,"data",2),it([b({type:Array,attribute:!1})],Re.prototype,"columns",2),it([b({type:Number,attribute:!1})],Re.prototype,"rowHeight",2),it([b({type:Number,state:!0})],Re.prototype,"startIndex",2),Re=it([O(da)],Re);function Li(s){let e=!1,n;return function(...i){return e||(e=!0,n=s.apply(this,i)),n}}const fa=s=>s.map(({key:e,sortDirection:n,compareFn:i})=>(o,t)=>{if(!e)return;let c=Be(o,e),d=Be(t,e);if(i)return i(o,t);if(typeof c=="number"||typeof c=="bigint"||typeof c=="boolean"){let f=c-d;return n===B.descending&&(f=f*-1),f}else if(typeof c=="string")return c.localeCompare(d)*(n===B.descending?-1:1)});var ga=Object.defineProperty,va=Object.getOwnPropertyDescriptor,X=(s,e,n,i)=>{for(var o=i>1?void 0:i?va(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&ga(e,n,o),o};const _r="spectric-table";var Sr=(s=>(s.multi="multi",s.single="single",s.none="none",s))(Sr||{}),Ar=(s=>(s.multi="multi",s.single="single",s))(Ar||{}),B=(s=>(s.ascending="ascending",s.descending="descending",s.none="none",s))(B||{});h.SpectricTableElement=class extends D{constructor(){super(...arguments),this.data=[],this.columns=[],this.select="none",this.sort="single",this.sortOrder=[],this.rowHeight=25,this.fontSize=16,this._handlePaginationChange=e=>{if(this.pagination){let n={...this.pagination,...e.detail},{totalItems:i,page:o,pageSize:t}=n;i&&o&&t&&(o-1)*t>i&&(n.page=1),this.pagination=n}this.dispatchEvent(new CustomEvent("paginationChange",{detail:e.detail})),this._emitChange()},this._handleSortChange=e=>{let n=e.detail,i=this.columns.find(o=>o.key==n.key);if(!i||i.key===void 0){console.warn("Unable to find sort column");return}if(this.sort=="single"&&(this.columns.forEach(o=>{o.sortDirection="none"}),this.sortOrder=[]),i.sortDirection=n.sortDirection,!i.sortDirection||i.sortDirection==="none"){let o=this.sortOrder.findIndex(t=>t===i.key);o!==-1&&this.sortOrder.splice(o,1)}else this.sortOrder.findIndex(t=>t===i.key)===-1&&(this.sortOrder=[...this.sortOrder,i.key]);this.columns=[...this.columns],this._emitChange()},this._handleColumnResize=e=>{let n=e.detail,i=this.columns.findIndex(o=>o.key==n.key);this.columns[i]={...this.columns[i]},this.columns=[...this.columns],this._emitChange()},this._emitChange=()=>{let{pagination:e,columns:n,sortOrder:i}=this;this.dispatchEvent(new CustomEvent("change",{detail:{pagination:e,columns:n,sortOrder:i}}))},this.__DO_NOT_USE_filter=()=>{this.dispatchEvent(new CustomEvent("filter")),this.dispatchEvent(new CustomEvent("sortChange"))},this.selected=[],this._handleSelectAllChange=e=>{e.stopPropagation(),e.target.checked?this.selectAll():this.deselectAll()}}static getDefaultDataSorterAndPaginatior(e){return n=>{let i=(n.sortOrder||[]).map(d=>n.columns.find(f=>f.key===d)),o=[...e];if(i.length){let d=fa(i);o.sort((f,y)=>{for(let x of d){let $=x(f,y);if($)return $}return 0})}if(!n.pagination)return o;let{page:t,pageSize:c}=n.pagination;return!t||!c?o:n.pagination?o.slice((t-1)*c,t*c):o}}createRenderRoot(){return this}deselectAll(){this.selected=[],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}selectAll(){this.selected=[...this.data],this.dispatchEvent(new CustomEvent("selected",{detail:this.selected}))}update(e){e.has("select")&&this.select==="single"&&this.selected.length>1&&(this.selected=[this.selected[0]],this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))),super.update(e)}render(){let e=this.columns.filter(o=>!o.hidden);this.select!=="none"&&e.unshift({title:this.select==="multi"?S`<spectric-input variant="checkbox" @change=${this._handleSelectAllChange} .helperText=${"Select All"}></spectric-input>`:null,render:o=>{let t=document.createElement("div"),c=this.selected.includes(o),d=S`<spectric-input variant="checkbox" class="table-checkbox-${this.select}" ${Ae({checked:c})} @change=${f=>{f.stopPropagation();let y=this.selected.findIndex(x=>x===o);if(!(f.target.checked&&y!==-1)){{if(!f.target.checked&&y===-1)return;!f.target.checked&&y!==-1&&this.selected.splice(y,1)}f.target.checked&&(this.select==="single"&&(this.selected=[]),this.selected.push(o)),this.dispatchEvent(new CustomEvent("selected",{detail:[...this.selected]}))}}}></spectric-input>`;return Ge(d,t),d}});const n=4;let i=this.rowHeight-n;return i<this.fontSize+n&&(i=this.fontSize+n),S`
1140
+ <div class="table-wrapper" style="--rowHeight:${i}px;--fontSize:${this.fontSize}px;--lineClamp:${Math.floor(i/this.fontSize)}">
1110
1141
  <div role="table">
1111
- <spectric-table-header .columns=${t} @sortChange=${this._handleSortChange}></spectric-table-header>
1112
- ${this.rowHeight>=25&&this.data.length>=100?A`<spectric-table-virtual-body .columns=${t} .data=${this.data} .table=${this} .rowHeight=${this.rowHeight}></spectric-table-virtual-body>`:A`<spectric-table-body .columns=${t} .data=${this.data} .table=${this}></spectric-table-body>`}
1142
+ <spectric-table-header .columns=${e} @sortChange=${this._handleSortChange} @columnResize=${this._handleColumnResize}></spectric-table-header>
1143
+ <spectric-table-virtual-body .columns=${e} .data=${this.data} .table=${this} .rowHeight=${i}></spectric-table-virtual-body>
1113
1144
  </div>
1114
1145
  </div>
1115
- ${this.pagination?A`<spectric-pagination ${Ze(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>`:null}
1116
- `}},ne([v({type:Array,attribute:!1})],d.TableElement.prototype,"data",2),ne([v({type:Object,attribute:!1})],d.TableElement.prototype,"pagination",2),ne([v({attribute:!1})],d.TableElement.prototype,"columns",2),ne([v({type:String,reflect:!0})],d.TableElement.prototype,"select",2),ne([v({type:String,reflect:!0})],d.TableElement.prototype,"sort",2),ne([v({type:Number,reflect:!0})],d.TableElement.prototype,"rowHeight",2),ne([xe()],d.TableElement.prototype,"selected",2),d.TableElement=ne([D(vi)],d.TableElement);var aa=Object.defineProperty,ca=Object.getOwnPropertyDescriptor,ae=(o,t,s,i)=>{for(var n=i>1?void 0:i?ca(t,s):t,e=o.length-1,p;e>=0;e--)(p=o[e])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&aa(t,s,n),n};const $i="spectric-tooltip";var wi=(o=>(o.top="top",o.bottom="bottom",o.left="left",o.right="right",o.mouse="mouse",o))(wi||{});d.TooltipElement=class extends Ye{constructor(){super(),this.delay=100,this.animationDuration=0,this.text="",this.position="right",this.maxWidth=300,this.portalTarget=document.body,this.open=!1,this._getMousePosition=t=>{this.mouseLocation={left:t.clientX,top:t.clientY},this.position=="mouse"&&this.open&&!this.mouseframe&&(this.mouseframe=requestAnimationFrame(()=>this.positionTooltip()))},this._hideTooltip=()=>{this.timer&&clearTimeout(this.timer),this.open=!1,this.portalElement.remove()},this.showToolTip=async()=>{this.timer&&clearTimeout(this.timer),await new Promise(s=>{this.timer=window.setTimeout(s,this.delay)}),this.portalElement.style.pointerEvents="none",this.portalElement.className=`spectric-tooltip-portal ${this.position}`;const t=A`<div class="tooltip-container">
1146
+ ${this.pagination?S`<spectric-pagination ${Ae(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>`:null}
1147
+ `}},X([b({type:Array,attribute:!1})],h.SpectricTableElement.prototype,"data",2),X([b({type:Object,attribute:!1})],h.SpectricTableElement.prototype,"pagination",2),X([b({attribute:!1})],h.SpectricTableElement.prototype,"columns",2),X([b({type:String,reflect:!0})],h.SpectricTableElement.prototype,"select",2),X([b({type:String,reflect:!0})],h.SpectricTableElement.prototype,"sort",2),X([b({type:Array,reflect:!1})],h.SpectricTableElement.prototype,"sortOrder",2),X([b({type:Number,reflect:!0})],h.SpectricTableElement.prototype,"rowHeight",2),X([b({type:Number,reflect:!0})],h.SpectricTableElement.prototype,"fontSize",2),X([F()],h.SpectricTableElement.prototype,"selected",2),h.SpectricTableElement=X([O(_r)],h.SpectricTableElement);var ba=Object.defineProperty,ma=Object.getOwnPropertyDescriptor,pe=(s,e,n,i)=>{for(var o=i>1?void 0:i?ma(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&ba(e,n,o),o};const ya="spectric-popover";let Q=class extends ae{constructor(){super(),this.delay=100,this.animationDuration=0,this.text="",this.position="right",this.maxWidth=300,this.portalTarget=document.body,this.open=!1,this._getMousePosition=s=>{this.mouseLocation={left:s.clientX,top:s.clientY},this.position=="mouse"&&this.open&&!this.mouseframe&&(this.mouseframe=requestAnimationFrame(()=>this.positionTooltip()))},this.applyStyle=s=>{Object.entries(s).forEach(([e,n])=>{this.portalElement.style.setProperty(e,n)})},this.positionTooltip=()=>{if(!this.target)return;let s=getComputedStyle(this),e={"--spectric-primary":s.getPropertyValue("--spectric-primary"),"--spectric-background-inverse":s.getPropertyValue("--spectric-background-inverse"),"--spectric-background-hover":s.getPropertyValue("--spectric-background-hover"),"--spectric-text-on-color":s.getPropertyValue("--spectric-text-on-color"),"--spectric-border-radius":s.getPropertyValue("--spectric-border-radius")};const n=this.target.getBoundingClientRect(),i=this.portalElement.getBoundingClientRect();this.target!==document.body&&this.maxWidth&&this.maxWidth>0&&(i.width=Math.min(i.width,this.maxWidth));let o;this.position==="mouse"&&this.mouseLocation?(this.mouseframe=void 0,o={left:this.mouseLocation.left+10+"px",top:this.mouseLocation.top-i.height/2+"px"}):this.position==="top"?o={top:n.top-i.height+"px",left:n.left+n.width/2-i.width/2+"px"}:this.position==="bottom"?o={top:n.bottom+"px",left:n.left+n.width/2-i.width/2+"px"}:this.position==="left"?o={top:Math.max(0,n.top+n.height/2-i.height/2)+"px",left:n.left-i.width+"px"}:this.position==="right"?o={top:Math.max(0,n.top+n.height/2-i.height/2)+"px",left:n.right+"px"}:(o={left:"0px",top:"0px"},console.error("Unknown position... Maybe we sould implement auto?")),this.applyStyle({...e,...o}),this.position!=="mouse"&&this.portalElement.animate({opacity:[0,1]},{duration:this.animationDuration})},this.showPopover=this.showPopover.bind(this),this.hidePopover=this.hidePopover.bind(this),this.addDisposableListener(()=>this.target,"mousemove",this._getMousePosition)}get target(){return this.triggerTarget||this.parentElement}connectedCallback(){super.connectedCallback(),this.portalElement=document.createElement("div"),this.portalElement.className="spectric-tooltip-portal",console.log("connected")}disconnectedCallback(){super.disconnectedCallback(),this.portalElement.remove(),this.portalElement=void 0}hidePopover(){this.timer&&clearTimeout(this.timer),this.open=!1,this.portalElement.remove()}async showPopover(){this.timer&&clearTimeout(this.timer),await new Promise(e=>{this.timer=window.setTimeout(e,this.delay)}),this.portalElement.className=`spectric-popover-portal ${this.position}`;const s=S`<div class="tooltip-container">
1117
1148
  <span class="tooltip-caret"></span>
1118
1149
  <div class="tooltip-content">${this.text}</div>
1119
- </div>`;We(t,this.portalElement),!(!this.target||!this.target.checkVisibility())&&(this.portalTarget.appendChild(this.portalElement),this.open=!0,requestAnimationFrame(this.positionTooltip))},this.applyStyle=t=>{Object.entries(t).forEach(([s,i])=>{this.portalElement.style.setProperty(s,i)})},this.positionTooltip=()=>{if(!this.target)return;let t=getComputedStyle(this),s={"--spectric-primary":t.getPropertyValue("--spectric-primary"),"--spectric-background-inverse":t.getPropertyValue("--spectric-background-inverse"),"--spectric-background-hover":t.getPropertyValue("--spectric-background-hover"),"--spectric-text-on-color":t.getPropertyValue("--spectric-text-on-color"),"--spectric-border-radius":t.getPropertyValue("--spectric-border-radius")};const i=this.target.getBoundingClientRect(),n=this.portalElement.getBoundingClientRect();this.target!==document.body&&this.maxWidth&&this.maxWidth>0&&(n.width=Math.min(n.width,this.maxWidth));let e;this.position==="mouse"&&this.mouseLocation?(this.mouseframe=void 0,e={left:this.mouseLocation.left+10+"px",top:this.mouseLocation.top-n.height/2+"px"}):this.position==="top"?e={top:i.top-n.height+"px",left:i.left+i.width/2-n.width/2+"px"}:this.position==="bottom"?e={top:i.bottom+"px",left:i.left+i.width/2-n.width/2+"px"}:this.position==="left"?e={top:Math.max(0,i.top+i.height/2-n.height/2)+"px",left:i.left-n.width+"px"}:this.position==="right"?e={top:Math.max(0,i.top+i.height/2-n.height/2)+"px",left:i.right+"px"}:(e={left:"0px",top:"0px"},console.error("Unknown position... Maybe we sould implement auto?")),this.applyStyle({...s,...e}),this.position!=="mouse"&&this.portalElement.animate({opacity:[0,1]},{duration:this.animationDuration})},this.addDisposableListener(()=>this.target,"mousemove",this._getMousePosition),this.addDisposableListener(()=>this.target,"mouseover",this.showToolTip),this.addDisposableListener(()=>this.target,"mouseleave",this._hideTooltip)}get target(){return this.triggerTarget||this.parentElement}connectedCallback(){super.connectedCallback(),this.portalElement=document.createElement("div"),this.portalElement.className="spectric-tooltip-portal"}disconnectedCallback(){super.disconnectedCallback(),this.portalElement.remove(),this.portalElement=void 0}render(){return A`<!-- ToolTip -->`}},d.TooltipElement.styles=F`:host{max-height: 0px;
1150
+ </div>`;Ge(s,this.portalElement),!(!this.target||!this.target.checkVisibility())&&(this.portalTarget.appendChild(this.portalElement),this.open=!0,requestAnimationFrame(this.positionTooltip))}render(){return S`<!-- ToolTip -->`}};Q.styles=I`:host{max-height: 0px;
1120
1151
  max-width: 0px;
1121
1152
  display: none;
1122
- pointer-events:none;}`,ae([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"delay",2),ae([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"animationDuration",2),ae([v({type:String,reflect:!1})],d.TooltipElement.prototype,"text",2),ae([v({type:String,reflect:!0})],d.TooltipElement.prototype,"position",2),ae([v({type:Number,reflect:!0})],d.TooltipElement.prototype,"maxWidth",2),ae([v({attribute:!1})],d.TooltipElement.prototype,"portalTarget",2),ae([v({attribute:!1})],d.TooltipElement.prototype,"triggerTarget",2),d.TooltipElement=ae([D($i)],d.TooltipElement),d.ButtonSizes=Wr,d.ButtonVariants=Vr,d.CSSPropsControls=zn,d.DialogElementTag=tr,d.ElementTag=di,d.InputVariants=Jr,d.Orientations=ui,d.PaginationElementTag=hi,d.SupportedLanguages=si,d.TableElementTag=vi,d.TableSelectOptions=mi,d.TableSortDirection=R,d.TableSortOption=yi,d.ThemeSelections=Rn,d.TooltipElementTag=$i,d.TooltipPostions=wi,d.nodeTypes=J,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
1153
+ pointer-events:none;}`,pe([b({type:Number,reflect:!0})],Q.prototype,"delay",2),pe([b({type:Number,reflect:!0})],Q.prototype,"animationDuration",2),pe([b({type:String,reflect:!1})],Q.prototype,"text",2),pe([b({type:String,reflect:!0})],Q.prototype,"position",2),pe([b({type:Number,reflect:!0})],Q.prototype,"maxWidth",2),pe([b({attribute:!1})],Q.prototype,"portalTarget",2),pe([b({attribute:!1})],Q.prototype,"triggerTarget",2),Q=pe([O(ya)],Q);var $a=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,ue=(s,e,n,i)=>{for(var o=i>1?void 0:i?wa(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&$a(e,n,o),o};const xr="spectric-tooltip";var Cr=(s=>(s.top="top",s.bottom="bottom",s.left="left",s.right="right",s.mouse="mouse",s))(Cr||{});h.TooltipElement=class extends Q{constructor(){super(),this.delay=100,this.animationDuration=0,this.text="",this.position="right",this.maxWidth=300,this.portalTarget=document.body,this.open=!1,this.addDisposableListener(()=>this.target,"mouseover",this.showToolTip),this.addDisposableListener(()=>this.target,"mouseleave",this.hidePopover)}async showToolTip(){await super.showPopover(),this.portalElement.classList.add("spectric-tooltip-portal")}render(){return S`<!-- ToolTip -->`}},h.TooltipElement.styles=I`:host{max-height: 0px;
1154
+ max-width: 0px;
1155
+ display: none;
1156
+ pointer-events:none;}`,ue([b({type:Number,reflect:!0})],h.TooltipElement.prototype,"delay",2),ue([b({type:Number,reflect:!0})],h.TooltipElement.prototype,"animationDuration",2),ue([b({type:String,reflect:!1})],h.TooltipElement.prototype,"text",2),ue([b({type:String,reflect:!0})],h.TooltipElement.prototype,"position",2),ue([b({type:Number,reflect:!0})],h.TooltipElement.prototype,"maxWidth",2),ue([b({attribute:!1})],h.TooltipElement.prototype,"portalTarget",2),ue([b({attribute:!1})],h.TooltipElement.prototype,"triggerTarget",2),h.TooltipElement=ue([O(xr)],h.TooltipElement);var _a=Object.defineProperty,Sa=Object.getOwnPropertyDescriptor,ke=(s,e,n,i)=>{for(var o=i>1?void 0:i?Sa(e,n):e,t=s.length-1,c;t>=0;t--)(c=s[t])&&(o=(i?c(e,n,o):c(o))||o);return i&&o&&_a(e,n,o),o};let he=class extends D{constructor(){super(...arguments),this.value="#FF0000FF",this.showAlpha=!0,this.hue=0,this.alpha=1,this.saturation=1,this.lightness=1,this.canvas=tt(),this.sldown=!1,this._handleSaturationLightnessClick=s=>{if(!this.canvas.value)return;let{offsetX:e,offsetY:n}=s;this.saturation=e/this.canvas.value.width,this.lightness=(this.canvas.value.height-n)/this.canvas.value.height,this.updateValue()},this._handleHueChange=s=>{this.hue=parseInt(String(s.target.value))/100*360,s.target.style.setProperty("accent-color",`hsl(${this.hue}deg 100% 50%)`),this.renderHueSaturationGrid(),this.updateValue()},this._handleAlphaChange=s=>{this.alpha=parseInt(String(s.target.value))/100,console.log(this.alpha,s),this.updateValue()},this._handleApply=()=>{var s;console.log(this.hue,this.saturation,this.lightness,this.alpha),this.updateValue(),console.log(this.value),(s=this.querySelector("spectric-popover"))==null||s.hidePopover()},this._cancel=()=>{var s;this.original&&(this.value=this.original),(s=this.querySelector("spectric-popover"))==null||s.hidePopover()},this._openPopover=async()=>{var s;for(this.original=this.value,(s=this.querySelector("spectric-popover"))==null||s.showPopover();!this.canvas.value;)await new Promise(e=>setTimeout(e,100));this.renderHueSaturationGrid()}}createRenderRoot(){return this}update(s){if(s.has("value")){let{h:e,s:n,l:i,a:o}=Ca(this.value);this.hue=e,this.saturation=n,this.lightness=i,this.alpha=o,this.renderHueSaturationGrid()}super.update(s)}renderHueSaturationGrid(){if(console.log("canvas render"),!this.canvas.value)return;let e=this.canvas.value.getContext("2d");if(!e)return;let n=this.canvas.value.width/100,i=this.canvas.value.height/100,o=0,t=0;for(let c of Aa(this.hue))e.fillStyle=c,e.fillRect(o,t,n,i),o+=n,o=o%(n*101),o||(t+=i)}updateValue(){this.value=xa(this.hue,this.saturation*100,this.lightness*100)+Math.round(this.alpha*255).toString(16).padStart(2,"0")}getPopover(){return S`
1157
+ <spectric-input label="Hue" class="hue-gradient" variant="range" .value=${this.hue||0} style="accent-color:hsl(${this.hue}deg 100% 50%)" @change=${this._handleHueChange}></spectric-input>
1158
+ <canvas ${rt(this.canvas)} width=200 height=100 class="saturation-lightness-grid" @click=${this._handleSaturationLightnessClick}
1159
+ @mousedown=${()=>{this.sldown=!0}}
1160
+ @mouseup=${()=>this.sldown=!1}
1161
+ @mousemove=${s=>{this.sldown&&this._handleSaturationLightnessClick(s)}}
1162
+ ></canvas>
1163
+ <spectric-input class="alpha-gradient" ?hidden=${!this.showAlpha} label="Opacity" variant="range" .value=${(this.alpha||1)*100} @change=${this._handleAlphaChange}></spectric-input>
1164
+ <div class="color-picker-footer">
1165
+ <spectric-button @click=${this._handleApply}>Apply</spectric-button>
1166
+ <spectric-button variant="secondary" @click=${this._cancel}>Cancel</spectric-button>
1167
+ </div>
1168
+ `}render(){return S`
1169
+ <spectric-button variant="text" @click=${this._openPopover}>
1170
+ <spectric-popover .text=${this.getPopover()} icon variant="text"></spectric-popover>
1171
+ <div style="width:15px;height:15px;background-color:${this.value}"></div>
1172
+ </spectric-button>
1173
+ `}};ke([b({type:String,reflect:!0})],he.prototype,"value",2),ke([b({type:Boolean,reflect:!0})],he.prototype,"showAlpha",2),ke([F()],he.prototype,"hue",2),ke([F()],he.prototype,"alpha",2),ke([F()],he.prototype,"saturation",2),ke([F()],he.prototype,"lightness",2),he=ke([O("spectric-colorpicker")],he);function*Aa(s){for(let e=100;e>=0;e--)for(let n=0;n<=100;n++)yield`hsl(${s}, ${n}%, ${e}%)`}function xa(s,e,n){n/=100;const i=e*Math.min(n,1-n)/100,o=t=>{const c=(t+s/30)%12,d=n-i*Math.max(Math.min(c-3,9-c,1),-1);return Math.round(255*d).toString(16).padStart(2,"0")};return`#${o(0)}${o(8)}${o(4)}`}function Ca(s){let e=0,n=0,i=0,o=255;s.length===4||s.length===5?(e=parseInt(s[1]+s[1],16),n=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16),s.length===5&&(o=parseInt(s[4]+s[4],16))):(s.length===7||s.length===9)&&(e=parseInt(s.substring(1,3),16),n=parseInt(s.substring(3,5),16),i=parseInt(s.substring(5,7),16),s.length===9&&(o=parseInt(s.substring(7,9),16))),e/=255,n/=255,i/=255,o/=255;const t=Math.max(e,n,i),c=Math.min(e,n,i);let d=0,f=0,y=(t+c)/2;if(t===c)d=0,f=0;else{const x=t-c;switch(f=y>.5?x/(2-t-c):x/(t+c),t){case e:d=(n-i)/x+(n<i?6:0);break;case n:d=(i-e)/x+2;break;case i:d=(e-n)/x+4;break}d/=6}return d=Math.round(d*360),{h:d,s:f,l:y,a:o}}const Ea={...ea,...Object.freeze(Object.defineProperty({__proto__:null,get BitDisplayCanvas(){return h.BitDisplayCanvas},ButtonSizes:Gt,ButtonVariants:Jt,CSSPropsControls:Ei,get DialogElement(){return h.DialogElement},DialogElementTag:_t,ElementTag:mr,get Header(){return h.Header},InputVariants:lr,Orientations:br,get PaginationElement(){return h.PaginationElement},PaginationElementTag:yr,get SpectricButton(){return h.SpectricButton},get SpectricInput(){return h.SpectricInput},get SpectricPage(){return h.SpectricPage},get SpectricPanel(){return h.SpectricPanel},get SpectricQuery(){return h.SpectricQuery},get SpectricTableElement(){return h.SpectricTableElement},get SpectricThemeProvider(){return h.SpectricThemeProvider},get SplitView(){return h.SplitView},SupportedLanguages:fr,TableElementTag:_r,TableSelectOptions:Sr,TableSortDirection:B,TableSortOption:Ar,ThemeSelections:Ti,get TooltipElement(){return h.TooltipElement},TooltipElementTag:xr,TooltipPostions:Cr,nodeTypes:K},Symbol.toStringTag,{value:"Module"})),...Object.freeze(Object.defineProperty({__proto__:null,SpreadPropsDirective:or,debounce:mi,debounceAnimation:gt,once:Li,spreadProps:Ae},Symbol.toStringTag,{value:"Module"}))};h.BitArray=sr,h.ButtonSizes=Gt,h.ButtonVariants=Jt,h.CSSPropsControls=Ei,h.DialogElementTag=_t,h.DisposableElement=ae,h.ElementTag=mr,h.InputVariants=lr,h.Orientations=br,h.PaginationElementTag=yr,h.SpreadPropsDirective=or,h.SupportedLanguages=fr,h.TableElementTag=_r,h.TableSelectOptions=Sr,h.TableSortDirection=B,h.TableSortOption=Ar,h.ThemeSelections=Ti,h.TooltipElementTag=xr,h.TooltipPostions=Cr,h.debounce=mi,h.debounceAnimation=gt,h.default=Ea,h.getListeners=hi,h.nodeTypes=K,h.once=Li,h.spreadProps=Ae,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1123
1174
  //# sourceMappingURL=index.umd.js.map