@kodaris/krubble-components 1.0.27 → 1.0.30

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.
@@ -1,25 +1,25 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).kr={})}(this,function(e){"use strict";
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).kr={})}(this,(function(e){"use strict";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
- */const t=globalThis,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),r=new WeakMap;let s=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=r.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&r.set(t,e))}return e}toString(){return this.cssText}};const n=(e,...t)=>{const i=1===e.length?e[0]:t.reduce((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1],e[0]);return new s(i,e,o)},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new s("string"==typeof e?e:e+"",void 0,o))(t)})(e):e,{is:a,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,f=globalThis,g=f.trustedTypes,b=g?g.emptyScript:"",v=f.reactiveElementPolyfillSupport,y=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?b:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},x=(e,t)=>!a(e,t),_={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:x};
6
+ */const t=globalThis,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),r=new WeakMap;let s=class{constructor(e,t,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=r.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&r.set(t,e))}return e}toString(){return this.cssText}};const n=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,o)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+e[o+1]),e[0]);return new s(i,e,o)},l=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return(e=>new s("string"==typeof e?e:e+"",void 0,o))(t)})(e):e
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2017 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);void 0!==o&&d(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:r}=c(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:o,set(t){const s=o?.call(this);r?.call(this,t),this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const e=u(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const e=this.properties,t=[...h(e),...p(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.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((e,o)=>{if(i)e.adoptedStyleSheets=o.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const i of o){const o=document.createElement("style"),r=t.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=i.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:m).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:m;this._$Em=o;const s=r.fromAttribute(t,e.type);this[o]=s??this._$Ej?.get(o)??s,this._$Em=null}}requestUpdate(e,t,i,o=!1,r){if(void 0!==e){const s=this.constructor;if(!1===o&&(r=this[e]),i??=s.getPropertyOptions(e),!((i.hasChanged??x)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:o,wrapped:r},s){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==r||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===o&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e){const{wrapped:e}=i,o=this[t];!0!==e||this._$AL.has(t)||void 0===o||this.C(t,void 0,i,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[y("elementProperties")]=new Map,k[y("finalized")]=new Map,v?.({ReactiveElement:k}),(f.reactiveElementVersions??=[]).push("2.1.2");
11
+ */,{is:a,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,f=globalThis,g=f.trustedTypes,b=g?g.emptyScript:"",v=f.reactiveElementPolyfillSupport,y=(e,t)=>e,m={toAttribute(e,t){switch(t){case Boolean:e=e?b:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},x=(e,t)=>!a(e,t),_={attribute:!0,type:String,converter:m,reflect:!1,useDefault:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;let k=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(e,i,t);void 0!==o&&d(this.prototype,e,o)}}static getPropertyDescriptor(e,t,i){const{get:o,set:r}=c(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:o,set(t){const s=o?.call(this);r?.call(this,t),this.requestUpdate(e,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const e=u(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const e=this.properties,t=[...h(e),...p(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const i=this._$Eu(e,t);void 0!==i&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(l(e))}else void 0!==e&&t.push(l(e));return t}static _$Eu(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.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((e,o)=>{if(i)e.adoptedStyleSheets=o.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of o){const o=document.createElement("style"),r=t.litNonce;void 0!==r&&o.setAttribute("nonce",r),o.textContent=i.cssText,e.appendChild(o)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$AK(e,i)}_$ET(e,t){const i=this.constructor.elementProperties.get(e),o=this.constructor._$Eu(e,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:m).toAttribute(t,i.type);this._$Em=e,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(e,t){const i=this.constructor,o=i._$Eh.get(e);if(void 0!==o&&this._$Em!==o){const e=i.getPropertyOptions(o),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:m;this._$Em=o;const s=r.fromAttribute(t,e.type);this[o]=s??this._$Ej?.get(o)??s,this._$Em=null}}requestUpdate(e,t,i,o=!1,r){if(void 0!==e){const s=this.constructor;if(!1===o&&(r=this[e]),i??=s.getPropertyOptions(e),!((i.hasChanged??x)(r,t)||i.useDefault&&i.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,i))))return;this.C(e,t,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:i,reflect:o,wrapped:r},s){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==r||void 0!==s)||(this._$AL.has(e)||(this.hasUpdated||i||(t=void 0),this._$AL.set(e,t)),!0===o&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e){const{wrapped:e}=i,o=this[t];!0!==e||this._$AL.has(t)||void 0===o||this.C(t,void 0,i,o)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[y("elementProperties")]=new Map,k[y("finalized")]=new Map,v?.({ReactiveElement:k}),(f.reactiveElementVersions??=[]).push("2.1.2");
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2017 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const w=globalThis,$=e=>e,R=w.trustedTypes,S=R?R.createPolicy("lit-html",{createHTML:e=>e}):void 0,C="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+T,E=`<${A}>`,K=document,O=()=>K.createComment(""),z=e=>null===e||"object"!=typeof e&&"function"!=typeof e,P=Array.isArray,L="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,M=/>/g,B=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,q=/"/g,I=/^(?:script|style|textarea|title)$/i,H=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),V=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),N=new WeakMap,W=K.createTreeWalker(K,129);function Z(e,t){if(!P(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==S?S.createHTML(t):t}const G=(e,t)=>{const i=e.length-1,o=[];let r,s=2===t?"<svg>":3===t?"<math>":"",n=j;for(let t=0;t<i;t++){const i=e[t];let l,a,d=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===j?"!--"===a[1]?n=D:void 0!==a[1]?n=M:void 0!==a[2]?(I.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=B):void 0!==a[3]&&(n=B):n===B?">"===a[0]?(n=r??j,d=-1):void 0===a[1]?d=-2:(d=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?B:'"'===a[3]?q:F):n===q||n===F?n=B:n===D||n===M?n=j:(n=B,r=void 0);const h=n===B&&e[t+1].startsWith("/>")?" ":"";s+=n===j?i+E:d>=0?(o.push(l),i.slice(0,d)+C+i.slice(d)+T+h):i+T+(-2===d?t:h)}return[Z(e,s+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),o]};class Q{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let r=0,s=0;const n=e.length-1,l=this.parts,[a,d]=G(e,t);if(this.el=Q.createElement(a,i),W.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=W.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(C)){const t=d[s++],i=o.getAttribute(e).split(T),n=/([.?@])?(.*)/.exec(t);l.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?te:"?"===n[1]?ie:"@"===n[1]?oe:ee}),o.removeAttribute(e)}else e.startsWith(T)&&(l.push({type:6,index:r}),o.removeAttribute(e));if(I.test(o.tagName)){const e=o.textContent.split(T),t=e.length-1;if(t>0){o.textContent=R?R.emptyScript:"";for(let i=0;i<t;i++)o.append(e[i],O()),W.nextNode(),l.push({type:2,index:++r});o.append(e[t],O())}}}else if(8===o.nodeType)if(o.data===A)l.push({type:2,index:r});else{let e=-1;for(;-1!==(e=o.data.indexOf(T,e+1));)l.push({type:7,index:r}),e+=T.length-1}r++}}static createElement(e,t){const i=K.createElement("template");return i.innerHTML=e,i}}function X(e,t,i=e,o){if(t===V)return t;let r=void 0!==o?i._$Co?.[o]:i._$Cl;const s=z(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(e),r._$AT(e,i,o)),void 0!==o?(i._$Co??=[])[o]=r:i._$Cl=r),void 0!==r&&(t=X(e,r._$AS(e,t.values),r,o)),t}class Y{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,o=(e?.creationScope??K).importNode(t,!0);W.currentNode=o;let r=W.nextNode(),s=0,n=0,l=i[0];for(;void 0!==l;){if(s===l.index){let t;2===l.type?t=new J(r,r.nextSibling,this,e):1===l.type?t=new l.ctor(r,l.name,l.strings,this,e):6===l.type&&(t=new re(r,this,e)),this._$AV.push(t),l=i[++n]}s!==l?.index&&(r=W.nextNode(),s++)}return W.currentNode=K,o}p(e){let t=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class J{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,o){this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=X(this,e,t),z(e)?e===U||null==e||""===e?(this._$AH!==U&&this._$AR(),this._$AH=U):e!==this._$AH&&e!==V&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>P(e)||"function"==typeof e?.[Symbol.iterator])(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!==U&&z(this._$AH)?this._$AA.nextSibling.data=e:this.T(K.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=Q.createElement(Z(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new Y(o,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=N.get(e.strings);return void 0===t&&N.set(e.strings,t=new Q(e)),t}k(e){P(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const r of e)o===t.length?t.push(i=new J(this.O(O()),this.O(O()),this,this.options)):i=t[o],i._$AI(r),o++;o<t.length&&(this._$AR(i&&i._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=$(e).nextSibling;$(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class ee{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,o,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}_$AI(e,t=this,i,o){const r=this.strings;let s=!1;if(void 0===r)e=X(this,e,t,0),s=!z(e)||e!==this._$AH&&e!==V,s&&(this._$AH=e);else{const o=e;let n,l;for(e=r[0],n=0;n<r.length-1;n++)l=X(this,o[i+n],t,n),l===V&&(l=this._$AH[n]),s||=!z(l)||l!==this._$AH[n],l===U?e=U:e!==U&&(e+=(l??"")+r[n+1]),this._$AH[n]=l}s&&!o&&this.j(e)}j(e){e===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class te extends ee{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===U?void 0:e}}class ie extends ee{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==U)}}class oe extends ee{constructor(e,t,i,o,r){super(e,t,i,o,r),this.type=5}_$AI(e,t=this){if((e=X(this,e,t,0)??U)===V)return;const i=this._$AH,o=e===U&&i!==U||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==U&&(i===U||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class re{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){X(this,e)}}const se=w.litHtmlPolyfillSupport;se?.(Q,J),(w.litHtmlVersions??=[]).push("3.3.2");const ne=globalThis;
17
+ const w=globalThis,$=w.trustedTypes,R=$?$.createPolicy("lit-html",{createHTML:e=>e}):void 0,S="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,T="?"+C,A=`<${T}>`,E=document,K=()=>E.createComment(""),O=e=>null===e||"object"!=typeof e&&"function"!=typeof e,z=Array.isArray,P="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,D=/>/g,M=RegExp(`>|${P}(?:([^\\s"'>=/]+)(${P}*=${P}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),B=/'/g,F=/"/g,I=/^(?:script|style|textarea|title)$/i,q=(e=>(t,...i)=>({_$litType$:e,strings:t,values:i}))(1),H=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),U=new WeakMap,N=E.createTreeWalker(E,129);function W(e,t){if(!z(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(t):t}const Z=(e,t)=>{const i=e.length-1,o=[];let r,s=2===t?"<svg>":3===t?"<math>":"",n=L;for(let t=0;t<i;t++){const i=e[t];let l,a,d=-1,c=0;for(;c<i.length&&(n.lastIndex=c,a=n.exec(i),null!==a);)c=n.lastIndex,n===L?"!--"===a[1]?n=j:void 0!==a[1]?n=D:void 0!==a[2]?(I.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=M):void 0!==a[3]&&(n=M):n===M?">"===a[0]?(n=r??L,d=-1):void 0===a[1]?d=-2:(d=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?M:'"'===a[3]?F:B):n===F||n===B?n=M:n===j||n===D?n=L:(n=M,r=void 0);const h=n===M&&e[t+1].startsWith("/>")?" ":"";s+=n===L?i+A:d>=0?(o.push(l),i.slice(0,d)+S+i.slice(d)+C+h):i+C+(-2===d?t:h)}return[W(e,s+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),o]};class G{constructor({strings:e,_$litType$:t},i){let o;this.parts=[];let r=0,s=0;const n=e.length-1,l=this.parts,[a,d]=Z(e,t);if(this.el=G.createElement(a,i),N.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(o=N.nextNode())&&l.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const e of o.getAttributeNames())if(e.endsWith(S)){const t=d[s++],i=o.getAttribute(e).split(C),n=/([.?@])?(.*)/.exec(t);l.push({type:1,index:r,name:n[2],strings:i,ctor:"."===n[1]?ee:"?"===n[1]?te:"@"===n[1]?ie:J}),o.removeAttribute(e)}else e.startsWith(C)&&(l.push({type:6,index:r}),o.removeAttribute(e));if(I.test(o.tagName)){const e=o.textContent.split(C),t=e.length-1;if(t>0){o.textContent=$?$.emptyScript:"";for(let i=0;i<t;i++)o.append(e[i],K()),N.nextNode(),l.push({type:2,index:++r});o.append(e[t],K())}}}else if(8===o.nodeType)if(o.data===T)l.push({type:2,index:r});else{let e=-1;for(;-1!==(e=o.data.indexOf(C,e+1));)l.push({type:7,index:r}),e+=C.length-1}r++}}static createElement(e,t){const i=E.createElement("template");return i.innerHTML=e,i}}function Q(e,t,i=e,o){if(t===H)return t;let r=void 0!==o?i._$Co?.[o]:i._$Cl;const s=O(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(e),r._$AT(e,i,o)),void 0!==o?(i._$Co??=[])[o]=r:i._$Cl=r),void 0!==r&&(t=Q(e,r._$AS(e,t.values),r,o)),t}class X{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:i}=this._$AD,o=(e?.creationScope??E).importNode(t,!0);N.currentNode=o;let r=N.nextNode(),s=0,n=0,l=i[0];for(;void 0!==l;){if(s===l.index){let t;2===l.type?t=new Y(r,r.nextSibling,this,e):1===l.type?t=new l.ctor(r,l.name,l.strings,this,e):6===l.type&&(t=new oe(r,this,e)),this._$AV.push(t),l=i[++n]}s!==l?.index&&(r=N.nextNode(),s++)}return N.currentNode=E,o}p(e){let t=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(e,i,t),t+=i.strings.length-2):i._$AI(e[t])),t++}}class Y{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,i,o){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=i,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Q(this,e,t),O(e)?e===V||null==e||""===e?(this._$AH!==V&&this._$AR(),this._$AH=V):e!==this._$AH&&e!==H&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>z(e)||"function"==typeof e?.[Symbol.iterator])(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!==V&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(E.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:i}=e,o="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=G.createElement(W(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===o)this._$AH.p(t);else{const e=new X(o,this),i=e.u(this.options);e.p(t),this.T(i),this._$AH=e}}_$AC(e){let t=U.get(e.strings);return void 0===t&&U.set(e.strings,t=new G(e)),t}k(e){z(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let i,o=0;for(const r of e)o===t.length?t.push(i=new Y(this.O(K()),this.O(K()),this,this.options)):i=t[o],i._$AI(r),o++;o<t.length&&(this._$AR(i&&i._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class J{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,i,o,r){this.type=1,this._$AH=V,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=V}_$AI(e,t=this,i,o){const r=this.strings;let s=!1;if(void 0===r)e=Q(this,e,t,0),s=!O(e)||e!==this._$AH&&e!==H,s&&(this._$AH=e);else{const o=e;let n,l;for(e=r[0],n=0;n<r.length-1;n++)l=Q(this,o[i+n],t,n),l===H&&(l=this._$AH[n]),s||=!O(l)||l!==this._$AH[n],l===V?e=V:e!==V&&(e+=(l??"")+r[n+1]),this._$AH[n]=l}s&&!o&&this.j(e)}j(e){e===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class ee extends J{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===V?void 0:e}}class te extends J{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==V)}}class ie extends J{constructor(e,t,i,o,r){super(e,t,i,o,r),this.type=5}_$AI(e,t=this){if((e=Q(this,e,t,0)??V)===H)return;const i=this._$AH,o=e===V&&i!==V||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==V&&(i===V||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class oe{constructor(e,t,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Q(this,e)}}const re=w.litHtmlPolyfillSupport;re?.(G,Y),(w.litHtmlVersions??=[]).push("3.3.2");const se=globalThis;
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
- */let le=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{const o=i?.renderBefore??t;let r=o._$litPart$;if(void 0===r){const e=i?.renderBefore??null;o._$litPart$=r=new J(t.insertBefore(O(),e),e,void 0,i??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return V}};le._$litElement$=!0,le.finalized=!0,ne.litElementHydrateSupport?.({LitElement:le});const ae=ne.litElementPolyfillSupport;ae?.({LitElement:le}),(ne.litElementVersions??=[]).push("4.2.2");const de=n`
22
+ */let ne=class extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,i)=>{const o=i?.renderBefore??t;let r=o._$litPart$;if(void 0===r){const e=i?.renderBefore??null;o._$litPart$=r=new Y(t.insertBefore(K(),e),e,void 0,i??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return H}};ne._$litElement$=!0,ne.finalized=!0,se.litElementHydrateSupport?.({LitElement:ne});const le=se.litElementPolyfillSupport;le?.({LitElement:ne}),(se.litElementVersions??=[]).push("4.2.2");const ae=n`
23
23
  :host,
24
24
  *,
25
25
  *::before,
@@ -51,12 +51,17 @@ const w=globalThis,$=e=>e,R=w.trustedTypes,S=R?R.createPolicy("lit-html",{create
51
51
  * @license
52
52
  * Copyright 2017 Google LLC
53
53
  * SPDX-License-Identifier: BSD-3-Clause
54
- */,ce=e=>(t,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)},he={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},pe=(e=he,t,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),"accessor"===o){const{name:o}=i;return{set(i){const r=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,r,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];t.call(this,i),this.requestUpdate(o,r,e,!0,i)}}throw Error("Unsupported decorator location: "+o)};function ue(e){return(t,i)=>"object"==typeof i?pe(e,t,i):((e,t,i)=>{const o=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),o?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)}
54
+ */,de=e=>(t,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(e,t)})):customElements.define(e,t)}
55
55
  /**
56
56
  * @license
57
57
  * Copyright 2017 Google LLC
58
58
  * SPDX-License-Identifier: BSD-3-Clause
59
- */function fe(e){return ue({...e,state:!0,attribute:!1})}
59
+ */,ce={attribute:!0,type:String,converter:m,reflect:!1,hasChanged:x},he=(e=ce,t,i)=>{const{kind:o,metadata:r}=i;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===o&&((e=Object.create(e)).wrapped=!0),s.set(i.name,e),"accessor"===o){const{name:o}=i;return{set(i){const r=t.get.call(this);t.set.call(this,i),this.requestUpdate(o,r,e,!0,i)},init(t){return void 0!==t&&this.C(o,void 0,e,t),t}}}if("setter"===o){const{name:o}=i;return function(i){const r=this[o];t.call(this,i),this.requestUpdate(o,r,e,!0,i)}}throw Error("Unsupported decorator location: "+o)};function pe(e){return(t,i)=>"object"==typeof i?he(e,t,i):((e,t,i)=>{const o=t.hasOwnProperty(i);return t.constructor.createProperty(i,e),o?Object.getOwnPropertyDescriptor(t,i):void 0})(e,t,i)
60
+ /**
61
+ * @license
62
+ * Copyright 2017 Google LLC
63
+ * SPDX-License-Identifier: BSD-3-Clause
64
+ */}function ue(e){return pe({...e,state:!0,attribute:!1})}
60
65
  /**
61
66
  * @license
62
67
  * Copyright 2017 Google LLC
@@ -67,7 +72,7 @@ const w=globalThis,$=e=>e,R=w.trustedTypes,S=R?R.createPolicy("lit-html",{create
67
72
  * Copyright 2017 Google LLC
68
73
  * SPDX-License-Identifier: BSD-3-Clause
69
74
  */
70
- function ge(e,t){return(t,i,o)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i))(t,i,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}var be=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRAccordion=class extends le{constructor(){super(...arguments),this.header="",this.expanded=!1}toggle(){this.expanded=!this.expanded}render(){return H`
75
+ function fe(e,t){return(t,i,o)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,i),i))(t,i,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}var ge=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRAccordion=class extends ne{constructor(){super(...arguments),this.header="",this.expanded=!1}toggle(){this.expanded=!this.expanded}render(){return q`
71
76
  <div class="header" @click=${this.toggle}>
72
77
  <span class="header__title">${this.header}</span>
73
78
  <svg class="header__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
@@ -133,30 +138,30 @@ function ge(e,t){return(t,i,o)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Ref
133
138
  .content__body {
134
139
  padding: 16px 16px 8px 16px;
135
140
  }
136
- `,be([ue({type:String})],e.KRAccordion.prototype,"header",void 0),be([ue({type:Boolean,reflect:!0})],e.KRAccordion.prototype,"expanded",void 0),e.KRAccordion=be([ce("kr-accordion")],e.KRAccordion);
141
+ `,ge([pe({type:String})],e.KRAccordion.prototype,"header",void 0),ge([pe({type:Boolean,reflect:!0})],e.KRAccordion.prototype,"expanded",void 0),e.KRAccordion=ge([de("kr-accordion")],e.KRAccordion);
137
142
  /**
138
143
  * @license
139
144
  * Copyright 2017 Google LLC
140
145
  * SPDX-License-Identifier: BSD-3-Clause
141
146
  */
142
- const ve=1,ye=2,me=3,xe=4,_e=e=>(...t)=>({_$litDirective$:e,values:t});let ke=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};
147
+ const be=1,ve=2,ye=3,me=4,xe=e=>(...t)=>({_$litDirective$:e,values:t});let _e=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,i){this._$Ct=e,this._$AM=t,this._$Ci=i}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};
143
148
  /**
144
149
  * @license
145
150
  * Copyright 2018 Google LLC
146
151
  * SPDX-License-Identifier: BSD-3-Clause
147
- */const we=_e(class extends ke{constructor(e){if(super(e),e.type!==ve||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e)));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const i=e.element.classList;for(const e of this.st)e in t||(i.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(i.add(e),this.st.add(e)):(i.remove(e),this.st.delete(e)))}return V}});var $e=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRAlert=class extends le{constructor(){super(...arguments),this.type="info",this.title="",this.dismissible=!1,this.visible=!0}_handleDismiss(){this.visible=!1,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}render(){const e={info:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/></svg>`,success:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>`,warning:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg>`,error:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`};return H`
152
+ */const ke=xe(class extends _e{constructor(e){if(super(e),e.type!==be||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,[t]){if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in t)t[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(t)}const i=e.element.classList;for(const e of this.st)e in t||(i.remove(e),this.st.delete(e));for(const e in t){const o=!!t[e];o===this.st.has(e)||this.nt?.has(e)||(o?(i.add(e),this.st.add(e)):(i.remove(e),this.st.delete(e)))}return H}});var we=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRAlert=class extends ne{constructor(){super(...arguments),this.type="info",this.title="",this.dismissible=!1,this.visible=!0}_handleDismiss(){this.visible=!1,this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}render(){const e={info:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/></svg>`,success:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>`,warning:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg>`,error:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`};return q`
148
153
  <div
149
- class=${we({alert:!0,["alert--"+this.type]:!0,"alert--has-header":!!this.title,"alert--hidden":!this.visible})}
154
+ class=${ke({alert:!0,["alert--"+this.type]:!0,"alert--has-header":!!this.title,"alert--hidden":!this.visible})}
150
155
  role="alert"
151
156
  >
152
157
  ${e[this.type]}
153
158
  <div class="content">
154
- ${this.title?H`<h4 class="header">${this.title}</h4>`:U}
159
+ ${this.title?q`<h4 class="header">${this.title}</h4>`:V}
155
160
  <div class="message">
156
161
  <slot></slot>
157
162
  </div>
158
163
  </div>
159
- ${this.dismissible?H`
164
+ ${this.dismissible?q`
160
165
  <button
161
166
  class="dismiss"
162
167
  type="button"
@@ -167,7 +172,7 @@ const ve=1,ye=2,me=3,xe=4,_e=e=>(...t)=>({_$litDirective$:e,values:t});let ke=cl
167
172
  <path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
168
173
  </svg>
169
174
  </button>
170
- `:U}
175
+ `:V}
171
176
  </div>
172
177
  `}},e.KRAlert.styles=n`
173
178
  :host {
@@ -285,23 +290,26 @@ const ve=1,ye=2,me=3,xe=4,_e=e=>(...t)=>({_$litDirective$:e,values:t});let ke=cl
285
290
  outline: 2px solid #3b82f6;
286
291
  outline-offset: 2px;
287
292
  }
288
- `,$e([ue({type:String})],e.KRAlert.prototype,"type",void 0),$e([ue({type:String})],e.KRAlert.prototype,"title",void 0),$e([ue({type:Boolean})],e.KRAlert.prototype,"dismissible",void 0),$e([ue({type:Boolean})],e.KRAlert.prototype,"visible",void 0),e.KRAlert=$e([ce("kr-alert")],e.KRAlert);var Re=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRButton=class extends le{constructor(){super(...arguments),this.variant="flat",this.color="primary",this.size="medium",this.disabled=!1,this.options=[],this._state="idle",this._stateText="",this._dropdownOpened=!1,this._handleHostClick=e=>{this.options.length&&(e.stopPropagation(),this._toggleDropdown())},this._handleKeydown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.options.length?this._toggleDropdown():this.click()),"Escape"===e.key&&this._dropdownOpened&&(this._dropdownOpened=!1)},this._handleClickOutside=e=>{this._dropdownOpened&&!this.contains(e.target)&&(this._dropdownOpened=!1)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role",this.href?"link":"button"),this.setAttribute("tabindex","0"),this.addEventListener("keydown",this._handleKeydown),this.addEventListener("click",this._handleHostClick),document.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown),this.removeEventListener("click",this._handleHostClick),document.removeEventListener("click",this._handleClickOutside)}_toggleDropdown(){this._dropdownOpened=!this._dropdownOpened,this._dropdownOpened&&requestAnimationFrame(()=>{const e=this.shadowRoot?.querySelector(".dropdown");if(e){const t=this.getBoundingClientRect();e.style.top=t.bottom+4+"px",e.style.left=t.left+"px",e.style.minWidth=t.width+"px";e.getBoundingClientRect().right>window.innerWidth&&(e.style.left="",e.style.right=window.innerWidth-t.right+"px")}})}_handleOptionClick(e,t){t.stopPropagation(),this._dropdownOpened=!1,this.dispatchEvent(new CustomEvent("option-select",{detail:{id:e.id,label:e.label},bubbles:!0,composed:!0}))}showLoading(){this._clearStateTimeout(),this._state="loading",this._stateText=""}showSuccess(e="Success",t=2e3){this._clearStateTimeout(),this._state="success",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout(()=>this.reset(),t))}showError(e="Error",t=2e3){this._clearStateTimeout(),this._state="error",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout(()=>this.reset(),t))}reset(){this._clearStateTimeout(),this._state="idle",this._stateText=""}_clearStateTimeout(){this._stateTimeout&&(clearTimeout(this._stateTimeout),this._stateTimeout=void 0)}updated(e){this.classList.toggle("kr-button--loading","loading"===this._state),this.classList.toggle("kr-button--success","success"===this._state),this.classList.toggle("kr-button--error","error"===this._state),this.classList.toggle(`kr-button--${this.variant}`,!0),this.classList.toggle(`kr-button--${this.color}`,!0),this.classList.toggle("kr-button--small","small"===this.size),this.classList.toggle("kr-button--large","large"===this.size)}render(){const e=H`
289
- <slot></slot>
290
- ${this.options.length?H`<svg class="caret" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 24 24" fill="currentColor"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>`:U}
291
- ${"idle"!==this._state?H`<span class="state-overlay">
292
- ${"loading"===this._state?H`<span class="spinner"></span>`:this._stateText}
293
- </span>`:U}
294
- ${this.options.length?H`
293
+ `,we([pe({type:String})],e.KRAlert.prototype,"type",void 0),we([pe({type:String})],e.KRAlert.prototype,"title",void 0),we([pe({type:Boolean})],e.KRAlert.prototype,"dismissible",void 0),we([pe({type:Boolean})],e.KRAlert.prototype,"visible",void 0),e.KRAlert=we([de("kr-alert")],e.KRAlert);var $e=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRButton=class extends ne{constructor(){super(...arguments),this.variant="flat",this.color="primary",this.size="medium",this.disabled=!1,this.options=[],this.iconPosition="left",this._state="idle",this._stateText="",this._dropdownOpened=!1,this._handleHostClick=e=>{this.options.length&&(e.stopPropagation(),this._toggleDropdown())},this._handleKeydown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.options.length?this._toggleDropdown():this.click()),"Escape"===e.key&&this._dropdownOpened&&(this._dropdownOpened=!1)},this._handleClickOutside=e=>{this._dropdownOpened&&!this.contains(e.target)&&(this._dropdownOpened=!1)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role",this.href?"link":"button"),this.setAttribute("tabindex","0"),this.addEventListener("keydown",this._handleKeydown),this.addEventListener("click",this._handleHostClick),document.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeydown),this.removeEventListener("click",this._handleHostClick),document.removeEventListener("click",this._handleClickOutside)}_toggleDropdown(){this._dropdownOpened=!this._dropdownOpened,this._dropdownOpened&&requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(".dropdown");if(e){const t=this.getBoundingClientRect();e.style.top=t.bottom+4+"px",e.style.left=t.left+"px",e.style.minWidth=t.width+"px";e.getBoundingClientRect().right>window.innerWidth&&(e.style.left="",e.style.right=window.innerWidth-t.right+"px")}}))}_handleOptionClick(e,t){t.stopPropagation(),this._dropdownOpened=!1,this.dispatchEvent(new CustomEvent("option-select",{detail:{id:e.id,label:e.label},bubbles:!0,composed:!0}))}showLoading(){this._clearStateTimeout(),this._state="loading",this._stateText=""}showSuccess(e="Success",t=2e3){this._clearStateTimeout(),this._state="success",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout((()=>this.reset()),t))}showError(e="Error",t=2e3){this._clearStateTimeout(),this._state="error",this._stateText=e,t>0&&(this._stateTimeout=window.setTimeout((()=>this.reset()),t))}reset(){this._clearStateTimeout(),this._state="idle",this._stateText=""}_clearStateTimeout(){this._stateTimeout&&(clearTimeout(this._stateTimeout),this._stateTimeout=void 0)}updated(e){this.classList.toggle("kr-button--loading","loading"===this._state),this.classList.toggle("kr-button--success","success"===this._state),this.classList.toggle("kr-button--error","error"===this._state),this.classList.toggle(`kr-button--${this.variant}`,!0),this.classList.toggle(`kr-button--${this.color}`,!0),this.classList.toggle("kr-button--small","small"===this.size),this.classList.toggle("kr-button--large","large"===this.size)}render(){const e=q`
294
+ <span class="content">
295
+ <slot name="icon"></slot>
296
+ <slot></slot>
297
+ </span>
298
+ ${this.options.length?q`<svg class="caret" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 24 24" fill="currentColor"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>`:V}
299
+ ${"idle"!==this._state?q`<span class="state-overlay">
300
+ ${"loading"===this._state?q`<span class="spinner"></span>`:this._stateText}
301
+ </span>`:V}
302
+ ${this.options.length?q`
295
303
  <div class="dropdown ${this._dropdownOpened?"dropdown--opened":""}">
296
- ${this.options.map(e=>H`
304
+ ${this.options.map((e=>q`
297
305
  <button
298
306
  class="dropdown-item"
299
307
  @click=${t=>this._handleOptionClick(e,t)}
300
308
  >${e.label}</button>
301
- `)}
309
+ `))}
302
310
  </div>
303
- `:U}
304
- `;return this.href?H`<a class="link" href=${this.href} target=${this.target||U}>${e}</a>`:e}},e.KRButton.styles=n`
311
+ `:V}
312
+ `;return this.href?q`<a class="link" href=${this.href} target=${this.target||V}>${e}</a>`:e}},e.KRButton.styles=n`
305
313
  :host {
306
314
  display: inline-flex;
307
315
  position: relative;
@@ -425,9 +433,9 @@ const ve=1,ye=2,me=3,xe=4,_e=e=>(...t)=>({_$litDirective$:e,values:t});let ke=cl
425
433
  }
426
434
 
427
435
  /* Content */
428
- :host(.kr-button--loading) slot,
429
- :host(.kr-button--success) slot,
430
- :host(.kr-button--error) slot {
436
+ :host(.kr-button--loading) .content,
437
+ :host(.kr-button--success) .content,
438
+ :host(.kr-button--error) .content {
431
439
  visibility: hidden;
432
440
  }
433
441
 
@@ -528,44 +536,72 @@ const ve=1,ye=2,me=3,xe=4,_e=e=>(...t)=>({_$litDirective$:e,values:t});let ke=cl
528
536
  color: inherit;
529
537
  text-decoration: none;
530
538
  }
531
- `,Re([ue({type:String,reflect:!0})],e.KRButton.prototype,"variant",void 0),Re([ue({type:String,reflect:!0})],e.KRButton.prototype,"color",void 0),Re([ue({type:String,reflect:!0})],e.KRButton.prototype,"size",void 0),Re([ue({type:Boolean,reflect:!0})],e.KRButton.prototype,"disabled",void 0),Re([ue({type:String})],e.KRButton.prototype,"href",void 0),Re([ue({type:String})],e.KRButton.prototype,"target",void 0),Re([ue({type:Array})],e.KRButton.prototype,"options",void 0),Re([fe()],e.KRButton.prototype,"_state",void 0),Re([fe()],e.KRButton.prototype,"_stateText",void 0),Re([fe()],e.KRButton.prototype,"_dropdownOpened",void 0),e.KRButton=Re([ce("kr-button")],e.KRButton);
539
+
540
+ /* Content wrapper for icon + text layout */
541
+ .content {
542
+ display: inline-flex;
543
+ align-items: center;
544
+ gap: 6px;
545
+ }
546
+
547
+ :host([icon-position="right"]) .content {
548
+ flex-direction: row-reverse;
549
+ }
550
+
551
+ /* Icon styling */
552
+ ::slotted([slot="icon"]) {
553
+ width: 18px;
554
+ height: 18px;
555
+ flex-shrink: 0;
556
+ }
557
+
558
+ :host(.kr-button--small) ::slotted([slot="icon"]) {
559
+ width: 14px;
560
+ height: 14px;
561
+ }
562
+
563
+ :host(.kr-button--large) ::slotted([slot="icon"]) {
564
+ width: 22px;
565
+ height: 22px;
566
+ }
567
+ `,$e([pe({type:String,reflect:!0})],e.KRButton.prototype,"variant",void 0),$e([pe({type:String,reflect:!0})],e.KRButton.prototype,"color",void 0),$e([pe({type:String,reflect:!0})],e.KRButton.prototype,"size",void 0),$e([pe({type:Boolean,reflect:!0})],e.KRButton.prototype,"disabled",void 0),$e([pe({type:String})],e.KRButton.prototype,"href",void 0),$e([pe({type:String})],e.KRButton.prototype,"target",void 0),$e([pe({type:Array})],e.KRButton.prototype,"options",void 0),$e([pe({type:String,reflect:!0,attribute:"icon-position"})],e.KRButton.prototype,"iconPosition",void 0),$e([ue()],e.KRButton.prototype,"_state",void 0),$e([ue()],e.KRButton.prototype,"_stateText",void 0),$e([ue()],e.KRButton.prototype,"_dropdownOpened",void 0),e.KRButton=$e([de("kr-button")],e.KRButton);
532
568
  /**
533
569
  * @license
534
570
  * Copyright 2017 Google LLC
535
571
  * SPDX-License-Identifier: BSD-3-Clause
536
572
  */
537
- class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===U||null==e)return this._t=void 0,this.it=e;if(e===V)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Se.directiveName="unsafeHTML",Se.resultType=1;const Ce=_e(Se);var Te=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRCodeDemo=class extends le{constructor(){super(...arguments),this.language="html",this.code="",this.activeTab="preview",this.copied=!1,this.highlightedCode=""}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this.code||(this.code=this.innerHTML.trim().replace(/=""(?=[\s>])/g,"")),this.querySelectorAll("script").forEach(e=>{const t=document.createElement("script");t.textContent=e.textContent,e.replaceWith(t)}),this.code&&window.hljs&&window.hljs.getLanguage(this.language)?this.highlightedCode=window.hljs.highlight(this.code,{language:this.language}).value:this.highlightedCode=this.code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")})}activateTab(e){this.activeTab=e}copyCode(){this.code&&navigator.clipboard.writeText(this.code).then(()=>{this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)})}render(){return H`
573
+ class Re extends _e{constructor(e){if(super(e),this.it=V,e.type!==ve)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===V||null==e)return this._t=void 0,this.it=e;if(e===H)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Re.directiveName="unsafeHTML",Re.resultType=1;const Se=xe(Re);var Ce=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRCodeDemo=class extends ne{constructor(){super(...arguments),this.language="html",this.code="",this.activeTab="preview",this.copied=!1,this.highlightedCode=""}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this.code||(this.code=this.innerHTML.trim().replace(/=""(?=[\s>])/g,"")),this.querySelectorAll("script").forEach((e=>{const t=document.createElement("script");t.textContent=e.textContent,e.replaceWith(t)})),this.code&&window.hljs&&window.hljs.getLanguage(this.language)?this.highlightedCode=window.hljs.highlight(this.code,{language:this.language}).value:this.highlightedCode=this.code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}))}activateTab(e){this.activeTab=e}copyCode(){this.code&&navigator.clipboard.writeText(this.code).then((()=>{this.copied=!0,setTimeout((()=>{this.copied=!1}),2e3)}))}render(){return q`
538
574
  <div class="tabs">
539
575
  <button
540
- class=${we({tab:!0,"tab--active":"preview"===this.activeTab})}
576
+ class=${ke({tab:!0,"tab--active":"preview"===this.activeTab})}
541
577
  @click=${()=>this.activateTab("preview")}
542
578
  >
543
579
  Preview
544
580
  </button>
545
581
  <button
546
- class=${we({tab:!0,"tab--active":"code"===this.activeTab})}
582
+ class=${ke({tab:!0,"tab--active":"code"===this.activeTab})}
547
583
  @click=${()=>this.activateTab("code")}
548
584
  >
549
585
  Code
550
586
  </button>
551
587
  <button
552
- class=${we({copy:!0,"copy--success":this.copied})}
588
+ class=${ke({copy:!0,"copy--success":this.copied})}
553
589
  @click=${this.copyCode}
554
590
  title=${this.copied?"Copied!":"Copy code"}
555
591
  >
556
- ${this.copied?H`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>`:H`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>`}
592
+ ${this.copied?q`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>`:q`<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>`}
557
593
  </button>
558
594
  </div>
559
595
 
560
- <div class=${we({panel:!0,"panel--active":"preview"===this.activeTab,"panel--preview":!0})}>
596
+ <div class=${ke({panel:!0,"panel--active":"preview"===this.activeTab,"panel--preview":!0})}>
561
597
  <slot></slot>
562
598
  </div>
563
599
 
564
- <div class=${we({panel:!0,"panel--active":"code"===this.activeTab,"panel--code":!0})}>
565
- <pre class="code"><code>${Ce(this.highlightedCode)}</code></pre>
600
+ <div class=${ke({panel:!0,"panel--active":"code"===this.activeTab,"panel--code":!0})}>
601
+ <pre class="code"><code>${Se(this.highlightedCode)}</code></pre>
566
602
  </div>
567
603
 
568
- `}},e.KRCodeDemo.styles=[de,n`
604
+ `}},e.KRCodeDemo.styles=[ae,n`
569
605
  :host {
570
606
  display: block;
571
607
  border: 1px solid #d5dbdb;
@@ -687,18 +723,18 @@ class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error
687
723
  .hljs-attribute { color: #005cc5; }
688
724
  .hljs-property { color: #005cc5; }
689
725
 
690
- `],Te([ue({type:String})],e.KRCodeDemo.prototype,"language",void 0),Te([fe()],e.KRCodeDemo.prototype,"code",void 0),Te([fe()],e.KRCodeDemo.prototype,"activeTab",void 0),Te([fe()],e.KRCodeDemo.prototype,"copied",void 0),Te([fe()],e.KRCodeDemo.prototype,"highlightedCode",void 0),e.KRCodeDemo=Te([ce("kr-code-demo")],e.KRCodeDemo);var Ae=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRContextMenu=class extends le{constructor(){super(...arguments),this.items=[],this.resolvePromise=null,this.boundHandleOutsideClick=this.handleOutsideClick.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}static async open(e){const t=document.querySelector("kr-context-menu");t&&t.remove();const i=document.createElement("kr-context-menu");return document.body.appendChild(i),i.show(e)}async show(e){this.items=e.items,this.style.left=`${e.x}px`,this.style.top=`${e.y}px`,await this.updateComplete;const t=this.getBoundingClientRect();return t.right>window.innerWidth&&(this.style.left=e.x-t.width+"px"),t.bottom>window.innerHeight&&(this.style.top=e.y-t.height+"px"),requestAnimationFrame(()=>{document.addEventListener("click",this.boundHandleOutsideClick),document.addEventListener("contextmenu",this.boundHandleOutsideClick),document.addEventListener("keydown",this.boundHandleKeyDown)}),new Promise(e=>{this.resolvePromise=e})}handleOutsideClick(e){this.contains(e.target)||this.close(null)}handleKeyDown(e){"Escape"===e.key&&this.close(null)}handleItemClick(e){e.disabled||e.divider||this.close(e)}close(e){document.removeEventListener("click",this.boundHandleOutsideClick),document.removeEventListener("contextmenu",this.boundHandleOutsideClick),document.removeEventListener("keydown",this.boundHandleKeyDown),this.resolvePromise&&(this.resolvePromise(e),this.resolvePromise=null),this.remove()}render(){return H`
726
+ `],Ce([pe({type:String})],e.KRCodeDemo.prototype,"language",void 0),Ce([ue()],e.KRCodeDemo.prototype,"code",void 0),Ce([ue()],e.KRCodeDemo.prototype,"activeTab",void 0),Ce([ue()],e.KRCodeDemo.prototype,"copied",void 0),Ce([ue()],e.KRCodeDemo.prototype,"highlightedCode",void 0),e.KRCodeDemo=Ce([de("kr-code-demo")],e.KRCodeDemo);var Te=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRContextMenu=class extends ne{constructor(){super(...arguments),this.items=[],this.resolvePromise=null,this.boundHandleOutsideClick=this.handleOutsideClick.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this)}static async open(e){const t=document.querySelector("kr-context-menu");t&&t.remove();const i=document.createElement("kr-context-menu");return document.body.appendChild(i),i.show(e)}async show(e){this.items=e.items,this.style.left=`${e.x}px`,this.style.top=`${e.y}px`,await this.updateComplete;const t=this.getBoundingClientRect();return t.right>window.innerWidth&&(this.style.left=e.x-t.width+"px"),t.bottom>window.innerHeight&&(this.style.top=e.y-t.height+"px"),requestAnimationFrame((()=>{document.addEventListener("click",this.boundHandleOutsideClick),document.addEventListener("contextmenu",this.boundHandleOutsideClick),document.addEventListener("keydown",this.boundHandleKeyDown)})),new Promise((e=>{this.resolvePromise=e}))}handleOutsideClick(e){this.contains(e.target)||this.close(null)}handleKeyDown(e){"Escape"===e.key&&this.close(null)}handleItemClick(e){e.disabled||e.divider||this.close(e)}close(e){document.removeEventListener("click",this.boundHandleOutsideClick),document.removeEventListener("contextmenu",this.boundHandleOutsideClick),document.removeEventListener("keydown",this.boundHandleKeyDown),this.resolvePromise&&(this.resolvePromise(e),this.resolvePromise=null),this.remove()}render(){return q`
691
727
  <div class="menu">
692
- ${this.items.map(e=>e.divider?H`<div class="menu__divider"></div>`:H`
728
+ ${this.items.map((e=>e.divider?q`<div class="menu__divider"></div>`:q`
693
729
  <button
694
730
  class="menu__item"
695
731
  ?disabled=${e.disabled}
696
732
  @click=${()=>this.handleItemClick(e)}
697
733
  >
698
- ${e.icon?H`<span class="menu__item-icon">${e.icon}</span>`:null}
734
+ ${e.icon?q`<span class="menu__item-icon">${e.icon}</span>`:null}
699
735
  ${e.label}
700
736
  </button>
701
- `)}
737
+ `))}
702
738
  </div>
703
739
  `}},e.KRContextMenu.styles=n`
704
740
  :host {
@@ -755,7 +791,7 @@ class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error
755
791
  background: rgba(255, 255, 255, 0.1);
756
792
  margin: 4px 0;
757
793
  }
758
- `,Ae([fe()],e.KRContextMenu.prototype,"items",void 0),e.KRContextMenu=Ae([ce("kr-context-menu")],e.KRContextMenu);var Ee=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let Ke=class extends le{render(){return H`<slot></slot>`}};Ke.styles=n`
794
+ `,Te([ue()],e.KRContextMenu.prototype,"items",void 0),e.KRContextMenu=Te([de("kr-context-menu")],e.KRContextMenu);var Ae=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let Ee=class extends ne{render(){return q`<slot></slot>`}};Ee.styles=n`
759
795
  :host {
760
796
  display: block;
761
797
  padding: 16px 24px;
@@ -767,12 +803,12 @@ class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error
767
803
  font-size: 18px;
768
804
  font-weight: 600;
769
805
  }
770
- `,Ke=Ee([ce("kr-dialog-header")],Ke);let Oe=class extends le{render(){return H`<slot></slot>`}};Oe.styles=n`
806
+ `,Ee=Ae([de("kr-dialog-header")],Ee);let Ke=class extends ne{render(){return q`<slot></slot>`}};Ke.styles=n`
771
807
  :host {
772
808
  display: block;
773
809
  padding: 16px 24px;
774
810
  }
775
- `,Oe=Ee([ce("kr-dialog-content")],Oe);let ze=class extends le{render(){return H`<slot></slot>`}};ze.styles=n`
811
+ `,Ke=Ae([de("kr-dialog-content")],Ke);let Oe=class extends ne{render(){return q`<slot></slot>`}};Oe.styles=n`
776
812
  :host {
777
813
  display: flex;
778
814
  padding: 16px 24px;
@@ -780,7 +816,7 @@ class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error
780
816
  gap: 12px;
781
817
  justify-content: flex-end;
782
818
  }
783
- `,ze=Ee([ce("kr-dialog-footer")],ze);class Pe{constructor(){this._resolvePromise=null,this._dialogElement=null,this._promise=new Promise(e=>{this._resolvePromise=e})}setDialogElement(e){this._dialogElement=e}close(e){this._resolvePromise&&(this._resolvePromise(e),this._resolvePromise=null),this._dialogElement?.remove()}afterClosed(){return this._promise}}e.KRDialog=class extends le{constructor(){super(...arguments),this._dialogRef=null,this._contentElement=null,this._handleDocumentKeyDown=e=>{"Escape"===e.key&&this._dialogRef?.close(void 0)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._handleDocumentKeyDown)}static open(e,t){const i=document.querySelector("kr-dialog");i&&i.remove();const o=new Pe,r=document.createElement("kr-dialog");o.setDialogElement(r),r._dialogRef=o;const s=new e;return s.dialogRef=o,t?.data&&(s.data=t.data),r._contentElement=s,document.body.appendChild(r),document.addEventListener("keydown",r._handleDocumentKeyDown),o}_handleBackdropClick(e){e.target.classList.contains("backdrop")&&this._dialogRef?.close(void 0)}render(){return H`
819
+ `,Oe=Ae([de("kr-dialog-footer")],Oe);class ze{constructor(){this._resolvePromise=null,this._dialogElement=null,this._promise=new Promise((e=>{this._resolvePromise=e}))}setDialogElement(e){this._dialogElement=e}close(e){this._resolvePromise&&(this._resolvePromise(e),this._resolvePromise=null),this._dialogElement?.remove()}afterClosed(){return this._promise}}e.KRDialog=class extends ne{constructor(){super(...arguments),this._dialogRef=null,this._contentElement=null,this._handleDocumentKeyDown=e=>{"Escape"===e.key&&this._dialogRef?.close(void 0)}}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this._handleDocumentKeyDown)}static open(e,t){const i=document.querySelector("kr-dialog");i&&i.remove();const o=new ze,r=document.createElement("kr-dialog");o.setDialogElement(r),r._dialogRef=o;const s=new e;return s.dialogRef=o,t?.data&&(s.data=t.data),r._contentElement=s,document.body.appendChild(r),document.addEventListener("keydown",r._handleDocumentKeyDown),o}_handleBackdropClick(e){e.target.classList.contains("backdrop")&&this._dialogRef?.close(void 0)}render(){return q`
784
820
  <div class="backdrop" @click=${this._handleBackdropClick}></div>
785
821
  <div class="dialog">
786
822
  ${this._contentElement}
@@ -811,10 +847,10 @@ class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error
811
847
  overflow: auto;
812
848
  min-width: 300px;
813
849
  }
814
- `,Ee([fe()],e.KRDialog.prototype,"_contentElement",void 0),e.KRDialog=Ee([ce("kr-dialog")],e.KRDialog);var Le,je=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSnackbar=Le=class extends le{constructor(){super(...arguments),this.dismissTimeout=null,this.type="info",this.title="",this.message="",this.duration=5e3}static show(e){const t=document.createElement("kr-snackbar");return t.message=e.message,t.title=e.title??"",t.type=e.type??"info",void 0!==e.duration?t.duration=e.duration:"error"===t.type?t.duration=0:t.duration=5e3,document.body.appendChild(t),t}connectedCallback(){super.connectedCallback(),this.setAttribute("role","alert"),this.classList.add(`kr-snackbar--${this.type}`),this.title&&this.classList.add("kr-snackbar--has-title"),Le.activeSnackbars.push(this),this.updatePositions(),this.duration>0&&(this.dismissTimeout=window.setTimeout(()=>{this.dismiss()},this.duration))}disconnectedCallback(){super.disconnectedCallback();const e=Le.activeSnackbars.indexOf(this);e>-1&&Le.activeSnackbars.splice(e,1),this.updatePositions(),this.dismissTimeout&&clearTimeout(this.dismissTimeout)}updatePositions(){let e=24;for(const t of Le.activeSnackbars)t.style.bottom=`${e}px`,e+=t.offsetHeight+8}dismiss(){this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.classList.add("kr-snackbar--closing"),this.addEventListener("animationend",()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0})),this.remove()},{once:!0})}render(){const e={info:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/></svg>`,success:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>`,warning:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg>`,error:H`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`};return H`
850
+ `,Ae([ue()],e.KRDialog.prototype,"_contentElement",void 0),e.KRDialog=Ae([de("kr-dialog")],e.KRDialog);var Pe,Le=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSnackbar=Pe=class extends ne{constructor(){super(...arguments),this.dismissTimeout=null,this.type="info",this.title="",this.message="",this.duration=5e3}static show(e){const t=document.createElement("kr-snackbar");return t.message=e.message,t.title=e.title??"",t.type=e.type??"info",void 0!==e.duration?t.duration=e.duration:"error"===t.type?t.duration=0:t.duration=5e3,document.body.appendChild(t),t}connectedCallback(){super.connectedCallback(),this.setAttribute("role","alert"),this.classList.add(`kr-snackbar--${this.type}`),this.title&&this.classList.add("kr-snackbar--has-title"),Pe.activeSnackbars.push(this),this.updatePositions(),this.duration>0&&(this.dismissTimeout=window.setTimeout((()=>{this.dismiss()}),this.duration))}disconnectedCallback(){super.disconnectedCallback();const e=Pe.activeSnackbars.indexOf(this);e>-1&&Pe.activeSnackbars.splice(e,1),this.updatePositions(),this.dismissTimeout&&clearTimeout(this.dismissTimeout)}updatePositions(){let e=24;for(const t of Pe.activeSnackbars)t.style.bottom=`${e}px`,e+=t.offsetHeight+8}dismiss(){this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.classList.add("kr-snackbar--closing"),this.addEventListener("animationend",(()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0})),this.remove()}),{once:!0})}render(){const e={info:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"/></svg>`,success:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/></svg>`,warning:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"/></svg>`,error:q`<svg class="icon" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/></svg>`};return q`
815
851
  ${e[this.type]}
816
852
  <div class="content">
817
- ${this.title?H`<div class="title">${this.title}</div>`:""}
853
+ ${this.title?q`<div class="title">${this.title}</div>`:""}
818
854
  <div class="message">${this.message}</div>
819
855
  </div>
820
856
  <button
@@ -974,17 +1010,17 @@ class Se extends ke{constructor(e){if(super(e),this.it=U,e.type!==ye)throw Error
974
1010
  outline: 2px solid #3b82f6;
975
1011
  outline-offset: 2px;
976
1012
  }
977
- `,e.KRSnackbar.activeSnackbars=[],je([ue({type:String})],e.KRSnackbar.prototype,"type",void 0),je([ue({type:String})],e.KRSnackbar.prototype,"title",void 0),je([ue({type:String})],e.KRSnackbar.prototype,"message",void 0),je([ue({type:Number})],e.KRSnackbar.prototype,"duration",void 0),e.KRSnackbar=Le=je([ce("kr-snackbar")],e.KRSnackbar);
1013
+ `,e.KRSnackbar.activeSnackbars=[],Le([pe({type:String})],e.KRSnackbar.prototype,"type",void 0),Le([pe({type:String})],e.KRSnackbar.prototype,"title",void 0),Le([pe({type:String})],e.KRSnackbar.prototype,"message",void 0),Le([pe({type:Number})],e.KRSnackbar.prototype,"duration",void 0),e.KRSnackbar=Pe=Le([de("kr-snackbar")],e.KRSnackbar);
978
1014
  /**
979
1015
  * @license
980
1016
  * Copyright 2018 Google LLC
981
1017
  * SPDX-License-Identifier: BSD-3-Clause
982
1018
  */
983
- const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e),e.type!==ve||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(Me);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?De:""):i[e]=o}}return V}});var Fe=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTabGroup=class extends le{constructor(){super(...arguments),this.justified=!1,this.size="medium"}updated(e){e.has("activeTabId")&&this._updateActiveTab()}firstUpdated(){this._updateActiveTab()}_getTabs(){return Array.from(this.querySelectorAll("kr-tab"))}_updateActiveTab(){const e=this._getTabs();0!==e.length&&(this.activeTabId||(this.activeTabId=e[0]?.id),e.forEach(e=>{e.active=e.id===this.activeTabId}),this.requestUpdate())}_handleTabClick(e){e.disabled||(this.activeTabId=e.id,this.dispatchEvent(new CustomEvent("tab-change",{detail:{activeTabId:e.id},bubbles:!0,composed:!0})))}_handleTabDismiss(e,t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("tab-dismiss",{detail:{tabId:e.id},bubbles:!0,composed:!0}))}_handleKeyDown(e){const t=this._getTabs().filter(e=>!e.disabled),i=t.findIndex(e=>e.id===this.activeTabId);let o=-1;switch(e.key){case"ArrowLeft":o=i>0?i-1:t.length-1;break;case"ArrowRight":o=i<t.length-1?i+1:0;break;case"Home":o=0;break;case"End":o=t.length-1}if(o>=0){e.preventDefault();const i=t[o];this.activeTabId=i.id,this.dispatchEvent(new CustomEvent("tab-change",{detail:{activeTabId:i.id},bubbles:!0,composed:!0}));const r=this.shadowRoot?.querySelectorAll(".label"),s=Array.from(r||[]).find(e=>e.getAttribute("data-tab-id")===i.id);s?.focus()}}_renderTabIcon(e){const t=e.getIconElement();if(!t)return U;const i=t.cloneNode(!0);return i.removeAttribute("slot"),H`<span class="label-icon">${i}</span>`}render(){return H`
1019
+ const je="important",De=" !"+je,Me=xe(class extends _e{constructor(e){if(super(e),e.type!==be||"style"!==e.name||e.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce(((t,i)=>{const o=e[i];return null==o?t:t+`${i=i.includes("-")?i:i.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`}),"")}update(e,[t]){const{style:i}=e.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)null==t[e]&&(this.ft.delete(e),e.includes("-")?i.removeProperty(e):i[e]=null);for(const e in t){const o=t[e];if(null!=o){this.ft.add(e);const t="string"==typeof o&&o.endsWith(De);e.includes("-")||t?i.setProperty(e,t?o.slice(0,-11):o,t?je:""):i[e]=o}}return H}});var Be=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTabGroup=class extends ne{constructor(){super(...arguments),this.justified=!1,this.size="medium"}updated(e){e.has("activeTabId")&&this._updateActiveTab()}firstUpdated(){this._updateActiveTab()}_getTabs(){return Array.from(this.querySelectorAll("kr-tab"))}_updateActiveTab(){const e=this._getTabs();0!==e.length&&(this.activeTabId||(this.activeTabId=e[0]?.id),e.forEach((e=>{e.active=e.id===this.activeTabId})),this.requestUpdate())}_handleTabClick(e){e.disabled||(this.activeTabId=e.id,this.dispatchEvent(new CustomEvent("tab-change",{detail:{activeTabId:e.id},bubbles:!0,composed:!0})))}_handleTabDismiss(e,t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("tab-dismiss",{detail:{tabId:e.id},bubbles:!0,composed:!0}))}_handleKeyDown(e){const t=this._getTabs().filter((e=>!e.disabled)),i=t.findIndex((e=>e.id===this.activeTabId));let o=-1;switch(e.key){case"ArrowLeft":o=i>0?i-1:t.length-1;break;case"ArrowRight":o=i<t.length-1?i+1:0;break;case"Home":o=0;break;case"End":o=t.length-1}if(o>=0){e.preventDefault();const i=t[o];this.activeTabId=i.id,this.dispatchEvent(new CustomEvent("tab-change",{detail:{activeTabId:i.id},bubbles:!0,composed:!0}));const r=this.shadowRoot?.querySelectorAll(".label"),s=Array.from(r||[]).find((e=>e.getAttribute("data-tab-id")===i.id));s?.focus()}}_renderTabIcon(e){const t=e.getIconElement();if(!t)return V;const i=t.cloneNode(!0);return i.removeAttribute("slot"),q`<span class="label-icon">${i}</span>`}render(){return q`
984
1020
  <div class="header" role="tablist" @keydown=${this._handleKeyDown}>
985
- ${this._getTabs().map(e=>H`
1021
+ ${this._getTabs().map((e=>q`
986
1022
  <button
987
- class=${we({label:!0,"label--active":e.id===this.activeTabId,"label--justified":this.justified})}
1023
+ class=${ke({label:!0,"label--active":e.id===this.activeTabId,"label--justified":this.justified})}
988
1024
  role="tab"
989
1025
  data-tab-id=${e.id}
990
1026
  aria-selected=${e.id===this.activeTabId}
@@ -995,8 +1031,8 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
995
1031
  >
996
1032
  ${this._renderTabIcon(e)}
997
1033
  <span>${e.title}</span>
998
- ${e.badge?H`<span class="label-badge" style=${Be({backgroundColor:e.badgeBackground,color:e.badgeColor})}>${e.badge}</span>`:U}
999
- ${e.dismissible?H`
1034
+ ${e.badge?q`<span class="label-badge" style=${Me({backgroundColor:e.badgeBackground,color:e.badgeColor})}>${e.badge}</span>`:V}
1035
+ ${e.dismissible?q`
1000
1036
  <button
1001
1037
  class="label-dismiss"
1002
1038
  type="button"
@@ -1005,14 +1041,14 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1005
1041
  >
1006
1042
  <svg viewBox="0 0 20 20" fill="currentColor" width="12" height="12"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/></svg>
1007
1043
  </button>
1008
- `:U}
1044
+ `:V}
1009
1045
  </button>
1010
- `)}
1046
+ `))}
1011
1047
  </div>
1012
1048
  <div class="content" role="tabpanel" aria-labelledby=${this.activeTabId||""}>
1013
1049
  <slot @slotchange=${this._updateActiveTab}></slot>
1014
1050
  </div>
1015
- `}},e.KRTabGroup.styles=[de,n`
1051
+ `}},e.KRTabGroup.styles=[ae,n`
1016
1052
  :host {
1017
1053
  display: flex;
1018
1054
  flex-direction: column;
@@ -1145,7 +1181,7 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1145
1181
  ::slotted(kr-tab[active]) {
1146
1182
  display: block;
1147
1183
  }
1148
- `],Fe([ue({type:String,attribute:"active-tab-id"})],e.KRTabGroup.prototype,"activeTabId",void 0),Fe([ue({type:Boolean})],e.KRTabGroup.prototype,"justified",void 0),Fe([ue({type:String,reflect:!0})],e.KRTabGroup.prototype,"size",void 0),e.KRTabGroup=Fe([ce("kr-tab-group")],e.KRTabGroup);var qe=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTab=class extends le{constructor(){super(...arguments),this.id="",this.title="",this.badge="",this.badgeBackground="",this.badgeColor="",this.disabled=!1,this.dismissible=!1,this.active=!1}getIconElement(){return this.querySelector('[slot="icon"]')}render(){return H`<slot></slot>`}},e.KRTab.styles=[de,n`
1184
+ `],Be([pe({type:String,attribute:"active-tab-id"})],e.KRTabGroup.prototype,"activeTabId",void 0),Be([pe({type:Boolean})],e.KRTabGroup.prototype,"justified",void 0),Be([pe({type:String,reflect:!0})],e.KRTabGroup.prototype,"size",void 0),e.KRTabGroup=Be([de("kr-tab-group")],e.KRTabGroup);var Fe=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTab=class extends ne{constructor(){super(...arguments),this.id="",this.title="",this.badge="",this.badgeBackground="",this.badgeColor="",this.disabled=!1,this.dismissible=!1,this.active=!1}getIconElement(){return this.querySelector('[slot="icon"]')}render(){return q`<slot></slot>`}},e.KRTab.styles=[ae,n`
1149
1185
  :host {
1150
1186
  display: none;
1151
1187
  }
@@ -1155,7 +1191,7 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1155
1191
  width: 100%;
1156
1192
  height: 100%;
1157
1193
  }
1158
- `],qe([ue({type:String,reflect:!0})],e.KRTab.prototype,"id",void 0),qe([ue({type:String})],e.KRTab.prototype,"title",void 0),qe([ue({type:String})],e.KRTab.prototype,"badge",void 0),qe([ue({type:String,attribute:"badge-background"})],e.KRTab.prototype,"badgeBackground",void 0),qe([ue({type:String,attribute:"badge-color"})],e.KRTab.prototype,"badgeColor",void 0),qe([ue({type:Boolean})],e.KRTab.prototype,"disabled",void 0),qe([ue({type:Boolean})],e.KRTab.prototype,"dismissible",void 0),qe([ue({type:Boolean,reflect:!0})],e.KRTab.prototype,"active",void 0),e.KRTab=qe([ce("kr-tab")],e.KRTab);var Ie=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};const He=['"',"+","-","&&","||","!","(",")","{","}","[","]","^","~","*","?",":"],Ve=['\\"',"\\+","\\-","\\&\\&","\\|\\|","\\!","\\(","\\)","\\{","\\}","\\[","\\]","\\^","\\~","\\*","\\?","\\:"];function Ue(e){let t=e;for(let e=0;e<He.length;e++)t=t.split(He[e]).join(Ve[e]);return t}e.KRTable=class extends le{constructor(){super(...arguments),this._scrollStyle="overlay",this._data=[],this._dataState="idle",this._page=1,this._pageSize=50,this._totalItems=0,this._totalPages=0,this._searchQuery="",this._canScrollLeft=!1,this._canScrollRight=!1,this._canScrollHorizontal=!1,this._columnPickerOpen=!1,this._displayedColumns=[],this._resizing=null,this._resizeObserver=null,this._searchPositionLocked=!1,this._def={columns:[]},this.def={columns:[]},this._handleClickOutsideColumnPicker=e=>{if(!this._columnPickerOpen)return;const t=e.composedPath(),i=this.shadowRoot?.querySelector(".column-picker-wrapper");i&&!t.includes(i)&&(this._columnPickerOpen=!1)},this._handleResizeMove=e=>{if(!this._resizing)return;const t=this._def.columns.find(e=>e.id===this._resizing.columnId);if(t){const i=this._resizing.startWidth+(e.clientX-this._resizing.startX);t.width=`${Math.min(900,Math.max(50,i))}px`,this.requestUpdate()}},this._handleResizeEnd=()=>{this._resizing=null,document.removeEventListener("mousemove",this._handleResizeMove),document.removeEventListener("mouseup",this._handleResizeEnd)}}connectedCallback(){super.connectedCallback(),this.classList.toggle("kr-table--scroll-overlay","overlay"===this._scrollStyle),this.classList.toggle("kr-table--scroll-edge","edge"===this._scrollStyle),this._fetch(),this._initRefresh(),document.addEventListener("click",this._handleClickOutsideColumnPicker),this._resizeObserver=new ResizeObserver(()=>{this._searchPositionLocked=!1,this._updateSearchPosition()}),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),clearInterval(this._refreshTimer),document.removeEventListener("click",this._handleClickOutsideColumnPicker),this._resizeObserver?.disconnect()}willUpdate(e){e.has("def")&&(this._def={...this.def,columns:this.def.columns.map(e=>"actions"===e.type?{...e,label:e.label??"",sticky:"right",resizable:!1}:{...e})},this._displayedColumns=this._def.displayedColumns||this._def.columns.map(e=>e.id),this._fetch(),this._initRefresh())}updated(e){this._updateScrollFlags(),this._syncSlottedContent()}_syncSlottedContent(){const e=this.getDisplayedColumns().filter(e=>e.render);e.length&&(this.querySelectorAll('[slot^="cell-"]').forEach(e=>e.remove()),this._data.forEach((t,i)=>{e.forEach(e=>{const o=e.render(t),r="string"==typeof o?o:"";if(r){const t=document.createElement("span");t.slot=`cell-${i}-${e.id}`,"actions"===e.type&&(t.style.display="flex",t.style.gap="8px"),t.innerHTML=r,this.appendChild(t)}})}))}refresh(){this._fetch()}goToPrevPage(){this._page>1&&(this._page--,this._fetch())}goToNextPage(){this._page<this._totalPages&&(this._page++,this._fetch())}goToPage(e){e>=1&&e<=this._totalPages&&(this._page=e,this._fetch())}_fetch(){if(!this._def.dataSource)return;let t;switch(this._dataState="loading",this._def.dataSource.mode){case"opensearch":throw Error("Opensearch not supported yet");case"db":t={page:this._page-1,size:this._pageSize,sorts:[],filterFields:[],queryFields:[],facetFields:[]},this._searchQuery?.trim().length&&this._def.columns.filter(e=>e.searchable).forEach(e=>{t.queryFields.push({name:e.id,operation:"CONTAINS",value:this._searchQuery,and:!1})});break;default:t={page:this._page-1,size:this._pageSize,sorts:[],filterFields:[],queryFields:[],facetFields:[]},this._searchQuery?.trim().length&&t.queryFields.push({name:"_text_",operation:"IS",value:Ue(this._searchQuery)})}this._def.dataSource.fetch(t).then(e=>{switch(this._def.dataSource?.mode){case"opensearch":throw Error("Opensearch not supported yet");case"db":{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size;break}default:{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size}}this._dataState="success",this._updateSearchPosition()}).catch(t=>{this._dataState="error",e.KRSnackbar.show({message:t instanceof Error?t.message:"Failed to load data",type:"error"})})}_initRefresh(){clearInterval(this._refreshTimer),this._def.refreshInterval&&this._def.refreshInterval>0&&(this._refreshTimer=window.setInterval(()=>{this._fetch()},this._def.refreshInterval))}_handleSearch(e){const t=e.target;this._searchQuery=t.value,this._page=1,this._fetch()}_getGridTemplateColumns(){return this.getDisplayedColumns().map(e=>e.width?e.width:"actions"===e.type?"max-content":"minmax(80px, auto)").join(" ")}_updateSearchPosition(){if(this._searchPositionLocked)return;const e=this.shadowRoot?.querySelector(".search"),t=e?.querySelector(".search-field");e&&t&&(e.style.justifyContent="center",t.style.marginLeft="",requestAnimationFrame(()=>{const i=e.getBoundingClientRect(),o=t.getBoundingClientRect().left-i.left;e.style.justifyContent="flex-start",t.style.marginLeft=`${o}px`,this._searchPositionLocked=!0}))}_toggleColumnPicker(){this._columnPickerOpen=!this._columnPickerOpen}_toggleColumn(e){this._displayedColumns.includes(e)?this._displayedColumns=this._displayedColumns.filter(t=>t!==e):this._displayedColumns=[...this._displayedColumns,e]}getDisplayedColumns(){return this._displayedColumns.map(e=>this._def.columns.find(t=>t.id===e)).sort((e,t)=>"actions"===e.type&&"actions"!==t.type?1:"actions"!==e.type&&"actions"===t.type?-1:0)}_handleScroll(e){const t=e.target;this._canScrollLeft=t.scrollLeft>0,this._canScrollRight=t.scrollLeft<t.scrollWidth-t.clientWidth-1}_updateScrollFlags(){const e=this.shadowRoot?.querySelector(".content");e&&(this._canScrollLeft=e.scrollLeft>0,this._canScrollRight=e.scrollWidth>e.clientWidth&&e.scrollLeft<e.scrollWidth-e.clientWidth-1,this._canScrollHorizontal=e.scrollWidth>e.clientWidth),this.classList.toggle("kr-table--scroll-left-available",this._canScrollLeft),this.classList.toggle("kr-table--scroll-right-available",this._canScrollRight),this.classList.toggle("kr-table--scroll-horizontal-available",this._canScrollHorizontal),this.classList.toggle("kr-table--sticky-left",this.getDisplayedColumns().some(e=>"left"===e.sticky)),this.classList.toggle("kr-table--sticky-right",this.getDisplayedColumns().some(e=>"right"===e.sticky))}_handleResizeStart(e,t){e.preventDefault();const i=this.shadowRoot?.querySelector(`.header-cell[data-column-id="${t}"]`);this._resizing={columnId:t,startX:e.clientX,startWidth:i?.offsetWidth||200},document.addEventListener("mousemove",this._handleResizeMove),document.addEventListener("mouseup",this._handleResizeEnd)}_handleAction(e){e.href||this.dispatchEvent(new CustomEvent("action",{detail:{action:e.id},bubbles:!0,composed:!0}))}_renderCellContent(e,t,i){const o=t[e.id];if(e.render)return H`<slot name="cell-${i}-${e.id}"></slot>`;if(null==o)return"";switch(e.type){case"number":return"number"==typeof o?o.toLocaleString():String(o);case"currency":return"number"==typeof o?o.toLocaleString("en-US",{style:"currency",currency:"USD"}):String(o);case"date":{let e;if(o instanceof Date)e=o;else if("string"==typeof o&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/.test(o)){const t=o.replace(/(\d{2}:\d{2}:\d{2}):(\d+)$/,"$1.$2").replace(" ","T")+"Z";e=new Date(t)}else e=new Date(o);return e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}case"boolean":return!0===o?"Yes":!1===o?"No":"";default:return String(o)}}_getHeaderCellClasses(e,t){return{"header-cell":!0,"header-cell--align-center":"center"===e.align,"header-cell--align-right":"right"===e.align,"header-cell--sticky-left":"left"===e.sticky,"header-cell--sticky-left-last":"left"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some(e=>"left"===e.sticky),"header-cell--sticky-right":"right"===e.sticky,"header-cell--sticky-right-first":"right"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some(e=>"right"===e.sticky)}}_getCellClasses(e,t){return{cell:!0,"cell--actions":"actions"===e.type,"cell--align-center":"center"===e.align,"cell--align-right":"right"===e.align,"cell--sticky-left":"left"===e.sticky,"cell--sticky-left-last":"left"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some(e=>"left"===e.sticky),"cell--sticky-right":"right"===e.sticky,"cell--sticky-right-first":"right"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some(e=>"right"===e.sticky)}}_getCellStyle(e,t){const i={};if("left"===e.sticky){let e=0;for(let i=0;i<t;i++){const t=this.getDisplayedColumns()[i];"left"===t.sticky&&(e+=parseInt(t.width||"0",10))}i.left=`${e}px`}if("right"===e.sticky){let e=0;for(let i=t+1;i<this.getDisplayedColumns().length;i++){const t=this.getDisplayedColumns()[i];"right"===t.sticky&&(e+=parseInt(t.width||"0",10))}i.right=`${e}px`}return i}_renderPagination(){const e=(this._page-1)*this._pageSize+1,t=Math.min(this._page*this._pageSize,this._totalItems);return H`
1194
+ `],Fe([pe({type:String,reflect:!0})],e.KRTab.prototype,"id",void 0),Fe([pe({type:String})],e.KRTab.prototype,"title",void 0),Fe([pe({type:String})],e.KRTab.prototype,"badge",void 0),Fe([pe({type:String,attribute:"badge-background"})],e.KRTab.prototype,"badgeBackground",void 0),Fe([pe({type:String,attribute:"badge-color"})],e.KRTab.prototype,"badgeColor",void 0),Fe([pe({type:Boolean})],e.KRTab.prototype,"disabled",void 0),Fe([pe({type:Boolean})],e.KRTab.prototype,"dismissible",void 0),Fe([pe({type:Boolean,reflect:!0})],e.KRTab.prototype,"active",void 0),e.KRTab=Fe([de("kr-tab")],e.KRTab);var Ie=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};const qe=['"',"+","-","&&","||","!","(",")","{","}","[","]","^","~","*","?",":"],He=['\\"',"\\+","\\-","\\&\\&","\\|\\|","\\!","\\(","\\)","\\{","\\}","\\[","\\]","\\^","\\~","\\*","\\?","\\:"];function Ve(e){let t=e;for(let e=0;e<qe.length;e++)t=t.split(qe[e]).join(He[e]);return t}e.KRTable=class extends ne{constructor(){super(...arguments),this._scrollStyle="overlay",this._data=[],this._dataState="idle",this._page=1,this._pageSize=50,this._totalItems=0,this._totalPages=0,this._searchQuery="",this._canScrollLeft=!1,this._canScrollRight=!1,this._canScrollHorizontal=!1,this._columnPickerOpen=!1,this._displayedColumns=[],this._resizing=null,this._resizeObserver=null,this._searchPositionLocked=!1,this._def={columns:[]},this.def={columns:[]},this._handleClickOutsideColumnPicker=e=>{if(!this._columnPickerOpen)return;const t=e.composedPath(),i=this.shadowRoot?.querySelector(".column-picker-wrapper");i&&!t.includes(i)&&(this._columnPickerOpen=!1)},this._handleResizeMove=e=>{if(!this._resizing)return;const t=this._def.columns.find((e=>e.id===this._resizing.columnId));if(t){const i=this._resizing.startWidth+(e.clientX-this._resizing.startX);t.width=`${Math.min(900,Math.max(50,i))}px`,this.requestUpdate()}},this._handleResizeEnd=()=>{this._resizing=null,document.removeEventListener("mousemove",this._handleResizeMove),document.removeEventListener("mouseup",this._handleResizeEnd)}}connectedCallback(){super.connectedCallback(),this.classList.toggle("kr-table--scroll-overlay","overlay"===this._scrollStyle),this.classList.toggle("kr-table--scroll-edge","edge"===this._scrollStyle),this._fetch(),this._initRefresh(),document.addEventListener("click",this._handleClickOutsideColumnPicker),this._resizeObserver=new ResizeObserver((()=>{this._searchPositionLocked=!1,this._updateSearchPosition()})),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),clearInterval(this._refreshTimer),document.removeEventListener("click",this._handleClickOutsideColumnPicker),this._resizeObserver?.disconnect()}willUpdate(e){e.has("def")&&(this._def={...this.def,columns:this.def.columns.map((e=>"actions"===e.type?{...e,label:e.label??"",sticky:"right",resizable:!1}:{...e}))},this._displayedColumns=this._def.displayedColumns||this._def.columns.map((e=>e.id)),this._fetch(),this._initRefresh())}updated(e){this._updateScrollFlags(),this._syncSlottedContent()}_syncSlottedContent(){const e=this.getDisplayedColumns().filter((e=>e.render));e.length&&(this.querySelectorAll('[slot^="cell-"]').forEach((e=>e.remove())),this._data.forEach(((t,i)=>{e.forEach((e=>{const o=e.render(t),r="string"==typeof o?o:"";if(r){const t=document.createElement("span");t.slot=`cell-${i}-${e.id}`,"actions"===e.type&&(t.style.display="flex",t.style.gap="8px"),t.innerHTML=r,this.appendChild(t)}}))})))}refresh(){this._fetch()}goToPrevPage(){this._page>1&&(this._page--,this._fetch())}goToNextPage(){this._page<this._totalPages&&(this._page++,this._fetch())}goToPage(e){e>=1&&e<=this._totalPages&&(this._page=e,this._fetch())}_fetch(){if(!this._def.dataSource)return;let t;switch(this._dataState="loading",this._def.dataSource.mode){case"opensearch":throw Error("Opensearch not supported yet");case"db":t={page:this._page-1,size:this._pageSize,sorts:[],filterFields:[],queryFields:[],facetFields:[]},this._searchQuery?.trim().length&&this._def.columns.filter((e=>e.searchable)).forEach((e=>{t.queryFields.push({name:e.id,operation:"CONTAINS",value:this._searchQuery,and:!1})}));break;default:t={page:this._page-1,size:this._pageSize,sorts:[],filterFields:[],queryFields:[],facetFields:[]},this._searchQuery?.trim().length&&t.queryFields.push({name:"_text_",operation:"IS",value:Ve(this._searchQuery)})}this._def.dataSource.fetch(t).then((e=>{switch(this._def.dataSource?.mode){case"opensearch":throw Error("Opensearch not supported yet");case"db":{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size;break}default:{const t=e;this._data=t.data.content,this._totalItems=t.data.totalElements,this._totalPages=t.data.totalPages,this._pageSize=t.data.size}}this._dataState="success",this._updateSearchPosition()})).catch((t=>{this._dataState="error",e.KRSnackbar.show({message:t instanceof Error?t.message:"Failed to load data",type:"error"})}))}_initRefresh(){clearInterval(this._refreshTimer),this._def.refreshInterval&&this._def.refreshInterval>0&&(this._refreshTimer=window.setInterval((()=>{this._fetch()}),this._def.refreshInterval))}_handleSearch(e){const t=e.target;this._searchQuery=t.value,this._page=1,this._fetch()}_getGridTemplateColumns(){return this.getDisplayedColumns().map((e=>e.width?e.width:"actions"===e.type?"max-content":"minmax(80px, auto)")).join(" ")}_updateSearchPosition(){if(this._searchPositionLocked)return;const e=this.shadowRoot?.querySelector(".search"),t=e?.querySelector(".search-field");e&&t&&(e.style.justifyContent="center",t.style.marginLeft="",requestAnimationFrame((()=>{const i=e.getBoundingClientRect(),o=t.getBoundingClientRect().left-i.left;e.style.justifyContent="flex-start",t.style.marginLeft=`${o}px`,this._searchPositionLocked=!0})))}_toggleColumnPicker(){this._columnPickerOpen=!this._columnPickerOpen}_toggleColumn(e){this._displayedColumns.includes(e)?this._displayedColumns=this._displayedColumns.filter((t=>t!==e)):this._displayedColumns=[...this._displayedColumns,e]}getDisplayedColumns(){return this._displayedColumns.map((e=>this._def.columns.find((t=>t.id===e)))).sort(((e,t)=>"actions"===e.type&&"actions"!==t.type?1:"actions"!==e.type&&"actions"===t.type?-1:0))}_handleScroll(e){const t=e.target;this._canScrollLeft=t.scrollLeft>0,this._canScrollRight=t.scrollLeft<t.scrollWidth-t.clientWidth-1}_updateScrollFlags(){const e=this.shadowRoot?.querySelector(".content");e&&(this._canScrollLeft=e.scrollLeft>0,this._canScrollRight=e.scrollWidth>e.clientWidth&&e.scrollLeft<e.scrollWidth-e.clientWidth-1,this._canScrollHorizontal=e.scrollWidth>e.clientWidth),this.classList.toggle("kr-table--scroll-left-available",this._canScrollLeft),this.classList.toggle("kr-table--scroll-right-available",this._canScrollRight),this.classList.toggle("kr-table--scroll-horizontal-available",this._canScrollHorizontal),this.classList.toggle("kr-table--sticky-left",this.getDisplayedColumns().some((e=>"left"===e.sticky))),this.classList.toggle("kr-table--sticky-right",this.getDisplayedColumns().some((e=>"right"===e.sticky)))}_handleResizeStart(e,t){e.preventDefault();const i=this.shadowRoot?.querySelector(`.header-cell[data-column-id="${t}"]`);this._resizing={columnId:t,startX:e.clientX,startWidth:i?.offsetWidth||200},document.addEventListener("mousemove",this._handleResizeMove),document.addEventListener("mouseup",this._handleResizeEnd)}_handleAction(e){e.href||this.dispatchEvent(new CustomEvent("action",{detail:{action:e.id},bubbles:!0,composed:!0}))}_renderCellContent(e,t,i){const o=t[e.id];if(e.render)return q`<slot name="cell-${i}-${e.id}"></slot>`;if(null==o)return"";switch(e.type){case"number":return"number"==typeof o?o.toLocaleString():String(o);case"currency":return"number"==typeof o?o.toLocaleString("en-US",{style:"currency",currency:"USD"}):String(o);case"date":{let e;if(o instanceof Date)e=o;else if("string"==typeof o&&/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/.test(o)){const t=o.replace(/(\d{2}:\d{2}:\d{2}):(\d+)$/,"$1.$2").replace(" ","T")+"Z";e=new Date(t)}else e=new Date(o);return e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}case"boolean":return!0===o?"Yes":!1===o?"No":"";default:return String(o)}}_getHeaderCellClasses(e,t){return{"header-cell":!0,"header-cell--align-center":"center"===e.align,"header-cell--align-right":"right"===e.align,"header-cell--sticky-left":"left"===e.sticky,"header-cell--sticky-left-last":"left"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some((e=>"left"===e.sticky)),"header-cell--sticky-right":"right"===e.sticky,"header-cell--sticky-right-first":"right"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some((e=>"right"===e.sticky))}}_getCellClasses(e,t){return{cell:!0,"cell--actions":"actions"===e.type,"cell--align-center":"center"===e.align,"cell--align-right":"right"===e.align,"cell--sticky-left":"left"===e.sticky,"cell--sticky-left-last":"left"===e.sticky&&!this.getDisplayedColumns().slice(t+1).some((e=>"left"===e.sticky)),"cell--sticky-right":"right"===e.sticky,"cell--sticky-right-first":"right"===e.sticky&&!this.getDisplayedColumns().slice(0,t).some((e=>"right"===e.sticky))}}_getCellStyle(e,t){const i={};if("left"===e.sticky){let e=0;for(let i=0;i<t;i++){const t=this.getDisplayedColumns()[i];"left"===t.sticky&&(e+=parseInt(t.width||"0",10))}i.left=`${e}px`}if("right"===e.sticky){let e=0;for(let i=t+1;i<this.getDisplayedColumns().length;i++){const t=this.getDisplayedColumns()[i];"right"===t.sticky&&(e+=parseInt(t.width||"0",10))}i.right=`${e}px`}return i}_renderPagination(){const e=(this._page-1)*this._pageSize+1,t=Math.min(this._page*this._pageSize,this._totalItems);return q`
1159
1195
  <div class="pagination">
1160
1196
  <span
1161
1197
  class="pagination-icon ${1===this._page?"pagination-icon--disabled":""}"
@@ -1171,10 +1207,10 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1171
1207
  <svg viewBox="0 0 24 24" fill="currentColor"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>
1172
1208
  </span>
1173
1209
  </div>
1174
- `}_renderHeader(){return!this._def.title&&!this._def.actions?.length&&this._totalPages<=1?U:H`
1210
+ `}_renderHeader(){return!this._def.title&&!this._def.actions?.length&&this._totalPages<=1?V:q`
1175
1211
  <div class="header">
1176
1212
  <div class="title">${this._def.title??""}</div>
1177
- ${"db"!==this._def.dataSource?.mode||this._def.columns.some(e=>e.searchable)?H`
1213
+ ${"db"!==this._def.dataSource?.mode||this._def.columns.some((e=>e.searchable))?q`
1178
1214
  <div class="search">
1179
1215
  <!-- TODO: Saved views dropdown
1180
1216
  <div class="views">
@@ -1193,7 +1229,7 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1193
1229
  />
1194
1230
  </div>
1195
1231
  </div>
1196
- `:H`<div class="search"></div>`}
1232
+ `:q`<div class="search"></div>`}
1197
1233
  <div class="tools">
1198
1234
  ${this._renderPagination()}
1199
1235
  <span class="refresh" title="Refresh" @click=${()=>this.refresh()}>
@@ -1204,17 +1240,17 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1204
1240
  <svg viewBox="0 -960 960 960" fill="currentColor"><path d="M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z"/></svg>
1205
1241
  </span>
1206
1242
  <div class="column-picker ${this._columnPickerOpen?"open":""}">
1207
- ${[...this._def.columns].filter(e=>"actions"!==e.type).sort((e,t)=>(e.label??e.id).localeCompare(t.label??t.id)).map(e=>H`
1243
+ ${[...this._def.columns].filter((e=>"actions"!==e.type)).sort(((e,t)=>(e.label??e.id).localeCompare(t.label??t.id))).map((e=>q`
1208
1244
  <div class="column-picker-item" @click=${()=>this._toggleColumn(e.id)}>
1209
1245
  <div class="column-picker-checkbox ${this._displayedColumns.includes(e.id)?"checked":""}">
1210
1246
  <svg viewBox="0 0 24 24" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
1211
1247
  </div>
1212
1248
  <span class="column-picker-label">${e.label??e.id}</span>
1213
1249
  </div>
1214
- `)}
1250
+ `))}
1215
1251
  </div>
1216
1252
  </div>
1217
- ${1===this._def.actions?.length?H`
1253
+ ${1===this._def.actions?.length?q`
1218
1254
  <kr-button
1219
1255
  class="actions"
1220
1256
  .href=${this._def.actions[0].href}
@@ -1223,18 +1259,18 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1223
1259
  >
1224
1260
  ${this._def.actions[0].label}
1225
1261
  </kr-button>
1226
- `:this._def.actions?.length?H`
1262
+ `:this._def.actions?.length?q`
1227
1263
  <kr-button
1228
1264
  class="actions"
1229
- .options=${this._def.actions.map(e=>({id:e.id,label:e.label}))}
1265
+ .options=${this._def.actions.map((e=>({id:e.id,label:e.label})))}
1230
1266
  @option-select=${e=>this._handleAction({id:e.detail.id,label:e.detail.label})}
1231
1267
  >
1232
1268
  Actions
1233
1269
  </kr-button>
1234
- `:U}
1270
+ `:V}
1235
1271
  </div>
1236
1272
  </div>
1237
- `}_renderStatus(){return"loading"===this._dataState&&0===this._data.length?H`<div class="status">Loading...</div>`:"error"===this._dataState&&0===this._data.length?H`<div class="status status--error">Error loading data</div>`:0===this._data.length?H`<div class="status">No data available</div>`:U}_renderTable(){return H`
1273
+ `}_renderStatus(){return"loading"===this._dataState&&0===this._data.length?q`<div class="status">Loading...</div>`:"error"===this._dataState&&0===this._data.length?q`<div class="status status--error">Error loading data</div>`:0===this._data.length?q`<div class="status">No data available</div>`:V}_renderTable(){return q`
1238
1274
  <div class="wrapper">
1239
1275
  <div class="overlay-left"></div>
1240
1276
  <div class="overlay-right"></div>
@@ -1242,37 +1278,37 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1242
1278
  <div class="content" @scroll=${this._handleScroll}>
1243
1279
  <div class="table" style="grid-template-columns: ${this._getGridTemplateColumns()}">
1244
1280
  <div class="header-row">
1245
- ${this.getDisplayedColumns().map((e,t)=>H`
1281
+ ${this.getDisplayedColumns().map(((e,t)=>q`
1246
1282
  <div
1247
- class=${we(this._getHeaderCellClasses(e,t))}
1248
- style=${Be(this._getCellStyle(e,t))}
1283
+ class=${ke(this._getHeaderCellClasses(e,t))}
1284
+ style=${Me(this._getCellStyle(e,t))}
1249
1285
  data-column-id=${e.id}
1250
- >${e.label??e.id}${!1!==e.resizable?H`<div
1286
+ >${e.label??e.id}${!1!==e.resizable?q`<div
1251
1287
  class="header-cell__resize"
1252
1288
  @mousedown=${t=>this._handleResizeStart(t,e.id)}
1253
- ></div>`:U}</div>
1254
- `)}
1289
+ ></div>`:V}</div>
1290
+ `))}
1255
1291
  </div>
1256
- ${this._data.map((e,t)=>H`
1292
+ ${this._data.map(((e,t)=>q`
1257
1293
  <div class="row">
1258
- ${this.getDisplayedColumns().map((i,o)=>H`
1294
+ ${this.getDisplayedColumns().map(((i,o)=>q`
1259
1295
  <div
1260
- class=${we(this._getCellClasses(i,o))}
1261
- style=${Be(this._getCellStyle(i,o))}
1296
+ class=${ke(this._getCellClasses(i,o))}
1297
+ style=${Me(this._getCellStyle(i,o))}
1262
1298
  data-column-id=${i.id}
1263
1299
  >
1264
1300
  ${this._renderCellContent(i,e,t)}
1265
1301
  </div>
1266
- `)}
1302
+ `))}
1267
1303
  </div>
1268
- `)}
1304
+ `))}
1269
1305
  </div>
1270
1306
  </div>
1271
1307
  </div>
1272
- `}render(){return this._def.columns.length?H`
1308
+ `}render(){return this._def.columns.length?q`
1273
1309
  ${this._renderHeader()}
1274
1310
  ${this._renderTable()}
1275
- `:H`<slot></slot>`}},e.KRTable.styles=[de,n`
1311
+ `:q`<slot></slot>`}},e.KRTable.styles=[ae,n`
1276
1312
  /* -------------------------------------------------------------------------
1277
1313
  * Host
1278
1314
  * ----------------------------------------------------------------------- */
@@ -1781,7 +1817,7 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1781
1817
  .status--error {
1782
1818
  color: #dc2626;
1783
1819
  }
1784
- `],Ie([fe()],e.KRTable.prototype,"_data",void 0),Ie([fe()],e.KRTable.prototype,"_dataState",void 0),Ie([fe()],e.KRTable.prototype,"_page",void 0),Ie([fe()],e.KRTable.prototype,"_pageSize",void 0),Ie([fe()],e.KRTable.prototype,"_totalItems",void 0),Ie([fe()],e.KRTable.prototype,"_totalPages",void 0),Ie([fe()],e.KRTable.prototype,"_searchQuery",void 0),Ie([fe()],e.KRTable.prototype,"_canScrollLeft",void 0),Ie([fe()],e.KRTable.prototype,"_canScrollRight",void 0),Ie([fe()],e.KRTable.prototype,"_canScrollHorizontal",void 0),Ie([fe()],e.KRTable.prototype,"_columnPickerOpen",void 0),Ie([fe()],e.KRTable.prototype,"_displayedColumns",void 0),Ie([ue({type:Object})],e.KRTable.prototype,"def",void 0),e.KRTable=Ie([ce("kr-table")],e.KRTable);var Ne=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSpinner=class extends le{constructor(){super(...arguments),this.size="md",this.color="dark"}render(){var e="",t="";return e="sm"==this.size?"16px":"md"==this.size?"24px":"lg"==this.size?"32px":"xl"==this.size?"48px":this.size,t="dark"==this.color?"#163052":"light"==this.color?"#ffffff":this.color,H`
1820
+ `],Ie([ue()],e.KRTable.prototype,"_data",void 0),Ie([ue()],e.KRTable.prototype,"_dataState",void 0),Ie([ue()],e.KRTable.prototype,"_page",void 0),Ie([ue()],e.KRTable.prototype,"_pageSize",void 0),Ie([ue()],e.KRTable.prototype,"_totalItems",void 0),Ie([ue()],e.KRTable.prototype,"_totalPages",void 0),Ie([ue()],e.KRTable.prototype,"_searchQuery",void 0),Ie([ue()],e.KRTable.prototype,"_canScrollLeft",void 0),Ie([ue()],e.KRTable.prototype,"_canScrollRight",void 0),Ie([ue()],e.KRTable.prototype,"_canScrollHorizontal",void 0),Ie([ue()],e.KRTable.prototype,"_columnPickerOpen",void 0),Ie([ue()],e.KRTable.prototype,"_displayedColumns",void 0),Ie([pe({type:Object})],e.KRTable.prototype,"def",void 0),e.KRTable=Ie([de("kr-table")],e.KRTable);var Ue=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSpinner=class extends ne{constructor(){super(...arguments),this.size="md",this.color="dark"}render(){var e="",t="";return e="sm"==this.size?"16px":"md"==this.size?"24px":"lg"==this.size?"32px":"xl"==this.size?"48px":this.size,t="dark"==this.color?"#163052":"light"==this.color?"#ffffff":this.color,q`
1785
1821
  <svg
1786
1822
  class="spinner"
1787
1823
  style=${`width: ${e}; height: ${e}; color: ${t}`}
@@ -1841,7 +1877,7 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1841
1877
  stroke: currentColor;
1842
1878
  stroke-linecap: round;
1843
1879
  }
1844
- `,Ne([ue({type:String,reflect:!0})],e.KRSpinner.prototype,"size",void 0),Ne([ue({type:String,reflect:!0})],e.KRSpinner.prototype,"color",void 0),e.KRSpinner=Ne([ce("kr-spinner")],e.KRSpinner);var We=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRProgressBar=class extends le{constructor(){super(...arguments),this.color="dark"}render(){let e="",t="";return e="dark"===this.color?"#163052":"light"===this.color?"#ffffff":this.color,t=this.trackColor?this.trackColor:"light"===this.color?"#ffffff4d":"#0000001a",H`
1880
+ `,Ue([pe({type:String,reflect:!0})],e.KRSpinner.prototype,"size",void 0),Ue([pe({type:String,reflect:!0})],e.KRSpinner.prototype,"color",void 0),e.KRSpinner=Ue([de("kr-spinner")],e.KRSpinner);var Ne=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRProgressBar=class extends ne{constructor(){super(...arguments),this.color="dark"}render(){let e="",t="";return e="dark"===this.color?"#163052":"light"===this.color?"#ffffff":this.color,t=this.trackColor?this.trackColor:"light"===this.color?"#ffffff4d":"#0000001a",q`
1845
1881
  <div
1846
1882
  class="progress-bar"
1847
1883
  style=${`background: ${t}`}
@@ -1882,49 +1918,49 @@ const De="important",Me=" !"+De,Be=_e(class extends ke{constructor(e){if(super(e
1882
1918
  left: 100%;
1883
1919
  }
1884
1920
  }
1885
- `,We([ue({type:String,reflect:!0})],e.KRProgressBar.prototype,"color",void 0),We([ue({type:String,reflect:!0})],e.KRProgressBar.prototype,"trackColor",void 0),e.KRProgressBar=We([ce("kr-progress-bar")],e.KRProgressBar);
1921
+ `,Ne([pe({type:String,reflect:!0})],e.KRProgressBar.prototype,"color",void 0),Ne([pe({type:String,reflect:!0})],e.KRProgressBar.prototype,"trackColor",void 0),e.KRProgressBar=Ne([de("kr-progress-bar")],e.KRProgressBar);
1886
1922
  /**
1887
1923
  * @license
1888
1924
  * Copyright 2018 Google LLC
1889
1925
  * SPDX-License-Identifier: BSD-3-Clause
1890
1926
  */
1891
- const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!==me&&e.type!==ve&&e.type!==xe)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===V||t===U)return t;const i=e.element,o=e.name;if(e.type===me){if(t===i[o])return V}else if(e.type===xe){if(!!t===i.hasAttribute(o))return V}else if(e.type===ve&&i.getAttribute(o)===t+"")return V;return((e,t=Ge)=>{e._$AH=t;
1927
+ const We=e=>e??V
1892
1928
  /**
1893
1929
  * @license
1894
1930
  * Copyright 2020 Google LLC
1895
1931
  * SPDX-License-Identifier: BSD-3-Clause
1896
- */})(e),t}});
1932
+ */,Ze={},Ge=xe(class extends _e{constructor(e){if(super(e),e.type!==ye&&e.type!==be&&e.type!==me)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===H||t===V)return t;const i=e.element,o=e.name;if(e.type===ye){if(t===i[o])return H}else if(e.type===me){if(!!t===i.hasAttribute(o))return H}else if(e.type===be&&i.getAttribute(o)===t+"")return H;return((e,t=Ze)=>{e._$AH=t;
1897
1933
  /**
1898
1934
  * @license
1899
1935
  * Copyright 2020 Google LLC
1900
1936
  * SPDX-License-Identifier: BSD-3-Clause
1901
- */var Xe=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTextField=class extends le{constructor(){super(),this.label="",this.name="",this.value="",this.placeholder="",this.type="text",this.required=!1,this.disabled=!1,this.readonly=!1,this.autocomplete="",this.hint="",this._touched=!1,this._dirty=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value="",this._touched=!1,this._dirty=!1,this._internals.setFormValue(""),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has("required")||e.has("value"))&&this._updateValidity()}_updateValidity(){this._input&&this._internals.setValidity(this._input.validity,this._input.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._input.validity,this._input.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._input.validity,this._input.validationMessage)}render(){let e="";return this._touched&&this._input&&!this._input.validity.valid&&(e=this._input.validationMessage),H`
1937
+ */})(e),t}});var Qe=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTextField=class extends ne{constructor(){super(),this.label="",this.name="",this.value="",this.placeholder="",this.type="text",this.required=!1,this.disabled=!1,this.readonly=!1,this.autocomplete="",this.hint="",this._touched=!1,this._dirty=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value="",this._touched=!1,this._dirty=!1,this._internals.setFormValue(""),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has("required")||e.has("value"))&&this._updateValidity()}_updateValidity(){this._input&&this._internals.setValidity(this._input.validity,this._input.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._input.validity,this._input.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._input.validity,this._input.validationMessage)}render(){let e="";return this._touched&&this._input&&!this._input.validity.valid&&(e=this._input.validationMessage),q`
1902
1938
  <div class="wrapper">
1903
- ${this.label?H`
1939
+ ${this.label?q`
1904
1940
  <label for="input">
1905
1941
  ${this.label}
1906
- ${this.required?H`<span class="required" aria-hidden="true">*</span>`:""}
1942
+ ${this.required?q`<span class="required" aria-hidden="true">*</span>`:""}
1907
1943
  </label>
1908
1944
  `:""}
1909
1945
  <input
1910
1946
  id="input"
1911
- class=${we({"input--invalid":this._touched&&this._input&&!this._input.validity.valid})}
1947
+ class=${ke({"input--invalid":this._touched&&this._input&&!this._input.validity.valid})}
1912
1948
  type=${this.type}
1913
1949
  name=${this.name}
1914
- .value=${Qe(this.value)}
1950
+ .value=${Ge(this.value)}
1915
1951
  placeholder=${this.placeholder}
1916
1952
  ?required=${this.required}
1917
1953
  ?disabled=${this.disabled}
1918
1954
  ?readonly=${this.readonly}
1919
- minlength=${Ze(this.minlength)}
1920
- maxlength=${Ze(this.maxlength)}
1921
- pattern=${Ze(this.pattern)}
1922
- autocomplete=${Ze(this.autocomplete||void 0)}
1955
+ minlength=${We(this.minlength)}
1956
+ maxlength=${We(this.maxlength)}
1957
+ pattern=${We(this.pattern)}
1958
+ autocomplete=${We(this.autocomplete||void 0)}
1923
1959
  @input=${this._handleInput}
1924
1960
  @change=${this._handleChange}
1925
1961
  @blur=${this._handleBlur}
1926
1962
  />
1927
- ${e?H`<div class="validation-message">${e}</div>`:this.hint?H`<div class="hint">${this.hint}</div>`:""}
1963
+ ${e?q`<div class="validation-message">${e}</div>`:this.hint?q`<div class="hint">${this.hint}</div>`:""}
1928
1964
  </div>
1929
1965
  `}focus(){this._input?.focus()}blur(){this._input?.blur()}select(){this._input?.select()}},e.KRTextField.styles=n`
1930
1966
  :host {
@@ -1993,17 +2029,17 @@ const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!
1993
2029
  font-size: 0.75rem;
1994
2030
  color: var(--kr-text-field-helper-color, #6b7280);
1995
2031
  }
1996
- `,e.KRTextField.formAssociated=!0,Xe([ue({type:String})],e.KRTextField.prototype,"label",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"name",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"value",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"placeholder",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"type",void 0),Xe([ue({type:Boolean})],e.KRTextField.prototype,"required",void 0),Xe([ue({type:Boolean})],e.KRTextField.prototype,"disabled",void 0),Xe([ue({type:Boolean})],e.KRTextField.prototype,"readonly",void 0),Xe([ue({type:Number})],e.KRTextField.prototype,"minlength",void 0),Xe([ue({type:Number})],e.KRTextField.prototype,"maxlength",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"pattern",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"autocomplete",void 0),Xe([ue({type:String})],e.KRTextField.prototype,"hint",void 0),Xe([ge("input")],e.KRTextField.prototype,"_input",void 0),Xe([fe()],e.KRTextField.prototype,"_touched",void 0),Xe([fe()],e.KRTextField.prototype,"_dirty",void 0),e.KRTextField=Xe([ce("kr-text-field")],e.KRTextField);var Ye=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSelectField=class extends le{constructor(){super(),this.label="",this.name="",this.value="",this.placeholder="Select an option",this.disabled=!1,this.required=!1,this.readonly=!1,this.hint="",this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._handleOutsideClick=e=>{e.composedPath().includes(this)||this._close()},this._handleKeyDown=e=>{if(!this._isOpen)return;const t=Array.from(this.querySelectorAll("kr-select-option"));switch(e.key){case"Escape":this._close(),this._triggerElement?.focus();break;case"ArrowDown":if(e.preventDefault(),t.some(e=>!e.disabled)){let e=this._highlightedIndex+1;for(;e<t.length&&t[e]?.disabled;)e++;e<t.length&&(this._highlightedIndex=e)}break;case"ArrowUp":e.preventDefault();{let e=this._highlightedIndex-1;for(;e>=0&&t[e]?.disabled;)e--;e>=0&&(this._highlightedIndex=e)}break;case"Enter":e.preventDefault(),this._highlightedIndex>=0&&this._highlightedIndex<t.length&&this._selectOption(t[this._highlightedIndex])}},this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value="",this._touched=!1,this._internals.setFormValue(""),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick),document.addEventListener("keydown",this._handleKeyDown),this.addEventListener("invalid",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has("required")||e.has("value"))&&this._updateValidity()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleOutsideClick),document.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("invalid",this._handleInvalid)}_toggle(){if(!this.disabled&&!this.readonly)if(this._isOpen)this._close();else{this._isOpen=!0;const e=Array.from(this.querySelectorAll("kr-select-option"));this._highlightedIndex=e.findIndex(e=>e.value===this.value),requestAnimationFrame(()=>{const e=this.shadowRoot?.querySelector(".select-dropdown");if(e){const t=this._triggerElement.getBoundingClientRect();e.style.top=t.bottom+4+"px",e.style.left=t.left+"px",e.style.width=t.width+"px"}})}}_close(){this._isOpen=!1,this._highlightedIndex=-1}_selectOption(e){e.disabled||(this.value=e.value,this._internals.setFormValue(this.value),this._updateValidity(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this._close(),this._triggerElement?.focus())}_handleBlur(){this._touched=!0,this._updateValidity()}_updateValidity(){this.required&&!this.value?this._internals.setValidity({valueMissing:!0},"Please select an option",this._triggerElement):this._internals.setValidity({})}render(){const e=Array.from(this.querySelectorAll("kr-select-option")),t=e.find(e=>e.value===this.value)?.label;return H`
2032
+ `,e.KRTextField.formAssociated=!0,Qe([pe({type:String})],e.KRTextField.prototype,"label",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"name",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"value",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"placeholder",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"type",void 0),Qe([pe({type:Boolean})],e.KRTextField.prototype,"required",void 0),Qe([pe({type:Boolean})],e.KRTextField.prototype,"disabled",void 0),Qe([pe({type:Boolean})],e.KRTextField.prototype,"readonly",void 0),Qe([pe({type:Number})],e.KRTextField.prototype,"minlength",void 0),Qe([pe({type:Number})],e.KRTextField.prototype,"maxlength",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"pattern",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"autocomplete",void 0),Qe([pe({type:String})],e.KRTextField.prototype,"hint",void 0),Qe([fe("input")],e.KRTextField.prototype,"_input",void 0),Qe([ue()],e.KRTextField.prototype,"_touched",void 0),Qe([ue()],e.KRTextField.prototype,"_dirty",void 0),e.KRTextField=Qe([de("kr-text-field")],e.KRTextField);var Xe=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSelectField=class extends ne{constructor(){super(),this.label="",this.name="",this.value="",this.placeholder="Select an option",this.disabled=!1,this.required=!1,this.readonly=!1,this.hint="",this._isOpen=!1,this._highlightedIndex=-1,this._touched=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._handleOutsideClick=e=>{e.composedPath().includes(this)||this._close()},this._handleKeyDown=e=>{if(!this._isOpen)return;const t=Array.from(this.querySelectorAll("kr-select-option"));switch(e.key){case"Escape":this._close(),this._triggerElement?.focus();break;case"ArrowDown":if(e.preventDefault(),t.some((e=>!e.disabled))){let e=this._highlightedIndex+1;for(;e<t.length&&t[e]?.disabled;)e++;e<t.length&&(this._highlightedIndex=e)}break;case"ArrowUp":e.preventDefault();{let e=this._highlightedIndex-1;for(;e>=0&&t[e]?.disabled;)e--;e>=0&&(this._highlightedIndex=e)}break;case"Enter":e.preventDefault(),this._highlightedIndex>=0&&this._highlightedIndex<t.length&&this._selectOption(t[this._highlightedIndex])}},this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value="",this._touched=!1,this._internals.setFormValue(""),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick),document.addEventListener("keydown",this._handleKeyDown),this.addEventListener("invalid",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has("required")||e.has("value"))&&this._updateValidity()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleOutsideClick),document.removeEventListener("keydown",this._handleKeyDown),this.removeEventListener("invalid",this._handleInvalid)}_toggle(){if(!this.disabled&&!this.readonly)if(this._isOpen)this._close();else{this._isOpen=!0;const e=Array.from(this.querySelectorAll("kr-select-option"));this._highlightedIndex=e.findIndex((e=>e.value===this.value)),requestAnimationFrame((()=>{const e=this.shadowRoot?.querySelector(".select-dropdown");if(e){const t=this._triggerElement.getBoundingClientRect();e.style.top=t.bottom+4+"px",e.style.left=t.left+"px",e.style.width=t.width+"px"}}))}}_close(){this._isOpen=!1,this._highlightedIndex=-1}_selectOption(e){e.disabled||(this.value=e.value,this._internals.setFormValue(this.value),this._updateValidity(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this._close(),this._triggerElement?.focus())}_handleBlur(){this._touched=!0,this._updateValidity()}_updateValidity(){this.required&&!this.value?this._internals.setValidity({valueMissing:!0},"Please select an option",this._triggerElement):this._internals.setValidity({})}render(){const e=Array.from(this.querySelectorAll("kr-select-option")),t=e.find((e=>e.value===this.value))?.label;return q`
1997
2033
  <div class="wrapper">
1998
- ${this.label?H`
2034
+ ${this.label?q`
1999
2035
  <label>
2000
2036
  ${this.label}
2001
- ${this.required?H`<span class="required" aria-hidden="true">*</span>`:""}
2037
+ ${this.required?q`<span class="required" aria-hidden="true">*</span>`:""}
2002
2038
  </label>
2003
- `:U}
2039
+ `:V}
2004
2040
  <div class="select-wrapper">
2005
2041
  <button
2006
- class=${we({"select-trigger":!0,"select-trigger--open":this._isOpen,"select-trigger--invalid":this._touched&&this.required&&!this.value})}
2042
+ class=${ke({"select-trigger":!0,"select-trigger--open":this._isOpen,"select-trigger--invalid":this._touched&&this.required&&!this.value})}
2007
2043
  type="button"
2008
2044
  ?disabled=${this.disabled}
2009
2045
  aria-haspopup="listbox"
@@ -2011,11 +2047,11 @@ const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!
2011
2047
  @click=${this._toggle}
2012
2048
  @blur=${this._handleBlur}
2013
2049
  >
2014
- <span class=${we({"select-value":!0,"select-placeholder":!t})}>
2050
+ <span class=${ke({"select-value":!0,"select-placeholder":!t})}>
2015
2051
  ${t||this.placeholder}
2016
2052
  </span>
2017
2053
  <svg
2018
- class=${we({"chevron-icon":!0,"select-icon":!0,"select-icon--open":this._isOpen})}
2054
+ class=${ke({"chevron-icon":!0,"select-icon":!0,"select-icon--open":this._isOpen})}
2019
2055
  viewBox="0 0 24 24"
2020
2056
  fill="currentColor"
2021
2057
  >
@@ -2023,31 +2059,31 @@ const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!
2023
2059
  </svg>
2024
2060
  </button>
2025
2061
 
2026
- <div class=${we({"select-dropdown":!0,hidden:!this._isOpen})} role="listbox">
2062
+ <div class=${ke({"select-dropdown":!0,hidden:!this._isOpen})} role="listbox">
2027
2063
  <div class="select-options">
2028
- ${0===e.length?H`<div class="select-empty">No options available</div>`:e.map((e,t)=>{const i=e.value===this.value;return H`
2064
+ ${0===e.length?q`<div class="select-empty">No options available</div>`:e.map(((e,t)=>{const i=e.value===this.value;return q`
2029
2065
  <div
2030
- class=${we({"select-option":!0,"select-option--selected":i,"select-option--disabled":e.disabled,"select-option--highlighted":t===this._highlightedIndex})}
2066
+ class=${ke({"select-option":!0,"select-option--selected":i,"select-option--disabled":e.disabled,"select-option--highlighted":t===this._highlightedIndex})}
2031
2067
  role="option"
2032
2068
  aria-selected=${i}
2033
2069
  @click=${()=>this._selectOption(e)}
2034
2070
  @mouseenter=${()=>this._highlightedIndex=t}
2035
2071
  >
2036
2072
  ${e.label}
2037
- ${i?H`<svg class="chevron-icon select-check" viewBox="0 0 20 20" fill="currentColor">
2073
+ ${i?q`<svg class="chevron-icon select-check" viewBox="0 0 20 20" fill="currentColor">
2038
2074
  <path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" />
2039
- </svg>`:U}
2075
+ </svg>`:V}
2040
2076
  </div>
2041
- `})}
2077
+ `}))}
2042
2078
  </div>
2043
2079
  </div>
2044
2080
  </div>
2045
- ${this._touched&&this.required&&!this.value?H`<div class="validation-message">Please select an option</div>`:this.hint?H`<div class="hint">${this.hint}</div>`:""}
2081
+ ${this._touched&&this.required&&!this.value?q`<div class="validation-message">Please select an option</div>`:this.hint?q`<div class="hint">${this.hint}</div>`:""}
2046
2082
  </div>
2047
2083
  <div class="options-slot">
2048
2084
  <slot @slotchange=${()=>this.requestUpdate()}></slot>
2049
2085
  </div>
2050
- `}focus(){this._triggerElement?.focus()}blur(){this._triggerElement?.blur()}},e.KRSelectField.styles=[de,n`
2086
+ `}focus(){this._triggerElement?.focus()}blur(){this._triggerElement?.blur()}},e.KRSelectField.styles=[ae,n`
2051
2087
  :host {
2052
2088
  display: block;
2053
2089
  font-family: inherit;
@@ -2230,37 +2266,37 @@ const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!
2230
2266
  .options-slot {
2231
2267
  display: none;
2232
2268
  }
2233
- `],e.KRSelectField.formAssociated=!0,Ye([ue({type:String})],e.KRSelectField.prototype,"label",void 0),Ye([ue({type:String})],e.KRSelectField.prototype,"name",void 0),Ye([ue({type:String})],e.KRSelectField.prototype,"value",void 0),Ye([ue({type:String})],e.KRSelectField.prototype,"placeholder",void 0),Ye([ue({type:Boolean})],e.KRSelectField.prototype,"disabled",void 0),Ye([ue({type:Boolean})],e.KRSelectField.prototype,"required",void 0),Ye([ue({type:Boolean})],e.KRSelectField.prototype,"readonly",void 0),Ye([ue({type:String})],e.KRSelectField.prototype,"hint",void 0),Ye([fe()],e.KRSelectField.prototype,"_isOpen",void 0),Ye([fe()],e.KRSelectField.prototype,"_highlightedIndex",void 0),Ye([fe()],e.KRSelectField.prototype,"_touched",void 0),Ye([ge(".select-trigger")],e.KRSelectField.prototype,"_triggerElement",void 0),e.KRSelectField=Ye([ce("kr-select-field")],e.KRSelectField);var Je=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSelectOption=class extends le{constructor(){super(...arguments),this.value="",this.disabled=!1}get label(){return this.textContent?.trim()||""}render(){return H`<slot></slot>`}},e.KRSelectOption.styles=n`
2269
+ `],e.KRSelectField.formAssociated=!0,Xe([pe({type:String})],e.KRSelectField.prototype,"label",void 0),Xe([pe({type:String})],e.KRSelectField.prototype,"name",void 0),Xe([pe({type:String})],e.KRSelectField.prototype,"value",void 0),Xe([pe({type:String})],e.KRSelectField.prototype,"placeholder",void 0),Xe([pe({type:Boolean})],e.KRSelectField.prototype,"disabled",void 0),Xe([pe({type:Boolean})],e.KRSelectField.prototype,"required",void 0),Xe([pe({type:Boolean})],e.KRSelectField.prototype,"readonly",void 0),Xe([pe({type:String})],e.KRSelectField.prototype,"hint",void 0),Xe([ue()],e.KRSelectField.prototype,"_isOpen",void 0),Xe([ue()],e.KRSelectField.prototype,"_highlightedIndex",void 0),Xe([ue()],e.KRSelectField.prototype,"_touched",void 0),Xe([fe(".select-trigger")],e.KRSelectField.prototype,"_triggerElement",void 0),e.KRSelectField=Xe([de("kr-select-field")],e.KRSelectField);var Ye=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRSelectOption=class extends ne{constructor(){super(...arguments),this.value="",this.disabled=!1}get label(){return this.textContent?.trim()||""}render(){return q`<slot></slot>`}},e.KRSelectOption.styles=n`
2234
2270
  :host {
2235
2271
  display: none;
2236
2272
  }
2237
- `,Je([ue({type:String})],e.KRSelectOption.prototype,"value",void 0),Je([ue({type:Boolean})],e.KRSelectOption.prototype,"disabled",void 0),e.KRSelectOption=Je([ce("kr-select-option")],e.KRSelectOption);var et=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTextareaField=class extends le{constructor(){super(),this.label="",this.name="",this.value="",this.placeholder="",this.required=!1,this.disabled=!1,this.readonly=!1,this.rows=3,this.autocomplete="",this.hint="",this._touched=!1,this._dirty=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value="",this._touched=!1,this._dirty=!1,this._internals.setFormValue(""),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has("required")||e.has("value"))&&this._updateValidity()}_updateValidity(){this._textarea&&this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}render(){let e="";return this._touched&&this._textarea&&!this._textarea.validity.valid&&(e=this._textarea.validationMessage),H`
2273
+ `,Ye([pe({type:String})],e.KRSelectOption.prototype,"value",void 0),Ye([pe({type:Boolean})],e.KRSelectOption.prototype,"disabled",void 0),e.KRSelectOption=Ye([de("kr-select-option")],e.KRSelectOption);var Je=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};e.KRTextareaField=class extends ne{constructor(){super(),this.label="",this.name="",this.value="",this.placeholder="",this.required=!1,this.disabled=!1,this.readonly=!1,this.rows=3,this.autocomplete="",this.hint="",this._touched=!1,this._dirty=!1,this._handleInvalid=e=>{e.preventDefault(),this._touched=!0},this._internals=this.attachInternals()}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}formResetCallback(){this.value="",this._touched=!1,this._dirty=!1,this._internals.setFormValue(""),this._internals.setValidity({})}formStateRestoreCallback(e){this.value=e}connectedCallback(){super.connectedCallback(),this.addEventListener("invalid",this._handleInvalid)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("invalid",this._handleInvalid)}firstUpdated(){this._updateValidity()}updated(e){(e.has("required")||e.has("value"))&&this._updateValidity()}_updateValidity(){this._textarea&&this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleInput(e){this.value=e.target.value,this._dirty=!0,this._internals.setFormValue(this.value),this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}_handleChange(e){this.value=e.target.value,this._internals.setFormValue(this.value)}_handleBlur(){this._touched=!0,this._internals.setValidity(this._textarea.validity,this._textarea.validationMessage)}render(){let e="";return this._touched&&this._textarea&&!this._textarea.validity.valid&&(e=this._textarea.validationMessage),q`
2238
2274
  <div class="wrapper">
2239
- ${this.label?H`
2275
+ ${this.label?q`
2240
2276
  <label for="textarea">
2241
2277
  ${this.label}
2242
- ${this.required?H`<span class="required" aria-hidden="true">*</span>`:U}
2278
+ ${this.required?q`<span class="required" aria-hidden="true">*</span>`:V}
2243
2279
  </label>
2244
- `:U}
2280
+ `:V}
2245
2281
  <textarea
2246
2282
  id="textarea"
2247
- class=${we({"textarea--invalid":this._touched&&this._textarea&&!this._textarea.validity.valid})}
2283
+ class=${ke({"textarea--invalid":this._touched&&this._textarea&&!this._textarea.validity.valid})}
2248
2284
  name=${this.name}
2249
- .value=${Qe(this.value)}
2285
+ .value=${Ge(this.value)}
2250
2286
  placeholder=${this.placeholder}
2251
2287
  ?required=${this.required}
2252
2288
  ?disabled=${this.disabled}
2253
2289
  ?readonly=${this.readonly}
2254
2290
  rows=${this.rows}
2255
- cols=${Ze(this.cols)}
2256
- minlength=${Ze(this.minlength)}
2257
- maxlength=${Ze(this.maxlength)}
2258
- autocomplete=${Ze(this.autocomplete||void 0)}
2291
+ cols=${We(this.cols)}
2292
+ minlength=${We(this.minlength)}
2293
+ maxlength=${We(this.maxlength)}
2294
+ autocomplete=${We(this.autocomplete||void 0)}
2259
2295
  @input=${this._handleInput}
2260
2296
  @change=${this._handleChange}
2261
2297
  @blur=${this._handleBlur}
2262
2298
  ></textarea>
2263
- ${e?H`<div class="validation-message">${e}</div>`:this.hint?H`<div class="hint">${this.hint}</div>`:U}
2299
+ ${e?q`<div class="validation-message">${e}</div>`:this.hint?q`<div class="hint">${this.hint}</div>`:V}
2264
2300
  </div>
2265
2301
  `}focus(){this._textarea?.focus()}blur(){this._textarea?.blur()}select(){this._textarea?.select()}},e.KRTextareaField.styles=n`
2266
2302
  :host {
@@ -2332,12 +2368,12 @@ const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!
2332
2368
  font-size: 0.75rem;
2333
2369
  color: var(--kr-textarea-field-helper-color, #6b7280);
2334
2370
  }
2335
- `,e.KRTextareaField.formAssociated=!0,et([ue({type:String})],e.KRTextareaField.prototype,"label",void 0),et([ue({type:String})],e.KRTextareaField.prototype,"name",void 0),et([ue({type:String})],e.KRTextareaField.prototype,"value",void 0),et([ue({type:String})],e.KRTextareaField.prototype,"placeholder",void 0),et([ue({type:Boolean})],e.KRTextareaField.prototype,"required",void 0),et([ue({type:Boolean})],e.KRTextareaField.prototype,"disabled",void 0),et([ue({type:Boolean})],e.KRTextareaField.prototype,"readonly",void 0),et([ue({type:Number})],e.KRTextareaField.prototype,"rows",void 0),et([ue({type:Number})],e.KRTextareaField.prototype,"cols",void 0),et([ue({type:Number})],e.KRTextareaField.prototype,"minlength",void 0),et([ue({type:Number})],e.KRTextareaField.prototype,"maxlength",void 0),et([ue({type:String})],e.KRTextareaField.prototype,"autocomplete",void 0),et([ue({type:String})],e.KRTextareaField.prototype,"hint",void 0),et([ge("textarea")],e.KRTextareaField.prototype,"_textarea",void 0),et([fe()],e.KRTextareaField.prototype,"_touched",void 0),et([fe()],e.KRTextareaField.prototype,"_dirty",void 0),e.KRTextareaField=et([ce("kr-textarea-field")],e.KRTextareaField);var tt=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let it=class extends le{constructor(){super(...arguments),this.label="",this.value=""}render(){return H`
2371
+ `,e.KRTextareaField.formAssociated=!0,Je([pe({type:String})],e.KRTextareaField.prototype,"label",void 0),Je([pe({type:String})],e.KRTextareaField.prototype,"name",void 0),Je([pe({type:String})],e.KRTextareaField.prototype,"value",void 0),Je([pe({type:String})],e.KRTextareaField.prototype,"placeholder",void 0),Je([pe({type:Boolean})],e.KRTextareaField.prototype,"required",void 0),Je([pe({type:Boolean})],e.KRTextareaField.prototype,"disabled",void 0),Je([pe({type:Boolean})],e.KRTextareaField.prototype,"readonly",void 0),Je([pe({type:Number})],e.KRTextareaField.prototype,"rows",void 0),Je([pe({type:Number})],e.KRTextareaField.prototype,"cols",void 0),Je([pe({type:Number})],e.KRTextareaField.prototype,"minlength",void 0),Je([pe({type:Number})],e.KRTextareaField.prototype,"maxlength",void 0),Je([pe({type:String})],e.KRTextareaField.prototype,"autocomplete",void 0),Je([pe({type:String})],e.KRTextareaField.prototype,"hint",void 0),Je([fe("textarea")],e.KRTextareaField.prototype,"_textarea",void 0),Je([ue()],e.KRTextareaField.prototype,"_touched",void 0),Je([ue()],e.KRTextareaField.prototype,"_dirty",void 0),e.KRTextareaField=Je([de("kr-textarea-field")],e.KRTextareaField);var et=function(e,t,i,o){var r,s=arguments.length,n=s<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,i,n):r(t,i))||n);return s>3&&n&&Object.defineProperty(t,i,n),n};let tt=class extends ne{constructor(){super(...arguments),this.label="",this.value=""}render(){return q`
2336
2372
  <div class="wrapper">
2337
- ${this.label?H`<label>${this.label}</label>`:U}
2373
+ ${this.label?q`<label>${this.label}</label>`:V}
2338
2374
  <div class="value">${this.value}</div>
2339
2375
  </div>
2340
- `}};it.styles=n`
2376
+ `}};tt.styles=n`
2341
2377
  :host {
2342
2378
  display: block;
2343
2379
  font-family: inherit;
@@ -2359,5 +2395,5 @@ const Ze=e=>e??U,Ge={},Qe=_e(class extends ke{constructor(e){if(super(e),e.type!
2359
2395
  font-size: 14px;
2360
2396
  color: black;
2361
2397
  }
2362
- `,tt([ue({type:String})],it.prototype,"label",void 0),tt([ue({type:String})],it.prototype,"value",void 0),it=tt([ce("kr-detail-field")],it),e.KRDialogRef=Pe,e.krBaseCSS=de}),function(e){Object.keys(e).forEach(function(t){t.startsWith("KR")&&"function"==typeof e[t]&&(e[t.slice(2)]=e[t],delete e[t])})}(kr);
2398
+ `,et([pe({type:String})],tt.prototype,"label",void 0),et([pe({type:String})],tt.prototype,"value",void 0),tt=et([de("kr-detail-field")],tt),e.KRDialogRef=ze,e.krBaseCSS=ae})),function(e){Object.keys(e).forEach((function(t){t.startsWith("KR")&&"function"==typeof e[t]&&(e[t.slice(2)]=e[t],delete e[t])}))}(kr);
2363
2399
  //# sourceMappingURL=krubble-components.umd.min.js.map