kanto-ds 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cdn/kanto.min.js +289 -187
  2. package/dist/chunks/defaults-DaB3TcsM.js +72 -0
  3. package/dist/chunks/{defaults-BnB3ir8l.js.map → defaults-DaB3TcsM.js.map} +1 -1
  4. package/dist/chunks/{floating-C9RLa6cZ.js → floating-DxiFx4AK.js} +11 -10
  5. package/dist/chunks/floating-DxiFx4AK.js.map +1 -0
  6. package/dist/components/core/kt-icon/kt-icon.js +1 -1
  7. package/dist/components/data/kt-chat-message/kt-chat-message.d.ts +6 -0
  8. package/dist/components/data/kt-chat-message/kt-chat-message.js +49 -13
  9. package/dist/components/data/kt-chat-message/kt-chat-message.js.map +1 -1
  10. package/dist/components/forms/kt-date-input/kt-date-input.js +1 -1
  11. package/dist/components/forms/kt-date-picker/kt-date-picker.js +1 -1
  12. package/dist/components/forms/kt-input/kt-input.js +1 -1
  13. package/dist/components/forms/kt-input-menu/kt-input-menu.js +1 -1
  14. package/dist/components/forms/kt-multi-select/kt-multi-select.js +1 -1
  15. package/dist/components/forms/kt-select/kt-select.js +1 -1
  16. package/dist/components/navigation/kt-app-shell/kt-app-shell.d.ts +2 -2
  17. package/dist/components/navigation/kt-app-shell/kt-app-shell.js +15 -10
  18. package/dist/components/navigation/kt-app-shell/kt-app-shell.js.map +1 -1
  19. package/dist/components/navigation/kt-header/kt-header.js +8 -0
  20. package/dist/components/navigation/kt-header/kt-header.js.map +1 -1
  21. package/dist/components/navigation/kt-user-menu/kt-user-menu.d.ts +6 -0
  22. package/dist/components/navigation/kt-user-menu/kt-user-menu.js +92 -40
  23. package/dist/components/navigation/kt-user-menu/kt-user-menu.js.map +1 -1
  24. package/dist/components/overlays/kt-dropdown/kt-dropdown.js +1 -1
  25. package/dist/components/overlays/kt-side-panel/kt-side-panel.d.ts +2 -0
  26. package/dist/components/overlays/kt-side-panel/kt-side-panel.js +30 -19
  27. package/dist/components/overlays/kt-side-panel/kt-side-panel.js.map +1 -1
  28. package/dist/components/overlays/kt-tour/kt-tour.d.ts +6 -0
  29. package/dist/components/overlays/kt-tour/kt-tour.js +23 -13
  30. package/dist/components/overlays/kt-tour/kt-tour.js.map +1 -1
  31. package/dist/custom-elements.json +4223 -4152
  32. package/dist/docs/kt-app-shell.md +2 -2
  33. package/dist/docs/kt-chat-message.md +13 -0
  34. package/dist/docs/kt-side-panel.md +13 -6
  35. package/dist/docs/kt-user-menu.md +15 -0
  36. package/dist/icons/defaults.d.ts +1 -0
  37. package/dist/icons/index.js +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/internal/floating.d.ts +1 -1
  40. package/dist/vscode.css-custom-data.json +32 -32
  41. package/dist/vscode.html-custom-data.json +356 -337
  42. package/dist/web-types.json +1063 -1030
  43. package/package.json +1 -1
  44. package/dist/chunks/defaults-BnB3ir8l.js +0 -71
  45. package/dist/chunks/floating-C9RLa6cZ.js.map +0 -1
@@ -1,6 +1,6 @@
1
- var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vo=Symbol(),ns=new WeakMap,Pa=class{constructor(t,e,a){if(this._$cssResult$=!0,a!==Vo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Qa&&t===void 0){let a=e!==void 0&&e.length===1;a&&(t=ns.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),a&&ns.set(e,t))}return t}toString(){return this.cssText}},ls=o=>new Pa(typeof o=="string"?o:o+"",void 0,Vo),f=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((a,r,i)=>a+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1],o[0]);return new Pa(e,o,Vo)},ds=(o,t)=>{if(Qa)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let a=document.createElement("style"),r=Za.litNonce;r!==void 0&&a.setAttribute("nonce",r),a.textContent=e.cssText,o.appendChild(a)}},Go=Qa?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let a of t.cssRules)e+=a.cssText;return ls(e)})(o):o;var{is:En,defineProperty:In,getOwnPropertyDescriptor:Fn,getOwnPropertyNames:Un,getOwnPropertySymbols:Nn,getPrototypeOf:Hn}=Object,Ja=globalThis,ps=Ja.trustedTypes,jn=ps?ps.emptyScript:"",_n=Ja.reactiveElementPolyfillSupport,Aa=(o,t)=>o,Ma={toAttribute(o,t){switch(t){case Boolean:o=o?jn:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},to=(o,t)=>!En(o,t),cs={attribute:!0,type:String,converter:Ma,reflect:!1,useDefault:!1,hasChanged:to};Symbol.metadata??=Symbol("metadata"),Ja.litPropertyMetadata??=new WeakMap;var Xe=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=cs){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let a=Symbol(),r=this.getPropertyDescriptor(t,a,e);r!==void 0&&In(this.prototype,t,r)}}static getPropertyDescriptor(t,e,a){let{get:r,set:i}=Fn(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:r,set(s){let p=r?.call(this);i?.call(this,s),this.requestUpdate(t,p,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??cs}static _$Ei(){if(this.hasOwnProperty(Aa("elementProperties")))return;let t=Hn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Aa("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Aa("properties"))){let e=this.properties,a=[...Un(e),...Nn(e)];for(let r of a)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[a,r]of e)this.elementProperties.set(a,r)}this._$Eh=new Map;for(let[e,a]of this.elementProperties){let r=this._$Eu(e,a);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let a=new Set(t.flat(1/0).reverse());for(let r of a)e.unshift(Go(r))}else t!==void 0&&e.push(Go(t));return e}static _$Eu(t,e){let a=e.attribute;return a===!1?void 0:typeof a=="string"?a:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let a of e.keys())this.hasOwnProperty(a)&&(t.set(a,this[a]),delete this[a]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ds(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,a){this._$AK(t,a)}_$ET(t,e){let a=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,a);if(r!==void 0&&a.reflect===!0){let i=(a.converter?.toAttribute!==void 0?a.converter:Ma).toAttribute(e,a.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let a=this.constructor,r=a._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=a.getPropertyOptions(r),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Ma;this._$Em=r;let p=s.fromAttribute(e,i.type);this[r]=p??this._$Ej?.get(r)??p,this._$Em=null}}requestUpdate(t,e,a,r=!1,i){if(t!==void 0){let s=this.constructor;if(r===!1&&(i=this[t]),a??=s.getPropertyOptions(t),!((a.hasChanged??to)(i,e)||a.useDefault&&a.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,a))))return;this.C(t,e,a)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:a,reflect:r,wrapped:i},s){a&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||a||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[r,i]of a){let{wrapped:s}=i,p=this[r];s!==!0||this._$AL.has(r)||p===void 0||this.C(r,void 0,i,p)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(a=>a.hostUpdate?.()),this.update(e)):this._$EM()}catch(a){throw t=!1,this._$EM(),a}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};Xe.elementStyles=[],Xe.shadowRootOptions={mode:"open"},Xe[Aa("elementProperties")]=new Map,Xe[Aa("finalized")]=new Map,_n?.({ReactiveElement:Xe}),(Ja.reactiveElementVersions??=[]).push("2.1.2");var Yo=globalThis,hs=o=>o,eo=Yo.trustedTypes,us=eo?eo.createPolicy("lit-html",{createHTML:o=>o}):void 0,Xo="$lit$",Ze=`lit$${Math.random().toFixed(9).slice(2)}$`,Zo="?"+Ze,Vn=`<${Zo}>`,Ir=document,Ta=()=>Ir.createComment(""),La=o=>o===null||typeof o!="object"&&typeof o!="function",Qo=Array.isArray,xs=o=>Qo(o)||typeof o?.[Symbol.iterator]=="function",Wo=`[
2
- \f\r]`,Da=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fs=/-->/g,ms=/>/g,qr=RegExp(`>|${Wo}(?:([^\\s"'>=/]+)(${Wo}*=${Wo}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`,"g"),gs=/'/g,vs=/"/g,ys=/^(?:script|style|textarea|title)$/i,Jo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Jo(1),M=Jo(2),Vc=Jo(3),vt=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),bs=new WeakMap,Er=Ir.createTreeWalker(Ir,129);function ks(o,t){if(!Qo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return us!==void 0?us.createHTML(t):t}var ws=(o,t)=>{let e=o.length-1,a=[],r,i=t===2?"<svg>":t===3?"<math>":"",s=Da;for(let p=0;p<e;p++){let h=o[p],u,m,b=-1,k=0;for(;k<h.length&&(s.lastIndex=k,m=s.exec(h),m!==null);)k=s.lastIndex,s===Da?m[1]==="!--"?s=fs:m[1]!==void 0?s=ms:m[2]!==void 0?(ys.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=qr):m[3]!==void 0&&(s=qr):s===qr?m[0]===">"?(s=r??Da,b=-1):m[1]===void 0?b=-2:(b=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?qr:m[3]==='"'?vs:gs):s===vs||s===gs?s=qr:s===fs||s===ms?s=Da:(s=qr,r=void 0);let $=s===qr&&o[p+1].startsWith("/>")?" ":"";i+=s===Da?h+Vn:b>=0?(a.push(u),h.slice(0,b)+Xo+h.slice(b)+Ze+$):h+Ze+(b===-2?p:$)}return[ks(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Ba=class o{constructor({strings:t,_$litType$:e},a){let r;this.parts=[];let i=0,s=0,p=t.length-1,h=this.parts,[u,m]=ws(t,e);if(this.el=o.createElement(u,a),Er.currentNode=this.el.content,e===2||e===3){let b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=Er.nextNode())!==null&&h.length<p;){if(r.nodeType===1){if(r.hasAttributes())for(let b of r.getAttributeNames())if(b.endsWith(Xo)){let k=m[s++],$=r.getAttribute(b).split(Ze),D=/([.?@])?(.*)/.exec(k);h.push({type:1,index:i,name:D[2],strings:$,ctor:D[1]==="."?ao:D[1]==="?"?oo:D[1]==="@"?io:Ur}),r.removeAttribute(b)}else b.startsWith(Ze)&&(h.push({type:6,index:i}),r.removeAttribute(b));if(ys.test(r.tagName)){let b=r.textContent.split(Ze),k=b.length-1;if(k>0){r.textContent=eo?eo.emptyScript:"";for(let $=0;$<k;$++)r.append(b[$],Ta()),Er.nextNode(),h.push({type:2,index:++i});r.append(b[k],Ta())}}}else if(r.nodeType===8)if(r.data===Zo)h.push({type:2,index:i});else{let b=-1;for(;(b=r.data.indexOf(Ze,b+1))!==-1;)h.push({type:7,index:i}),b+=Ze.length-1}i++}}static createElement(t,e){let a=Ir.createElement("template");return a.innerHTML=t,a}};function Fr(o,t,e=o,a){if(t===vt)return t;let r=a!==void 0?e._$Co?.[a]:e._$Cl,i=La(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,a)),a!==void 0?(e._$Co??=[])[a]=r:e._$Cl=r),r!==void 0&&(t=Fr(o,r._$AS(o,t.values),r,a)),t}var ro=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:a}=this._$AD,r=(t?.creationScope??Ir).importNode(e,!0);Er.currentNode=r;let i=Er.nextNode(),s=0,p=0,h=a[0];for(;h!==void 0;){if(s===h.index){let u;h.type===2?u=new ia(i,i.nextSibling,this,t):h.type===1?u=new h.ctor(i,h.name,h.strings,this,t):h.type===6&&(u=new so(i,this,t)),this._$AV.push(u),h=a[++p]}s!==h?.index&&(i=Er.nextNode(),s++)}return Er.currentNode=Ir,r}p(t){let e=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(t,a,e),e+=a.strings.length-2):a._$AI(t[e])),e++}},ia=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,a,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=a,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Fr(this,t,e),La(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==vt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):xs(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&La(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ir.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:a}=t,r=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Ba.createElement(ks(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ro(r,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=bs.get(t.strings);return e===void 0&&bs.set(t.strings,e=new Ba(t)),e}k(t){Qo(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,a,r=0;for(let i of t)r===e.length?e.push(a=new o(this.O(Ta()),this.O(Ta()),this,this.options)):a=e[r],a._$AI(i),r++;r<e.length&&(this._$AR(a&&a._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let a=hs(t).nextSibling;hs(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Ur=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,a,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=d}_$AI(t,e=this,a,r){let i=this.strings,s=!1;if(i===void 0)t=Fr(this,t,e,0),s=!La(t)||t!==this._$AH&&t!==vt,s&&(this._$AH=t);else{let p=t,h,u;for(t=i[0],h=0;h<i.length-1;h++)u=Fr(this,p[a+h],e,h),u===vt&&(u=this._$AH[h]),s||=!La(u)||u!==this._$AH[h],u===d?t=d:t!==d&&(t+=(u??"")+i[h+1]),this._$AH[h]=u}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ao=class extends Ur{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},oo=class extends Ur{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},io=class extends Ur{constructor(t,e,a,r,i){super(t,e,a,r,i),this.type=5}_$AI(t,e=this){if((t=Fr(this,t,e,0)??d)===vt)return;let a=this._$AH,r=t===d&&a!==d||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,i=t!==d&&(a===d||r);r&&this.element.removeEventListener(this.name,this,a),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},so=class{constructor(t,e,a){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(t){Fr(this,t)}},$s={M:Xo,P:Ze,A:Zo,C:1,L:ws,R:ro,D:xs,V:Fr,I:ia,H:Ur,N:oo,U:io,B:ao,F:so},Gn=Yo.litHtmlPolyfillSupport;Gn?.(Ba,ia),(Yo.litHtmlVersions??=[]).push("3.3.3");var Cs=(o,t,e)=>{let a=e?.renderBefore??t,r=a._$litPart$;if(r===void 0){let i=e?.renderBefore??null;a._$litPart$=r=new ia(t.insertBefore(Ta(),i),i,void 0,e??{})}return r._$AI(o),r};var ti=globalThis,mr=class extends Xe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Cs(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};mr._$litElement$=!0,mr.finalized=!0,ti.litElementHydrateSupport?.({LitElement:mr});var Wn=ti.litElementPolyfillSupport;Wn?.({LitElement:mr});(ti.litElementVersions??=[]).push("4.2.2");var Yn={attribute:!0,type:String,converter:Ma,reflect:!1,hasChanged:to},Xn=(o=Yn,t,e)=>{let{kind:a,metadata:r}=e,i=globalThis.litPropertyMetadata.get(r);if(i===void 0&&globalThis.litPropertyMetadata.set(r,i=new Map),a==="setter"&&((o=Object.create(o)).wrapped=!0),i.set(e.name,o),a==="accessor"){let{name:s}=e;return{set(p){let h=t.get.call(this);t.set.call(this,p),this.requestUpdate(s,h,o,!0,p)},init(p){return p!==void 0&&this.C(s,void 0,o,p),p}}}if(a==="setter"){let{name:s}=e;return function(p){let h=this[s];t.call(this,p),this.requestUpdate(s,h,o,!0,p)}}throw Error("Unsupported decorator location: "+a)};function n(o){return(t,e)=>typeof e=="object"?Xn(o,t,e):((a,r,i)=>{let s=r.hasOwnProperty(i);return r.constructor.createProperty(i,a),s?Object.getOwnPropertyDescriptor(r,i):void 0})(o,t,e)}function x(o){return n({...o,state:!0,attribute:!1})}var Qe=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function A(o,t){return(e,a,r)=>{let i=s=>s.renderRoot?.querySelector(o)??null;if(t){let{get:s,set:p}=typeof a=="object"?e:r??(()=>{let h=Symbol();return{get(){return this[h]},set(u){this[h]=u}}})();return Qe(e,a,{get(){let h=s.call(this);return h===void 0&&(h=i(this),(h!==null||this.hasUpdated)&&p.call(this,h)),h}})}return Qe(e,a,{get(){return i(this)}})}}var Zn;function sa(o){return(t,e)=>Qe(t,e,{get(){return(this.renderRoot??(Zn??=document.createDocumentFragment())).querySelectorAll(o)}})}function na(o){return(t,e)=>{let{slot:a,selector:r}=o??{},i="slot"+(a?`[name=${a}]`:":not([name])");return Qe(t,e,{get(){let s=this.renderRoot?.querySelector(i),p=s?.assignedElements(o)??[];return r===void 0?p:p.filter(h=>h.matches(r))}})}}var de={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},la=o=>(...t)=>({_$litDirective$:o,values:t}),gr=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,a){this._$Ct=t,this._$AM=e,this._$Ci=a}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var w=la(class extends gr{constructor(o){if(super(o),o.type!==de.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(let a in t)t[a]&&!this.nt?.has(a)&&this.st.add(a);return this.render(t)}let e=o.element.classList;for(let a of this.st)a in t||(e.remove(a),this.st.delete(a));for(let a in t){let r=!!t[a];r===this.st.has(a)||this.nt?.has(a)||(r?(e.add(a),this.st.add(a)):(e.remove(a),this.st.delete(a)))}return vt}});var ai=Object.freeze({clear:"Clear",close:"Close",dismiss:"Dismiss",copy:"Copy",copied:"Copied",copyCode:"Copy code",timeRemaining:"Time remaining",remove:o=>o?`Remove ${o}`:"Remove",noOptions:"No options available",noResults:"No results",noActions:"No actions",noData:"No data to display",loading:"Loading\u2026",select:"Select",openList:"Open list",closeList:"Close list",showPassword:"Show password",hidePassword:"Hide password",searchCountry:"Search country or dial code",noCountry:"No country found",countryCode:o=>`Country code: ${o??"none"}`,selectedCount:o=>`${o} selected`,dragAndDrop:"Drag and drop or",browseFiles:"browse your files",recommendedSize:o=>`Recommended image size: ${o}`,selectedFiles:"Selected files",selectDate:"Select a date",selectPeriod:"Select a period",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose month",chooseYear:"Choose year",required:"This field is required.",selectOption:"Select an option.",selectFile:"Select a file.",checkRequired:"Check this box to continue.",dateRequired:"Select a date.",dateInvalid:o=>`Enter a date like ${o}.`,dateOutOfRange:"This date is outside the dates you can choose.",openCalendar:"Open calendar",presetToday:"Today",presetLast7Days:"Last 7 days",presetLast30Days:"Last 30 days",presetThisMonth:"This month",presetLastMonth:"Last month",presetThisYear:"This year",segmentDay:"Day",segmentMonth:"Month",segmentYear:"Year",segmentHour:"Hour",segmentMinute:"Minute",segmentSecond:"Second",segmentDayPeriod:"AM or PM",placeholderDay:"dd",placeholderMonth:"mm",placeholderYear:"yyyy",placeholderTime:"--",timeRequired:"Enter a time.",timeOutOfRange:"This time is outside the times you can choose.",commandPalette:"Command palette",commandPlaceholder:"Type a command or search\u2026",commandHintMove:"to move",commandHintRun:"to run",commandHintClose:"to close",sliderMinimum:"minimum",sliderMaximum:"maximum",stepComplete:"Completed",stepCurrent:"Current step",stepUpcoming:"Not started",stepError:"Needs attention",numberRequired:"Enter a number.",decrease:"Decrease",increase:"Increase",phoneTrunkPrefix:o=>`Enter the number without the leading ${o}.`,openMenu:"Open menu",closeMenu:"Close menu",breadcrumb:"Breadcrumb",secondaryNavigation:"Secondary navigation",pagination:"Pagination",previous:"Previous",next:"Next",pageOf:(o,t)=>`Page ${o} / ${t}`,moreActions:"More actions",options:"Options",formSection:"Form section",selectRow:"Select row",selectAll:"Select all",total:"Total",chartSeries:"Series",chartPoint:"Point",chartSlice:"Slice",chartShare:"Share",chartData:"Chart data",chartValue:"Value",confirmHeading:"Are you sure?",confirm:"Confirm",cancel:"Cancel",details:"Details",avatar:"Avatar",send:"Send",message:"Message",thinking:"Thinking\u2026",sidebar:"Sidebar",moreCount:o=>`${o} more`,otpCharacter:(o,t)=>`Character ${o} of ${t}`,otpRequired:"Enter the whole code.",customColour:"Custom colour",hexColour:"Hex code",stepOf:(o,t)=>`Step ${o} of ${t}`,done:"Done"}),ei={...ai},ri=new Set;function v(){return ei}function Ss(o){ei={...ei,...o};for(let t of ri)t()}function Qn(){Ss(ai)}function Ps(o){return ri.add(o),()=>ri.delete(o)}var As="kt-strings",c=class extends mr{static{this.styles=f`
1
+ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vo=Symbol(),ls=new WeakMap,Aa=class{constructor(t,e,a){if(this._$cssResult$=!0,a!==Vo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Qa&&t===void 0){let a=e!==void 0&&e.length===1;a&&(t=ls.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),a&&ls.set(e,t))}return t}toString(){return this.cssText}},ds=o=>new Aa(typeof o=="string"?o:o+"",void 0,Vo),f=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((a,r,i)=>a+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1],o[0]);return new Aa(e,o,Vo)},ps=(o,t)=>{if(Qa)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let a=document.createElement("style"),r=Za.litNonce;r!==void 0&&a.setAttribute("nonce",r),a.textContent=e.cssText,o.appendChild(a)}},Go=Qa?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let a of t.cssRules)e+=a.cssText;return ds(e)})(o):o;var{is:In,defineProperty:Fn,getOwnPropertyDescriptor:Un,getOwnPropertyNames:Nn,getOwnPropertySymbols:Hn,getPrototypeOf:jn}=Object,Ja=globalThis,cs=Ja.trustedTypes,_n=cs?cs.emptyScript:"",Vn=Ja.reactiveElementPolyfillSupport,Ma=(o,t)=>o,Da={toAttribute(o,t){switch(t){case Boolean:o=o?_n:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},to=(o,t)=>!In(o,t),hs={attribute:!0,type:String,converter:Da,reflect:!1,useDefault:!1,hasChanged:to};Symbol.metadata??=Symbol("metadata"),Ja.litPropertyMetadata??=new WeakMap;var Ze=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=hs){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let a=Symbol(),r=this.getPropertyDescriptor(t,a,e);r!==void 0&&Fn(this.prototype,t,r)}}static getPropertyDescriptor(t,e,a){let{get:r,set:i}=Un(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:r,set(s){let p=r?.call(this);i?.call(this,s),this.requestUpdate(t,p,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??hs}static _$Ei(){if(this.hasOwnProperty(Ma("elementProperties")))return;let t=jn(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ma("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ma("properties"))){let e=this.properties,a=[...Nn(e),...Hn(e)];for(let r of a)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[a,r]of e)this.elementProperties.set(a,r)}this._$Eh=new Map;for(let[e,a]of this.elementProperties){let r=this._$Eu(e,a);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let a=new Set(t.flat(1/0).reverse());for(let r of a)e.unshift(Go(r))}else t!==void 0&&e.push(Go(t));return e}static _$Eu(t,e){let a=e.attribute;return a===!1?void 0:typeof a=="string"?a:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let a of e.keys())this.hasOwnProperty(a)&&(t.set(a,this[a]),delete this[a]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ps(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,a){this._$AK(t,a)}_$ET(t,e){let a=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,a);if(r!==void 0&&a.reflect===!0){let i=(a.converter?.toAttribute!==void 0?a.converter:Da).toAttribute(e,a.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let a=this.constructor,r=a._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=a.getPropertyOptions(r),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Da;this._$Em=r;let p=s.fromAttribute(e,i.type);this[r]=p??this._$Ej?.get(r)??p,this._$Em=null}}requestUpdate(t,e,a,r=!1,i){if(t!==void 0){let s=this.constructor;if(r===!1&&(i=this[t]),a??=s.getPropertyOptions(t),!((a.hasChanged??to)(i,e)||a.useDefault&&a.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,a))))return;this.C(t,e,a)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:a,reflect:r,wrapped:i},s){a&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),i!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||a||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[r,i]of a){let{wrapped:s}=i,p=this[r];s!==!0||this._$AL.has(r)||p===void 0||this.C(r,void 0,i,p)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(a=>a.hostUpdate?.()),this.update(e)):this._$EM()}catch(a){throw t=!1,this._$EM(),a}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};Ze.elementStyles=[],Ze.shadowRootOptions={mode:"open"},Ze[Ma("elementProperties")]=new Map,Ze[Ma("finalized")]=new Map,Vn?.({ReactiveElement:Ze}),(Ja.reactiveElementVersions??=[]).push("2.1.2");var Yo=globalThis,us=o=>o,eo=Yo.trustedTypes,fs=eo?eo.createPolicy("lit-html",{createHTML:o=>o}):void 0,Xo="$lit$",Qe=`lit$${Math.random().toFixed(9).slice(2)}$`,Zo="?"+Qe,Gn=`<${Zo}>`,Ur=document,La=()=>Ur.createComment(""),Ba=o=>o===null||typeof o!="object"&&typeof o!="function",Qo=Array.isArray,ys=o=>Qo(o)||typeof o?.[Symbol.iterator]=="function",Wo=`[
2
+ \f\r]`,Ta=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ms=/-->/g,gs=/>/g,Ir=RegExp(`>|${Wo}(?:([^\\s"'>=/]+)(${Wo}*=${Wo}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),vs=/'/g,bs=/"/g,ks=/^(?:script|style|textarea|title)$/i,Jo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Jo(1),M=Jo(2),Gc=Jo(3),vt=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),xs=new WeakMap,Fr=Ur.createTreeWalker(Ur,129);function ws(o,t){if(!Qo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return fs!==void 0?fs.createHTML(t):t}var $s=(o,t)=>{let e=o.length-1,a=[],r,i=t===2?"<svg>":t===3?"<math>":"",s=Ta;for(let p=0;p<e;p++){let h=o[p],u,m,b=-1,k=0;for(;k<h.length&&(s.lastIndex=k,m=s.exec(h),m!==null);)k=s.lastIndex,s===Ta?m[1]==="!--"?s=ms:m[1]!==void 0?s=gs:m[2]!==void 0?(ks.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=Ir):m[3]!==void 0&&(s=Ir):s===Ir?m[0]===">"?(s=r??Ta,b=-1):m[1]===void 0?b=-2:(b=s.lastIndex-m[2].length,u=m[1],s=m[3]===void 0?Ir:m[3]==='"'?bs:vs):s===bs||s===vs?s=Ir:s===ms||s===gs?s=Ta:(s=Ir,r=void 0);let $=s===Ir&&o[p+1].startsWith("/>")?" ":"";i+=s===Ta?h+Gn:b>=0?(a.push(u),h.slice(0,b)+Xo+h.slice(b)+Qe+$):h+Qe+(b===-2?p:$)}return[ws(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),a]},Oa=class o{constructor({strings:t,_$litType$:e},a){let r;this.parts=[];let i=0,s=0,p=t.length-1,h=this.parts,[u,m]=$s(t,e);if(this.el=o.createElement(u,a),Fr.currentNode=this.el.content,e===2||e===3){let b=this.el.content.firstChild;b.replaceWith(...b.childNodes)}for(;(r=Fr.nextNode())!==null&&h.length<p;){if(r.nodeType===1){if(r.hasAttributes())for(let b of r.getAttributeNames())if(b.endsWith(Xo)){let k=m[s++],$=r.getAttribute(b).split(Qe),D=/([.?@])?(.*)/.exec(k);h.push({type:1,index:i,name:D[2],strings:$,ctor:D[1]==="."?ao:D[1]==="?"?oo:D[1]==="@"?io:Hr}),r.removeAttribute(b)}else b.startsWith(Qe)&&(h.push({type:6,index:i}),r.removeAttribute(b));if(ks.test(r.tagName)){let b=r.textContent.split(Qe),k=b.length-1;if(k>0){r.textContent=eo?eo.emptyScript:"";for(let $=0;$<k;$++)r.append(b[$],La()),Fr.nextNode(),h.push({type:2,index:++i});r.append(b[k],La())}}}else if(r.nodeType===8)if(r.data===Zo)h.push({type:2,index:i});else{let b=-1;for(;(b=r.data.indexOf(Qe,b+1))!==-1;)h.push({type:7,index:i}),b+=Qe.length-1}i++}}static createElement(t,e){let a=Ur.createElement("template");return a.innerHTML=t,a}};function Nr(o,t,e=o,a){if(t===vt)return t;let r=a!==void 0?e._$Co?.[a]:e._$Cl,i=Ba(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,a)),a!==void 0?(e._$Co??=[])[a]=r:e._$Cl=r),r!==void 0&&(t=Nr(o,r._$AS(o,t.values),r,a)),t}var ro=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:a}=this._$AD,r=(t?.creationScope??Ur).importNode(e,!0);Fr.currentNode=r;let i=Fr.nextNode(),s=0,p=0,h=a[0];for(;h!==void 0;){if(s===h.index){let u;h.type===2?u=new ia(i,i.nextSibling,this,t):h.type===1?u=new h.ctor(i,h.name,h.strings,this,t):h.type===6&&(u=new so(i,this,t)),this._$AV.push(u),h=a[++p]}s!==h?.index&&(i=Fr.nextNode(),s++)}return Fr.currentNode=Ur,r}p(t){let e=0;for(let a of this._$AV)a!==void 0&&(a.strings!==void 0?(a._$AI(t,a,e),e+=a.strings.length-2):a._$AI(t[e])),e++}},ia=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,a,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=a,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Nr(this,t,e),Ba(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==vt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ys(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&Ba(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ur.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:a}=t,r=typeof a=="number"?this._$AC(t):(a.el===void 0&&(a.el=Oa.createElement(ws(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ro(r,this),s=i.u(this.options);i.p(e),this.T(s),this._$AH=i}}_$AC(t){let e=xs.get(t.strings);return e===void 0&&xs.set(t.strings,e=new Oa(t)),e}k(t){Qo(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,a,r=0;for(let i of t)r===e.length?e.push(a=new o(this.O(La()),this.O(La()),this,this.options)):a=e[r],a._$AI(i),r++;r<e.length&&(this._$AR(a&&a._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let a=us(t).nextSibling;us(t).remove(),t=a}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Hr=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,a,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,a.length>2||a[0]!==""||a[1]!==""?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=d}_$AI(t,e=this,a,r){let i=this.strings,s=!1;if(i===void 0)t=Nr(this,t,e,0),s=!Ba(t)||t!==this._$AH&&t!==vt,s&&(this._$AH=t);else{let p=t,h,u;for(t=i[0],h=0;h<i.length-1;h++)u=Nr(this,p[a+h],e,h),u===vt&&(u=this._$AH[h]),s||=!Ba(u)||u!==this._$AH[h],u===d?t=d:t!==d&&(t+=(u??"")+i[h+1]),this._$AH[h]=u}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ao=class extends Hr{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},oo=class extends Hr{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},io=class extends Hr{constructor(t,e,a,r,i){super(t,e,a,r,i),this.type=5}_$AI(t,e=this){if((t=Nr(this,t,e,0)??d)===vt)return;let a=this._$AH,r=t===d&&a!==d||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,i=t!==d&&(a===d||r);r&&this.element.removeEventListener(this.name,this,a),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},so=class{constructor(t,e,a){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(t){Nr(this,t)}},Cs={M:Xo,P:Qe,A:Zo,C:1,L:$s,R:ro,D:ys,V:Nr,I:ia,H:Hr,N:oo,U:io,B:ao,F:so},Wn=Yo.litHtmlPolyfillSupport;Wn?.(Oa,ia),(Yo.litHtmlVersions??=[]).push("3.3.3");var Ss=(o,t,e)=>{let a=e?.renderBefore??t,r=a._$litPart$;if(r===void 0){let i=e?.renderBefore??null;a._$litPart$=r=new ia(t.insertBefore(La(),i),i,void 0,e??{})}return r._$AI(o),r};var ti=globalThis,mr=class extends Ze{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ss(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return vt}};mr._$litElement$=!0,mr.finalized=!0,ti.litElementHydrateSupport?.({LitElement:mr});var Yn=ti.litElementPolyfillSupport;Yn?.({LitElement:mr});(ti.litElementVersions??=[]).push("4.2.2");var Xn={attribute:!0,type:String,converter:Da,reflect:!1,hasChanged:to},Zn=(o=Xn,t,e)=>{let{kind:a,metadata:r}=e,i=globalThis.litPropertyMetadata.get(r);if(i===void 0&&globalThis.litPropertyMetadata.set(r,i=new Map),a==="setter"&&((o=Object.create(o)).wrapped=!0),i.set(e.name,o),a==="accessor"){let{name:s}=e;return{set(p){let h=t.get.call(this);t.set.call(this,p),this.requestUpdate(s,h,o,!0,p)},init(p){return p!==void 0&&this.C(s,void 0,o,p),p}}}if(a==="setter"){let{name:s}=e;return function(p){let h=this[s];t.call(this,p),this.requestUpdate(s,h,o,!0,p)}}throw Error("Unsupported decorator location: "+a)};function n(o){return(t,e)=>typeof e=="object"?Zn(o,t,e):((a,r,i)=>{let s=r.hasOwnProperty(i);return r.constructor.createProperty(i,a),s?Object.getOwnPropertyDescriptor(r,i):void 0})(o,t,e)}function x(o){return n({...o,state:!0,attribute:!1})}var Je=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function A(o,t){return(e,a,r)=>{let i=s=>s.renderRoot?.querySelector(o)??null;if(t){let{get:s,set:p}=typeof a=="object"?e:r??(()=>{let h=Symbol();return{get(){return this[h]},set(u){this[h]=u}}})();return Je(e,a,{get(){let h=s.call(this);return h===void 0&&(h=i(this),(h!==null||this.hasUpdated)&&p.call(this,h)),h}})}return Je(e,a,{get(){return i(this)}})}}var Qn;function sa(o){return(t,e)=>Je(t,e,{get(){return(this.renderRoot??(Qn??=document.createDocumentFragment())).querySelectorAll(o)}})}function na(o){return(t,e)=>{let{slot:a,selector:r}=o??{},i="slot"+(a?`[name=${a}]`:":not([name])");return Je(t,e,{get(){let s=this.renderRoot?.querySelector(i),p=s?.assignedElements(o)??[];return r===void 0?p:p.filter(h=>h.matches(r))}})}}var ce={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},la=o=>(...t)=>({_$litDirective$:o,values:t}),gr=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,a){this._$Ct=t,this._$AM=e,this._$Ci=a}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var w=la(class extends gr{constructor(o){if(super(o),o.type!==ce.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(let a in t)t[a]&&!this.nt?.has(a)&&this.st.add(a);return this.render(t)}let e=o.element.classList;for(let a of this.st)a in t||(e.remove(a),this.st.delete(a));for(let a in t){let r=!!t[a];r===this.st.has(a)||this.nt?.has(a)||(r?(e.add(a),this.st.add(a)):(e.remove(a),this.st.delete(a)))}return vt}});var ai=Object.freeze({clear:"Clear",close:"Close",dismiss:"Dismiss",copy:"Copy",copied:"Copied",copyCode:"Copy code",timeRemaining:"Time remaining",remove:o=>o?`Remove ${o}`:"Remove",noOptions:"No options available",noResults:"No results",noActions:"No actions",noData:"No data to display",loading:"Loading\u2026",select:"Select",openList:"Open list",closeList:"Close list",showPassword:"Show password",hidePassword:"Hide password",searchCountry:"Search country or dial code",noCountry:"No country found",countryCode:o=>`Country code: ${o??"none"}`,selectedCount:o=>`${o} selected`,dragAndDrop:"Drag and drop or",browseFiles:"browse your files",recommendedSize:o=>`Recommended image size: ${o}`,selectedFiles:"Selected files",selectDate:"Select a date",selectPeriod:"Select a period",previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose month",chooseYear:"Choose year",required:"This field is required.",selectOption:"Select an option.",selectFile:"Select a file.",checkRequired:"Check this box to continue.",dateRequired:"Select a date.",dateInvalid:o=>`Enter a date like ${o}.`,dateOutOfRange:"This date is outside the dates you can choose.",openCalendar:"Open calendar",presetToday:"Today",presetLast7Days:"Last 7 days",presetLast30Days:"Last 30 days",presetThisMonth:"This month",presetLastMonth:"Last month",presetThisYear:"This year",segmentDay:"Day",segmentMonth:"Month",segmentYear:"Year",segmentHour:"Hour",segmentMinute:"Minute",segmentSecond:"Second",segmentDayPeriod:"AM or PM",placeholderDay:"dd",placeholderMonth:"mm",placeholderYear:"yyyy",placeholderTime:"--",timeRequired:"Enter a time.",timeOutOfRange:"This time is outside the times you can choose.",commandPalette:"Command palette",commandPlaceholder:"Type a command or search\u2026",commandHintMove:"to move",commandHintRun:"to run",commandHintClose:"to close",sliderMinimum:"minimum",sliderMaximum:"maximum",stepComplete:"Completed",stepCurrent:"Current step",stepUpcoming:"Not started",stepError:"Needs attention",numberRequired:"Enter a number.",decrease:"Decrease",increase:"Increase",phoneTrunkPrefix:o=>`Enter the number without the leading ${o}.`,openMenu:"Open menu",closeMenu:"Close menu",breadcrumb:"Breadcrumb",secondaryNavigation:"Secondary navigation",pagination:"Pagination",previous:"Previous",next:"Next",pageOf:(o,t)=>`Page ${o} / ${t}`,moreActions:"More actions",options:"Options",formSection:"Form section",selectRow:"Select row",selectAll:"Select all",total:"Total",chartSeries:"Series",chartPoint:"Point",chartSlice:"Slice",chartShare:"Share",chartData:"Chart data",chartValue:"Value",confirmHeading:"Are you sure?",confirm:"Confirm",cancel:"Cancel",details:"Details",avatar:"Avatar",send:"Send",message:"Message",thinking:"Thinking\u2026",sidebar:"Sidebar",moreCount:o=>`${o} more`,otpCharacter:(o,t)=>`Character ${o} of ${t}`,otpRequired:"Enter the whole code.",customColour:"Custom colour",hexColour:"Hex code",stepOf:(o,t)=>`Step ${o} of ${t}`,done:"Done"}),ei={...ai},ri=new Set;function v(){return ei}function Ps(o){ei={...ei,...o};for(let t of ri)t()}function Jn(){Ps(ai)}function As(o){return ri.add(o),()=>ri.delete(o)}var Ms="kt-strings",c=class extends mr{static{this.styles=f`
4
4
  :host {
5
5
  box-sizing: border-box;
6
6
  }
@@ -24,7 +24,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
24
24
  clip-path: inset(50%);
25
25
  white-space: nowrap;
26
26
  }
27
- `}connectedCallback(){super.connectedCallback(),this.unsubscribeStrings=Ps(()=>this.requestUpdate(As,Symbol("previous strings")))}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeStrings?.(),this.unsubscribeStrings=void 0}stringsChanged(t){return t.has(As)}};function g(o,t){customElements.get(o)||customElements.define(o,t)}var oi=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];var ii=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];var si=[["path",{d:"M8 2v3"}],["path",{d:"M16 2v3"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}],["path",{d:"M3 9h18"}]];var ni=[["path",{d:"M20 6 9 17l-5-5"}]];var li=[["path",{d:"m6 9 6 6 6-6"}]];var di=[["path",{d:"m15 18-6-6 6-6"}]];var pi=[["path",{d:"m9 18 6-6-6-6"}]];var ci=[["path",{d:"m18 15-6-6-6 6"}]];var no=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];var lo=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]];var hi=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];var ui=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];var po=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];var fi=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];var mi=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];var gi=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];var vi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];var bi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}]];var co=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];var xi=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}]];var yi=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];var ho=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];var ki=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];var wi=[["path",{d:"M5 12h14"}]];var uo=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];var $i=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];var Ci=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];var Si=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];var Pi=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];var Ai=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];var Mi=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];var fo=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];var mo=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];var Di=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];var Ti=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]];var Li=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];var Bi=new Map;function Ms(o){return o.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-zA-Z])(\d)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Ds(o,t){Bi.set(Ms(o),t)}function Ts(o){for(let[t,e]of Object.entries(o))tl(e)&&Ds(t,e)}function Oi(o){return Bi.get(Ms(o))}function Jn(){return[...Bi.keys()].sort()}function tl(o){return Array.isArray(o)&&o.every(t=>Array.isArray(t)&&typeof t[0]=="string"&&typeof t[1]=="object"&&t[1]!==null)}var el={ArrowDown:oi,ArrowUp:ii,Calendar:si,Check:ni,ChevronDown:li,ChevronLeft:di,ChevronRight:pi,ChevronUp:ci,CircleAlert:no,CircleCheck:lo,Copy:hi,Download:ui,Ellipsis:po,ExternalLink:fi,Eye:mi,EyeOff:gi,File:bi,FileUp:vi,Filter:co,Inbox:xi,Info:yi,LoaderCircle:ho,Menu:ki,Minus:wi,PanelLeft:uo,Pencil:$i,Plus:Ci,RefreshCw:Si,Search:Pi,Send:Ai,Settings:Mi,Trash2:fo,TriangleAlert:mo,Upload:Di,User:Ti,X:Li};Ts(el);var rl=Object.defineProperty,go=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&rl(t,e,r),r},Bs="http://www.w3.org/2000/svg",Ls=new Set;function al([o,t]){let e=document.createElementNS(Bs,o);for(let[a,r]of Object.entries(t))r!==void 0&&e.setAttribute(a,String(r));return e}var vr=class extends c{constructor(){super(...arguments),this.name="",this.size=24,this.strokeWidth=2,this.label=""}static{this.styles=[c.styles,f`
27
+ `}connectedCallback(){super.connectedCallback(),this.unsubscribeStrings=As(()=>this.requestUpdate(Ms,Symbol("previous strings")))}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeStrings?.(),this.unsubscribeStrings=void 0}stringsChanged(t){return t.has(Ms)}};function g(o,t){customElements.get(o)||customElements.define(o,t)}var oi=[["path",{d:"M12 5v14"}],["path",{d:"m19 12-7 7-7-7"}]];var ii=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];var si=[["path",{d:"M8 2v3"}],["path",{d:"M16 2v3"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}],["path",{d:"M3 9h18"}]];var ni=[["path",{d:"M20 6 9 17l-5-5"}]];var li=[["path",{d:"m6 9 6 6 6-6"}]];var di=[["path",{d:"m15 18-6-6 6-6"}]];var pi=[["path",{d:"m9 18 6-6-6-6"}]];var ci=[["path",{d:"m18 15-6-6-6 6"}]];var hi=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];var no=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];var lo=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]];var ui=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];var fi=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];var po=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];var mi=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];var gi=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];var vi=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];var bi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M12 12v6"}],["path",{d:"m15 15-3-3-3 3"}]];var xi=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}]];var co=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];var yi=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"}]];var ki=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];var ho=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];var wi=[["path",{d:"M4 5h16"}],["path",{d:"M4 12h16"}],["path",{d:"M4 19h16"}]];var $i=[["path",{d:"M5 12h14"}]];var uo=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];var Ci=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];var Si=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];var Pi=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];var Ai=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];var Mi=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];var Di=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];var fo=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];var mo=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];var Ti=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];var Li=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]];var Bi=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];var Oi=new Map;function Ds(o){return o.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-zA-Z])(\d)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function Ts(o,t){Oi.set(Ds(o),t)}function Ls(o){for(let[t,e]of Object.entries(o))el(e)&&Ts(t,e)}function zi(o){return Oi.get(Ds(o))}function tl(){return[...Oi.keys()].sort()}function el(o){return Array.isArray(o)&&o.every(t=>Array.isArray(t)&&typeof t[0]=="string"&&typeof t[1]=="object"&&t[1]!==null)}var rl={ArrowDown:oi,ArrowUp:ii,Calendar:si,Check:ni,ChevronDown:li,ChevronLeft:di,ChevronRight:pi,ChevronUp:ci,ChevronsUpDown:hi,CircleAlert:no,CircleCheck:lo,Copy:ui,Download:fi,Ellipsis:po,ExternalLink:mi,Eye:gi,EyeOff:vi,File:xi,FileUp:bi,Filter:co,Inbox:yi,Info:ki,LoaderCircle:ho,Menu:wi,Minus:$i,PanelLeft:uo,Pencil:Ci,Plus:Si,RefreshCw:Pi,Search:Ai,Send:Mi,Settings:Di,Trash2:fo,TriangleAlert:mo,Upload:Ti,User:Li,X:Bi};Ls(rl);var al=Object.defineProperty,go=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&al(t,e,r),r},Os="http://www.w3.org/2000/svg",Bs=new Set;function ol([o,t]){let e=document.createElementNS(Os,o);for(let[a,r]of Object.entries(t))r!==void 0&&e.setAttribute(a,String(r));return e}var vr=class extends c{constructor(){super(...arguments),this.name="",this.size=24,this.strokeWidth=2,this.label=""}static{this.styles=[c.styles,f`
28
28
  :host {
29
29
  display: inline-flex;
30
30
  align-items: center;
@@ -37,9 +37,9 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
37
37
  svg {
38
38
  display: block;
39
39
  }
40
- `]}render(){let t=Oi(this.name);return t?l`<svg
40
+ `]}render(){let t=zi(this.name);return t?l`<svg
41
41
  part="svg"
42
- xmlns=${Bs}
42
+ xmlns=${Os}
43
43
  width=${this.size}
44
44
  height=${this.size}
45
45
  viewBox="0 0 24 24"
@@ -52,14 +52,14 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
52
52
  aria-label=${this.label||d}
53
53
  aria-hidden=${this.label?d:"true"}
54
54
  >
55
- ${t.map(al)}
56
- </svg>`:(this.name&&!Ls.has(this.name)&&(Ls.add(this.name),console.warn(`<kt-icon>: no icon registered as "${this.name}". Register it with registerIcons({ ... }) from "kanto-ds/icons".`)),l`<svg
55
+ ${t.map(ol)}
56
+ </svg>`:(this.name&&!Bs.has(this.name)&&(Bs.add(this.name),console.warn(`<kt-icon>: no icon registered as "${this.name}". Register it with registerIcons({ ... }) from "kanto-ds/icons".`)),l`<svg
57
57
  part="svg"
58
58
  width=${this.size}
59
59
  height=${this.size}
60
60
  viewBox="0 0 24 24"
61
61
  aria-hidden="true"
62
- ></svg>`)}};go([n({type:String,reflect:!0})],vr.prototype,"name");go([n({type:Number,reflect:!0})],vr.prototype,"size");go([n({type:Number,attribute:"stroke-width"})],vr.prototype,"strokeWidth");go([n({type:String})],vr.prototype,"label");g("kt-icon",vr);var ol=Object.defineProperty,Nr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ol(t,e,r),r},Os=Array.from({length:8},(o,t)=>`var(--chart-series-${t+1})`);function il(o){let t=(o.includes("@")?o.split("@")[0]??"":o).split(/[\s._-]+/).filter(Boolean);return t.length===0?"":t.length===1?(t[0]??"").slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}var pe=class extends c{constructor(){super(...arguments),this.failed=!1,this.name="",this.src="",this.size="medium",this.square=!1,this.color=""}static{this.styles=[c.styles,f`
62
+ ></svg>`)}};go([n({type:String,reflect:!0})],vr.prototype,"name");go([n({type:Number,reflect:!0})],vr.prototype,"size");go([n({type:Number,attribute:"stroke-width"})],vr.prototype,"strokeWidth");go([n({type:String})],vr.prototype,"label");g("kt-icon",vr);var il=Object.defineProperty,jr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&il(t,e,r),r},zs=Array.from({length:8},(o,t)=>`var(--chart-series-${t+1})`);function sl(o){let t=(o.includes("@")?o.split("@")[0]??"":o).split(/[\s._-]+/).filter(Boolean);return t.length===0?"":t.length===1?(t[0]??"").slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}var he=class extends c{constructor(){super(...arguments),this.failed=!1,this.name="",this.src="",this.size="medium",this.square=!1,this.color=""}static{this.styles=[c.styles,f`
63
63
  :host {
64
64
  display: inline-flex;
65
65
  --kt-avatar-size: 32px;
@@ -136,7 +136,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
136
136
  .offline {
137
137
  background: var(--color-text-500);
138
138
  }
139
- `]}willUpdate(t){t.has("src")&&(this.failed=!1)}get hue(){if(this.color)return this.color;let t=0;for(let e of this.name)t+=e.charCodeAt(0);return Os[t%Os.length]}render(){let t=il(this.name),e=!!this.src&&!this.failed;return l`<span
139
+ `]}willUpdate(t){t.has("src")&&(this.failed=!1)}get hue(){if(this.color)return this.color;let t=0;for(let e of this.name)t+=e.charCodeAt(0);return zs[t%zs.length]}render(){let t=sl(this.name),e=!!this.src&&!this.failed;return l`<span
140
140
  part="base"
141
141
  class=${w({avatar:!0,"has-image":e,anonymous:!this.name})}
142
142
  style=${e?"":`--kt-avatar-hue:${this.hue}`}
@@ -150,7 +150,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
150
150
  @error=${()=>{this.failed=!0}}
151
151
  />`:t||l`<kt-icon name="user" size="16"></kt-icon>`}
152
152
  ${this.status?l`<span class=${w({status:!0,[this.status]:!0})}></span>`:d}
153
- </span>`}};Nr([x()],pe.prototype,"failed");Nr([n({type:String})],pe.prototype,"name");Nr([n({type:String})],pe.prototype,"src");Nr([n({type:String,reflect:!0})],pe.prototype,"size");Nr([n({type:Boolean,reflect:!0})],pe.prototype,"square");Nr([n({type:String,reflect:!0})],pe.prototype,"status");Nr([n({type:String})],pe.prototype,"color");g("kt-avatar",pe);var Ks="important",sl=" !"+Ks,ct=la(class extends gr{constructor(o){if(super(o),o.type!==de.ATTRIBUTE||o.name!=="style"||o.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(o){return Object.keys(o).reduce((t,e)=>{let a=o[e];return a==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${a};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let a of this.ft)t[a]==null&&(this.ft.delete(a),a.includes("-")?e.removeProperty(a):e[a]=null);for(let a in t){let r=t[a];if(r!=null){this.ft.add(a);let i=typeof r=="string"&&r.endsWith(sl);a.includes("-")||i?e.setProperty(a,i?r.slice(0,-11):r,i?Ks:""):e[a]=r}}return vt}});function y(o,t,e){let a=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return o.dispatchEvent(a),a}var Rs=0;function q(o){return Rs+=1,`${o}-${Rs}`}function N(o,t,e,a,r){o?t.addEventListener(e,a,r):t.removeEventListener(e,a,r)}var nl=Object.defineProperty,De=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&nl(t,e,r),r},zt=class extends c{constructor(){super(...arguments),this.variant="tag",this.tone="neutral",this.size="medium",this.label="",this.color="",this.icon="",this.clickable=!1,this.removable=!1,this.error=!1}static{this.styles=[c.styles,f`
153
+ </span>`}};jr([x()],he.prototype,"failed");jr([n({type:String})],he.prototype,"name");jr([n({type:String})],he.prototype,"src");jr([n({type:String,reflect:!0})],he.prototype,"size");jr([n({type:Boolean,reflect:!0})],he.prototype,"square");jr([n({type:String,reflect:!0})],he.prototype,"status");jr([n({type:String})],he.prototype,"color");g("kt-avatar",he);var Ks="important",nl=" !"+Ks,ct=la(class extends gr{constructor(o){if(super(o),o.type!==ce.ATTRIBUTE||o.name!=="style"||o.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(o){return Object.keys(o).reduce((t,e)=>{let a=o[e];return a==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${a};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let a of this.ft)t[a]==null&&(this.ft.delete(a),a.includes("-")?e.removeProperty(a):e[a]=null);for(let a in t){let r=t[a];if(r!=null){this.ft.add(a);let i=typeof r=="string"&&r.endsWith(nl);a.includes("-")||i?e.setProperty(a,i?r.slice(0,-11):r,i?Ks:""):e[a]=r}}return vt}});function y(o,t,e){let a=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0,cancelable:!0});return o.dispatchEvent(a),a}var Rs=0;function q(o){return Rs+=1,`${o}-${Rs}`}function N(o,t,e,a,r){o?t.addEventListener(e,a,r):t.removeEventListener(e,a,r)}var ll=Object.defineProperty,De=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ll(t,e,r),r},Rt=class extends c{constructor(){super(...arguments),this.variant="tag",this.tone="neutral",this.size="medium",this.label="",this.color="",this.icon="",this.clickable=!1,this.removable=!1,this.error=!1}static{this.styles=[c.styles,f`
154
154
  :host {
155
155
  display: inline-flex;
156
156
  vertical-align: middle;
@@ -321,7 +321,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
321
321
  >
322
322
  <kt-icon name="x" size="12"></kt-icon>
323
323
  </button>`:d}
324
- </span>`}};De([n({type:String,reflect:!0})],zt.prototype,"variant");De([n({type:String,reflect:!0})],zt.prototype,"tone");De([n({type:String,reflect:!0})],zt.prototype,"size");De([n({type:String})],zt.prototype,"label");De([n({type:String})],zt.prototype,"color");De([n({type:String})],zt.prototype,"icon");De([n({type:Boolean,reflect:!0})],zt.prototype,"clickable");De([n({type:Boolean,reflect:!0})],zt.prototype,"removable");De([n({type:Number})],zt.prototype,"max");De([n({type:Boolean,reflect:!0})],zt.prototype,"error");g("kt-badge",zt);function ll(o){let t=/^\s*(\d*\.?\d+)(ms|s)\s*$/.exec(o);if(!t)return 0;let e=Number(t[1]);return t[2]==="s"?e*1e3:e}function br(o,t){return ll(getComputedStyle(o).getPropertyValue(t))}function Ki(o){return getComputedStyle(o).getPropertyValue("--easing-standard").trim()||"ease"}function qt(o,t,e,a,r={}){let i=br(o,e)*(r.scale??1);if(i<=0||typeof o.animate!="function")return null;for(let p of o.getAnimations())p.id===a&&p.cancel();let s=o.animate(t,{duration:i,easing:r.easing??Ki(o)});return s.id=a,s}var dl={leave:[{opacity:1,scale:1,easing:"ease-in"},{opacity:0,scale:.6}],back:[{opacity:0,scale:.6},{opacity:1,scale:1}]},zs={morphs:!0,leaveScale:1.5,leave:[{translate:"0 0",rotate:"0deg",opacity:1,easing:"cubic-bezier(0.2, 0, 0.4, 1)"},{translate:"-0.15em 0.15em",rotate:"-6deg",opacity:1,offset:.3,easing:"cubic-bezier(0.55, 0, 0.8, 0.4)"},{translate:"1.1em -1.1em",rotate:"6deg",opacity:1,offset:.75},{translate:"1.8em -1.8em",rotate:"10deg",opacity:0}],back:[{translate:"-0.8em 0.8em",opacity:0},{translate:"0 0",opacity:1}]},pl={send:zs,"send-horizontal":zs};function vo(o){return pl[o]??dl}var cl=[{opacity:0,scale:.3},{opacity:1,scale:1.15,offset:.6},{opacity:1,scale:1}],hl=[{translate:"0"},{translate:"-4px"},{translate:"4px"},{translate:"-3px"},{translate:"2px"},{translate:"0"}],bo=[[14.536,21.686],[15.473,21.662],[21.973,2.662],[21.338,2.027],[2.338,8.527],[2.314,9.464],[10.244,12.644],[11.356,13.754]],ul="M21.854 2.147L10.914 13.086",Es=64,xo=[12,12],qs=9;function fl(o){let t=0;return o.forEach(([e,a],r)=>{let[i,s]=o[(r+1)%o.length];t+=e*s-i*a}),Math.sign(t)}var ml=Math.atan2(bo[0][1]-xo[1],bo[0][0]-xo[0]);function gl(o,t){let e=o.map((p,h)=>{let u=o[(h+1)%o.length];return{from:p,to:u,length:Math.hypot(u[0]-p[0],u[1]-p[1])}}),a=e.reduce((p,h)=>p+h.length,0),r=[],i=0,s=0;for(let p=0;p<t;p+=1){let h=a*p/t;for(;s+e[i].length<h;)s+=e[i++].length;let{from:u,to:m,length:b}=e[i],k=b?(h-s)/b:0;r.push([u[0]+(m[0]-u[0])*k,u[1]+(m[1]-u[1])*k])}return r}function vl(o,t){let e=fl(bo)||1;return Array.from({length:o},(a,r)=>{let i=t+e*2*Math.PI*r/o;return[xo[0]+qs*Math.cos(i),xo[1]+qs*Math.sin(i)]})}function bl(o,t,e){return o.map(([a,r],i)=>[a+(t[i][0]-a)*e,r+(t[i][1]-r)*e])}function xl(o){let t=([e,a])=>`${Number(e.toFixed(3))} ${Number(a.toFixed(3))}`;return`M${o.map(t).join("L")}Z`}var yl=Object.defineProperty,wt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yl(t,e,r),r},Ri={small:16,medium:20,large:24},kl=gl(bo,Es),wl=vl(Es,ml),$l=.28,Cl=1e3,Sl=o=>o<.5?4*o**3:1-(-2*o+2)**3/2,bt=class Is extends c{constructor(){super(...arguments),this.variant="primary",this.size="medium",this.disabled=!1,this.type="button",this.icon="",this.iconPosition="left",this.label="",this.popup=void 0,this.expanded=void 0,this.fullWidth=!1,this.name="",this.value="",this.doneLabel="",this.failedLabel="",this.phase="idle",this.running=null,this.widthBefore=0,this.morphing=!1,this.shape={m:0,target:0,offset:0,frame:0,last:0,span:1,settled:null},this.step=t=>{let e=this.shape,a=e.last?t-e.last:0;e.last=t;let r=a/e.span;if(e.m=e.target>e.m?Math.min(e.target,e.m+r):Math.max(e.target,e.m-r),e.offset=(e.offset-a/Cl)%1,this.drawShape(),e.target===0&&e.m===0){e.frame=0,e.settled?.(),e.settled=null;return}e.frame=requestAnimationFrame(this.step)}}static{this.styles=[c.styles,f`
324
+ </span>`}};De([n({type:String,reflect:!0})],Rt.prototype,"variant");De([n({type:String,reflect:!0})],Rt.prototype,"tone");De([n({type:String,reflect:!0})],Rt.prototype,"size");De([n({type:String})],Rt.prototype,"label");De([n({type:String})],Rt.prototype,"color");De([n({type:String})],Rt.prototype,"icon");De([n({type:Boolean,reflect:!0})],Rt.prototype,"clickable");De([n({type:Boolean,reflect:!0})],Rt.prototype,"removable");De([n({type:Number})],Rt.prototype,"max");De([n({type:Boolean,reflect:!0})],Rt.prototype,"error");g("kt-badge",Rt);function dl(o){let t=/^\s*(\d*\.?\d+)(ms|s)\s*$/.exec(o);if(!t)return 0;let e=Number(t[1]);return t[2]==="s"?e*1e3:e}function br(o,t){return dl(getComputedStyle(o).getPropertyValue(t))}function Ki(o){return getComputedStyle(o).getPropertyValue("--easing-standard").trim()||"ease"}function qt(o,t,e,a,r={}){let i=br(o,e)*(r.scale??1);if(i<=0||typeof o.animate!="function")return null;for(let p of o.getAnimations())p.id===a&&p.cancel();let s=o.animate(t,{duration:i,easing:r.easing??Ki(o)});return s.id=a,s}var pl={leave:[{opacity:1,scale:1,easing:"ease-in"},{opacity:0,scale:.6}],back:[{opacity:0,scale:.6},{opacity:1,scale:1}]},qs={morphs:!0,leaveScale:1.5,leave:[{translate:"0 0",rotate:"0deg",opacity:1,easing:"cubic-bezier(0.2, 0, 0.4, 1)"},{translate:"-0.15em 0.15em",rotate:"-6deg",opacity:1,offset:.3,easing:"cubic-bezier(0.55, 0, 0.8, 0.4)"},{translate:"1.1em -1.1em",rotate:"6deg",opacity:1,offset:.75},{translate:"1.8em -1.8em",rotate:"10deg",opacity:0}],back:[{translate:"-0.8em 0.8em",opacity:0},{translate:"0 0",opacity:1}]},cl={send:qs,"send-horizontal":qs};function vo(o){return cl[o]??pl}var hl=[{opacity:0,scale:.3},{opacity:1,scale:1.15,offset:.6},{opacity:1,scale:1}],ul=[{translate:"0"},{translate:"-4px"},{translate:"4px"},{translate:"-3px"},{translate:"2px"},{translate:"0"}],bo=[[14.536,21.686],[15.473,21.662],[21.973,2.662],[21.338,2.027],[2.338,8.527],[2.314,9.464],[10.244,12.644],[11.356,13.754]],fl="M21.854 2.147L10.914 13.086",Is=64,xo=[12,12],Es=9;function ml(o){let t=0;return o.forEach(([e,a],r)=>{let[i,s]=o[(r+1)%o.length];t+=e*s-i*a}),Math.sign(t)}var gl=Math.atan2(bo[0][1]-xo[1],bo[0][0]-xo[0]);function vl(o,t){let e=o.map((p,h)=>{let u=o[(h+1)%o.length];return{from:p,to:u,length:Math.hypot(u[0]-p[0],u[1]-p[1])}}),a=e.reduce((p,h)=>p+h.length,0),r=[],i=0,s=0;for(let p=0;p<t;p+=1){let h=a*p/t;for(;s+e[i].length<h;)s+=e[i++].length;let{from:u,to:m,length:b}=e[i],k=b?(h-s)/b:0;r.push([u[0]+(m[0]-u[0])*k,u[1]+(m[1]-u[1])*k])}return r}function bl(o,t){let e=ml(bo)||1;return Array.from({length:o},(a,r)=>{let i=t+e*2*Math.PI*r/o;return[xo[0]+Es*Math.cos(i),xo[1]+Es*Math.sin(i)]})}function xl(o,t,e){return o.map(([a,r],i)=>[a+(t[i][0]-a)*e,r+(t[i][1]-r)*e])}function yl(o){let t=([e,a])=>`${Number(e.toFixed(3))} ${Number(a.toFixed(3))}`;return`M${o.map(t).join("L")}Z`}var kl=Object.defineProperty,wt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kl(t,e,r),r},Ri={small:16,medium:20,large:24},wl=vl(bo,Is),$l=bl(Is,gl),Cl=.28,Sl=1e3,Pl=o=>o<.5?4*o**3:1-(-2*o+2)**3/2,bt=class Fs extends c{constructor(){super(...arguments),this.variant="primary",this.size="medium",this.disabled=!1,this.type="button",this.icon="",this.iconPosition="left",this.label="",this.popup=void 0,this.expanded=void 0,this.fullWidth=!1,this.name="",this.value="",this.doneLabel="",this.failedLabel="",this.phase="idle",this.running=null,this.widthBefore=0,this.morphing=!1,this.shape={m:0,target:0,offset:0,frame:0,last:0,span:1,settled:null},this.step=t=>{let e=this.shape,a=e.last?t-e.last:0;e.last=t;let r=a/e.span;if(e.m=e.target>e.m?Math.min(e.target,e.m+r):Math.max(e.target,e.m-r),e.offset=(e.offset-a/Sl)%1,this.drawShape(),e.target===0&&e.m===0){e.frame=0,e.settled?.(),e.settled=null;return}e.frame=requestAnimationFrame(this.step)}}static{this.styles=[c.styles,f`
325
325
  :host {
326
326
  display: inline-flex;
327
327
  vertical-align: middle;
@@ -513,7 +513,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
513
513
  clip-path: inset(50%);
514
514
  white-space: nowrap;
515
515
  }
516
- `]}static{this.DONE_MS=2e3}run(t){if(this.running)return this.running;clearTimeout(this.restTimer),this.morphing=!!vo(this.icon).morphs&&br(this,"--duration-slow")>0,this.phase="busy";let e=(async()=>{try{let a=await t();return await this.finish("done"),a}catch(a){throw await this.finish("failed"),a}finally{this.running=null}})();return this.running=e,e}async finish(t){if(this.morphing&&await this.morphTo(0),t==="done"){let e=this.renderRoot.querySelector('[part="icon"]');this.phase="leaving",await this.updateComplete;let a=vo(this.icon);await(e?qt(e,a.leave,"--duration-slow","kt-button-leave",{easing:"linear",scale:a.leaveScale??1}):null)?.finished.catch(()=>{})}this.widthBefore=this.getBoundingClientRect().width,this.morphing=!1,this.phase=t,this.restTimer=setTimeout(()=>{this.widthBefore=this.getBoundingClientRect().width,this.phase="idle"},Is.DONE_MS)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.restTimer),cancelAnimationFrame(this.shape.frame),this.shape.frame=0,this.shape.settled?.(),this.running||(this.phase="idle")}morphTo(t){let e=this.shape;e.target=t,e.span=br(this,"--duration-slow");let a=new Promise(r=>{t===0&&e.m===0&&!e.frame?r():t===0?e.settled=r:r()});return e.frame||(e.last=0,e.frame=requestAnimationFrame(this.step)),a}drawShape(){let t=this.renderRoot.querySelector("svg.morph");if(!t)return;let e=Sl(this.shape.m),a=t.querySelector(".outline");a.setAttribute("d",xl(bl(kl,wl,e)));let r=$l*e;a.setAttribute("stroke-dasharray",`${1-r} ${r}`),a.setAttribute("stroke-dashoffset",String(this.shape.offset)),t.querySelector(".fold").style.opacity=String(Math.max(0,1-e*2.5))}updated(t){super.updated(t);let e=t.get("phase");if(e===void 0||!t.has("phase"))return;this.phase==="busy"&&this.morphing&&(this.drawShape(),this.morphTo(1));let a=this.renderRoot.querySelector('[part="icon"]'),r=this.renderRoot.querySelector("button");(this.phase==="done"||this.phase==="failed")&&(a&&qt(a,cl,"--duration-normal","kt-button-arrive"),this.phase==="failed"&&qt(r,hl,"--duration-slow","kt-button-shake")),this.phase==="idle"&&(e==="done"||e==="failed")&&a&&qt(a,vo(this.icon).back,"--duration-normal","kt-button-back");let i=this.widthBefore;this.widthBefore=0,i&&this.followWidth(i,a)}async followWidth(t,e){e instanceof c&&await e.updateComplete;let a=this.getBoundingClientRect().width;Math.abs(a-t)<=.5||qt(this,[{width:`${t}px`,overflow:"clip"},{width:`${a}px`,overflow:"clip"}],"--duration-normal","kt-button-resize")}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}blur(){this.shadowRoot?.querySelector("button")?.blur()}get hasLabelText(){return this.textContent!==null&&this.textContent.trim().length>0}submitEnclosingForm(){let t=this.closest("form");if(!t)return;let e=document.createElement("button");e.type=this.type,e.hidden=!0,this.name&&(e.name=this.name),this.value&&(e.value=this.value),t.append(e),e.click(),e.remove()}onClick(t){if(this.disabled||this.phase!=="idle"){t.preventDefault(),t.stopPropagation();return}this.type!=="button"&&this.submitEnclosingForm()}get shownIcon(){let t=vo(this.icon);switch(this.phase){case"busy":return this.icon&&t.morphs?{name:this.icon,motion:""}:{name:"loader-circle",motion:"spin"};case"done":return{name:"check",motion:""};case"failed":return{name:"circle-alert",motion:""};default:return this.icon?{name:this.icon,motion:""}:null}}render(){let t=!!this.icon&&!this.hasLabelText,e=this.shownIcon,a=this.phase==="busy"||this.phase==="leaving",r=a&&this.morphing?l`<svg
516
+ `]}static{this.DONE_MS=2e3}run(t){if(this.running)return this.running;clearTimeout(this.restTimer),this.morphing=!!vo(this.icon).morphs&&br(this,"--duration-slow")>0,this.phase="busy";let e=(async()=>{try{let a=await t();return await this.finish("done"),a}catch(a){throw await this.finish("failed"),a}finally{this.running=null}})();return this.running=e,e}async finish(t){if(this.morphing&&await this.morphTo(0),t==="done"){let e=this.renderRoot.querySelector('[part="icon"]');this.phase="leaving",await this.updateComplete;let a=vo(this.icon);await(e?qt(e,a.leave,"--duration-slow","kt-button-leave",{easing:"linear",scale:a.leaveScale??1}):null)?.finished.catch(()=>{})}this.widthBefore=this.getBoundingClientRect().width,this.morphing=!1,this.phase=t,this.restTimer=setTimeout(()=>{this.widthBefore=this.getBoundingClientRect().width,this.phase="idle"},Fs.DONE_MS)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.restTimer),cancelAnimationFrame(this.shape.frame),this.shape.frame=0,this.shape.settled?.(),this.running||(this.phase="idle")}morphTo(t){let e=this.shape;e.target=t,e.span=br(this,"--duration-slow");let a=new Promise(r=>{t===0&&e.m===0&&!e.frame?r():t===0?e.settled=r:r()});return e.frame||(e.last=0,e.frame=requestAnimationFrame(this.step)),a}drawShape(){let t=this.renderRoot.querySelector("svg.morph");if(!t)return;let e=Pl(this.shape.m),a=t.querySelector(".outline");a.setAttribute("d",yl(xl(wl,$l,e)));let r=Cl*e;a.setAttribute("stroke-dasharray",`${1-r} ${r}`),a.setAttribute("stroke-dashoffset",String(this.shape.offset)),t.querySelector(".fold").style.opacity=String(Math.max(0,1-e*2.5))}updated(t){super.updated(t);let e=t.get("phase");if(e===void 0||!t.has("phase"))return;this.phase==="busy"&&this.morphing&&(this.drawShape(),this.morphTo(1));let a=this.renderRoot.querySelector('[part="icon"]'),r=this.renderRoot.querySelector("button");(this.phase==="done"||this.phase==="failed")&&(a&&qt(a,hl,"--duration-normal","kt-button-arrive"),this.phase==="failed"&&qt(r,ul,"--duration-slow","kt-button-shake")),this.phase==="idle"&&(e==="done"||e==="failed")&&a&&qt(a,vo(this.icon).back,"--duration-normal","kt-button-back");let i=this.widthBefore;this.widthBefore=0,i&&this.followWidth(i,a)}async followWidth(t,e){e instanceof c&&await e.updateComplete;let a=this.getBoundingClientRect().width;Math.abs(a-t)<=.5||qt(this,[{width:`${t}px`,overflow:"clip"},{width:`${a}px`,overflow:"clip"}],"--duration-normal","kt-button-resize")}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}blur(){this.shadowRoot?.querySelector("button")?.blur()}get hasLabelText(){return this.textContent!==null&&this.textContent.trim().length>0}submitEnclosingForm(){let t=this.closest("form");if(!t)return;let e=document.createElement("button");e.type=this.type,e.hidden=!0,this.name&&(e.name=this.name),this.value&&(e.value=this.value),t.append(e),e.click(),e.remove()}onClick(t){if(this.disabled||this.phase!=="idle"){t.preventDefault(),t.stopPropagation();return}this.type!=="button"&&this.submitEnclosingForm()}get shownIcon(){let t=vo(this.icon);switch(this.phase){case"busy":return this.icon&&t.morphs?{name:this.icon,motion:""}:{name:"loader-circle",motion:"spin"};case"done":return{name:"check",motion:""};case"failed":return{name:"circle-alert",motion:""};default:return this.icon?{name:this.icon,motion:""}:null}}render(){let t=!!this.icon&&!this.hasLabelText,e=this.shownIcon,a=this.phase==="busy"||this.phase==="leaving",r=a&&this.morphing?l`<svg
517
517
  part="icon"
518
518
  class="morph"
519
519
  viewBox="0 0 24 24"
@@ -527,7 +527,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
527
527
  aria-hidden="true"
528
528
  >
529
529
  <path class="outline" pathLength="1"></path>
530
- <path class="fold" d=${ul}></path>
530
+ <path class="fold" d=${fl}></path>
531
531
  </svg>`:e?l`<kt-icon
532
532
  part="icon"
533
533
  class=${e.motion||d}
@@ -550,7 +550,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
550
550
  <slot ?hidden=${!!i&&!t}></slot>
551
551
  ${this.iconPosition==="right"?r:d}
552
552
  </button>
553
- <span class="visually-hidden" role="status">${i}</span>`}};wt([n({type:String,reflect:!0})],bt.prototype,"variant");wt([n({type:String,reflect:!0})],bt.prototype,"size");wt([n({type:Boolean,reflect:!0})],bt.prototype,"disabled");wt([n({type:String})],bt.prototype,"type");wt([n({type:String})],bt.prototype,"icon");wt([n({type:String,attribute:"icon-position"})],bt.prototype,"iconPosition");wt([n({type:String})],bt.prototype,"label");wt([n({attribute:!1})],bt.prototype,"popup");wt([n({attribute:!1})],bt.prototype,"expanded");wt([n({type:Boolean,reflect:!0,attribute:"full-width"})],bt.prototype,"fullWidth");wt([n({type:String})],bt.prototype,"name");wt([n({type:String})],bt.prototype,"value");wt([n({type:String,attribute:"done-label"})],bt.prototype,"doneLabel");wt([n({type:String,attribute:"failed-label"})],bt.prototype,"failedLabel");wt([x()],bt.prototype,"phase");var Fs=bt;g("kt-button",Fs);function $t(o){return o.label??String(o.id)}function yo(o,t){let e=t.trim().toLowerCase();return e?o.filter(a=>$t(a).toLowerCase().includes(e)):o}function Je(o,t,e){if(o.length===0)return-1;for(let a=1;a<=o.length;a+=1){let r=(t+e*a+o.length*a)%o.length;if(!o[r]?.disabled)return r}return-1}function Et(o){return o.findIndex(t=>!t.disabled)}function xr(o){for(let t=o.length-1;t>=0;t-=1)if(!o[t]?.disabled)return t;return-1}var da=f`
553
+ <span class="visually-hidden" role="status">${i}</span>`}};wt([n({type:String,reflect:!0})],bt.prototype,"variant");wt([n({type:String,reflect:!0})],bt.prototype,"size");wt([n({type:Boolean,reflect:!0})],bt.prototype,"disabled");wt([n({type:String})],bt.prototype,"type");wt([n({type:String})],bt.prototype,"icon");wt([n({type:String,attribute:"icon-position"})],bt.prototype,"iconPosition");wt([n({type:String})],bt.prototype,"label");wt([n({attribute:!1})],bt.prototype,"popup");wt([n({attribute:!1})],bt.prototype,"expanded");wt([n({type:Boolean,reflect:!0,attribute:"full-width"})],bt.prototype,"fullWidth");wt([n({type:String})],bt.prototype,"name");wt([n({type:String})],bt.prototype,"value");wt([n({type:String,attribute:"done-label"})],bt.prototype,"doneLabel");wt([n({type:String,attribute:"failed-label"})],bt.prototype,"failedLabel");wt([x()],bt.prototype,"phase");var Us=bt;g("kt-button",Us);function $t(o){return o.label??String(o.id)}function yo(o,t){let e=t.trim().toLowerCase();return e?o.filter(a=>$t(a).toLowerCase().includes(e)):o}function tr(o,t,e){if(o.length===0)return-1;for(let a=1;a<=o.length;a+=1){let r=(t+e*a+o.length*a)%o.length;if(!o[r]?.disabled)return r}return-1}function Et(o){return o.findIndex(t=>!t.disabled)}function xr(o){for(let t=o.length-1;t>=0;t-=1)if(!o[t]?.disabled)return t;return-1}var da=f`
554
554
  /* Placed from the field by FloatingController, which also sets its width. */
555
555
  .popup {
556
556
  display: flex;
@@ -621,7 +621,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
621
621
  font: var(--font-normal-small);
622
622
  pointer-events: none;
623
623
  }
624
- `;function Us(o,t,e,a){return o==="start"?t:o==="end"?t+e-a:t+e/2-a/2}var ko=6,pa=8,Ns={top:"bottom",bottom:"top",left:"right",right:"left"},Hs=(o,t,e)=>Math.min(Math.max(o,t),e);function wo(o,t,e,a,r="center"){let i=u=>{switch(u){case"top":return o.top-ko-t.height;case"bottom":return o.top+o.height+ko;case"left":return o.left-ko-t.width;case"right":return o.left+o.width+ko}},s=u=>{let m=i(u),b=u==="top"||u==="bottom"?t.height:t.width,k=u==="top"||u==="bottom"?e.height:e.width;return m>=pa&&m+b<=k-pa},p=!s(a)&&s(Ns[a])?Ns[a]:a;if(p==="top"||p==="bottom"){let u=Us(r,o.left,o.width,t.width);return{x:Hs(u,pa,e.width-pa-t.width),y:i(p),placement:p}}let h=Us(r,o.top,o.height,t.height);return{x:i(p),y:Hs(h,pa,e.height-pa-t.height),placement:p}}var ht=f`
624
+ `;function Ns(o,t,e,a){return o==="start"?t:o==="end"?t+e-a:t+e/2-a/2}var ko=6,pa=8,Hs={top:"bottom",bottom:"top",left:"right",right:"left"},js=(o,t,e)=>Math.min(Math.max(o,t),e);function wo(o,t,e,a,r="center"){let i=u=>{switch(u){case"top":return o.top-ko-t.height;case"bottom":return o.top+o.height+ko;case"left":return o.left-ko-t.width;case"right":return o.left+o.width+ko}},s=u=>{let m=i(u),b=u==="top"||u==="bottom"?t.height:t.width,k=u==="top"||u==="bottom"?e.height:e.width;return m>=pa&&m+b<=k-pa},p=!s(a)&&s(Hs[a])?Hs[a]:a;if(p==="top"||p==="bottom"){let u=Ns(r,o.left,o.width,t.width);return{x:js(u,pa,e.width-pa-t.width),y:i(p),placement:p}}let h=Ns(r,o.top,o.height,t.height);return{x:i(p),y:js(h,pa,e.height-pa-t.height),placement:p}}var ht=f`
625
625
  .floating {
626
626
  position: fixed;
627
627
  inset: 0 auto auto 0;
@@ -636,7 +636,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
636
636
  border: var(--border-width) solid var(--border-popover);
637
637
  box-shadow: var(--shadow-popover);
638
638
  }
639
- `,at=class{constructor(t,e){this.options=e,this.open=!1,this.frame=0,this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.place())},t.addController(this)}sync(t){if(t!==this.open){this.open=t;let a=t?"addEventListener":"removeEventListener";window[a]("scroll",this.follow,{capture:!0,passive:!0}),window[a]("resize",this.follow)}let e=this.options.panel();!e||typeof e.showPopover!="function"||(t?(e.matches(":popover-open")||e.showPopover(),this.place(),!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(this.follow),this.resizeObserver.observe(e))):(this.unobserve(),e.matches(":popover-open")&&e.hidePopover()))}unobserve(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0}hostDisconnected(){this.sync(!1),this.unobserve(),cancelAnimationFrame(this.frame)}place(){let t=this.options.panel(),e=this.options.anchor()?.getBoundingClientRect();if(!t||!e)return;this.options.matchWidth&&(t.style.width=`${e.width}px`);let{x:a,y:r,placement:i}=wo(e,{width:t.offsetWidth,height:t.offsetHeight},{width:window.innerWidth,height:window.innerHeight},this.options.side?.()??"bottom",this.options.align?.()??"start");t.style.left=`${a}px`,t.style.top=`${r}px`,this.options.onPlace?.(i)}};var Pl=Object.defineProperty,ce=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Pl(t,e,r),r},Ct=class extends c{constructor(){super(...arguments),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.triggerWrapper,side:()=>this.preferredPlacement,align:()=>this.align,onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.options=[],this.value=null,this.preferredPlacement="bottom",this.align="start",this.disabled=!1,this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.hide()},this.onDocumentKeyDown=t=>{t.key==="Escape"&&this.hide()},this.syncTrigger=()=>{let t=this.triggerSlot?.assignedElements()[0];if(!t)return;let e=this.panelSlot?.assignedElements()[0]?.getAttribute("role")==="menu",a=this.options.length>0||e?"menu":void 0;if(Al(t)){t.popup=a,t.expanded=this.open;return}a?t.setAttribute("aria-haspopup",a):t.removeAttribute("aria-haspopup"),t.setAttribute("aria-expanded",String(this.open))}}static{this.styles=[c.styles,ht,f`
639
+ `,at=class{constructor(t,e){this.options=e,this.open=!1,this.frame=0,this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.place())},t.addController(this)}sync(t){if(t!==this.open){this.open=t;let a=t?"addEventListener":"removeEventListener";window[a]("scroll",this.follow,{capture:!0,passive:!0}),window[a]("resize",this.follow)}let e=this.options.panel();!e||typeof e.showPopover!="function"||(t?(e.matches(":popover-open")||e.showPopover(),this.place(),!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(this.follow),this.resizeObserver.observe(e))):(this.unobserve(),e.matches(":popover-open")&&e.hidePopover()))}unobserve(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0}hostDisconnected(){this.sync(!1),this.unobserve(),cancelAnimationFrame(this.frame)}place(){let t=this.options.panel(),e=this.options.anchor()?.getBoundingClientRect();if(!t||!e)return;let a=this.options.matchWidth;(typeof a=="function"?a():a)&&(t.style.width=`${e.width}px`);let{x:r,y:i,placement:s}=wo(e,{width:t.offsetWidth,height:t.offsetHeight},{width:window.innerWidth,height:window.innerHeight},this.options.side?.()??"bottom",this.options.align?.()??"start");t.style.left=`${r}px`,t.style.top=`${i}px`,this.options.onPlace?.(s)}};var Al=Object.defineProperty,ue=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Al(t,e,r),r},Ct=class extends c{constructor(){super(...arguments),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.triggerWrapper,side:()=>this.preferredPlacement,align:()=>this.align,onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.options=[],this.value=null,this.preferredPlacement="bottom",this.align="start",this.disabled=!1,this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.hide()},this.onDocumentKeyDown=t=>{t.key==="Escape"&&this.hide()},this.syncTrigger=()=>{let t=this.triggerSlot?.assignedElements()[0];if(!t)return;let e=this.panelSlot?.assignedElements()[0]?.getAttribute("role")==="menu",a=this.options.length>0||e?"menu":void 0;if(Ml(t)){t.popup=a,t.expanded=this.open;return}a?t.setAttribute("aria-haspopup",a):t.removeAttribute("aria-haspopup"),t.setAttribute("aria-expanded",String(this.open))}}static{this.styles=[c.styles,ht,f`
640
640
  :host {
641
641
  position: relative;
642
642
  display: inline-block;
@@ -755,7 +755,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
755
755
  </ul>`:l`<slot name="panel">
756
756
  <div class="empty">${this.emptyText??v().noResults}</div>
757
757
  </slot>`}
758
- </div>`}};ce([A(".trigger")],Ct.prototype,"triggerWrapper");ce([A('slot[name="trigger"]')],Ct.prototype,"triggerSlot");ce([A('slot[name="panel"]')],Ct.prototype,"panelSlot");ce([x()],Ct.prototype,"open");ce([x()],Ct.prototype,"placement");ce([n({attribute:!1})],Ct.prototype,"options");ce([n({type:String})],Ct.prototype,"value");ce([n({type:String,attribute:"preferred-placement"})],Ct.prototype,"preferredPlacement");ce([n({type:String,reflect:!0})],Ct.prototype,"align");ce([n({type:Boolean,reflect:!0})],Ct.prototype,"disabled");ce([n({type:String,attribute:"empty-text"})],Ct.prototype,"emptyText");function Al(o){return"popup"in o&&"expanded"in o}g("kt-dropdown",Ct);var Ml=Object.defineProperty,he=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ml(t,e,r),r},js={small:16,medium:20,large:24},St=class extends c{constructor(){super(...arguments),this.activeIndex=-1,this.items=[],this.variant="primary",this.size="medium",this.disabled=!1,this.icon="",this.menuLabel=void 0,this.preferredPlacement="bottom",this.emptyText=void 0,this.onOpen=()=>{this.moveTo(Et(this.items))},this.onClose=()=>{let t=this.shadowRoot?.activeElement;this.activeIndex=-1,t instanceof HTMLElement&&t.classList.contains("item")&&this.caret?.focus()},this.onMenuKeyDown=t=>{let e={ArrowDown:()=>Je(this.items,this.activeIndex,1),ArrowUp:()=>Je(this.items,this.activeIndex,-1),Home:()=>Et(this.items),End:()=>xr(this.items)}[t.key];e&&(t.preventDefault(),this.moveTo(e()))}}static{this.styles=[c.styles,f`
758
+ </div>`}};ue([A(".trigger")],Ct.prototype,"triggerWrapper");ue([A('slot[name="trigger"]')],Ct.prototype,"triggerSlot");ue([A('slot[name="panel"]')],Ct.prototype,"panelSlot");ue([x()],Ct.prototype,"open");ue([x()],Ct.prototype,"placement");ue([n({attribute:!1})],Ct.prototype,"options");ue([n({type:String})],Ct.prototype,"value");ue([n({type:String,attribute:"preferred-placement"})],Ct.prototype,"preferredPlacement");ue([n({type:String,reflect:!0})],Ct.prototype,"align");ue([n({type:Boolean,reflect:!0})],Ct.prototype,"disabled");ue([n({type:String,attribute:"empty-text"})],Ct.prototype,"emptyText");function Ml(o){return"popup"in o&&"expanded"in o}g("kt-dropdown",Ct);var Dl=Object.defineProperty,fe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dl(t,e,r),r},_s={small:16,medium:20,large:24},St=class extends c{constructor(){super(...arguments),this.activeIndex=-1,this.items=[],this.variant="primary",this.size="medium",this.disabled=!1,this.icon="",this.menuLabel=void 0,this.preferredPlacement="bottom",this.emptyText=void 0,this.onOpen=()=>{this.moveTo(Et(this.items))},this.onClose=()=>{let t=this.shadowRoot?.activeElement;this.activeIndex=-1,t instanceof HTMLElement&&t.classList.contains("item")&&this.caret?.focus()},this.onMenuKeyDown=t=>{let e={ArrowDown:()=>tr(this.items,this.activeIndex,1),ArrowUp:()=>tr(this.items,this.activeIndex,-1),Home:()=>Et(this.items),End:()=>xr(this.items)}[t.key];e&&(t.preventDefault(),this.moveTo(e()))}}static{this.styles=[c.styles,f`
759
759
  :host {
760
760
  display: inline-flex;
761
761
  vertical-align: middle;
@@ -847,7 +847,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
847
847
  aria-disabled=${t.disabled?"true":d}
848
848
  @click=${()=>this.choose(t)}
849
849
  >
850
- ${t.icon?l`<kt-icon name=${t.icon} size=${js[this.size]}></kt-icon>`:d}
850
+ ${t.icon?l`<kt-icon name=${t.icon} size=${_s[this.size]}></kt-icon>`:d}
851
851
  ${$t(t)}
852
852
  </button>`}render(){return l`<div class="split">
853
853
  <!-- The icon is slotted rather than passed as \`icon\`: <kt-button> reads
@@ -860,7 +860,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
860
860
  size=${this.size}
861
861
  ?disabled=${this.disabled}
862
862
  >
863
- ${this.icon?l`<kt-icon name=${this.icon} size=${js[this.size]}></kt-icon>`:d}
863
+ ${this.icon?l`<kt-icon name=${this.icon} size=${_s[this.size]}></kt-icon>`:d}
864
864
  <slot></slot>
865
865
  </kt-button>
866
866
 
@@ -888,7 +888,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
888
888
  ${this.items.length>0?this.items.map((t,e)=>this.renderItem(t,e)):l`<div class="empty">${this.emptyText??v().noActions}</div>`}
889
889
  </div>
890
890
  </kt-dropdown>
891
- </div>`}};he([A("kt-dropdown")],St.prototype,"dropdown");he([A(".caret")],St.prototype,"caret");he([x()],St.prototype,"activeIndex");he([n({attribute:!1})],St.prototype,"items");he([n({type:String,reflect:!0})],St.prototype,"variant");he([n({type:String,reflect:!0})],St.prototype,"size");he([n({type:Boolean,reflect:!0})],St.prototype,"disabled");he([n({type:String})],St.prototype,"icon");he([n({type:String,attribute:"menu-label"})],St.prototype,"menuLabel");he([n({type:String,attribute:"preferred-placement"})],St.prototype,"preferredPlacement");he([n({type:String,attribute:"empty-text"})],St.prototype,"emptyText");g("kt-split-button",St);function E(o){return o?o.assignedElements({flatten:!0}).length>0?!0:o.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE&&(t.textContent??"").trim()!==""):!1}var Dl=Object.defineProperty,yr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dl(t,e,r),r},ee=class extends c{constructor(){super(...arguments),this.hasHeader=!1,this.hasFooter=!1,this.clickable=!1,this.selected=!1,this.image="",this.imageAlt="",this.imagePosition="left",this.imageSize="120px"}static{this.styles=[c.styles,f`
891
+ </div>`}};fe([A("kt-dropdown")],St.prototype,"dropdown");fe([A(".caret")],St.prototype,"caret");fe([x()],St.prototype,"activeIndex");fe([n({attribute:!1})],St.prototype,"items");fe([n({type:String,reflect:!0})],St.prototype,"variant");fe([n({type:String,reflect:!0})],St.prototype,"size");fe([n({type:Boolean,reflect:!0})],St.prototype,"disabled");fe([n({type:String})],St.prototype,"icon");fe([n({type:String,attribute:"menu-label"})],St.prototype,"menuLabel");fe([n({type:String,attribute:"preferred-placement"})],St.prototype,"preferredPlacement");fe([n({type:String,attribute:"empty-text"})],St.prototype,"emptyText");g("kt-split-button",St);function E(o){return o?o.assignedElements({flatten:!0}).length>0?!0:o.assignedNodes({flatten:!0}).some(t=>t.nodeType===Node.TEXT_NODE&&(t.textContent??"").trim()!==""):!1}var Tl=Object.defineProperty,yr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tl(t,e,r),r},ee=class extends c{constructor(){super(...arguments),this.hasHeader=!1,this.hasFooter=!1,this.clickable=!1,this.selected=!1,this.image="",this.imageAlt="",this.imagePosition="left",this.imageSize="120px"}static{this.styles=[c.styles,f`
892
892
  :host {
893
893
  display: block;
894
894
  }
@@ -1037,7 +1037,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1037
1037
  <slot name="footer" @slotchange=${this.onSlotChange}></slot>
1038
1038
  </div>
1039
1039
  </div>
1040
- </div>`}};yr([x()],ee.prototype,"hasHeader");yr([x()],ee.prototype,"hasFooter");yr([n({type:Boolean,reflect:!0})],ee.prototype,"clickable");yr([n({type:Boolean,reflect:!0})],ee.prototype,"selected");yr([n({type:String})],ee.prototype,"image");yr([n({type:String,attribute:"image-alt"})],ee.prototype,"imageAlt");yr([n({type:String,attribute:"image-position"})],ee.prototype,"imagePosition");yr([n({type:String,attribute:"image-size"})],ee.prototype,"imageSize");g("kt-card",ee);var Tl=Object.defineProperty,$o=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tl(t,e,r),r},Oa=class _s extends c{constructor(){super(...arguments),this.copied=!1,this.language="",this.copy=!1,this.label=""}static{this.styles=[c.styles,f`
1040
+ </div>`}};yr([x()],ee.prototype,"hasHeader");yr([x()],ee.prototype,"hasFooter");yr([n({type:Boolean,reflect:!0})],ee.prototype,"clickable");yr([n({type:Boolean,reflect:!0})],ee.prototype,"selected");yr([n({type:String})],ee.prototype,"image");yr([n({type:String,attribute:"image-alt"})],ee.prototype,"imageAlt");yr([n({type:String,attribute:"image-position"})],ee.prototype,"imagePosition");yr([n({type:String,attribute:"image-size"})],ee.prototype,"imageSize");g("kt-card",ee);var Ll=Object.defineProperty,$o=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ll(t,e,r),r},za=class Vs extends c{constructor(){super(...arguments),this.copied=!1,this.language="",this.copy=!1,this.label=""}static{this.styles=[c.styles,f`
1041
1041
  :host {
1042
1042
  display: block;
1043
1043
  }
@@ -1111,7 +1111,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1111
1111
  .bare pre {
1112
1112
  padding-top: 14px;
1113
1113
  }
1114
- `]}static{this.COPIED_MS=1600}disconnectedCallback(){super.disconnectedCallback(),this.copiedTimer!==void 0&&clearTimeout(this.copiedTimer)}get code(){return(this.textContent??"").replace(/^\n+|\n+$/g,"")}async copyToClipboard(){try{await navigator.clipboard.writeText(this.code),this.copied=!0,this.copiedTimer!==void 0&&clearTimeout(this.copiedTimer),this.copiedTimer=setTimeout(()=>{this.copied=!1},_s.COPIED_MS)}catch{}y(this,"kt-copy",{code:this.code})}updated(t){if(super.updated(t),!t.has("copied")||!this.copied)return;let e=this.renderRoot.querySelector(".copy kt-icon");e&&qt(e,[{scale:.4,opacity:0},{scale:1,opacity:1}],"--duration-normal","kt-code-copied")}render(){let t=!!this.language||this.copy;return l`<div part="base" class=${t?"base":"base bare"}>
1114
+ `]}static{this.COPIED_MS=1600}disconnectedCallback(){super.disconnectedCallback(),this.copiedTimer!==void 0&&clearTimeout(this.copiedTimer)}get code(){return(this.textContent??"").replace(/^\n+|\n+$/g,"")}async copyToClipboard(){try{await navigator.clipboard.writeText(this.code),this.copied=!0,this.copiedTimer!==void 0&&clearTimeout(this.copiedTimer),this.copiedTimer=setTimeout(()=>{this.copied=!1},Vs.COPIED_MS)}catch{}y(this,"kt-copy",{code:this.code})}updated(t){if(super.updated(t),!t.has("copied")||!this.copied)return;let e=this.renderRoot.querySelector(".copy kt-icon");e&&qt(e,[{scale:.4,opacity:0},{scale:1,opacity:1}],"--duration-normal","kt-code-copied")}render(){let t=!!this.language||this.copy;return l`<div part="base" class=${t?"base":"base bare"}>
1115
1115
  ${t?l`<div part="header" class="header">
1116
1116
  <span class="language">${this.language}</span>
1117
1117
  ${this.copy?l`<button
@@ -1130,7 +1130,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1130
1130
  tabindex="0"
1131
1131
  aria-label=${this.label||d}
1132
1132
  ><code><slot></slot></code></pre>
1133
- </div>`}};$o([x()],Oa.prototype,"copied");$o([n({type:String})],Oa.prototype,"language");$o([n({type:Boolean})],Oa.prototype,"copy");$o([n({type:String})],Oa.prototype,"label");var Vs=Oa;g("kt-code",Vs);var Ll=Object.defineProperty,Gs=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ll(t,e,r),r},Bl={mod:"\u2318",meta:"\u2318",cmd:"\u2318",ctrl:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",escape:"esc",backspace:"\u232B"},Ol={mod:"Ctrl",meta:"Win",cmd:"Ctrl",ctrl:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift",enter:"Enter",escape:"Esc",backspace:"Backspace"},ca=class extends c{constructor(){super(...arguments),this.keys="",this.platform="auto"}static{this.styles=[c.styles,f`
1133
+ </div>`}};$o([x()],za.prototype,"copied");$o([n({type:String})],za.prototype,"language");$o([n({type:Boolean})],za.prototype,"copy");$o([n({type:String})],za.prototype,"label");var Gs=za;g("kt-code",Gs);var Bl=Object.defineProperty,Ws=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Bl(t,e,r),r},Ol={mod:"\u2318",meta:"\u2318",cmd:"\u2318",ctrl:"\u2303",alt:"\u2325",option:"\u2325",shift:"\u21E7",enter:"\u21B5",escape:"esc",backspace:"\u232B"},zl={mod:"Ctrl",meta:"Win",cmd:"Ctrl",ctrl:"Ctrl",alt:"Alt",option:"Alt",shift:"Shift",enter:"Enter",escape:"Esc",backspace:"Backspace"},ca=class extends c{constructor(){super(...arguments),this.keys="",this.platform="auto"}static{this.styles=[c.styles,f`
1134
1134
  :host {
1135
1135
  display: inline-flex;
1136
1136
  align-items: center;
@@ -1152,9 +1152,9 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1152
1152
  border: var(--border-width) solid var(--border-subtle);
1153
1153
  border-radius: calc(5px * var(--radius-scale, 1));
1154
1154
  }
1155
- `]}get isMac(){return this.platform!=="auto"?this.platform==="mac":typeof navigator>"u"?!1:/mac|iphone|ipad/i.test(navigator.platform||navigator.userAgent)}get labels(){let t=this.isMac?Bl:Ol;return this.keys.split(/\s+/).filter(Boolean).map(e=>t[e.toLowerCase()]??e.toUpperCase())}render(){let t=this.labels;return l`<span part="base" style="display:contents">
1155
+ `]}get isMac(){return this.platform!=="auto"?this.platform==="mac":typeof navigator>"u"?!1:/mac|iphone|ipad/i.test(navigator.platform||navigator.userAgent)}get labels(){let t=this.isMac?Ol:zl;return this.keys.split(/\s+/).filter(Boolean).map(e=>t[e.toLowerCase()]??e.toUpperCase())}render(){let t=this.labels;return l`<span part="base" style="display:contents">
1156
1156
  ${t.length>0?t.map(e=>l`<kbd part="key">${e}</kbd>`):l`<kbd part="key"><slot></slot></kbd>`}
1157
- </span>`}};Gs([n({type:String})],ca.prototype,"keys");Gs([n({type:String})],ca.prototype,"platform");g("kt-kbd",ca);var{I:Um}=$s;var Ws=o=>o.strings===void 0;var Kl={},Ys=(o,t=Kl)=>o._$AH=t;var nt=la(class extends gr{constructor(o){if(super(o),o.type!==de.PROPERTY&&o.type!==de.ATTRIBUTE&&o.type!==de.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ws(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===vt||t===d)return t;let e=o.element,a=o.name;if(o.type===de.PROPERTY){if(t===e[a])return vt}else if(o.type===de.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(a))return vt}else if(o.type===de.ATTRIBUTE&&e.getAttribute(a)===t+"")return vt;return Ys(o),t}});function R(o){if(typeof o.attachInternals!="function")return null;let t=o.attachInternals();return typeof t.setFormValue!="function"?null:t}function B(o,t,e){e===void 0?o?.setFormValue(t):o?.setFormValue(t,e)}function H(o,t,e,a){!o||typeof o.setValidity!="function"||(Object.values(t).some(Boolean)?o.setValidity(t,e,a):o.setValidity({}))}var Rl=Object.defineProperty,ue=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rl(t,e,r),r},Pt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultChecked=!1,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.formDisabled=!1,this.required=!1,this.size="medium",this.name="",this.value="on",this.label="",this.error="",this.ticked=!1}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
1157
+ </span>`}};Ws([n({type:String})],ca.prototype,"keys");Ws([n({type:String})],ca.prototype,"platform");g("kt-kbd",ca);var{I:jm}=Cs;var Ys=o=>o.strings===void 0;var Kl={},Xs=(o,t=Kl)=>o._$AH=t;var nt=la(class extends gr{constructor(o){if(super(o),o.type!==ce.PROPERTY&&o.type!==ce.ATTRIBUTE&&o.type!==ce.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Ys(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===vt||t===d)return t;let e=o.element,a=o.name;if(o.type===ce.PROPERTY){if(t===e[a])return vt}else if(o.type===ce.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(a))return vt}else if(o.type===ce.ATTRIBUTE&&e.getAttribute(a)===t+"")return vt;return Xs(o),t}});function K(o){if(typeof o.attachInternals!="function")return null;let t=o.attachInternals();return typeof t.setFormValue!="function"?null:t}function B(o,t,e){e===void 0?o?.setFormValue(t):o?.setFormValue(t,e)}function H(o,t,e,a){!o||typeof o.setValidity!="function"||(Object.values(t).some(Boolean)?o.setValidity(t,e,a):o.setValidity({}))}var Rl=Object.defineProperty,me=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rl(t,e,r),r},Pt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultChecked=!1,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.formDisabled=!1,this.required=!1,this.size="medium",this.name="",this.value="on",this.label="",this.error="",this.ticked=!1}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
1158
1158
  :host {
1159
1159
  display: inline-flex;
1160
1160
  vertical-align: middle;
@@ -1251,7 +1251,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1251
1251
  border-color: var(--color-dark-24);
1252
1252
  color: var(--text-disabled);
1253
1253
  }
1254
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultChecked=this.checked}willUpdate(t){if(this.hasUpdated&&(t.has("checked")||t.has("indeterminate"))&&(this.ticked=this.checked||this.indeterminate),t.has("checked")||t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.checked?this.value:null);let e=this.required&&!this.checked;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().checkRequired:""))}}formResetCallback(){this.checked=this.defaultChecked,this.indeterminate=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.checked=t===this.value}focus(t){this.input?.focus(t)}onChange(t){let e=t.target;this.checked=e.checked,this.indeterminate=!1,y(this,"kt-change",{checked:this.checked})}render(){let t=this.indeterminate?"minus":this.checked?"check":"";return l`${this.error?l`<span id="error-message" class="visually-hidden">${this.error}</span>`:d}<label part="base" class=${this.error?"error":""}>
1254
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultChecked=this.checked}willUpdate(t){if(this.hasUpdated&&(t.has("checked")||t.has("indeterminate"))&&(this.ticked=this.checked||this.indeterminate),t.has("checked")||t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.checked?this.value:null);let e=this.required&&!this.checked;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().checkRequired:""))}}formResetCallback(){this.checked=this.defaultChecked,this.indeterminate=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.checked=t===this.value}focus(t){this.input?.focus(t)}onChange(t){let e=t.target;this.checked=e.checked,this.indeterminate=!1,y(this,"kt-change",{checked:this.checked})}render(){let t=this.indeterminate?"minus":this.checked?"check":"";return l`${this.error?l`<span id="error-message" class="visually-hidden">${this.error}</span>`:d}<label part="base" class=${this.error?"error":""}>
1255
1255
  <span class="control">
1256
1256
  <input
1257
1257
  part="input"
@@ -1270,7 +1270,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1270
1270
  </span>
1271
1271
  </span>
1272
1272
  <span class="text"><slot></slot></span>
1273
- </label>`}};ue([A("input")],Pt.prototype,"input");ue([n({type:Boolean,reflect:!0})],Pt.prototype,"checked");ue([n({type:Boolean,reflect:!0})],Pt.prototype,"indeterminate");ue([n({type:Boolean,reflect:!0})],Pt.prototype,"disabled");ue([x()],Pt.prototype,"formDisabled");ue([n({type:Boolean,reflect:!0})],Pt.prototype,"required");ue([n({type:String,reflect:!0})],Pt.prototype,"size");ue([n({type:String})],Pt.prototype,"name");ue([n({type:String})],Pt.prototype,"value");ue([n({type:String})],Pt.prototype,"label");ue([n({type:String,reflect:!0})],Pt.prototype,"error");g("kt-checkbox",Pt);function Te(o){return o||document.documentElement.lang||navigator.language||"en"}var Xs=new Map;function Vt(o,t){let e=`${o}|${JSON.stringify(t)}`,a=Xs.get(e);return a||(a=new Intl.DateTimeFormat(o,t),Xs.set(e,a)),a}var zl=/^(\d{4})-(\d{2})-(\d{2})$/;function re(o,t){return new Date(Date.UTC(o,t,0)).getUTCDate()}function lt(o){let t=zl.exec(o?.trim()??"");if(!t)return null;let[e,a,r]=[Number(t[1]),Number(t[2]),Number(t[3])];return a<1||a>12||r<1||r>re(e,a)?null:{year:e,month:a,day:r}}function tr(o){let t=(e,a=2)=>String(e).padStart(a,"0");return`${t(o.year,4)}-${t(o.month)}-${t(o.day)}`}function Co(o){let[t,e]=(o??"").split("/");return{start:lt(t),end:lt(e)}}function Ka(o,t){return`${tr(o)}/${tr(t)}`}function V(o,t){return o.year-t.year||o.month-t.month||o.day-t.day}function Hr(o,t){return o!==null&&t!==null&&V(o,t)===0}function ql(o,t,e){let[a,r]=V(t,e)<=0?[t,e]:[e,t];return V(o,a)>=0&&V(o,r)<=0}function El(o){let t=new Date(o);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}function Be(o,t){return El(Date.UTC(o.year,o.month-1,o.day+t))}function Le(o,t){let e=o.year*12+(o.month-1)+t,a=Math.floor(e/12),r=e%12+1;return{year:a,month:r,day:Math.min(o.day,re(a,r))}}function Il(o){let t=new Date(Date.UTC(o.year,o.month-1,o.day)).getUTCDay();return t===0?7:t}function zi(o,t){return Be(o,-((Il(o)-t+7)%7))}function Fl(o,t,e){let a=zi({year:o,month:t,day:1},e),r=[];for(let i=0;i<6;i+=1){let s=[];for(let p=0;p<7;p+=1)s.push(a),a=Be(a,1);r.push(s)}return r}function At(){let o=new Date;return{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}}function Ra(o){return new Date(o.year,o.month-1,o.day,12)}function Zs(o){try{let t=new Intl.Locale(o),e=t.getWeekInfo?.().firstDay??t.weekInfo?.firstDay;return e&&e>=1&&e<=7?e:1}catch{return 1}}var Ul=Object.defineProperty,fe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ul(t,e,r),r},Nl=120,Hl=50,jl=1e3,Mt=class extends c{constructor(){super(...arguments),this.liveId=q("kt-calendar-live"),this.focusCell=!1,this.focusYear=!1,this.typed="",this.typedAt=0,this.committing=!1,this.view="day",this.month={...At(),day:1},this.focused=At(),this.anchor=null,this.value=null,this.range=!1,this.min="",this.max="",this.locale="",this.months=1,this.label=""}static{this.styles=[c.styles,f`
1273
+ </label>`}};me([A("input")],Pt.prototype,"input");me([n({type:Boolean,reflect:!0})],Pt.prototype,"checked");me([n({type:Boolean,reflect:!0})],Pt.prototype,"indeterminate");me([n({type:Boolean,reflect:!0})],Pt.prototype,"disabled");me([x()],Pt.prototype,"formDisabled");me([n({type:Boolean,reflect:!0})],Pt.prototype,"required");me([n({type:String,reflect:!0})],Pt.prototype,"size");me([n({type:String})],Pt.prototype,"name");me([n({type:String})],Pt.prototype,"value");me([n({type:String})],Pt.prototype,"label");me([n({type:String,reflect:!0})],Pt.prototype,"error");g("kt-checkbox",Pt);function Te(o){return o||document.documentElement.lang||navigator.language||"en"}var Zs=new Map;function Vt(o,t){let e=`${o}|${JSON.stringify(t)}`,a=Zs.get(e);return a||(a=new Intl.DateTimeFormat(o,t),Zs.set(e,a)),a}var ql=/^(\d{4})-(\d{2})-(\d{2})$/;function re(o,t){return new Date(Date.UTC(o,t,0)).getUTCDate()}function lt(o){let t=ql.exec(o?.trim()??"");if(!t)return null;let[e,a,r]=[Number(t[1]),Number(t[2]),Number(t[3])];return a<1||a>12||r<1||r>re(e,a)?null:{year:e,month:a,day:r}}function er(o){let t=(e,a=2)=>String(e).padStart(a,"0");return`${t(o.year,4)}-${t(o.month)}-${t(o.day)}`}function Co(o){let[t,e]=(o??"").split("/");return{start:lt(t),end:lt(e)}}function Ka(o,t){return`${er(o)}/${er(t)}`}function V(o,t){return o.year-t.year||o.month-t.month||o.day-t.day}function _r(o,t){return o!==null&&t!==null&&V(o,t)===0}function El(o,t,e){let[a,r]=V(t,e)<=0?[t,e]:[e,t];return V(o,a)>=0&&V(o,r)<=0}function Il(o){let t=new Date(o);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()}}function Be(o,t){return Il(Date.UTC(o.year,o.month-1,o.day+t))}function Le(o,t){let e=o.year*12+(o.month-1)+t,a=Math.floor(e/12),r=e%12+1;return{year:a,month:r,day:Math.min(o.day,re(a,r))}}function Fl(o){let t=new Date(Date.UTC(o.year,o.month-1,o.day)).getUTCDay();return t===0?7:t}function qi(o,t){return Be(o,-((Fl(o)-t+7)%7))}function Ul(o,t,e){let a=qi({year:o,month:t,day:1},e),r=[];for(let i=0;i<6;i+=1){let s=[];for(let p=0;p<7;p+=1)s.push(a),a=Be(a,1);r.push(s)}return r}function At(){let o=new Date;return{year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}}function Ra(o){return new Date(o.year,o.month-1,o.day,12)}function Qs(o){try{let t=new Intl.Locale(o),e=t.getWeekInfo?.().firstDay??t.weekInfo?.firstDay;return e&&e>=1&&e<=7?e:1}catch{return 1}}var Nl=Object.defineProperty,ge=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Nl(t,e,r),r},Hl=120,jl=50,_l=1e3,Mt=class extends c{constructor(){super(...arguments),this.liveId=q("kt-calendar-live"),this.focusCell=!1,this.focusYear=!1,this.typed="",this.typedAt=0,this.committing=!1,this.view="day",this.month={...At(),day:1},this.focused=At(),this.anchor=null,this.value=null,this.range=!1,this.min="",this.max="",this.locale="",this.months=1,this.label=""}static{this.styles=[c.styles,f`
1274
1274
  :host {
1275
1275
  display: inline-block;
1276
1276
  --day-size: 32px;
@@ -1517,7 +1517,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1517
1517
  text-decoration: line-through;
1518
1518
  cursor: not-allowed;
1519
1519
  }
1520
- `]}connectedCallback(){super.connectedCallback(),this.jumpTo(this.clamp(this.selection.start??At()),!1)}willUpdate(t){if(t.has("value")&&!this.committing&&this.hasUpdated){this.anchor=null;let e=this.selection.start;e&&this.jumpTo(this.clamp(e),!1)}this.committing=!1}updated(){this.view==="month"&&this.revealYear(this.focusYear),this.focusYear=!1,this.focusCell&&(this.focusCell=!1,this.shadowRoot?.querySelector('.cell[tabindex="0"]')?.focus())}revealYear(t){let e=this.shadowRoot?.querySelector(".years"),a=e?.querySelector('[aria-selected="true"]');if(!e||!a)return;let r=a.offsetTop-e.offsetTop;t?(e.scrollTop=r-(e.clientHeight-a.offsetHeight)/2,a.focus({preventScroll:!0})):r<e.scrollTop?e.scrollTop=r:r+a.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=r+a.offsetHeight-e.clientHeight)}focus(){this.focusCell=!0,this.requestUpdate()}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}get bounds(){return{min:lt(this.min),max:lt(this.max)}}clamp(t){let{min:e,max:a}=this.bounds;return e&&V(t,e)<0?e:a&&V(t,a)>0?a:t}isOutOfBounds(t){let{min:e,max:a}=this.bounds;return e!==null&&V(t,e)<0||a!==null&&V(t,a)>0}isSpanOutOfBounds(t,e){let{min:a,max:r}=this.bounds;return r!==null&&V(t,r)>0||a!==null&&V(e,a)<0}format(t,e){return Vt(this.resolvedLocale,t).format(Ra(e))}get monthSpan(){return this.months===2?2:1}jumpTo(t,e=!0){this.focused=t;let a=(t.year-this.month.year)*12+(t.month-this.month.month);a<0?this.month={year:t.year,month:t.month,day:1}:a>=this.monthSpan&&(this.month=Le({year:t.year,month:t.month,day:1},1-this.monthSpan)),this.focusCell=e}page(t){this.month=Le(this.month,t),this.focused=Le(this.focused,t)}setView(t){this.view=t,t==="month"?(this.focused={...this.month,day:this.focused.day},this.focusYear=!0):this.focusCell=!0}get yearRange(){let{min:t,max:e}=this.bounds,a=At().year;return{first:t?.year??a-Nl,last:e?.year??a+Hl}}chooseDay(t){if(this.isOutOfBounds(t))return;if(this.focused=t,!this.range){this.commit(tr(t));return}if(!this.anchor){this.anchor=t;return}let[e,a]=V(this.anchor,t)<=0?[this.anchor,t]:[t,this.anchor];this.anchor=null,this.commit(Ka(e,a))}commit(t){this.committing=!0,this.value=t,y(this,"kt-change",{value:t})}chooseMonth(t){let e=Math.min(this.focused.day,re(this.focused.year,t));this.jumpTo(this.clamp({year:this.focused.year,month:t,day:e})),this.setView("day")}chooseYear(t,e=!0){let{first:a,last:r}=this.yearRange,i=Math.min(Math.max(t,a),r),s=Math.min(this.focused.day,re(i,this.focused.month));this.focused={year:i,month:this.focused.month,day:s},this.focusYear=e}onYearKeyDown(t){let{year:e}=this.focused,{first:a,last:r}=this.yearRange;if(/^\d$/.test(t.key)){let i=Date.now();this.typed=i-this.typedAt>jl?t.key:this.typed+t.key,this.typedAt=i,this.typed.length===4&&(this.chooseYear(Number(this.typed)),this.typed=""),t.preventDefault();return}switch(t.key){case"ArrowUp":this.chooseYear(e-1);break;case"ArrowDown":this.chooseYear(e+1);break;case"PageUp":this.chooseYear(e-10);break;case"PageDown":this.chooseYear(e+10);break;case"Home":this.chooseYear(a);break;case"End":this.chooseYear(r);break;case"Enter":case" ":this.focusCell=!0,this.requestUpdate();break;case"Escape":t.stopPropagation(),this.setView("day");break;default:return}t.preventDefault()}onDayKeyDown(t){let e=Zs(this.resolvedLocale),a=this.focused,r;switch(t.key){case"ArrowLeft":r=Be(a,-1);break;case"ArrowRight":r=Be(a,1);break;case"ArrowUp":r=Be(a,-7);break;case"ArrowDown":r=Be(a,7);break;case"Home":r=zi(a,e);break;case"End":r=Be(zi(a,e),6);break;case"PageUp":r=Le(a,t.shiftKey?-12:-1);break;case"PageDown":r=Le(a,t.shiftKey?12:1);break;case"Enter":case" ":t.preventDefault(),this.chooseDay(a);return;default:return}t.preventDefault(),this.jumpTo(r)}onPickerKeyDown(t){let e=r=>Le(this.focused,r),a;switch(t.key){case"ArrowLeft":a=e(-1);break;case"ArrowRight":a=e(1);break;case"ArrowUp":a=e(-3);break;case"ArrowDown":a=e(3);break;case"PageUp":a=e(-12);break;case"PageDown":a=e(12);break;case"Enter":case" ":t.preventDefault(),this.chooseMonth(this.focused.month);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.setView("day");return;default:return}t.preventDefault(),this.focused=a,this.focusCell=!0}renderHeader(){let t=v(),e=this.view==="month",a=e?this.focused:this.month,r=l`<div class="navs">
1520
+ `]}connectedCallback(){super.connectedCallback(),this.jumpTo(this.clamp(this.selection.start??At()),!1)}willUpdate(t){if(t.has("value")&&!this.committing&&this.hasUpdated){this.anchor=null;let e=this.selection.start;e&&this.jumpTo(this.clamp(e),!1)}this.committing=!1}updated(){this.view==="month"&&this.revealYear(this.focusYear),this.focusYear=!1,this.focusCell&&(this.focusCell=!1,this.shadowRoot?.querySelector('.cell[tabindex="0"]')?.focus())}revealYear(t){let e=this.shadowRoot?.querySelector(".years"),a=e?.querySelector('[aria-selected="true"]');if(!e||!a)return;let r=a.offsetTop-e.offsetTop;t?(e.scrollTop=r-(e.clientHeight-a.offsetHeight)/2,a.focus({preventScroll:!0})):r<e.scrollTop?e.scrollTop=r:r+a.offsetHeight>e.scrollTop+e.clientHeight&&(e.scrollTop=r+a.offsetHeight-e.clientHeight)}focus(){this.focusCell=!0,this.requestUpdate()}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}get bounds(){return{min:lt(this.min),max:lt(this.max)}}clamp(t){let{min:e,max:a}=this.bounds;return e&&V(t,e)<0?e:a&&V(t,a)>0?a:t}isOutOfBounds(t){let{min:e,max:a}=this.bounds;return e!==null&&V(t,e)<0||a!==null&&V(t,a)>0}isSpanOutOfBounds(t,e){let{min:a,max:r}=this.bounds;return r!==null&&V(t,r)>0||a!==null&&V(e,a)<0}format(t,e){return Vt(this.resolvedLocale,t).format(Ra(e))}get monthSpan(){return this.months===2?2:1}jumpTo(t,e=!0){this.focused=t;let a=(t.year-this.month.year)*12+(t.month-this.month.month);a<0?this.month={year:t.year,month:t.month,day:1}:a>=this.monthSpan&&(this.month=Le({year:t.year,month:t.month,day:1},1-this.monthSpan)),this.focusCell=e}page(t){this.month=Le(this.month,t),this.focused=Le(this.focused,t)}setView(t){this.view=t,t==="month"?(this.focused={...this.month,day:this.focused.day},this.focusYear=!0):this.focusCell=!0}get yearRange(){let{min:t,max:e}=this.bounds,a=At().year;return{first:t?.year??a-Hl,last:e?.year??a+jl}}chooseDay(t){if(this.isOutOfBounds(t))return;if(this.focused=t,!this.range){this.commit(er(t));return}if(!this.anchor){this.anchor=t;return}let[e,a]=V(this.anchor,t)<=0?[this.anchor,t]:[t,this.anchor];this.anchor=null,this.commit(Ka(e,a))}commit(t){this.committing=!0,this.value=t,y(this,"kt-change",{value:t})}chooseMonth(t){let e=Math.min(this.focused.day,re(this.focused.year,t));this.jumpTo(this.clamp({year:this.focused.year,month:t,day:e})),this.setView("day")}chooseYear(t,e=!0){let{first:a,last:r}=this.yearRange,i=Math.min(Math.max(t,a),r),s=Math.min(this.focused.day,re(i,this.focused.month));this.focused={year:i,month:this.focused.month,day:s},this.focusYear=e}onYearKeyDown(t){let{year:e}=this.focused,{first:a,last:r}=this.yearRange;if(/^\d$/.test(t.key)){let i=Date.now();this.typed=i-this.typedAt>_l?t.key:this.typed+t.key,this.typedAt=i,this.typed.length===4&&(this.chooseYear(Number(this.typed)),this.typed=""),t.preventDefault();return}switch(t.key){case"ArrowUp":this.chooseYear(e-1);break;case"ArrowDown":this.chooseYear(e+1);break;case"PageUp":this.chooseYear(e-10);break;case"PageDown":this.chooseYear(e+10);break;case"Home":this.chooseYear(a);break;case"End":this.chooseYear(r);break;case"Enter":case" ":this.focusCell=!0,this.requestUpdate();break;case"Escape":t.stopPropagation(),this.setView("day");break;default:return}t.preventDefault()}onDayKeyDown(t){let e=Qs(this.resolvedLocale),a=this.focused,r;switch(t.key){case"ArrowLeft":r=Be(a,-1);break;case"ArrowRight":r=Be(a,1);break;case"ArrowUp":r=Be(a,-7);break;case"ArrowDown":r=Be(a,7);break;case"Home":r=qi(a,e);break;case"End":r=Be(qi(a,e),6);break;case"PageUp":r=Le(a,t.shiftKey?-12:-1);break;case"PageDown":r=Le(a,t.shiftKey?12:1);break;case"Enter":case" ":t.preventDefault(),this.chooseDay(a);return;default:return}t.preventDefault(),this.jumpTo(r)}onPickerKeyDown(t){let e=r=>Le(this.focused,r),a;switch(t.key){case"ArrowLeft":a=e(-1);break;case"ArrowRight":a=e(1);break;case"ArrowUp":a=e(-3);break;case"ArrowDown":a=e(3);break;case"PageUp":a=e(-12);break;case"PageDown":a=e(12);break;case"Enter":case" ":t.preventDefault(),this.chooseMonth(this.focused.month);return;case"Escape":t.preventDefault(),t.stopPropagation(),this.setView("day");return;default:return}t.preventDefault(),this.focused=a,this.focusCell=!0}renderHeader(){let t=v(),e=this.view==="month",a=e?this.focused:this.month,r=l`<div class="navs">
1521
1521
  <button type="button" class="nav" aria-label=${t.previousMonth} @click=${()=>this.page(-1)}>
1522
1522
  <kt-icon name="chevron-left" size="18"></kt-icon>
1523
1523
  </button>
@@ -1540,12 +1540,12 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1540
1540
  >
1541
1541
  ${r}
1542
1542
  </div>`:r}
1543
- </div>`}renderDay(t,e){let a=t.month!==e.month;if(a&&this.monthSpan===2)return l`<td class="blank" role="gridcell"></td>`;let{start:r,end:i}=this.selection,s=this.anchor??r,p=this.anchor?this.focused:i,[h,u]=s&&p&&V(s,p)>0?[p,s]:[s,p],m=this.range?Hr(t,h)||Hr(t,u):Hr(t,r),b=this.range&&h!==null&&u!==null&&ql(t,h,u),k=Hr(t,At());return l`<td
1543
+ </div>`}renderDay(t,e){let a=t.month!==e.month;if(a&&this.monthSpan===2)return l`<td class="blank" role="gridcell"></td>`;let{start:r,end:i}=this.selection,s=this.anchor??r,p=this.anchor?this.focused:i,[h,u]=s&&p&&V(s,p)>0?[p,s]:[s,p],m=this.range?_r(t,h)||_r(t,u):_r(t,r),b=this.range&&h!==null&&u!==null&&El(t,h,u),k=_r(t,At());return l`<td
1544
1544
  part="day"
1545
1545
  role="gridcell"
1546
- class=${w({cell:!0,outside:a,current:k,selected:m,"in-range":b,"range-start":b&&Hr(t,h),"range-end":b&&Hr(t,u)})}
1547
- data-date=${tr(t)}
1548
- tabindex=${Hr(t,this.focused)?0:-1}
1546
+ class=${w({cell:!0,outside:a,current:k,selected:m,"in-range":b,"range-start":b&&_r(t,h),"range-end":b&&_r(t,u)})}
1547
+ data-date=${er(t)}
1548
+ tabindex=${_r(t,this.focused)?0:-1}
1549
1549
  aria-selected=${m?"true":"false"}
1550
1550
  aria-disabled=${this.isOutOfBounds(t)?"true":d}
1551
1551
  aria-current=${k?"date":d}
@@ -1554,7 +1554,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1554
1554
  @pointerenter=${()=>{this.anchor&&(this.focused=t)}}
1555
1555
  >
1556
1556
  ${t.day}
1557
- </td>`}renderDays(){let t=Array.from({length:this.monthSpan},(e,a)=>this.renderMonth(Le(this.month,a)));return this.monthSpan===2?l`<div class="months">${t}</div>`:t[0]}renderMonth(t){let e=Fl(t.year,t.month,Zs(this.resolvedLocale));return l`<table
1557
+ </td>`}renderDays(){let t=Array.from({length:this.monthSpan},(e,a)=>this.renderMonth(Le(this.month,a)));return this.monthSpan===2?l`<div class="months">${t}</div>`:t[0]}renderMonth(t){let e=Ul(t.year,t.month,Qs(this.resolvedLocale));return l`<table
1558
1558
  role="grid"
1559
1559
  aria-label=${this.format({month:"long",year:"numeric"},t)}
1560
1560
  @keydown=${this.onDayKeyDown}
@@ -1614,7 +1614,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1614
1614
  <span id=${this.liveId} class="visually-hidden" aria-live="polite">${e}</span>
1615
1615
  ${this.renderHeader()}
1616
1616
  <div class="body">${this.view==="day"?this.renderDays():this.renderPicker()}</div>
1617
- </div>`}};fe([x()],Mt.prototype,"view");fe([x()],Mt.prototype,"month");fe([x()],Mt.prototype,"focused");fe([x()],Mt.prototype,"anchor");fe([n({type:String,reflect:!0})],Mt.prototype,"value");fe([n({type:Boolean,reflect:!0})],Mt.prototype,"range");fe([n({type:String})],Mt.prototype,"min");fe([n({type:String})],Mt.prototype,"max");fe([n({type:String})],Mt.prototype,"locale");fe([n({type:Number,reflect:!0})],Mt.prototype,"months");fe([n({type:String})],Mt.prototype,"label");g("kt-calendar",Mt);function _l(o,t,e){let a=o.length>=e.length?t:o+t;Number(a)>e.max&&(a=t);let r=a.length>=e.length||Number(a)*10>e.max;return{text:a,advance:r}}function Vl(o,t,e){let a=Math.abs(t)||1,r=e.min,i=e.min+Math.floor((e.max-e.min)/a)*a;if(o===null)return t>0?r:i;let s=o-e.min;if(t>0){let h=e.min+(Math.floor(s/a)+1)*a;return h>e.max?r:h}let p=s%a===0?o-a:e.min+Math.floor(s/a)*a;return p<e.min?i:p}function qi(o,t){return String(o).padStart(t.length,"0")}var Gl=Object.defineProperty,It=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Gl(t,e,r),r},Qs=o=>"key"in o,Wl=new Set(["/",".","-",":",","," "]),rt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.committing=!1,this.errorId=q("kt-segmented-error"),this.texts={},this.typedError="",this.focusedKey=null,this.formDisabled=!1,this.value=null,this.name="",this.label="",this.locale="",this.min="",this.max="",this.size="medium",this.disabled=!1,this.required=!1,this.error=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
1617
+ </div>`}};ge([x()],Mt.prototype,"view");ge([x()],Mt.prototype,"month");ge([x()],Mt.prototype,"focused");ge([x()],Mt.prototype,"anchor");ge([n({type:String,reflect:!0})],Mt.prototype,"value");ge([n({type:Boolean,reflect:!0})],Mt.prototype,"range");ge([n({type:String})],Mt.prototype,"min");ge([n({type:String})],Mt.prototype,"max");ge([n({type:String})],Mt.prototype,"locale");ge([n({type:Number,reflect:!0})],Mt.prototype,"months");ge([n({type:String})],Mt.prototype,"label");g("kt-calendar",Mt);function Vl(o,t,e){let a=o.length>=e.length?t:o+t;Number(a)>e.max&&(a=t);let r=a.length>=e.length||Number(a)*10>e.max;return{text:a,advance:r}}function Gl(o,t,e){let a=Math.abs(t)||1,r=e.min,i=e.min+Math.floor((e.max-e.min)/a)*a;if(o===null)return t>0?r:i;let s=o-e.min;if(t>0){let h=e.min+(Math.floor(s/a)+1)*a;return h>e.max?r:h}let p=s%a===0?o-a:e.min+Math.floor(s/a)*a;return p<e.min?i:p}function Ei(o,t){return String(o).padStart(t.length,"0")}var Wl=Object.defineProperty,It=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Wl(t,e,r),r},Js=o=>"key"in o,Yl=new Set(["/",".","-",":",","," "]),rt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.committing=!1,this.errorId=q("kt-segmented-error"),this.texts={},this.typedError="",this.focusedKey=null,this.formDisabled=!1,this.value=null,this.name="",this.label="",this.locale="",this.min="",this.max="",this.size="medium",this.disabled=!1,this.required=!1,this.error=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
1618
1618
  :host {
1619
1619
  display: block;
1620
1620
  --field-height: var(--button-height);
@@ -1699,7 +1699,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1699
1699
  flex: none;
1700
1700
  color: var(--color-danger-text);
1701
1701
  }
1702
- `]}renderAfter(){return d}completeOnBlur(t,e){return null}get expanded(){return!1}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,this.texts=this.fill(this.value)}willUpdate(t){if((t.has("value")||t.has("locale"))&&!this.committing&&(this.texts=this.fill(this.value),this.typedError=""),this.committing=!1,t.has("value")||t.has("required")||t.has("error")||t.has("typedError")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value===null&&!this.typedError;H(this.internals,{valueMissing:e,badInput:!!this.typedError,customError:!!this.error},this.error||this.typedError||(e?this.requiredMessage():""))}}formResetCallback(){this.value=this.defaultValue,this.texts=this.fill(this.value),this.typedError=""}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.segmentElements()[0]?.focus(t)}get inactive(){return this.disabled||this.formDisabled}get resolvedLocale(){return Te(this.locale)}commitValue(t){this.texts=this.fill(t),this.typedError="",this.apply(t)}setText(t,e){this.texts={...this.texts,[t]:e};let{value:a,error:r}=this.read(this.texts);this.typedError=r,this.apply(a)}apply(t){t!==this.value&&(this.committing=!0,this.value=t,y(this,"kt-change",{value:t}))}segmentElements(){return[...this.shadowRoot?.querySelectorAll('[role="spinbutton"]')??[]]}focusSegment(t){this.segmentElements()[t]?.focus()}applyKey(t,e,a){let r=this.texts[e.key]??"";if(/^\d$/.test(t)&&e.spec){let i=_l(r,t,e.spec);return this.setText(e.key,i.text),i.advance&&this.focusSegment(a+1),!0}if(e.choices&&/^\p{L}$/u.test(t)){let i=e.choices.findIndex(s=>s.toLowerCase().startsWith(t.toLowerCase()));return i>=0&&(this.setText(e.key,String(i)),this.focusSegment(a+1)),!0}switch(t){case"ArrowUp":case"ArrowDown":{let i=t==="ArrowUp"?1:-1;if(e.spec){let s=r===""?null:Number(r),p=Vl(s,i*(e.step??1),e.spec);this.setText(e.key,qi(p,e.spec))}else if(e.choices){let s=e.choices.length,p=r===""?i>0?-1:0:Number(r);this.setText(e.key,String((p+i+s)%s))}return!0}case"Home":case"End":if(e.spec){let i=t==="Home"?e.spec.min:e.spec.max;this.setText(e.key,qi(i,e.spec))}return!0;case"ArrowLeft":return this.focusSegment(a-1),!0;case"ArrowRight":return this.focusSegment(a+1),!0;case"Backspace":case"Delete":return r?this.setText(e.key,e.choices?"":r.slice(0,-1)):t==="Backspace"&&this.focusSegment(a-1),!0;default:return Wl.has(t)?(r&&this.focusSegment(a+1),!0):t.length===1}}onKeyDown(t,e,a){this.inactive||t.metaKey||t.ctrlKey||t.altKey||this.applyKey(t.key,e,a)&&t.preventDefault()}onBeforeInput(t,e,a){if(t.preventDefault(),!this.inactive){if(t.inputType.startsWith("delete")){this.applyKey("Backspace",e,a);return}for(let r of t.data??"")this.applyKey(r,e,a)}}onFieldClick(t){if(this.inactive||t.target.closest('[role="spinbutton"], button, kt-tooltip'))return;let e=this.items().filter(Qs),a=e.findIndex(r=>!this.texts[r.key]);this.focusSegment(a>=0?a:e.length-1)}renderSegment(t,e){let a=this.texts[t.key]??"",r=this.focusedKey===t.key,i=t.placeholder,s=d;return a!==""&&(s=Number(a),t.choices?i=t.choices[Number(a)]??"":t.spec&&(i=r?a:qi(Number(a),t.spec))),l`<span
1702
+ `]}renderAfter(){return d}completeOnBlur(t,e){return null}get expanded(){return!1}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,this.texts=this.fill(this.value)}willUpdate(t){if((t.has("value")||t.has("locale"))&&!this.committing&&(this.texts=this.fill(this.value),this.typedError=""),this.committing=!1,t.has("value")||t.has("required")||t.has("error")||t.has("typedError")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value===null&&!this.typedError;H(this.internals,{valueMissing:e,badInput:!!this.typedError,customError:!!this.error},this.error||this.typedError||(e?this.requiredMessage():""))}}formResetCallback(){this.value=this.defaultValue,this.texts=this.fill(this.value),this.typedError=""}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.segmentElements()[0]?.focus(t)}get inactive(){return this.disabled||this.formDisabled}get resolvedLocale(){return Te(this.locale)}commitValue(t){this.texts=this.fill(t),this.typedError="",this.apply(t)}setText(t,e){this.texts={...this.texts,[t]:e};let{value:a,error:r}=this.read(this.texts);this.typedError=r,this.apply(a)}apply(t){t!==this.value&&(this.committing=!0,this.value=t,y(this,"kt-change",{value:t}))}segmentElements(){return[...this.shadowRoot?.querySelectorAll('[role="spinbutton"]')??[]]}focusSegment(t){this.segmentElements()[t]?.focus()}applyKey(t,e,a){let r=this.texts[e.key]??"";if(/^\d$/.test(t)&&e.spec){let i=Vl(r,t,e.spec);return this.setText(e.key,i.text),i.advance&&this.focusSegment(a+1),!0}if(e.choices&&/^\p{L}$/u.test(t)){let i=e.choices.findIndex(s=>s.toLowerCase().startsWith(t.toLowerCase()));return i>=0&&(this.setText(e.key,String(i)),this.focusSegment(a+1)),!0}switch(t){case"ArrowUp":case"ArrowDown":{let i=t==="ArrowUp"?1:-1;if(e.spec){let s=r===""?null:Number(r),p=Gl(s,i*(e.step??1),e.spec);this.setText(e.key,Ei(p,e.spec))}else if(e.choices){let s=e.choices.length,p=r===""?i>0?-1:0:Number(r);this.setText(e.key,String((p+i+s)%s))}return!0}case"Home":case"End":if(e.spec){let i=t==="Home"?e.spec.min:e.spec.max;this.setText(e.key,Ei(i,e.spec))}return!0;case"ArrowLeft":return this.focusSegment(a-1),!0;case"ArrowRight":return this.focusSegment(a+1),!0;case"Backspace":case"Delete":return r?this.setText(e.key,e.choices?"":r.slice(0,-1)):t==="Backspace"&&this.focusSegment(a-1),!0;default:return Yl.has(t)?(r&&this.focusSegment(a+1),!0):t.length===1}}onKeyDown(t,e,a){this.inactive||t.metaKey||t.ctrlKey||t.altKey||this.applyKey(t.key,e,a)&&t.preventDefault()}onBeforeInput(t,e,a){if(t.preventDefault(),!this.inactive){if(t.inputType.startsWith("delete")){this.applyKey("Backspace",e,a);return}for(let r of t.data??"")this.applyKey(r,e,a)}}onFieldClick(t){if(this.inactive||t.target.closest('[role="spinbutton"], button, kt-tooltip'))return;let e=this.items().filter(Js),a=e.findIndex(r=>!this.texts[r.key]);this.focusSegment(a>=0?a:e.length-1)}renderSegment(t,e){let a=this.texts[t.key]??"",r=this.focusedKey===t.key,i=t.placeholder,s=d;return a!==""&&(s=Number(a),t.choices?i=t.choices[Number(a)]??"":t.spec&&(i=r?a:Ei(Number(a),t.spec))),l`<span
1703
1703
  part="segment"
1704
1704
  role="spinbutton"
1705
1705
  class=${w({segment:!0,empty:a===""})}
@@ -1732,13 +1732,13 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1732
1732
  @click=${this.onFieldClick}
1733
1733
  >
1734
1734
  <div class="segments">
1735
- ${this.items().map(a=>Qs(a)?(e+=1,this.renderSegment(a,e)):l`<span class="literal" aria-hidden="true">${a.literal}</span>`)}
1735
+ ${this.items().map(a=>Js(a)?(e+=1,this.renderSegment(a,e)):l`<span class="literal" aria-hidden="true">${a.literal}</span>`)}
1736
1736
  </div>
1737
1737
  ${t?l`<kt-tooltip class="error-icon" text=${t} ?open=${this.focusedKey!==null}>
1738
1738
  <kt-icon name="circle-alert" size="18"></kt-icon>
1739
1739
  </kt-tooltip>`:d}
1740
1740
  ${this.renderAfter()}
1741
- </div>`}};It([x()],rt.prototype,"texts");It([x()],rt.prototype,"typedError");It([x()],rt.prototype,"focusedKey");It([x()],rt.prototype,"formDisabled");It([n({type:String,reflect:!0})],rt.prototype,"value");It([n({type:String})],rt.prototype,"name");It([n({type:String})],rt.prototype,"label");It([n({type:String})],rt.prototype,"locale");It([n({type:String})],rt.prototype,"min");It([n({type:String})],rt.prototype,"max");It([n({type:String,reflect:!0})],rt.prototype,"size");It([n({type:Boolean,reflect:!0})],rt.prototype,"disabled");It([n({type:Boolean,reflect:!0})],rt.prototype,"required");It([n({type:String,reflect:!0})],rt.prototype,"error");function Ei(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").replace(/\.$/,"").toLowerCase()}function Js(o){let t=Vt(o,{day:"2-digit",month:"2-digit",year:"numeric"}).formatToParts(new Date(2026,8,30)).find(e=>e.type==="literal")?.value.trim()||"/";return{order:tn(o),separator:t}}function tn(o){let t=Vt(o,{day:"2-digit",month:"2-digit",year:"numeric"}).formatToParts(new Date(2026,8,30)).map(e=>e.type).filter(e=>["day","month","year"].includes(e));return t.length===3?t:["day","month","year"]}function Yl(o,t){let e=Ei(o);if(e.length<3)return null;let a=new Set;for(let r=1;r<=12;r+=1){let i=new Date(2026,r-1,1),s=Ei(Vt(t,{month:"long"}).format(i)),p=Ei(Vt(t,{month:"short"}).format(i));(s.startsWith(e)||p===e)&&a.add(r)}return a.size===1?[...a][0]:null}function Ii(o,t){if(o.length===4)return Number(o);if(o.length>2)return null;let e=2e3+Number(o);return e>t+20?e-100:e}function Fi(o,t,e){return t<1||t>12||e<1||e>re(o,t)?null:{year:o,month:t,day:e}}function Ui(o,t,e){let a=o.trim();if(!a)return null;let r=/^\d{4}-\d{1,2}-\d{1,2}$/.test(a)?lt(a.replace(/-(\d)(?=-|$)/g,"-0$1")):null;if(r)return{date:r,typedYear:!0};let i=[],s=null;for(let k of a.split(/[\s/.,-]+/).filter(Boolean)){if(/^\d+$/.test(k)){i.push(k);continue}let $=Yl(k,t);if($===null||s!==null)return null;s=$}if(s!==null){if(i.length===0||i.length>2)return null;let k=i.findIndex(P=>P.length===4||Number(P)>31),$=i.find((P,O)=>O!==k);if($===void 0||i.length===2&&k<0)return null;let D=k>=0?Ii(i[k],e.year):e.year;if(D===null)return null;let S=Fi(D,s,Number($));return S&&{date:S,typedYear:k>=0}}if(i.length<2||i.length>3)return null;let p=i[0].length===4?["year","month","day"]:Xl(tn(t),i.length),h=k=>i[p.indexOf(k)],u=h("year"),m=u===void 0?e.year:Ii(u,e.year);if(m===null)return null;let b=Fi(m,Number(h("month")),Number(h("day")));return b&&{date:b,typedYear:u!==void 0}}function Xl(o,t){return t===3?o:o.filter(e=>e!=="year")}function en(o,t){return Ii(o,t)}function rn(o,t,e){return Ui(o,t,e)?.date??null}function an(o,t,e){let a=o.split(/\s*[–—]\s*|\s+-\s+|\s+(?:to|au|bis|à)\s+/i);if(a.length!==2)return null;let r=Ui(a[1],t,e);if(!r)return null;let i=Ui(a[0],t,{...e,year:r.date.year});if(!i)return null;let s=i.date;if(!i.typedYear&&V(s,r.date)>0){let p=Fi(s.year-1,s.month,s.day);p&&(s=p)}return V(s,r.date)<=0?{start:s,end:r.date}:{start:r.date,end:s}}function So(o,t){return Vt(o,{day:"2-digit",month:"2-digit",year:"numeric"}).format(new Date(t.year,t.month-1,t.day,12))}var Zl=Object.defineProperty,ha=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Zl(t,e,r),r},Ql="kt-tooltip-description",Oe=class extends c{constructor(){super(...arguments),this.descriptionId=q("kt-tooltip"),this.visible=!1,this.text="",this.placement="top",this.open=!1,this.disabled=!1,this.show=()=>{!this.disabled&&this.text&&(this.visible=!0)},this.hide=()=>{this.visible=!1},this.onKeyDown=t=>{t.key==="Escape"&&this.visible&&(t.stopPropagation(),this.visible=!1)}}static{this.styles=[c.styles,f`
1741
+ </div>`}};It([x()],rt.prototype,"texts");It([x()],rt.prototype,"typedError");It([x()],rt.prototype,"focusedKey");It([x()],rt.prototype,"formDisabled");It([n({type:String,reflect:!0})],rt.prototype,"value");It([n({type:String})],rt.prototype,"name");It([n({type:String})],rt.prototype,"label");It([n({type:String})],rt.prototype,"locale");It([n({type:String})],rt.prototype,"min");It([n({type:String})],rt.prototype,"max");It([n({type:String,reflect:!0})],rt.prototype,"size");It([n({type:Boolean,reflect:!0})],rt.prototype,"disabled");It([n({type:Boolean,reflect:!0})],rt.prototype,"required");It([n({type:String,reflect:!0})],rt.prototype,"error");function Ii(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").replace(/\.$/,"").toLowerCase()}function tn(o){let t=Vt(o,{day:"2-digit",month:"2-digit",year:"numeric"}).formatToParts(new Date(2026,8,30)).find(e=>e.type==="literal")?.value.trim()||"/";return{order:en(o),separator:t}}function en(o){let t=Vt(o,{day:"2-digit",month:"2-digit",year:"numeric"}).formatToParts(new Date(2026,8,30)).map(e=>e.type).filter(e=>["day","month","year"].includes(e));return t.length===3?t:["day","month","year"]}function Xl(o,t){let e=Ii(o);if(e.length<3)return null;let a=new Set;for(let r=1;r<=12;r+=1){let i=new Date(2026,r-1,1),s=Ii(Vt(t,{month:"long"}).format(i)),p=Ii(Vt(t,{month:"short"}).format(i));(s.startsWith(e)||p===e)&&a.add(r)}return a.size===1?[...a][0]:null}function Fi(o,t){if(o.length===4)return Number(o);if(o.length>2)return null;let e=2e3+Number(o);return e>t+20?e-100:e}function Ui(o,t,e){return t<1||t>12||e<1||e>re(o,t)?null:{year:o,month:t,day:e}}function Ni(o,t,e){let a=o.trim();if(!a)return null;let r=/^\d{4}-\d{1,2}-\d{1,2}$/.test(a)?lt(a.replace(/-(\d)(?=-|$)/g,"-0$1")):null;if(r)return{date:r,typedYear:!0};let i=[],s=null;for(let k of a.split(/[\s/.,-]+/).filter(Boolean)){if(/^\d+$/.test(k)){i.push(k);continue}let $=Xl(k,t);if($===null||s!==null)return null;s=$}if(s!==null){if(i.length===0||i.length>2)return null;let k=i.findIndex(P=>P.length===4||Number(P)>31),$=i.find((P,O)=>O!==k);if($===void 0||i.length===2&&k<0)return null;let D=k>=0?Fi(i[k],e.year):e.year;if(D===null)return null;let S=Ui(D,s,Number($));return S&&{date:S,typedYear:k>=0}}if(i.length<2||i.length>3)return null;let p=i[0].length===4?["year","month","day"]:Zl(en(t),i.length),h=k=>i[p.indexOf(k)],u=h("year"),m=u===void 0?e.year:Fi(u,e.year);if(m===null)return null;let b=Ui(m,Number(h("month")),Number(h("day")));return b&&{date:b,typedYear:u!==void 0}}function Zl(o,t){return t===3?o:o.filter(e=>e!=="year")}function rn(o,t){return Fi(o,t)}function an(o,t,e){return Ni(o,t,e)?.date??null}function on(o,t,e){let a=o.split(/\s*[–—]\s*|\s+-\s+|\s+(?:to|au|bis|à)\s+/i);if(a.length!==2)return null;let r=Ni(a[1],t,e);if(!r)return null;let i=Ni(a[0],t,{...e,year:r.date.year});if(!i)return null;let s=i.date;if(!i.typedYear&&V(s,r.date)>0){let p=Ui(s.year-1,s.month,s.day);p&&(s=p)}return V(s,r.date)<=0?{start:s,end:r.date}:{start:r.date,end:s}}function So(o,t){return Vt(o,{day:"2-digit",month:"2-digit",year:"numeric"}).format(new Date(t.year,t.month-1,t.day,12))}var Ql=Object.defineProperty,ha=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ql(t,e,r),r},Jl="kt-tooltip-description",Oe=class extends c{constructor(){super(...arguments),this.descriptionId=q("kt-tooltip"),this.visible=!1,this.text="",this.placement="top",this.open=!1,this.disabled=!1,this.show=()=>{!this.disabled&&this.text&&(this.visible=!0)},this.hide=()=>{this.visible=!1},this.onKeyDown=t=>{t.key==="Escape"&&this.visible&&(t.stopPropagation(),this.visible=!1)}}static{this.styles=[c.styles,f`
1742
1742
  :host {
1743
1743
  position: relative;
1744
1744
  display: inline-flex;
@@ -1801,7 +1801,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1801
1801
  transition: none;
1802
1802
  }
1803
1803
  }
1804
- `]}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.show),this.addEventListener("pointerleave",this.hide),this.addEventListener("focusin",this.show),this.addEventListener("focusout",this.hide),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointerenter",this.show),this.removeEventListener("pointerleave",this.hide),this.removeEventListener("focusin",this.show),this.removeEventListener("focusout",this.hide),this.removeEventListener("keydown",this.onKeyDown),this.description?.remove(),this.visible=!1,this.closeBubble()}willUpdate(t){t.has("text")&&this.syncDescription()}get shown(){return(this.visible||this.open)&&!this.disabled&&!!this.text}updated(t){["visible","open","text","disabled"].some(e=>t.has(e))&&(this.shown?this.openBubble():this.closeBubble())}openBubble(){let t=this.bubble;if(typeof t.showPopover!="function")return;t.matches(":popover-open")||t.showPopover();let e=this.getBoundingClientRect(),{x:a,y:r}=wo(e,t.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight},this.placement);t.style.left=`${a}px`,t.style.top=`${r}px`,window.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),window.addEventListener("resize",this.hide)}closeBubble(){window.removeEventListener("scroll",this.hide,{capture:!0}),window.removeEventListener("resize",this.hide);let t=this.bubble;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}syncDescription(){if(!this.text){this.description?.remove(),this.description=void 0;return}this.description||(this.description=document.createElement("span"),this.description.id=this.descriptionId,this.description.slot=Ql,this.append(this.description)),this.description.textContent=this.text;for(let t of this.children)t!==this.description&&t.setAttribute("aria-describedby",this.descriptionId)}render(){return l`<slot @slotchange=${this.syncDescription}></slot>
1804
+ `]}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.show),this.addEventListener("pointerleave",this.hide),this.addEventListener("focusin",this.show),this.addEventListener("focusout",this.hide),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointerenter",this.show),this.removeEventListener("pointerleave",this.hide),this.removeEventListener("focusin",this.show),this.removeEventListener("focusout",this.hide),this.removeEventListener("keydown",this.onKeyDown),this.description?.remove(),this.visible=!1,this.closeBubble()}willUpdate(t){t.has("text")&&this.syncDescription()}get shown(){return(this.visible||this.open)&&!this.disabled&&!!this.text}updated(t){["visible","open","text","disabled"].some(e=>t.has(e))&&(this.shown?this.openBubble():this.closeBubble())}openBubble(){let t=this.bubble;if(typeof t.showPopover!="function")return;t.matches(":popover-open")||t.showPopover();let e=this.getBoundingClientRect(),{x:a,y:r}=wo(e,t.getBoundingClientRect(),{width:window.innerWidth,height:window.innerHeight},this.placement);t.style.left=`${a}px`,t.style.top=`${r}px`,window.addEventListener("scroll",this.hide,{capture:!0,passive:!0}),window.addEventListener("resize",this.hide)}closeBubble(){window.removeEventListener("scroll",this.hide,{capture:!0}),window.removeEventListener("resize",this.hide);let t=this.bubble;typeof t?.hidePopover=="function"&&t.matches(":popover-open")&&t.hidePopover()}syncDescription(){if(!this.text){this.description?.remove(),this.description=void 0;return}this.description||(this.description=document.createElement("span"),this.description.id=this.descriptionId,this.description.slot=Jl,this.append(this.description)),this.description.textContent=this.text;for(let t of this.children)t!==this.description&&t.setAttribute("aria-describedby",this.descriptionId)}render(){return l`<slot @slotchange=${this.syncDescription}></slot>
1805
1805
  <span
1806
1806
  part="bubble"
1807
1807
  popover="manual"
@@ -1809,7 +1809,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1809
1809
  role="tooltip"
1810
1810
  aria-hidden=${this.shown?"false":"true"}
1811
1811
  >${this.text}</span
1812
- >`}};ha([x()],Oe.prototype,"visible");ha([A(".bubble")],Oe.prototype,"bubble");ha([n({type:String})],Oe.prototype,"text");ha([n({type:String,reflect:!0})],Oe.prototype,"placement");ha([n({type:Boolean,reflect:!0})],Oe.prototype,"open");ha([n({type:Boolean,reflect:!0})],Oe.prototype,"disabled");g("kt-tooltip",Oe);var Jl=Object.defineProperty,Po=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Jl(t,e,r),r},kr=class extends rt{constructor(){super(...arguments),this.calendar=!1,this.open=!1,this.placement="bottom",this.panelId=q("kt-date-input-panel"),this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.shadowRoot?.querySelector(".field"),onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.close(!1)}}static{this.styles=[rt.styles,ht,f`
1812
+ >`}};ha([x()],Oe.prototype,"visible");ha([A(".bubble")],Oe.prototype,"bubble");ha([n({type:String})],Oe.prototype,"text");ha([n({type:String,reflect:!0})],Oe.prototype,"placement");ha([n({type:Boolean,reflect:!0})],Oe.prototype,"open");ha([n({type:Boolean,reflect:!0})],Oe.prototype,"disabled");g("kt-tooltip",Oe);var td=Object.defineProperty,Po=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&td(t,e,r),r},kr=class extends rt{constructor(){super(...arguments),this.calendar=!1,this.open=!1,this.placement="bottom",this.panelId=q("kt-date-input-panel"),this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.shadowRoot?.querySelector(".field"),onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.close(!1)}}static{this.styles=[rt.styles,ht,f`
1813
1813
  :host {
1814
1814
  position: relative;
1815
1815
  }
@@ -1872,7 +1872,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1872
1872
  opacity var(--duration-fast) var(--easing-standard),
1873
1873
  transform var(--duration-fast) var(--easing-standard);
1874
1874
  }
1875
- `]}items(){let t=v(),{order:e,separator:a}=Js(this.resolvedLocale),r=Number(this.texts.month)||0,i=this.texts.year?.length===4?Number(this.texts.year):2e3,s=r>=1&&r<=12?re(i,r):31,p={day:{key:"day",label:t.segmentDay,placeholder:t.placeholderDay,spec:{min:1,max:s,length:2}},month:{key:"month",label:t.segmentMonth,placeholder:t.placeholderMonth,spec:{min:1,max:12,length:2}},year:{key:"year",label:t.segmentYear,placeholder:t.placeholderYear,spec:{min:1,max:9999,length:4}}},h=[];return e.forEach((u,m)=>{m>0&&h.push({literal:a}),h.push(p[u])}),h}fill(t){let e=lt(t);return e?{day:String(e.day).padStart(2,"0"),month:String(e.month).padStart(2,"0"),year:String(e.year).padStart(4,"0")}:{day:"",month:"",year:""}}read(t){let{day:e="",month:a="",year:r=""}=t;if(!e||!a||r.length<4)return{value:null,error:""};let i=At(),s={value:null,error:v().dateInvalid(So(this.resolvedLocale,i))},p={year:Number(r),month:Number(a),day:Number(e)};if(p.month<1||p.month>12||p.day<1||p.day>re(p.year,p.month))return s;let h=lt(this.min),u=lt(this.max);return h&&V(p,h)<0||u&&V(p,u)>0?{value:null,error:v().dateOutOfRange}:{value:tr(p),error:""}}completeOnBlur(t,e){if(t.key!=="year"||e.length===0||e.length>2)return null;let a=en(e,At().year);return a===null?null:String(a).padStart(4,"0")}requiredMessage(){return v().dateRequired}get expanded(){return this.open}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}async toggleCalendar(){if(this.open){this.close(!0);return}this.inactive||(this.open=!0,await this.updateComplete,this.calendarElement?.focus())}close(t){this.open&&(this.open=!1,t&&this.focus())}onCalendarChange(t){t.stopPropagation(),this.commitValue(t.detail.value),this.close(!0)}onPanelKeyDown(t){t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.close(!0))}renderAfter(){if(!this.calendar)return d;let t=v();return l`<button
1875
+ `]}items(){let t=v(),{order:e,separator:a}=tn(this.resolvedLocale),r=Number(this.texts.month)||0,i=this.texts.year?.length===4?Number(this.texts.year):2e3,s=r>=1&&r<=12?re(i,r):31,p={day:{key:"day",label:t.segmentDay,placeholder:t.placeholderDay,spec:{min:1,max:s,length:2}},month:{key:"month",label:t.segmentMonth,placeholder:t.placeholderMonth,spec:{min:1,max:12,length:2}},year:{key:"year",label:t.segmentYear,placeholder:t.placeholderYear,spec:{min:1,max:9999,length:4}}},h=[];return e.forEach((u,m)=>{m>0&&h.push({literal:a}),h.push(p[u])}),h}fill(t){let e=lt(t);return e?{day:String(e.day).padStart(2,"0"),month:String(e.month).padStart(2,"0"),year:String(e.year).padStart(4,"0")}:{day:"",month:"",year:""}}read(t){let{day:e="",month:a="",year:r=""}=t;if(!e||!a||r.length<4)return{value:null,error:""};let i=At(),s={value:null,error:v().dateInvalid(So(this.resolvedLocale,i))},p={year:Number(r),month:Number(a),day:Number(e)};if(p.month<1||p.month>12||p.day<1||p.day>re(p.year,p.month))return s;let h=lt(this.min),u=lt(this.max);return h&&V(p,h)<0||u&&V(p,u)>0?{value:null,error:v().dateOutOfRange}:{value:er(p),error:""}}completeOnBlur(t,e){if(t.key!=="year"||e.length===0||e.length>2)return null;let a=rn(e,At().year);return a===null?null:String(a).padStart(4,"0")}requiredMessage(){return v().dateRequired}get expanded(){return this.open}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}async toggleCalendar(){if(this.open){this.close(!0);return}this.inactive||(this.open=!0,await this.updateComplete,this.calendarElement?.focus())}close(t){this.open&&(this.open=!1,t&&this.focus())}onCalendarChange(t){t.stopPropagation(),this.commitValue(t.detail.value),this.close(!0)}onPanelKeyDown(t){t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.close(!0))}renderAfter(){if(!this.calendar)return d;let t=v();return l`<button
1876
1876
  part="trigger"
1877
1877
  type="button"
1878
1878
  class="trigger"
@@ -1903,7 +1903,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
1903
1903
  label=${this.label}
1904
1904
  @kt-change=${this.onCalendarChange}
1905
1905
  ></kt-calendar>`:d}
1906
- </div>`}};Po([n({type:Boolean,reflect:!0})],kr.prototype,"calendar");Po([x()],kr.prototype,"open");Po([x()],kr.prototype,"placement");Po([A("kt-calendar")],kr.prototype,"calendarElement");g("kt-date-input",kr);var td=Object.defineProperty,G=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&td(t,e,r),r};function ed(){let o=v(),t=At(),e={...t,day:1},a=Le(e,-1),r=(i,s)=>Ka(i,s);return[{label:o.presetToday,value:r(t,t)},{label:o.presetLast7Days,value:r(Be(t,-6),t)},{label:o.presetLast30Days,value:r(Be(t,-29),t)},{label:o.presetThisMonth,value:r(e,t)},{label:o.presetLastMonth,value:r(a,{...a,day:re(a.year,a.month)})},{label:o.presetThisYear,value:r({year:t.year,month:1,day:1},t)}]}var _=class Ni extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.panelId=q("kt-date-picker-panel"),this.open=!1,this.text="",this.editing=!1,this.typedError="",this.focused=!1,this.compact=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.shadowRoot?.querySelector(".field"),onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.value=null,this.range=!1,this.min="",this.max="",this.name="",this.label="",this.placeholder=void 0,this.locale="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.clearable=!0,this.presets=void 0,this.error="",this.onDocumentPointerDown=t=>{this.open&&!t.composedPath().includes(this)&&this.close(!1)},this.onFocusOut=t=>{let e=t.relatedTarget;!this.open||!e||this.contains(e)||this.shadowRoot?.contains(e)||t.composedPath().includes(e)||this.calendar?.shadowRoot?.contains(e)||this.close(!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,f`
1906
+ </div>`}};Po([n({type:Boolean,reflect:!0})],kr.prototype,"calendar");Po([x()],kr.prototype,"open");Po([x()],kr.prototype,"placement");Po([A("kt-calendar")],kr.prototype,"calendarElement");g("kt-date-input",kr);var ed=Object.defineProperty,G=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ed(t,e,r),r};function rd(){let o=v(),t=At(),e={...t,day:1},a=Le(e,-1),r=(i,s)=>Ka(i,s);return[{label:o.presetToday,value:r(t,t)},{label:o.presetLast7Days,value:r(Be(t,-6),t)},{label:o.presetLast30Days,value:r(Be(t,-29),t)},{label:o.presetThisMonth,value:r(e,t)},{label:o.presetLastMonth,value:r(a,{...a,day:re(a.year,a.month)})},{label:o.presetThisYear,value:r({year:t.year,month:1,day:1},t)}]}var _=class Hi extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.panelId=q("kt-date-picker-panel"),this.open=!1,this.text="",this.editing=!1,this.typedError="",this.focused=!1,this.compact=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.shadowRoot?.querySelector(".field"),onPlace:t=>{this.placement=t==="top"?"top":"bottom"}}),this.value=null,this.range=!1,this.min="",this.max="",this.name="",this.label="",this.placeholder=void 0,this.locale="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.clearable=!0,this.presets=void 0,this.error="",this.onDocumentPointerDown=t=>{this.open&&!t.composedPath().includes(this)&&this.close(!1)},this.onFocusOut=t=>{let e=t.relatedTarget;!this.open||!e||this.contains(e)||this.shadowRoot?.contains(e)||t.composedPath().includes(e)||this.calendar?.shadowRoot?.contains(e)||this.close(!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,f`
1907
1907
  :host {
1908
1908
  position: relative;
1909
1909
  display: block;
@@ -2115,7 +2115,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2115
2115
  color: var(--color-primary-text);
2116
2116
  font-weight: 600;
2117
2117
  }
2118
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("range")||t.has("required")||t.has("error")||t.has("typedError")||this.stringsChanged(t)){let e=this.isComplete();B(this.internals,e?this.value:null);let a=this.required&&!e;H(this.internals,{valueMissing:a,badInput:!!this.typedError,customError:!!this.error},this.error||this.typedError||(a?v().dateRequired:""))}}formResetCallback(){this.value=this.defaultValue,this.editing=!1,this.typedError="",this.close(!1)}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.input?.focus(t)}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}isComplete(){let{start:t,end:e}=this.selection;return t!==null&&e!==null&&V(t,e)<=0}display(){let{start:t,end:e}=this.selection;if(!t||!e)return null;let a=Vt(this.resolvedLocale,{dateStyle:"medium"});return this.range?a.formatRange(Ra(t),Ra(e)):a.format(Ra(t))}static{this.WIDE_ENOUGH=720}async show(){this.inactive||this.open||(this.compact=window.innerWidth<Ni.WIDE_ENOUGH,this.open=!0,await this.updateComplete,this.calendar?.focus())}close(t){this.open&&(this.open=!1,t&&this.focus())}toggle(){this.open?this.close(!0):this.show()}openForTyping(){this.inactive||this.open||(this.compact=window.innerWidth<Ni.WIDE_ENOUGH,this.open=!0)}onCalendarChange(t){t.stopPropagation(),this.editing=!1,this.typedError="",this.value=t.detail.value,this.close(!0),y(this,"kt-change",{value:this.value})}apply(t){this.editing=!1,this.typedError="",this.close(!0),t!==this.value&&(this.value=t,y(this,"kt-change",{value:t}))}outOfBounds(t){let{start:e,end:a}=Co(t),r=lt(this.min),i=lt(this.max);return!e||!a?!0:r!==null&&V(e,r)<0||i!==null&&V(a,i)>0}renderPresets(){let t=this.presets??ed();return!this.range||t.length===0?d:l`<div
2118
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("range")||t.has("required")||t.has("error")||t.has("typedError")||this.stringsChanged(t)){let e=this.isComplete();B(this.internals,e?this.value:null);let a=this.required&&!e;H(this.internals,{valueMissing:a,badInput:!!this.typedError,customError:!!this.error},this.error||this.typedError||(a?v().dateRequired:""))}}formResetCallback(){this.value=this.defaultValue,this.editing=!1,this.typedError="",this.close(!1)}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.input?.focus(t)}get resolvedLocale(){return Te(this.locale)}get selection(){return this.range?Co(this.value):{start:lt(this.value),end:lt(this.value)}}isComplete(){let{start:t,end:e}=this.selection;return t!==null&&e!==null&&V(t,e)<=0}display(){let{start:t,end:e}=this.selection;if(!t||!e)return null;let a=Vt(this.resolvedLocale,{dateStyle:"medium"});return this.range?a.formatRange(Ra(t),Ra(e)):a.format(Ra(t))}static{this.WIDE_ENOUGH=720}async show(){this.inactive||this.open||(this.compact=window.innerWidth<Hi.WIDE_ENOUGH,this.open=!0,await this.updateComplete,this.calendar?.focus())}close(t){this.open&&(this.open=!1,t&&this.focus())}toggle(){this.open?this.close(!0):this.show()}openForTyping(){this.inactive||this.open||(this.compact=window.innerWidth<Hi.WIDE_ENOUGH,this.open=!0)}onCalendarChange(t){t.stopPropagation(),this.editing=!1,this.typedError="",this.value=t.detail.value,this.close(!0),y(this,"kt-change",{value:this.value})}apply(t){this.editing=!1,this.typedError="",this.close(!0),t!==this.value&&(this.value=t,y(this,"kt-change",{value:t}))}outOfBounds(t){let{start:e,end:a}=Co(t),r=lt(this.min),i=lt(this.max);return!e||!a?!0:r!==null&&V(e,r)<0||i!==null&&V(a,i)>0}renderPresets(){let t=this.presets??rd();return!this.range||t.length===0?d:l`<div
2119
2119
  part="presets"
2120
2120
  class="presets"
2121
2121
  role="group"
@@ -2129,7 +2129,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2129
2129
  >
2130
2130
  ${e.label}
2131
2131
  </button>`)}
2132
- </div>`}clear(){this.editing=!1,this.typedError="",this.value=null,y(this,"kt-change",{value:null}),this.focus()}onInput(t){this.text=t.target.value,this.editing=!0}commitTyped(){if(!this.editing)return;this.editing=!1;let t=this.text.trim();if(!t){this.typedError="",this.value!==null&&(this.value=null,y(this,"kt-change",{value:null}));return}let e=this.resolvedLocale,a=At(),r=this.range?an(t,e,a):(()=>{let h=rn(t,e,a);return h&&{start:h,end:h}})();if(!r){this.text=t,this.editing=!0,this.typedError=v().dateInvalid(So(e,a));return}let i=lt(this.min),s=lt(this.max);if(i&&V(r.start,i)<0||s&&V(r.end,s)>0){this.text=t,this.editing=!0,this.typedError=v().dateOutOfRange;return}this.typedError="";let p=this.range?Ka(r.start,r.end):tr(r.start);p!==this.value&&(this.value=p,y(this,"kt-change",{value:p}))}onInputKeyDown(t){switch(t.key){case"Enter":t.preventDefault(),this.commitTyped(),this.typedError||this.close(!1);return;case"Escape":if(!this.editing&&!this.open)return;t.preventDefault(),t.stopPropagation(),this.editing=!1,this.typedError="",this.close(!1);return;case"ArrowDown":t.preventDefault(),this.show()}}onPanelKeyDown(t){t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.close(!0))}render(){let t=v(),e=this.display(),a=this.placeholder??(this.range?t.selectPeriod:t.selectDate),r=this.error||this.typedError,i=this.clearable&&this.value!==null&&!this.inactive&&!this.editing&&!r;return l`${r?l`<span id="error-message" class="visually-hidden">${r}</span>`:d}
2132
+ </div>`}clear(){this.editing=!1,this.typedError="",this.value=null,y(this,"kt-change",{value:null}),this.focus()}onInput(t){this.text=t.target.value,this.editing=!0}commitTyped(){if(!this.editing)return;this.editing=!1;let t=this.text.trim();if(!t){this.typedError="",this.value!==null&&(this.value=null,y(this,"kt-change",{value:null}));return}let e=this.resolvedLocale,a=At(),r=this.range?on(t,e,a):(()=>{let h=an(t,e,a);return h&&{start:h,end:h}})();if(!r){this.text=t,this.editing=!0,this.typedError=v().dateInvalid(So(e,a));return}let i=lt(this.min),s=lt(this.max);if(i&&V(r.start,i)<0||s&&V(r.end,s)>0){this.text=t,this.editing=!0,this.typedError=v().dateOutOfRange;return}this.typedError="";let p=this.range?Ka(r.start,r.end):er(r.start);p!==this.value&&(this.value=p,y(this,"kt-change",{value:p}))}onInputKeyDown(t){switch(t.key){case"Enter":t.preventDefault(),this.commitTyped(),this.typedError||this.close(!1);return;case"Escape":if(!this.editing&&!this.open)return;t.preventDefault(),t.stopPropagation(),this.editing=!1,this.typedError="",this.close(!1);return;case"ArrowDown":t.preventDefault(),this.show()}}onPanelKeyDown(t){t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.close(!0))}render(){let t=v(),e=this.display(),a=this.placeholder??(this.range?t.selectPeriod:t.selectDate),r=this.error||this.typedError,i=this.clearable&&this.value!==null&&!this.inactive&&!this.editing&&!r;return l`${r?l`<span id="error-message" class="visually-hidden">${r}</span>`:d}
2133
2133
  <div
2134
2134
  class=${w({open:this.open,error:!!r})}
2135
2135
  @focusout=${this.onFocusOut}
@@ -2202,7 +2202,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2202
2202
  type="button"
2203
2203
  class="today"
2204
2204
  ?disabled=${this.outOfBounds(Ka(At(),At()))}
2205
- @click=${()=>this.apply(tr(At()))}
2205
+ @click=${()=>this.apply(er(At()))}
2206
2206
  >
2207
2207
  ${t.presetToday}
2208
2208
  </button>
@@ -2210,7 +2210,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2210
2210
  </div>
2211
2211
  </div>`:d}
2212
2212
  </div>
2213
- </div>`}};G([A("input")],_.prototype,"input");G([A("kt-calendar")],_.prototype,"calendar");G([x()],_.prototype,"open");G([x()],_.prototype,"text");G([x()],_.prototype,"editing");G([x()],_.prototype,"typedError");G([x()],_.prototype,"focused");G([x()],_.prototype,"compact");G([x()],_.prototype,"placement");G([n({type:String,reflect:!0})],_.prototype,"value");G([n({type:Boolean,reflect:!0})],_.prototype,"range");G([n({type:String})],_.prototype,"min");G([n({type:String})],_.prototype,"max");G([n({type:String})],_.prototype,"name");G([n({type:String})],_.prototype,"label");G([n({type:String})],_.prototype,"placeholder");G([n({type:String})],_.prototype,"locale");G([n({type:String,reflect:!0})],_.prototype,"size");G([n({type:Boolean,reflect:!0})],_.prototype,"disabled");G([x()],_.prototype,"formDisabled");G([n({type:Boolean,reflect:!0})],_.prototype,"required");G([n({type:Boolean})],_.prototype,"clearable");G([n({attribute:!1})],_.prototype,"presets");G([n({type:String,reflect:!0})],_.prototype,"error");var on=_;g("kt-date-picker",on);var sn=["B","KB","MB","GB","TB"];function rd(o){if(!Number.isFinite(o)||o<0)return"";let t=o,e=0;for(;t>=1024&&e<sn.length-1;)t/=1024,e+=1;return`${e===0?String(Math.round(t)):t.toFixed(1)} ${sn[e]}`}var ad=Object.defineProperty,Gt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ad(t,e,r),r},mt=class extends c{constructor(){super(...arguments),this.internals=null,this.dragging=!1,this.files=[],this.heading=void 0,this.linkText=void 0,this.recommendedSize="",this.multiple=!0,this.accept="",this.maxSize=0,this.disabled=!1,this.formDisabled=!1,this.name="",this.required=!1}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
2213
+ </div>`}};G([A("input")],_.prototype,"input");G([A("kt-calendar")],_.prototype,"calendar");G([x()],_.prototype,"open");G([x()],_.prototype,"text");G([x()],_.prototype,"editing");G([x()],_.prototype,"typedError");G([x()],_.prototype,"focused");G([x()],_.prototype,"compact");G([x()],_.prototype,"placement");G([n({type:String,reflect:!0})],_.prototype,"value");G([n({type:Boolean,reflect:!0})],_.prototype,"range");G([n({type:String})],_.prototype,"min");G([n({type:String})],_.prototype,"max");G([n({type:String})],_.prototype,"name");G([n({type:String})],_.prototype,"label");G([n({type:String})],_.prototype,"placeholder");G([n({type:String})],_.prototype,"locale");G([n({type:String,reflect:!0})],_.prototype,"size");G([n({type:Boolean,reflect:!0})],_.prototype,"disabled");G([x()],_.prototype,"formDisabled");G([n({type:Boolean,reflect:!0})],_.prototype,"required");G([n({type:Boolean})],_.prototype,"clearable");G([n({attribute:!1})],_.prototype,"presets");G([n({type:String,reflect:!0})],_.prototype,"error");var sn=_;g("kt-date-picker",sn);var nn=["B","KB","MB","GB","TB"];function ad(o){if(!Number.isFinite(o)||o<0)return"";let t=o,e=0;for(;t>=1024&&e<nn.length-1;)t/=1024,e+=1;return`${e===0?String(Math.round(t)):t.toFixed(1)} ${nn[e]}`}var od=Object.defineProperty,Gt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&od(t,e,r),r},mt=class extends c{constructor(){super(...arguments),this.internals=null,this.dragging=!1,this.files=[],this.heading=void 0,this.linkText=void 0,this.recommendedSize="",this.multiple=!0,this.accept="",this.maxSize=0,this.disabled=!1,this.formDisabled=!1,this.name="",this.required=!1}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
2214
2214
  :host {
2215
2215
  display: block;
2216
2216
  user-select: none;
@@ -2333,7 +2333,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2333
2333
  color: var(--text-muted);
2334
2334
  font: var(--font-normal-small);
2335
2335
  }
2336
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this)}willUpdate(t){(t.has("files")||t.has("name")||t.has("required")||this.stringsChanged(t))&&this.syncFormValue()}syncFormValue(){let t=null;if(this.name&&this.files.length>0){t=new FormData;for(let a of this.files)t.append(this.name,a)}B(this.internals,t);let e=this.required&&this.files.length===0;H(this.internals,{valueMissing:e},e?v().selectFile:"")}formResetCallback(){this.files=[],this.dragging=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){!(t instanceof FormData)||!this.name||(this.files=t.getAll(this.name).filter(e=>e instanceof File))}get selectedFiles(){return this.files}clear(){this.files=[],y(this,"kt-files-change",{files:this.files})}accepts(t){return this.maxSize>0&&t.size>this.maxSize?!1:this.accept?this.accept.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?t.name.toLowerCase().endsWith(e):e.endsWith("/*")?t.type.startsWith(e.slice(0,-1)):t.type.toLowerCase()===e):!0}addFiles(t){if(!t||t.length===0)return;let e=this.multiple?[...t]:[...t].slice(0,1),a=e.filter(i=>this.accepts(i)),r=e.filter(i=>!this.accepts(i));r.length>0&&y(this,"kt-files-rejected",{files:r,reason:this.maxSize>0&&r.some(i=>i.size>this.maxSize)?"size":"type"}),a.length!==0&&(this.files=this.multiple?[...this.files,...a]:a,y(this,"kt-files-change",{files:this.files}))}removeAt(t){this.files=this.files.filter((e,a)=>a!==t),y(this,"kt-files-change",{files:this.files})}browse(){this.inactive||this.fileInput?.click()}onZoneKeyDown(t){t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),this.browse())}onDragOver(t){this.inactive||(t.preventDefault(),this.dragging=!0)}onDrop(t){this.inactive||(t.preventDefault(),this.dragging=!1,this.addFiles(t.dataTransfer?.files??null))}render(){return l`<div
2336
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this)}willUpdate(t){(t.has("files")||t.has("name")||t.has("required")||this.stringsChanged(t))&&this.syncFormValue()}syncFormValue(){let t=null;if(this.name&&this.files.length>0){t=new FormData;for(let a of this.files)t.append(this.name,a)}B(this.internals,t);let e=this.required&&this.files.length===0;H(this.internals,{valueMissing:e},e?v().selectFile:"")}formResetCallback(){this.files=[],this.dragging=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){!(t instanceof FormData)||!this.name||(this.files=t.getAll(this.name).filter(e=>e instanceof File))}get selectedFiles(){return this.files}clear(){this.files=[],y(this,"kt-files-change",{files:this.files})}accepts(t){return this.maxSize>0&&t.size>this.maxSize?!1:this.accept?this.accept.split(",").map(e=>e.trim().toLowerCase()).filter(Boolean).some(e=>e.startsWith(".")?t.name.toLowerCase().endsWith(e):e.endsWith("/*")?t.type.startsWith(e.slice(0,-1)):t.type.toLowerCase()===e):!0}addFiles(t){if(!t||t.length===0)return;let e=this.multiple?[...t]:[...t].slice(0,1),a=e.filter(i=>this.accepts(i)),r=e.filter(i=>!this.accepts(i));r.length>0&&y(this,"kt-files-rejected",{files:r,reason:this.maxSize>0&&r.some(i=>i.size>this.maxSize)?"size":"type"}),a.length!==0&&(this.files=this.multiple?[...this.files,...a]:a,y(this,"kt-files-change",{files:this.files}))}removeAt(t){this.files=this.files.filter((e,a)=>a!==t),y(this,"kt-files-change",{files:this.files})}browse(){this.inactive||this.fileInput?.click()}onZoneKeyDown(t){t.key!=="Enter"&&t.key!==" "||(t.preventDefault(),this.browse())}onDragOver(t){this.inactive||(t.preventDefault(),this.dragging=!0)}onDrop(t){this.inactive||(t.preventDefault(),this.dragging=!1,this.addFiles(t.dataTransfer?.files??null))}render(){return l`<div
2337
2337
  part="base"
2338
2338
  class=${w({zone:!0,dragover:this.dragging})}
2339
2339
  role="button"
@@ -2375,7 +2375,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2375
2375
  <span class="info">
2376
2376
  <span class="name" title=${t.name}>${t.name}</span>
2377
2377
  <span class="details">
2378
- <span>${rd(t.size)}</span>
2378
+ <span>${ad(t.size)}</span>
2379
2379
  ${t.type?l`<span>•</span><span>${t.type}</span>`:d}
2380
2380
  </span>
2381
2381
  </span>
@@ -2388,7 +2388,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2388
2388
  ></kt-button>
2389
2389
  </li>`)}
2390
2390
  </ul>`:d}
2391
- </div>`}};Gt([A('input[type="file"]')],mt.prototype,"fileInput");Gt([x()],mt.prototype,"dragging");Gt([x()],mt.prototype,"files");Gt([n({type:String})],mt.prototype,"heading");Gt([n({type:String,attribute:"link-text"})],mt.prototype,"linkText");Gt([n({type:String,attribute:"recommended-size"})],mt.prototype,"recommendedSize");Gt([n({type:Boolean})],mt.prototype,"multiple");Gt([n({type:String})],mt.prototype,"accept");Gt([n({type:Number,attribute:"max-size"})],mt.prototype,"maxSize");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"disabled");Gt([x()],mt.prototype,"formDisabled");Gt([n({type:String})],mt.prototype,"name");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"required");g("kt-drag-drop",mt);var od=Object.defineProperty,za=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&od(t,e,r),r},id={text:"14px",rect:"80px",circle:"40px"},er=class extends c{constructor(){super(...arguments),this.variant="text",this.width="",this.height="",this.count=1,this.animated=!0}static{this.styles=[c.styles,f`
2391
+ </div>`}};Gt([A('input[type="file"]')],mt.prototype,"fileInput");Gt([x()],mt.prototype,"dragging");Gt([x()],mt.prototype,"files");Gt([n({type:String})],mt.prototype,"heading");Gt([n({type:String,attribute:"link-text"})],mt.prototype,"linkText");Gt([n({type:String,attribute:"recommended-size"})],mt.prototype,"recommendedSize");Gt([n({type:Boolean})],mt.prototype,"multiple");Gt([n({type:String})],mt.prototype,"accept");Gt([n({type:Number,attribute:"max-size"})],mt.prototype,"maxSize");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"disabled");Gt([x()],mt.prototype,"formDisabled");Gt([n({type:String})],mt.prototype,"name");Gt([n({type:Boolean,reflect:!0})],mt.prototype,"required");g("kt-drag-drop",mt);var id=Object.defineProperty,qa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&id(t,e,r),r},sd={text:"14px",rect:"80px",circle:"40px"},rr=class extends c{constructor(){super(...arguments),this.variant="text",this.width="",this.height="",this.count=1,this.animated=!0}static{this.styles=[c.styles,f`
2392
2392
  :host {
2393
2393
  display: block;
2394
2394
  }
@@ -2435,11 +2435,11 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2435
2435
  `]}line(t,e){let a=e&&this.count>1&&this.variant==="text";return l`<span
2436
2436
  part="line"
2437
2437
  class=${w({line:!0,[this.variant]:!0,pulse:this.animated})}
2438
- style=${ct({width:a?"60%":this.width||(this.variant==="circle"?"40px":"100%"),height:this.height||id[this.variant]})}
2438
+ style=${ct({width:a?"60%":this.width||(this.variant==="circle"?"40px":"100%"),height:this.height||sd[this.variant]})}
2439
2439
  data-index=${t}
2440
2440
  ></span>`}render(){return this.count<=1?this.line(0,!1):l`<span class="group">
2441
2441
  ${Array.from({length:this.count},(t,e)=>this.line(e,e===this.count-1))}
2442
- </span>`}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}};za([n({type:String,reflect:!0})],er.prototype,"variant");za([n({type:String})],er.prototype,"width");za([n({type:String})],er.prototype,"height");za([n({type:Number})],er.prototype,"count");za([n({type:Boolean})],er.prototype,"animated");g("kt-skeleton",er);var sd=Object.defineProperty,jr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&sd(t,e,r),r},me=class extends c{constructor(){super(...arguments),this.hasFooter=!1,this.heading="",this.description="",this.loading=!1,this.disabled=!1,this.loadingFields=3}static{this.styles=[c.styles,f`
2442
+ </span>`}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}};qa([n({type:String,reflect:!0})],rr.prototype,"variant");qa([n({type:String})],rr.prototype,"width");qa([n({type:String})],rr.prototype,"height");qa([n({type:Number})],rr.prototype,"count");qa([n({type:Boolean})],rr.prototype,"animated");g("kt-skeleton",rr);var nd=Object.defineProperty,Vr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&nd(t,e,r),r},ve=class extends c{constructor(){super(...arguments),this.hasFooter=!1,this.heading="",this.description="",this.loading=!1,this.disabled=!1,this.loadingFields=3}static{this.styles=[c.styles,f`
2443
2443
  :host {
2444
2444
  display: block;
2445
2445
  }
@@ -2541,7 +2541,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2541
2541
  <div part="footer" class=${this.hasFooter?"footer":"footer empty"}>
2542
2542
  <slot name="footer" @slotchange=${this.onFooterSlotChange}></slot>
2543
2543
  </div>
2544
- </fieldset>`}};jr([na()],me.prototype,"fields");jr([x()],me.prototype,"hasFooter");jr([n({type:String})],me.prototype,"heading");jr([n({type:String})],me.prototype,"description");jr([n({type:Boolean,reflect:!0})],me.prototype,"loading");jr([n({type:Boolean,reflect:!0})],me.prototype,"disabled");jr([n({type:Number,attribute:"loading-fields"})],me.prototype,"loadingFields");g("kt-form",me);var nd=[{id:"al",name:"Albania",dialCode:"355",format:"67 212 3456",trunkPrefix:"0"},{id:"dz",name:"Algeria",dialCode:"213",format:"551 23 45 67",trunkPrefix:"0"},{id:"ao",name:"Angola",dialCode:"244",format:"923 123 456"},{id:"ar",name:"Argentina",dialCode:"54",format:"11 2345 6789",trunkPrefix:"0"},{id:"au",name:"Australia",dialCode:"61",format:"412 345 678",trunkPrefix:"0"},{id:"at",name:"Austria",dialCode:"43",format:"664 1234567",trunkPrefix:"0"},{id:"bd",name:"Bangladesh",dialCode:"880",format:"1812 345678",trunkPrefix:"0"},{id:"be",name:"Belgium",dialCode:"32",format:"1 23 45 67 89",trunkPrefix:"0"},{id:"bo",name:"Bolivia",dialCode:"591",format:"7123 4567",trunkPrefix:"0"},{id:"br",name:"Brazil",dialCode:"55",format:"11 91234 5678",trunkPrefix:"0"},{id:"bg",name:"Bulgaria",dialCode:"359",format:"87 123 4567",trunkPrefix:"0"},{id:"cm",name:"Cameroon",dialCode:"237",format:"6 71 23 45 67"},{id:"ca",name:"Canada",dialCode:"1",format:"506-234-5678",trunkPrefix:"1"},{id:"cl",name:"Chile",dialCode:"56",format:"9 1234 5678"},{id:"cn",name:"China",dialCode:"86",format:"131 2345 6789",trunkPrefix:"0"},{id:"co",name:"Colombia",dialCode:"57",format:"321 123 4567",trunkPrefix:"0"},{id:"cr",name:"Costa Rica",dialCode:"506",format:"8312 3456"},{id:"ci",name:"C\xF4te d'Ivoire",dialCode:"225",format:"01 23 45 67 89"},{id:"hr",name:"Croatia",dialCode:"385",format:"91 234 5678",trunkPrefix:"0"},{id:"cy",name:"Cyprus",dialCode:"357",format:"96 123456"},{id:"cz",name:"Czechia",dialCode:"420",format:"601 123 456"},{id:"dk",name:"Denmark",dialCode:"45",format:"32 12 34 56"},{id:"cd",name:"DR Congo",dialCode:"243",format:"991 234 567",trunkPrefix:"0"},{id:"ec",name:"Ecuador",dialCode:"593",format:"99 123 4567",trunkPrefix:"0"},{id:"eg",name:"Egypt",dialCode:"20",format:"100 123 4567",trunkPrefix:"0"},{id:"ee",name:"Estonia",dialCode:"372",format:"5123 4567"},{id:"et",name:"Ethiopia",dialCode:"251",format:"91 123 4567",trunkPrefix:"0"},{id:"fi",name:"Finland",dialCode:"358",format:"41 234 5678",trunkPrefix:"0"},{id:"fr",name:"France",dialCode:"33",format:"1 23 45 67 89",trunkPrefix:"0"},{id:"ge",name:"Georgia",dialCode:"995",format:"555 123 456",trunkPrefix:"0"},{id:"de",name:"Germany",dialCode:"49",format:"1234 567890",trunkPrefix:"0"},{id:"gh",name:"Ghana",dialCode:"233",format:"23 123 4567",trunkPrefix:"0"},{id:"gr",name:"Greece",dialCode:"30",format:"691 234 5678"},{id:"gt",name:"Guatemala",dialCode:"502",format:"5123 4567"},{id:"hk",name:"Hong Kong",dialCode:"852",format:"5123 4567"},{id:"hu",name:"Hungary",dialCode:"36",format:"20 123 4567",trunkPrefix:"06"},{id:"is",name:"Iceland",dialCode:"354",format:"611 1234"},{id:"in",name:"India",dialCode:"91",format:"81234 56789",trunkPrefix:"0"},{id:"id",name:"Indonesia",dialCode:"62",format:"812 3456 7890",trunkPrefix:"0"},{id:"ir",name:"Iran",dialCode:"98",format:"912 345 6789",trunkPrefix:"0"},{id:"iq",name:"Iraq",dialCode:"964",format:"791 234 5678",trunkPrefix:"0"},{id:"ie",name:"Ireland",dialCode:"353",format:"85 123 4567",trunkPrefix:"0"},{id:"il",name:"Israel",dialCode:"972",format:"50 234 5678",trunkPrefix:"0"},{id:"it",name:"Italy",dialCode:"39",format:"312 345 6789"},{id:"jp",name:"Japan",dialCode:"81",format:"90 1234 5678",trunkPrefix:"0"},{id:"jo",name:"Jordan",dialCode:"962",format:"7 9012 3456",trunkPrefix:"0"},{id:"kz",name:"Kazakhstan",dialCode:"7",format:"771 000 9998"},{id:"ke",name:"Kenya",dialCode:"254",format:"712 123456",trunkPrefix:"0"},{id:"lv",name:"Latvia",dialCode:"371",format:"2123 4567"},{id:"lb",name:"Lebanon",dialCode:"961",format:"71 123 456",trunkPrefix:"0"},{id:"lt",name:"Lithuania",dialCode:"370",format:"612 34567",trunkPrefix:"0"},{id:"lu",name:"Luxembourg",dialCode:"352",format:"628 123 456"},{id:"my",name:"Malaysia",dialCode:"60",format:"12 345 6789",trunkPrefix:"0"},{id:"mx",name:"Mexico",dialCode:"52",format:"55 1234 5678"},{id:"ma",name:"Morocco",dialCode:"212",format:"650 123456",trunkPrefix:"0"},{id:"np",name:"Nepal",dialCode:"977",format:"984 1234567",trunkPrefix:"0"},{id:"nl",name:"Netherlands",dialCode:"31",format:"6 12345678",trunkPrefix:"0"},{id:"nz",name:"New Zealand",dialCode:"64",format:"21 123 4567",trunkPrefix:"0"},{id:"ng",name:"Nigeria",dialCode:"234",format:"802 123 4567",trunkPrefix:"0"},{id:"mk",name:"North Macedonia",dialCode:"389",format:"72 345 678",trunkPrefix:"0"},{id:"no",name:"Norway",dialCode:"47",format:"406 12 345"},{id:"pk",name:"Pakistan",dialCode:"92",format:"301 2345678",trunkPrefix:"0"},{id:"pa",name:"Panama",dialCode:"507",format:"6123 4567"},{id:"pe",name:"Peru",dialCode:"51",format:"912 345 678",trunkPrefix:"0"},{id:"ph",name:"Philippines",dialCode:"63",format:"905 123 4567",trunkPrefix:"0"},{id:"pl",name:"Poland",dialCode:"48",format:"512 345 678"},{id:"pt",name:"Portugal",dialCode:"351",format:"912 345 678"},{id:"qa",name:"Qatar",dialCode:"974",format:"3312 3456"},{id:"ro",name:"Romania",dialCode:"40",format:"712 034 567",trunkPrefix:"0"},{id:"ru",name:"Russia",dialCode:"7",format:"912 345 67 89"},{id:"sa",name:"Saudi Arabia",dialCode:"966",format:"51 234 5678",trunkPrefix:"0"},{id:"sn",name:"Senegal",dialCode:"221",format:"70 123 45 67"},{id:"rs",name:"Serbia",dialCode:"381",format:"60 123 4567",trunkPrefix:"0"},{id:"sg",name:"Singapore",dialCode:"65",format:"8123 4567"},{id:"sk",name:"Slovakia",dialCode:"421",format:"912 123 456",trunkPrefix:"0"},{id:"si",name:"Slovenia",dialCode:"386",format:"31 234 567",trunkPrefix:"0"},{id:"za",name:"South Africa",dialCode:"27",format:"71 123 4567",trunkPrefix:"0"},{id:"kr",name:"South Korea",dialCode:"82",format:"10 1234 5678",trunkPrefix:"0"},{id:"es",name:"Spain",dialCode:"34",format:"612 34 56 78"},{id:"lk",name:"Sri Lanka",dialCode:"94",format:"71 234 5678",trunkPrefix:"0"},{id:"se",name:"Sweden",dialCode:"46",format:"70 123 45 67",trunkPrefix:"0"},{id:"ch",name:"Switzerland",dialCode:"41",format:"12 345 67 89",trunkPrefix:"0"},{id:"tw",name:"Taiwan",dialCode:"886",format:"912 345 678",trunkPrefix:"0"},{id:"tz",name:"Tanzania",dialCode:"255",format:"621 234 567",trunkPrefix:"0"},{id:"th",name:"Thailand",dialCode:"66",format:"81 234 5678",trunkPrefix:"0"},{id:"tn",name:"Tunisia",dialCode:"216",format:"20 123 456"},{id:"tr",name:"T\xFCrkiye",dialCode:"90",format:"501 234 56 78",trunkPrefix:"0"},{id:"ug",name:"Uganda",dialCode:"256",format:"712 345678",trunkPrefix:"0"},{id:"ua",name:"Ukraine",dialCode:"380",format:"50 123 4567",trunkPrefix:"0"},{id:"ae",name:"United Arab Emirates",dialCode:"971",format:"50 123 4567",trunkPrefix:"0"},{id:"gb",name:"United Kingdom",dialCode:"44",format:"7123 456789",trunkPrefix:"0"},{id:"us",name:"United States",dialCode:"1",format:"201-555-0123",trunkPrefix:"1"},{id:"uy",name:"Uruguay",dialCode:"598",format:"94 231 234",trunkPrefix:"0"},{id:"ve",name:"Venezuela",dialCode:"58",format:"412 123 4567",trunkPrefix:"0"},{id:"vn",name:"Vietnam",dialCode:"84",format:"91 234 5678",trunkPrefix:"0"}],ld=127462,dd=65;function nn(o){return/^[a-z]{2}$/i.test(o)?String.fromCodePoint(...[...o.toUpperCase()].map(t=>ld+t.charCodeAt(0)-dd)):""}function pd(o){return o.replace(/\D/g,"")}function cd(o,t){if(!o)return"";let e=t?(t.format.match(/\d+/g)??[]).map(i=>i.length):[],a=[],r=o;for(let i of e){if(!r)break;a.push(r.slice(0,i)),r=r.slice(i)}if(e.length>0)r&&a.push(r);else for(;r;)a.push(r.slice(0,3)),r=r.slice(3);return a.join(" ")}function hd(o,t){let e=t?.trunkPrefix;return e&&o.startsWith(e)?e:void 0}function ln(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function ud(o,t){let e=ln(t.trim());if(!e)return o;let a=e.replace(/^\+/,"");return o.filter(r=>ln(r.name).includes(e)||a!==""&&r.dialCode.startsWith(a)||r.id===e)}var fd=Object.defineProperty,X=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&fd(t,e,r),r},Ao=18,md=/^([a-z]{2}):(\d*)$/,F=class extends c{constructor(){super(...arguments),this.internals=null,this.passwordVisible=!1,this.countryOpen=!1,this.countryQuery="",this.focused=!1,this.errorDismissed=!1,this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".country-panel"),anchor:()=>this.shadowRoot?.querySelector(".field")}),this.value="",this.name="",this.type="text",this.placeholder="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.readonly=!1,this.required=!1,this.icon="",this.error="",this.clearable=!0,this.label="",this.autocomplete="",this.countries=nd,this.country="us",this.defaultValue="",this.closeCountryPanel=t=>{t.composedPath().includes(this)||(this.countryOpen=!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,f`
2544
+ </fieldset>`}};Vr([na()],ve.prototype,"fields");Vr([x()],ve.prototype,"hasFooter");Vr([n({type:String})],ve.prototype,"heading");Vr([n({type:String})],ve.prototype,"description");Vr([n({type:Boolean,reflect:!0})],ve.prototype,"loading");Vr([n({type:Boolean,reflect:!0})],ve.prototype,"disabled");Vr([n({type:Number,attribute:"loading-fields"})],ve.prototype,"loadingFields");g("kt-form",ve);var ld=[{id:"al",name:"Albania",dialCode:"355",format:"67 212 3456",trunkPrefix:"0"},{id:"dz",name:"Algeria",dialCode:"213",format:"551 23 45 67",trunkPrefix:"0"},{id:"ao",name:"Angola",dialCode:"244",format:"923 123 456"},{id:"ar",name:"Argentina",dialCode:"54",format:"11 2345 6789",trunkPrefix:"0"},{id:"au",name:"Australia",dialCode:"61",format:"412 345 678",trunkPrefix:"0"},{id:"at",name:"Austria",dialCode:"43",format:"664 1234567",trunkPrefix:"0"},{id:"bd",name:"Bangladesh",dialCode:"880",format:"1812 345678",trunkPrefix:"0"},{id:"be",name:"Belgium",dialCode:"32",format:"1 23 45 67 89",trunkPrefix:"0"},{id:"bo",name:"Bolivia",dialCode:"591",format:"7123 4567",trunkPrefix:"0"},{id:"br",name:"Brazil",dialCode:"55",format:"11 91234 5678",trunkPrefix:"0"},{id:"bg",name:"Bulgaria",dialCode:"359",format:"87 123 4567",trunkPrefix:"0"},{id:"cm",name:"Cameroon",dialCode:"237",format:"6 71 23 45 67"},{id:"ca",name:"Canada",dialCode:"1",format:"506-234-5678",trunkPrefix:"1"},{id:"cl",name:"Chile",dialCode:"56",format:"9 1234 5678"},{id:"cn",name:"China",dialCode:"86",format:"131 2345 6789",trunkPrefix:"0"},{id:"co",name:"Colombia",dialCode:"57",format:"321 123 4567",trunkPrefix:"0"},{id:"cr",name:"Costa Rica",dialCode:"506",format:"8312 3456"},{id:"ci",name:"C\xF4te d'Ivoire",dialCode:"225",format:"01 23 45 67 89"},{id:"hr",name:"Croatia",dialCode:"385",format:"91 234 5678",trunkPrefix:"0"},{id:"cy",name:"Cyprus",dialCode:"357",format:"96 123456"},{id:"cz",name:"Czechia",dialCode:"420",format:"601 123 456"},{id:"dk",name:"Denmark",dialCode:"45",format:"32 12 34 56"},{id:"cd",name:"DR Congo",dialCode:"243",format:"991 234 567",trunkPrefix:"0"},{id:"ec",name:"Ecuador",dialCode:"593",format:"99 123 4567",trunkPrefix:"0"},{id:"eg",name:"Egypt",dialCode:"20",format:"100 123 4567",trunkPrefix:"0"},{id:"ee",name:"Estonia",dialCode:"372",format:"5123 4567"},{id:"et",name:"Ethiopia",dialCode:"251",format:"91 123 4567",trunkPrefix:"0"},{id:"fi",name:"Finland",dialCode:"358",format:"41 234 5678",trunkPrefix:"0"},{id:"fr",name:"France",dialCode:"33",format:"1 23 45 67 89",trunkPrefix:"0"},{id:"ge",name:"Georgia",dialCode:"995",format:"555 123 456",trunkPrefix:"0"},{id:"de",name:"Germany",dialCode:"49",format:"1234 567890",trunkPrefix:"0"},{id:"gh",name:"Ghana",dialCode:"233",format:"23 123 4567",trunkPrefix:"0"},{id:"gr",name:"Greece",dialCode:"30",format:"691 234 5678"},{id:"gt",name:"Guatemala",dialCode:"502",format:"5123 4567"},{id:"hk",name:"Hong Kong",dialCode:"852",format:"5123 4567"},{id:"hu",name:"Hungary",dialCode:"36",format:"20 123 4567",trunkPrefix:"06"},{id:"is",name:"Iceland",dialCode:"354",format:"611 1234"},{id:"in",name:"India",dialCode:"91",format:"81234 56789",trunkPrefix:"0"},{id:"id",name:"Indonesia",dialCode:"62",format:"812 3456 7890",trunkPrefix:"0"},{id:"ir",name:"Iran",dialCode:"98",format:"912 345 6789",trunkPrefix:"0"},{id:"iq",name:"Iraq",dialCode:"964",format:"791 234 5678",trunkPrefix:"0"},{id:"ie",name:"Ireland",dialCode:"353",format:"85 123 4567",trunkPrefix:"0"},{id:"il",name:"Israel",dialCode:"972",format:"50 234 5678",trunkPrefix:"0"},{id:"it",name:"Italy",dialCode:"39",format:"312 345 6789"},{id:"jp",name:"Japan",dialCode:"81",format:"90 1234 5678",trunkPrefix:"0"},{id:"jo",name:"Jordan",dialCode:"962",format:"7 9012 3456",trunkPrefix:"0"},{id:"kz",name:"Kazakhstan",dialCode:"7",format:"771 000 9998"},{id:"ke",name:"Kenya",dialCode:"254",format:"712 123456",trunkPrefix:"0"},{id:"lv",name:"Latvia",dialCode:"371",format:"2123 4567"},{id:"lb",name:"Lebanon",dialCode:"961",format:"71 123 456",trunkPrefix:"0"},{id:"lt",name:"Lithuania",dialCode:"370",format:"612 34567",trunkPrefix:"0"},{id:"lu",name:"Luxembourg",dialCode:"352",format:"628 123 456"},{id:"my",name:"Malaysia",dialCode:"60",format:"12 345 6789",trunkPrefix:"0"},{id:"mx",name:"Mexico",dialCode:"52",format:"55 1234 5678"},{id:"ma",name:"Morocco",dialCode:"212",format:"650 123456",trunkPrefix:"0"},{id:"np",name:"Nepal",dialCode:"977",format:"984 1234567",trunkPrefix:"0"},{id:"nl",name:"Netherlands",dialCode:"31",format:"6 12345678",trunkPrefix:"0"},{id:"nz",name:"New Zealand",dialCode:"64",format:"21 123 4567",trunkPrefix:"0"},{id:"ng",name:"Nigeria",dialCode:"234",format:"802 123 4567",trunkPrefix:"0"},{id:"mk",name:"North Macedonia",dialCode:"389",format:"72 345 678",trunkPrefix:"0"},{id:"no",name:"Norway",dialCode:"47",format:"406 12 345"},{id:"pk",name:"Pakistan",dialCode:"92",format:"301 2345678",trunkPrefix:"0"},{id:"pa",name:"Panama",dialCode:"507",format:"6123 4567"},{id:"pe",name:"Peru",dialCode:"51",format:"912 345 678",trunkPrefix:"0"},{id:"ph",name:"Philippines",dialCode:"63",format:"905 123 4567",trunkPrefix:"0"},{id:"pl",name:"Poland",dialCode:"48",format:"512 345 678"},{id:"pt",name:"Portugal",dialCode:"351",format:"912 345 678"},{id:"qa",name:"Qatar",dialCode:"974",format:"3312 3456"},{id:"ro",name:"Romania",dialCode:"40",format:"712 034 567",trunkPrefix:"0"},{id:"ru",name:"Russia",dialCode:"7",format:"912 345 67 89"},{id:"sa",name:"Saudi Arabia",dialCode:"966",format:"51 234 5678",trunkPrefix:"0"},{id:"sn",name:"Senegal",dialCode:"221",format:"70 123 45 67"},{id:"rs",name:"Serbia",dialCode:"381",format:"60 123 4567",trunkPrefix:"0"},{id:"sg",name:"Singapore",dialCode:"65",format:"8123 4567"},{id:"sk",name:"Slovakia",dialCode:"421",format:"912 123 456",trunkPrefix:"0"},{id:"si",name:"Slovenia",dialCode:"386",format:"31 234 567",trunkPrefix:"0"},{id:"za",name:"South Africa",dialCode:"27",format:"71 123 4567",trunkPrefix:"0"},{id:"kr",name:"South Korea",dialCode:"82",format:"10 1234 5678",trunkPrefix:"0"},{id:"es",name:"Spain",dialCode:"34",format:"612 34 56 78"},{id:"lk",name:"Sri Lanka",dialCode:"94",format:"71 234 5678",trunkPrefix:"0"},{id:"se",name:"Sweden",dialCode:"46",format:"70 123 45 67",trunkPrefix:"0"},{id:"ch",name:"Switzerland",dialCode:"41",format:"12 345 67 89",trunkPrefix:"0"},{id:"tw",name:"Taiwan",dialCode:"886",format:"912 345 678",trunkPrefix:"0"},{id:"tz",name:"Tanzania",dialCode:"255",format:"621 234 567",trunkPrefix:"0"},{id:"th",name:"Thailand",dialCode:"66",format:"81 234 5678",trunkPrefix:"0"},{id:"tn",name:"Tunisia",dialCode:"216",format:"20 123 456"},{id:"tr",name:"T\xFCrkiye",dialCode:"90",format:"501 234 56 78",trunkPrefix:"0"},{id:"ug",name:"Uganda",dialCode:"256",format:"712 345678",trunkPrefix:"0"},{id:"ua",name:"Ukraine",dialCode:"380",format:"50 123 4567",trunkPrefix:"0"},{id:"ae",name:"United Arab Emirates",dialCode:"971",format:"50 123 4567",trunkPrefix:"0"},{id:"gb",name:"United Kingdom",dialCode:"44",format:"7123 456789",trunkPrefix:"0"},{id:"us",name:"United States",dialCode:"1",format:"201-555-0123",trunkPrefix:"1"},{id:"uy",name:"Uruguay",dialCode:"598",format:"94 231 234",trunkPrefix:"0"},{id:"ve",name:"Venezuela",dialCode:"58",format:"412 123 4567",trunkPrefix:"0"},{id:"vn",name:"Vietnam",dialCode:"84",format:"91 234 5678",trunkPrefix:"0"}],dd=127462,pd=65;function ln(o){return/^[a-z]{2}$/i.test(o)?String.fromCodePoint(...[...o.toUpperCase()].map(t=>dd+t.charCodeAt(0)-pd)):""}function cd(o){return o.replace(/\D/g,"")}function hd(o,t){if(!o)return"";let e=t?(t.format.match(/\d+/g)??[]).map(i=>i.length):[],a=[],r=o;for(let i of e){if(!r)break;a.push(r.slice(0,i)),r=r.slice(i)}if(e.length>0)r&&a.push(r);else for(;r;)a.push(r.slice(0,3)),r=r.slice(3);return a.join(" ")}function ud(o,t){let e=t?.trunkPrefix;return e&&o.startsWith(e)?e:void 0}function dn(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function fd(o,t){let e=dn(t.trim());if(!e)return o;let a=e.replace(/^\+/,"");return o.filter(r=>dn(r.name).includes(e)||a!==""&&r.dialCode.startsWith(a)||r.id===e)}var md=Object.defineProperty,X=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&md(t,e,r),r},Ao=18,gd=/^([a-z]{2}):(\d*)$/,F=class extends c{constructor(){super(...arguments),this.internals=null,this.passwordVisible=!1,this.countryOpen=!1,this.countryQuery="",this.focused=!1,this.errorDismissed=!1,this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".country-panel"),anchor:()=>this.shadowRoot?.querySelector(".field")}),this.value="",this.name="",this.type="text",this.placeholder="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.readonly=!1,this.required=!1,this.icon="",this.error="",this.clearable=!0,this.label="",this.autocomplete="",this.countries=ld,this.country="us",this.defaultValue="",this.closeCountryPanel=t=>{t.composedPath().includes(this)||(this.countryOpen=!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,f`
2545
2545
  :host {
2546
2546
  display: block;
2547
2547
  }
@@ -2767,7 +2767,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2767
2767
  color: var(--text-muted);
2768
2768
  font: var(--font-normal-small);
2769
2769
  }
2770
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.internals??=R(this),this.defaultValue=this.value,B(this.internals,this.formValue,this.formState)}updated(t){t.has("countryOpen")&&N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.floating.sync(this.countryOpen)}willUpdate(t){(t.has("value")||t.has("required")||t.has("error")||t.has("country")||t.has("countries")||t.has("type")||this.stringsChanged(t))&&(B(this.internals,this.formValue,this.formState),this.refreshValidity())}refreshValidity(){let t=this.required&&this.value.length===0,e=this.phoneError,a=this.error||e||(t?v().required:"");H(this.internals,{valueMissing:t,patternMismatch:!!e,customError:!!this.error},a)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeCountryPanel)}formResetCallback(){this.value=this.defaultValue,this.passwordVisible=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){let e=md.exec(t);this.isPhone&&e?(this.country=e[1],this.value=e[2]):this.value=t}focus(t){this.input?.focus(t)}blur(){this.input?.blur()}select(){this.input?.select()}get isPhone(){return this.type==="tel"}get selectedCountry(){return this.countries.find(t=>t.id===this.country)}get formValue(){return!this.isPhone||!this.value?this.value:`+${this.selectedCountry?.dialCode??""}${this.value}`}get formState(){return this.isPhone?`${this.country}:${this.value}`:void 0}get phoneError(){if(!this.isPhone)return"";let t=hd(this.value,this.selectedCountry);return t?v().phoneTrunkPrefix(t):""}get shownError(){return this.error||this.phoneError}get displayValue(){return this.isPhone?cd(this.value,this.selectedCountry):this.value}get showClear(){return this.clearable&&this.value.length>0&&!this.readonly&&!this.inactive}get resolvedType(){return this.isPhone?"text":this.type!=="password"?this.type:this.passwordVisible?"text":"password"}onInput(t){let e=t.target.value;this.value=this.isPhone?pd(e):e,y(this,"kt-input",{value:this.value})}toggleCountryPanel(){this.countryOpen=!this.countryOpen,this.countryQuery=""}selectCountry(t){this.country=t.id,this.countryOpen=!1,this.countryQuery="",y(this,"kt-country-change",{country:t.id,dialCode:t.dialCode}),this.focus()}onCountryKeyDown(t){t.key==="Escape"&&this.countryOpen&&(t.stopPropagation(),this.countryOpen=!1,this.shadowRoot?.querySelector(".country")?.focus())}renderCountryPicker(){let t=this.selectedCountry,e=ud(this.countries,this.countryQuery);return l`<button
2770
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.internals??=K(this),this.defaultValue=this.value,B(this.internals,this.formValue,this.formState)}updated(t){t.has("countryOpen")&&N(this.countryOpen,document,"pointerdown",this.closeCountryPanel),this.floating.sync(this.countryOpen)}willUpdate(t){(t.has("value")||t.has("required")||t.has("error")||t.has("country")||t.has("countries")||t.has("type")||this.stringsChanged(t))&&(B(this.internals,this.formValue,this.formState),this.refreshValidity())}refreshValidity(){let t=this.required&&this.value.length===0,e=this.phoneError,a=this.error||e||(t?v().required:"");H(this.internals,{valueMissing:t,patternMismatch:!!e,customError:!!this.error},a)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.closeCountryPanel)}formResetCallback(){this.value=this.defaultValue,this.passwordVisible=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){let e=gd.exec(t);this.isPhone&&e?(this.country=e[1],this.value=e[2]):this.value=t}focus(t){this.input?.focus(t)}blur(){this.input?.blur()}select(){this.input?.select()}get isPhone(){return this.type==="tel"}get selectedCountry(){return this.countries.find(t=>t.id===this.country)}get formValue(){return!this.isPhone||!this.value?this.value:`+${this.selectedCountry?.dialCode??""}${this.value}`}get formState(){return this.isPhone?`${this.country}:${this.value}`:void 0}get phoneError(){if(!this.isPhone)return"";let t=ud(this.value,this.selectedCountry);return t?v().phoneTrunkPrefix(t):""}get shownError(){return this.error||this.phoneError}get displayValue(){return this.isPhone?hd(this.value,this.selectedCountry):this.value}get showClear(){return this.clearable&&this.value.length>0&&!this.readonly&&!this.inactive}get resolvedType(){return this.isPhone?"text":this.type!=="password"?this.type:this.passwordVisible?"text":"password"}onInput(t){let e=t.target.value;this.value=this.isPhone?cd(e):e,y(this,"kt-input",{value:this.value})}toggleCountryPanel(){this.countryOpen=!this.countryOpen,this.countryQuery=""}selectCountry(t){this.country=t.id,this.countryOpen=!1,this.countryQuery="",y(this,"kt-country-change",{country:t.id,dialCode:t.dialCode}),this.focus()}onCountryKeyDown(t){t.key==="Escape"&&this.countryOpen&&(t.stopPropagation(),this.countryOpen=!1,this.shadowRoot?.querySelector(".country")?.focus())}renderCountryPicker(){let t=this.selectedCountry,e=fd(this.countries,this.countryQuery);return l`<button
2771
2771
  type="button"
2772
2772
  class="country"
2773
2773
  aria-haspopup="listbox"
@@ -2776,7 +2776,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2776
2776
  ?disabled=${this.inactive||this.readonly}
2777
2777
  @click=${this.toggleCountryPanel}
2778
2778
  >
2779
- <span aria-hidden="true">${nn(this.country)}</span>
2779
+ <span aria-hidden="true">${ln(this.country)}</span>
2780
2780
  <span class="dial">+${t?.dialCode??""}</span>
2781
2781
  <span class=${w({chevron:!0,open:this.countryOpen})}>
2782
2782
  <kt-icon name="chevron-down" size="14"></kt-icon>
@@ -2801,7 +2801,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2801
2801
  aria-selected=${a.id===this.country?"true":"false"}
2802
2802
  @click=${()=>this.selectCountry(a)}
2803
2803
  >
2804
- <span aria-hidden="true">${nn(a.id)}</span>
2804
+ <span aria-hidden="true">${ln(a.id)}</span>
2805
2805
  <span class="country-name">${a.name}</span>
2806
2806
  <span class="dial">+${a.dialCode}</span>
2807
2807
  </li>`)}
@@ -2871,7 +2871,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2871
2871
  </button>
2872
2872
  </kt-tooltip>`:d}
2873
2873
  </div>`:d}
2874
- </div>`}};X([A("input")],F.prototype,"input");X([x()],F.prototype,"passwordVisible");X([x()],F.prototype,"countryOpen");X([x()],F.prototype,"countryQuery");X([x()],F.prototype,"focused");X([x()],F.prototype,"errorDismissed");X([n({type:String})],F.prototype,"value");X([n({type:String})],F.prototype,"name");X([n({type:String})],F.prototype,"type");X([n({type:String})],F.prototype,"placeholder");X([n({type:String,reflect:!0})],F.prototype,"size");X([n({type:Boolean,reflect:!0})],F.prototype,"disabled");X([x()],F.prototype,"formDisabled");X([n({type:Boolean,reflect:!0})],F.prototype,"readonly");X([n({type:Boolean,reflect:!0})],F.prototype,"required");X([n({type:String})],F.prototype,"icon");X([n({type:String,reflect:!0})],F.prototype,"error");X([n({type:Boolean})],F.prototype,"clearable");X([n({type:String})],F.prototype,"label");X([n({type:String})],F.prototype,"autocomplete");X([n({type:Number})],F.prototype,"maxlength");X([n({attribute:!1})],F.prototype,"countries");X([n({type:String})],F.prototype,"country");g("kt-input",F);var gd=Object.defineProperty,Dt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&gd(t,e,r),r},dt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.listId=q("kt-input-menu-list"),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".popup"),anchor:()=>this.shadowRoot?.querySelector(".control"),matchWidth:!0,onPlace:t=>{this.placement=t}}),this.query="",this.activeIndex=-1,this.options=[],this.value=null,this.placeholder="",this.name="",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.error="",this.label="",this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.close()}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,da,f`
2874
+ </div>`}};X([A("input")],F.prototype,"input");X([x()],F.prototype,"passwordVisible");X([x()],F.prototype,"countryOpen");X([x()],F.prototype,"countryQuery");X([x()],F.prototype,"focused");X([x()],F.prototype,"errorDismissed");X([n({type:String})],F.prototype,"value");X([n({type:String})],F.prototype,"name");X([n({type:String})],F.prototype,"type");X([n({type:String})],F.prototype,"placeholder");X([n({type:String,reflect:!0})],F.prototype,"size");X([n({type:Boolean,reflect:!0})],F.prototype,"disabled");X([x()],F.prototype,"formDisabled");X([n({type:Boolean,reflect:!0})],F.prototype,"readonly");X([n({type:Boolean,reflect:!0})],F.prototype,"required");X([n({type:String})],F.prototype,"icon");X([n({type:String,reflect:!0})],F.prototype,"error");X([n({type:Boolean})],F.prototype,"clearable");X([n({type:String})],F.prototype,"label");X([n({type:String})],F.prototype,"autocomplete");X([n({type:Number})],F.prototype,"maxlength");X([n({attribute:!1})],F.prototype,"countries");X([n({type:String})],F.prototype,"country");g("kt-input",F);var vd=Object.defineProperty,Dt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&vd(t,e,r),r},dt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.listId=q("kt-input-menu-list"),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".popup"),anchor:()=>this.shadowRoot?.querySelector(".control"),matchWidth:!0,onPlace:t=>{this.placement=t}}),this.query="",this.activeIndex=-1,this.options=[],this.value=null,this.placeholder="",this.name="",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.error="",this.label="",this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.close()}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,da,f`
2875
2875
  :host {
2876
2876
  position: relative;
2877
2877
  display: block;
@@ -2970,7 +2970,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
2970
2970
  .open .toggle {
2971
2971
  transform: scaleY(-1);
2972
2972
  }
2973
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}formResetCallback(){this.value=this.defaultValue,this.close()}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.input?.focus(t)}get selectedOption(){return this.options.find(t=>t.id===this.value)}get visibleOptions(){return yo(this.options,this.query)}get displayValue(){if(this.open&&this.query)return this.query;let t=this.selectedOption;return t?$t(t):this.query}openList(){this.inactive||this.open||(this.open=!0,this.activeIndex=Et(this.visibleOptions))}close(){this.open=!1,this.query="",this.activeIndex=-1}onInput(t){this.query=t.target.value,this.open=!0,this.activeIndex=Et(this.visibleOptions),y(this,"kt-filter",{query:this.query})}choose(t){t.disabled||(this.value=t.id,this.close(),y(this,"kt-change",{value:t.id,option:t}))}clear(t){t.stopPropagation(),this.value=null,this.query="",y(this,"kt-change",{value:null,option:null}),this.input?.focus()}onKeyDown(t){let e=this.visibleOptions;switch(t.key){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=Je(e,this.activeIndex,t.key==="ArrowDown"?1:-1);return;case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(e);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(e);return;case"Enter":{if(!this.open)return;t.preventDefault();let a=e[this.activeIndex];a&&this.choose(a);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.close();return;case"Tab":this.close()}}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.visibleOptions,e=this.selectedOption!==void 0&&!this.inactive;return l`<div
2973
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}formResetCallback(){this.value=this.defaultValue,this.close()}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.input?.focus(t)}get selectedOption(){return this.options.find(t=>t.id===this.value)}get visibleOptions(){return yo(this.options,this.query)}get displayValue(){if(this.open&&this.query)return this.query;let t=this.selectedOption;return t?$t(t):this.query}openList(){this.inactive||this.open||(this.open=!0,this.activeIndex=Et(this.visibleOptions))}close(){this.open=!1,this.query="",this.activeIndex=-1}onInput(t){this.query=t.target.value,this.open=!0,this.activeIndex=Et(this.visibleOptions),y(this,"kt-filter",{query:this.query})}choose(t){t.disabled||(this.value=t.id,this.close(),y(this,"kt-change",{value:t.id,option:t}))}clear(t){t.stopPropagation(),this.value=null,this.query="",y(this,"kt-change",{value:null,option:null}),this.input?.focus()}onKeyDown(t){let e=this.visibleOptions;switch(t.key){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=tr(e,this.activeIndex,t.key==="ArrowDown"?1:-1);return;case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(e);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(e);return;case"Enter":{if(!this.open)return;t.preventDefault();let a=e[this.activeIndex];a&&this.choose(a);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.close();return;case"Tab":this.close()}}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.visibleOptions,e=this.selectedOption!==void 0&&!this.inactive;return l`<div
2974
2974
  class=${w({open:this.open,error:!!this.error})}
2975
2975
  @keydown=${this.onKeyDown}
2976
2976
  >
@@ -3031,7 +3031,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3031
3031
  ${$t(a)}
3032
3032
  </li>`)}
3033
3033
  </ul>
3034
- </div>`}};Dt([A("input")],dt.prototype,"input");Dt([x()],dt.prototype,"open");Dt([x()],dt.prototype,"placement");Dt([x()],dt.prototype,"query");Dt([x()],dt.prototype,"activeIndex");Dt([n({attribute:!1})],dt.prototype,"options");Dt([n({type:String})],dt.prototype,"value");Dt([n({type:String})],dt.prototype,"placeholder");Dt([n({type:String})],dt.prototype,"name");Dt([n({type:Boolean,reflect:!0})],dt.prototype,"disabled");Dt([x()],dt.prototype,"formDisabled");Dt([n({type:Boolean,reflect:!0})],dt.prototype,"required");Dt([n({type:String,reflect:!0})],dt.prototype,"error");Dt([n({type:String})],dt.prototype,"label");Dt([n({type:String,attribute:"empty-text"})],dt.prototype,"emptyText");g("kt-input-menu",dt);var vd=Object.defineProperty,xt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&vd(t,e,r),r},dn=48,bd=40,ot=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=[],this.listId=q("kt-multi-select-list"),this.countId=q("kt-multi-select-count"),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".popup"),anchor:()=>this.shadowRoot?.querySelector(".control"),matchWidth:!0,onPlace:t=>{this.placement=t}}),this.query="",this.activeIndex=-1,this.overflowCount=0,this.options=[],this.value=[],this.placeholder="",this.name="",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.error="",this.label="",this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.close()}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,da,f`
3034
+ </div>`}};Dt([A("input")],dt.prototype,"input");Dt([x()],dt.prototype,"open");Dt([x()],dt.prototype,"placement");Dt([x()],dt.prototype,"query");Dt([x()],dt.prototype,"activeIndex");Dt([n({attribute:!1})],dt.prototype,"options");Dt([n({type:String})],dt.prototype,"value");Dt([n({type:String})],dt.prototype,"placeholder");Dt([n({type:String})],dt.prototype,"name");Dt([n({type:Boolean,reflect:!0})],dt.prototype,"disabled");Dt([x()],dt.prototype,"formDisabled");Dt([n({type:Boolean,reflect:!0})],dt.prototype,"required");Dt([n({type:String,reflect:!0})],dt.prototype,"error");Dt([n({type:String})],dt.prototype,"label");Dt([n({type:String,attribute:"empty-text"})],dt.prototype,"emptyText");g("kt-input-menu",dt);var bd=Object.defineProperty,xt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&bd(t,e,r),r},pn=48,xd=40,ot=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=[],this.listId=q("kt-multi-select-list"),this.countId=q("kt-multi-select-count"),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".popup"),anchor:()=>this.shadowRoot?.querySelector(".control"),matchWidth:!0,onPlace:t=>{this.placement=t}}),this.query="",this.activeIndex=-1,this.overflowCount=0,this.options=[],this.value=[],this.placeholder="",this.name="",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.error="",this.label="",this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.close()}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,da,f`
3035
3035
  :host {
3036
3036
  position: relative;
3037
3037
  display: block;
@@ -3153,7 +3153,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3153
3153
 
3154
3154
  input {
3155
3155
  flex: 1;
3156
- min-width: ${dn}px;
3156
+ min-width: ${pn}px;
3157
3157
  color: var(--text-body);
3158
3158
  font: var(--font-input);
3159
3159
  background: transparent;
@@ -3193,7 +3193,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3193
3193
  width: 16px;
3194
3194
  color: var(--color-primary-text);
3195
3195
  }
3196
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown),document.fonts?.ready.then(()=>this.fitChips())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}willUpdate(t){if(t.has("value")||t.has("name")||t.has("required")||t.has("error")||this.stringsChanged(t)){let e=null;if(this.value.length>0){e=new FormData;for(let r of this.value)e.append(this.name,String(r))}B(this.internals,e);let a=this.required&&this.value.length===0;H(this.internals,{valueMissing:a,customError:!!this.error},this.error||(a?v().selectOption:""))}}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open),this.observeWidth(),this.fitChips()}formResetCallback(){this.value=this.defaultValue,this.close()}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){let e=t instanceof FormData?t.getAll(this.name).map(String):t?[t]:[];this.value=e.map(a=>this.options.find(r=>String(r.id)===a)?.id??a)}focus(t){this.input?.focus(t)}get selectedOptions(){return this.value.map(t=>this.options.find(e=>e.id===t)??{id:t,label:String(t)})}get visibleOptions(){return yo(this.options,this.query)}isChosen(t){return this.value.includes(t.id)}openList(){this.inactive||this.open||(this.open=!0,this.activeIndex=Et(this.visibleOptions))}close(){this.open=!1,this.query="",this.activeIndex=-1}onInput(t){this.query=t.target.value,this.open=!0,this.activeIndex=Et(this.visibleOptions),y(this,"kt-filter",{query:this.query})}toggle(t){t.disabled||this.inactive||this.commit(this.isChosen(t)?this.value.filter(e=>e!==t.id):[...this.value,t.id])}removeValue(t){this.inactive||this.commit(this.value.filter(e=>e!==t))}commit(t){this.value=t,y(this,"kt-change",{value:t,options:this.selectedOptions})}onKeyDown(t){let e=this.visibleOptions;switch(t.key){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=Je(e,this.activeIndex,t.key==="ArrowDown"?1:-1);return;case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(e);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(e);return;case"Enter":{if(!this.open)return;t.preventDefault();let a=e[this.activeIndex];a&&this.toggle(a);return}case"Backspace":{let a=this.value[this.value.length-1];if(this.input?.value||a===void 0)return;this.removeValue(a);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.close();return;case"Tab":this.close()}}observeWidth(){if(this.resizeObserver||typeof ResizeObserver>"u")return;let t=this.shadowRoot?.querySelector(".control");t&&(this.resizeObserver=new ResizeObserver(()=>this.fitChips()),this.resizeObserver.observe(t))}fitChips(){let t=this.shadowRoot?.querySelector(".control"),e=this.shadowRoot?.querySelector(".chips");if(!t||!e)return;let a=[...e.querySelectorAll(".chip")];for(let k of a)k.hidden=!1;let r=getComputedStyle(t),i=parseFloat(r.columnGap)||0,s=t.querySelector(".toggle")?.getBoundingClientRect().width??0,p=t.clientWidth-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-dn-s-2*i;if(t.clientWidth===0||p<=0)return;let h=e.getBoundingClientRect().left,u=k=>a.filter($=>$.getBoundingClientRect().right-h<=k).length,m=u(p);if(m<a.length){let k=this.shadowRoot?.querySelector(".more")?.getBoundingClientRect().width;m=u(p-(k||bd)-i)}a.forEach((k,$)=>{k.hidden=$>=m});let b=a.length-m;b!==this.overflowCount&&(this.overflowCount=b)}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.visibleOptions,e=this.selectedOptions;return l`<div
3196
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown),document.fonts?.ready.then(()=>this.fitChips())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}willUpdate(t){if(t.has("value")||t.has("name")||t.has("required")||t.has("error")||this.stringsChanged(t)){let e=null;if(this.value.length>0){e=new FormData;for(let r of this.value)e.append(this.name,String(r))}B(this.internals,e);let a=this.required&&this.value.length===0;H(this.internals,{valueMissing:a,customError:!!this.error},this.error||(a?v().selectOption:""))}}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open),this.observeWidth(),this.fitChips()}formResetCallback(){this.value=this.defaultValue,this.close()}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){let e=t instanceof FormData?t.getAll(this.name).map(String):t?[t]:[];this.value=e.map(a=>this.options.find(r=>String(r.id)===a)?.id??a)}focus(t){this.input?.focus(t)}get selectedOptions(){return this.value.map(t=>this.options.find(e=>e.id===t)??{id:t,label:String(t)})}get visibleOptions(){return yo(this.options,this.query)}isChosen(t){return this.value.includes(t.id)}openList(){this.inactive||this.open||(this.open=!0,this.activeIndex=Et(this.visibleOptions))}close(){this.open=!1,this.query="",this.activeIndex=-1}onInput(t){this.query=t.target.value,this.open=!0,this.activeIndex=Et(this.visibleOptions),y(this,"kt-filter",{query:this.query})}toggle(t){t.disabled||this.inactive||this.commit(this.isChosen(t)?this.value.filter(e=>e!==t.id):[...this.value,t.id])}removeValue(t){this.inactive||this.commit(this.value.filter(e=>e!==t))}commit(t){this.value=t,y(this,"kt-change",{value:t,options:this.selectedOptions})}onKeyDown(t){let e=this.visibleOptions;switch(t.key){case"ArrowDown":case"ArrowUp":if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=tr(e,this.activeIndex,t.key==="ArrowDown"?1:-1);return;case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(e);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(e);return;case"Enter":{if(!this.open)return;t.preventDefault();let a=e[this.activeIndex];a&&this.toggle(a);return}case"Backspace":{let a=this.value[this.value.length-1];if(this.input?.value||a===void 0)return;this.removeValue(a);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.close();return;case"Tab":this.close()}}observeWidth(){if(this.resizeObserver||typeof ResizeObserver>"u")return;let t=this.shadowRoot?.querySelector(".control");t&&(this.resizeObserver=new ResizeObserver(()=>this.fitChips()),this.resizeObserver.observe(t))}fitChips(){let t=this.shadowRoot?.querySelector(".control"),e=this.shadowRoot?.querySelector(".chips");if(!t||!e)return;let a=[...e.querySelectorAll(".chip")];for(let k of a)k.hidden=!1;let r=getComputedStyle(t),i=parseFloat(r.columnGap)||0,s=t.querySelector(".toggle")?.getBoundingClientRect().width??0,p=t.clientWidth-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight)-pn-s-2*i;if(t.clientWidth===0||p<=0)return;let h=e.getBoundingClientRect().left,u=k=>a.filter($=>$.getBoundingClientRect().right-h<=k).length,m=u(p);if(m<a.length){let k=this.shadowRoot?.querySelector(".more")?.getBoundingClientRect().width;m=u(p-(k||xd)-i)}a.forEach((k,$)=>{k.hidden=$>=m});let b=a.length-m;b!==this.overflowCount&&(this.overflowCount=b)}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.visibleOptions,e=this.selectedOptions;return l`<div
3197
3197
  class=${w({open:this.open,error:!!this.error})}
3198
3198
  @keydown=${this.onKeyDown}
3199
3199
  >
@@ -3277,7 +3277,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3277
3277
  ${$t(a)}
3278
3278
  </li>`})}
3279
3279
  </ul>
3280
- </div>`}};xt([A("input")],ot.prototype,"input");xt([x()],ot.prototype,"open");xt([x()],ot.prototype,"placement");xt([x()],ot.prototype,"query");xt([x()],ot.prototype,"activeIndex");xt([x()],ot.prototype,"overflowCount");xt([n({attribute:!1})],ot.prototype,"options");xt([n({attribute:!1})],ot.prototype,"value");xt([n({type:String})],ot.prototype,"placeholder");xt([n({type:String})],ot.prototype,"name");xt([n({type:Boolean,reflect:!0})],ot.prototype,"disabled");xt([x()],ot.prototype,"formDisabled");xt([n({type:Boolean,reflect:!0})],ot.prototype,"required");xt([n({type:String,reflect:!0})],ot.prototype,"error");xt([n({type:String})],ot.prototype,"label");xt([n({type:String,attribute:"empty-text"})],ot.prototype,"emptyText");g("kt-multi-select",ot);var xd=Object.defineProperty,Hi=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&xd(t,e,r),r},_r=class extends c{constructor(){super(...arguments),this.label="",this.required=!1}static{this.styles=[c.styles,f`
3280
+ </div>`}};xt([A("input")],ot.prototype,"input");xt([x()],ot.prototype,"open");xt([x()],ot.prototype,"placement");xt([x()],ot.prototype,"query");xt([x()],ot.prototype,"activeIndex");xt([x()],ot.prototype,"overflowCount");xt([n({attribute:!1})],ot.prototype,"options");xt([n({attribute:!1})],ot.prototype,"value");xt([n({type:String})],ot.prototype,"placeholder");xt([n({type:String})],ot.prototype,"name");xt([n({type:Boolean,reflect:!0})],ot.prototype,"disabled");xt([x()],ot.prototype,"formDisabled");xt([n({type:Boolean,reflect:!0})],ot.prototype,"required");xt([n({type:String,reflect:!0})],ot.prototype,"error");xt([n({type:String})],ot.prototype,"label");xt([n({type:String,attribute:"empty-text"})],ot.prototype,"emptyText");g("kt-multi-select",ot);var yd=Object.defineProperty,ji=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yd(t,e,r),r},Gr=class extends c{constructor(){super(...arguments),this.label="",this.required=!1}static{this.styles=[c.styles,f`
3281
3281
  :host {
3282
3282
  display: flex;
3283
3283
  flex-direction: column;
@@ -3297,7 +3297,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3297
3297
  `]}get control(){return this.defaultSlot?.assignedElements({flatten:!0}).find(t=>t instanceof HTMLElement)}labelControl(){let t=this.control;t&&("label"in t?t.label=this.label:t.setAttribute("aria-label",this.label))}updated(){this.labelControl()}focusControl(){this.control?.focus()}render(){return l`<label part="label" @click=${this.focusControl}>
3298
3298
  ${this.label}${this.required?l`<span class="required" aria-hidden="true">*</span>`:""}
3299
3299
  </label>
3300
- <slot @slotchange=${this.labelControl}></slot>`}};Hi([A("slot")],_r.prototype,"defaultSlot");Hi([n({type:String})],_r.prototype,"label");Hi([n({type:Boolean,reflect:!0})],_r.prototype,"required");g("kt-label-input",_r);var yd=Object.defineProperty,Tt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yd(t,e,r),r},ae=class extends c{constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.tabbable=!1,this.invalid=!1,this.groupDisabled=!1}static{this.styles=[c.styles,f`
3300
+ <slot @slotchange=${this.labelControl}></slot>`}};ji([A("slot")],Gr.prototype,"defaultSlot");ji([n({type:String})],Gr.prototype,"label");ji([n({type:Boolean,reflect:!0})],Gr.prototype,"required");g("kt-label-input",Gr);var kd=Object.defineProperty,Tt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kd(t,e,r),r},ae=class extends c{constructor(){super(...arguments),this.value="",this.disabled=!1,this.checked=!1,this.tabbable=!1,this.invalid=!1,this.groupDisabled=!1}static{this.styles=[c.styles,f`
3301
3301
  :host {
3302
3302
  display: block;
3303
3303
  /* Whole, even pixels: an even circle around an even dot leaves the
@@ -3401,7 +3401,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3401
3401
  flex-wrap: wrap;
3402
3402
  column-gap: var(--gap-card);
3403
3403
  }
3404
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKeyDown)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}updated(){this.syncRadios()}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.radios.find(e=>e.tabbable)?.focus(t)}enabled(){return this.inactive?[]:this.radios.filter(t=>!t.disabled)}choose(t){t.value!==this.value&&(this.value=t.value,y(this,"kt-change",{value:this.value}))}render(){return l`${this.error?l`<span id="error-message" class="visually-hidden">${this.error}</span>`:d}
3404
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKeyDown)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}updated(){this.syncRadios()}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.radios.find(e=>e.tabbable)?.focus(t)}enabled(){return this.inactive?[]:this.radios.filter(t=>!t.disabled)}choose(t){t.value!==this.value&&(this.value=t.value,y(this,"kt-change",{value:this.value}))}render(){return l`${this.error?l`<span id="error-message" class="visually-hidden">${this.error}</span>`:d}
3405
3405
  <div
3406
3406
  part="base"
3407
3407
  class="group"
@@ -3414,7 +3414,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3414
3414
  aria-describedby=${this.error?"error-message":d}
3415
3415
  >
3416
3416
  <slot @slotchange=${this.syncRadios}></slot>
3417
- </div>`}};Tt([na({selector:"kt-radio"})],Wt.prototype,"radios");Tt([n({type:String,reflect:!0})],Wt.prototype,"value");Tt([n({type:String})],Wt.prototype,"name");Tt([n({type:String})],Wt.prototype,"label");Tt([n({type:Boolean,reflect:!0})],Wt.prototype,"disabled");Tt([x()],Wt.prototype,"formDisabled");Tt([n({type:Boolean,reflect:!0})],Wt.prototype,"required");Tt([n({type:String,reflect:!0})],Wt.prototype,"orientation");Tt([n({type:String,reflect:!0})],Wt.prototype,"error");g("kt-radio",ae);g("kt-radio-group",Wt);var kd=Object.defineProperty,Lt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kd(t,e,r),r},pt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.listId=q("kt-select-list"),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".popup"),anchor:()=>this.shadowRoot?.querySelector(".trigger"),matchWidth:!0,onPlace:t=>{this.placement=t}}),this.activeIndex=-1,this.options=[],this.value=null,this.placeholder=void 0,this.name="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.error="",this.clearable=!0,this.label="",this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||(this.open=!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,da,f`
3417
+ </div>`}};Tt([na({selector:"kt-radio"})],Wt.prototype,"radios");Tt([n({type:String,reflect:!0})],Wt.prototype,"value");Tt([n({type:String})],Wt.prototype,"name");Tt([n({type:String})],Wt.prototype,"label");Tt([n({type:Boolean,reflect:!0})],Wt.prototype,"disabled");Tt([x()],Wt.prototype,"formDisabled");Tt([n({type:Boolean,reflect:!0})],Wt.prototype,"required");Tt([n({type:String,reflect:!0})],Wt.prototype,"orientation");Tt([n({type:String,reflect:!0})],Wt.prototype,"error");g("kt-radio",ae);g("kt-radio-group",Wt);var wd=Object.defineProperty,Lt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&wd(t,e,r),r},pt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue=null,this.listId=q("kt-select-list"),this.open=!1,this.placement="bottom",this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".popup"),anchor:()=>this.shadowRoot?.querySelector(".trigger"),matchWidth:!0,onPlace:t=>{this.placement=t}}),this.activeIndex=-1,this.options=[],this.value=null,this.placeholder=void 0,this.name="",this.size="medium",this.disabled=!1,this.formDisabled=!1,this.required=!1,this.error="",this.clearable=!0,this.label="",this.emptyText=void 0,this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||(this.open=!1)}}static{this.formAssociated=!0}static{this.styles=[c.styles,ht,da,f`
3418
3418
  :host {
3419
3419
  position: relative;
3420
3420
  display: block;
@@ -3523,7 +3523,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3523
3523
  .open .chevron {
3524
3524
  transform: scaleY(-1);
3525
3525
  }
3526
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}formResetCallback(){this.value=this.defaultValue,this.open=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.shadowRoot?.querySelector(".trigger")?.focus(t)}get selectedOption(){return this.options.find(t=>t.id===this.value)}openList(){if(this.inactive)return;this.open=!0;let t=this.options.findIndex(e=>e.id===this.value);this.activeIndex=t>=0?t:Et(this.options)}closeList(){this.open=!1,this.activeIndex=-1}toggleList(){this.open?this.closeList():this.openList()}choose(t){t.disabled||(this.value=t.id,this.closeList(),this.focus(),y(this,"kt-change",{value:t.id,option:t}))}clear(t){t.stopPropagation(),this.value=null,y(this,"kt-change",{value:null,option:null})}onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":{if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=Je(this.options,this.activeIndex,t.key==="ArrowDown"?1:-1);return}case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(this.options);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(this.options);return;case"Enter":case" ":{if(t.preventDefault(),!this.open)return this.openList();let e=this.options[this.activeIndex];e&&this.choose(e);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.closeList();return;case"Tab":this.closeList()}}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.selectedOption,e=this.clearable&&t!==void 0&&!this.inactive;return l`<div
3526
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,N(this.open,document,"pointerdown",this.onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("pointerdown",this.onDocumentPointerDown)}updated(t){t.has("open")&&N(this.open,document,"pointerdown",this.onDocumentPointerDown),this.floating.sync(this.open)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().selectOption:""))}}formResetCallback(){this.value=this.defaultValue,this.open=!1}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.shadowRoot?.querySelector(".trigger")?.focus(t)}get selectedOption(){return this.options.find(t=>t.id===this.value)}openList(){if(this.inactive)return;this.open=!0;let t=this.options.findIndex(e=>e.id===this.value);this.activeIndex=t>=0?t:Et(this.options)}closeList(){this.open=!1,this.activeIndex=-1}toggleList(){this.open?this.closeList():this.openList()}choose(t){t.disabled||(this.value=t.id,this.closeList(),this.focus(),y(this,"kt-change",{value:t.id,option:t}))}clear(t){t.stopPropagation(),this.value=null,y(this,"kt-change",{value:null,option:null})}onKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":{if(t.preventDefault(),!this.open)return this.openList();this.activeIndex=tr(this.options,this.activeIndex,t.key==="ArrowDown"?1:-1);return}case"Home":if(!this.open)return;t.preventDefault(),this.activeIndex=Et(this.options);return;case"End":if(!this.open)return;t.preventDefault(),this.activeIndex=xr(this.options);return;case"Enter":case" ":{if(t.preventDefault(),!this.open)return this.openList();let e=this.options[this.activeIndex];e&&this.choose(e);return}case"Escape":if(!this.open)return;t.stopPropagation(),this.closeList();return;case"Tab":this.closeList()}}optionId(t){return`${this.listId}-option-${t}`}render(){let t=this.selectedOption,e=this.clearable&&t!==void 0&&!this.inactive;return l`<div
3527
3527
  class=${w({open:this.open,error:!!this.error})}
3528
3528
  @keydown=${this.onKeyDown}
3529
3529
  >
@@ -3578,7 +3578,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3578
3578
  ${$t(a)}
3579
3579
  </li>`)}
3580
3580
  </ul>
3581
- </div>`}};Lt([x()],pt.prototype,"open");Lt([x()],pt.prototype,"placement");Lt([x()],pt.prototype,"activeIndex");Lt([n({attribute:!1})],pt.prototype,"options");Lt([n({type:String})],pt.prototype,"value");Lt([n({type:String})],pt.prototype,"placeholder");Lt([n({type:String})],pt.prototype,"name");Lt([n({type:String,reflect:!0})],pt.prototype,"size");Lt([n({type:Boolean,reflect:!0})],pt.prototype,"disabled");Lt([x()],pt.prototype,"formDisabled");Lt([n({type:Boolean,reflect:!0})],pt.prototype,"required");Lt([n({type:String,reflect:!0})],pt.prototype,"error");Lt([n({type:Boolean})],pt.prototype,"clearable");Lt([n({type:String})],pt.prototype,"label");Lt([n({type:String,attribute:"empty-text"})],pt.prototype,"emptyText");g("kt-select",pt);var wd=Object.defineProperty,Yt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&wd(t,e,r),r},gt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue="",this.value="",this.name="",this.placeholder="",this.rows=3,this.disabled=!1,this.formDisabled=!1,this.readonly=!1,this.required=!1,this.error="",this.label="",this.resize="none"}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3581
+ </div>`}};Lt([x()],pt.prototype,"open");Lt([x()],pt.prototype,"placement");Lt([x()],pt.prototype,"activeIndex");Lt([n({attribute:!1})],pt.prototype,"options");Lt([n({type:String})],pt.prototype,"value");Lt([n({type:String})],pt.prototype,"placeholder");Lt([n({type:String})],pt.prototype,"name");Lt([n({type:String,reflect:!0})],pt.prototype,"size");Lt([n({type:Boolean,reflect:!0})],pt.prototype,"disabled");Lt([x()],pt.prototype,"formDisabled");Lt([n({type:Boolean,reflect:!0})],pt.prototype,"required");Lt([n({type:String,reflect:!0})],pt.prototype,"error");Lt([n({type:Boolean})],pt.prototype,"clearable");Lt([n({type:String})],pt.prototype,"label");Lt([n({type:String,attribute:"empty-text"})],pt.prototype,"emptyText");g("kt-select",pt);var $d=Object.defineProperty,Yt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&$d(t,e,r),r},gt=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultValue="",this.value="",this.name="",this.placeholder="",this.rows=3,this.disabled=!1,this.formDisabled=!1,this.readonly=!1,this.required=!1,this.error="",this.label="",this.resize="none"}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3582
3582
  :host {
3583
3583
  display: block;
3584
3584
  }
@@ -3677,7 +3677,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3677
3677
  display: flex;
3678
3678
  color: var(--color-danger-text);
3679
3679
  }
3680
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value,B(this.internals,this.value)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value.length===0;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().required:""))}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.control?.focus(t)}blur(){this.control?.blur()}onInput(t){this.value=t.target.value,y(this,"kt-input",{value:this.value})}onChange(t){t.stopPropagation(),y(this,"kt-change",{value:this.value})}render(){let t=this.maxlength!==void 0,e=this.maxlength!==void 0&&this.value.length>=this.maxlength;return l`<div
3680
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value,B(this.internals,this.value)}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value);let e=this.required&&this.value.length===0;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().required:""))}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t}focus(t){this.control?.focus(t)}blur(){this.control?.blur()}onInput(t){this.value=t.target.value,y(this,"kt-input",{value:this.value})}onChange(t){t.stopPropagation(),y(this,"kt-change",{value:this.value})}render(){let t=this.maxlength!==void 0,e=this.maxlength!==void 0&&this.value.length>=this.maxlength;return l`<div
3681
3681
  part="base"
3682
3682
  class=${w({field:!0,error:!!this.error,disabled:this.inactive})}
3683
3683
  >
@@ -3711,7 +3711,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3711
3711
  ${this.value.length} / ${this.maxlength}
3712
3712
  </span>`:d}
3713
3713
  </div>`:d}
3714
- </div>`}};Yt([A("textarea")],gt.prototype,"control");Yt([n({type:String})],gt.prototype,"value");Yt([n({type:String})],gt.prototype,"name");Yt([n({type:String})],gt.prototype,"placeholder");Yt([n({type:Number})],gt.prototype,"rows");Yt([n({type:Number})],gt.prototype,"maxlength");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"disabled");Yt([x()],gt.prototype,"formDisabled");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"readonly");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"required");Yt([n({type:String,reflect:!0})],gt.prototype,"error");Yt([n({type:String})],gt.prototype,"label");Yt([n({type:String,reflect:!0})],gt.prototype,"resize");g("kt-textarea",gt);function wr(o){if(!Number.isFinite(o))return 0;let[t="",e]=o.toExponential().split("e"),a=(t.split(".")[1]??"").length;return Math.max(0,a-Number(e))}var $d=Object.defineProperty,ge=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&$d(t,e,r),r},Bt=class extends c{constructor(){super(...arguments),this.value="",this.min=0,this.max=100,this.step=1,this.range=!1,this.label="",this.name="",this.disabled=!1,this.showValue=!1,this.format=t=>String(t),this.formDisabled=!1,this.internals=null,this.defaultValue=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3714
+ </div>`}};Yt([A("textarea")],gt.prototype,"control");Yt([n({type:String})],gt.prototype,"value");Yt([n({type:String})],gt.prototype,"name");Yt([n({type:String})],gt.prototype,"placeholder");Yt([n({type:Number})],gt.prototype,"rows");Yt([n({type:Number})],gt.prototype,"maxlength");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"disabled");Yt([x()],gt.prototype,"formDisabled");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"readonly");Yt([n({type:Boolean,reflect:!0})],gt.prototype,"required");Yt([n({type:String,reflect:!0})],gt.prototype,"error");Yt([n({type:String})],gt.prototype,"label");Yt([n({type:String,reflect:!0})],gt.prototype,"resize");g("kt-textarea",gt);function wr(o){if(!Number.isFinite(o))return 0;let[t="",e]=o.toExponential().split("e"),a=(t.split(".")[1]??"").length;return Math.max(0,a-Number(e))}var Cd=Object.defineProperty,be=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Cd(t,e,r),r},Bt=class extends c{constructor(){super(...arguments),this.value="",this.min=0,this.max=100,this.step=1,this.range=!1,this.label="",this.name="",this.disabled=!1,this.showValue=!1,this.format=t=>String(t),this.formDisabled=!1,this.internals=null,this.defaultValue=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3715
3715
  :host {
3716
3716
  display: block;
3717
3717
  --kt-slider-thumb: calc(18px * var(--density-scale, 1));
@@ -3816,7 +3816,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3816
3816
  input:disabled::-webkit-slider-thumb {
3817
3817
  cursor: not-allowed;
3818
3818
  }
3819
- `]}connectedCallback(){super.connectedCallback(),this.internals??=R(this)}firstUpdated(){this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("min")||t.has("max")||t.has("step")||t.has("range")){let e=this.normalised(this.value);e!==this.value&&(this.value=e),B(this.internals,this.value)}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){t!==null&&(this.value=t)}get numbers(){return this.value.split("/").map(Number)}snap(t){if(!Number.isFinite(t))return this.min;let e=this.step>0?this.step:1,a=this.min+Math.round((t-this.min)/e)*e,r=Math.max(wr(e),wr(this.min));return Number(Math.min(this.max,Math.max(this.min,a)).toFixed(r))}normalised(t){let e=t===""?[]:t.split("/").map(Number);if(!this.range)return String(this.snap(e[0]??this.min));let a=this.snap(e[0]??this.min),r=this.snap(e[1]??this.max);return`${Math.min(a,r)}/${Math.max(a,r)}`}onSlide(t,e,a){let r=t.target,i=this.snap(Number(r.value));if(this.range){let[s,p]=this.numbers;e===0?i=Math.min(i,p):i=Math.max(i,s),r.value=String(i),this.value=e===0?`${i}/${p}`:`${s}/${i}`}else this.value=String(i);y(this,a?"kt-change":"kt-input",{value:this.value})}percent(t){return this.max>this.min?(t-this.min)/(this.max-this.min)*100:0}render(){let t=v(),e=this.numbers,[a,r]=this.range?[e[0],e[1]]:[this.min,e[0]],i=this.disabled||this.formDisabled,s=this.range?`${this.format(e[0])} \u2013 ${this.format(e[1])}`:this.format(e[0]),p=m=>m.charAt(0).toUpperCase()+m.slice(1),h=this.range?this.label?[`${this.label}, ${t.sliderMinimum}`,`${this.label}, ${t.sliderMaximum}`]:[p(t.sliderMinimum),p(t.sliderMaximum)]:[this.label],u=this.range&&e[0]===e[1]&&e[0]>this.min;return l`${this.showValue?l`<div class="head">
3819
+ `]}connectedCallback(){super.connectedCallback(),this.internals??=K(this)}firstUpdated(){this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("min")||t.has("max")||t.has("step")||t.has("range")){let e=this.normalised(this.value);e!==this.value&&(this.value=e),B(this.internals,this.value)}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){t!==null&&(this.value=t)}get numbers(){return this.value.split("/").map(Number)}snap(t){if(!Number.isFinite(t))return this.min;let e=this.step>0?this.step:1,a=this.min+Math.round((t-this.min)/e)*e,r=Math.max(wr(e),wr(this.min));return Number(Math.min(this.max,Math.max(this.min,a)).toFixed(r))}normalised(t){let e=t===""?[]:t.split("/").map(Number);if(!this.range)return String(this.snap(e[0]??this.min));let a=this.snap(e[0]??this.min),r=this.snap(e[1]??this.max);return`${Math.min(a,r)}/${Math.max(a,r)}`}onSlide(t,e,a){let r=t.target,i=this.snap(Number(r.value));if(this.range){let[s,p]=this.numbers;e===0?i=Math.min(i,p):i=Math.max(i,s),r.value=String(i),this.value=e===0?`${i}/${p}`:`${s}/${i}`}else this.value=String(i);y(this,a?"kt-change":"kt-input",{value:this.value})}percent(t){return this.max>this.min?(t-this.min)/(this.max-this.min)*100:0}render(){let t=v(),e=this.numbers,[a,r]=this.range?[e[0],e[1]]:[this.min,e[0]],i=this.disabled||this.formDisabled,s=this.range?`${this.format(e[0])} \u2013 ${this.format(e[1])}`:this.format(e[0]),p=m=>m.charAt(0).toUpperCase()+m.slice(1),h=this.range?this.label?[`${this.label}, ${t.sliderMinimum}`,`${this.label}, ${t.sliderMaximum}`]:[p(t.sliderMinimum),p(t.sliderMaximum)]:[this.label],u=this.range&&e[0]===e[1]&&e[0]>this.min;return l`${this.showValue?l`<div class="head">
3820
3820
  <span>${this.label}</span>
3821
3821
  <span part="value" class="value">${s}</span>
3822
3822
  </div>`:d}
@@ -3840,7 +3840,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3840
3840
  @input=${k=>this.onSlide(k,b,!1)}
3841
3841
  @change=${k=>this.onSlide(k,b,!0)}
3842
3842
  />`)}
3843
- </div>`}};ge([n({type:String,reflect:!0})],Bt.prototype,"value");ge([n({type:Number})],Bt.prototype,"min");ge([n({type:Number})],Bt.prototype,"max");ge([n({type:Number})],Bt.prototype,"step");ge([n({type:Boolean,reflect:!0})],Bt.prototype,"range");ge([n({type:String})],Bt.prototype,"label");ge([n({type:String})],Bt.prototype,"name");ge([n({type:Boolean,reflect:!0})],Bt.prototype,"disabled");ge([n({type:Boolean,attribute:"show-value"})],Bt.prototype,"showValue");ge([n({attribute:!1})],Bt.prototype,"format");ge([x()],Bt.prototype,"formDisabled");g("kt-slider",Bt);var Cd=Object.defineProperty,yt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Cd(t,e,r),r};function Sd(o){let t=new Intl.NumberFormat(o).formatToParts(12345.6);return{group:t.find(e=>e.type==="group")?.value??",",decimal:t.find(e=>e.type==="decimal")?.value??"."}}function Pd(o,t,e=!1){let{group:a,decimal:r}=Sd(t),i=o.replace(/[\u200e\u200f\u061c]/g,"").replace(/[\u2212\u2012\u2013\u2014]/g,"-").replace(/\s/g,"").split(a).join("").replace(r,".").replace(/[%\p{Sc}]/gu,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(i))return NaN;let s=Number(i);return e?s/100:s}var it=class extends c{constructor(){super(...arguments),this.value=null,this.min=Number.NEGATIVE_INFINITY,this.max=Number.POSITIVE_INFINITY,this.step=1,this.name="",this.label="",this.locale="",this.placeholder="",this.size="medium",this.disabled=!1,this.required=!1,this.error="",this.formatOptions={},this.focused=!1,this.formDisabled=!1,this.internals=null,this.defaultValue=null,this.errorId=q("kt-number-error"),this.rolling=0}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3843
+ </div>`}};be([n({type:String,reflect:!0})],Bt.prototype,"value");be([n({type:Number})],Bt.prototype,"min");be([n({type:Number})],Bt.prototype,"max");be([n({type:Number})],Bt.prototype,"step");be([n({type:Boolean,reflect:!0})],Bt.prototype,"range");be([n({type:String})],Bt.prototype,"label");be([n({type:String})],Bt.prototype,"name");be([n({type:Boolean,reflect:!0})],Bt.prototype,"disabled");be([n({type:Boolean,attribute:"show-value"})],Bt.prototype,"showValue");be([n({attribute:!1})],Bt.prototype,"format");be([x()],Bt.prototype,"formDisabled");g("kt-slider",Bt);var Sd=Object.defineProperty,yt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Sd(t,e,r),r};function Pd(o){let t=new Intl.NumberFormat(o).formatToParts(12345.6);return{group:t.find(e=>e.type==="group")?.value??",",decimal:t.find(e=>e.type==="decimal")?.value??"."}}function Ad(o,t,e=!1){let{group:a,decimal:r}=Pd(t),i=o.replace(/[\u200e\u200f\u061c]/g,"").replace(/[\u2212\u2012\u2013\u2014]/g,"-").replace(/\s/g,"").split(a).join("").replace(r,".").replace(/[%\p{Sc}]/gu,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(i))return NaN;let s=Number(i);return e?s/100:s}var it=class extends c{constructor(){super(...arguments),this.value=null,this.min=Number.NEGATIVE_INFINITY,this.max=Number.POSITIVE_INFINITY,this.step=1,this.name="",this.label="",this.locale="",this.placeholder="",this.size="medium",this.disabled=!1,this.required=!1,this.error="",this.formatOptions={},this.focused=!1,this.formDisabled=!1,this.internals=null,this.defaultValue=null,this.errorId=q("kt-number-error"),this.rolling=0}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3844
3844
  :host {
3845
3845
  display: block;
3846
3846
  --field-height: var(--button-height);
@@ -3938,7 +3938,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3938
3938
  outline: var(--outline-width) solid var(--color-primary-base);
3939
3939
  outline-offset: -2px;
3940
3940
  }
3941
- `]}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.value=this.value===null?null:this.clamp(this.value),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().numberRequired:""))}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t===null||t===""?null:Number(t)}focus(t){this.input?.focus(t)}get resolvedLocale(){return Te(this.locale)}get inactive(){return this.disabled||this.formDisabled}clamp(t){let e=this.step>0?this.step:1,a=Number.isFinite(this.min)?this.min:0,r=a+Math.round((t-a)/e)*e,i=Math.max(wr(e),wr(a));return Number(Math.min(this.max,Math.max(this.min,r)).toFixed(i))}commit(t){let e=t===null?null:this.clamp(t);this.input&&(this.input.value=this.text(e)),e!==this.value&&(this.value=e,y(this,"kt-change",{value:e}))}text(t){if(t===null)return"";let e=Math.max(wr(this.step),wr(this.min));if(this.focused){let r=this.percent?t*100:t;return new Intl.NumberFormat(this.resolvedLocale,{maximumFractionDigits:20,useGrouping:!1}).format(Number(r.toPrecision(15)))}let a=this.formatOptions.minimumFractionDigits??0;return new Intl.NumberFormat(this.resolvedLocale,{maximumFractionDigits:Math.max(e,3,a),...this.formatOptions}).format(t)}get percent(){return this.formatOptions.style==="percent"}stepBy(t){if(this.inactive)return;let e=this.value,a=e??(Number.isFinite(this.min)?this.min:0);this.commit(e===null?a:a+t*this.step),e!==null&&this.value!==null&&this.value!==e&&(this.rolling=Math.sign(this.value-e))}updated(t){if(super.updated(t),!this.rolling)return;let e=`${this.rolling*.6}em`;this.rolling=0,qt(this.renderRoot.querySelector("input"),[{translate:`0 ${e}`,opacity:0},{translate:"0 0",opacity:1}],"--duration-fast","kt-number-roll")}onKeyDown(t){let e={ArrowUp:()=>this.stepBy(1),ArrowDown:()=>this.stepBy(-1),PageUp:()=>this.stepBy(10),PageDown:()=>this.stepBy(-10),Home:()=>Number.isFinite(this.min)&&this.commit(this.min),End:()=>Number.isFinite(this.max)&&this.commit(this.max),Enter:()=>this.readTyped()}[t.key];e&&(t.preventDefault(),e())}readTyped(){let t=this.input.value.trim();if(t===""){this.commit(null);return}let e=Pd(t,this.resolvedLocale,this.percent);if(Number.isNaN(e)){this.input.value=this.text(this.value);return}this.commit(e)}onFocus(){this.focused=!0,this.input.value=this.text(this.value)}onBlur(){this.readTyped(),this.focused=!1,this.input.value=this.text(this.value)}render(){let t=v(),e=this.inactive,a=this.value!==null&&this.value<=this.min,r=this.value!==null&&this.value>=this.max,i=this.text(this.value);return l`${this.error?l`<span id=${this.errorId} class="visually-hidden">${this.error}</span>`:d}
3941
+ `]}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.value=this.value===null?null:this.clamp(this.value),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("required")||t.has("error")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().numberRequired:""))}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t===null||t===""?null:Number(t)}focus(t){this.input?.focus(t)}get resolvedLocale(){return Te(this.locale)}get inactive(){return this.disabled||this.formDisabled}clamp(t){let e=this.step>0?this.step:1,a=Number.isFinite(this.min)?this.min:0,r=a+Math.round((t-a)/e)*e,i=Math.max(wr(e),wr(a));return Number(Math.min(this.max,Math.max(this.min,r)).toFixed(i))}commit(t){let e=t===null?null:this.clamp(t);this.input&&(this.input.value=this.text(e)),e!==this.value&&(this.value=e,y(this,"kt-change",{value:e}))}text(t){if(t===null)return"";let e=Math.max(wr(this.step),wr(this.min));if(this.focused){let r=this.percent?t*100:t;return new Intl.NumberFormat(this.resolvedLocale,{maximumFractionDigits:20,useGrouping:!1}).format(Number(r.toPrecision(15)))}let a=this.formatOptions.minimumFractionDigits??0;return new Intl.NumberFormat(this.resolvedLocale,{maximumFractionDigits:Math.max(e,3,a),...this.formatOptions}).format(t)}get percent(){return this.formatOptions.style==="percent"}stepBy(t){if(this.inactive)return;let e=this.value,a=e??(Number.isFinite(this.min)?this.min:0);this.commit(e===null?a:a+t*this.step),e!==null&&this.value!==null&&this.value!==e&&(this.rolling=Math.sign(this.value-e))}updated(t){if(super.updated(t),!this.rolling)return;let e=`${this.rolling*.6}em`;this.rolling=0,qt(this.renderRoot.querySelector("input"),[{translate:`0 ${e}`,opacity:0},{translate:"0 0",opacity:1}],"--duration-fast","kt-number-roll")}onKeyDown(t){let e={ArrowUp:()=>this.stepBy(1),ArrowDown:()=>this.stepBy(-1),PageUp:()=>this.stepBy(10),PageDown:()=>this.stepBy(-10),Home:()=>Number.isFinite(this.min)&&this.commit(this.min),End:()=>Number.isFinite(this.max)&&this.commit(this.max),Enter:()=>this.readTyped()}[t.key];e&&(t.preventDefault(),e())}readTyped(){let t=this.input.value.trim();if(t===""){this.commit(null);return}let e=Ad(t,this.resolvedLocale,this.percent);if(Number.isNaN(e)){this.input.value=this.text(this.value);return}this.commit(e)}onFocus(){this.focused=!0,this.input.value=this.text(this.value)}onBlur(){this.readTyped(),this.focused=!1,this.input.value=this.text(this.value)}render(){let t=v(),e=this.inactive,a=this.value!==null&&this.value<=this.min,r=this.value!==null&&this.value>=this.max,i=this.text(this.value);return l`${this.error?l`<span id=${this.errorId} class="visually-hidden">${this.error}</span>`:d}
3942
3942
  <div
3943
3943
  part="field"
3944
3944
  class=${w({field:!0,error:!!this.error,disabled:e})}
@@ -3986,7 +3986,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
3986
3986
  >
3987
3987
  <kt-icon name="plus" size="16"></kt-icon>
3988
3988
  </button>
3989
- </div>`}};yt([n({converter:{fromAttribute:o=>{let t=o===null||o.trim()===""?NaN:Number(o);return Number.isFinite(t)?t:null}}})],it.prototype,"value");yt([n({type:Number})],it.prototype,"min");yt([n({type:Number})],it.prototype,"max");yt([n({type:Number})],it.prototype,"step");yt([n({type:String})],it.prototype,"name");yt([n({type:String})],it.prototype,"label");yt([n({type:String})],it.prototype,"locale");yt([n({type:String})],it.prototype,"placeholder");yt([n({type:String,reflect:!0})],it.prototype,"size");yt([n({type:Boolean,reflect:!0})],it.prototype,"disabled");yt([n({type:Boolean,reflect:!0})],it.prototype,"required");yt([n({type:String,reflect:!0})],it.prototype,"error");yt([n({attribute:!1})],it.prototype,"formatOptions");yt([x()],it.prototype,"focused");yt([x()],it.prototype,"formDisabled");yt([A("input")],it.prototype,"input");g("kt-number-input",it);var Ad=Object.defineProperty,ji=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ad(t,e,r),r};function Md(o,t){let e=Vt(o,{hour:"2-digit",minute:"2-digit",hourCycle:t?"h12":"h23"}),a=e.formatToParts(new Date(2026,0,1,1,5)),r=a.map(p=>p.type),i=a.find(p=>p.type==="literal")?.value.trim()||":",s=p=>e.formatToParts(new Date(2026,0,1,p)).find(h=>h.type==="dayPeriod")?.value??(p<12?"AM":"PM");return{separator:i==="."?".":":",periodFirst:r.indexOf("dayPeriod")>=0&&r.indexOf("dayPeriod")<r.indexOf("hour"),periods:[s(1),s(13)]}}function Mo(o){let t=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec(o);if(!t)return null;let[e,a,r=0]=t.slice(1).map(i=>Number(i??0));return e>23||a>59||r>59?null:e*3600+a*60+r}var qa=o=>String(o).padStart(2,"0"),Vr=class extends rt{constructor(){super(...arguments),this.seconds=!1,this.hourCycle="",this.step=1}get twelve(){if(this.hourCycle)return this.hourCycle==="h12";let t=Vt(this.resolvedLocale,{hour:"numeric"}).resolvedOptions().hourCycle;return t==="h11"||t==="h12"}willUpdate(t){(t.has("hourCycle")||t.has("seconds"))&&(this.texts=this.fill(this.value)),super.willUpdate(t)}items(){let t=v(),e=this.twelve,{separator:a,periodFirst:r,periods:i}=Md(this.resolvedLocale,e),s=(h,u,m,b,k=1)=>({key:h,label:u,placeholder:t.placeholderTime,spec:{min:m,max:b,length:2},step:k}),p=[e?s("hour",t.segmentHour,1,12):s("hour",t.segmentHour,0,23),{literal:a},s("minute",t.segmentMinute,0,59,Math.max(1,Math.round(this.step)||1))];if(this.seconds&&p.push({literal:a},s("second",t.segmentSecond,0,59)),e){let h={key:"period",label:t.segmentDayPeriod,placeholder:t.placeholderTime,choices:i};r?p.unshift(h,{literal:" "}):p.push({literal:" "},h)}return p}fill(t){let e=t===null?null:Mo(t);if(e===null)return{hour:"",minute:"",second:"",period:""};let a=Math.floor(e/3600);return{hour:qa(this.twelve?a%12||12:a),minute:qa(Math.floor(e/60)%60),second:qa(e%60),period:a<12?"0":"1"}}read(t){let{hour:e="",minute:a="",second:r="",period:i=""}=t,s=this.twelve;if(e.length<2||a.length<2||this.seconds&&r.length<2||s&&i==="")return{value:null,error:""};let p=Number(e);if(s){if(p<1||p>12)return{value:null,error:""};p=p%12+(i==="1"?12:0)}let h=`${qa(p)}:${a}${this.seconds?`:${r}`:""}`,u=Mo(h);if(u===null)return{value:null,error:""};let m=Mo(this.min),b=Mo(this.max);return m!==null&&u<m||b!==null&&u>b?{value:null,error:v().timeOutOfRange}:{value:h,error:""}}completeOnBlur(t,e){if(!t.spec||e.length!==1)return null;let a=Number(e);return a<t.spec.min?null:qa(a)}requiredMessage(){return v().timeRequired}};ji([n({type:Boolean,reflect:!0})],Vr.prototype,"seconds");ji([n({type:String,attribute:"hour-cycle"})],Vr.prototype,"hourCycle");ji([n({type:Number})],Vr.prototype,"step");g("kt-time-input",Vr);var Dd=Object.defineProperty,Gr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dd(t,e,r),r},ve=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultChecked=!1,this.checked=!1,this.disabled=!1,this.formDisabled=!1,this.size="medium",this.name="",this.value="on",this.label=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3989
+ </div>`}};yt([n({converter:{fromAttribute:o=>{let t=o===null||o.trim()===""?NaN:Number(o);return Number.isFinite(t)?t:null}}})],it.prototype,"value");yt([n({type:Number})],it.prototype,"min");yt([n({type:Number})],it.prototype,"max");yt([n({type:Number})],it.prototype,"step");yt([n({type:String})],it.prototype,"name");yt([n({type:String})],it.prototype,"label");yt([n({type:String})],it.prototype,"locale");yt([n({type:String})],it.prototype,"placeholder");yt([n({type:String,reflect:!0})],it.prototype,"size");yt([n({type:Boolean,reflect:!0})],it.prototype,"disabled");yt([n({type:Boolean,reflect:!0})],it.prototype,"required");yt([n({type:String,reflect:!0})],it.prototype,"error");yt([n({attribute:!1})],it.prototype,"formatOptions");yt([x()],it.prototype,"focused");yt([x()],it.prototype,"formDisabled");yt([A("input")],it.prototype,"input");g("kt-number-input",it);var Md=Object.defineProperty,_i=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Md(t,e,r),r};function Dd(o,t){let e=Vt(o,{hour:"2-digit",minute:"2-digit",hourCycle:t?"h12":"h23"}),a=e.formatToParts(new Date(2026,0,1,1,5)),r=a.map(p=>p.type),i=a.find(p=>p.type==="literal")?.value.trim()||":",s=p=>e.formatToParts(new Date(2026,0,1,p)).find(h=>h.type==="dayPeriod")?.value??(p<12?"AM":"PM");return{separator:i==="."?".":":",periodFirst:r.indexOf("dayPeriod")>=0&&r.indexOf("dayPeriod")<r.indexOf("hour"),periods:[s(1),s(13)]}}function Mo(o){let t=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec(o);if(!t)return null;let[e,a,r=0]=t.slice(1).map(i=>Number(i??0));return e>23||a>59||r>59?null:e*3600+a*60+r}var Ea=o=>String(o).padStart(2,"0"),Wr=class extends rt{constructor(){super(...arguments),this.seconds=!1,this.hourCycle="",this.step=1}get twelve(){if(this.hourCycle)return this.hourCycle==="h12";let t=Vt(this.resolvedLocale,{hour:"numeric"}).resolvedOptions().hourCycle;return t==="h11"||t==="h12"}willUpdate(t){(t.has("hourCycle")||t.has("seconds"))&&(this.texts=this.fill(this.value)),super.willUpdate(t)}items(){let t=v(),e=this.twelve,{separator:a,periodFirst:r,periods:i}=Dd(this.resolvedLocale,e),s=(h,u,m,b,k=1)=>({key:h,label:u,placeholder:t.placeholderTime,spec:{min:m,max:b,length:2},step:k}),p=[e?s("hour",t.segmentHour,1,12):s("hour",t.segmentHour,0,23),{literal:a},s("minute",t.segmentMinute,0,59,Math.max(1,Math.round(this.step)||1))];if(this.seconds&&p.push({literal:a},s("second",t.segmentSecond,0,59)),e){let h={key:"period",label:t.segmentDayPeriod,placeholder:t.placeholderTime,choices:i};r?p.unshift(h,{literal:" "}):p.push({literal:" "},h)}return p}fill(t){let e=t===null?null:Mo(t);if(e===null)return{hour:"",minute:"",second:"",period:""};let a=Math.floor(e/3600);return{hour:Ea(this.twelve?a%12||12:a),minute:Ea(Math.floor(e/60)%60),second:Ea(e%60),period:a<12?"0":"1"}}read(t){let{hour:e="",minute:a="",second:r="",period:i=""}=t,s=this.twelve;if(e.length<2||a.length<2||this.seconds&&r.length<2||s&&i==="")return{value:null,error:""};let p=Number(e);if(s){if(p<1||p>12)return{value:null,error:""};p=p%12+(i==="1"?12:0)}let h=`${Ea(p)}:${a}${this.seconds?`:${r}`:""}`,u=Mo(h);if(u===null)return{value:null,error:""};let m=Mo(this.min),b=Mo(this.max);return m!==null&&u<m||b!==null&&u>b?{value:null,error:v().timeOutOfRange}:{value:h,error:""}}completeOnBlur(t,e){if(!t.spec||e.length!==1)return null;let a=Number(e);return a<t.spec.min?null:Ea(a)}requiredMessage(){return v().timeRequired}};_i([n({type:Boolean,reflect:!0})],Wr.prototype,"seconds");_i([n({type:String,attribute:"hour-cycle"})],Wr.prototype,"hourCycle");_i([n({type:Number})],Wr.prototype,"step");g("kt-time-input",Wr);var Td=Object.defineProperty,Yr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Td(t,e,r),r},xe=class extends c{constructor(){super(...arguments),this.internals=null,this.defaultChecked=!1,this.checked=!1,this.disabled=!1,this.formDisabled=!1,this.size="medium",this.name="",this.value="on",this.label=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
3990
3990
  :host {
3991
3991
  display: inline-flex;
3992
3992
  align-items: center;
@@ -4072,7 +4072,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4072
4072
  color: var(--text-disabled);
4073
4073
  cursor: not-allowed;
4074
4074
  }
4075
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultChecked=this.checked,this.syncFormValue()}willUpdate(t){(t.has("checked")||t.has("value"))&&this.syncFormValue()}syncFormValue(){B(this.internals,this.checked?this.value:null)}formResetCallback(){this.checked=this.defaultChecked}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.checked=t===this.value}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}toggle(){this.inactive||(this.checked=!this.checked,y(this,"kt-change",{checked:this.checked}))}render(){return l`<button
4075
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultChecked=this.checked,this.syncFormValue()}willUpdate(t){(t.has("checked")||t.has("value"))&&this.syncFormValue()}syncFormValue(){B(this.internals,this.checked?this.value:null)}formResetCallback(){this.checked=this.defaultChecked}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.checked=t===this.value}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}toggle(){this.inactive||(this.checked=!this.checked,y(this,"kt-change",{checked:this.checked}))}render(){return l`<button
4076
4076
  part="base"
4077
4077
  type="button"
4078
4078
  role="switch"
@@ -4086,7 +4086,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4086
4086
  <span part="thumb" class="thumb"></span>
4087
4087
  </span>
4088
4088
  </button>
4089
- <span id="label" class="label" @click=${this.toggle}><slot></slot></span>`}};Gr([n({type:Boolean,reflect:!0})],ve.prototype,"checked");Gr([n({type:Boolean,reflect:!0})],ve.prototype,"disabled");Gr([x()],ve.prototype,"formDisabled");Gr([n({type:String,reflect:!0})],ve.prototype,"size");Gr([n({type:String})],ve.prototype,"name");Gr([n({type:String})],ve.prototype,"value");Gr([n({type:String})],ve.prototype,"label");g("kt-toggle",ve);var Td=Object.defineProperty,pn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Td(t,e,r),r},ua=class extends c{constructor(){super(...arguments),this.items=[],this.label=void 0}static{this.styles=[c.styles,f`
4089
+ <span id="label" class="label" @click=${this.toggle}><slot></slot></span>`}};Yr([n({type:Boolean,reflect:!0})],xe.prototype,"checked");Yr([n({type:Boolean,reflect:!0})],xe.prototype,"disabled");Yr([x()],xe.prototype,"formDisabled");Yr([n({type:String,reflect:!0})],xe.prototype,"size");Yr([n({type:String})],xe.prototype,"name");Yr([n({type:String})],xe.prototype,"value");Yr([n({type:String})],xe.prototype,"label");g("kt-toggle",xe);var Ld=Object.defineProperty,cn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ld(t,e,r),r},ua=class extends c{constructor(){super(...arguments),this.items=[],this.label=void 0}static{this.styles=[c.styles,f`
4090
4090
  :host {
4091
4091
  display: block;
4092
4092
  }
@@ -4138,7 +4138,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4138
4138
  <kt-icon name="chevron-right" size="14"></kt-icon>
4139
4139
  </span>`)}
4140
4140
  ${this.items.length===0?d:""}
4141
- </nav>`}};pn([n({attribute:!1})],ua.prototype,"items");pn([n({type:String})],ua.prototype,"label");g("kt-breadcrumb",ua);var Ld=Object.defineProperty,Do=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ld(t,e,r),r},$r=class extends c{constructor(){super(...arguments),this.eyebrow="",this.heading="",this.description="",this.level="page"}static{this.styles=[c.styles,f`
4141
+ </nav>`}};cn([n({attribute:!1})],ua.prototype,"items");cn([n({type:String})],ua.prototype,"label");g("kt-breadcrumb",ua);var Bd=Object.defineProperty,Do=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Bd(t,e,r),r},$r=class extends c{constructor(){super(...arguments),this.eyebrow="",this.heading="",this.description="",this.level="page"}static{this.styles=[c.styles,f`
4142
4142
  :host {
4143
4143
  display: block;
4144
4144
  }
@@ -4209,7 +4209,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4209
4209
  <slot></slot>
4210
4210
  </div>
4211
4211
  <div class="actions"><slot name="actions"></slot></div>
4212
- </div>`}};Do([n({type:String})],$r.prototype,"eyebrow");Do([n({type:String})],$r.prototype,"heading");Do([n({type:String})],$r.prototype,"description");Do([n({type:String,reflect:!0})],$r.prototype,"level");g("kt-page-header",$r);var fa=class{constructor(t,e){this.options=e,this.observer=null,this.observed=[],this.frame=0,this.placed=null,t.addController(this)}hostConnected(){typeof ResizeObserver=="function"&&(this.observer??=new ResizeObserver(()=>this.place()))}hostDisconnected(){this.observer?.disconnect(),this.observed=[],this.placed=null,cancelAnimationFrame(this.frame)}hostUpdated(){this.place()}place(){let t=this.options.container();if(!t)return;let e=this.options.selected();if(this.observe(t,e),!e){delete t.dataset.indicator,this.placed=null;return}let a=[e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight],r=a.join(" ");if(this.placed?.item===e&&this.placed.box===r)return;let i=this.placed?.item===e;this.placed={item:e,box:r};let s=t.style;s.setProperty("--kt-indicator-x",`${a[0]}px`),s.setProperty("--kt-indicator-y",`${a[1]}px`),s.setProperty("--kt-indicator-width",`${a[2]}px`),s.setProperty("--kt-indicator-height",`${a[3]}px`),(!t.dataset.indicator||i)&&(t.dataset.indicator="placed",cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>{t.dataset.indicator==="placed"&&(t.dataset.indicator="ready")}))}observe(...t){if(!this.observer)return;let e=t.filter(a=>!!a);if(!(e.length===this.observed.length&&e.every((a,r)=>a===this.observed[r]))){this.observer.disconnect();for(let a of e)this.observer.observe(a);this.observed=e}}};var Bd=Object.defineProperty,Ke=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Bd(t,e,r),r},Od={small:16,medium:20,large:24},Ft=class extends c{constructor(){super(),this.internals=null,this.defaultValue=null,this.options=[],this.value=null,this.size="medium",this.orientation="horizontal",this.disabled=!1,this.formDisabled=!1,this.label="",this.name="",this.required=!1,new fa(this,{container:()=>this.renderRoot.querySelector(".track"),selected:()=>this.renderRoot.querySelector(".option.selected")})}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
4212
+ </div>`}};Do([n({type:String})],$r.prototype,"eyebrow");Do([n({type:String})],$r.prototype,"heading");Do([n({type:String})],$r.prototype,"description");Do([n({type:String,reflect:!0})],$r.prototype,"level");g("kt-page-header",$r);var fa=class{constructor(t,e){this.options=e,this.observer=null,this.observed=[],this.frame=0,this.placed=null,t.addController(this)}hostConnected(){typeof ResizeObserver=="function"&&(this.observer??=new ResizeObserver(()=>this.place()))}hostDisconnected(){this.observer?.disconnect(),this.observed=[],this.placed=null,cancelAnimationFrame(this.frame)}hostUpdated(){this.place()}place(){let t=this.options.container();if(!t)return;let e=this.options.selected();if(this.observe(t,e),!e){delete t.dataset.indicator,this.placed=null;return}let a=[e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight],r=a.join(" ");if(this.placed?.item===e&&this.placed.box===r)return;let i=this.placed?.item===e;this.placed={item:e,box:r};let s=t.style;s.setProperty("--kt-indicator-x",`${a[0]}px`),s.setProperty("--kt-indicator-y",`${a[1]}px`),s.setProperty("--kt-indicator-width",`${a[2]}px`),s.setProperty("--kt-indicator-height",`${a[3]}px`),(!t.dataset.indicator||i)&&(t.dataset.indicator="placed",cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>{t.dataset.indicator==="placed"&&(t.dataset.indicator="ready")}))}observe(...t){if(!this.observer)return;let e=t.filter(a=>!!a);if(!(e.length===this.observed.length&&e.every((a,r)=>a===this.observed[r]))){this.observer.disconnect();for(let a of e)this.observer.observe(a);this.observed=e}}};var Od=Object.defineProperty,ze=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Od(t,e,r),r},zd={small:16,medium:20,large:24},Ft=class extends c{constructor(){super(),this.internals=null,this.defaultValue=null,this.options=[],this.value=null,this.size="medium",this.orientation="horizontal",this.disabled=!1,this.formDisabled=!1,this.label="",this.name="",this.required=!1,new fa(this,{container:()=>this.renderRoot.querySelector(".track"),selected:()=>this.renderRoot.querySelector(".option.selected")})}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
4213
4213
  :host {
4214
4214
  display: inline-block;
4215
4215
  }
@@ -4351,7 +4351,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4351
4351
  flex: 1;
4352
4352
  text-align: center;
4353
4353
  }
4354
- `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("required")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e},e?v().selectOption:"")}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=this.options.find(e=>String(e.value)===t)?.value??t}get selectedIndex(){return this.options.findIndex(t=>t.value===this.value)}choose(t){this.inactive||t.disabled||this.value===t.value||(this.value=t.value,y(this,"kt-change",{value:t.value,option:t}))}onKeyDown(t){let e=this.orientation==="vertical"?"ArrowDown":"ArrowRight",a=this.orientation==="vertical"?"ArrowUp":"ArrowLeft",r;if(t.key===e)r=this.step(1);else if(t.key===a)r=this.step(-1);else if(t.key==="Home")r=this.options.findIndex(p=>!p.disabled);else if(t.key==="End")r=this.options.length-1-[...this.options].reverse().findIndex(p=>!p.disabled);else return;if(t.preventDefault(),r===void 0||r<0)return;let i=this.options[r];if(!i)return;let s=r;this.choose(i),this.updateComplete.then(()=>this.segments[s]?.focus())}step(t){let e=this.options.length;if(e===0)return;let a=this.selectedIndex<0?t===1?-1:0:this.selectedIndex;for(let r=1;r<=e;r+=1){let i=((a+t*r)%e+e)%e;if(!this.options[i]?.disabled)return i}}render(){let t=this.selectedIndex,e=t>=0?t:this.options.findIndex(a=>!a.disabled);return l`<div
4354
+ `]}get inactive(){return this.disabled||this.formDisabled}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("required")||this.stringsChanged(t)){B(this.internals,this.value===null?null:String(this.value));let e=this.required&&this.value===null;H(this.internals,{valueMissing:e},e?v().selectOption:"")}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=this.options.find(e=>String(e.value)===t)?.value??t}get selectedIndex(){return this.options.findIndex(t=>t.value===this.value)}choose(t){this.inactive||t.disabled||this.value===t.value||(this.value=t.value,y(this,"kt-change",{value:t.value,option:t}))}onKeyDown(t){let e=this.orientation==="vertical"?"ArrowDown":"ArrowRight",a=this.orientation==="vertical"?"ArrowUp":"ArrowLeft",r;if(t.key===e)r=this.step(1);else if(t.key===a)r=this.step(-1);else if(t.key==="Home")r=this.options.findIndex(p=>!p.disabled);else if(t.key==="End")r=this.options.length-1-[...this.options].reverse().findIndex(p=>!p.disabled);else return;if(t.preventDefault(),r===void 0||r<0)return;let i=this.options[r];if(!i)return;let s=r;this.choose(i),this.updateComplete.then(()=>this.segments[s]?.focus())}step(t){let e=this.options.length;if(e===0)return;let a=this.selectedIndex<0?t===1?-1:0:this.selectedIndex;for(let r=1;r<=e;r+=1){let i=((a+t*r)%e+e)%e;if(!this.options[i]?.disabled)return i}}render(){let t=this.selectedIndex,e=t>=0?t:this.options.findIndex(a=>!a.disabled);return l`<div
4355
4355
  part="base"
4356
4356
  class=${w({track:!0,[this.size]:!0,vertical:this.orientation==="vertical"})}
4357
4357
  role="radiogroup"
@@ -4372,10 +4372,10 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4372
4372
  ?disabled=${this.inactive||a.disabled}
4373
4373
  @click=${()=>this.choose(a)}
4374
4374
  >
4375
- ${a.icon?l`<kt-icon name=${a.icon} size=${Od[this.size]}></kt-icon>`:d}
4375
+ ${a.icon?l`<kt-icon name=${a.icon} size=${zd[this.size]}></kt-icon>`:d}
4376
4376
  ${p?d:l`<span class="text">${s}</span>`}
4377
4377
  </button>`})}
4378
- </div>`}};Ke([sa(".option")],Ft.prototype,"segments");Ke([n({attribute:!1})],Ft.prototype,"options");Ke([n({type:String})],Ft.prototype,"value");Ke([n({type:String,reflect:!0})],Ft.prototype,"size");Ke([n({type:String,reflect:!0})],Ft.prototype,"orientation");Ke([n({type:Boolean,reflect:!0})],Ft.prototype,"disabled");Ke([x()],Ft.prototype,"formDisabled");Ke([n({type:String})],Ft.prototype,"label");Ke([n({type:String})],Ft.prototype,"name");Ke([n({type:Boolean,reflect:!0})],Ft.prototype,"required");g("kt-segmented-control",Ft);var Kd=Object.defineProperty,ma=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Kd(t,e,r),r},Re=class extends c{constructor(){super(...arguments),this.sections=[],this.activeHref="",this.label=void 0,this.flush=!1,this.collapsed=!1,this.overrides={}}static{this.styles=[c.styles,f`
4378
+ </div>`}};ze([sa(".option")],Ft.prototype,"segments");ze([n({attribute:!1})],Ft.prototype,"options");ze([n({type:String})],Ft.prototype,"value");ze([n({type:String,reflect:!0})],Ft.prototype,"size");ze([n({type:String,reflect:!0})],Ft.prototype,"orientation");ze([n({type:Boolean,reflect:!0})],Ft.prototype,"disabled");ze([x()],Ft.prototype,"formDisabled");ze([n({type:String})],Ft.prototype,"label");ze([n({type:String})],Ft.prototype,"name");ze([n({type:Boolean,reflect:!0})],Ft.prototype,"required");g("kt-segmented-control",Ft);var Kd=Object.defineProperty,ma=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Kd(t,e,r),r},Ke=class extends c{constructor(){super(...arguments),this.sections=[],this.activeHref="",this.label=void 0,this.flush=!1,this.collapsed=!1,this.overrides={}}static{this.styles=[c.styles,f`
4379
4379
  :host {
4380
4380
  display: block;
4381
4381
  }
@@ -4562,7 +4562,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4562
4562
  ${t.title?l`<h6 part="title" class="title">${t.title}</h6>`:d}
4563
4563
  ${this.renderItems(t.items,0,String(e))}
4564
4564
  </div>`)}
4565
- </nav>`}};ma([n({attribute:!1})],Re.prototype,"sections");ma([n({type:String,attribute:"active-href"})],Re.prototype,"activeHref");ma([n({type:String})],Re.prototype,"label");ma([n({type:Boolean,reflect:!0})],Re.prototype,"flush");ma([n({type:Boolean,reflect:!0})],Re.prototype,"collapsed");ma([x()],Re.prototype,"overrides");g("kt-sub-menu-navigation",Re);var Rd=Object.defineProperty,ga=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rd(t,e,r),r},ze=class extends c{constructor(){super(),this.tabs=[],this.value=null,this.disabled=!1,this.loading=!1,this.label="",new fa(this,{container:()=>this.renderRoot.querySelector(".tablist"),selected:()=>this.renderRoot.querySelector(".tab.selected")})}static{this.styles=[c.styles,f`
4565
+ </nav>`}};ma([n({attribute:!1})],Ke.prototype,"sections");ma([n({type:String,attribute:"active-href"})],Ke.prototype,"activeHref");ma([n({type:String})],Ke.prototype,"label");ma([n({type:Boolean,reflect:!0})],Ke.prototype,"flush");ma([n({type:Boolean,reflect:!0})],Ke.prototype,"collapsed");ma([x()],Ke.prototype,"overrides");g("kt-sub-menu-navigation",Ke);var Rd=Object.defineProperty,ga=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rd(t,e,r),r},Re=class extends c{constructor(){super(),this.tabs=[],this.value=null,this.disabled=!1,this.loading=!1,this.label="",new fa(this,{container:()=>this.renderRoot.querySelector(".tablist"),selected:()=>this.renderRoot.querySelector(".tab.selected")})}static{this.styles=[c.styles,f`
4566
4566
  :host {
4567
4567
  display: block;
4568
4568
  }
@@ -4676,7 +4676,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4676
4676
  ${a.label??String(a.value)}
4677
4677
  </button>`})}
4678
4678
  <span class="indicator" aria-hidden="true"></span>
4679
- </div>`}};ga([sa(".tab")],ze.prototype,"tabElements");ga([n({attribute:!1})],ze.prototype,"tabs");ga([n({type:String})],ze.prototype,"value");ga([n({type:Boolean,reflect:!0})],ze.prototype,"disabled");ga([n({type:Boolean,reflect:!0})],ze.prototype,"loading");ga([n({type:String})],ze.prototype,"label");g("kt-tabs",ze);var zd=Object.defineProperty,Ea=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&zd(t,e,r),r},rr=class extends c{constructor(){super(...arguments),this.steps=[],this.current="",this.label="",this.orientation="horizontal",this.navigable=!1,this.entering=new Set}static{this.styles=[c.styles,f`
4679
+ </div>`}};ga([sa(".tab")],Re.prototype,"tabElements");ga([n({attribute:!1})],Re.prototype,"tabs");ga([n({type:String})],Re.prototype,"value");ga([n({type:Boolean,reflect:!0})],Re.prototype,"disabled");ga([n({type:Boolean,reflect:!0})],Re.prototype,"loading");ga([n({type:String})],Re.prototype,"label");g("kt-tabs",Re);var qd=Object.defineProperty,Ia=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&qd(t,e,r),r},ar=class extends c{constructor(){super(...arguments),this.steps=[],this.current="",this.label="",this.orientation="horizontal",this.navigable=!1,this.entering=new Set}static{this.styles=[c.styles,f`
4680
4680
  :host {
4681
4681
  display: block;
4682
4682
  --kt-steps-marker: calc(28px * var(--density-scale, 1));
@@ -4896,7 +4896,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4896
4896
  ><span class="fill"></span
4897
4897
  ></span>`:d}
4898
4898
  </li>`})}
4899
- </ol>`}};Ea([n({attribute:!1})],rr.prototype,"steps");Ea([n({type:String,reflect:!0})],rr.prototype,"current");Ea([n({type:String})],rr.prototype,"label");Ea([n({type:String,reflect:!0})],rr.prototype,"orientation");Ea([n({type:Boolean,reflect:!0})],rr.prototype,"navigable");g("kt-steps",rr);var qd=Object.defineProperty,Ia=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&qd(t,e,r),r},ar=class extends c{constructor(){super(...arguments),this.menuOpen=!1,this.sticky=!1,this.navAlign="center",this.bordered=!0,this.label=""}static{this.styles=[c.styles,f`
4899
+ </ol>`}};Ia([n({attribute:!1})],ar.prototype,"steps");Ia([n({type:String,reflect:!0})],ar.prototype,"current");Ia([n({type:String})],ar.prototype,"label");Ia([n({type:String,reflect:!0})],ar.prototype,"orientation");Ia([n({type:Boolean,reflect:!0})],ar.prototype,"navigable");g("kt-steps",ar);var Ed=Object.defineProperty,Fa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ed(t,e,r),r},or=class extends c{constructor(){super(...arguments),this.menuOpen=!1,this.sticky=!1,this.navAlign="center",this.bordered=!0,this.label=""}static{this.styles=[c.styles,f`
4900
4900
  :host {
4901
4901
  display: block;
4902
4902
  --kt-header-height: 64px;
@@ -4998,6 +4998,14 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
4998
4998
  }
4999
4999
 
5000
5000
  @media (max-width: 899px) {
5001
+ /* The navigation leaves the bar: the brand takes what is left, the
5002
+ actions and the menu end it — not the actions in a middle column
5003
+ that no longer has anything to centre. */
5004
+ .bar,
5005
+ :host([nav-align='start']) .bar {
5006
+ grid-template-columns: minmax(0, 1fr) auto auto;
5007
+ }
5008
+
5001
5009
  .menu-button {
5002
5010
  display: inline-flex;
5003
5011
  }
@@ -5036,7 +5044,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5036
5044
  </div>
5037
5045
 
5038
5046
  <div part="bottom" class="bottom"><slot name="bottom"></slot></div>
5039
- </header>`}};Ia([x()],ar.prototype,"menuOpen");Ia([n({type:Boolean,reflect:!0})],ar.prototype,"sticky");Ia([n({type:String,reflect:!0,attribute:"nav-align"})],ar.prototype,"navAlign");Ia([n({type:Boolean,reflect:!0})],ar.prototype,"bordered");Ia([n({type:String})],ar.prototype,"label");g("kt-header",ar);var Ed=Object.defineProperty,qe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ed(t,e,r),r},Ut=class extends c{constructor(){super(...arguments),this.value="",this.placeholder="",this.label="",this.disabled=!1,this.maxRows=8,this.submitOn="enter",this.sending=!1,this.hasAttachments=!1}static{this.styles=[c.styles,f`
5047
+ </header>`}};Fa([x()],or.prototype,"menuOpen");Fa([n({type:Boolean,reflect:!0})],or.prototype,"sticky");Fa([n({type:String,reflect:!0,attribute:"nav-align"})],or.prototype,"navAlign");Fa([n({type:Boolean,reflect:!0})],or.prototype,"bordered");Fa([n({type:String})],or.prototype,"label");g("kt-header",or);var Id=Object.defineProperty,qe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Id(t,e,r),r},Ut=class extends c{constructor(){super(...arguments),this.value="",this.placeholder="",this.label="",this.disabled=!1,this.maxRows=8,this.submitOn="enter",this.sending=!1,this.hasAttachments=!1}static{this.styles=[c.styles,f`
5040
5048
  :host {
5041
5049
  display: block;
5042
5050
  }
@@ -5129,7 +5137,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5129
5137
  @click=${()=>this.submit()}
5130
5138
  ></kt-button>
5131
5139
  </div>
5132
- </div>`}};qe([n({type:String})],Ut.prototype,"value");qe([n({type:String})],Ut.prototype,"placeholder");qe([n({type:String})],Ut.prototype,"label");qe([n({type:Boolean,reflect:!0})],Ut.prototype,"disabled");qe([n({type:Number,attribute:"max-rows"})],Ut.prototype,"maxRows");qe([n({type:String,attribute:"submit-on"})],Ut.prototype,"submitOn");qe([x()],Ut.prototype,"sending");qe([x()],Ut.prototype,"hasAttachments");qe([A("textarea")],Ut.prototype,"field");qe([A("kt-button")],Ut.prototype,"button");g("kt-prompt-input",Ut);var Id=Object.defineProperty,Wr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Id(t,e,r),r},be=class extends c{constructor(){super(...arguments),this.from="assistant",this.name="",this.avatar="",this.time="",this.datetime="",this.thinking=!1,this.streaming=!1}static{this.styles=[c.styles,f`
5140
+ </div>`}};qe([n({type:String})],Ut.prototype,"value");qe([n({type:String})],Ut.prototype,"placeholder");qe([n({type:String})],Ut.prototype,"label");qe([n({type:Boolean,reflect:!0})],Ut.prototype,"disabled");qe([n({type:Number,attribute:"max-rows"})],Ut.prototype,"maxRows");qe([n({type:String,attribute:"submit-on"})],Ut.prototype,"submitOn");qe([x()],Ut.prototype,"sending");qe([x()],Ut.prototype,"hasAttachments");qe([A("textarea")],Ut.prototype,"field");qe([A("kt-button")],Ut.prototype,"button");g("kt-prompt-input",Ut);var Fd=Object.defineProperty,Cr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Fd(t,e,r),r},oe=class extends c{constructor(){super(...arguments),this.from="assistant",this.name="",this.avatar="",this.time="",this.datetime="",this.thinking=!1,this.streaming=!1,this.continued=!1}static{this.styles=[c.styles,f`
5133
5141
  :host {
5134
5142
  display: block;
5135
5143
  }
@@ -5147,6 +5155,31 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5147
5155
  flex: none;
5148
5156
  line-height: 0;
5149
5157
  }
5158
+ /* A run's next message: the small avatar's room (24px) kept, so the words line up. */
5159
+ .avatar.spacer {
5160
+ position: relative;
5161
+ width: 24px;
5162
+ }
5163
+ /* Its time, in the gutter: there for a screen reader, shown on hover or focus. */
5164
+ .gutter-time {
5165
+ position: absolute;
5166
+ top: 0.35em;
5167
+ right: -4px;
5168
+ color: var(--text-muted);
5169
+ font: var(--font-normal-small);
5170
+ font-size: 10px;
5171
+ line-height: 1.6;
5172
+ white-space: nowrap;
5173
+ opacity: 0;
5174
+ transition: opacity var(--duration-fast) var(--easing-standard);
5175
+ }
5176
+ :host(:hover) .gutter-time,
5177
+ :host(:focus-within) .gutter-time {
5178
+ opacity: 1;
5179
+ }
5180
+ :host([continued]) .meta {
5181
+ display: none;
5182
+ }
5150
5183
 
5151
5184
  .body {
5152
5185
  display: grid;
@@ -5267,14 +5300,22 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5267
5300
  aria-label=${this.name||d}
5268
5301
  aria-busy=${e?"true":d}
5269
5302
  >
5270
- ${t?d:l`<div class="avatar">
5271
- <slot name="avatar"
5272
- ><kt-avatar name=${this.name} src=${this.avatar||d} size="small"></kt-avatar
5273
- ></slot>
5274
- </div>`}
5303
+ ${t?d:this.continued?l`<div class="avatar spacer">
5304
+ ${this.time?l`<time class="gutter-time" datetime=${this.datetime||d}
5305
+ >${this.time}</time
5306
+ >`:d}
5307
+ </div>`:l`<div class="avatar">
5308
+ <slot name="avatar"
5309
+ ><kt-avatar
5310
+ name=${this.name}
5311
+ src=${this.avatar||d}
5312
+ size="small"
5313
+ ></kt-avatar
5314
+ ></slot>
5315
+ </div>`}
5275
5316
  <div class="body">
5276
5317
  ${this.name||this.time?l`<div part="meta" class="meta">
5277
- ${this.name&&!t?l`<span class="name">${this.name}</span>`:d}
5318
+ ${this.name&&!t&&!this.continued?l`<span class="name">${this.name}</span>`:d}
5278
5319
  ${this.time?l`<time datetime=${this.datetime||d}>${this.time}</time>`:d}
5279
5320
  </div>`:d}
5280
5321
  ${this.thinking?l`<span class="dots" aria-hidden="true"><i></i><i></i><i></i></span
@@ -5282,7 +5323,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5282
5323
  ${t?l`<div part="bubble" class="bubble">${a}</div>`:a}
5283
5324
  <div class="actions"><slot name="actions"></slot></div>
5284
5325
  </div>
5285
- </article>`}};Wr([n({type:String,reflect:!0})],be.prototype,"from");Wr([n({type:String})],be.prototype,"name");Wr([n({type:String})],be.prototype,"avatar");Wr([n({type:String})],be.prototype,"time");Wr([n({type:String})],be.prototype,"datetime");Wr([n({type:Boolean,reflect:!0})],be.prototype,"thinking");Wr([n({type:Boolean,reflect:!0})],be.prototype,"streaming");g("kt-chat-message",be);var Fd=Object.defineProperty,or=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Fd(t,e,r),r},Xt=class extends c{constructor(){super(...arguments),this.collapsed=!1,this.sidebarOpen=!1,this.breakpoint=900,this.noToggle=!1,this.noLandmarks=!1,this.label="",this.narrow=!1,this.sidebarId=q("kt-app-shell-sidebar"),this.observer=null,this.onKeyDown=t=>{t.key==="Escape"&&this.narrow&&this.sidebarOpen&&(t.preventDefault(),this.closeDrawer())}}static{this.styles=[c.styles,f`
5326
+ </article>`}};Cr([n({type:String,reflect:!0})],oe.prototype,"from");Cr([n({type:String})],oe.prototype,"name");Cr([n({type:String})],oe.prototype,"avatar");Cr([n({type:String})],oe.prototype,"time");Cr([n({type:String})],oe.prototype,"datetime");Cr([n({type:Boolean,reflect:!0})],oe.prototype,"thinking");Cr([n({type:Boolean,reflect:!0})],oe.prototype,"streaming");Cr([n({type:Boolean,reflect:!0})],oe.prototype,"continued");g("kt-chat-message",oe);var Ud=Object.defineProperty,ir=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ud(t,e,r),r},Xt=class extends c{constructor(){super(...arguments),this.collapsed=!1,this.sidebarOpen=!1,this.breakpoint=900,this.noToggle=!1,this.noLandmarks=!1,this.label="",this.narrow=!1,this.sidebarId=q("kt-app-shell-sidebar"),this.observer=null,this.onKeyDown=t=>{t.key==="Escape"&&this.narrow&&this.sidebarOpen&&(t.preventDefault(),this.closeDrawer())}}static{this.styles=[c.styles,f`
5286
5327
  :host {
5287
5328
  display: block;
5288
5329
  height: 100%;
@@ -5324,6 +5365,11 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5324
5365
  gap: var(--gap-form);
5325
5366
  min-width: 0;
5326
5367
  }
5368
+ /* Narrow, the toggle opens a drawer, not a rail beside it: it ends the
5369
+ header, where a thumb reaches it, after the header's own content. */
5370
+ :host([narrow]) .toggle {
5371
+ order: 1;
5372
+ }
5327
5373
 
5328
5374
  .sidebar {
5329
5375
  grid-area: sidebar;
@@ -5412,7 +5458,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5412
5458
  </aside>`}
5413
5459
  <div class="backdrop" @click=${()=>this.closeDrawer()}></div>
5414
5460
  ${this.noLandmarks?l`<div part="main" class="main"><slot></slot></div>`:l`<main part="main" class="main"><slot></slot></main>`}
5415
- </div>`}};or([n({type:Boolean,reflect:!0})],Xt.prototype,"collapsed");or([n({type:Boolean,reflect:!0,attribute:"sidebar-open"})],Xt.prototype,"sidebarOpen");or([n({type:Number})],Xt.prototype,"breakpoint");or([n({type:Boolean,attribute:"no-toggle"})],Xt.prototype,"noToggle");or([n({type:Boolean,attribute:"no-landmarks"})],Xt.prototype,"noLandmarks");or([n({type:String})],Xt.prototype,"label");or([x()],Xt.prototype,"narrow");or([A(".sidebar")],Xt.prototype,"aside");or([A(".toggle")],Xt.prototype,"toggle");g("kt-app-shell",Xt);var Ud=Object.defineProperty,Fa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ud(t,e,r),r},ir=class extends c{constructor(){super(...arguments),this.items=[],this.layout="horizontal",this.columns=1,this.bordered=!1,this.label=""}static{this.styles=[c.styles,f`
5461
+ </div>`}};ir([n({type:Boolean,reflect:!0})],Xt.prototype,"collapsed");ir([n({type:Boolean,reflect:!0,attribute:"sidebar-open"})],Xt.prototype,"sidebarOpen");ir([n({type:Number})],Xt.prototype,"breakpoint");ir([n({type:Boolean,attribute:"no-toggle"})],Xt.prototype,"noToggle");ir([n({type:Boolean,attribute:"no-landmarks"})],Xt.prototype,"noLandmarks");ir([n({type:String})],Xt.prototype,"label");ir([x()],Xt.prototype,"narrow");ir([A(".sidebar")],Xt.prototype,"aside");ir([A(".toggle")],Xt.prototype,"toggle");g("kt-app-shell",Xt);var Nd=Object.defineProperty,Ua=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Nd(t,e,r),r},sr=class extends c{constructor(){super(...arguments),this.items=[],this.layout="horizontal",this.columns=1,this.bordered=!1,this.label=""}static{this.styles=[c.styles,f`
5416
5462
  :host {
5417
5463
  display: block;
5418
5464
  container-type: inline-size;
@@ -5488,7 +5534,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5488
5534
  <dt part="term">${t.term}</dt>
5489
5535
  ${t.detail?l`<dd part="detail">${t.detail}</dd>`:l`<dd part="detail" class="empty">—</dd>`}
5490
5536
  </div>`)}
5491
- </dl>`}};Fa([n({attribute:!1})],ir.prototype,"items");Fa([n({type:String,reflect:!0})],ir.prototype,"layout");Fa([n({type:Number,reflect:!0})],ir.prototype,"columns");Fa([n({type:Boolean,reflect:!0})],ir.prototype,"bordered");Fa([n({type:String})],ir.prototype,"label");g("kt-description-list",ir);var Nd=Object.defineProperty,To=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Nd(t,e,r),r},Cr=class extends c{constructor(){super(...arguments),this.people=[],this.max=4,this.size="medium",this.label=""}static{this.styles=[c.styles,f`
5537
+ </dl>`}};Ua([n({attribute:!1})],sr.prototype,"items");Ua([n({type:String,reflect:!0})],sr.prototype,"layout");Ua([n({type:Number,reflect:!0})],sr.prototype,"columns");Ua([n({type:Boolean,reflect:!0})],sr.prototype,"bordered");Ua([n({type:String})],sr.prototype,"label");g("kt-description-list",sr);var Hd=Object.defineProperty,To=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Hd(t,e,r),r},Sr=class extends c{constructor(){super(...arguments),this.people=[],this.max=4,this.size="medium",this.label=""}static{this.styles=[c.styles,f`
5492
5538
  :host {
5493
5539
  display: inline-block;
5494
5540
  --kt-avatar-size: 32px;
@@ -5541,7 +5587,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5541
5587
  >+${e}</span
5542
5588
  >
5543
5589
  </li>`:d}
5544
- </ul>`}};To([n({attribute:!1})],Cr.prototype,"people");To([n({type:Number})],Cr.prototype,"max");To([n({type:String,reflect:!0})],Cr.prototype,"size");To([n({type:String})],Cr.prototype,"label");g("kt-avatar-group",Cr);var Hd=Object.defineProperty,Yr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Hd(t,e,r),r},xe=class extends c{constructor(){super(...arguments),this.value="",this.label="",this.copiedLabel="",this.iconOnly=!1,this.variant="secondary",this.size="medium"}static{this.styles=[c.styles,f`
5590
+ </ul>`}};To([n({attribute:!1})],Sr.prototype,"people");To([n({type:Number})],Sr.prototype,"max");To([n({type:String,reflect:!0})],Sr.prototype,"size");To([n({type:String})],Sr.prototype,"label");g("kt-avatar-group",Sr);var jd=Object.defineProperty,Xr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&jd(t,e,r),r},ye=class extends c{constructor(){super(...arguments),this.value="",this.label="",this.copiedLabel="",this.iconOnly=!1,this.variant="secondary",this.size="medium"}static{this.styles=[c.styles,f`
5545
5591
  :host {
5546
5592
  display: inline-flex;
5547
5593
  vertical-align: middle;
@@ -5555,7 +5601,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5555
5601
  done-label=${this.copiedLabel||t.copied}
5556
5602
  @click=${()=>{this.copy().catch(()=>{})}}
5557
5603
  >${this.iconOnly?d:e}</kt-button
5558
- >`}};Yr([n({type:String})],xe.prototype,"value");Yr([n({type:String})],xe.prototype,"label");Yr([n({type:String,attribute:"copied-label"})],xe.prototype,"copiedLabel");Yr([n({type:Boolean,attribute:"icon-only"})],xe.prototype,"iconOnly");Yr([n({type:String})],xe.prototype,"variant");Yr([n({type:String})],xe.prototype,"size");Yr([A("kt-button")],xe.prototype,"button");g("kt-copy-button",xe);var jd=Object.defineProperty,Ee=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&jd(t,e,r),r},Nt=class extends c{constructor(){super(...arguments),this.value="",this.length=6,this.type="numeric",this.label="",this.name="",this.required=!1,this.disabled=!1,this.error="",this.formDisabled=!1,this.internals=null,this.defaultValue="",this.errorId=q("kt-otp-error")}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
5604
+ >`}};Xr([n({type:String})],ye.prototype,"value");Xr([n({type:String})],ye.prototype,"label");Xr([n({type:String,attribute:"copied-label"})],ye.prototype,"copiedLabel");Xr([n({type:Boolean,attribute:"icon-only"})],ye.prototype,"iconOnly");Xr([n({type:String})],ye.prototype,"variant");Xr([n({type:String})],ye.prototype,"size");Xr([A("kt-button")],ye.prototype,"button");g("kt-copy-button",ye);var _d=Object.defineProperty,Ee=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&_d(t,e,r),r},Nt=class extends c{constructor(){super(...arguments),this.value="",this.length=6,this.type="numeric",this.label="",this.name="",this.required=!1,this.disabled=!1,this.error="",this.formDisabled=!1,this.internals=null,this.defaultValue="",this.errorId=q("kt-otp-error")}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
5559
5605
  :host {
5560
5606
  display: inline-block;
5561
5607
  --kt-otp-box-size: calc(var(--button-height) + 8px);
@@ -5604,7 +5650,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5604
5650
  color: var(--color-danger-text);
5605
5651
  font: var(--font-normal-small);
5606
5652
  }
5607
- `]}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.value=this.clean(this.value),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("length")||t.has("type")){let e=this.clean(this.value);e!==this.value&&(this.value=e)}}updated(t){if(t.has("value")||t.has("required")||t.has("error")||t.has("length")||this.stringsChanged(t)){B(this.internals,this.value||null);let e=this.required&&this.value.length<this.length;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().otpRequired:""),this.boxes?.[0])}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t??""}focus(t){this.box(Math.min(this.value.length,this.length-1))?.focus(t)}get inactive(){return this.disabled||this.formDisabled}clean(t){let e=this.type==="numeric"?/[0-9]/:/[A-Za-z0-9]/;return[...t].filter(a=>e.test(a)).join("").toUpperCase().slice(0,Math.max(1,this.length))}box(t){return this.boxes?.[t]}commit(t){let e=this.clean(t);if(e===this.value){this.requestUpdate();return}this.value=e,y(this,"kt-change",{value:e}),e.length===this.length&&y(this,"kt-complete",{value:e})}onInput(t,e){let a=this.clean(t.target.value),r=Math.min(e,this.value.length);if(!a){this.commit(this.value);return}let i=(this.value.slice(0,r)+a).slice(0,this.length);this.commit(i+this.value.slice(r+a.length)),this.updateComplete.then(()=>this.box(Math.min(i.length,this.length-1))?.focus())}onKeyDown(t,e){let a=r=>{t.preventDefault(),this.box(Math.max(0,Math.min(this.length-1,r)))?.focus()};switch(t.key){case"Backspace":{t.preventDefault();let r=e<this.value.length?e:this.value.length-1;if(r<0)return;this.commit(this.value.slice(0,r)+this.value.slice(r+1)),this.updateComplete.then(()=>this.box(r)?.focus());break}case"ArrowLeft":a(e-1);break;case"ArrowRight":a(Math.min(e+1,this.value.length));break;case"Home":a(0);break;case"End":a(this.value.length);break}}onPaste(t,e){let a=this.clean(t.clipboardData?.getData("text")??"");if(!a)return;t.preventDefault();let r=Math.min(e,this.value.length),i=(this.value.slice(0,r)+a).slice(0,this.length);this.commit(i),this.updateComplete.then(()=>this.box(Math.min(i.length,this.length-1))?.focus())}render(){let t=v(),e=Math.max(1,Math.round(this.length));return l`<div part="group" class="group" role="group" aria-label=${this.label||d}>
5653
+ `]}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.value=this.clean(this.value),this.defaultValue=this.value}willUpdate(t){if(t.has("value")||t.has("length")||t.has("type")){let e=this.clean(this.value);e!==this.value&&(this.value=e)}}updated(t){if(t.has("value")||t.has("required")||t.has("error")||t.has("length")||this.stringsChanged(t)){B(this.internals,this.value||null);let e=this.required&&this.value.length<this.length;H(this.internals,{valueMissing:e,customError:!!this.error},this.error||(e?v().otpRequired:""),this.boxes?.[0])}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t??""}focus(t){this.box(Math.min(this.value.length,this.length-1))?.focus(t)}get inactive(){return this.disabled||this.formDisabled}clean(t){let e=this.type==="numeric"?/[0-9]/:/[A-Za-z0-9]/;return[...t].filter(a=>e.test(a)).join("").toUpperCase().slice(0,Math.max(1,this.length))}box(t){return this.boxes?.[t]}commit(t){let e=this.clean(t);if(e===this.value){this.requestUpdate();return}this.value=e,y(this,"kt-change",{value:e}),e.length===this.length&&y(this,"kt-complete",{value:e})}onInput(t,e){let a=this.clean(t.target.value),r=Math.min(e,this.value.length);if(!a){this.commit(this.value);return}let i=(this.value.slice(0,r)+a).slice(0,this.length);this.commit(i+this.value.slice(r+a.length)),this.updateComplete.then(()=>this.box(Math.min(i.length,this.length-1))?.focus())}onKeyDown(t,e){let a=r=>{t.preventDefault(),this.box(Math.max(0,Math.min(this.length-1,r)))?.focus()};switch(t.key){case"Backspace":{t.preventDefault();let r=e<this.value.length?e:this.value.length-1;if(r<0)return;this.commit(this.value.slice(0,r)+this.value.slice(r+1)),this.updateComplete.then(()=>this.box(r)?.focus());break}case"ArrowLeft":a(e-1);break;case"ArrowRight":a(Math.min(e+1,this.value.length));break;case"Home":a(0);break;case"End":a(this.value.length);break}}onPaste(t,e){let a=this.clean(t.clipboardData?.getData("text")??"");if(!a)return;t.preventDefault();let r=Math.min(e,this.value.length),i=(this.value.slice(0,r)+a).slice(0,this.length);this.commit(i),this.updateComplete.then(()=>this.box(Math.min(i.length,this.length-1))?.focus())}render(){let t=v(),e=Math.max(1,Math.round(this.length));return l`<div part="group" class="group" role="group" aria-label=${this.label||d}>
5608
5654
  ${Array.from({length:e},(a,r)=>{let i=this.value[r]??"";return l`<input
5609
5655
  part="box"
5610
5656
  .value=${nt(i)}
@@ -5623,7 +5669,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5623
5669
  @focus=${s=>s.target.select()}
5624
5670
  />`})}
5625
5671
  </div>
5626
- ${this.error?l`<p part="error" class="error" id=${this.errorId}>${this.error}</p>`:d}`}};Ee([n({type:String})],Nt.prototype,"value");Ee([n({type:Number})],Nt.prototype,"length");Ee([n({type:String})],Nt.prototype,"type");Ee([n({type:String})],Nt.prototype,"label");Ee([n({type:String})],Nt.prototype,"name");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"required");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"disabled");Ee([n({type:String,reflect:!0})],Nt.prototype,"error");Ee([x()],Nt.prototype,"formDisabled");Ee([sa("input")],Nt.prototype,"boxes");g("kt-otp-input",Nt);var _d=Object.defineProperty,Vd=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&_d(t,e,r),r},Ua=class extends c{constructor(){super(...arguments),this.multiple=!1,this.onToggle=t=>{let e=t.target;if(e.parentElement!==this)return;if(!this.multiple&&e.open)for(let r of this.sections)r!==e&&(r.open=!1);let a=this.sections.flatMap((r,i)=>r.open?[i]:[]);y(this,"kt-change",{open:a})},this.onKeyDown=t=>{let e=t.target;if(e.parentElement!==this||t.composedPath()[0].localName!=="summary")return;let a=this.sections,r=a.indexOf(e),i={ArrowDown:(r+1)%a.length,ArrowUp:(r-1+a.length)%a.length,Home:0,End:a.length-1}[t.key];i!==void 0&&(t.preventDefault(),a[i]?.focus())}}static{this.styles=[c.styles,f`
5672
+ ${this.error?l`<p part="error" class="error" id=${this.errorId}>${this.error}</p>`:d}`}};Ee([n({type:String})],Nt.prototype,"value");Ee([n({type:Number})],Nt.prototype,"length");Ee([n({type:String})],Nt.prototype,"type");Ee([n({type:String})],Nt.prototype,"label");Ee([n({type:String})],Nt.prototype,"name");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"required");Ee([n({type:Boolean,reflect:!0})],Nt.prototype,"disabled");Ee([n({type:String,reflect:!0})],Nt.prototype,"error");Ee([x()],Nt.prototype,"formDisabled");Ee([sa("input")],Nt.prototype,"boxes");g("kt-otp-input",Nt);var Vd=Object.defineProperty,Gd=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Vd(t,e,r),r},Na=class extends c{constructor(){super(...arguments),this.multiple=!1,this.onToggle=t=>{let e=t.target;if(e.parentElement!==this)return;if(!this.multiple&&e.open)for(let r of this.sections)r!==e&&(r.open=!1);let a=this.sections.flatMap((r,i)=>r.open?[i]:[]);y(this,"kt-change",{open:a})},this.onKeyDown=t=>{let e=t.target;if(e.parentElement!==this||t.composedPath()[0].localName!=="summary")return;let a=this.sections,r=a.indexOf(e),i={ArrowDown:(r+1)%a.length,ArrowUp:(r-1+a.length)%a.length,Home:0,End:a.length-1}[t.key];i!==void 0&&(t.preventDefault(),a[i]?.focus())}}static{this.styles=[c.styles,f`
5627
5673
  :host {
5628
5674
  display: block;
5629
5675
  }
@@ -5631,7 +5677,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5631
5677
  ::slotted(kt-collapsible:first-child) {
5632
5678
  border-top: var(--border-width) solid var(--border-subtle);
5633
5679
  }
5634
- `]}connectedCallback(){super.connectedCallback(),this.addEventListener("kt-toggle",this.onToggle),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("kt-toggle",this.onToggle),this.removeEventListener("keydown",this.onKeyDown)}get sections(){return[...this.children].filter(t=>t.localName==="kt-collapsible")}firstUpdated(){this.settle()}settle(){if(this.multiple)return;let t=!1;for(let e of this.sections)e.open&&(t&&(e.open=!1),t=!0)}render(){return l`<slot @slotchange=${()=>this.settle()}></slot>`}};Vd([n({type:Boolean,reflect:!0})],Ua.prototype,"multiple");g("kt-accordion",Ua);var Gd=Object.defineProperty,Xr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Gd(t,e,r),r},ye=class extends c{constructor(){super(...arguments),this.name="",this.email="",this.avatar="",this.items=[],this.showName=!1,this.open=!1,this.menuId=q("kt-user-menu"),this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.trigger,align:()=>"end"}),this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.hide(!1)}}static{this.styles=[c.styles,ht,f`
5680
+ `]}connectedCallback(){super.connectedCallback(),this.addEventListener("kt-toggle",this.onToggle),this.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("kt-toggle",this.onToggle),this.removeEventListener("keydown",this.onKeyDown)}get sections(){return[...this.children].filter(t=>t.localName==="kt-collapsible")}firstUpdated(){this.settle()}settle(){if(this.multiple)return;let t=!1;for(let e of this.sections)e.open&&(t&&(e.open=!1),t=!0)}render(){return l`<slot @slotchange=${()=>this.settle()}></slot>`}};Gd([n({type:Boolean,reflect:!0})],Na.prototype,"multiple");g("kt-accordion",Na);var Wd=Object.defineProperty,Pr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Wd(t,e,r),r},ie=class extends c{constructor(){super(...arguments),this.name="",this.email="",this.avatar="",this.items=[],this.showName=!1,this.block=!1,this.open=!1,this.menuId=q("kt-user-menu"),this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".panel"),anchor:()=>this.trigger,align:()=>this.block?"start":"end",matchWidth:()=>this.block}),this.onDocumentPointerDown=t=>{t.composedPath().includes(this)||this.hide(!1)}}static{this.styles=[c.styles,ht,f`
5635
5681
  :host {
5636
5682
  display: inline-block;
5637
5683
  }
@@ -5651,6 +5697,50 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5651
5697
  :host([show-name]) .trigger {
5652
5698
  padding-inline-end: 10px;
5653
5699
  }
5700
+
5701
+ /* Block: the account at the foot of a sidebar, shaped as the navigation
5702
+ items above it — as wide, as round, as padded — not a pill. */
5703
+ :host([block]) {
5704
+ display: block;
5705
+ }
5706
+ :host([block]) .trigger {
5707
+ display: flex;
5708
+ box-sizing: border-box;
5709
+ width: 100%;
5710
+ gap: 10px;
5711
+ padding: var(--padding-sub-menu-item);
5712
+ /* The avatar (24px) centred on the navigation's icons (16px), on their inset. */
5713
+ padding-inline: calc(var(--nav-pad-left, 16px) - 4px) 8px;
5714
+ text-align: left;
5715
+ border-radius: var(--radius-input);
5716
+ }
5717
+ :host([block]:not([show-name])) .trigger {
5718
+ justify-content: center;
5719
+ padding-inline: 0;
5720
+ }
5721
+ .trigger-text {
5722
+ display: grid;
5723
+ flex: 1;
5724
+ min-width: 0;
5725
+ }
5726
+ .trigger-name,
5727
+ .trigger-email {
5728
+ overflow: hidden;
5729
+ white-space: nowrap;
5730
+ text-overflow: ellipsis;
5731
+ }
5732
+ .trigger-name {
5733
+ color: var(--text-body);
5734
+ font: var(--font-normal-medium);
5735
+ }
5736
+ .trigger-email {
5737
+ color: var(--text-muted);
5738
+ font: var(--font-normal-small);
5739
+ }
5740
+ .trigger-chevron {
5741
+ flex: none;
5742
+ color: var(--text-muted);
5743
+ }
5654
5744
  .trigger:hover {
5655
5745
  background: var(--surface-hover);
5656
5746
  }
@@ -5779,7 +5869,11 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5779
5869
  @keydown=${this.onTriggerKeyDown}
5780
5870
  >
5781
5871
  <kt-avatar name=${this.name} src=${this.avatar||d} size="small"></kt-avatar>
5782
- ${this.showName?l`<span aria-hidden="true">${this.name}</span>`:d}
5872
+ ${this.block&&this.showName?l`<span class="trigger-text" aria-hidden="true">
5873
+ <span class="trigger-name">${this.name}</span>
5874
+ ${this.email?l`<span class="trigger-email">${this.email}</span>`:d}
5875
+ </span>
5876
+ <kt-icon class="trigger-chevron" name="chevrons-up-down" size="16"></kt-icon>`:this.showName?l`<span aria-hidden="true">${this.name}</span>`:d}
5783
5877
  </button>
5784
5878
  ${this.open?l`<div part="panel" class="panel floating" popover="manual">
5785
5879
  <div class="who">
@@ -5798,7 +5892,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5798
5892
  ${this.items.map(t=>this.renderItem(t))}
5799
5893
  </ul>
5800
5894
  <div class="extra"><slot></slot></div>
5801
- </div>`:d}`}};Xr([n({type:String})],ye.prototype,"name");Xr([n({type:String})],ye.prototype,"email");Xr([n({type:String})],ye.prototype,"avatar");Xr([n({attribute:!1})],ye.prototype,"items");Xr([n({type:Boolean,reflect:!0,attribute:"show-name"})],ye.prototype,"showName");Xr([x()],ye.prototype,"open");Xr([A(".trigger")],ye.prototype,"trigger");g("kt-user-menu",ye);var Wd=Object.defineProperty,Na=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Wd(t,e,r),r},sr=class extends c{constructor(){super(...arguments),this.items=[],this.expanded=[],this.selected="",this.label="",this.active=""}static{this.styles=[c.styles,f`
5895
+ </div>`:d}`}};Pr([n({type:String})],ie.prototype,"name");Pr([n({type:String})],ie.prototype,"email");Pr([n({type:String})],ie.prototype,"avatar");Pr([n({attribute:!1})],ie.prototype,"items");Pr([n({type:Boolean,reflect:!0,attribute:"show-name"})],ie.prototype,"showName");Pr([n({type:Boolean,reflect:!0})],ie.prototype,"block");Pr([x()],ie.prototype,"open");Pr([A(".trigger")],ie.prototype,"trigger");g("kt-user-menu",ie);var Yd=Object.defineProperty,Ha=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Yd(t,e,r),r},nr=class extends c{constructor(){super(...arguments),this.items=[],this.expanded=[],this.selected="",this.label="",this.active=""}static{this.styles=[c.styles,f`
5802
5896
  :host {
5803
5897
  display: block;
5804
5898
  }
@@ -5897,7 +5991,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5897
5991
  ${a.item.icon?l`<kt-icon class="icon" name=${a.item.icon} size="16"></kt-icon>`:d}
5898
5992
  <span class="label">${a.item.label}</span>
5899
5993
  </li>`})}
5900
- </ul>`}};Na([n({attribute:!1})],sr.prototype,"items");Na([n({attribute:!1})],sr.prototype,"expanded");Na([n({type:String})],sr.prototype,"selected");Na([n({type:String})],sr.prototype,"label");Na([x()],sr.prototype,"active");g("kt-tree",sr);var fn=o=>{let t=o/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},_i=o=>255*(o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055);function Yd([o,t,e]){let[a,r,i]=[o,t,e].map(fn),s=Math.cbrt(.4122214708*a+.5363325363*r+.0514459929*i),p=Math.cbrt(.2119034982*a+.6806995451*r+.1073969566*i),h=Math.cbrt(.0883024619*a+.2817188376*r+.6299787005*i),u=.2104542553*s+.793617785*p-.0040720468*h,m=1.9779984951*s-2.428592205*p+.4505937099*h,b=.0259040371*s+.7827717662*p-.808675766*h;return[u,Math.hypot(m,b),(Math.atan2(b,m)*180/Math.PI+360)%360]}function ja([o,t,e]){let a=t*Math.cos(e*Math.PI/180),r=t*Math.sin(e*Math.PI/180),i=(o+.3963377774*a+.2158037573*r)**3,s=(o-.1055613458*a-.0638541728*r)**3,p=(o-.0894841775*a-1.291485548*r)**3;return[_i(4.0767416621*i-3.3077115913*s+.2309699292*p),_i(-1.2684380046*i+2.6097574011*s-.3413193965*p),_i(-.0041960863*i-.7034186147*s+1.707614701*p)]}var cn=o=>o.every(t=>t>=-.5&&t<=255.5);function mn(o,t,e){if(cn(ja([o,e,t])))return e;let a=0,r=e;for(let i=0;i<24;i+=1){let s=(a+r)/2;cn(ja([o,s,t]))?a=s:r=s}return a}var Gi=o=>o.map(t=>Math.min(255,Math.max(0,Math.round(t))));function hn(o){let[t,e,a]=o.map(fn);return .2126*t+.7152*e+.0722*a}function Bo(o,t){let[e,a]=[hn(o),hn(t)].sort((r,i)=>i-r);return(e+.05)/(a+.05)}var un=(o,t,e)=>o.map((a,r)=>a*t+e[r]*(1-t)),Lo=o=>`#${Gi(o).map(t=>t.toString(16).padStart(2,"0")).join("")}`;function Wi(o){let t=o.trim().toLowerCase(),e=/^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(t);if(e){let a=e[1].length===3?[...e[1]].map(r=>r+r).join(""):e[1];return[0,2,4].map(r=>parseInt(a.slice(r,r+2),16))}if(e=/^rgba?\(\s*(\d*\.?\d+)[\s,]+(\d*\.?\d+)[\s,]+(\d*\.?\d+)(?:\s*[,/]\s*\d*\.?\d+%?)?\s*\)$/.exec(t),e){let a=e.slice(1,4).map(Number);if(a.every(r=>r<=255))return a}if(e=/^oklch\(\s*(\d*\.?\d+)(%?)\s+(\d*\.?\d+)\s+(\d*\.?\d+)(?:deg)?\s*(?:\/\s*\d*\.?\d+%?\s*)?\)$/.exec(t),e){let a=Number(e[1])/(e[2]?100:1),r=Number(e[4]);if(a<=1)return Gi(ja([a,mn(a,r,Number(e[3])),r]))}throw new TypeError(`Not a colour Kanto can read: "${o}". Use #rrggbb, rgb() or oklch().`)}var gn={base:"#5f5dea",hover:"#5856e0",textDark:"#8e97ff",textLight:"#4f30ef",wash:"rgba(111, 116, 246, 0.16)",neutralHue:278,neutralChroma:1},Oo=[{id:"violet",label:"Violet",color:"#5f5dea"},{id:"blue",label:"Blue",color:"#1f6feb"},{id:"teal",label:"Teal",color:"#0d9488"},{id:"green",label:"Green",color:"#16a34a"},{id:"orange",label:"Orange",color:"#ea580c"},{id:"pink",label:"Pink",color:"#db2777"},{id:"slate",label:"Slate",color:"#64748b"}],Xd=[.3074,.018,16.5],Zd=[[1,0,0],[.9023,.0081,8.2]],Qd=[244,244,245],Vi=4.6;function vn(o){let[t,e,a]=Yd(Wi(o)),r=e<5e-4?0:a,i=Math.round(Math.min(1,e/.08)*100)/100,s=T=>ja([T,mn(T,r,e),r]),p=([T,et,K])=>ja([T,et*i,r+K]),h=Math.min(t,.72);for(;h>0&&Bo(Qd,s(h))<Vi;)h-=.0025;let u=s(h),m=T=>[T,un(u,.12,T),un(u,.16,T)],b=m(p(Xd)),k=.45;for(;k<1&&b.some(T=>Bo(s(k),T)<Vi);)k+=.0025;let $=Zd.map(p).flatMap(m),D=.7;for(;D>0&&$.some(T=>Bo(s(D),T)<Vi);)D-=.0025;let[S,P,O]=Gi(u);return{base:Lo(u),hover:Lo(s(Math.max(0,h-.025))),textDark:Lo(s(k)),textLight:Lo(s(D)),wash:`rgba(${S}, ${P}, ${O}, 0.16)`,neutralHue:Math.round(r*10)/10,neutralChroma:i}}function Yi(o){return{"--accent-base":o.base,"--accent-hover":o.hover,"--accent-text-dark":o.textDark,"--accent-text-light":o.textLight,"--accent-wash":o.wash,"--neutral-hue":String(o.neutralHue),"--neutral-chroma":String(o.neutralChroma)}}var Jd=Object.keys(Yi(gn));function Xi(o,t=document.documentElement){if(o===null){for(let e of Jd)t.style.removeProperty(e);t.dataset.accent==="custom"&&delete t.dataset.accent;return}for(let[e,a]of Object.entries(Yi(vn(o))))t.style.setProperty(e,a);t.dataset.accent??="custom"}var tp=Object.defineProperty,Zr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&tp(t,e,r),r},ep=/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i;function Ha(o){let t=ep.exec(o.trim());if(!t)return null;let e=t[1].toLowerCase();return`#${e.length===3?[...e].map(a=>a+a).join(""):e}`}var ke=class extends c{constructor(){super(...arguments),this.value="",this.swatches=Oo.map(t=>({value:t.color,label:t.label})),this.label="",this.name="",this.disabled=!1,this.noCustom=!1,this.formDisabled=!1,this.internals=null,this.defaultValue=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
5994
+ </ul>`}};Ha([n({attribute:!1})],nr.prototype,"items");Ha([n({attribute:!1})],nr.prototype,"expanded");Ha([n({type:String})],nr.prototype,"selected");Ha([n({type:String})],nr.prototype,"label");Ha([x()],nr.prototype,"active");g("kt-tree",nr);var mn=o=>{let t=o/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4},Vi=o=>255*(o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055);function Xd([o,t,e]){let[a,r,i]=[o,t,e].map(mn),s=Math.cbrt(.4122214708*a+.5363325363*r+.0514459929*i),p=Math.cbrt(.2119034982*a+.6806995451*r+.1073969566*i),h=Math.cbrt(.0883024619*a+.2817188376*r+.6299787005*i),u=.2104542553*s+.793617785*p-.0040720468*h,m=1.9779984951*s-2.428592205*p+.4505937099*h,b=.0259040371*s+.7827717662*p-.808675766*h;return[u,Math.hypot(m,b),(Math.atan2(b,m)*180/Math.PI+360)%360]}function _a([o,t,e]){let a=t*Math.cos(e*Math.PI/180),r=t*Math.sin(e*Math.PI/180),i=(o+.3963377774*a+.2158037573*r)**3,s=(o-.1055613458*a-.0638541728*r)**3,p=(o-.0894841775*a-1.291485548*r)**3;return[Vi(4.0767416621*i-3.3077115913*s+.2309699292*p),Vi(-1.2684380046*i+2.6097574011*s-.3413193965*p),Vi(-.0041960863*i-.7034186147*s+1.707614701*p)]}var hn=o=>o.every(t=>t>=-.5&&t<=255.5);function gn(o,t,e){if(hn(_a([o,e,t])))return e;let a=0,r=e;for(let i=0;i<24;i+=1){let s=(a+r)/2;hn(_a([o,s,t]))?a=s:r=s}return a}var Wi=o=>o.map(t=>Math.min(255,Math.max(0,Math.round(t))));function un(o){let[t,e,a]=o.map(mn);return .2126*t+.7152*e+.0722*a}function Bo(o,t){let[e,a]=[un(o),un(t)].sort((r,i)=>i-r);return(e+.05)/(a+.05)}var fn=(o,t,e)=>o.map((a,r)=>a*t+e[r]*(1-t)),Lo=o=>`#${Wi(o).map(t=>t.toString(16).padStart(2,"0")).join("")}`;function Yi(o){let t=o.trim().toLowerCase(),e=/^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(t);if(e){let a=e[1].length===3?[...e[1]].map(r=>r+r).join(""):e[1];return[0,2,4].map(r=>parseInt(a.slice(r,r+2),16))}if(e=/^rgba?\(\s*(\d*\.?\d+)[\s,]+(\d*\.?\d+)[\s,]+(\d*\.?\d+)(?:\s*[,/]\s*\d*\.?\d+%?)?\s*\)$/.exec(t),e){let a=e.slice(1,4).map(Number);if(a.every(r=>r<=255))return a}if(e=/^oklch\(\s*(\d*\.?\d+)(%?)\s+(\d*\.?\d+)\s+(\d*\.?\d+)(?:deg)?\s*(?:\/\s*\d*\.?\d+%?\s*)?\)$/.exec(t),e){let a=Number(e[1])/(e[2]?100:1),r=Number(e[4]);if(a<=1)return Wi(_a([a,gn(a,r,Number(e[3])),r]))}throw new TypeError(`Not a colour Kanto can read: "${o}". Use #rrggbb, rgb() or oklch().`)}var vn={base:"#5f5dea",hover:"#5856e0",textDark:"#8e97ff",textLight:"#4f30ef",wash:"rgba(111, 116, 246, 0.16)",neutralHue:278,neutralChroma:1},Oo=[{id:"violet",label:"Violet",color:"#5f5dea"},{id:"blue",label:"Blue",color:"#1f6feb"},{id:"teal",label:"Teal",color:"#0d9488"},{id:"green",label:"Green",color:"#16a34a"},{id:"orange",label:"Orange",color:"#ea580c"},{id:"pink",label:"Pink",color:"#db2777"},{id:"slate",label:"Slate",color:"#64748b"}],Zd=[.3074,.018,16.5],Qd=[[1,0,0],[.9023,.0081,8.2]],Jd=[244,244,245],Gi=4.6;function bn(o){let[t,e,a]=Xd(Yi(o)),r=e<5e-4?0:a,i=Math.round(Math.min(1,e/.08)*100)/100,s=T=>_a([T,gn(T,r,e),r]),p=([T,et,z])=>_a([T,et*i,r+z]),h=Math.min(t,.72);for(;h>0&&Bo(Jd,s(h))<Gi;)h-=.0025;let u=s(h),m=T=>[T,fn(u,.12,T),fn(u,.16,T)],b=m(p(Zd)),k=.45;for(;k<1&&b.some(T=>Bo(s(k),T)<Gi);)k+=.0025;let $=Qd.map(p).flatMap(m),D=.7;for(;D>0&&$.some(T=>Bo(s(D),T)<Gi);)D-=.0025;let[S,P,O]=Wi(u);return{base:Lo(u),hover:Lo(s(Math.max(0,h-.025))),textDark:Lo(s(k)),textLight:Lo(s(D)),wash:`rgba(${S}, ${P}, ${O}, 0.16)`,neutralHue:Math.round(r*10)/10,neutralChroma:i}}function Xi(o){return{"--accent-base":o.base,"--accent-hover":o.hover,"--accent-text-dark":o.textDark,"--accent-text-light":o.textLight,"--accent-wash":o.wash,"--neutral-hue":String(o.neutralHue),"--neutral-chroma":String(o.neutralChroma)}}var tp=Object.keys(Xi(vn));function Zi(o,t=document.documentElement){if(o===null){for(let e of tp)t.style.removeProperty(e);t.dataset.accent==="custom"&&delete t.dataset.accent;return}for(let[e,a]of Object.entries(Xi(bn(o))))t.style.setProperty(e,a);t.dataset.accent??="custom"}var ep=Object.defineProperty,Zr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ep(t,e,r),r},rp=/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i;function ja(o){let t=rp.exec(o.trim());if(!t)return null;let e=t[1].toLowerCase();return`#${e.length===3?[...e].map(a=>a+a).join(""):e}`}var ke=class extends c{constructor(){super(...arguments),this.value="",this.swatches=Oo.map(t=>({value:t.color,label:t.label})),this.label="",this.name="",this.disabled=!1,this.noCustom=!1,this.formDisabled=!1,this.internals=null,this.defaultValue=""}static{this.formAssociated=!0}static{this.styles=[c.styles,f`
5901
5995
  :host {
5902
5996
  display: inline-block;
5903
5997
  --kt-swatch-size: 24px;
@@ -5974,7 +6068,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
5974
6068
  .hex:focus {
5975
6069
  outline-color: var(--color-primary-base);
5976
6070
  }
5977
- `]}connectedCallback(){super.connectedCallback(),this.internals??=R(this),this.value=Ha(this.value)??"",this.defaultValue=this.value}willUpdate(t){if(t.has("value")){let e=Ha(this.value)??"";e!==this.value&&(this.value=e),B(this.internals,this.value||null)}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t??""}get inactive(){return this.disabled||this.formDisabled}get presets(){return this.swatches.flatMap(t=>{let e=Ha(t.value);return e?t.label===void 0?[{value:e}]:[{value:e,label:t.label}]:[]})}pick(t){!t||t===this.value||this.inactive||(this.value=t,y(this,"kt-change",{value:t}))}onKeyDown(t,e){let a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key];if(a===void 0)return;t.preventDefault();let r=this.presets,i=r[(e+a+r.length)%r.length];this.pick(i.value),this.updateComplete.then(()=>this.shadowRoot?.querySelectorAll('[role="radio"]')[r.indexOf(i)]?.focus())}render(){let t=v(),e=this.presets,a=e.findIndex(i=>i.value===this.value),r=a===-1&&!!this.value;return l`<div class="picker">
6071
+ `]}connectedCallback(){super.connectedCallback(),this.internals??=K(this),this.value=ja(this.value)??"",this.defaultValue=this.value}willUpdate(t){if(t.has("value")){let e=ja(this.value)??"";e!==this.value&&(this.value=e),B(this.internals,this.value||null)}}formResetCallback(){this.value=this.defaultValue}formDisabledCallback(t){this.formDisabled=t}formStateRestoreCallback(t){this.value=t??""}get inactive(){return this.disabled||this.formDisabled}get presets(){return this.swatches.flatMap(t=>{let e=ja(t.value);return e?t.label===void 0?[{value:e}]:[{value:e,label:t.label}]:[]})}pick(t){!t||t===this.value||this.inactive||(this.value=t,y(this,"kt-change",{value:t}))}onKeyDown(t,e){let a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key];if(a===void 0)return;t.preventDefault();let r=this.presets,i=r[(e+a+r.length)%r.length];this.pick(i.value),this.updateComplete.then(()=>this.shadowRoot?.querySelectorAll('[role="radio"]')[r.indexOf(i)]?.focus())}render(){let t=v(),e=this.presets,a=e.findIndex(i=>i.value===this.value),r=a===-1&&!!this.value;return l`<div class="picker">
5978
6072
  <div
5979
6073
  part="swatches"
5980
6074
  class="swatches"
@@ -6008,7 +6102,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6008
6102
  aria-label=${t.customColour}
6009
6103
  .value=${nt(this.value||e[0]?.value||"#000000")}
6010
6104
  ?disabled=${this.inactive}
6011
- @input=${i=>this.pick(Ha(i.target.value))}
6105
+ @input=${i=>this.pick(ja(i.target.value))}
6012
6106
  />
6013
6107
  </label>
6014
6108
  <input
@@ -6022,9 +6116,9 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6022
6116
  aria-label=${t.hexColour}
6023
6117
  .value=${nt(this.value)}
6024
6118
  ?disabled=${this.inactive}
6025
- @input=${i=>this.pick(Ha(i.target.value))}
6119
+ @input=${i=>this.pick(ja(i.target.value))}
6026
6120
  />`}
6027
- </div>`}};Zr([n({type:String})],ke.prototype,"value");Zr([n({attribute:!1})],ke.prototype,"swatches");Zr([n({type:String})],ke.prototype,"label");Zr([n({type:String})],ke.prototype,"name");Zr([n({type:Boolean,reflect:!0})],ke.prototype,"disabled");Zr([n({type:Boolean,attribute:"no-custom"})],ke.prototype,"noCustom");Zr([x()],ke.prototype,"formDisabled");g("kt-color-picker",ke);var rp=Object.defineProperty,Ko=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&rp(t,e,r),r},Sr=class extends c{constructor(){super(...arguments),this.steps=[],this.open=!1,this.index=0,this.lit=null,this.titleId=q("kt-tour-title"),this.frame=0,this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".card:not(.centred)"),anchor:()=>this.target}),this.onKeyDown=t=>{t.key==="Escape"&&this.close()},this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.measure())}}static{this.styles=[c.styles,ht,f`
6121
+ </div>`}};Zr([n({type:String})],ke.prototype,"value");Zr([n({attribute:!1})],ke.prototype,"swatches");Zr([n({type:String})],ke.prototype,"label");Zr([n({type:String})],ke.prototype,"name");Zr([n({type:Boolean,reflect:!0})],ke.prototype,"disabled");Zr([n({type:Boolean,attribute:"no-custom"})],ke.prototype,"noCustom");Zr([x()],ke.prototype,"formDisabled");g("kt-color-picker",ke);var ap=Object.defineProperty,zo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ap(t,e,r),r},Ar=class extends c{constructor(){super(...arguments),this.steps=[],this.open=!1,this.index=0,this.lit=null,this.titleId=q("kt-tour-title"),this.frame=0,this.floating=new at(this,{panel:()=>this.shadowRoot?.querySelector(".card:not(.centred)"),anchor:()=>this.target,side:()=>this.side()}),this.onKeyDown=t=>{t.key==="Escape"&&this.close()},this.follow=()=>{cancelAnimationFrame(this.frame),this.frame=requestAnimationFrame(()=>this.measure())}}static{this.styles=[c.styles,ht,f`
6028
6122
  :host {
6029
6123
  display: contents;
6030
6124
  }
@@ -6089,7 +6183,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6089
6183
  color: var(--text-muted);
6090
6184
  font: var(--font-normal-small);
6091
6185
  }
6092
- `]}start(t=0){this.steps.length&&(this.index=Math.max(0,Math.min(this.steps.length-1,t)),this.open=!0)}close(){this.open&&(this.open=!1,y(this,"kt-close"))}next(){if(this.index>=this.steps.length-1){this.open=!1,y(this,"kt-finish");return}this.index+=1}previous(){this.index>0&&(this.index-=1)}get step(){return this.steps[this.index]}get element(){let t=this.step?.target;return t?typeof t=="string"?document.querySelector(t):t:null}get target(){let t=this.element;if(!t)return null;let e=t.getBoundingClientRect();return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<innerWidth&&e.top<innerHeight?t:null}disconnectedCallback(){super.disconnectedCallback(),this.listen(!1)}listen(t){N(t,document,"keydown",this.onKeyDown),N(t,window,"resize",this.follow),N(t,window,"scroll",this.follow,{capture:!0,passive:!0})}measure(){this.lit=this.target?.getBoundingClientRect()??null}willUpdate(t){(t.has("open")||t.has("index"))&&this.open&&(this.element?.scrollIntoView?.({block:"nearest",inline:"nearest"}),this.measure())}updated(t){if(t.has("open")&&this.listen(this.open),!this.isConnected)return;let e=this.shadowRoot?.querySelector(".spotlight"),a=this.shadowRoot?.querySelector(".card");for(let r of[e,a])r&&typeof r.showPopover=="function"&&!r.matches(":popover-open")&&r.showPopover();this.floating.sync(this.open&&!!this.target),(t.has("open")||t.has("index"))&&this.open&&(y(this,"kt-step",{index:this.index}),this.updateComplete.then(()=>a?.focus()))}render(){let t=this.step;if(!this.open||!t)return l``;let e=v(),a=this.index===this.steps.length-1,r=6,i=this.lit;return l`${i?l`<div
6186
+ `]}side(){let t=this.target?.getBoundingClientRect(),e=this.shadowRoot?.querySelector(".card")?.offsetHeight??0;return!t||Math.max(t.top,innerHeight-t.bottom)>=e+16?"bottom":innerWidth-t.right>=t.left?"right":"left"}start(t=0){this.steps.length&&(this.index=Math.max(0,Math.min(this.steps.length-1,t)),this.open=!0)}close(){this.open&&(this.open=!1,y(this,"kt-close"))}next(){if(this.index>=this.steps.length-1){this.open=!1,y(this,"kt-finish");return}this.index+=1}previous(){this.index>0&&(this.index-=1)}get step(){return this.steps[this.index]}get element(){let t=this.step?.target;return t?typeof t=="string"?document.querySelector(t):t:null}get target(){let t=this.element;if(!t)return null;let e=t.getBoundingClientRect();return e.width>0&&e.height>0&&e.right>0&&e.bottom>0&&e.left<innerWidth&&e.top<innerHeight?t:null}disconnectedCallback(){super.disconnectedCallback(),this.listen(!1)}listen(t){N(t,document,"keydown",this.onKeyDown),N(t,window,"resize",this.follow),N(t,window,"scroll",this.follow,{capture:!0,passive:!0})}measure(){this.lit=this.target?.getBoundingClientRect()??null}willUpdate(t){(t.has("open")||t.has("index"))&&this.open&&(this.element?.scrollIntoView?.({block:"nearest",inline:"nearest"}),this.measure())}updated(t){if(t.has("open")&&this.listen(this.open),!this.isConnected)return;let e=this.shadowRoot?.querySelector(".spotlight"),a=this.shadowRoot?.querySelector(".card");for(let r of[e,a])r&&typeof r.showPopover=="function"&&!r.matches(":popover-open")&&r.showPopover();this.floating.sync(this.open&&!!this.target),(t.has("open")||t.has("index"))&&this.open&&(y(this,"kt-step",{index:this.index}),this.updateComplete.then(()=>a?.focus()))}render(){let t=this.step;if(!this.open||!t)return l``;let e=v(),a=this.index===this.steps.length-1,r=6,i=this.lit;return l`${i?l`<div
6093
6187
  part="spotlight"
6094
6188
  class="spotlight"
6095
6189
  popover="manual"
@@ -6122,7 +6216,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6122
6216
  >`:d}
6123
6217
  <kt-button size="small" @click=${()=>this.next()}>${a?e.done:e.next}</kt-button>
6124
6218
  </div>
6125
- </div>`}};Ko([n({attribute:!1})],Sr.prototype,"steps");Ko([x()],Sr.prototype,"open");Ko([x()],Sr.prototype,"index");Ko([x()],Sr.prototype,"lit");g("kt-tour",Sr);function Q(o,t,e="",a=2){switch(Number.isFinite(o)?Math.min(6,Math.max(1,Math.round(o))):a){case 1:return l`<h1 class=${e}>${t}</h1>`;case 3:return l`<h3 class=${e}>${t}</h3>`;case 4:return l`<h4 class=${e}>${t}</h4>`;case 5:return l`<h5 class=${e}>${t}</h5>`;case 6:return l`<h6 class=${e}>${t}</h6>`;default:return l`<h2 class=${e}>${t}</h2>`}}var ap=Object.defineProperty,va=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ap(t,e,r),r},op={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-alert",neutral:"info"},Ie=class extends c{constructor(){super(...arguments),this.variant="info",this.heading="",this.description="",this.dismissible=!1,this.noIcon=!1,this.icon=""}static{this.styles=[c.styles,f`
6219
+ </div>`}};zo([n({attribute:!1})],Ar.prototype,"steps");zo([x()],Ar.prototype,"open");zo([x()],Ar.prototype,"index");zo([x()],Ar.prototype,"lit");g("kt-tour",Ar);function Q(o,t,e="",a=2){switch(Number.isFinite(o)?Math.min(6,Math.max(1,Math.round(o))):a){case 1:return l`<h1 class=${e}>${t}</h1>`;case 3:return l`<h3 class=${e}>${t}</h3>`;case 4:return l`<h4 class=${e}>${t}</h4>`;case 5:return l`<h5 class=${e}>${t}</h5>`;case 6:return l`<h6 class=${e}>${t}</h6>`;default:return l`<h2 class=${e}>${t}</h2>`}}var op=Object.defineProperty,va=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&op(t,e,r),r},ip={info:"info",success:"circle-check",warning:"triangle-alert",danger:"circle-alert",neutral:"info"},Ie=class extends c{constructor(){super(...arguments),this.variant="info",this.heading="",this.description="",this.dismissible=!1,this.noIcon=!1,this.icon=""}static{this.styles=[c.styles,f`
6126
6220
  :host {
6127
6221
  display: block;
6128
6222
  }
@@ -6229,7 +6323,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6229
6323
  }
6230
6324
  `]}render(){let t=this.variant==="danger"?"assertive":"polite";return l`<div part="base" class="alert" role="alert" aria-live=${t}>
6231
6325
  ${this.noIcon?d:l`<span class="icon">
6232
- <kt-icon name=${this.icon||op[this.variant]} size="20"></kt-icon>
6326
+ <kt-icon name=${this.icon||ip[this.variant]} size="20"></kt-icon>
6233
6327
  </span>`}
6234
6328
 
6235
6329
  <div class="content">
@@ -6247,7 +6341,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6247
6341
  >
6248
6342
  <kt-icon name="x" size="16"></kt-icon>
6249
6343
  </button>`:d}
6250
- </div>`}};va([n({type:String,reflect:!0})],Ie.prototype,"variant");va([n({type:String})],Ie.prototype,"heading");va([n({type:String})],Ie.prototype,"description");va([n({type:Boolean})],Ie.prototype,"dismissible");va([n({type:Boolean,attribute:"no-icon"})],Ie.prototype,"noIcon");va([n({type:String})],Ie.prototype,"icon");g("kt-alert",Ie);var ip=Object.defineProperty,Fe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&ip(t,e,r),r},sp={signInHeading:"Sign in",signInLead:"Welcome back. Sign in to carry on.",signUpHeading:"Create an account",signUpLead:"It takes a minute, and no card.",forgotHeading:"Reset your password",forgotLead:"We will email you a link to choose a new one.",codeHeading:"Check your phone",codeLead:"Enter the code we sent you.",name:"Name",email:"Email",password:"Password",code:"Verification code",remember:"Keep me signed in",forgotLink:"Forgot password?",signIn:"Sign in",signUp:"Create account",sendLink:"Send the link",verify:"Verify",toSignUp:"No account yet?",toSignUpLink:"Create an account",toSignIn:"Already have an account?",toSignInLink:"Sign in",or:"or",sentHeading:"Check your email",sentLead:"If an account uses that address, a link to reset its password is on its way.",nameMissing:"Enter your name.",emailInvalid:"Enter an email address, like name@example.com.",passwordMissing:"Enter your password.",passwordShort:o=>`Use at least ${o} characters.`,codeMissing:"Enter the whole code.",failed:"That did not work. Try again in a moment."},np=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Ht=class extends c{constructor(){super(...arguments),this.mode="sign-in",this.providers=[],this.remember=!1,this.passwordMin=8,this.headingLevel=1,this.plain=!1,this.error="",this.texts={},this.sent=!1}static{this.styles=[c.styles,f`
6344
+ </div>`}};va([n({type:String,reflect:!0})],Ie.prototype,"variant");va([n({type:String})],Ie.prototype,"heading");va([n({type:String})],Ie.prototype,"description");va([n({type:Boolean})],Ie.prototype,"dismissible");va([n({type:Boolean,attribute:"no-icon"})],Ie.prototype,"noIcon");va([n({type:String})],Ie.prototype,"icon");g("kt-alert",Ie);var sp=Object.defineProperty,Fe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&sp(t,e,r),r},np={signInHeading:"Sign in",signInLead:"Welcome back. Sign in to carry on.",signUpHeading:"Create an account",signUpLead:"It takes a minute, and no card.",forgotHeading:"Reset your password",forgotLead:"We will email you a link to choose a new one.",codeHeading:"Check your phone",codeLead:"Enter the code we sent you.",name:"Name",email:"Email",password:"Password",code:"Verification code",remember:"Keep me signed in",forgotLink:"Forgot password?",signIn:"Sign in",signUp:"Create account",sendLink:"Send the link",verify:"Verify",toSignUp:"No account yet?",toSignUpLink:"Create an account",toSignIn:"Already have an account?",toSignInLink:"Sign in",or:"or",sentHeading:"Check your email",sentLead:"If an account uses that address, a link to reset its password is on its way.",nameMissing:"Enter your name.",emailInvalid:"Enter an email address, like name@example.com.",passwordMissing:"Enter your password.",passwordShort:o=>`Use at least ${o} characters.`,codeMissing:"Enter the whole code.",failed:"That did not work. Try again in a moment."},lp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Ht=class extends c{constructor(){super(...arguments),this.mode="sign-in",this.providers=[],this.remember=!1,this.passwordMin=8,this.headingLevel=1,this.plain=!1,this.error="",this.texts={},this.sent=!1}static{this.styles=[c.styles,f`
6251
6345
  :host {
6252
6346
  display: block;
6253
6347
  max-width: 420px;
@@ -6348,7 +6442,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6348
6442
  .footer:empty {
6349
6443
  display: none;
6350
6444
  }
6351
- `]}get t(){return{...sp,...this.texts}}goTo(t){t!==this.mode&&(this.mode=t,this.error="",this.sent=!1,y(this,"kt-mode",{mode:t}))}field(t){return this.shadowRoot?.querySelector(`kt-input[name="${t}"]`)??null}check(){let t=this.t,e=[];this.mode==="sign-up"&&e.push(["name",r=>r.trim()?"":t.nameMissing]),this.mode!=="code"&&e.push(["email",r=>np.test(r.trim())?"":t.emailInvalid]),this.mode==="sign-in"&&e.push(["password",r=>r?"":t.passwordMissing]),this.mode==="sign-up"&&e.push(["password",r=>r?r.length<this.passwordMin?t.passwordShort(this.passwordMin):"":t.passwordMissing]);let a=null;for(let[r,i]of e){let s=this.field(r);s&&(s.error=i(s.value??""),s.error&&!a&&(a=s))}if(this.mode==="code"){let r=this.shadowRoot?.querySelector("kt-otp-input");r&&(r.error=r.value.length<r.length?t.codeMissing:"",r.error&&(a=r))}return a?.focus(),!a}values(){let t=e=>this.field(e)?.value;switch(this.mode){case"sign-up":return{name:t("name")??"",email:t("email")??"",password:t("password")??""};case"forgot":return{email:t("email")??""};case"code":return{code:this.shadowRoot?.querySelector("kt-otp-input")?.value??""};default:{let e=this.shadowRoot?.querySelector("kt-checkbox");return{email:t("email")??"",password:t("password")??"",...e?{remember:e.checked}:{}}}}}submit(){if(!this.check())return;this.error="";let t=null;if(y(this,"kt-submit",{mode:this.mode,values:this.values(),wait:r=>{t=r}}),!t)return;let e=t,a=this.mode;this.button.run(()=>e).then(()=>{a==="forgot"&&this.mode==="forgot"&&(this.sent=!0)},r=>{this.error=r instanceof Error&&r.message?r.message:this.t.failed})}onSubmit(t){t.preventDefault(),this.submit()}onKeyDown(t){t.key!=="Enter"||t.isComposing||t.composedPath()[0].localName!=="input"||(t.preventDefault(),this.submit())}input(t,e,a,r){return l`<kt-label-input label=${e}>
6445
+ `]}get t(){return{...np,...this.texts}}goTo(t){t!==this.mode&&(this.mode=t,this.error="",this.sent=!1,y(this,"kt-mode",{mode:t}))}field(t){return this.shadowRoot?.querySelector(`kt-input[name="${t}"]`)??null}check(){let t=this.t,e=[];this.mode==="sign-up"&&e.push(["name",r=>r.trim()?"":t.nameMissing]),this.mode!=="code"&&e.push(["email",r=>lp.test(r.trim())?"":t.emailInvalid]),this.mode==="sign-in"&&e.push(["password",r=>r?"":t.passwordMissing]),this.mode==="sign-up"&&e.push(["password",r=>r?r.length<this.passwordMin?t.passwordShort(this.passwordMin):"":t.passwordMissing]);let a=null;for(let[r,i]of e){let s=this.field(r);s&&(s.error=i(s.value??""),s.error&&!a&&(a=s))}if(this.mode==="code"){let r=this.shadowRoot?.querySelector("kt-otp-input");r&&(r.error=r.value.length<r.length?t.codeMissing:"",r.error&&(a=r))}return a?.focus(),!a}values(){let t=e=>this.field(e)?.value;switch(this.mode){case"sign-up":return{name:t("name")??"",email:t("email")??"",password:t("password")??""};case"forgot":return{email:t("email")??""};case"code":return{code:this.shadowRoot?.querySelector("kt-otp-input")?.value??""};default:{let e=this.shadowRoot?.querySelector("kt-checkbox");return{email:t("email")??"",password:t("password")??"",...e?{remember:e.checked}:{}}}}}submit(){if(!this.check())return;this.error="";let t=null;if(y(this,"kt-submit",{mode:this.mode,values:this.values(),wait:r=>{t=r}}),!t)return;let e=t,a=this.mode;this.button.run(()=>e).then(()=>{a==="forgot"&&this.mode==="forgot"&&(this.sent=!0)},r=>{this.error=r instanceof Error&&r.message?r.message:this.t.failed})}onSubmit(t){t.preventDefault(),this.submit()}onKeyDown(t){t.key!=="Enter"||t.isComposing||t.composedPath()[0].localName!=="input"||(t.preventDefault(),this.submit())}input(t,e,a,r){return l`<kt-label-input label=${e}>
6352
6446
  <kt-input
6353
6447
  name=${t}
6354
6448
  type=${a}
@@ -6408,7 +6502,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6408
6502
  </button>
6409
6503
  </p>`}
6410
6504
  <div class="footer"><slot name="footer"></slot></div>
6411
- </section>`}};Fe([n({type:String,reflect:!0})],Ht.prototype,"mode");Fe([n({attribute:!1})],Ht.prototype,"providers");Fe([n({type:Boolean})],Ht.prototype,"remember");Fe([n({type:Number,attribute:"password-min"})],Ht.prototype,"passwordMin");Fe([n({type:Number,attribute:"heading-level"})],Ht.prototype,"headingLevel");Fe([n({type:Boolean,reflect:!0})],Ht.prototype,"plain");Fe([n({type:String})],Ht.prototype,"error");Fe([n({attribute:!1})],Ht.prototype,"texts");Fe([x()],Ht.prototype,"sent");Fe([A("kt-button.submit")],Ht.prototype,"button");g("kt-auth-form",Ht);var lp=Object.defineProperty,Qr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&lp(t,e,r),r},dp={notFoundHeading:"Page not found",notFoundLead:"The page you were looking for has moved, or never was. Check the address, or start again from home.",errorHeading:"Something went wrong",errorLead:"It is on our side, not yours. Try again in a moment; if it keeps happening, we are already on it.",maintenanceHeading:"Back in a moment",maintenanceLead:"We are making things better. The page will be back shortly \u2014 nothing you have done is lost.",goHome:"Go home",tryAgain:"Try again"},pp={"not-found":"404",error:"500",maintenance:"503"},we=class extends c{constructor(){super(...arguments),this.kind="not-found",this.code="",this.homeHref="/",this.headingLevel=1,this.fill=!1,this.texts={},this.ownActions=!1}static{this.styles=[c.styles,f`
6505
+ </section>`}};Fe([n({type:String,reflect:!0})],Ht.prototype,"mode");Fe([n({attribute:!1})],Ht.prototype,"providers");Fe([n({type:Boolean})],Ht.prototype,"remember");Fe([n({type:Number,attribute:"password-min"})],Ht.prototype,"passwordMin");Fe([n({type:Number,attribute:"heading-level"})],Ht.prototype,"headingLevel");Fe([n({type:Boolean,reflect:!0})],Ht.prototype,"plain");Fe([n({type:String})],Ht.prototype,"error");Fe([n({attribute:!1})],Ht.prototype,"texts");Fe([x()],Ht.prototype,"sent");Fe([A("kt-button.submit")],Ht.prototype,"button");g("kt-auth-form",Ht);var dp=Object.defineProperty,Qr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&dp(t,e,r),r},pp={notFoundHeading:"Page not found",notFoundLead:"The page you were looking for has moved, or never was. Check the address, or start again from home.",errorHeading:"Something went wrong",errorLead:"It is on our side, not yours. Try again in a moment; if it keeps happening, we are already on it.",maintenanceHeading:"Back in a moment",maintenanceLead:"We are making things better. The page will be back shortly \u2014 nothing you have done is lost.",goHome:"Go home",tryAgain:"Try again"},cp={"not-found":"404",error:"500",maintenance:"503"},we=class extends c{constructor(){super(...arguments),this.kind="not-found",this.code="",this.homeHref="/",this.headingLevel=1,this.fill=!1,this.texts={},this.ownActions=!1}static{this.styles=[c.styles,f`
6412
6506
  :host {
6413
6507
  display: block;
6414
6508
  }
@@ -6493,11 +6587,11 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6493
6587
  .more:empty {
6494
6588
  display: none;
6495
6589
  }
6496
- `]}firstUpdated(){this.readActions()}readActions(){this.ownActions=E(this.shadowRoot?.querySelector('slot[name="actions"]'))}retry(){y(this,"kt-retry").defaultPrevented||location.reload()}render(){let t={...dp,...this.texts},e={"not-found":[t.notFoundHeading,t.notFoundLead],error:[t.errorHeading,t.errorLead],maintenance:[t.maintenanceHeading,t.maintenanceLead]},[a,r]=e[this.kind]??e["not-found"],i=this.kind==="maintenance"?d:l`${this.kind==="error"?l`<kt-button @click=${()=>this.retry()}>${t.tryAgain}</kt-button>`:d}
6590
+ `]}firstUpdated(){this.readActions()}readActions(){this.ownActions=E(this.shadowRoot?.querySelector('slot[name="actions"]'))}retry(){y(this,"kt-retry").defaultPrevented||location.reload()}render(){let t={...pp,...this.texts},e={"not-found":[t.notFoundHeading,t.notFoundLead],error:[t.errorHeading,t.errorLead],maintenance:[t.maintenanceHeading,t.maintenanceLead]},[a,r]=e[this.kind]??e["not-found"],i=this.kind==="maintenance"?d:l`${this.kind==="error"?l`<kt-button @click=${()=>this.retry()}>${t.tryAgain}</kt-button>`:d}
6497
6591
  <a class=${this.kind==="error"?"home quiet":"home"} href=${this.homeHref}
6498
6592
  >${t.goHome}</a
6499
6593
  >`;return l`<section part="base" class="page">
6500
- <div part="code" class="code" aria-hidden="true">${this.code||pp[this.kind]}</div>
6594
+ <div part="code" class="code" aria-hidden="true">${this.code||cp[this.kind]}</div>
6501
6595
  ${Q(this.headingLevel,a,"heading",1)}
6502
6596
  <p class="lead">${r}</p>
6503
6597
  <div class="actions">
@@ -6543,10 +6637,10 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6543
6637
  line-height: 1.6;
6544
6638
  text-wrap: pretty;
6545
6639
  }
6546
- `,bn=0;function W(o){return bn+=1,`${o}-${bn}`}function ut({title:o,lead:t,level:e,id:a}){return!o&&!t?d:l`<div class="block-head">
6640
+ `,xn=0;function W(o){return xn+=1,`${o}-${xn}`}function ut({title:o,lead:t,level:e,id:a}){return!o&&!t?d:l`<div class="block-head">
6547
6641
  ${o?l`<div id=${a}>${Q(e,o,"block-heading",2)}</div>`:d}
6548
6642
  ${t?l`<p class="block-lead">${t}</p>`:d}
6549
- </div>`}function Ro(o,t=""){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(o),a=e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])):new Date(o);return Number.isNaN(a.getTime())?o:new Intl.DateTimeFormat(t||document.documentElement.lang||void 0,{dateStyle:"medium"}).format(a)}var cp=Object.defineProperty,ba=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&cp(t,e,r),r},Ue=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.layout="stacked",this.headingLevel=1,this.filled=new Set,this.headingId=W("kt-hero"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
6643
+ </div>`}function Ko(o,t=""){let e=/^(\d{4})-(\d{2})-(\d{2})$/.exec(o),a=e?new Date(Number(e[1]),Number(e[2])-1,Number(e[3])):new Date(o);return Number.isNaN(a.getTime())?o:new Intl.DateTimeFormat(t||document.documentElement.lang||void 0,{dateStyle:"medium"}).format(a)}var hp=Object.defineProperty,ba=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&hp(t,e,r),r},Ue=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.layout="stacked",this.headingLevel=1,this.filled=new Set,this.headingId=W("kt-hero"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
6550
6644
  .hero {
6551
6645
  display: grid;
6552
6646
  gap: calc(var(--gap-card) * 2.5);
@@ -6625,7 +6719,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6625
6719
  <div part="media" class=${this.filled.has("media")?"media":"media empty"}>
6626
6720
  <slot name="media" @slotchange=${this.readSlots}></slot>
6627
6721
  </div>
6628
- </section>`}};ba([n({type:String})],Ue.prototype,"heading");ba([n({type:String})],Ue.prototype,"lead");ba([n({type:String,reflect:!0})],Ue.prototype,"align");ba([n({type:String,reflect:!0})],Ue.prototype,"layout");ba([n({type:Number,attribute:"heading-level"})],Ue.prototype,"headingLevel");ba([x()],Ue.prototype,"filled");g("kt-hero",Ue);var hp=Object.defineProperty,Jr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&hp(t,e,r),r},$e=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.features=[],this.columns=3,this.variant="plain",this.headingLevel=2,this.headingId=W("kt-feature-grid")}static{this.styles=[c.styles,st,f`
6722
+ </section>`}};ba([n({type:String})],Ue.prototype,"heading");ba([n({type:String})],Ue.prototype,"lead");ba([n({type:String,reflect:!0})],Ue.prototype,"align");ba([n({type:String,reflect:!0})],Ue.prototype,"layout");ba([n({type:Number,attribute:"heading-level"})],Ue.prototype,"headingLevel");ba([x()],Ue.prototype,"filled");g("kt-hero",Ue);var up=Object.defineProperty,Jr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&up(t,e,r),r},$e=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.features=[],this.columns=3,this.variant="plain",this.headingLevel=2,this.headingId=W("kt-feature-grid")}static{this.styles=[c.styles,st,f`
6629
6723
  :host {
6630
6724
  --kt-feature-columns: 3;
6631
6725
  }
@@ -6735,7 +6829,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6735
6829
  <ul part="list" class="list" role="list">
6736
6830
  ${this.features.map(t=>this.feature(t))}
6737
6831
  </ul>
6738
- </section>`}};Jr([n({type:String})],$e.prototype,"heading");Jr([n({type:String})],$e.prototype,"lead");Jr([n({type:String,reflect:!0})],$e.prototype,"align");Jr([n({attribute:!1})],$e.prototype,"features");Jr([n({type:Number,reflect:!0})],$e.prototype,"columns");Jr([n({type:String,reflect:!0})],$e.prototype,"variant");Jr([n({type:Number,attribute:"heading-level"})],$e.prototype,"headingLevel");g("kt-feature-grid",$e);var up=Object.defineProperty,ta=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&up(t,e,r),r},Ce=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.variant="panel",this.layout="stacked",this.headingLevel=2,this.filled=new Set,this.headingId=W("kt-cta"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
6832
+ </section>`}};Jr([n({type:String})],$e.prototype,"heading");Jr([n({type:String})],$e.prototype,"lead");Jr([n({type:String,reflect:!0})],$e.prototype,"align");Jr([n({attribute:!1})],$e.prototype,"features");Jr([n({type:Number,reflect:!0})],$e.prototype,"columns");Jr([n({type:String,reflect:!0})],$e.prototype,"variant");Jr([n({type:Number,attribute:"heading-level"})],$e.prototype,"headingLevel");g("kt-feature-grid",$e);var fp=Object.defineProperty,ta=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&fp(t,e,r),r},Ce=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.variant="panel",this.layout="stacked",this.headingLevel=2,this.filled=new Set,this.headingId=W("kt-cta"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
6739
6833
  .panel {
6740
6834
  display: grid;
6741
6835
  gap: calc(var(--gap-card) * 1.5);
@@ -6799,7 +6893,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6799
6893
  ${ut({title:this.heading,lead:this.lead,level:this.headingLevel,id:this.headingId})}
6800
6894
  <div class="tail">${this.region("actions")} ${this.region("note")}</div>
6801
6895
  </div>
6802
- </section>`}};ta([n({type:String})],Ce.prototype,"heading");ta([n({type:String})],Ce.prototype,"lead");ta([n({type:String,reflect:!0})],Ce.prototype,"align");ta([n({type:String,reflect:!0})],Ce.prototype,"variant");ta([n({type:String,reflect:!0})],Ce.prototype,"layout");ta([n({type:Number,attribute:"heading-level"})],Ce.prototype,"headingLevel");ta([x()],Ce.prototype,"filled");g("kt-cta",Ce);var fp=Object.defineProperty,Se=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&fp(t,e,r),r},mp={monthly:"Monthly",yearly:"Yearly",billing:"Billing period",perMonth:"/month",perYear:"/year",featured:"Most popular",action:"Get started"},Ot=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.plans=[],this.billing="monthly",this.currency="USD",this.locale="",this.yearlyNote="",this.headingLevel=2,this.texts={},this.hasNote=!1,this.headingId=W("kt-pricing-table")}static{this.styles=[c.styles,st,f`
6896
+ </section>`}};ta([n({type:String})],Ce.prototype,"heading");ta([n({type:String})],Ce.prototype,"lead");ta([n({type:String,reflect:!0})],Ce.prototype,"align");ta([n({type:String,reflect:!0})],Ce.prototype,"variant");ta([n({type:String,reflect:!0})],Ce.prototype,"layout");ta([n({type:Number,attribute:"heading-level"})],Ce.prototype,"headingLevel");ta([x()],Ce.prototype,"filled");g("kt-cta",Ce);var mp=Object.defineProperty,Se=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&mp(t,e,r),r},gp={monthly:"Monthly",yearly:"Yearly",billing:"Billing period",perMonth:"/month",perYear:"/year",featured:"Most popular",action:"Get started"},Ot=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.plans=[],this.billing="monthly",this.currency="USD",this.locale="",this.yearlyNote="",this.headingLevel=2,this.texts={},this.hasNote=!1,this.headingId=W("kt-pricing-table")}static{this.styles=[c.styles,st,f`
6803
6897
  .switch {
6804
6898
  display: flex;
6805
6899
  flex-wrap: wrap;
@@ -6942,7 +7036,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6942
7036
  .note.empty {
6943
7037
  display: none;
6944
7038
  }
6945
- `]}firstUpdated(){this.readNote()}readNote(){this.hasNote=E(this.shadowRoot?.querySelector('slot[name="note"]'))}get words(){return{...mp,...this.texts}}format(t){if(typeof t=="string")return t;let e=Number.isInteger(t);return new Intl.NumberFormat(this.locale||document.documentElement.lang||void 0,{style:"currency",currency:this.currency,minimumFractionDigits:e?0:2,maximumFractionDigits:e?0:2}).format(t)}choose(t){y(this,"kt-plan",{id:t.id,billing:this.billing})}onBilling(t){t.stopPropagation();let e=t.detail.value==="yearly"?"yearly":"monthly";e!==this.billing&&(this.billing=e,y(this,"kt-billing",{billing:e}))}price(t){let e=this.words,a=typeof t.price=="object",r=typeof t.price=="object"?t.price[this.billing]:t.price,i=typeof r=="number"?a&&this.billing==="yearly"?e.perYear:e.perMonth:"";return l`<p class="price">
7039
+ `]}firstUpdated(){this.readNote()}readNote(){this.hasNote=E(this.shadowRoot?.querySelector('slot[name="note"]'))}get words(){return{...gp,...this.texts}}format(t){if(typeof t=="string")return t;let e=Number.isInteger(t);return new Intl.NumberFormat(this.locale||document.documentElement.lang||void 0,{style:"currency",currency:this.currency,minimumFractionDigits:e?0:2,maximumFractionDigits:e?0:2}).format(t)}choose(t){y(this,"kt-plan",{id:t.id,billing:this.billing})}onBilling(t){t.stopPropagation();let e=t.detail.value==="yearly"?"yearly":"monthly";e!==this.billing&&(this.billing=e,y(this,"kt-billing",{billing:e}))}price(t){let e=this.words,a=typeof t.price=="object",r=typeof t.price=="object"?t.price[this.billing]:t.price,i=typeof r=="number"?a&&this.billing==="yearly"?e.perYear:e.perMonth:"";return l`<p class="price">
6946
7040
  <span class="amount">${this.format(r)}</span>
6947
7041
  ${i?l`<span class="period">${i}</span>`:d}
6948
7042
  </p>`}plan(t){let e=this.words,a=t.action||e.action;return l`<li part="plan" class=${t.featured?"plan featured":"plan"}>
@@ -6987,7 +7081,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
6987
7081
  <div class=${this.hasNote?"note":"note empty"}>
6988
7082
  <slot name="note" @slotchange=${this.readNote}></slot>
6989
7083
  </div>
6990
- </section>`}};Se([n({type:String})],Ot.prototype,"heading");Se([n({type:String})],Ot.prototype,"lead");Se([n({type:String,reflect:!0})],Ot.prototype,"align");Se([n({attribute:!1})],Ot.prototype,"plans");Se([n({type:String,reflect:!0})],Ot.prototype,"billing");Se([n({type:String})],Ot.prototype,"currency");Se([n({type:String})],Ot.prototype,"locale");Se([n({type:String,attribute:"yearly-note"})],Ot.prototype,"yearlyNote");Se([n({type:Number,attribute:"heading-level"})],Ot.prototype,"headingLevel");Se([n({attribute:!1})],Ot.prototype,"texts");Se([x()],Ot.prototype,"hasNote");g("kt-pricing-table",Ot);var gp=Object.defineProperty,xa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&gp(t,e,r),r},Ne=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.testimonials=[],this.layout="grid",this.headingLevel=2,this.headingId=W("kt-testimonials")}static{this.styles=[c.styles,st,f`
7084
+ </section>`}};Se([n({type:String})],Ot.prototype,"heading");Se([n({type:String})],Ot.prototype,"lead");Se([n({type:String,reflect:!0})],Ot.prototype,"align");Se([n({attribute:!1})],Ot.prototype,"plans");Se([n({type:String,reflect:!0})],Ot.prototype,"billing");Se([n({type:String})],Ot.prototype,"currency");Se([n({type:String})],Ot.prototype,"locale");Se([n({type:String,attribute:"yearly-note"})],Ot.prototype,"yearlyNote");Se([n({type:Number,attribute:"heading-level"})],Ot.prototype,"headingLevel");Se([n({attribute:!1})],Ot.prototype,"texts");Se([x()],Ot.prototype,"hasNote");g("kt-pricing-table",Ot);var vp=Object.defineProperty,xa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&vp(t,e,r),r},Ne=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.testimonials=[],this.layout="grid",this.headingLevel=2,this.headingId=W("kt-testimonials")}static{this.styles=[c.styles,st,f`
6991
7085
  .list {
6992
7086
  margin: 0;
6993
7087
  padding: 0;
@@ -7097,7 +7191,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7097
7191
  <ul class="list" role="list">
7098
7192
  ${this.testimonials.map(t=>this.testimonial(t))}
7099
7193
  </ul>
7100
- </section>`}};xa([n({type:String})],Ne.prototype,"heading");xa([n({type:String})],Ne.prototype,"lead");xa([n({type:String,reflect:!0})],Ne.prototype,"align");xa([n({attribute:!1})],Ne.prototype,"testimonials");xa([n({type:String,reflect:!0})],Ne.prototype,"layout");xa([n({type:Number,attribute:"heading-level"})],Ne.prototype,"headingLevel");g("kt-testimonials",Ne);var vp=Object.defineProperty,zo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&vp(t,e,r),r},Pr=class extends c{constructor(){super(...arguments),this.heading="",this.align="center",this.colour=!1,this.headingLevel=2,this.headingId=W("kt-logo-cloud")}static{this.styles=[c.styles,st,f`
7194
+ </section>`}};xa([n({type:String})],Ne.prototype,"heading");xa([n({type:String})],Ne.prototype,"lead");xa([n({type:String,reflect:!0})],Ne.prototype,"align");xa([n({attribute:!1})],Ne.prototype,"testimonials");xa([n({type:String,reflect:!0})],Ne.prototype,"layout");xa([n({type:Number,attribute:"heading-level"})],Ne.prototype,"headingLevel");g("kt-testimonials",Ne);var bp=Object.defineProperty,Ro=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&bp(t,e,r),r},Mr=class extends c{constructor(){super(...arguments),this.heading="",this.align="center",this.colour=!1,this.headingLevel=2,this.headingId=W("kt-logo-cloud")}static{this.styles=[c.styles,st,f`
7101
7195
  :host {
7102
7196
  --kt-logo-height: 28px;
7103
7197
  }
@@ -7155,7 +7249,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7155
7249
  ${Q(this.headingLevel,this.heading,"caption",2)}
7156
7250
  </div>`:d}
7157
7251
  <div part="logos" class="logos"><slot></slot></div>
7158
- </section>`}};zo([n({type:String})],Pr.prototype,"heading");zo([n({type:String,reflect:!0})],Pr.prototype,"align");zo([n({type:Boolean,reflect:!0})],Pr.prototype,"colour");zo([n({type:Number,attribute:"heading-level"})],Pr.prototype,"headingLevel");g("kt-logo-cloud",Pr);var bp=Object.defineProperty,qo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&bp(t,e,r),r},Ar=class extends c{constructor(){super(...arguments),this.open=!1,this.heading="",this.plain=!1,this.folding=!1,this.fold=null}static{this.styles=[c.styles,f`
7252
+ </section>`}};Ro([n({type:String})],Mr.prototype,"heading");Ro([n({type:String,reflect:!0})],Mr.prototype,"align");Ro([n({type:Boolean,reflect:!0})],Mr.prototype,"colour");Ro([n({type:Number,attribute:"heading-level"})],Mr.prototype,"headingLevel");g("kt-logo-cloud",Mr);var xp=Object.defineProperty,qo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&xp(t,e,r),r},Dr=class extends c{constructor(){super(...arguments),this.open=!1,this.heading="",this.plain=!1,this.folding=!1,this.fold=null}static{this.styles=[c.styles,f`
7159
7253
  :host {
7160
7254
  display: block;
7161
7255
  }
@@ -7230,7 +7324,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7230
7324
  <div part="content" class="content">
7231
7325
  <div class="inner"><slot></slot></div>
7232
7326
  </div>
7233
- </details>`}};qo([n({type:Boolean,reflect:!0})],Ar.prototype,"open");qo([n({type:String})],Ar.prototype,"heading");qo([n({type:Boolean,reflect:!0})],Ar.prototype,"plain");qo([x()],Ar.prototype,"folding");g("kt-collapsible",Ar);var xp=Object.defineProperty,nr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&xp(t,e,r),r},Zt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.items=[],this.multiple=!1,this.openFirst=!1,this.layout="stacked",this.headingLevel=2,this.hasNote=!1,this.headingId=W("kt-faq")}static{this.styles=[c.styles,st,f`
7327
+ </details>`}};qo([n({type:Boolean,reflect:!0})],Dr.prototype,"open");qo([n({type:String})],Dr.prototype,"heading");qo([n({type:Boolean,reflect:!0})],Dr.prototype,"plain");qo([x()],Dr.prototype,"folding");g("kt-collapsible",Dr);var yp=Object.defineProperty,lr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yp(t,e,r),r},Zt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.items=[],this.multiple=!1,this.openFirst=!1,this.layout="stacked",this.headingLevel=2,this.hasNote=!1,this.headingId=W("kt-faq")}static{this.styles=[c.styles,st,f`
7234
7328
  .head {
7235
7329
  display: grid;
7236
7330
  gap: var(--gap-card);
@@ -7292,7 +7386,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7292
7386
  >${t.answer}</kt-collapsible
7293
7387
  >`)}
7294
7388
  </kt-accordion>
7295
- </section>`}};nr([n({type:String})],Zt.prototype,"heading");nr([n({type:String})],Zt.prototype,"lead");nr([n({type:String,reflect:!0})],Zt.prototype,"align");nr([n({attribute:!1})],Zt.prototype,"items");nr([n({type:Boolean,reflect:!0})],Zt.prototype,"multiple");nr([n({type:Boolean,attribute:"open-first"})],Zt.prototype,"openFirst");nr([n({type:String,reflect:!0})],Zt.prototype,"layout");nr([n({type:Number,attribute:"heading-level"})],Zt.prototype,"headingLevel");nr([x()],Zt.prototype,"hasNote");g("kt-faq",Zt);var yp=Object.defineProperty,lr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&yp(t,e,r),r},Qt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.posts=[],this.columns=3,this.layout="grid",this.locale="",this.headingLevel=2,this.hasMore=!1,this.headingId=W("kt-post-grid")}static{this.styles=[c.styles,st,f`
7389
+ </section>`}};lr([n({type:String})],Zt.prototype,"heading");lr([n({type:String})],Zt.prototype,"lead");lr([n({type:String,reflect:!0})],Zt.prototype,"align");lr([n({attribute:!1})],Zt.prototype,"items");lr([n({type:Boolean,reflect:!0})],Zt.prototype,"multiple");lr([n({type:Boolean,attribute:"open-first"})],Zt.prototype,"openFirst");lr([n({type:String,reflect:!0})],Zt.prototype,"layout");lr([n({type:Number,attribute:"heading-level"})],Zt.prototype,"headingLevel");lr([x()],Zt.prototype,"hasNote");g("kt-faq",Zt);var kp=Object.defineProperty,dr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kp(t,e,r),r},Qt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.posts=[],this.columns=3,this.layout="grid",this.locale="",this.headingLevel=2,this.hasMore=!1,this.headingId=W("kt-post-grid")}static{this.styles=[c.styles,st,f`
7296
7390
  :host {
7297
7391
  --kt-post-columns: 3;
7298
7392
  }
@@ -7455,7 +7549,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7455
7549
  >${t.author.name}</span
7456
7550
  >`:d}
7457
7551
  ${t.date?l`<time datetime=${t.date}
7458
- >${Ro(t.date,this.locale)}</time
7552
+ >${Ko(t.date,this.locale)}</time
7459
7553
  >`:d}
7460
7554
  </div>`:d}
7461
7555
  </div>
@@ -7472,7 +7566,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7472
7566
  <div class=${this.hasMore?"more":"more empty"}>
7473
7567
  <slot name="more" @slotchange=${this.readMore}></slot>
7474
7568
  </div>
7475
- </section>`}};lr([n({type:String})],Qt.prototype,"heading");lr([n({type:String})],Qt.prototype,"lead");lr([n({type:String,reflect:!0})],Qt.prototype,"align");lr([n({attribute:!1})],Qt.prototype,"posts");lr([n({type:Number,reflect:!0})],Qt.prototype,"columns");lr([n({type:String,reflect:!0})],Qt.prototype,"layout");lr([n({type:String})],Qt.prototype,"locale");lr([n({type:Number,attribute:"heading-level"})],Qt.prototype,"headingLevel");lr([x()],Qt.prototype,"hasMore");g("kt-post-grid",Qt);var kp=Object.defineProperty,jt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&kp(t,e,r),r},xn={back:"All posts",minRead:o=>`${o} min read`},wp=230,ft=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.date="",this.author="",this.authorRole="",this.avatar="",this.readingTime=0,this.tags=[],this.backHref="",this.locale="",this.headingLevel=1,this.texts={},this.counted=0,this.filled=new Set,this.headingId=W("kt-blog-post"),this.readSlots=()=>{let t=new Set;for(let a of this.shadowRoot?.querySelectorAll("slot")??[])E(a)&&t.add(a.name);this.filled=t;let e=(this.shadowRoot?.querySelector("slot:not([name])")?.assignedNodes({flatten:!0})??[]).map(a=>a.textContent??"").join(" ").split(/\s+/).filter(Boolean).length;this.counted=e?Math.max(1,Math.round(e/wp)):0}}static{this.styles=[c.styles,f`
7569
+ </section>`}};dr([n({type:String})],Qt.prototype,"heading");dr([n({type:String})],Qt.prototype,"lead");dr([n({type:String,reflect:!0})],Qt.prototype,"align");dr([n({attribute:!1})],Qt.prototype,"posts");dr([n({type:Number,reflect:!0})],Qt.prototype,"columns");dr([n({type:String,reflect:!0})],Qt.prototype,"layout");dr([n({type:String})],Qt.prototype,"locale");dr([n({type:Number,attribute:"heading-level"})],Qt.prototype,"headingLevel");dr([x()],Qt.prototype,"hasMore");g("kt-post-grid",Qt);var wp=Object.defineProperty,jt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&wp(t,e,r),r},yn={back:"All posts",minRead:o=>`${o} min read`},$p=230,ft=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.date="",this.author="",this.authorRole="",this.avatar="",this.readingTime=0,this.tags=[],this.backHref="",this.locale="",this.headingLevel=1,this.texts={},this.counted=0,this.filled=new Set,this.headingId=W("kt-blog-post"),this.readSlots=()=>{let t=new Set;for(let a of this.shadowRoot?.querySelectorAll("slot")??[])E(a)&&t.add(a.name);this.filled=t;let e=(this.shadowRoot?.querySelector("slot:not([name])")?.assignedNodes({flatten:!0})??[]).map(a=>a.textContent??"").join(" ").split(/\s+/).filter(Boolean).length;this.counted=e?Math.max(1,Math.round(e/$p)):0}}static{this.styles=[c.styles,f`
7476
7570
  :host {
7477
7571
  --kt-post-measure: 700px;
7478
7572
  display: block;
@@ -7634,7 +7728,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7634
7728
  .empty {
7635
7729
  display: none;
7636
7730
  }
7637
- `]}firstUpdated(){this.readSlots()}meta(){let t={...xn,...this.texts},e=this.readingTime||this.counted;return!this.author&&!this.date&&!e?d:l`<div class="meta">
7731
+ `]}firstUpdated(){this.readSlots()}meta(){let t={...yn,...this.texts},e=this.readingTime||this.counted;return!this.author&&!this.date&&!e?d:l`<div class="meta">
7638
7732
  ${this.author?l`<span class="author">
7639
7733
  <kt-avatar name=${this.author} src=${this.avatar} aria-hidden="true"></kt-avatar>
7640
7734
  <span class="author-text">
@@ -7643,10 +7737,10 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7643
7737
  </span>
7644
7738
  </span>`:d}
7645
7739
  <span class="when">
7646
- ${this.date?l`<time datetime=${this.date}>${Ro(this.date,this.locale)}</time>`:d}
7740
+ ${this.date?l`<time datetime=${this.date}>${Ko(this.date,this.locale)}</time>`:d}
7647
7741
  ${e?l`<span class="reading">${t.minRead(e)}</span>`:d}
7648
7742
  </span>
7649
- </div>`}render(){let t={...xn,...this.texts};return l`<article part="base" aria-labelledby=${this.headingId}>
7743
+ </div>`}render(){let t={...yn,...this.texts};return l`<article part="base" aria-labelledby=${this.headingId}>
7650
7744
  <header part="header" class="column">
7651
7745
  ${this.backHref?l`<a class="back" href=${this.backHref}
7652
7746
  ><kt-icon name="chevron-left" size="16" aria-hidden="true"></kt-icon>${t.back}</a
@@ -7664,7 +7758,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7664
7758
  <footer class=${this.filled.has("end")?"end column":"end column empty"}>
7665
7759
  <slot name="end" @slotchange=${this.readSlots}></slot>
7666
7760
  </footer>
7667
- </article>`}};jt([n({type:String})],ft.prototype,"heading");jt([n({type:String})],ft.prototype,"lead");jt([n({type:String})],ft.prototype,"date");jt([n({type:String})],ft.prototype,"author");jt([n({type:String,attribute:"author-role"})],ft.prototype,"authorRole");jt([n({type:String})],ft.prototype,"avatar");jt([n({type:Number,attribute:"reading-time"})],ft.prototype,"readingTime");jt([n({attribute:!1})],ft.prototype,"tags");jt([n({type:String,attribute:"back-href"})],ft.prototype,"backHref");jt([n({type:String})],ft.prototype,"locale");jt([n({type:Number,attribute:"heading-level"})],ft.prototype,"headingLevel");jt([n({attribute:!1})],ft.prototype,"texts");jt([x()],ft.prototype,"counted");jt([x()],ft.prototype,"filled");g("kt-blog-post",ft);var $p=Object.defineProperty,Pe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&$p(t,e,r),r},Cp={email:"Email address",placeholder:"you@example.com",subscribe:"Subscribe",invalid:"Enter an email address, like name@example.com.",failed:"That did not go through. Try again in a moment.",done:"You are in. Check your inbox to confirm."},Sp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Kt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.variant="panel",this.layout="stacked",this.subscribed=!1,this.headingLevel=2,this.texts={},this.hasNote=!1,this.headingId=W("kt-newsletter")}static{this.styles=[c.styles,st,f`
7761
+ </article>`}};jt([n({type:String})],ft.prototype,"heading");jt([n({type:String})],ft.prototype,"lead");jt([n({type:String})],ft.prototype,"date");jt([n({type:String})],ft.prototype,"author");jt([n({type:String,attribute:"author-role"})],ft.prototype,"authorRole");jt([n({type:String})],ft.prototype,"avatar");jt([n({type:Number,attribute:"reading-time"})],ft.prototype,"readingTime");jt([n({attribute:!1})],ft.prototype,"tags");jt([n({type:String,attribute:"back-href"})],ft.prototype,"backHref");jt([n({type:String})],ft.prototype,"locale");jt([n({type:Number,attribute:"heading-level"})],ft.prototype,"headingLevel");jt([n({attribute:!1})],ft.prototype,"texts");jt([x()],ft.prototype,"counted");jt([x()],ft.prototype,"filled");g("kt-blog-post",ft);var Cp=Object.defineProperty,Pe=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Cp(t,e,r),r},Sp={email:"Email address",placeholder:"you@example.com",subscribe:"Subscribe",invalid:"Enter an email address, like name@example.com.",failed:"That did not go through. Try again in a moment.",done:"You are in. Check your inbox to confirm."},Pp=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,zt=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.align="center",this.variant="panel",this.layout="stacked",this.subscribed=!1,this.headingLevel=2,this.texts={},this.hasNote=!1,this.headingId=W("kt-newsletter")}static{this.styles=[c.styles,st,f`
7668
7762
  .panel {
7669
7763
  display: grid;
7670
7764
  gap: calc(var(--gap-card) * 1.5);
@@ -7758,7 +7852,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7758
7852
  justify-items: start;
7759
7853
  }
7760
7854
  }
7761
- `]}get t(){return{...Cp,...this.texts}}firstUpdated(){this.readNote()}readNote(){this.hasNote=E(this.shadowRoot?.querySelector('slot[name="note"]'))}subscribe(){let t=(this.field.value??"").trim();if(!Sp.test(t)){this.field.error=this.t.invalid,this.field.focus();return}this.field.error="";let e=null;if(y(this,"kt-subscribe",{email:t,wait:r=>{e=r}}),!e){this.subscribed=!0;return}let a=e;this.button.run(()=>a).then(()=>{this.subscribed=!0},r=>{this.field.error=r instanceof Error&&r.message?r.message:this.t.failed})}onSubmit(t){t.preventDefault(),this.subscribe()}onKeyDown(t){t.key!=="Enter"||t.isComposing||t.composedPath()[0].localName==="input"&&(t.preventDefault(),this.subscribe())}render(){let t=this.t;return l`<section
7855
+ `]}get t(){return{...Sp,...this.texts}}firstUpdated(){this.readNote()}readNote(){this.hasNote=E(this.shadowRoot?.querySelector('slot[name="note"]'))}subscribe(){let t=(this.field.value??"").trim();if(!Pp.test(t)){this.field.error=this.t.invalid,this.field.focus();return}this.field.error="";let e=null;if(y(this,"kt-subscribe",{email:t,wait:r=>{e=r}}),!e){this.subscribed=!0;return}let a=e;this.button.run(()=>a).then(()=>{this.subscribed=!0},r=>{this.field.error=r instanceof Error&&r.message?r.message:this.t.failed})}onSubmit(t){t.preventDefault(),this.subscribe()}onKeyDown(t){t.key!=="Enter"||t.isComposing||t.composedPath()[0].localName==="input"&&(t.preventDefault(),this.subscribe())}render(){let t=this.t;return l`<section
7762
7856
  part="base"
7763
7857
  class="block"
7764
7858
  aria-labelledby=${this.heading?this.headingId:d}
@@ -7791,7 +7885,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7791
7885
  </div>
7792
7886
  </div>
7793
7887
  </div>
7794
- </section>`}};Pe([n({type:String})],Kt.prototype,"heading");Pe([n({type:String})],Kt.prototype,"lead");Pe([n({type:String,reflect:!0})],Kt.prototype,"align");Pe([n({type:String,reflect:!0})],Kt.prototype,"variant");Pe([n({type:String,reflect:!0})],Kt.prototype,"layout");Pe([n({type:Boolean,reflect:!0})],Kt.prototype,"subscribed");Pe([n({type:Number,attribute:"heading-level"})],Kt.prototype,"headingLevel");Pe([n({attribute:!1})],Kt.prototype,"texts");Pe([x()],Kt.prototype,"hasNote");Pe([A("kt-input")],Kt.prototype,"field");Pe([A("kt-button")],Kt.prototype,"button");g("kt-newsletter",Kt);var Pp=Object.defineProperty,ya=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Pp(t,e,r),r},He=class extends c{constructor(){super(...arguments),this.heading="",this.description="",this.layout="split",this.danger=!1,this.headingLevel=2,this.filled=new Set,this.headingId=W("kt-settings-section"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,f`
7888
+ </section>`}};Pe([n({type:String})],zt.prototype,"heading");Pe([n({type:String})],zt.prototype,"lead");Pe([n({type:String,reflect:!0})],zt.prototype,"align");Pe([n({type:String,reflect:!0})],zt.prototype,"variant");Pe([n({type:String,reflect:!0})],zt.prototype,"layout");Pe([n({type:Boolean,reflect:!0})],zt.prototype,"subscribed");Pe([n({type:Number,attribute:"heading-level"})],zt.prototype,"headingLevel");Pe([n({attribute:!1})],zt.prototype,"texts");Pe([x()],zt.prototype,"hasNote");Pe([A("kt-input")],zt.prototype,"field");Pe([A("kt-button")],zt.prototype,"button");g("kt-newsletter",zt);var Ap=Object.defineProperty,ya=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ap(t,e,r),r},He=class extends c{constructor(){super(...arguments),this.heading="",this.description="",this.layout="split",this.danger=!1,this.headingLevel=2,this.filled=new Set,this.headingId=W("kt-settings-section"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,f`
7795
7889
  :host {
7796
7890
  display: block;
7797
7891
  container-type: inline-size;
@@ -7892,7 +7986,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
7892
7986
  <span class="actions"><slot name="actions" @slotchange=${this.readSlots}></slot></span>
7893
7987
  </div>
7894
7988
  </div>
7895
- </section>`}};ya([n({type:String})],He.prototype,"heading");ya([n({type:String})],He.prototype,"description");ya([n({type:String,reflect:!0})],He.prototype,"layout");ya([n({type:Boolean,reflect:!0})],He.prototype,"danger");ya([n({type:Number,attribute:"heading-level"})],He.prototype,"headingLevel");ya([x()],He.prototype,"filled");g("kt-settings-section",He);var Ap=Object.defineProperty,dr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ap(t,e,r),r},Jt=class extends c{constructor(){super(...arguments),this.value=0,this.max=100,this.size="medium",this.variant="primary",this.showValue=!1,this.showLabel=!1,this.striped=!1,this.animated=!1,this.label=""}static{this.styles=[c.styles,f`
7989
+ </section>`}};ya([n({type:String})],He.prototype,"heading");ya([n({type:String})],He.prototype,"description");ya([n({type:String,reflect:!0})],He.prototype,"layout");ya([n({type:Boolean,reflect:!0})],He.prototype,"danger");ya([n({type:Number,attribute:"heading-level"})],He.prototype,"headingLevel");ya([x()],He.prototype,"filled");g("kt-settings-section",He);var Mp=Object.defineProperty,pr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Mp(t,e,r),r},Jt=class extends c{constructor(){super(...arguments),this.value=0,this.max=100,this.size="medium",this.variant="primary",this.showValue=!1,this.showLabel=!1,this.striped=!1,this.animated=!1,this.label=""}static{this.styles=[c.styles,f`
7896
7990
  :host {
7897
7991
  display: block;
7898
7992
  width: 100%;
@@ -8037,7 +8131,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8037
8131
  style=${ct({width:`${t}%`})}
8038
8132
  ></div>
8039
8133
  </div>
8040
- </div>`}};dr([n({type:Number})],Jt.prototype,"value");dr([n({type:Number})],Jt.prototype,"max");dr([n({type:String,reflect:!0})],Jt.prototype,"size");dr([n({type:String,reflect:!0})],Jt.prototype,"variant");dr([n({type:Boolean,attribute:"show-value"})],Jt.prototype,"showValue");dr([n({type:Boolean,attribute:"show-label"})],Jt.prototype,"showLabel");dr([n({type:Boolean,reflect:!0})],Jt.prototype,"striped");dr([n({type:Boolean,reflect:!0})],Jt.prototype,"animated");dr([n({type:String})],Jt.prototype,"label");g("kt-progress-bar",Jt);var Mp=Object.defineProperty,ka=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Mp(t,e,r),r},Dp={progress:(o,t)=>`${o} of ${t} done`,done:"Done:",start:"Start"},je=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.steps=[],this.headingLevel=1,this.texts={},this.filled=new Set,this.headingId=W("kt-empty-page"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
8134
+ </div>`}};pr([n({type:Number})],Jt.prototype,"value");pr([n({type:Number})],Jt.prototype,"max");pr([n({type:String,reflect:!0})],Jt.prototype,"size");pr([n({type:String,reflect:!0})],Jt.prototype,"variant");pr([n({type:Boolean,attribute:"show-value"})],Jt.prototype,"showValue");pr([n({type:Boolean,attribute:"show-label"})],Jt.prototype,"showLabel");pr([n({type:Boolean,reflect:!0})],Jt.prototype,"striped");pr([n({type:Boolean,reflect:!0})],Jt.prototype,"animated");pr([n({type:String})],Jt.prototype,"label");g("kt-progress-bar",Jt);var Dp=Object.defineProperty,ka=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dp(t,e,r),r},Tp={progress:(o,t)=>`${o} of ${t} done`,done:"Done:",start:"Start"},je=class extends c{constructor(){super(...arguments),this.heading="",this.lead="",this.steps=[],this.headingLevel=1,this.texts={},this.filled=new Set,this.headingId=W("kt-empty-page"),this.readSlots=()=>{let t=new Set;for(let e of this.shadowRoot?.querySelectorAll("slot")??[])E(e)&&t.add(e.name);this.filled=t}}static{this.styles=[c.styles,st,f`
8041
8135
  .block {
8042
8136
  justify-items: center;
8043
8137
  max-width: 720px;
@@ -8191,7 +8285,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8191
8285
  ${t.description?l`<p class="step-description">${t.description}</p>`:d}
8192
8286
  </div>
8193
8287
  ${t.done?d:l`<div class="act">${s}</div>`}
8194
- </li>`}render(){let t={...Dp,...this.texts},e=this.steps.filter(i=>i.done).length,a=this.steps.findIndex(i=>!i.done),r=t.progress(e,this.steps.length);return l`<section part="base" class="block" aria-labelledby=${this.headingId}>
8288
+ </li>`}render(){let t={...Tp,...this.texts},e=this.steps.filter(i=>i.done).length,a=this.steps.findIndex(i=>!i.done),r=t.progress(e,this.steps.length);return l`<section part="base" class="block" aria-labelledby=${this.headingId}>
8195
8289
  <div class=${this.filled.has("media")?"media":"media empty"}>
8196
8290
  <slot name="media" @slotchange=${this.readSlots}></slot>
8197
8291
  </div>
@@ -8211,7 +8305,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8211
8305
  <div class=${this.filled.has("actions")?"actions":"actions empty"}>
8212
8306
  <slot name="actions" @slotchange=${this.readSlots}></slot>
8213
8307
  </div>
8214
- </section>`}};ka([n({type:String})],je.prototype,"heading");ka([n({type:String})],je.prototype,"lead");ka([n({attribute:!1})],je.prototype,"steps");ka([n({type:Number,attribute:"heading-level"})],je.prototype,"headingLevel");ka([n({attribute:!1})],je.prototype,"texts");ka([x()],je.prototype,"filled");g("kt-empty-page",je);var Tp=Object.defineProperty,wa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tp(t,e,r),r},_e=class extends c{constructor(){super(...arguments),this.columns=[],this.variant="columns",this.bordered=!0,this.headingLevel=2,this.label="",this.hasLegal=!1}static{this.styles=[c.styles,f`
8308
+ </section>`}};ka([n({type:String})],je.prototype,"heading");ka([n({type:String})],je.prototype,"lead");ka([n({attribute:!1})],je.prototype,"steps");ka([n({type:Number,attribute:"heading-level"})],je.prototype,"headingLevel");ka([n({attribute:!1})],je.prototype,"texts");ka([x()],je.prototype,"filled");g("kt-empty-page",je);var Lp=Object.defineProperty,wa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Lp(t,e,r),r},_e=class extends c{constructor(){super(...arguments),this.columns=[],this.variant="columns",this.bordered=!0,this.headingLevel=2,this.label="",this.hasLegal=!1}static{this.styles=[c.styles,f`
8215
8309
  :host {
8216
8310
  display: block;
8217
8311
  container-type: inline-size;
@@ -8370,7 +8464,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8370
8464
  <slot name="legal" @slotchange=${this.readLegal}></slot>
8371
8465
  </div>
8372
8466
  </div>
8373
- </footer>`}};wa([n({attribute:!1})],_e.prototype,"columns");wa([n({type:String,reflect:!0})],_e.prototype,"variant");wa([n({type:Boolean,reflect:!0})],_e.prototype,"bordered");wa([n({type:Number,attribute:"heading-level"})],_e.prototype,"headingLevel");wa([n({type:String})],_e.prototype,"label");wa([x()],_e.prototype,"hasLegal");g("kt-footer",_e);var Lp=Object.defineProperty,pr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Lp(t,e,r),r},Bp={small:16,medium:20,large:24},Rt=class extends c{constructor(){super(...arguments),this.selected=!1,this.disabled=!1,this.variant="primary",this.size="medium",this.value="",this.icon="",this.iconPosition="left",this.label="",this.managed=!1}static{this.styles=[c.styles,f`
8467
+ </footer>`}};wa([n({attribute:!1})],_e.prototype,"columns");wa([n({type:String,reflect:!0})],_e.prototype,"variant");wa([n({type:Boolean,reflect:!0})],_e.prototype,"bordered");wa([n({type:Number,attribute:"heading-level"})],_e.prototype,"headingLevel");wa([n({type:String})],_e.prototype,"label");wa([x()],_e.prototype,"hasLegal");g("kt-footer",_e);var Bp=Object.defineProperty,cr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Bp(t,e,r),r},Op={small:16,medium:20,large:24},Kt=class extends c{constructor(){super(...arguments),this.selected=!1,this.disabled=!1,this.variant="primary",this.size="medium",this.value="",this.icon="",this.iconPosition="left",this.label="",this.managed=!1}static{this.styles=[c.styles,f`
8374
8468
  :host {
8375
8469
  display: inline-flex;
8376
8470
  }
@@ -8479,7 +8573,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8479
8573
  .text {
8480
8574
  white-space: nowrap;
8481
8575
  }
8482
- `]}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}toggle(){this.disabled||this.managed||(this.selected=!this.selected,y(this,"kt-change",{selected:this.selected,value:this.value}))}render(){let t=this.textContent!==null&&this.textContent.trim().length>0,e=!!this.icon&&!t,a=this.icon?l`<kt-icon name=${this.icon} size=${Bp[this.size]}></kt-icon>`:d;return l`<button
8576
+ `]}focus(t){this.shadowRoot?.querySelector("button")?.focus(t)}toggle(){this.disabled||this.managed||(this.selected=!this.selected,y(this,"kt-change",{selected:this.selected,value:this.value}))}render(){let t=this.textContent!==null&&this.textContent.trim().length>0,e=!!this.icon&&!t,a=this.icon?l`<kt-icon name=${this.icon} size=${Op[this.size]}></kt-icon>`:d;return l`<button
8483
8577
  part="button"
8484
8578
  type="button"
8485
8579
  class=${w({[this.variant]:!0,[this.size]:!0,selected:this.selected,"icon-only":e})}
@@ -8491,7 +8585,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8491
8585
  ${this.iconPosition==="left"?a:d}
8492
8586
  ${e?d:l`<span class="text"><slot></slot></span>`}
8493
8587
  ${this.iconPosition==="right"?a:d}
8494
- </button>`}};pr([n({type:Boolean,reflect:!0})],Rt.prototype,"selected");pr([n({type:Boolean,reflect:!0})],Rt.prototype,"disabled");pr([n({type:String,reflect:!0})],Rt.prototype,"variant");pr([n({type:String,reflect:!0})],Rt.prototype,"size");pr([n({type:String})],Rt.prototype,"value");pr([n({type:String})],Rt.prototype,"icon");pr([n({type:String,attribute:"icon-position"})],Rt.prototype,"iconPosition");pr([n({type:String})],Rt.prototype,"label");pr([n({attribute:!1})],Rt.prototype,"managed");g("kt-toggle-button",Rt);var Op=Object.defineProperty,_a=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Op(t,e,r),r},cr=class extends c{constructor(){super(...arguments),this.multiple=!1,this.orientation="horizontal",this.label="",this.value=null,this.onButtonClick=t=>{let e=t.composedPath().find(a=>a instanceof Rt);if(!(!e||e.disabled)&&this.buttons?.includes(e)){if(this.multiple){let a=Array.isArray(this.value)?this.value:[];this.value=a.includes(e.value)?a.filter(r=>r!==e.value):[...a,e.value]}else this.value=this.value===e.value?null:e.value;this.syncButtons(),y(this,"kt-change",{value:this.value})}}}static{this.styles=[c.styles,f`
8588
+ </button>`}};cr([n({type:Boolean,reflect:!0})],Kt.prototype,"selected");cr([n({type:Boolean,reflect:!0})],Kt.prototype,"disabled");cr([n({type:String,reflect:!0})],Kt.prototype,"variant");cr([n({type:String,reflect:!0})],Kt.prototype,"size");cr([n({type:String})],Kt.prototype,"value");cr([n({type:String})],Kt.prototype,"icon");cr([n({type:String,attribute:"icon-position"})],Kt.prototype,"iconPosition");cr([n({type:String})],Kt.prototype,"label");cr([n({attribute:!1})],Kt.prototype,"managed");g("kt-toggle-button",Kt);var zp=Object.defineProperty,Va=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&zp(t,e,r),r},hr=class extends c{constructor(){super(...arguments),this.multiple=!1,this.orientation="horizontal",this.label="",this.value=null,this.onButtonClick=t=>{let e=t.composedPath().find(a=>a instanceof Kt);if(!(!e||e.disabled)&&this.buttons?.includes(e)){if(this.multiple){let a=Array.isArray(this.value)?this.value:[];this.value=a.includes(e.value)?a.filter(r=>r!==e.value):[...a,e.value]}else this.value=this.value===e.value?null:e.value;this.syncButtons(),y(this,"kt-change",{value:this.value})}}}static{this.styles=[c.styles,f`
8495
8589
  :host {
8496
8590
  display: inline-flex;
8497
8591
  width: fit-content;
@@ -8550,7 +8644,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8550
8644
  aria-label=${this.label||v().options}
8551
8645
  >
8552
8646
  <slot @slotchange=${this.syncButtons}></slot>
8553
- </div>`}};_a([na({selector:"kt-toggle-button"})],cr.prototype,"buttons");_a([n({type:Boolean,reflect:!0})],cr.prototype,"multiple");_a([n({type:String,reflect:!0})],cr.prototype,"orientation");_a([n({type:String})],cr.prototype,"label");_a([n({attribute:!1})],cr.prototype,"value");g("kt-toggle-button-group",cr);var Kp=Object.defineProperty,Eo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Kp(t,e,r),r},Mr=class extends c{constructor(){super(...arguments),this.icon="inbox",this.heading="",this.description="",this.compact=!1}static{this.styles=[c.styles,f`
8647
+ </div>`}};Va([na({selector:"kt-toggle-button"})],hr.prototype,"buttons");Va([n({type:Boolean,reflect:!0})],hr.prototype,"multiple");Va([n({type:String,reflect:!0})],hr.prototype,"orientation");Va([n({type:String})],hr.prototype,"label");Va([n({attribute:!1})],hr.prototype,"value");g("kt-toggle-button-group",hr);var Kp=Object.defineProperty,Eo=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Kp(t,e,r),r},Tr=class extends c{constructor(){super(...arguments),this.icon="inbox",this.heading="",this.description="",this.compact=!1}static{this.styles=[c.styles,f`
8554
8648
  :host {
8555
8649
  display: block;
8556
8650
  }
@@ -8610,7 +8704,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8610
8704
  ${this.description?l`<p class="description">${this.description}</p>`:d}
8611
8705
  <slot></slot>
8612
8706
  <div class="actions"><slot name="actions"></slot></div>
8613
- </div>`}};Eo([n({type:String})],Mr.prototype,"icon");Eo([n({type:String})],Mr.prototype,"heading");Eo([n({type:String})],Mr.prototype,"description");Eo([n({type:Boolean,reflect:!0})],Mr.prototype,"compact");g("kt-empty-state",Mr);var Rp=Object.defineProperty,$a=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rp(t,e,r),r},zp={success:{icon:"circle-check",progress:"success"},information:{icon:"info",progress:"info"},warning:{icon:"triangle-alert",progress:"warning"},error:{icon:"circle-alert",progress:"danger"}},yn=50,Ve=class extends c{constructor(){super(...arguments),this.remaining=0,this.variant="information",this.heading="",this.description="",this.dismissible=!1,this.duration=0}static{this.styles=[c.styles,f`
8707
+ </div>`}};Eo([n({type:String})],Tr.prototype,"icon");Eo([n({type:String})],Tr.prototype,"heading");Eo([n({type:String})],Tr.prototype,"description");Eo([n({type:Boolean,reflect:!0})],Tr.prototype,"compact");g("kt-empty-state",Tr);var Rp=Object.defineProperty,$a=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Rp(t,e,r),r},qp={success:{icon:"circle-check",progress:"success"},information:{icon:"info",progress:"info"},warning:{icon:"triangle-alert",progress:"warning"},error:{icon:"circle-alert",progress:"danger"}},kn=50,Ve=class extends c{constructor(){super(...arguments),this.remaining=0,this.variant="information",this.heading="",this.description="",this.dismissible=!1,this.duration=0}static{this.styles=[c.styles,f`
8614
8708
  :host {
8615
8709
  display: block;
8616
8710
  }
@@ -8744,7 +8838,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8744
8838
  left: 0;
8745
8839
  width: 100%;
8746
8840
  }
8747
- `]}connectedCallback(){super.connectedCallback(),this.startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this.stopCountdown()}startCountdown(){this.stopCountdown(),!(this.duration<=0)&&(this.remaining=this.duration,this.tick())}tick(){this.timer=setInterval(()=>{this.remaining-=yn,!(this.remaining>0)&&(this.stopCountdown(),this.close())},yn)}stopCountdown(){this.timer!==void 0&&clearInterval(this.timer),this.timer=void 0}pause(){this.timer!==void 0&&this.stopCountdown()}resume(){this.duration<=0||this.timer!==void 0||this.remaining<=0||this.tick()}close(){this.stopCountdown(),y(this,"kt-toast-close")}render(){let t=zp[this.variant],e=this.duration>0;return l`<div
8841
+ `]}connectedCallback(){super.connectedCallback(),this.startCountdown()}disconnectedCallback(){super.disconnectedCallback(),this.stopCountdown()}startCountdown(){this.stopCountdown(),!(this.duration<=0)&&(this.remaining=this.duration,this.tick())}tick(){this.timer=setInterval(()=>{this.remaining-=kn,!(this.remaining>0)&&(this.stopCountdown(),this.close())},kn)}stopCountdown(){this.timer!==void 0&&clearInterval(this.timer),this.timer=void 0}pause(){this.timer!==void 0&&this.stopCountdown()}resume(){this.duration<=0||this.timer!==void 0||this.remaining<=0||this.tick()}close(){this.stopCountdown(),y(this,"kt-toast-close")}render(){let t=qp[this.variant],e=this.duration>0;return l`<div
8748
8842
  part="base"
8749
8843
  class="toast"
8750
8844
  role=${this.variant==="error"?"alert":"status"}
@@ -8777,7 +8871,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8777
8871
  label=${v().timeRemaining}
8778
8872
  ></kt-progress-bar>
8779
8873
  </div>`:d}
8780
- </div>`}};$a([x()],Ve.prototype,"remaining");$a([n({type:String,reflect:!0})],Ve.prototype,"variant");$a([n({type:String})],Ve.prototype,"heading");$a([n({type:String})],Ve.prototype,"description");$a([n({type:Boolean})],Ve.prototype,"dismissible");$a([n({type:Number})],Ve.prototype,"duration");g("kt-toast",Ve);var qp=Object.defineProperty,kn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&qp(t,e,r),r},Dr=class extends c{constructor(){super(...arguments),this.position="bottom-right",this.limit=5,this.pauseAll=()=>{for(let t of this.toasts)t.pause()},this.resumeAll=()=>{for(let t of this.toasts)t.resume()}}static{this.styles=[c.styles,f`
8874
+ </div>`}};$a([x()],Ve.prototype,"remaining");$a([n({type:String,reflect:!0})],Ve.prototype,"variant");$a([n({type:String})],Ve.prototype,"heading");$a([n({type:String})],Ve.prototype,"description");$a([n({type:Boolean})],Ve.prototype,"dismissible");$a([n({type:Number})],Ve.prototype,"duration");g("kt-toast",Ve);var Ep=Object.defineProperty,wn=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ep(t,e,r),r},Lr=class extends c{constructor(){super(...arguments),this.position="bottom-right",this.limit=5,this.pauseAll=()=>{for(let t of this.toasts)t.pause()},this.resumeAll=()=>{for(let t of this.toasts)t.resume()}}static{this.styles=[c.styles,f`
8781
8875
  :host {
8782
8876
  position: fixed;
8783
8877
  z-index: var(--z-toast);
@@ -8815,7 +8909,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8815
8909
  ::slotted(kt-toast[leaving]) {
8816
8910
  pointer-events: none;
8817
8911
  }
8818
- `]}get toasts(){return[...this.querySelectorAll("kt-toast:not([leaving])")]}show(t={}){let e=document.createElement("kt-toast");return e.variant=t.variant??"information",e.heading=t.heading??"",e.description=t.description??"",e.dismissible=t.dismissible??!0,e.duration=t.duration??0,e.addEventListener("kt-toast-close",()=>this.dismiss(e),{once:!0}),this.position.startsWith("top")?this.prepend(e):this.append(e),this.enforceLimit(),e.updateComplete.then(()=>{e.isConnected&&!e.hasAttribute("leaving")&&this.move(e,"in")}),e}dismiss(t){if(t.hasAttribute("leaving"))return;t.setAttribute("leaving",""),t.setAttribute("aria-hidden","true");let e=this.move(t,"out");e?e.finished.then(()=>t.remove(),()=>t.remove()):t.remove()}clear(){for(let t of this.toasts)this.dismiss(t)}move(t,e){let a=br(this,e==="in"?"--duration-normal":"--duration-fast");if(a<=0||typeof t.animate!="function")return null;for(let k of t.getAnimations())k.cancel();let r=`${t.getBoundingClientRect().height}px`,i=`-${getComputedStyle(this).rowGap}`,s=t.previousElementSibling?"marginTop":"marginBottom",p=e==="in"?`translateY(${this.position.startsWith("top")?-8:8}px)`:`translateX(${this.position.endsWith("left")?-16:16}px)`,h={opacity:1,height:r,transform:"none",[s]:"0px"},u={opacity:0,height:"0px",transform:p,[s]:i};t.style.overflow="clip";let m=t.animate(e==="in"?[u,h]:[h,u],{duration:a,easing:Ki(this),fill:e==="out"?"forwards":"none"});m.id=`kt-toast-${e}`;let b=()=>{e==="in"&&t.style.removeProperty("overflow")};return m.finished.then(b,b),m}enforceLimit(){if(this.limit<=0)return;let t=this.toasts,e=t.length-this.limit,a=this.position.startsWith("top")?[...t].reverse():t;for(let r=0;r<e;r+=1){let i=a[r];i&&this.dismiss(i)}}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.pauseAll),this.addEventListener("pointerleave",this.resumeAll)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointerenter",this.pauseAll),this.removeEventListener("pointerleave",this.resumeAll)}render(){return l`<slot></slot>`}};kn([n({type:String,reflect:!0})],Dr.prototype,"position");kn([n({type:Number})],Dr.prototype,"limit");g("kt-toast-container",Dr);var Zi=class{constructor(){this.position="bottom-right"}getContainer(){if(this.container?.isConnected)return this.container;let t=document.querySelector("kt-toast-container");if(t)return this.container=t,t;let e=new Dr;return e.position=this.position,document.body.append(e),this.container=e,e}show(t){return this.getContainer().show(t)}success(t,e={}){return this.show({duration:4e3,...e,variant:"success",heading:t})}info(t,e={}){return this.show({duration:4e3,...e,variant:"information",heading:t})}warning(t,e={}){return this.show({duration:6e3,...e,variant:"warning",heading:t})}error(t,e={}){return this.show({duration:0,...e,variant:"error",heading:t})}clear(){this.container?.clear()}},Ep=new Zi;function Ge(o){if(!o.open){if(typeof o.showModal=="function"){o.showModal();return}o.setAttribute("open","")}}function Tr(o){if(o.open){if(typeof o.close=="function"){o.close();return}o.removeAttribute("open")}}function Lr(o,t){if(t.target!==o)return!1;let e=o.getBoundingClientRect();return e.width===0&&e.height===0?!1:t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom}var Ip=Object.defineProperty,Br=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ip(t,e,r),r},oe=class extends c{constructor(){super(...arguments),this.open=!1,this.heading=void 0,this.message="",this.confirmLabel=void 0,this.cancelLabel=void 0,this.variant="danger"}static{this.styles=[c.styles,f`
8912
+ `]}get toasts(){return[...this.querySelectorAll("kt-toast:not([leaving])")]}show(t={}){let e=document.createElement("kt-toast");return e.variant=t.variant??"information",e.heading=t.heading??"",e.description=t.description??"",e.dismissible=t.dismissible??!0,e.duration=t.duration??0,e.addEventListener("kt-toast-close",()=>this.dismiss(e),{once:!0}),this.position.startsWith("top")?this.prepend(e):this.append(e),this.enforceLimit(),e.updateComplete.then(()=>{e.isConnected&&!e.hasAttribute("leaving")&&this.move(e,"in")}),e}dismiss(t){if(t.hasAttribute("leaving"))return;t.setAttribute("leaving",""),t.setAttribute("aria-hidden","true");let e=this.move(t,"out");e?e.finished.then(()=>t.remove(),()=>t.remove()):t.remove()}clear(){for(let t of this.toasts)this.dismiss(t)}move(t,e){let a=br(this,e==="in"?"--duration-normal":"--duration-fast");if(a<=0||typeof t.animate!="function")return null;for(let k of t.getAnimations())k.cancel();let r=`${t.getBoundingClientRect().height}px`,i=`-${getComputedStyle(this).rowGap}`,s=t.previousElementSibling?"marginTop":"marginBottom",p=e==="in"?`translateY(${this.position.startsWith("top")?-8:8}px)`:`translateX(${this.position.endsWith("left")?-16:16}px)`,h={opacity:1,height:r,transform:"none",[s]:"0px"},u={opacity:0,height:"0px",transform:p,[s]:i};t.style.overflow="clip";let m=t.animate(e==="in"?[u,h]:[h,u],{duration:a,easing:Ki(this),fill:e==="out"?"forwards":"none"});m.id=`kt-toast-${e}`;let b=()=>{e==="in"&&t.style.removeProperty("overflow")};return m.finished.then(b,b),m}enforceLimit(){if(this.limit<=0)return;let t=this.toasts,e=t.length-this.limit,a=this.position.startsWith("top")?[...t].reverse():t;for(let r=0;r<e;r+=1){let i=a[r];i&&this.dismiss(i)}}connectedCallback(){super.connectedCallback(),this.addEventListener("pointerenter",this.pauseAll),this.addEventListener("pointerleave",this.resumeAll)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointerenter",this.pauseAll),this.removeEventListener("pointerleave",this.resumeAll)}render(){return l`<slot></slot>`}};wn([n({type:String,reflect:!0})],Lr.prototype,"position");wn([n({type:Number})],Lr.prototype,"limit");g("kt-toast-container",Lr);var Qi=class{constructor(){this.position="bottom-right"}getContainer(){if(this.container?.isConnected)return this.container;let t=document.querySelector("kt-toast-container");if(t)return this.container=t,t;let e=new Lr;return e.position=this.position,document.body.append(e),this.container=e,e}show(t){return this.getContainer().show(t)}success(t,e={}){return this.show({duration:4e3,...e,variant:"success",heading:t})}info(t,e={}){return this.show({duration:4e3,...e,variant:"information",heading:t})}warning(t,e={}){return this.show({duration:6e3,...e,variant:"warning",heading:t})}error(t,e={}){return this.show({duration:0,...e,variant:"error",heading:t})}clear(){this.container?.clear()}},Ip=new Qi;function Ge(o){if(!o.open){if(typeof o.showModal=="function"){o.showModal();return}o.setAttribute("open","")}}function Br(o){if(o.open){if(typeof o.close=="function"){o.close();return}o.removeAttribute("open")}}function Or(o,t){if(t.target!==o)return!1;let e=o.getBoundingClientRect();return e.width===0&&e.height===0?!1:t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom}var Fp=Object.defineProperty,zr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Fp(t,e,r),r},se=class extends c{constructor(){super(...arguments),this.open=!1,this.heading=void 0,this.message="",this.confirmLabel=void 0,this.cancelLabel=void 0,this.variant="danger"}static{this.styles=[c.styles,f`
8819
8913
  :host {
8820
8914
  display: contents;
8821
8915
  }
@@ -8896,7 +8990,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8896
8990
  transition: none;
8897
8991
  }
8898
8992
  }
8899
- `]}updated(t){t.has("open")&&(this.open?(Ge(this.dialog),this.cancelButton?.focus()):Tr(this.dialog))}confirm(){this.open=!1,y(this,"kt-confirm")}cancel(){this.open=!1,y(this,"kt-cancel")}onDialogClose(){this.open&&this.cancel()}onDialogClick(t){Lr(this.dialog,t)&&this.cancel()}render(){return l`<dialog
8993
+ `]}updated(t){t.has("open")&&(this.open?(Ge(this.dialog),this.cancelButton?.focus()):Br(this.dialog))}confirm(){this.open=!1,y(this,"kt-confirm")}cancel(){this.open=!1,y(this,"kt-cancel")}onDialogClose(){this.open&&this.cancel()}onDialogClick(t){Or(this.dialog,t)&&this.cancel()}render(){return l`<dialog
8900
8994
  part="dialog"
8901
8995
  role="alertdialog"
8902
8996
  aria-label=${this.heading??v().confirmHeading}
@@ -8918,7 +9012,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
8918
9012
  >${this.confirmLabel??v().confirm}</kt-button
8919
9013
  >
8920
9014
  </div>
8921
- </dialog>`}};Br([A("dialog")],oe.prototype,"dialog");Br([A("kt-button[data-cancel]")],oe.prototype,"cancelButton");Br([n({type:Boolean,reflect:!0})],oe.prototype,"open");Br([n({type:String})],oe.prototype,"heading");Br([n({type:String})],oe.prototype,"message");Br([n({type:String,attribute:"confirm-label"})],oe.prototype,"confirmLabel");Br([n({type:String,attribute:"cancel-label"})],oe.prototype,"cancelLabel");Br([n({type:String,reflect:!0})],oe.prototype,"variant");g("kt-confirm-dialog",oe);var Fp=Object.defineProperty,ea=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Fp(t,e,r),r},Ae=class extends c{constructor(){super(...arguments),this.open=!1,this.heading="",this.description="",this.size="medium",this.noCloseButton=!1,this.noBackdropClose=!1,this.hasFooter=!1}static{this.styles=[c.styles,f`
9015
+ </dialog>`}};zr([A("dialog")],se.prototype,"dialog");zr([A("kt-button[data-cancel]")],se.prototype,"cancelButton");zr([n({type:Boolean,reflect:!0})],se.prototype,"open");zr([n({type:String})],se.prototype,"heading");zr([n({type:String})],se.prototype,"message");zr([n({type:String,attribute:"confirm-label"})],se.prototype,"confirmLabel");zr([n({type:String,attribute:"cancel-label"})],se.prototype,"cancelLabel");zr([n({type:String,reflect:!0})],se.prototype,"variant");g("kt-confirm-dialog",se);var Up=Object.defineProperty,ea=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Up(t,e,r),r},Ae=class extends c{constructor(){super(...arguments),this.open=!1,this.heading="",this.description="",this.size="medium",this.noCloseButton=!1,this.noBackdropClose=!1,this.hasFooter=!1}static{this.styles=[c.styles,f`
8922
9016
  :host {
8923
9017
  display: contents;
8924
9018
  }
@@ -9028,7 +9122,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9028
9122
  transition: none;
9029
9123
  }
9030
9124
  }
9031
- `]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):Tr(this.dialog)),this.readFooter()}readFooter(){let t=E(this.shadowRoot?.querySelector('slot[name="footer"]'));t!==this.hasFooter&&(this.hasFooter=t,this.requestUpdate())}requestClose(){if(y(this,"kt-close").defaultPrevented){this.dialog.open||Ge(this.dialog);return}this.open=!1}onDialogClose(){this.open&&this.requestClose()}onDialogClick(t){this.noBackdropClose||Lr(this.dialog,t)&&this.requestClose()}render(){let t=!!this.heading||!!this.description;return l`<dialog
9125
+ `]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):Br(this.dialog)),this.readFooter()}readFooter(){let t=E(this.shadowRoot?.querySelector('slot[name="footer"]'));t!==this.hasFooter&&(this.hasFooter=t,this.requestUpdate())}requestClose(){if(y(this,"kt-close").defaultPrevented){this.dialog.open||Ge(this.dialog);return}this.open=!1}onDialogClose(){this.open&&this.requestClose()}onDialogClick(t){this.noBackdropClose||Or(this.dialog,t)&&this.requestClose()}render(){let t=!!this.heading||!!this.description;return l`<dialog
9032
9126
  part="dialog"
9033
9127
  aria-label=${this.heading||d}
9034
9128
  @close=${this.onDialogClose}
@@ -9055,7 +9149,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9055
9149
  <div part="footer" class=${this.hasFooter?"footer":"footer empty"}>
9056
9150
  <slot name="footer" @slotchange=${this.readFooter}></slot>
9057
9151
  </div>
9058
- </dialog>`}};ea([A("dialog")],Ae.prototype,"dialog");ea([n({type:Boolean,reflect:!0})],Ae.prototype,"open");ea([n({type:String})],Ae.prototype,"heading");ea([n({type:String})],Ae.prototype,"description");ea([n({type:String,reflect:!0})],Ae.prototype,"size");ea([n({type:Boolean,attribute:"no-close-button"})],Ae.prototype,"noCloseButton");ea([n({type:Boolean,attribute:"no-backdrop-close"})],Ae.prototype,"noBackdropClose");g("kt-modal",Ae);function Qi(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function Up(o,t,e){let a=Qi(o.label),r=Qi([...o.keywords??[],o.group??""].join(" ")),i=`${a} ${r}`;if(!e.every(p=>i.includes(p)))return 1/0;if(a.startsWith(t))return 0;let s=a.split(/[^\p{L}\p{N}]+/u);return e.every(p=>s.some(h=>h.startsWith(p)))?1:e.every(p=>a.includes(p))?2:3}function Np(o,t){let e=Qi(t.trim());if(!e)return[...o];let a=e.split(/\s+/);return o.map((r,i)=>({command:r,index:i,rank:Up(r,e,a)})).filter(r=>r.rank!==1/0).sort((r,i)=>r.rank-i.rank||r.index-i.index).map(r=>r.command)}var Hp=Object.defineProperty,Or=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Hp(t,e,r),r};function jp(o){let t=new Map;for(let e of o){let a=e.group??"";t.has(a)||t.set(a,[]),t.get(a).push(e)}return[...t].map(([e,a])=>({name:e,commands:a}))}var ie=class extends c{constructor(){super(...arguments),this.commands=[],this.open=!1,this.placeholder="",this.hotkey="k",this.query="",this.activeIndex=0,this.listId=q("kt-command-list"),this.returnFocus=null,this.onDocumentKeyDown=t=>{if(!this.hotkey||t.defaultPrevented||t.repeat||!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey)return;let e=this.hotkey.toLowerCase();(t.key?.toLowerCase()===e||t.code===`Key${e.toUpperCase()}`)&&(t.preventDefault(),this.open=!this.open)}}static{this.styles=[c.styles,f`
9152
+ </dialog>`}};ea([A("dialog")],Ae.prototype,"dialog");ea([n({type:Boolean,reflect:!0})],Ae.prototype,"open");ea([n({type:String})],Ae.prototype,"heading");ea([n({type:String})],Ae.prototype,"description");ea([n({type:String,reflect:!0})],Ae.prototype,"size");ea([n({type:Boolean,attribute:"no-close-button"})],Ae.prototype,"noCloseButton");ea([n({type:Boolean,attribute:"no-backdrop-close"})],Ae.prototype,"noBackdropClose");g("kt-modal",Ae);function Ji(o){return o.normalize("NFD").replace(/\p{Diacritic}/gu,"").toLowerCase()}function Np(o,t,e){let a=Ji(o.label),r=Ji([...o.keywords??[],o.group??""].join(" ")),i=`${a} ${r}`;if(!e.every(p=>i.includes(p)))return 1/0;if(a.startsWith(t))return 0;let s=a.split(/[^\p{L}\p{N}]+/u);return e.every(p=>s.some(h=>h.startsWith(p)))?1:e.every(p=>a.includes(p))?2:3}function Hp(o,t){let e=Ji(t.trim());if(!e)return[...o];let a=e.split(/\s+/);return o.map((r,i)=>({command:r,index:i,rank:Np(r,e,a)})).filter(r=>r.rank!==1/0).sort((r,i)=>r.rank-i.rank||r.index-i.index).map(r=>r.command)}var jp=Object.defineProperty,Kr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&jp(t,e,r),r};function _p(o){let t=new Map;for(let e of o){let a=e.group??"";t.has(a)||t.set(a,[]),t.get(a).push(e)}return[...t].map(([e,a])=>({name:e,commands:a}))}var ne=class extends c{constructor(){super(...arguments),this.commands=[],this.open=!1,this.placeholder="",this.hotkey="k",this.query="",this.activeIndex=0,this.listId=q("kt-command-list"),this.returnFocus=null,this.onDocumentKeyDown=t=>{if(!this.hotkey||t.defaultPrevented||t.repeat||!(t.metaKey||t.ctrlKey)||t.altKey||t.shiftKey)return;let e=this.hotkey.toLowerCase();(t.key?.toLowerCase()===e||t.code===`Key${e.toUpperCase()}`)&&(t.preventDefault(),this.open=!this.open)}}static{this.styles=[c.styles,f`
9059
9153
  :host {
9060
9154
  display: contents;
9061
9155
  }
@@ -9199,7 +9293,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9199
9293
  transition: none;
9200
9294
  }
9201
9295
  }
9202
- `]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.onDocumentKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.onDocumentKeyDown)}get results(){return Np(this.commands,this.query)}willUpdate(t){t.has("open")&&this.open&&(this.query="",this.activeIndex=this.firstEnabled(this.results)),t.has("commands")&&(this.activeIndex=this.firstEnabled(this.results))}updated(t){let e=t;(e.has("activeIndex")||e.has("query"))&&this.renderRoot.querySelector(`#${this.optionId(this.activeIndex)}`)?.scrollIntoView({block:"nearest"}),t.has("open")&&(this.open?(this.returnFocus=_p(),Ge(this.dialog),this.input.value="",this.input.focus(),y(this,"kt-open")):t.get("open")===!0&&(Tr(this.dialog),this.returnFocus?.isConnected&&this.returnFocus.focus(),this.returnFocus=null,y(this,"kt-close")))}firstEnabled(t){return t.findIndex(e=>!e.disabled)}step(t,e,a){for(let r=1;r<=t.length;r+=1){let i=(e+a*r+t.length*r)%t.length;if(!t[i].disabled)return i}return-1}onInput(){this.query=this.input.value,this.activeIndex=this.firstEnabled(this.results)}onKeyDown(t){let e=this.results;switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),e.length&&(this.activeIndex=this.step(e,this.activeIndex,t.key==="ArrowDown"?1:-1));break;case"Home":case"End":if(!e.length)return;t.preventDefault(),this.activeIndex=t.key==="Home"?this.firstEnabled(e):this.step(e,0,-1);break;case"Enter":{t.preventDefault();let a=e[this.activeIndex];a&&this.run(a);break}case"Escape":t.preventDefault(),this.open=!1;break}}run(t){t.disabled||(this.open=!1,y(this,"kt-select",{id:t.id,command:t}))}onDialogCancel(t){t.preventDefault(),this.open=!1}onDialogClose(){this.open&&(this.open=!1)}onDialogClick(t){Lr(this.dialog,t)&&(this.open=!1)}optionId(t){return`${this.listId}-${t}`}render(){let t=v(),e=this.results,a=e[this.activeIndex],r=-1;return l`<dialog
9296
+ `]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.onDocumentKeyDown)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.onDocumentKeyDown)}get results(){return Hp(this.commands,this.query)}willUpdate(t){t.has("open")&&this.open&&(this.query="",this.activeIndex=this.firstEnabled(this.results)),t.has("commands")&&(this.activeIndex=this.firstEnabled(this.results))}updated(t){let e=t;(e.has("activeIndex")||e.has("query"))&&this.renderRoot.querySelector(`#${this.optionId(this.activeIndex)}`)?.scrollIntoView({block:"nearest"}),t.has("open")&&(this.open?(this.returnFocus=Vp(),Ge(this.dialog),this.input.value="",this.input.focus(),y(this,"kt-open")):t.get("open")===!0&&(Br(this.dialog),this.returnFocus?.isConnected&&this.returnFocus.focus(),this.returnFocus=null,y(this,"kt-close")))}firstEnabled(t){return t.findIndex(e=>!e.disabled)}step(t,e,a){for(let r=1;r<=t.length;r+=1){let i=(e+a*r+t.length*r)%t.length;if(!t[i].disabled)return i}return-1}onInput(){this.query=this.input.value,this.activeIndex=this.firstEnabled(this.results)}onKeyDown(t){let e=this.results;switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),e.length&&(this.activeIndex=this.step(e,this.activeIndex,t.key==="ArrowDown"?1:-1));break;case"Home":case"End":if(!e.length)return;t.preventDefault(),this.activeIndex=t.key==="Home"?this.firstEnabled(e):this.step(e,0,-1);break;case"Enter":{t.preventDefault();let a=e[this.activeIndex];a&&this.run(a);break}case"Escape":t.preventDefault(),this.open=!1;break}}run(t){t.disabled||(this.open=!1,y(this,"kt-select",{id:t.id,command:t}))}onDialogCancel(t){t.preventDefault(),this.open=!1}onDialogClose(){this.open&&(this.open=!1)}onDialogClick(t){Or(this.dialog,t)&&(this.open=!1)}optionId(t){return`${this.listId}-${t}`}render(){let t=v(),e=this.results,a=e[this.activeIndex],r=-1;return l`<dialog
9203
9297
  part="dialog"
9204
9298
  aria-label=${t.commandPalette}
9205
9299
  @cancel=${this.onDialogCancel}
@@ -9226,7 +9320,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9226
9320
  </div>
9227
9321
 
9228
9322
  <div part="list" class="list" id=${this.listId} role="listbox" aria-label=${t.commandPalette}>
9229
- ${e.length===0?l`<div class="empty" aria-hidden="true">${t.noResults}</div>`:jp(e).map(i=>l`<div class="group" role="group" aria-label=${i.name||t.commandPalette}>
9323
+ ${e.length===0?l`<div class="empty" aria-hidden="true">${t.noResults}</div>`:_p(e).map(i=>l`<div class="group" role="group" aria-label=${i.name||t.commandPalette}>
9230
9324
  ${i.name?l`<div class="heading" aria-hidden="true">${i.name}</div>`:d}
9231
9325
  ${i.commands.map(s=>{r+=1;let p=r;return l`<div
9232
9326
  id=${this.optionId(p)}
@@ -9251,7 +9345,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9251
9345
  <span><kt-kbd>↵</kt-kbd>${t.commandHintRun}</span>
9252
9346
  <span><kt-kbd>esc</kt-kbd>${t.commandHintClose}</span>
9253
9347
  </div>
9254
- </dialog>`}};Or([n({attribute:!1})],ie.prototype,"commands");Or([n({type:Boolean,reflect:!0})],ie.prototype,"open");Or([n({type:String})],ie.prototype,"placeholder");Or([n({type:String})],ie.prototype,"hotkey");Or([x()],ie.prototype,"query");Or([x()],ie.prototype,"activeIndex");Or([A("dialog")],ie.prototype,"dialog");Or([A("input")],ie.prototype,"input");function _p(){let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}g("kt-command-palette",ie);var Vp=Object.defineProperty,Va=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Vp(t,e,r),r},hr=class extends c{constructor(){super(...arguments),this.open=!1,this.eyebrow=void 0,this.heading="",this.noBackdropClose=!1}static{this.styles=[c.styles,f`
9348
+ </dialog>`}};Kr([n({attribute:!1})],ne.prototype,"commands");Kr([n({type:Boolean,reflect:!0})],ne.prototype,"open");Kr([n({type:String})],ne.prototype,"placeholder");Kr([n({type:String})],ne.prototype,"hotkey");Kr([x()],ne.prototype,"query");Kr([x()],ne.prototype,"activeIndex");Kr([A("dialog")],ne.prototype,"dialog");Kr([A("input")],ne.prototype,"input");function Vp(){let o=document.activeElement;for(;o?.shadowRoot?.activeElement;)o=o.shadowRoot.activeElement;return o instanceof HTMLElement?o:null}g("kt-command-palette",ne);var Gp=Object.defineProperty,Ca=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Gp(t,e,r),r},We=class extends c{constructor(){super(...arguments),this.open=!1,this.eyebrow=void 0,this.heading="",this.size="small",this.noBackdropClose=!1}static{this.styles=[c.styles,f`
9255
9349
  :host {
9256
9350
  display: contents;
9257
9351
  }
@@ -9344,12 +9438,20 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9344
9438
  overflow: auto;
9345
9439
  }
9346
9440
 
9441
+ /* Wider, for a panel that holds more than a form: a comparison, a stack. */
9442
+ :host([size='medium']) dialog {
9443
+ width: 480px;
9444
+ }
9445
+ :host([size='large']) dialog {
9446
+ width: 720px;
9447
+ }
9448
+
9347
9449
  @media (prefers-reduced-motion: reduce) {
9348
9450
  dialog {
9349
9451
  transition: none;
9350
9452
  }
9351
9453
  }
9352
- `]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):Tr(this.dialog))}requestClose(){if(y(this,"kt-close").defaultPrevented){this.dialog.open||Ge(this.dialog);return}this.open=!1}onDialogClose(){this.open&&this.requestClose()}onDialogClick(t){this.noBackdropClose||Lr(this.dialog,t)&&this.requestClose()}render(){return l`<dialog
9454
+ `]}updated(t){t.has("open")&&(this.open?Ge(this.dialog):Br(this.dialog))}requestClose(){if(y(this,"kt-close").defaultPrevented){this.dialog.open||Ge(this.dialog);return}this.open=!1}onDialogClose(){this.open&&this.requestClose()}onDialogClick(t){this.noBackdropClose||Or(this.dialog,t)&&this.requestClose()}render(){return l`<dialog
9353
9455
  part="dialog"
9354
9456
  aria-label=${this.heading||d}
9355
9457
  @close=${this.onDialogClose}
@@ -9373,47 +9475,47 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9373
9475
 
9374
9476
  <div part="body" class="body"><slot></slot></div>
9375
9477
  <slot name="footer"></slot>
9376
- </dialog>`}};Va([A("dialog")],hr.prototype,"dialog");Va([n({type:Boolean,reflect:!0})],hr.prototype,"open");Va([n({type:String})],hr.prototype,"eyebrow");Va([n({type:String})],hr.prototype,"heading");Va([n({type:Boolean,attribute:"no-backdrop-close"})],hr.prototype,"noBackdropClose");g("kt-side-panel",hr);function Gp(o){let t=Math.floor(Math.log10(o)),e=o/10**t;return(e<1.5?1:e<3?2:e<7?5:10)*10**t}function es(o,t,e){if(t===o&&o===0)t=1;else if(t===o){let u=Math.abs(o);o-=u,t+=u}let a=Gp((t-o)/Math.max(1,e-1)),r=Math.max(0,-Math.floor(Math.log10(a))),i=u=>Number(u.toFixed(r))||0,s=i(Math.floor(o/a)*a),p=i(Math.ceil(t/a)*a),h=[];for(let u=0;s+u*a<=p+a/2;u+=1)h.push(i(s+u*a));return{min:s,max:p,step:a,values:h}}function Wp(o,t,{includeZero:e}){let a=t.flat();for(let p of o){let h=Math.max(0,...p.map(u=>u.length));for(let u=0;u<h;u+=1){let m=0,b=0;for(let k of p){let $=k[u]??0;$>=0?m+=$:b+=$}a.push(m,b)}}let r=a.filter(Number.isFinite);if(r.length===0)return{lo:0,hi:1};let i=Math.min(...r),s=Math.max(...r);return e&&(i=Math.min(i,0),s=Math.max(s,0)),{lo:i,hi:s}}function Fo(o,t,e,a){let r=es(a.min??o,a.max??t,e),i=a.min??r.min,s=a.max??r.max;return s<=i?r:{min:i,max:s,step:r.step,values:r.values.filter(p=>p>=i&&p<=s)}}function Kr(o,t,e,a){return e+(o-t.min)/(t.max-t.min)*(a-e)}function Uo(o,t){return Math.min(6,Math.max(3,Math.round(o/t)))}var Sa=Math.PI*2,Ye=o=>Math.round(o*100)/100||0,J=([o,t])=>`${Ye(o)},${Ye(t)}`;function Ga(o,t=!0){return o.map((e,a)=>`${a===0&&t?"M":"L"}${J(e)}`).join(" ")}function Yp(o){let t=o.length;if(t<3)return[];let e=o.slice(0,-1).map(([r,i],s)=>{let[p,h]=o[s+1];return p===r?0:(h-i)/(p-r)}),a=o.map((r,i)=>{if(i===0)return e[0];if(i===t-1)return e[t-2];let s=e[i-1],p=e[i];return s*p<=0?0:(s+p)/2});return e.forEach((r,i)=>{if(r===0){a[i]=0,a[i+1]=0;return}let s=a[i]/r,p=a[i+1]/r,h=s*s+p*p;if(h>9){let u=3/Math.sqrt(h);a[i]=u*s*r,a[i+1]=u*p*r}}),e.map((r,i)=>{let s=o[i],p=o[i+1],h=(p[0]-s[0])/3;return{from:s,c1:[s[0]+h,s[1]+a[i]*h],c2:[p[0]-h,p[1]-a[i+1]*h],to:p}})}function Xp(o,t=!0){return o.length<3?Ga(o,t):[t?`M${J(o[0])}`:`L${J(o[0])}`,...Yp(o).map(({c1:e,c2:a,to:r})=>`C${J(e)} ${J(a)} ${J(r)}`)].join(" ")}function _t(o,t,e,a){return[o+e*Math.sin(a),t-e*Math.cos(a)]}function Zp(o,t,e,a,r,i){let s=i-r;if(s<=0||a<=0)return"";if(s>=Sa-1e-6){let m=(b,k)=>{let $=_t(o,t,b,0),D=_t(o,t,b,Math.PI),S=`A${Ye(b)},${Ye(b)} 0 1 ${k}`;return`M${J($)} ${S} ${J(D)} ${S} ${J($)} Z`};return e>0?`${m(a,1)} ${m(e,0)}`:m(a,1)}let p=s>Math.PI?1:0,h=`A${Ye(a)},${Ye(a)} 0 ${p} 1 ${J(_t(o,t,a,i))}`;if(e<=0)return`M${J([o,t])} L${J(_t(o,t,a,r))} ${h} Z`;let u=`A${Ye(e)},${Ye(e)} 0 ${p} 0 ${J(_t(o,t,e,r))}`;return`M${J(_t(o,t,a,r))} ${h} L${J(_t(o,t,e,i))} ${u} Z`}function wn(o,t,e,a,r,i){let s=Math.max(0,i==="top"||i==="bottom"?Math.min(r,e/2,a):Math.min(r,a/2,e)),[p,h,u,m]=[o,t,o+e,t+a],b=$=>`A${Ye(s)},${Ye(s)} 0 0 1 ${J($)}`,k=$=>`L${J($)}`;if(i==="none"||s===0)return`M${J([p,h])} ${k([u,h])} ${k([u,m])} ${k([p,m])} Z`;switch(i){case"top":return`M${J([p,m])} ${k([p,h+s])} ${b([p+s,h])} ${k([u-s,h])} ${b([u,h+s])} ${k([u,m])} Z`;case"bottom":return`M${J([p,h])} ${k([u,h])} ${k([u,m-s])} ${b([u-s,m])} ${k([p+s,m])} ${b([p,m-s])} Z`;case"right":return`M${J([p,h])} ${k([u-s,h])} ${b([u,h+s])} ${k([u,m-s])} ${b([u-s,m])} ${k([p,m])} Z`;case"left":return`M${J([u,h])} ${k([u,m])} ${k([p+s,m])} ${b([p,m-s])} ${k([p,h+s])} ${b([p+s,h])} Z`}}var We={top:12,right:8,bottom:24},No=12,$n={vertical:48,horizontal:96},ra=o=>o?.values??[];function Qp(o){let{series:t,hidden:e,labels:a,measure:r,format:i,noAxis:s,width:p,height:h}=o,u=t.map(L=>L.type??o.type),m=t.map((L,kt)=>kt).filter(L=>!e.has(L)),b=m.map(L=>u[L]),k=Math.max(a.length,0,...t.map(L=>ra(L).length)),$=b.length>0?b.includes("bar"):o.type==="bar",D=o.horizontal&&$&&(b.length===0||b.every(L=>L==="bar")),S=L=>m.filter(kt=>u[kt]===L).map(kt=>ra(t[kt])),P=o.stacked?[S("bar"),S("area")].filter(L=>L.length):[],O=o.stacked?S("line"):m.map(L=>ra(t[L])),T=b.length>0?b.some(L=>L!=="line"):o.type!=="line",{lo:et,hi:K}=Wp(P,O,{includeZero:T}),C={min:o.min,max:o.max};if(!D){let L=Math.max(0,h-We.top-We.bottom),kt=Fo(et,K,Uo(L,$n.vertical),C),Xa=s?0:Math.max(0,...kt.values.map(qn=>r(i(qn)))),ss=s?4:Math.ceil(Xa)+No;return{box:{x:ss,y:We.top,width:Math.max(0,p-ss-We.right),height:L},ticks:kt,count:k,horizontal:D,banded:$,marks:u,visible:m}}let z=Math.max(0,...a.map(r)),I=Math.ceil(Math.min(z,p*.4))+No,Y=Math.max(0,p-I-We.right),ne=Fo(et,K,Uo(Y,$n.horizontal),C),le=s?We.right:Math.max(We.right,r(i(ne.max))/2);return{box:{x:I,y:We.top,width:Math.max(0,p-I-le),height:Math.max(0,h-We.top-(s?4:We.bottom))},ticks:ne,count:k,horizontal:D,banded:$,marks:u,visible:m}}function Rr(o,t){let{box:e,count:a,horizontal:r,banded:i}=o,s=r?e.y:e.x,p=r?e.height:e.width;return i?s+(t+.5)*p/Math.max(1,a):a<=1?s+p/2:s+t/(a-1)*p}function ur(o,t){let{box:e,ticks:a,horizontal:r}=o;return r?Kr(t,a,e.x,e.x+e.width):Kr(t,a,e.y+e.height,e.y)}function Jp(o,t,e){let{box:a,count:r,horizontal:i,banded:s}=o;if(r===0)return-1;let p=i?e-a.y:t-a.x,h=i?a.height:a.width;if(h<=0)return-1;let u=s?Math.floor(p/(h/r)):Math.round(p/h*(r-1));return Math.min(Math.max(u,0),r-1)}var tc=.64,Ji=2,Cn=4,Sn={grouped:40,stacked:48},ec=12;function Pn(o,t){for(let e=o.length-1;e>=0;e-=1)if(t(o[e]))return e;return-1}function rc(o,t,e){if(e(o)<=t)return o;let a=o;for(;a.length>1&&e(`${a}\u2026`)>t;)a=a.slice(0,-1);return`${a}\u2026`}function ac(o){let{layout:t,noGrid:e,noAxis:a,format:r}=o,{box:i,ticks:s,horizontal:p}=t,h=e?d:s.values.map(b=>{let k=ur(t,b);return p?M`<line class="grid" x1=${k} y1=${i.y} x2=${k} y2=${i.y+i.height} />`:M`<line class="grid" x1=${i.x} y1=${k} x2=${i.x+i.width} y2=${k} />`}),u=s.min<0&&s.max>0?(()=>{let b=ur(t,0);return p?M`<line class="baseline" x1=${b} y1=${i.y} x2=${b} y2=${i.y+i.height} />`:M`<line class="baseline" x1=${i.x} y1=${b} x2=${i.x+i.width} y2=${b} />`})():d,m=a?d:s.values.map(b=>{let k=ur(t,b);return p?M`<text class="tick-label" x=${k} y=${i.y+i.height+16} text-anchor="middle">${r(b)}</text>`:M`<text class="tick-label" x=${i.x-8} y=${k} text-anchor="end" dominant-baseline="middle">${r(b)}</text>`});return M`${h}${u}${m}`}function oc(o){let{layout:t,labels:e,measure:a}=o,{box:r,count:i,horizontal:s,banded:p}=t;if(s){let m=Math.max(1,Math.ceil(i/Math.max(1,Math.floor(r.height/18))));return M`${e.map((b,k)=>k%m===0?M`<text
9478
+ </dialog>`}};Ca([A("dialog")],We.prototype,"dialog");Ca([n({type:Boolean,reflect:!0})],We.prototype,"open");Ca([n({type:String})],We.prototype,"eyebrow");Ca([n({type:String})],We.prototype,"heading");Ca([n({type:String,reflect:!0})],We.prototype,"size");Ca([n({type:Boolean,attribute:"no-backdrop-close"})],We.prototype,"noBackdropClose");g("kt-side-panel",We);function Wp(o){let t=Math.floor(Math.log10(o)),e=o/10**t;return(e<1.5?1:e<3?2:e<7?5:10)*10**t}function rs(o,t,e){if(t===o&&o===0)t=1;else if(t===o){let u=Math.abs(o);o-=u,t+=u}let a=Wp((t-o)/Math.max(1,e-1)),r=Math.max(0,-Math.floor(Math.log10(a))),i=u=>Number(u.toFixed(r))||0,s=i(Math.floor(o/a)*a),p=i(Math.ceil(t/a)*a),h=[];for(let u=0;s+u*a<=p+a/2;u+=1)h.push(i(s+u*a));return{min:s,max:p,step:a,values:h}}function Yp(o,t,{includeZero:e}){let a=t.flat();for(let p of o){let h=Math.max(0,...p.map(u=>u.length));for(let u=0;u<h;u+=1){let m=0,b=0;for(let k of p){let $=k[u]??0;$>=0?m+=$:b+=$}a.push(m,b)}}let r=a.filter(Number.isFinite);if(r.length===0)return{lo:0,hi:1};let i=Math.min(...r),s=Math.max(...r);return e&&(i=Math.min(i,0),s=Math.max(s,0)),{lo:i,hi:s}}function Fo(o,t,e,a){let r=rs(a.min??o,a.max??t,e),i=a.min??r.min,s=a.max??r.max;return s<=i?r:{min:i,max:s,step:r.step,values:r.values.filter(p=>p>=i&&p<=s)}}function Rr(o,t,e,a){return e+(o-t.min)/(t.max-t.min)*(a-e)}function Uo(o,t){return Math.min(6,Math.max(3,Math.round(o/t)))}var Pa=Math.PI*2,Xe=o=>Math.round(o*100)/100||0,J=([o,t])=>`${Xe(o)},${Xe(t)}`;function Ga(o,t=!0){return o.map((e,a)=>`${a===0&&t?"M":"L"}${J(e)}`).join(" ")}function Xp(o){let t=o.length;if(t<3)return[];let e=o.slice(0,-1).map(([r,i],s)=>{let[p,h]=o[s+1];return p===r?0:(h-i)/(p-r)}),a=o.map((r,i)=>{if(i===0)return e[0];if(i===t-1)return e[t-2];let s=e[i-1],p=e[i];return s*p<=0?0:(s+p)/2});return e.forEach((r,i)=>{if(r===0){a[i]=0,a[i+1]=0;return}let s=a[i]/r,p=a[i+1]/r,h=s*s+p*p;if(h>9){let u=3/Math.sqrt(h);a[i]=u*s*r,a[i+1]=u*p*r}}),e.map((r,i)=>{let s=o[i],p=o[i+1],h=(p[0]-s[0])/3;return{from:s,c1:[s[0]+h,s[1]+a[i]*h],c2:[p[0]-h,p[1]-a[i+1]*h],to:p}})}function Zp(o,t=!0){return o.length<3?Ga(o,t):[t?`M${J(o[0])}`:`L${J(o[0])}`,...Xp(o).map(({c1:e,c2:a,to:r})=>`C${J(e)} ${J(a)} ${J(r)}`)].join(" ")}function _t(o,t,e,a){return[o+e*Math.sin(a),t-e*Math.cos(a)]}function Qp(o,t,e,a,r,i){let s=i-r;if(s<=0||a<=0)return"";if(s>=Pa-1e-6){let m=(b,k)=>{let $=_t(o,t,b,0),D=_t(o,t,b,Math.PI),S=`A${Xe(b)},${Xe(b)} 0 1 ${k}`;return`M${J($)} ${S} ${J(D)} ${S} ${J($)} Z`};return e>0?`${m(a,1)} ${m(e,0)}`:m(a,1)}let p=s>Math.PI?1:0,h=`A${Xe(a)},${Xe(a)} 0 ${p} 1 ${J(_t(o,t,a,i))}`;if(e<=0)return`M${J([o,t])} L${J(_t(o,t,a,r))} ${h} Z`;let u=`A${Xe(e)},${Xe(e)} 0 ${p} 0 ${J(_t(o,t,e,r))}`;return`M${J(_t(o,t,a,r))} ${h} L${J(_t(o,t,e,i))} ${u} Z`}function $n(o,t,e,a,r,i){let s=Math.max(0,i==="top"||i==="bottom"?Math.min(r,e/2,a):Math.min(r,a/2,e)),[p,h,u,m]=[o,t,o+e,t+a],b=$=>`A${Xe(s)},${Xe(s)} 0 0 1 ${J($)}`,k=$=>`L${J($)}`;if(i==="none"||s===0)return`M${J([p,h])} ${k([u,h])} ${k([u,m])} ${k([p,m])} Z`;switch(i){case"top":return`M${J([p,m])} ${k([p,h+s])} ${b([p+s,h])} ${k([u-s,h])} ${b([u,h+s])} ${k([u,m])} Z`;case"bottom":return`M${J([p,h])} ${k([u,h])} ${k([u,m-s])} ${b([u-s,m])} ${k([p+s,m])} ${b([p,m-s])} Z`;case"right":return`M${J([p,h])} ${k([u-s,h])} ${b([u,h+s])} ${k([u,m-s])} ${b([u-s,m])} ${k([p,m])} Z`;case"left":return`M${J([u,h])} ${k([u,m])} ${k([p+s,m])} ${b([p,m-s])} ${k([p,h+s])} ${b([p+s,h])} Z`}}var Ye={top:12,right:8,bottom:24},No=12,Cn={vertical:48,horizontal:96},ra=o=>o?.values??[];function Jp(o){let{series:t,hidden:e,labels:a,measure:r,format:i,noAxis:s,width:p,height:h}=o,u=t.map(L=>L.type??o.type),m=t.map((L,kt)=>kt).filter(L=>!e.has(L)),b=m.map(L=>u[L]),k=Math.max(a.length,0,...t.map(L=>ra(L).length)),$=b.length>0?b.includes("bar"):o.type==="bar",D=o.horizontal&&$&&(b.length===0||b.every(L=>L==="bar")),S=L=>m.filter(kt=>u[kt]===L).map(kt=>ra(t[kt])),P=o.stacked?[S("bar"),S("area")].filter(L=>L.length):[],O=o.stacked?S("line"):m.map(L=>ra(t[L])),T=b.length>0?b.some(L=>L!=="line"):o.type!=="line",{lo:et,hi:z}=Yp(P,O,{includeZero:T}),C={min:o.min,max:o.max};if(!D){let L=Math.max(0,h-Ye.top-Ye.bottom),kt=Fo(et,z,Uo(L,Cn.vertical),C),Xa=s?0:Math.max(0,...kt.values.map(En=>r(i(En)))),ns=s?4:Math.ceil(Xa)+No;return{box:{x:ns,y:Ye.top,width:Math.max(0,p-ns-Ye.right),height:L},ticks:kt,count:k,horizontal:D,banded:$,marks:u,visible:m}}let R=Math.max(0,...a.map(r)),I=Math.ceil(Math.min(R,p*.4))+No,Y=Math.max(0,p-I-Ye.right),de=Fo(et,z,Uo(Y,Cn.horizontal),C),pe=s?Ye.right:Math.max(Ye.right,r(i(de.max))/2);return{box:{x:I,y:Ye.top,width:Math.max(0,p-I-pe),height:Math.max(0,h-Ye.top-(s?4:Ye.bottom))},ticks:de,count:k,horizontal:D,banded:$,marks:u,visible:m}}function qr(o,t){let{box:e,count:a,horizontal:r,banded:i}=o,s=r?e.y:e.x,p=r?e.height:e.width;return i?s+(t+.5)*p/Math.max(1,a):a<=1?s+p/2:s+t/(a-1)*p}function ur(o,t){let{box:e,ticks:a,horizontal:r}=o;return r?Rr(t,a,e.x,e.x+e.width):Rr(t,a,e.y+e.height,e.y)}function tc(o,t,e){let{box:a,count:r,horizontal:i,banded:s}=o;if(r===0)return-1;let p=i?e-a.y:t-a.x,h=i?a.height:a.width;if(h<=0)return-1;let u=s?Math.floor(p/(h/r)):Math.round(p/h*(r-1));return Math.min(Math.max(u,0),r-1)}var ec=.64,ts=2,Sn=4,Pn={grouped:40,stacked:48},rc=12;function An(o,t){for(let e=o.length-1;e>=0;e-=1)if(t(o[e]))return e;return-1}function ac(o,t,e){if(e(o)<=t)return o;let a=o;for(;a.length>1&&e(`${a}\u2026`)>t;)a=a.slice(0,-1);return`${a}\u2026`}function oc(o){let{layout:t,noGrid:e,noAxis:a,format:r}=o,{box:i,ticks:s,horizontal:p}=t,h=e?d:s.values.map(b=>{let k=ur(t,b);return p?M`<line class="grid" x1=${k} y1=${i.y} x2=${k} y2=${i.y+i.height} />`:M`<line class="grid" x1=${i.x} y1=${k} x2=${i.x+i.width} y2=${k} />`}),u=s.min<0&&s.max>0?(()=>{let b=ur(t,0);return p?M`<line class="baseline" x1=${b} y1=${i.y} x2=${b} y2=${i.y+i.height} />`:M`<line class="baseline" x1=${i.x} y1=${b} x2=${i.x+i.width} y2=${b} />`})():d,m=a?d:s.values.map(b=>{let k=ur(t,b);return p?M`<text class="tick-label" x=${k} y=${i.y+i.height+16} text-anchor="middle">${r(b)}</text>`:M`<text class="tick-label" x=${i.x-8} y=${k} text-anchor="end" dominant-baseline="middle">${r(b)}</text>`});return M`${h}${u}${m}`}function ic(o){let{layout:t,labels:e,measure:a}=o,{box:r,count:i,horizontal:s,banded:p}=t;if(s){let m=Math.max(1,Math.ceil(i/Math.max(1,Math.floor(r.height/18))));return M`${e.map((b,k)=>k%m===0?M`<text
9377
9479
  class="axis-label"
9378
9480
  x=${r.x-8}
9379
- y=${Rr(t,k)}
9481
+ y=${qr(t,k)}
9380
9482
  text-anchor="end"
9381
9483
  dominant-baseline="middle"
9382
- >${rc(b,r.x-No,a)}</text>`:d)}`}let h=Math.max(0,...e.map(a))+No,u=Math.max(1,Math.ceil(i/Math.max(1,Math.floor(r.width/h))));return M`${e.map((m,b)=>{if(b%u!==0)return d;let k=p||i<=1?"middle":b===0?"start":b===i-1?"end":"middle";return M`<text
9484
+ >${ac(b,r.x-No,a)}</text>`:d)}`}let h=Math.max(0,...e.map(a))+No,u=Math.max(1,Math.ceil(i/Math.max(1,Math.floor(r.width/h))));return M`${e.map((m,b)=>{if(b%u!==0)return d;let k=p||i<=1?"middle":b===0?"start":b===i-1?"end":"middle";return M`<text
9383
9485
  class="axis-label"
9384
- x=${Rr(t,b)}
9486
+ x=${qr(t,b)}
9385
9487
  y=${r.y+r.height+16}
9386
9488
  text-anchor=${k}
9387
- >${m}</text>`})}`}function ic(o,t,e){return t.map((a,r)=>[Rr(o.layout,r),ur(o.layout,a+(e?.[r]??0))])}function ts(o,t,e=!0){return o.smooth?Xp(t,e):Ga(t,e)}function sc(o){let{layout:t,series:e,colorOf:a,active:r,idPrefix:i,stacked:s,smooth:p}=o,{box:h,count:u,visible:m,marks:b}=t,k=ur(t,Math.min(Math.max(0,t.ticks.min),t.ticks.max)),$=new Array(u).fill(0),D=[],S=[];for(let O of m){let T=b[O];if(T==="bar")continue;let et=ra(e[O]);if(et.length===0)continue;let K=a(O),C=T==="area"&&s?[...$]:void 0,z=ic(o,et,C);if(T==="area"){let I=`${i}-fill-${O}`,Y=C?et.map((le,L)=>[Rr(t,L),ur(t,C[L])]):[[z.at(-1)[0],k],[z[0][0],k]],ne=C?ts(o,[...Y].reverse(),!1):Ga(Y,!1);D.push(M`
9489
+ >${m}</text>`})}`}function sc(o,t,e){return t.map((a,r)=>[qr(o.layout,r),ur(o.layout,a+(e?.[r]??0))])}function es(o,t,e=!0){return o.smooth?Zp(t,e):Ga(t,e)}function nc(o){let{layout:t,series:e,colorOf:a,active:r,idPrefix:i,stacked:s,smooth:p}=o,{box:h,count:u,visible:m,marks:b}=t,k=ur(t,Math.min(Math.max(0,t.ticks.min),t.ticks.max)),$=new Array(u).fill(0),D=[],S=[];for(let O of m){let T=b[O];if(T==="bar")continue;let et=ra(e[O]);if(et.length===0)continue;let z=a(O),C=T==="area"&&s?[...$]:void 0,R=sc(o,et,C);if(T==="area"){let I=`${i}-fill-${O}`,Y=C?et.map((pe,L)=>[qr(t,L),ur(t,C[L])]):[[R.at(-1)[0],k],[R[0][0],k]],de=C?es(o,[...Y].reverse(),!1):Ga(Y,!1);D.push(M`
9388
9490
  <defs>
9389
9491
  <linearGradient id=${I} x1="0" y1="0" x2="0" y2="1">
9390
- <stop offset="0%" stop-color=${K} stop-opacity="0.28" />
9391
- <stop offset="100%" stop-color=${K} stop-opacity="0.02" />
9492
+ <stop offset="0%" stop-color=${z} stop-opacity="0.28" />
9493
+ <stop offset="100%" stop-color=${z} stop-opacity="0.02" />
9392
9494
  </linearGradient>
9393
9495
  </defs>
9394
- <path class="area" d=${`${ts(o,z)} ${ne} Z`} fill=${`url(#${I})`} />`),C&&et.forEach((le,L)=>$[L]=C[L]+le)}if(S.push(M`<path class="line" d=${ts(o,z)} stroke=${K} pathLength="1" />`),u<=ec&&!p&&S.push(M`${z.map(([I,Y])=>M`<circle class="point" cx=${I} cy=${Y} r="3" fill=${K} />`)}`),r>=0&&z[r]){let[I,Y]=z[r];S.push(M`<circle class="marker" cx=${I} cy=${Y} r="5" fill=${K} />`)}}let P=r>=0&&!t.banded?M`<line class="crosshair"
9395
- x1=${Rr(t,r)} y1=${h.y}
9396
- x2=${Rr(t,r)} y2=${h.y+h.height} />`:d;return M`${D}${P}${S}`}function An(o,t){let{layout:e,active:a,colorOf:r}=o,{from:i,to:s,offset:p,thickness:h,outer:u,series:m,index:b}=t,k=s<i,$=ur(e,i),D=ur(e,s),S=.5,P=Math.sign(D-$)||1;i!==0&&($+=S*P),u||(D-=S*P),Math.abs(D-$)<1&&(D=$+P);let O=Math.min($,D),T=Math.abs(D-$),et=u?e.horizontal?k?"left":"right":k?"bottom":"top":"none",K=e.horizontal?wn(O,p,T,h,Cn,et):wn(p,O,h,T,Cn,et);return M`<path
9496
+ <path class="area" d=${`${es(o,R)} ${de} Z`} fill=${`url(#${I})`} />`),C&&et.forEach((pe,L)=>$[L]=C[L]+pe)}if(S.push(M`<path class="line" d=${es(o,R)} stroke=${z} pathLength="1" />`),u<=rc&&!p&&S.push(M`${R.map(([I,Y])=>M`<circle class="point" cx=${I} cy=${Y} r="3" fill=${z} />`)}`),r>=0&&R[r]){let[I,Y]=R[r];S.push(M`<circle class="marker" cx=${I} cy=${Y} r="5" fill=${z} />`)}}let P=r>=0&&!t.banded?M`<line class="crosshair"
9497
+ x1=${qr(t,r)} y1=${h.y}
9498
+ x2=${qr(t,r)} y2=${h.y+h.height} />`:d;return M`${D}${P}${S}`}function Mn(o,t){let{layout:e,active:a,colorOf:r}=o,{from:i,to:s,offset:p,thickness:h,outer:u,series:m,index:b}=t,k=s<i,$=ur(e,i),D=ur(e,s),S=.5,P=Math.sign(D-$)||1;i!==0&&($+=S*P),u||(D-=S*P),Math.abs(D-$)<1&&(D=$+P);let O=Math.min($,D),T=Math.abs(D-$),et=u?e.horizontal?k?"left":"right":k?"bottom":"top":"none",z=e.horizontal?$n(O,p,T,h,Sn,et):$n(p,O,h,T,Sn,et);return M`<path
9397
9499
  class=${`bar${k?" negative":""}${e.horizontal?" sideways":""}`}
9398
- d=${K}
9500
+ d=${z}
9399
9501
  fill=${r(m)}
9400
9502
  data-series=${m}
9401
9503
  data-index=${b}
9402
9504
  opacity=${a===-1||a===b?1:.45}
9403
- />`}function nc(o){let{layout:t,series:e}=o,{box:a,count:r,horizontal:i,visible:s,marks:p}=t,h=s.filter(b=>p[b]==="bar");if(h.length===0||r===0)return d;let u=(i?a.height:a.width)/r*tc,m=[];for(let b=0;b<r;b+=1){let k=Rr(t,b);if(o.stacked){let S=Math.max(2,Math.min(Sn.stacked,u)),P=h.map(C=>ra(e[C])[b]??0),O=Pn(P,C=>C>0),T=Pn(P,C=>C<0),et=0,K=0;P.forEach((C,z)=>{if(C===0)return;let I=C>0?et:K,Y=I+C;C>0?et=Y:K=Y,m.push(An(o,{from:I,to:Y,offset:k-S/2,thickness:S,outer:z===(C>0?O:T),series:h[z],index:b}))});continue}let $=Math.max(2,Math.min(Sn.grouped,(u-Ji*(h.length-1))/h.length)),D=$*h.length+Ji*(h.length-1);h.forEach((S,P)=>{let O=ra(e[S])[b];O===void 0||O===0||m.push(An(o,{from:0,to:O,offset:k-D/2+P*($+Ji),thickness:$,outer:!0,series:S,index:b}))})}return M`${m}`}function lc(o){return M`
9404
- ${ac(o)}
9505
+ />`}function lc(o){let{layout:t,series:e}=o,{box:a,count:r,horizontal:i,visible:s,marks:p}=t,h=s.filter(b=>p[b]==="bar");if(h.length===0||r===0)return d;let u=(i?a.height:a.width)/r*ec,m=[];for(let b=0;b<r;b+=1){let k=qr(t,b);if(o.stacked){let S=Math.max(2,Math.min(Pn.stacked,u)),P=h.map(C=>ra(e[C])[b]??0),O=An(P,C=>C>0),T=An(P,C=>C<0),et=0,z=0;P.forEach((C,R)=>{if(C===0)return;let I=C>0?et:z,Y=I+C;C>0?et=Y:z=Y,m.push(Mn(o,{from:I,to:Y,offset:k-S/2,thickness:S,outer:R===(C>0?O:T),series:h[R],index:b}))});continue}let $=Math.max(2,Math.min(Pn.grouped,(u-ts*(h.length-1))/h.length)),D=$*h.length+ts*(h.length-1);h.forEach((S,P)=>{let O=ra(e[S])[b];O===void 0||O===0||m.push(Mn(o,{from:0,to:O,offset:k-D/2+P*($+ts),thickness:$,outer:!0,series:S,index:b}))})}return M`${m}`}function dc(o){return M`
9506
+ ${oc(o)}
9507
+ ${lc(o)}
9405
9508
  ${nc(o)}
9406
- ${sc(o)}
9407
- ${oc(o)}`}function dc(o){let{layout:t,series:e,active:a,stacked:r}=o,i=u=>ra(e[u])[a]??0,s=t.ticks.min;for(let u of["bar","area","line"]){let m=t.visible.filter(k=>t.marks[k]===u).map(i);if(m.length===0)continue;let b=r&&u!=="line"?m.filter(k=>k>0).reduce((k,$)=>k+$,0):Math.max(...m);s=Math.max(s,b)}let p=Rr(t,a),h=ur(t,Math.min(s,t.ticks.max));return t.horizontal?{x:h,y:p}:{x:p,y:h}}var Ca={top:16,right:16,bottom:24},pc=12,cc=24,Mn=3,hc=4,uc=24,Wa=o=>o?.points??[];function fc(o){return o.series.flatMap((t,e)=>o.hidden.has(e)?[]:Wa(t))}function Dn(o){return o.length===0?[0,1]:[Math.min(...o),Math.max(...o)]}function mc(o){let{width:t,height:e,measure:a,format:r,formatX:i,noAxis:s}=o,p=fc(o),h=Math.max(0,e-Ca.top-Ca.bottom),[u,m]=Dn(p.map(T=>T.y)),b=Fo(u,m,Uo(h,48),{min:o.min,max:o.max}),k=s?0:Math.max(0,...b.values.map(T=>a(r(T)))),$=s?4:Math.ceil(k)+pc,[D,S]=Dn(p.map(T=>T.x)),P=Fo(D,S,Uo(Math.max(0,t-$-Ca.right),96),{min:null,max:null}),O=s?Ca.right:Math.max(Ca.right,a(i(P.max))/2);return{box:{x:$,y:Ca.top,width:Math.max(0,t-$-O),height:h},x:P,y:b,maxR:o.bubble?Math.max(0,...p.map(T=>T.r??0)):0}}function Ho(o,t){let{box:e}=o;return[Kr(t.x,o.x,e.x,e.x+e.width),Kr(t.y,o.y,e.y+e.height,e.y)]}function gc(o,t){return o===void 0||t<=0||o<=0?Mn:Math.max(Mn,cc*Math.sqrt(o/t))}function rs(o,t,e){return o.bubble?gc(e.r,t.maxR):hc}function vc(o,t,e,a){let r=null,i=1/0;return o.series.forEach((s,p)=>{o.hidden.has(p)||Wa(s).forEach((h,u)=>{let[m,b]=Ho(t,h),k=Math.hypot(m-e,b-a),$=Math.max(uc,rs(o,t,h)+4);k<=$&&k<i&&(r={series:p,index:u},i=k)})}),r}function Tn(o){let t=Wa(o);return t.map((e,a)=>a).sort((e,a)=>t[e].x-t[a].x)}function bc(o){let{layout:t,noGrid:e,noAxis:a,format:r,formatX:i,bubble:s,colorOf:p,active:h,activeSeries:u}=o,{box:m}=t,b=e?d:M`
9408
- ${t.y.values.map(S=>{let P=Kr(S,t.y,m.y+m.height,m.y);return M`<line class="grid" x1=${m.x} y1=${P} x2=${m.x+m.width} y2=${P} />`})}
9409
- ${t.x.values.map(S=>{let P=Kr(S,t.x,m.x,m.x+m.width);return M`<line class="grid" x1=${P} y1=${m.y} x2=${P} y2=${m.y+m.height} />`})}`,k=a?d:M`
9410
- ${t.y.values.map(S=>M`<text class="tick-label" x=${m.x-8} y=${Kr(S,t.y,m.y+m.height,m.y)}
9509
+ ${ic(o)}`}function pc(o){let{layout:t,series:e,active:a,stacked:r}=o,i=u=>ra(e[u])[a]??0,s=t.ticks.min;for(let u of["bar","area","line"]){let m=t.visible.filter(k=>t.marks[k]===u).map(i);if(m.length===0)continue;let b=r&&u!=="line"?m.filter(k=>k>0).reduce((k,$)=>k+$,0):Math.max(...m);s=Math.max(s,b)}let p=qr(t,a),h=ur(t,Math.min(s,t.ticks.max));return t.horizontal?{x:h,y:p}:{x:p,y:h}}var Sa={top:16,right:16,bottom:24},cc=12,hc=24,Dn=3,uc=4,fc=24,Wa=o=>o?.points??[];function mc(o){return o.series.flatMap((t,e)=>o.hidden.has(e)?[]:Wa(t))}function Tn(o){return o.length===0?[0,1]:[Math.min(...o),Math.max(...o)]}function gc(o){let{width:t,height:e,measure:a,format:r,formatX:i,noAxis:s}=o,p=mc(o),h=Math.max(0,e-Sa.top-Sa.bottom),[u,m]=Tn(p.map(T=>T.y)),b=Fo(u,m,Uo(h,48),{min:o.min,max:o.max}),k=s?0:Math.max(0,...b.values.map(T=>a(r(T)))),$=s?4:Math.ceil(k)+cc,[D,S]=Tn(p.map(T=>T.x)),P=Fo(D,S,Uo(Math.max(0,t-$-Sa.right),96),{min:null,max:null}),O=s?Sa.right:Math.max(Sa.right,a(i(P.max))/2);return{box:{x:$,y:Sa.top,width:Math.max(0,t-$-O),height:h},x:P,y:b,maxR:o.bubble?Math.max(0,...p.map(T=>T.r??0)):0}}function Ho(o,t){let{box:e}=o;return[Rr(t.x,o.x,e.x,e.x+e.width),Rr(t.y,o.y,e.y+e.height,e.y)]}function vc(o,t){return o===void 0||t<=0||o<=0?Dn:Math.max(Dn,hc*Math.sqrt(o/t))}function as(o,t,e){return o.bubble?vc(e.r,t.maxR):uc}function bc(o,t,e,a){let r=null,i=1/0;return o.series.forEach((s,p)=>{o.hidden.has(p)||Wa(s).forEach((h,u)=>{let[m,b]=Ho(t,h),k=Math.hypot(m-e,b-a),$=Math.max(fc,as(o,t,h)+4);k<=$&&k<i&&(r={series:p,index:u},i=k)})}),r}function Ln(o){let t=Wa(o);return t.map((e,a)=>a).sort((e,a)=>t[e].x-t[a].x)}function xc(o){let{layout:t,noGrid:e,noAxis:a,format:r,formatX:i,bubble:s,colorOf:p,active:h,activeSeries:u}=o,{box:m}=t,b=e?d:M`
9510
+ ${t.y.values.map(S=>{let P=Rr(S,t.y,m.y+m.height,m.y);return M`<line class="grid" x1=${m.x} y1=${P} x2=${m.x+m.width} y2=${P} />`})}
9511
+ ${t.x.values.map(S=>{let P=Rr(S,t.x,m.x,m.x+m.width);return M`<line class="grid" x1=${P} y1=${m.y} x2=${P} y2=${m.y+m.height} />`})}`,k=a?d:M`
9512
+ ${t.y.values.map(S=>M`<text class="tick-label" x=${m.x-8} y=${Rr(S,t.y,m.y+m.height,m.y)}
9411
9513
  text-anchor="end" dominant-baseline="middle">${r(S)}</text>`)}
9412
- ${t.x.values.map(S=>M`<text class="tick-label" x=${Kr(S,t.x,m.x,m.x+m.width)}
9413
- y=${m.y+m.height+16} text-anchor="middle">${i(S)}</text>`)}`,$=o.series.flatMap((S,P)=>o.hidden.has(P)?[]:Wa(S).map((O,T)=>({point:O,index:T,seriesIndex:P,radius:rs(o,t,O)}))).sort((S,P)=>P.radius-S.radius).map(({point:S,index:P,seriesIndex:O,radius:T})=>{let[et,K]=Ho(t,S),C=p(O);return M`<circle
9514
+ ${t.x.values.map(S=>M`<text class="tick-label" x=${Rr(S,t.x,m.x,m.x+m.width)}
9515
+ y=${m.y+m.height+16} text-anchor="middle">${i(S)}</text>`)}`,$=o.series.flatMap((S,P)=>o.hidden.has(P)?[]:Wa(S).map((O,T)=>({point:O,index:T,seriesIndex:P,radius:as(o,t,O)}))).sort((S,P)=>P.radius-S.radius).map(({point:S,index:P,seriesIndex:O,radius:T})=>{let[et,z]=Ho(t,S),C=p(O);return M`<circle
9414
9516
  class="dot"
9415
9517
  cx=${et}
9416
- cy=${K}
9518
+ cy=${z}
9417
9519
  r=${T}
9418
9520
  fill=${C}
9419
9521
  fill-opacity=${s?.55:.85}
@@ -9422,9 +9524,9 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9422
9524
  data-series=${O}
9423
9525
  data-index=${P}
9424
9526
  />`}),D=(()=>{let S=Wa(o.series[u])[h];if(!S||o.hidden.has(u))return d;let[P,O]=Ho(t,S);return M`<circle class="focus-ring" cx=${P} cy=${O}
9425
- r=${rs(o,t,S)+4} fill="none" stroke=${p(u)} stroke-width="2" />`})();return M`${b}${k}${$}${D}`}var xc=8,yc=.62,Ln=4,jo=12;function kc(o){let{width:t,height:e,kind:a,series:r,hidden:i,labels:s,measure:p}=o,h=t/2,u=e/2;if(a==="radar"){let K=r.flatMap((L,kt)=>i.has(kt)?[]:L.values??[]),C=Math.min(0,...K),z=Math.max(0,...K),I=es(C,z===C?C+1:z,Ln),Y=Math.min(Math.max(0,...s.map(p)),t*.25)+jo,ne=Math.max(0,Math.min(h-Y,u-jo*2)),le=Math.max(s.length,...r.map(L=>L.values?.length??0));return{cx:h,cy:u,outer:ne,inner:0,slices:Array.from({length:le},(L,kt)=>{let Xa=kt*Sa/Math.max(1,le);return{index:kt,value:0,start:Xa,end:Xa,outer:ne}}),ticks:I,total:0}}let m=r[0]?.values??[],b=Math.max(s.length,m.length),k=K=>i.has(K)?0:Math.max(0,m[K]??0),$=Array.from({length:b},(K,C)=>k(C)).reduce((K,C)=>K+C,0),D=Math.max(0,Math.min(t,e)/2-xc),S=Math.max(0,...Array.from({length:b},(K,C)=>k(C))),P=es(0,S||1,Ln),O=Array.from({length:b},(K,C)=>C).filter(K=>!i.has(K)).length,T=0,et=Array.from({length:b},(K,C)=>{let z=k(C),I=T;return a==="polar-area"?(i.has(C)||(T+=Sa/Math.max(1,O)),{index:C,value:z,start:I,end:T,outer:D*Math.sqrt(z/P.max)}):(T+=$>0?z/$*Sa:0,{index:C,value:z,start:I,end:T,outer:D})});return{cx:h,cy:u,outer:D,inner:a==="doughnut"?D*yc:0,slices:et,ticks:P,total:$}}function wc(o,t,e,a){let r=e-o.cx,i=a-o.cy,s=Math.hypot(r,i),p=Math.atan2(r,-i);if(p<0&&(p+=Sa),t==="radar"){let h=o.slices.length;return h===0||s>o.outer+jo*2?-1:Math.round(p/(Sa/h))%h}return s>o.outer||s<o.inner?-1:o.slices.find(({start:h,end:u})=>u>h&&p>=h&&p<u)?.index??-1}function $c(o,t){let e=o.slices[t];if(!e)return[o.cx,o.cy];let a=(e.start+e.end)/2,r=o.inner>0?(o.inner+e.outer)/2:e.outer*.6;return _t(o.cx,o.cy,r,a)}function Io(o,t){let{ticks:e,outer:a}=o;return(t-e.min)/(e.max-e.min)*a}function Cc(o){let{layout:t,active:e,sliceColor:a,kind:r,noGrid:i,format:s,centerLabel:p}=o,{cx:h,cy:u,inner:m,ticks:b}=t,k=r==="polar-area"&&!i?b.values.filter(P=>P>0).map(P=>M`<circle class="grid" cx=${h} cy=${u} r=${t.outer*Math.sqrt(P/b.max)} fill="none" />`):d,$=t.slices.filter(P=>P.end>P.start&&P.outer>0),D=$.map(P=>M`<path
9527
+ r=${as(o,t,S)+4} fill="none" stroke=${p(u)} stroke-width="2" />`})();return M`${b}${k}${$}${D}`}var yc=8,kc=.62,Bn=4,jo=12;function wc(o){let{width:t,height:e,kind:a,series:r,hidden:i,labels:s,measure:p}=o,h=t/2,u=e/2;if(a==="radar"){let z=r.flatMap((L,kt)=>i.has(kt)?[]:L.values??[]),C=Math.min(0,...z),R=Math.max(0,...z),I=rs(C,R===C?C+1:R,Bn),Y=Math.min(Math.max(0,...s.map(p)),t*.25)+jo,de=Math.max(0,Math.min(h-Y,u-jo*2)),pe=Math.max(s.length,...r.map(L=>L.values?.length??0));return{cx:h,cy:u,outer:de,inner:0,slices:Array.from({length:pe},(L,kt)=>{let Xa=kt*Pa/Math.max(1,pe);return{index:kt,value:0,start:Xa,end:Xa,outer:de}}),ticks:I,total:0}}let m=r[0]?.values??[],b=Math.max(s.length,m.length),k=z=>i.has(z)?0:Math.max(0,m[z]??0),$=Array.from({length:b},(z,C)=>k(C)).reduce((z,C)=>z+C,0),D=Math.max(0,Math.min(t,e)/2-yc),S=Math.max(0,...Array.from({length:b},(z,C)=>k(C))),P=rs(0,S||1,Bn),O=Array.from({length:b},(z,C)=>C).filter(z=>!i.has(z)).length,T=0,et=Array.from({length:b},(z,C)=>{let R=k(C),I=T;return a==="polar-area"?(i.has(C)||(T+=Pa/Math.max(1,O)),{index:C,value:R,start:I,end:T,outer:D*Math.sqrt(R/P.max)}):(T+=$>0?R/$*Pa:0,{index:C,value:R,start:I,end:T,outer:D})});return{cx:h,cy:u,outer:D,inner:a==="doughnut"?D*kc:0,slices:et,ticks:P,total:$}}function $c(o,t,e,a){let r=e-o.cx,i=a-o.cy,s=Math.hypot(r,i),p=Math.atan2(r,-i);if(p<0&&(p+=Pa),t==="radar"){let h=o.slices.length;return h===0||s>o.outer+jo*2?-1:Math.round(p/(Pa/h))%h}return s>o.outer||s<o.inner?-1:o.slices.find(({start:h,end:u})=>u>h&&p>=h&&p<u)?.index??-1}function Cc(o,t){let e=o.slices[t];if(!e)return[o.cx,o.cy];let a=(e.start+e.end)/2,r=o.inner>0?(o.inner+e.outer)/2:e.outer*.6;return _t(o.cx,o.cy,r,a)}function Io(o,t){let{ticks:e,outer:a}=o;return(t-e.min)/(e.max-e.min)*a}function Sc(o){let{layout:t,active:e,sliceColor:a,kind:r,noGrid:i,format:s,centerLabel:p}=o,{cx:h,cy:u,inner:m,ticks:b}=t,k=r==="polar-area"&&!i?b.values.filter(P=>P>0).map(P=>M`<circle class="grid" cx=${h} cy=${u} r=${t.outer*Math.sqrt(P/b.max)} fill="none" />`):d,$=t.slices.filter(P=>P.end>P.start&&P.outer>0),D=$.map(P=>M`<path
9426
9528
  class="slice"
9427
- d=${Zp(h,u,m,P.outer,P.start,P.end)}
9529
+ d=${Qp(h,u,m,P.outer,P.start,P.end)}
9428
9530
  fill=${a(P.index)}
9429
9531
  fill-rule="evenodd"
9430
9532
  stroke="var(--surface-card)"
@@ -9434,11 +9536,11 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9434
9536
  opacity=${e===-1||e===P.index?1:.45}
9435
9537
  />`),S=r==="doughnut"?M`
9436
9538
  <text class="center-value" x=${h} y=${u} text-anchor="middle" dominant-baseline="middle">${s(t.total)}</text>
9437
- ${m>36?M`<text class="center-label" x=${h} y=${u+20} text-anchor="middle" dominant-baseline="middle">${p}</text>`:d}`:d;return M`${k}${D}${S}`}function Sc(o){let{layout:t,series:e,hidden:a,labels:r,colorOf:i,active:s,noGrid:p,noAxis:h,format:u}=o,{cx:m,cy:b,outer:k,ticks:$,slices:D}=t,S=D.map(C=>C.start),P=p?d:M`
9438
- ${$.values.filter(C=>C>$.min).map(C=>{let z=Io(t,C);return M`<path class="grid" fill="none" d=${`${Ga(S.map(I=>_t(m,b,z,I)))} Z`} />`})}
9439
- ${S.map(C=>{let[z,I]=_t(m,b,k,C);return M`<line class="grid" x1=${m} y1=${b} x2=${z} y2=${I} />`})}`,O=h?d:$.values.filter(C=>C>$.min).map(C=>M`<text class="tick-label ring-label" x=${m+4} y=${b-Io(t,C)+3} dominant-baseline="hanging">${u(C)}</text>`),T=S.map((C,z)=>{let I=Math.sin(C),Y=Math.cos(C),ne=I>.1?"start":I<-.1?"end":"middle",[le,L]=_t(m,b,k+(Math.abs(Y)>.5?8:jo),C),kt=Y>.5?"auto":Y<-.5?"hanging":"middle";return M`<text class="axis-label" x=${le} y=${L} text-anchor=${ne} dominant-baseline=${kt}>${r[z]??""}</text>`}),et=e.map((C,z)=>{if(a.has(z))return d;let I=i(z),Y=S.map((le,L)=>_t(m,b,Io(t,C.values?.[L]??$.min),le)),ne=s>=0&&Y[s]?M`<circle class="marker" cx=${Y[s][0]} cy=${Y[s][1]} r="5" fill=${I} />`:d;return M`
9539
+ ${m>36?M`<text class="center-label" x=${h} y=${u+20} text-anchor="middle" dominant-baseline="middle">${p}</text>`:d}`:d;return M`${k}${D}${S}`}function Pc(o){let{layout:t,series:e,hidden:a,labels:r,colorOf:i,active:s,noGrid:p,noAxis:h,format:u}=o,{cx:m,cy:b,outer:k,ticks:$,slices:D}=t,S=D.map(C=>C.start),P=p?d:M`
9540
+ ${$.values.filter(C=>C>$.min).map(C=>{let R=Io(t,C);return M`<path class="grid" fill="none" d=${`${Ga(S.map(I=>_t(m,b,R,I)))} Z`} />`})}
9541
+ ${S.map(C=>{let[R,I]=_t(m,b,k,C);return M`<line class="grid" x1=${m} y1=${b} x2=${R} y2=${I} />`})}`,O=h?d:$.values.filter(C=>C>$.min).map(C=>M`<text class="tick-label ring-label" x=${m+4} y=${b-Io(t,C)+3} dominant-baseline="hanging">${u(C)}</text>`),T=S.map((C,R)=>{let I=Math.sin(C),Y=Math.cos(C),de=I>.1?"start":I<-.1?"end":"middle",[pe,L]=_t(m,b,k+(Math.abs(Y)>.5?8:jo),C),kt=Y>.5?"auto":Y<-.5?"hanging":"middle";return M`<text class="axis-label" x=${pe} y=${L} text-anchor=${de} dominant-baseline=${kt}>${r[R]??""}</text>`}),et=e.map((C,R)=>{if(a.has(R))return d;let I=i(R),Y=S.map((pe,L)=>_t(m,b,Io(t,C.values?.[L]??$.min),pe)),de=s>=0&&Y[s]?M`<circle class="marker" cx=${Y[s][0]} cy=${Y[s][1]} r="5" fill=${I} />`:d;return M`
9440
9542
  <path class="radar" d=${`${Ga(Y)} Z`} stroke=${I} fill=${I} />
9441
- ${ne}`}),K=s>=0&&S[s]!==void 0?(()=>{let[C,z]=_t(m,b,k,S[s]);return M`<line class="crosshair" x1=${m} y1=${b} x2=${C} y2=${z} />`})():d;return M`${P}${K}${et}${O}${T}`}function Pc(o){return o.kind==="radar"?Sc(o):Cc(o)}var Ac=Object.defineProperty,tt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Ac(t,e,r),r},Bn=8,j=class extends c{constructor(){super(...arguments),this.tableId=q("kt-chart-table"),this.box={width:0,height:0},this.active=-1,this.activeSeries=-1,this.hiddenSeries=new Set,this.type="area",this.series=[],this.labels=[],this.height=200,this.format=t=>String(t),this.formatX=t=>String(t),this.noGrid=!1,this.noAxis=!1,this.showTable=!1,this.smooth=!1,this.stacked=!1,this.horizontal=!1,this.min=null,this.max=null,this.centerLabel=void 0,this.totalLabel=void 0,this.label="",this.colorOf=t=>{let e=this.series[t];return e?.color?e.color:this.series.length===1?"var(--color-primary-base)":`var(--chart-series-${t%Bn+1})`},this.measure=t=>{if(this.measureContext===void 0)try{let e=document.createElement("canvas").getContext("2d"),a=getComputedStyle(this).getPropertyValue("--font-family-body").trim();e&&(e.font=`12px ${a||"sans-serif"}`),this.measureContext=e}catch{this.measureContext=null}return this.measureContext?this.measureContext.measureText(t).width:t.length*6.5},this.sliceColor=t=>`var(--chart-series-${t%Bn+1})`}static{this.styles=[c.styles,f`
9543
+ ${de}`}),z=s>=0&&S[s]!==void 0?(()=>{let[C,R]=_t(m,b,k,S[s]);return M`<line class="crosshair" x1=${m} y1=${b} x2=${C} y2=${R} />`})():d;return M`${P}${z}${et}${O}${T}`}function Ac(o){return o.kind==="radar"?Pc(o):Sc(o)}var Mc=Object.defineProperty,tt=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Mc(t,e,r),r},On=8,j=class extends c{constructor(){super(...arguments),this.tableId=q("kt-chart-table"),this.box={width:0,height:0},this.active=-1,this.activeSeries=-1,this.hiddenSeries=new Set,this.type="area",this.series=[],this.labels=[],this.height=200,this.format=t=>String(t),this.formatX=t=>String(t),this.noGrid=!1,this.noAxis=!1,this.showTable=!1,this.smooth=!1,this.stacked=!1,this.horizontal=!1,this.min=null,this.max=null,this.centerLabel=void 0,this.totalLabel=void 0,this.label="",this.colorOf=t=>{let e=this.series[t];return e?.color?e.color:this.series.length===1?"var(--color-primary-base)":`var(--chart-series-${t%On+1})`},this.measure=t=>{if(this.measureContext===void 0)try{let e=document.createElement("canvas").getContext("2d"),a=getComputedStyle(this).getPropertyValue("--font-family-body").trim();e&&(e.font=`12px ${a||"sans-serif"}`),this.measureContext=e}catch{this.measureContext=null}return this.measureContext?this.measureContext.measureText(t).width:t.length*6.5},this.sliceColor=t=>`var(--chart-series-${t%On+1})`}static{this.styles=[c.styles,f`
9442
9544
  :host {
9443
9545
  display: block;
9444
9546
  position: relative;
@@ -9731,7 +9833,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9731
9833
  color: var(--text-body);
9732
9834
  text-align: left;
9733
9835
  }
9734
- `]}connectedCallback(){super.connectedCallback(),this.observer=new ResizeObserver(([t])=>{t&&(this.box={width:t.contentRect.width,height:this.height})})}firstUpdated(){this.plot&&this.observer?.observe(this.plot)}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}willUpdate(t){(t.has("series")||t.has("type")||t.has("labels"))&&(this.hiddenSeries.size>0&&(this.hiddenSeries=new Set),this.active>=this.pointCount&&(this.active=-1,this.activeSeries=-1))}get family(){return this.type==="scatter"||this.type==="bubble"?"point":this.type==="pie"||this.type==="doughnut"||this.type==="polar-area"||this.type==="radar"?"radial":"cartesian"}get pointCount(){return Math.max(this.labels.length,0,...this.series.map(t=>t.values?.length??0))}get cartesianView(){let t={width:this.box.width,height:this.height,series:this.series,hidden:this.hiddenSeries,labels:this.labels,type:this.family==="cartesian"?this.type:"line",stacked:this.stacked,horizontal:this.horizontal,min:this.min,max:this.max,noAxis:this.noAxis,measure:this.measure,format:this.format};return{...t,layout:Qp(t),active:this.active,smooth:this.smooth,noGrid:this.noGrid,colorOf:this.colorOf,idPrefix:this.tableId}}get pointView(){let t={width:this.box.width,height:this.height,series:this.series,hidden:this.hiddenSeries,bubble:this.type==="bubble",min:this.min,max:this.max,noAxis:this.noAxis,measure:this.measure,format:this.format,formatX:this.formatX};return{...t,layout:mc(t),active:this.active,activeSeries:this.activeSeries,noGrid:this.noGrid,colorOf:this.colorOf}}get sliced(){return this.type==="pie"||this.type==="doughnut"||this.type==="polar-area"}get radialView(){let t={width:this.box.width,height:this.height,kind:this.type,series:this.series,hidden:this.hiddenSeries,labels:this.labels,measure:this.measure};return{...t,layout:kc(t),active:this.active,noGrid:this.noGrid,noAxis:this.noAxis,centerLabel:this.centerLabel??v().total,format:this.format,colorOf:this.colorOf,sliceColor:this.sliceColor}}get hasData(){return this.family==="point"?this.series.some(t=>(t.points?.length??0)>0):this.pointCount>0}setActive(t,e=-1){t===this.active&&e===this.activeSeries||(this.active=t,this.activeSeries=e,y(this,"kt-point-hover",{index:t,series:e}))}onPointerMove(t){if(this.box.width!==0){if(this.family==="cartesian"){let e=Jp(this.cartesianView.layout,t.offsetX,t.offsetY);this.setActive(e)}else if(this.family==="radial"){let e=this.radialView;this.setActive(wc(e.layout,e.kind,t.offsetX,t.offsetY))}else if(this.family==="point"){let e=this.pointView,a=vc(e,e.layout,t.offsetX,t.offsetY);this.setActive(a?.index??-1,a?.series??-1)}}}onPointerLeave(){this.setActive(-1)}get stops(){let t=Array.from({length:this.pointCount},(e,a)=>a);return this.sliced?t.filter(e=>!this.hiddenSeries.has(e)):t}onKeyDown(t){if(this.family==="point"){this.onPointKeyDown(t);return}let e=this.stops;if(e.length===0)return;let a=e.indexOf(this.active),r=e.length-1,i={ArrowRight:a<0?0:Math.min(a+1,r),ArrowDown:a<0?0:Math.min(a+1,r),ArrowLeft:a<0?0:Math.max(a-1,0),ArrowUp:a<0?0:Math.max(a-1,0),Home:0,End:r};if(t.key==="Escape"){this.setActive(-1);return}let s=i[t.key];s!==void 0&&(t.preventDefault(),this.setActive(e[s]))}onPointKeyDown(t){let e=this.series.map((u,m)=>({index:m,count:u.points?.length??0})).filter(({index:u,count:m})=>m>0&&!this.hiddenSeries.has(u)).map(({index:u})=>u);if(e.length===0)return;if(t.key==="Escape"){this.setActive(-1);return}let a=e.indexOf(this.activeSeries),r=a<0?e[0]:this.activeSeries,i=Tn(this.series[r]),s=a<0?-1:i.indexOf(this.active),p=i.length-1,h=u=>{let m=e[Math.min(Math.max((a<0?0:a)+u,0),e.length-1)];this.setActive(Tn(this.series[m])[0],m)};switch(t.key){case"ArrowRight":this.setActive(i[s<0?0:Math.min(s+1,p)],r);break;case"ArrowLeft":this.setActive(i[s<0?0:Math.max(s-1,0)],r);break;case"ArrowDown":h(a<0?0:1);break;case"ArrowUp":h(a<0?0:-1);break;case"Home":this.setActive(i[0],r);break;case"End":this.setActive(i[p],r);break;default:return}t.preventDefault()}toggle(t){let e=!this.hiddenSeries.has(t);if(y(this,"kt-series-toggle",{series:t,hidden:e}).defaultPrevented)return;let a=new Set(this.hiddenSeries);e?a.add(t):a.delete(t),this.hiddenSeries=a,this.setActive(-1)}renderMarks(){return this.family==="cartesian"?lc(this.cartesianView):this.family==="point"?bc(this.pointView):Pc(this.radialView)}get tooltip(){if(this.active<0||this.box.width===0)return null;if(this.family==="cartesian"){let t=this.cartesianView,e=t.layout.visible.map(p=>({color:this.colorOf(p),name:this.series[p].name,value:this.format(this.series[p].values?.[this.active]??0)})),{x:a,y:r}=dc(t),i=t.layout.visible.filter(p=>this.stacked&&t.layout.marks[p]!=="line"),s=i.length>1?this.format(i.reduce((p,h)=>p+(this.series[h].values?.[this.active]??0),0)):void 0;return{title:this.labels[this.active]??`#${this.active+1}`,rows:e,...s===void 0?{}:{total:s},x:a,y:r,side:t.layout.horizontal?"right":"above"}}if(this.sliced){let t=this.radialView.layout,e=this.series[0]?.values?.[this.active]??0,a=t.total>0?Math.round(Math.max(0,e)/t.total*100):0,[r,i]=$c(t,this.active);return{title:this.labels[this.active]??`#${this.active+1}`,rows:[{color:this.sliceColor(this.active),name:this.series[0]?.name??"",value:`${this.format(e)} (${a}%)`}],x:r,y:i,side:"above"}}if(this.type==="radar"){let t=this.radialView.layout,e=this.series.map((p,h)=>h).filter(p=>!this.hiddenSeries.has(p)),a=Math.max(t.ticks.min,...e.map(p=>this.series[p].values?.[this.active]??t.ticks.min)),r=t.slices[this.active]?.start??0,[i,s]=_t(t.cx,t.cy,Io(t,a),r);return{title:this.labels[this.active]??`#${this.active+1}`,rows:e.map(p=>({color:this.colorOf(p),name:this.series[p].name,value:this.format(this.series[p].values?.[this.active]??0)})),x:i,y:s,side:"above"}}if(this.family==="point"){let t=this.series[this.activeSeries],e=t?.points?.[this.active];if(!t||!e)return null;let[a,r]=Ho(this.pointView.layout,e),i=this.colorOf(this.activeSeries),s=[{color:i,name:"x",value:this.formatX(e.x)},{color:i,name:"y",value:this.format(e.y)}];return this.type==="bubble"&&e.r!==void 0&&s.push({color:i,name:"r",value:String(e.r)}),{title:e.label??t.name,...e.label?{subtitle:t.name}:{},rows:s,x:a,y:r,side:"above"}}return null}renderTooltip(){let t=this.tooltip;if(!t)return d;let e=36+t.rows.length*20+(t.total?24:0),a=20,r=t.side,i=t.x,s=t.y;return r==="above"&&t.y-e<0&&(r="right",i=t.x+a),r==="right"&&i+180>this.box.width&&(r="left",i=t.x-(t.side==="above"?a:0)),r==="above"?i=Math.min(Math.max(i,72),Math.max(72,this.box.width-72)):s=Math.min(Math.max(s,e/2),Math.max(e/2,this.height-e/2)),l`<div class=${`tooltip ${r}`} style=${`left:${i}px;top:${s}px`} role="status">
9836
+ `]}connectedCallback(){super.connectedCallback(),this.observer=new ResizeObserver(([t])=>{t&&(this.box={width:t.contentRect.width,height:this.height})})}firstUpdated(){this.plot&&this.observer?.observe(this.plot)}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}willUpdate(t){(t.has("series")||t.has("type")||t.has("labels"))&&(this.hiddenSeries.size>0&&(this.hiddenSeries=new Set),this.active>=this.pointCount&&(this.active=-1,this.activeSeries=-1))}get family(){return this.type==="scatter"||this.type==="bubble"?"point":this.type==="pie"||this.type==="doughnut"||this.type==="polar-area"||this.type==="radar"?"radial":"cartesian"}get pointCount(){return Math.max(this.labels.length,0,...this.series.map(t=>t.values?.length??0))}get cartesianView(){let t={width:this.box.width,height:this.height,series:this.series,hidden:this.hiddenSeries,labels:this.labels,type:this.family==="cartesian"?this.type:"line",stacked:this.stacked,horizontal:this.horizontal,min:this.min,max:this.max,noAxis:this.noAxis,measure:this.measure,format:this.format};return{...t,layout:Jp(t),active:this.active,smooth:this.smooth,noGrid:this.noGrid,colorOf:this.colorOf,idPrefix:this.tableId}}get pointView(){let t={width:this.box.width,height:this.height,series:this.series,hidden:this.hiddenSeries,bubble:this.type==="bubble",min:this.min,max:this.max,noAxis:this.noAxis,measure:this.measure,format:this.format,formatX:this.formatX};return{...t,layout:gc(t),active:this.active,activeSeries:this.activeSeries,noGrid:this.noGrid,colorOf:this.colorOf}}get sliced(){return this.type==="pie"||this.type==="doughnut"||this.type==="polar-area"}get radialView(){let t={width:this.box.width,height:this.height,kind:this.type,series:this.series,hidden:this.hiddenSeries,labels:this.labels,measure:this.measure};return{...t,layout:wc(t),active:this.active,noGrid:this.noGrid,noAxis:this.noAxis,centerLabel:this.centerLabel??v().total,format:this.format,colorOf:this.colorOf,sliceColor:this.sliceColor}}get hasData(){return this.family==="point"?this.series.some(t=>(t.points?.length??0)>0):this.pointCount>0}setActive(t,e=-1){t===this.active&&e===this.activeSeries||(this.active=t,this.activeSeries=e,y(this,"kt-point-hover",{index:t,series:e}))}onPointerMove(t){if(this.box.width!==0){if(this.family==="cartesian"){let e=tc(this.cartesianView.layout,t.offsetX,t.offsetY);this.setActive(e)}else if(this.family==="radial"){let e=this.radialView;this.setActive($c(e.layout,e.kind,t.offsetX,t.offsetY))}else if(this.family==="point"){let e=this.pointView,a=bc(e,e.layout,t.offsetX,t.offsetY);this.setActive(a?.index??-1,a?.series??-1)}}}onPointerLeave(){this.setActive(-1)}get stops(){let t=Array.from({length:this.pointCount},(e,a)=>a);return this.sliced?t.filter(e=>!this.hiddenSeries.has(e)):t}onKeyDown(t){if(this.family==="point"){this.onPointKeyDown(t);return}let e=this.stops;if(e.length===0)return;let a=e.indexOf(this.active),r=e.length-1,i={ArrowRight:a<0?0:Math.min(a+1,r),ArrowDown:a<0?0:Math.min(a+1,r),ArrowLeft:a<0?0:Math.max(a-1,0),ArrowUp:a<0?0:Math.max(a-1,0),Home:0,End:r};if(t.key==="Escape"){this.setActive(-1);return}let s=i[t.key];s!==void 0&&(t.preventDefault(),this.setActive(e[s]))}onPointKeyDown(t){let e=this.series.map((u,m)=>({index:m,count:u.points?.length??0})).filter(({index:u,count:m})=>m>0&&!this.hiddenSeries.has(u)).map(({index:u})=>u);if(e.length===0)return;if(t.key==="Escape"){this.setActive(-1);return}let a=e.indexOf(this.activeSeries),r=a<0?e[0]:this.activeSeries,i=Ln(this.series[r]),s=a<0?-1:i.indexOf(this.active),p=i.length-1,h=u=>{let m=e[Math.min(Math.max((a<0?0:a)+u,0),e.length-1)];this.setActive(Ln(this.series[m])[0],m)};switch(t.key){case"ArrowRight":this.setActive(i[s<0?0:Math.min(s+1,p)],r);break;case"ArrowLeft":this.setActive(i[s<0?0:Math.max(s-1,0)],r);break;case"ArrowDown":h(a<0?0:1);break;case"ArrowUp":h(a<0?0:-1);break;case"Home":this.setActive(i[0],r);break;case"End":this.setActive(i[p],r);break;default:return}t.preventDefault()}toggle(t){let e=!this.hiddenSeries.has(t);if(y(this,"kt-series-toggle",{series:t,hidden:e}).defaultPrevented)return;let a=new Set(this.hiddenSeries);e?a.add(t):a.delete(t),this.hiddenSeries=a,this.setActive(-1)}renderMarks(){return this.family==="cartesian"?dc(this.cartesianView):this.family==="point"?xc(this.pointView):Ac(this.radialView)}get tooltip(){if(this.active<0||this.box.width===0)return null;if(this.family==="cartesian"){let t=this.cartesianView,e=t.layout.visible.map(p=>({color:this.colorOf(p),name:this.series[p].name,value:this.format(this.series[p].values?.[this.active]??0)})),{x:a,y:r}=pc(t),i=t.layout.visible.filter(p=>this.stacked&&t.layout.marks[p]!=="line"),s=i.length>1?this.format(i.reduce((p,h)=>p+(this.series[h].values?.[this.active]??0),0)):void 0;return{title:this.labels[this.active]??`#${this.active+1}`,rows:e,...s===void 0?{}:{total:s},x:a,y:r,side:t.layout.horizontal?"right":"above"}}if(this.sliced){let t=this.radialView.layout,e=this.series[0]?.values?.[this.active]??0,a=t.total>0?Math.round(Math.max(0,e)/t.total*100):0,[r,i]=Cc(t,this.active);return{title:this.labels[this.active]??`#${this.active+1}`,rows:[{color:this.sliceColor(this.active),name:this.series[0]?.name??"",value:`${this.format(e)} (${a}%)`}],x:r,y:i,side:"above"}}if(this.type==="radar"){let t=this.radialView.layout,e=this.series.map((p,h)=>h).filter(p=>!this.hiddenSeries.has(p)),a=Math.max(t.ticks.min,...e.map(p=>this.series[p].values?.[this.active]??t.ticks.min)),r=t.slices[this.active]?.start??0,[i,s]=_t(t.cx,t.cy,Io(t,a),r);return{title:this.labels[this.active]??`#${this.active+1}`,rows:e.map(p=>({color:this.colorOf(p),name:this.series[p].name,value:this.format(this.series[p].values?.[this.active]??0)})),x:i,y:s,side:"above"}}if(this.family==="point"){let t=this.series[this.activeSeries],e=t?.points?.[this.active];if(!t||!e)return null;let[a,r]=Ho(this.pointView.layout,e),i=this.colorOf(this.activeSeries),s=[{color:i,name:"x",value:this.formatX(e.x)},{color:i,name:"y",value:this.format(e.y)}];return this.type==="bubble"&&e.r!==void 0&&s.push({color:i,name:"r",value:String(e.r)}),{title:e.label??t.name,...e.label?{subtitle:t.name}:{},rows:s,x:a,y:r,side:"above"}}return null}renderTooltip(){let t=this.tooltip;if(!t)return d;let e=36+t.rows.length*20+(t.total?24:0),a=20,r=t.side,i=t.x,s=t.y;return r==="above"&&t.y-e<0&&(r="right",i=t.x+a),r==="right"&&i+180>this.box.width&&(r="left",i=t.x-(t.side==="above"?a:0)),r==="above"?i=Math.min(Math.max(i,72),Math.max(72,this.box.width-72)):s=Math.min(Math.max(s,e/2),Math.max(e/2,this.height-e/2)),l`<div class=${`tooltip ${r}`} style=${`left:${i}px;top:${s}px`} role="status">
9735
9837
  <strong>${t.title}</strong>
9736
9838
  ${t.subtitle?l`<span class="tooltip-subtitle">${t.subtitle}</span>`:d}
9737
9839
  ${t.rows.map(p=>l`<span class="tooltip-row">
@@ -9837,7 +9939,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9837
9939
  </svg>
9838
9940
  ${this.renderTooltip()}
9839
9941
  </div>
9840
- ${this.renderLegend()} ${this.renderTable()}`}};tt([A(".plot")],j.prototype,"plot");tt([x()],j.prototype,"box");tt([x()],j.prototype,"active");tt([x()],j.prototype,"activeSeries");tt([x()],j.prototype,"hiddenSeries");tt([n({type:String,reflect:!0})],j.prototype,"type");tt([n({attribute:!1})],j.prototype,"series");tt([n({attribute:!1})],j.prototype,"labels");tt([n({type:Number})],j.prototype,"height");tt([n({attribute:!1})],j.prototype,"format");tt([n({attribute:!1})],j.prototype,"formatX");tt([n({type:Boolean,attribute:"no-grid"})],j.prototype,"noGrid");tt([n({type:Boolean,attribute:"no-axis"})],j.prototype,"noAxis");tt([n({type:Boolean,reflect:!0,attribute:"show-table"})],j.prototype,"showTable");tt([n({type:Boolean})],j.prototype,"smooth");tt([n({type:Boolean})],j.prototype,"stacked");tt([n({type:Boolean})],j.prototype,"horizontal");tt([n({type:Number})],j.prototype,"min");tt([n({type:Number})],j.prototype,"max");tt([n({type:String,attribute:"center-label"})],j.prototype,"centerLabel");tt([n({type:String,attribute:"total-label"})],j.prototype,"totalLabel");tt([n({type:String})],j.prototype,"label");g("kt-chart",j);var Mc=Object.defineProperty,zr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Mc(t,e,r),r},se=class extends c{constructor(){super(...arguments),this.label="",this.used="",this.total="",this.value=0,this.segments=[],this.max=0,this.showLegend=!1,this.format=t=>String(t)}static{this.styles=[c.styles,f`
9942
+ ${this.renderLegend()} ${this.renderTable()}`}};tt([A(".plot")],j.prototype,"plot");tt([x()],j.prototype,"box");tt([x()],j.prototype,"active");tt([x()],j.prototype,"activeSeries");tt([x()],j.prototype,"hiddenSeries");tt([n({type:String,reflect:!0})],j.prototype,"type");tt([n({attribute:!1})],j.prototype,"series");tt([n({attribute:!1})],j.prototype,"labels");tt([n({type:Number})],j.prototype,"height");tt([n({attribute:!1})],j.prototype,"format");tt([n({attribute:!1})],j.prototype,"formatX");tt([n({type:Boolean,attribute:"no-grid"})],j.prototype,"noGrid");tt([n({type:Boolean,attribute:"no-axis"})],j.prototype,"noAxis");tt([n({type:Boolean,reflect:!0,attribute:"show-table"})],j.prototype,"showTable");tt([n({type:Boolean})],j.prototype,"smooth");tt([n({type:Boolean})],j.prototype,"stacked");tt([n({type:Boolean})],j.prototype,"horizontal");tt([n({type:Number})],j.prototype,"min");tt([n({type:Number})],j.prototype,"max");tt([n({type:String,attribute:"center-label"})],j.prototype,"centerLabel");tt([n({type:String,attribute:"total-label"})],j.prototype,"totalLabel");tt([n({type:String})],j.prototype,"label");g("kt-chart",j);var Dc=Object.defineProperty,Er=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dc(t,e,r),r},le=class extends c{constructor(){super(...arguments),this.label="",this.used="",this.total="",this.value=0,this.segments=[],this.max=0,this.showLegend=!1,this.format=t=>String(t)}static{this.styles=[c.styles,f`
9841
9943
  :host {
9842
9944
  display: block;
9843
9945
  }
@@ -9943,7 +10045,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9943
10045
  <span class="value">${this.format(a.value)}</span>
9944
10046
  </li>`)}
9945
10047
  </ul>`:d}
9946
- </div>`}};zr([n({type:String})],se.prototype,"label");zr([n({type:String})],se.prototype,"used");zr([n({type:String})],se.prototype,"total");zr([n({type:Number})],se.prototype,"value");zr([n({attribute:!1})],se.prototype,"segments");zr([n({type:Number})],se.prototype,"max");zr([n({type:Boolean,attribute:"show-legend"})],se.prototype,"showLegend");zr([n({attribute:!1})],se.prototype,"format");g("kt-meter",se);var Dc=Object.defineProperty,as=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Dc(t,e,r),r},aa=class extends c{constructor(){super(...arguments),this.page=1,this.totalPages=1,this.label=void 0}static{this.styles=[c.styles,f`
10048
+ </div>`}};Er([n({type:String})],le.prototype,"label");Er([n({type:String})],le.prototype,"used");Er([n({type:String})],le.prototype,"total");Er([n({type:Number})],le.prototype,"value");Er([n({attribute:!1})],le.prototype,"segments");Er([n({type:Number})],le.prototype,"max");Er([n({type:Boolean,attribute:"show-legend"})],le.prototype,"showLegend");Er([n({attribute:!1})],le.prototype,"format");g("kt-meter",le);var Tc=Object.defineProperty,os=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tc(t,e,r),r},aa=class extends c{constructor(){super(...arguments),this.page=1,this.totalPages=1,this.label=void 0}static{this.styles=[c.styles,f`
9947
10049
  :host {
9948
10050
  display: block;
9949
10051
  }
@@ -9988,7 +10090,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
9988
10090
  @click=${()=>this.go(this.page+1)}
9989
10091
  >${v().next}</kt-button
9990
10092
  >
9991
- </nav>`}};as([n({type:Number})],aa.prototype,"page");as([n({type:Number,attribute:"total-pages"})],aa.prototype,"totalPages");as([n({type:String})],aa.prototype,"label");g("kt-pagination",aa);var Tc=Object.defineProperty,fr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Tc(t,e,r),r},te=class extends c{constructor(){super(...arguments),this.label="",this.value="",this.delta="",this.trend="flat",this.inverted=!1,this.icon="",this.caption="",this.size="medium",this.loading=!1}static{this.styles=[c.styles,f`
10093
+ </nav>`}};os([n({type:Number})],aa.prototype,"page");os([n({type:Number,attribute:"total-pages"})],aa.prototype,"totalPages");os([n({type:String})],aa.prototype,"label");g("kt-pagination",aa);var Lc=Object.defineProperty,fr=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Lc(t,e,r),r},te=class extends c{constructor(){super(...arguments),this.label="",this.value="",this.delta="",this.trend="flat",this.inverted=!1,this.icon="",this.caption="",this.size="medium",this.loading=!1}static{this.styles=[c.styles,f`
9992
10094
  :host {
9993
10095
  display: block;
9994
10096
  }
@@ -10063,7 +10165,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
10063
10165
  </div>`}
10064
10166
  ${this.caption?l`<span class="caption">${this.caption}</span>`:d}
10065
10167
  <slot></slot>
10066
- </div>`}};fr([n({type:String})],te.prototype,"label");fr([n({type:String})],te.prototype,"value");fr([n({type:String})],te.prototype,"delta");fr([n({type:String,reflect:!0})],te.prototype,"trend");fr([n({type:Boolean})],te.prototype,"inverted");fr([n({type:String})],te.prototype,"icon");fr([n({type:String})],te.prototype,"caption");fr([n({type:String,reflect:!0})],te.prototype,"size");fr([n({type:Boolean,reflect:!0})],te.prototype,"loading");g("kt-stat",te);var Lc=50;function Bc({rowCount:o,rowHeight:t,viewportHeight:e,scrollTop:a,overscan:r}){if(o===0)return{start:0,end:0};if(t<=0)return{start:0,end:Math.min(o,Lc)};let i=Math.ceil(e/t),s=Math.min(Math.floor(a/t),Math.max(0,o-i)),p=Math.ceil((a+e)/t);return{start:Math.max(0,s-r),end:Math.min(o,p+r)}}var Oc=Object.defineProperty,Z=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&Oc(t,e,r),r},Kc=8,On=new Map;function Rc(o){let t=On.get(o);return t||(t=new Intl.Collator(o,{numeric:!0,sensitivity:"base"}),On.set(o,t)),t}function Kn(o){if(typeof o=="string")return o;if(typeof o=="number"||typeof o=="boolean"||typeof o=="bigint")return String(o);try{return JSON.stringify(o)??""}catch{return""}}function _o(o){return o.id??o.uid??o}var U=class extends c{constructor(){super(...arguments),this.page=1,this.manual=!1,this.virtual=!1,this.scrollOffset=0,this.viewportHeight=0,this.headerHeight=0,this.rowHeight=0,this.totalRows=0,this.columns=[],this.data=[],this.selectable=!1,this.selectionMode="multiple",this.selected=[],this.pageSize=0,this.loading=!1,this.compact=!1,this.sortKey=null,this.sortDirection=null,this.emptyText=void 0,this.loadingText=void 0,this.label="",this.locale="",this.onScroll=t=>{this.scrollOffset=t.currentTarget.scrollTop}}static{this.styles=[c.styles,f`
10168
+ </div>`}};fr([n({type:String})],te.prototype,"label");fr([n({type:String})],te.prototype,"value");fr([n({type:String})],te.prototype,"delta");fr([n({type:String,reflect:!0})],te.prototype,"trend");fr([n({type:Boolean})],te.prototype,"inverted");fr([n({type:String})],te.prototype,"icon");fr([n({type:String})],te.prototype,"caption");fr([n({type:String,reflect:!0})],te.prototype,"size");fr([n({type:Boolean,reflect:!0})],te.prototype,"loading");g("kt-stat",te);var Bc=50;function Oc({rowCount:o,rowHeight:t,viewportHeight:e,scrollTop:a,overscan:r}){if(o===0)return{start:0,end:0};if(t<=0)return{start:0,end:Math.min(o,Bc)};let i=Math.ceil(e/t),s=Math.min(Math.floor(a/t),Math.max(0,o-i)),p=Math.ceil((a+e)/t);return{start:Math.max(0,s-r),end:Math.min(o,p+r)}}var zc=Object.defineProperty,Z=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&zc(t,e,r),r},Kc=8,zn=new Map;function Rc(o){let t=zn.get(o);return t||(t=new Intl.Collator(o,{numeric:!0,sensitivity:"base"}),zn.set(o,t)),t}function Kn(o){if(typeof o=="string")return o;if(typeof o=="number"||typeof o=="boolean"||typeof o=="bigint")return String(o);try{return JSON.stringify(o)??""}catch{return""}}function _o(o){return o.id??o.uid??o}var U=class extends c{constructor(){super(...arguments),this.page=1,this.manual=!1,this.virtual=!1,this.scrollOffset=0,this.viewportHeight=0,this.headerHeight=0,this.rowHeight=0,this.totalRows=0,this.columns=[],this.data=[],this.selectable=!1,this.selectionMode="multiple",this.selected=[],this.pageSize=0,this.loading=!1,this.compact=!1,this.sortKey=null,this.sortDirection=null,this.emptyText=void 0,this.loadingText=void 0,this.label="",this.locale="",this.onScroll=t=>{this.scrollOffset=t.currentTarget.scrollTop}}static{this.styles=[c.styles,f`
10067
10169
  :host {
10068
10170
  display: block;
10069
10171
  width: 100%;
@@ -10234,7 +10336,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
10234
10336
  <td colspan=${e}>
10235
10337
  <div class="placeholder">${this.emptyText??v().noData}</div>
10236
10338
  </td>
10237
- </tr>`;if(!this.isVirtual)return l`${t.map((s,p)=>this.renderRow(s,p))}`;let{start:a,end:r}=Bc({rowCount:t.length,rowHeight:this.rowHeight,viewportHeight:Math.max(0,this.viewportHeight-this.headerHeight),scrollTop:Math.max(0,this.scrollOffset-this.headerHeight),overscan:Kc}),i=s=>s>0&&this.rowHeight>0?l`<tr class="spacer" aria-hidden="true">
10339
+ </tr>`;if(!this.isVirtual)return l`${t.map((s,p)=>this.renderRow(s,p))}`;let{start:a,end:r}=Oc({rowCount:t.length,rowHeight:this.rowHeight,viewportHeight:Math.max(0,this.viewportHeight-this.headerHeight),scrollTop:Math.max(0,this.scrollOffset-this.headerHeight),overscan:Kc}),i=s=>s>0&&this.rowHeight>0?l`<tr class="spacer" aria-hidden="true">
10238
10340
  <td colspan=${e} style=${`height: ${s*this.rowHeight}px`}></td>
10239
10341
  </tr>`:d;return l`${i(a)}${t.slice(a,r).map((s,p)=>this.renderRow(s,a+p))}${i(t.length-r)}`}renderRow(t,e){let a=this.isSelected(t);return l`<tr
10240
10342
  part="row"
@@ -10291,7 +10393,7 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
10291
10393
  .totalPages=${this.totalPages}
10292
10394
  @kt-page-change=${this.onPageChange}
10293
10395
  ></kt-pagination>
10294
- </footer>`:d}`}};Z([n({type:Number})],U.prototype,"page");Z([n({type:Boolean,reflect:!0})],U.prototype,"manual");Z([n({type:Boolean,reflect:!0})],U.prototype,"virtual");Z([x()],U.prototype,"scrollOffset");Z([x()],U.prototype,"viewportHeight");Z([x()],U.prototype,"headerHeight");Z([x()],U.prototype,"rowHeight");Z([n({type:Number,attribute:"total-rows"})],U.prototype,"totalRows");Z([n({attribute:!1})],U.prototype,"columns");Z([n({attribute:!1})],U.prototype,"data");Z([n({type:Boolean,reflect:!0})],U.prototype,"selectable");Z([n({type:String,attribute:"selection-mode"})],U.prototype,"selectionMode");Z([n({attribute:!1})],U.prototype,"selected");Z([n({type:Number,attribute:"page-size"})],U.prototype,"pageSize");Z([n({type:Boolean,reflect:!0})],U.prototype,"loading");Z([n({type:Boolean,reflect:!0})],U.prototype,"compact");Z([n({type:String,attribute:"sort-key"})],U.prototype,"sortKey");Z([n({type:String,attribute:"sort-direction"})],U.prototype,"sortDirection");Z([n({attribute:!1})],U.prototype,"renderCell");Z([n({type:String,attribute:"empty-text"})],U.prototype,"emptyText");Z([n({type:String,attribute:"loading-text"})],U.prototype,"loadingText");Z([n({type:String})],U.prototype,"label");Z([n({type:String})],U.prototype,"locale");g("kt-table",U);var zc=Object.defineProperty,oa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&zc(t,e,r),r},Ya=class extends c{constructor(){super(...arguments),this.compact=!1,this.#t=()=>{let t=this.shadowRoot?.querySelector("slot");if(!t)return;let e=t.assignedElements({flatten:!0}).filter(a=>a instanceof Me);e.forEach((a,r)=>{a.last=r===e.length-1,a.compact=this.compact})}}static{this.styles=[c.styles,f`
10396
+ </footer>`:d}`}};Z([n({type:Number})],U.prototype,"page");Z([n({type:Boolean,reflect:!0})],U.prototype,"manual");Z([n({type:Boolean,reflect:!0})],U.prototype,"virtual");Z([x()],U.prototype,"scrollOffset");Z([x()],U.prototype,"viewportHeight");Z([x()],U.prototype,"headerHeight");Z([x()],U.prototype,"rowHeight");Z([n({type:Number,attribute:"total-rows"})],U.prototype,"totalRows");Z([n({attribute:!1})],U.prototype,"columns");Z([n({attribute:!1})],U.prototype,"data");Z([n({type:Boolean,reflect:!0})],U.prototype,"selectable");Z([n({type:String,attribute:"selection-mode"})],U.prototype,"selectionMode");Z([n({attribute:!1})],U.prototype,"selected");Z([n({type:Number,attribute:"page-size"})],U.prototype,"pageSize");Z([n({type:Boolean,reflect:!0})],U.prototype,"loading");Z([n({type:Boolean,reflect:!0})],U.prototype,"compact");Z([n({type:String,attribute:"sort-key"})],U.prototype,"sortKey");Z([n({type:String,attribute:"sort-direction"})],U.prototype,"sortDirection");Z([n({attribute:!1})],U.prototype,"renderCell");Z([n({type:String,attribute:"empty-text"})],U.prototype,"emptyText");Z([n({type:String,attribute:"loading-text"})],U.prototype,"loadingText");Z([n({type:String})],U.prototype,"label");Z([n({type:String})],U.prototype,"locale");g("kt-table",U);var qc=Object.defineProperty,oa=(o,t,e,a)=>{for(var r=void 0,i=o.length-1,s;i>=0;i--)(s=o[i])&&(r=s(t,e,r)||r);return r&&qc(t,e,r),r},Ya=class extends c{constructor(){super(...arguments),this.compact=!1,this.#t=()=>{let t=this.shadowRoot?.querySelector("slot");if(!t)return;let e=t.assignedElements({flatten:!0}).filter(a=>a instanceof Me);e.forEach((a,r)=>{a.last=r===e.length-1,a.compact=this.compact})}}static{this.styles=[c.styles,f`
10295
10397
  :host {
10296
10398
  display: block;
10297
10399
  }
@@ -10450,4 +10552,4 @@ var Za=globalThis,Qa=Za.ShadowRoot&&(Za.ShadyCSS===void 0||Za.ShadyCSS.nativeSha
10450
10552
  </div>`:d}
10451
10553
  <div class="body"><slot></slot></div>
10452
10554
  </div>
10453
- </div>`}};oa([n({type:String})],Me.prototype,"heading");oa([n({type:String})],Me.prototype,"time");oa([n({type:String})],Me.prototype,"icon");oa([n({type:String,reflect:!0})],Me.prototype,"variant");oa([n({type:Boolean,reflect:!0})],Me.prototype,"last");oa([n({type:Boolean,reflect:!0})],Me.prototype,"compact");g("kt-timeline",Ya);g("kt-timeline-item",Me);var qc=[{id:"dark",label:"Dark"},{id:"light",label:"Light"},{id:"auto",label:"Auto"}],Ec=[{id:"kanto",label:"Kanto",family:"'Mulish', system-ui, sans-serif"},{id:"system",label:"System",family:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif"},{id:"inter",label:"Inter",family:"'Inter', system-ui, sans-serif"},{id:"plex",label:"IBM Plex Sans",family:"'IBM Plex Sans', system-ui, sans-serif"},{id:"geist",label:"Geist",family:"'Geist', system-ui, sans-serif"}],Ic=[{id:"sharp",label:"Sharp"},{id:"default",label:"Default"},{id:"round",label:"Round"}],Fc=[{id:"compact",label:"Compact"},{id:"default",label:"Default"},{id:"comfortable",label:"Comfortable"}],Uc=[{id:"small",label:"Small"},{id:"default",label:"Default"},{id:"large",label:"Large"}],Rn={theme:"dark",accent:"violet",font:"kanto",radius:"default",density:"default",textSize:"default"},zn={theme:qc,font:Ec,radius:Ic,density:Fc,textSize:Uc},os=Object.keys(zn),is=o=>zn[o].map(t=>t.id);function D2(o,t=document.documentElement){for(let i of os){let s=o[i];if(s!==void 0&&!is(i).includes(s))throw new TypeError(`Unknown ${i} "${s}". Use one of: ${is(i).join(", ")}.`)}let e=Oo.find(i=>i.id===o.accent);o.accent!==void 0&&!e&&Wi(o.accent);let a=t===document.documentElement,r=(i,s)=>s===Rn[i]&&(a||i==="theme");for(let i of os){let s=o[i];s!==void 0&&(r(i,s)?delete t.dataset[i]:t.dataset[i]=s)}o.accent!==void 0&&(e?(Xi(null,t),r("accent",e.id)?delete t.dataset.accent:t.dataset.accent=e.id):(delete t.dataset.accent,Xi(o.accent,t)))}function T2(o=document.documentElement){let t={...Rn};for(let r of os){let i=o.dataset[r];i!==void 0&&is(r).includes(i)&&(t[r]=i)}let e=o.style.getPropertyValue("--accent-base").trim(),a=o.dataset.accent;return e?t.accent=e:a&&Oo.some(r=>r.id===a)&&(t.accent=a),t}export{Oo as KT_ACCENTS,gn as KT_DEFAULT_ACCENT,Rn as KT_DEFAULT_APPEARANCE,Fc as KT_DENSITIES,Ec as KT_FONTS,Ic as KT_RADII,Uc as KT_TEXT_SIZES,qc as KT_THEMES,Ua as KtAccordion,Ie as KtAlert,Xt as KtAppShell,Ht as KtAuthForm,pe as KtAvatar,Cr as KtAvatarGroup,zt as KtBadge,ft as KtBlogPost,ua as KtBreadcrumb,Fs as KtButton,Mt as KtCalendar,ee as KtCard,j as KtChart,be as KtChatMessage,Pt as KtCheckbox,Vs as KtCode,Ar as KtCollapsible,ke as KtColorPicker,ie as KtCommandPalette,oe as KtConfirmDialog,xe as KtCopyButton,Ce as KtCta,kr as KtDateInput,on as KtDatePicker,ir as KtDescriptionList,mt as KtDragDrop,Ct as KtDropdown,c as KtElement,je as KtEmptyPage,Mr as KtEmptyState,we as KtErrorPage,Zt as KtFaq,$e as KtFeatureGrid,_e as KtFooter,me as KtForm,ar as KtHeader,Ue as KtHero,vr as KtIcon,F as KtInput,dt as KtInputMenu,ca as KtKbd,_r as KtLabelInput,Pr as KtLogoCloud,se as KtMeter,Ae as KtModal,ot as KtMultiSelect,Kt as KtNewsletter,it as KtNumberInput,Nt as KtOtpInput,$r as KtPageHeader,aa as KtPagination,Qt as KtPostGrid,Ot as KtPricingTable,Jt as KtProgressBar,Ut as KtPromptInput,ae as KtRadio,Wt as KtRadioGroup,Ft as KtSegmentedControl,pt as KtSelect,He as KtSettingsSection,hr as KtSidePanel,er as KtSkeleton,Bt as KtSlider,St as KtSplitButton,te as KtStat,rr as KtSteps,Re as KtSubMenuNavigation,U as KtTable,ze as KtTabs,Ne as KtTestimonials,gt as KtTextarea,Vr as KtTimeInput,Ya as KtTimeline,Me as KtTimelineItem,Ve as KtToast,Dr as KtToastContainer,ve as KtToggle,Rt as KtToggleButton,cr as KtToggleButtonGroup,Oe as KtTooltip,Sr as KtTour,sr as KtTree,ye as KtUserMenu,vn as accentPalette,Yi as accentProperties,Bo as contrastRatio,ai as defaultStrings,g as defineElement,Oi as getIcon,v as getStrings,Wi as parseColor,T2 as readAppearance,Ds as registerIcon,Ts as registerIcons,Jn as registeredIcons,Qn as resetStrings,Xi as setAccent,D2 as setAppearance,Ss as setStrings,Ep as toaster};
10555
+ </div>`}};oa([n({type:String})],Me.prototype,"heading");oa([n({type:String})],Me.prototype,"time");oa([n({type:String})],Me.prototype,"icon");oa([n({type:String,reflect:!0})],Me.prototype,"variant");oa([n({type:Boolean,reflect:!0})],Me.prototype,"last");oa([n({type:Boolean,reflect:!0})],Me.prototype,"compact");g("kt-timeline",Ya);g("kt-timeline-item",Me);var Ec=[{id:"dark",label:"Dark"},{id:"light",label:"Light"},{id:"auto",label:"Auto"}],Ic=[{id:"kanto",label:"Kanto",family:"'Mulish', system-ui, sans-serif"},{id:"system",label:"System",family:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif"},{id:"inter",label:"Inter",family:"'Inter', system-ui, sans-serif"},{id:"plex",label:"IBM Plex Sans",family:"'IBM Plex Sans', system-ui, sans-serif"},{id:"geist",label:"Geist",family:"'Geist', system-ui, sans-serif"}],Fc=[{id:"sharp",label:"Sharp"},{id:"default",label:"Default"},{id:"round",label:"Round"}],Uc=[{id:"compact",label:"Compact"},{id:"default",label:"Default"},{id:"comfortable",label:"Comfortable"}],Nc=[{id:"small",label:"Small"},{id:"default",label:"Default"},{id:"large",label:"Large"}],Rn={theme:"dark",accent:"violet",font:"kanto",radius:"default",density:"default",textSize:"default"},qn={theme:Ec,font:Ic,radius:Fc,density:Uc,textSize:Nc},is=Object.keys(qn),ss=o=>qn[o].map(t=>t.id);function B2(o,t=document.documentElement){for(let i of is){let s=o[i];if(s!==void 0&&!ss(i).includes(s))throw new TypeError(`Unknown ${i} "${s}". Use one of: ${ss(i).join(", ")}.`)}let e=Oo.find(i=>i.id===o.accent);o.accent!==void 0&&!e&&Yi(o.accent);let a=t===document.documentElement,r=(i,s)=>s===Rn[i]&&(a||i==="theme");for(let i of is){let s=o[i];s!==void 0&&(r(i,s)?delete t.dataset[i]:t.dataset[i]=s)}o.accent!==void 0&&(e?(Zi(null,t),r("accent",e.id)?delete t.dataset.accent:t.dataset.accent=e.id):(delete t.dataset.accent,Zi(o.accent,t)))}function O2(o=document.documentElement){let t={...Rn};for(let r of is){let i=o.dataset[r];i!==void 0&&ss(r).includes(i)&&(t[r]=i)}let e=o.style.getPropertyValue("--accent-base").trim(),a=o.dataset.accent;return e?t.accent=e:a&&Oo.some(r=>r.id===a)&&(t.accent=a),t}export{Oo as KT_ACCENTS,vn as KT_DEFAULT_ACCENT,Rn as KT_DEFAULT_APPEARANCE,Uc as KT_DENSITIES,Ic as KT_FONTS,Fc as KT_RADII,Nc as KT_TEXT_SIZES,Ec as KT_THEMES,Na as KtAccordion,Ie as KtAlert,Xt as KtAppShell,Ht as KtAuthForm,he as KtAvatar,Sr as KtAvatarGroup,Rt as KtBadge,ft as KtBlogPost,ua as KtBreadcrumb,Us as KtButton,Mt as KtCalendar,ee as KtCard,j as KtChart,oe as KtChatMessage,Pt as KtCheckbox,Gs as KtCode,Dr as KtCollapsible,ke as KtColorPicker,ne as KtCommandPalette,se as KtConfirmDialog,ye as KtCopyButton,Ce as KtCta,kr as KtDateInput,sn as KtDatePicker,sr as KtDescriptionList,mt as KtDragDrop,Ct as KtDropdown,c as KtElement,je as KtEmptyPage,Tr as KtEmptyState,we as KtErrorPage,Zt as KtFaq,$e as KtFeatureGrid,_e as KtFooter,ve as KtForm,or as KtHeader,Ue as KtHero,vr as KtIcon,F as KtInput,dt as KtInputMenu,ca as KtKbd,Gr as KtLabelInput,Mr as KtLogoCloud,le as KtMeter,Ae as KtModal,ot as KtMultiSelect,zt as KtNewsletter,it as KtNumberInput,Nt as KtOtpInput,$r as KtPageHeader,aa as KtPagination,Qt as KtPostGrid,Ot as KtPricingTable,Jt as KtProgressBar,Ut as KtPromptInput,ae as KtRadio,Wt as KtRadioGroup,Ft as KtSegmentedControl,pt as KtSelect,He as KtSettingsSection,We as KtSidePanel,rr as KtSkeleton,Bt as KtSlider,St as KtSplitButton,te as KtStat,ar as KtSteps,Ke as KtSubMenuNavigation,U as KtTable,Re as KtTabs,Ne as KtTestimonials,gt as KtTextarea,Wr as KtTimeInput,Ya as KtTimeline,Me as KtTimelineItem,Ve as KtToast,Lr as KtToastContainer,xe as KtToggle,Kt as KtToggleButton,hr as KtToggleButtonGroup,Oe as KtTooltip,Ar as KtTour,nr as KtTree,ie as KtUserMenu,bn as accentPalette,Xi as accentProperties,Bo as contrastRatio,ai as defaultStrings,g as defineElement,zi as getIcon,v as getStrings,Yi as parseColor,O2 as readAppearance,Ts as registerIcon,Ls as registerIcons,tl as registeredIcons,Jn as resetStrings,Zi as setAccent,B2 as setAppearance,Ps as setStrings,Ip as toaster};