@momentum-design/components 0.28.6 → 0.28.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +61 -53
- package/dist/browser/index.js.map +3 -3
- package/dist/components/checkbox/checkbox.component.d.ts +1 -0
- package/dist/components/checkbox/checkbox.component.js +9 -5
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +1 -1
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +2 -0
- package/dist/components/radio/radio.component.d.ts +1 -0
- package/dist/components/radio/radio.component.js +9 -5
- package/dist/components/toggle/toggle.styles.js +10 -2
- package/dist/custom-elements.json +10 -0
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
"use strict";(()=>{var Fs=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var c=(o,t,e,r)=>{for(var i=r>1?void 0:r?Bs(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Fs(t,e,i),i};var ar=globalThis,lr=ar.ShadowRoot&&(ar.ShadyCSS===void 0||ar.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oo=Symbol(),mi=new WeakMap,Lt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==oo)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(lr&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=mi.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&mi.set(e,t))}return t}toString(){return this.cssText}},hi=o=>new Lt(typeof o=="string"?o:o+"",void 0,oo),g=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,n)=>r+(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.")})(i)+o[n+1],o[0]);return new Lt(e,o,oo)},io=(o,t)=>{if(lr)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=ar.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},cr=lr?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return hi(e)})(o):o;var{is:Gs,defineProperty:qs,getOwnPropertyDescriptor:Ys,getOwnPropertyNames:Ws,getOwnPropertySymbols:Xs,getPrototypeOf:Zs}=Object,Ne=globalThis,pi=Ne.trustedTypes,js=pi?pi.emptyScript:"",no=Ne.reactiveElementPolyfillSupport,Nt=(o,t)=>o,Ot={toAttribute(o,t){switch(t){case Boolean:o=o?js: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}},dr=(o,t)=>!Gs(o,t),ui={attribute:!0,type:String,converter:Ot,reflect:!1,hasChanged:dr},fi,gi;(fi=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(gi=Ne.litPropertyMetadata)!=null||(Ne.litPropertyMetadata=new WeakMap);var be=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ui){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&qs(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var s;let{get:i,set:n}=(s=Ys(this.prototype,t))!=null?s:{get(){return this[e]},set(a){this[e]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){let l=i==null?void 0:i.call(this);n.call(this,a),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:ui}static _$Ei(){if(this.hasOwnProperty(Nt("elementProperties")))return;let t=Zs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Nt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Nt("properties"))){let e=this.properties,r=[...Ws(e),...Xs(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(cr(i))}else t!==void 0&&e.push(cr(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,r;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return io(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){var n;let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let s=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Ot).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var n;let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let s=r.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)==null?void 0:n.fromAttribute)!==void 0?s.converter:Ot;this._$Em=i,this[i]=a.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,r){var i;if(t!==void 0){if(r!=null||(r=this.constructor.getPropertyOptions(t)),!((i=r.hasChanged)!=null?i:dr)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){var i;this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&((i=this._$Ej)!=null?i:this._$Ej=new Set).add(t)}async _$ET(){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(){var r,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((r=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,a]of this._$Ep)this[s]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,a]of n)a.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],a)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var s;return(s=n.hostUpdate)==null?void 0:s.call(n)}),this.update(e)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}},vi;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[Nt("elementProperties")]=new Map,be[Nt("finalized")]=new Map,no==null||no({ReactiveElement:be}),((vi=Ne.reactiveElementVersions)!=null?vi:Ne.reactiveElementVersions=[]).push("2.0.4");var Ks={attribute:!0,type:String,converter:Ot,reflect:!1,hasChanged:dr},Qs=(o=Ks,t,e)=>{let{kind:r,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,o),r==="accessor"){let{name:s}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,l,o)},init(a){return a!==void 0&&this.P(s,void 0,o),a}}}if(r==="setter"){let{name:s}=e;return function(a){let l=this[s];t.call(this,a),this.requestUpdate(s,l,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?Qs(o,t,e):((r,i,n)=>{let s=i.hasOwnProperty(n);return i.constructor.createProperty(n,s?{...r,wrapped:!0}:r),s?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}function q(o){return d({...o,state:!0,attribute:!1})}var Be=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function bi(o,t){return(e,r,i)=>{let n=s=>{var a,l;return(l=(a=s.renderRoot)==null?void 0:a.querySelector(o))!=null?l:null};if(t){let{get:s,set:a}=typeof r=="object"?e:i!=null?i:(()=>{let l=Symbol();return{get(){return this[l]},set(m){this[l]=m}}})();return Be(e,r,{get(){let l=s.call(this);return l===void 0&&(l=n(this),(l!==null||this.hasUpdated)&&a.call(this,l)),l}})}return Be(e,r,{get(){return n(this)}})}}var Js={PREFIX:"mdc",SEPARATOR:"-"},ea={NAMESPACE:Js},so=ea;var ta=o=>[so.NAMESPACE.PREFIX,o].join(so.NAMESPACE.SEPARATOR),
|
1
|
+
"use strict";(()=>{var Fs=Object.defineProperty;var Bs=Object.getOwnPropertyDescriptor;var c=(o,t,e,r)=>{for(var i=r>1?void 0:r?Bs(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Fs(t,e,i),i};var ar=globalThis,lr=ar.ShadowRoot&&(ar.ShadyCSS===void 0||ar.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oo=Symbol(),mi=new WeakMap,Lt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==oo)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(lr&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=mi.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&mi.set(e,t))}return t}toString(){return this.cssText}},hi=o=>new Lt(typeof o=="string"?o:o+"",void 0,oo),g=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,n)=>r+(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.")})(i)+o[n+1],o[0]);return new Lt(e,o,oo)},io=(o,t)=>{if(lr)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=ar.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},cr=lr?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return hi(e)})(o):o;var{is:Gs,defineProperty:qs,getOwnPropertyDescriptor:Ys,getOwnPropertyNames:Ws,getOwnPropertySymbols:Xs,getPrototypeOf:Zs}=Object,Ne=globalThis,pi=Ne.trustedTypes,js=pi?pi.emptyScript:"",no=Ne.reactiveElementPolyfillSupport,Nt=(o,t)=>o,Ot={toAttribute(o,t){switch(t){case Boolean:o=o?js: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}},dr=(o,t)=>!Gs(o,t),ui={attribute:!0,type:String,converter:Ot,reflect:!1,hasChanged:dr},fi,gi;(fi=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(gi=Ne.litPropertyMetadata)!=null||(Ne.litPropertyMetadata=new WeakMap);var be=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ui){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&qs(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var s;let{get:i,set:n}=(s=Ys(this.prototype,t))!=null?s:{get(){return this[e]},set(a){this[e]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){let l=i==null?void 0:i.call(this);n.call(this,a),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:ui}static _$Ei(){if(this.hasOwnProperty(Nt("elementProperties")))return;let t=Zs(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Nt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Nt("properties"))){let e=this.properties,r=[...Ws(e),...Xs(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(cr(i))}else t!==void 0&&e.push(cr(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,r;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return io(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){var n;let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let s=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Ot).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var n;let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let s=r.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)==null?void 0:n.fromAttribute)!==void 0?s.converter:Ot;this._$Em=i,this[i]=a.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,r){var i;if(t!==void 0){if(r!=null||(r=this.constructor.getPropertyOptions(t)),!((i=r.hasChanged)!=null?i:dr)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){var i;this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&((i=this._$Ej)!=null?i:this._$Ej=new Set).add(t)}async _$ET(){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(){var r,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((r=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,a]of this._$Ep)this[s]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,a]of n)a.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],a)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var s;return(s=n.hostUpdate)==null?void 0:s.call(n)}),this.update(e)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}},vi;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[Nt("elementProperties")]=new Map,be[Nt("finalized")]=new Map,no==null||no({ReactiveElement:be}),((vi=Ne.reactiveElementVersions)!=null?vi:Ne.reactiveElementVersions=[]).push("2.0.4");var Ks={attribute:!0,type:String,converter:Ot,reflect:!1,hasChanged:dr},Qs=(o=Ks,t,e)=>{let{kind:r,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,o),r==="accessor"){let{name:s}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,l,o)},init(a){return a!==void 0&&this.P(s,void 0,o),a}}}if(r==="setter"){let{name:s}=e;return function(a){let l=this[s];t.call(this,a),this.requestUpdate(s,l,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?Qs(o,t,e):((r,i,n)=>{let s=i.hasOwnProperty(n);return i.constructor.createProperty(n,s?{...r,wrapped:!0}:r),s?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}function q(o){return d({...o,state:!0,attribute:!1})}var Be=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function bi(o,t){return(e,r,i)=>{let n=s=>{var a,l;return(l=(a=s.renderRoot)==null?void 0:a.querySelector(o))!=null?l:null};if(t){let{get:s,set:a}=typeof r=="object"?e:i!=null?i:(()=>{let l=Symbol();return{get(){return this[l]},set(m){this[l]=m}}})();return Be(e,r,{get(){let l=s.call(this);return l===void 0&&(l=n(this),(l!==null||this.hasUpdated)&&a.call(this,l)),l}})}return Be(e,r,{get(){return n(this)}})}}var Js={PREFIX:"mdc",SEPARATOR:"-"},ea={NAMESPACE:Js},so=ea;var ta=o=>[so.NAMESPACE.PREFIX,o].join(so.NAMESPACE.SEPARATOR),x={constructTagName:ta};var mr=x.constructTagName("themeprovider"),ao={THEMECLASS:"mds-theme-stable-darkWebex"};var Mt=globalThis,hr=Mt.trustedTypes,yi=hr?hr.createPolicy("lit-html",{createHTML:o=>o}):void 0,mo="$lit$",ye=`lit$${Math.random().toFixed(9).slice(2)}$`,ho="?"+ye,ra=`<${ho}>`,Ye=document,Dt=()=>Ye.createComment(""),$t=o=>o===null||typeof o!="object"&&typeof o!="function",po=Array.isArray,Ii=o=>po(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",lo=`[
|
2
2
|
\f\r]`,zt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xi=/-->/g,Ei=/>/g,Ge=RegExp(`>|${lo}(?:([^\\s"'>=/]+)(${lo}*=${lo}*(?:[^
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ti=/'/g,Ai=/"/g,wi=/^(?:script|style|textarea|title)$/i,uo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),u=uo(1),bc=uo(2),yc=uo(3),xe=Symbol.for("lit-noChange"),
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ti=/'/g,Ai=/"/g,wi=/^(?:script|style|textarea|title)$/i,uo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),u=uo(1),bc=uo(2),yc=uo(3),xe=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Si=new WeakMap,qe=Ye.createTreeWalker(Ye,129);function Ci(o,t){if(!po(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return yi!==void 0?yi.createHTML(t):t}var ki=(o,t)=>{let e=o.length-1,r=[],i,n=t===2?"<svg>":t===3?"<math>":"",s=zt;for(let a=0;a<e;a++){let l=o[a],m,h,p=-1,v=0;for(;v<l.length&&(s.lastIndex=v,h=s.exec(l),h!==null);)v=s.lastIndex,s===zt?h[1]==="!--"?s=xi:h[1]!==void 0?s=Ei:h[2]!==void 0?(wi.test(h[2])&&(i=RegExp("</"+h[2],"g")),s=Ge):h[3]!==void 0&&(s=Ge):s===Ge?h[0]===">"?(s=i!=null?i:zt,p=-1):h[1]===void 0?p=-2:(p=s.lastIndex-h[2].length,m=h[1],s=h[3]===void 0?Ge:h[3]==='"'?Ai:Ti):s===Ai||s===Ti?s=Ge:s===xi||s===Ei?s=zt:(s=Ge,i=void 0);let f=s===Ge&&o[a+1].startsWith("/>")?" ":"";n+=s===zt?l+ra:p>=0?(r.push(m),l.slice(0,p)+mo+l.slice(p)+ye+f):l+ye+(p===-2?a:f)}return[Ci(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Pt=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,s=0,a=t.length-1,l=this.parts,[m,h]=ki(t,e);if(this.el=o.createElement(m,r),qe.currentNode=this.el.content,e===2||e===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=qe.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(mo)){let v=h[s++],f=i.getAttribute(p).split(ye),b=/([.?@])?(.*)/.exec(v);l.push({type:1,index:n,name:b[2],strings:f,ctor:b[1]==="."?ur:b[1]==="?"?fr:b[1]==="@"?gr:Xe}),i.removeAttribute(p)}else p.startsWith(ye)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(wi.test(i.tagName)){let p=i.textContent.split(ye),v=p.length-1;if(v>0){i.textContent=hr?hr.emptyScript:"";for(let f=0;f<v;f++)i.append(p[f],Dt()),qe.nextNode(),l.push({type:2,index:++n});i.append(p[v],Dt())}}}else if(i.nodeType===8)if(i.data===ho)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(ye,p+1))!==-1;)l.push({type:7,index:n}),p+=ye.length-1}n++}}static createElement(t,e){let r=Ye.createElement("template");return r.innerHTML=t,r}};function We(o,t,e=o,r){var s,a,l;if(t===xe)return t;let i=r!==void 0?(s=e.o)==null?void 0:s[r]:e.l,n=$t(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,r)),r!==void 0?((l=e.o)!=null?l:e.o=[])[r]=i:e.l=i),i!==void 0&&(t=We(o,i._$AS(o,t.values),i,r)),t}var pr=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){var m;let{el:{content:e},parts:r}=this._$AD,i=((m=t==null?void 0:t.creationScope)!=null?m:Ye).importNode(e,!0);qe.currentNode=i;let n=qe.nextNode(),s=0,a=0,l=r[0];for(;l!==void 0;){if(s===l.index){let h;l.type===2?h=new ut(n,n.nextSibling,this,t):l.type===1?h=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(h=new vr(n,this,t)),this._$AV.push(h),l=r[++a]}s!==(l==null?void 0:l.index)&&(n=qe.nextNode(),s++)}return qe.currentNode=Ye,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},ut=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this.v}constructor(t,e,r,i){var n;this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this.v=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=We(this,t,e),$t(t)?t===y||t==null||t===""?(this._$AH!==y&&this._$AR(),this._$AH=y):t!==this._$AH&&t!==xe&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ii(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!==y&&$t(this._$AH)?this._$AA.nextSibling.data=t:this.T(Ye.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Pt.createElement(Ci(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let s=new pr(i,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=Si.get(t.strings);return e===void 0&&Si.set(t.strings,e=new Pt(t)),e}k(t){po(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let n of t)i===e.length?e.push(r=new o(this.O(Dt()),this.O(Dt()),this,this.options)):r=e[i],r._$AI(n),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}},Xe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=y,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=y}_$AI(t,e=this,r,i){let n=this.strings,s=!1;if(n===void 0)t=We(this,t,e,0),s=!$t(t)||t!==this._$AH&&t!==xe,s&&(this._$AH=t);else{let a=t,l,m;for(t=n[0],l=0;l<n.length-1;l++)m=We(this,a[r+l],e,l),m===xe&&(m=this._$AH[l]),s||(s=!$t(m)||m!==this._$AH[l]),m===y?t=y:t!==y&&(t+=(m!=null?m:"")+n[l+1]),this._$AH[l]=m}s&&!i&&this.j(t)}j(t){t===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},ur=class extends Xe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===y?void 0:t}},fr=class extends Xe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==y)}},gr=class extends Xe{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=We(this,t,e,0))!=null?s:y)===xe)return;let r=this._$AH,i=t===y&&r!==y||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==y&&(r===y||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,r;typeof this._$AH=="function"?this._$AH.call((r=(e=this.options)==null?void 0:e.host)!=null?r:this.element,t):this._$AH.handleEvent(t)}},vr=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){We(this,t)}},Ri={M:mo,P:ye,A:ho,C:1,L:ki,R:pr,D:Ii,V:We,I:ut,H:Xe,N:fr,U:gr,B:ur,F:vr},co=Mt.litHtmlPolyfillSupport,_i;co==null||co(Pt,ut),((_i=Mt.litHtmlVersions)!=null?_i:Mt.litHtmlVersions=[]).push("3.2.0");var Li=(o,t,e)=>{var n,s;let r=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=r._$litPart$;if(i===void 0){let a=(s=e==null?void 0:e.renderBefore)!=null?s:null;r._$litPart$=i=new ut(t.insertBefore(Dt(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var Oe=class extends be{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e,r;let t=super.createRenderRoot();return(r=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Li(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return xe}},Ni;Oe._$litElement$=!0,Oe.finalized=!0,(Ni=globalThis.litElementHydrateSupport)==null||Ni.call(globalThis,{LitElement:Oe});var fo=globalThis.litElementPolyfillSupport;fo==null||fo({LitElement:Oe});var Oi;((Oi=globalThis.litElementVersions)!=null?Oi:globalThis.litElementVersions=[]).push("4.1.0");var zi=g`
|
4
4
|
:host {
|
5
5
|
box-sizing: border-box;
|
6
6
|
}
|
@@ -123,7 +123,7 @@
|
|
123
123
|
width: 100%;
|
124
124
|
fill: var(--mdc-icon-fill-color);
|
125
125
|
}
|
126
|
-
`,...$()],Vi=sa;var aa=o=>{let{host:t,context:e,subscribe:r}=o;return new ft(t,{context:e,subscribe:r!=null?r:!0})},la={consume:aa},Hi=la;var Ar=
|
126
|
+
`,...$()],Vi=sa;var aa=o=>{let{host:t,context:e,subscribe:r}=o;return new ft(t,{context:e,subscribe:r!=null?r:!0})},la={consume:aa},Hi=la;var Ar=x.constructTagName("iconprovider"),Fi=["svg"],Bi=["em","rem","px","%"],ca={px:16,em:1,rem:1,"%":100},Ee={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",SIZE:ca.em,SHOULD_CACHE:!1,ICON_SET:"momentum-icons"};var Sr=class{};Sr.context=Ar;var _r=Sr;var ce=class extends vt{constructor(){super({context:_r.context,initialValue:new _r});this.iconSet=Ee.ICON_SET;this.fileExtension=Ee.FILE_EXTENSION;this.lengthUnit=Ee.LENGTH_UNIT;this.size=Ee.SIZE}static get Context(){return _r.context}updateValuesInContext(){this.fileExtension&&Fi.includes(this.fileExtension)?this.context.value.fileExtension=this.fileExtension:(this.fileExtension=Ee.FILE_EXTENSION,this.context.value.fileExtension=Ee.FILE_EXTENSION),this.context.value.iconSet=this.iconSet,this.context.value.url=this.url,this.context.value.size=this.size,this.context.value.cacheName=this.cacheName,this.context.value.cacheStrategy=this.cacheStrategy,this.lengthUnit&&Bi.includes(this.lengthUnit)?this.context.value.lengthUnit=this.lengthUnit:(this.lengthUnit=Ee.LENGTH_UNIT,this.context.value.lengthUnit=Ee.LENGTH_UNIT)}updateContext(){(this.context.value.fileExtension!==this.fileExtension||this.context.value.iconSet!==this.iconSet||this.context.value.url!==this.url||this.context.value.lengthUnit!==this.lengthUnit||this.context.value.size!==this.size||this.context.value.cacheName!==this.cacheName||this.context.value.cacheStrategy!==this.cacheStrategy)&&(this.updateValuesInContext(),this.context.updateObservers())}};c([d({type:String,attribute:"icon-set",reflect:!0})],ce.prototype,"iconSet",2),c([d({type:String})],ce.prototype,"url",2),c([d({type:String,attribute:"file-extension",reflect:!0})],ce.prototype,"fileExtension",2),c([d({type:String,attribute:"length-unit",reflect:!0})],ce.prototype,"lengthUnit",2),c([d({type:Number,reflect:!0})],ce.prototype,"size",2),c([d({type:String,attribute:"cache-strategy"})],ce.prototype,"cacheStrategy",2),c([d({type:String,attribute:"cache-name"})],ce.prototype,"cacheName",2);var Ut=ce;var Vt={},Gi=async o=>(Vt[o]===void 0&&(Vt[o]=new Map),{async set(t,e){Vt[o].set(t.url,await e.text())},async get(t){return Vt[o].get(t.url)},async delete(t){Vt[o].delete(t.url)}}),qi=async o=>{let t=await caches.open(o);return{set:async(e,r)=>{await t.put(e,r)},get:async e=>{let r=await t.match(e);return r==null?void 0:r.text()},delete:async e=>{await t.delete(e)}}},Yi=async(o,t)=>t==="in-memory-cache"?Gi(o):qi(o);var Wi=async o=>fetch(o).then(t=>{if(!t.ok)throw new Error("There was a problem while fetching the icon!");return t}),Xi=async({url:o,name:t,fileExtension:e,cacheStrategy:r,cacheName:i,renewSignal:n})=>{let s=n(),a=new Request(`${o}/${t}.${e}`,{signal:s});return!i||!r||!["in-memory-cache","web-cache-api"].includes(r)?Wi(a).then(l=>l.text()):Yi(i,r).then(l=>l.get(a).then(m=>m||Wi(a.clone()).then(h=>{var p;return h.status<400&&h.headers.has("content-type")?(p=l.set)==null?void 0:p.call(l,a,h.clone()).then(()=>h.text()):h.text()})).catch(m=>{throw new Error(`Error in caching the Icon ${t}, ${m}`)}))};var Zi=x.constructTagName("icon"),bo={NAME:void 0,SIZE:1};var j=class extends E{constructor(){super();this.name=bo.NAME;this.ariaLabel=null;this.iconProviderContext=Hi.consume({host:this,context:Ut.Context});this.abortController=new AbortController}prepareIconElement(e){let r=new DOMParser().parseFromString(e,"text/html").body.children[0];return this.name&&r.setAttribute("data-name",this.name),r.setAttribute("part","icon"),r.setAttribute("aria-hidden","true"),r}async getIconData(){if(this.iconProviderContext.value){let{fileExtension:r,url:i,cacheName:n,iconSet:s,cacheStrategy:a}=this.iconProviderContext.value;if(s==="custom-icons"&&i&&r&&this.name){let l=()=>(this.abortController.abort(),this.abortController=new AbortController,this.abortController.signal);return Xi({url:i,name:this.name,fileExtension:r,cacheName:n,cacheStrategy:a,renewSignal:l}).then(m=>{let h=this.prepareIconElement(m);this.handleIconLoadedSuccess(h)}).catch(m=>{this.handleIconLoadedFailure(m)})}if(s==="momentum-icons"&&this.name)return import(`@momentum-design/icons/dist/ts/${this.name}.ts`).then(l=>{this.handleIconLoadedSuccess(l.default())}).catch(l=>{this.handleIconLoadedFailure(l)})}let e=new Error("IconProvider not found or not properly set up.");return this.handleIconLoadedFailure(e),Promise.reject(e)}handleIconLoadedSuccess(e){this.iconData=e;let r=new Event("load",{bubbles:!0,cancelable:!0});this.dispatchEvent(r)}handleIconLoadedFailure(e){let r=new CustomEvent("error",{bubbles:!0,cancelable:!0,detail:{error:e}});this.dispatchEvent(r)}updateSize(){var e;if(this.computedIconSize&&(this.lengthUnit||this.lengthUnitFromContext)){let r=`${this.computedIconSize}${(e=this.lengthUnit)!=null?e:this.lengthUnitFromContext}`;this.style.setProperty("--computed-icon-size",r)}}get computedIconSize(){var e,r;return(r=(e=this.size)!=null?e:this.sizeFromContext)!=null?r:bo.SIZE}updated(e){var r,i,n,s;super.updated(e),e.has("name")&&this.getIconData().catch(a=>{a.name!=="AbortError"&&this.onerror&&this.onerror(a)}),e.has("ariaLabel")&&(this.role=this.ariaLabel?"img":null),(e.has("size")||e.has("lengthUnit"))&&this.updateSize(),this.lengthUnitFromContext!==((r=this.iconProviderContext.value)==null?void 0:r.lengthUnit)&&(this.lengthUnitFromContext=(i=this.iconProviderContext.value)==null?void 0:i.lengthUnit,this.updateSize()),this.sizeFromContext!==((n=this.iconProviderContext.value)==null?void 0:n.size)&&(this.sizeFromContext=(s=this.iconProviderContext.value)==null?void 0:s.size,this.updateSize())}render(){return u` ${this.iconData} `}};j.styles=[...E.styles,...Vi],c([q()],j.prototype,"iconData",2),c([q()],j.prototype,"lengthUnitFromContext",2),c([q()],j.prototype,"sizeFromContext",2),c([d({type:String,reflect:!0})],j.prototype,"name",2),c([d({type:Number})],j.prototype,"size",2),c([d({type:String,attribute:"length-unit"})],j.prototype,"lengthUnit",2),c([d({type:String,attribute:"aria-label"})],j.prototype,"ariaLabel",2),c([q()],j.prototype,"abortController",2);var yo=j;yo.register(Zi);var da=yo;Ut.register(Ar);var ma=Ut;var A=o=>o!=null?o:y;var ji=x.constructTagName("avatar"),B={COUNTER:"counter",ICON:"icon",PHOTO:"photo",TEXT:"text"},xo=99,ha="user-regular",L={24:24,32:32,48:48,64:64,72:72,88:88,124:124},yt={TYPE:B.PHOTO,SIZE:L[32],ICON_NAME:ha};var Ir=o=>{class t extends o{constructor(){super(...arguments);this.size=yt.SIZE;this.isTyping=!1}}return c([d({type:String})],t.prototype,"src",2),c([d({type:String})],t.prototype,"initials",2),c([d({type:String})],t.prototype,"presence",2),c([d({type:Number,reflect:!0,attribute:"size"})],t.prototype,"size",2),c([d({type:Number})],t.prototype,"counter",2),c([d({type:Boolean,attribute:"is-typing"})],t.prototype,"isTyping",2),t};var de=o=>{class t extends o{}return c([d({type:String,attribute:"icon-name"})],t.prototype,"iconName",2),t};var pa=[C,g`
|
127
127
|
:host {
|
128
128
|
--mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);
|
129
129
|
--mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
@@ -246,9 +246,9 @@
|
|
246
246
|
outline: 0.125rem solid;
|
247
247
|
}
|
248
248
|
}
|
249
|
-
`],Ki=pa;var Qi=
|
249
|
+
`],Ki=pa;var Qi=x.constructTagName("presence"),V={ACTIVE:"active",AWAY:"away",AWAY_CALLING:"away-calling",BUSY:"busy",DND:"dnd",MEETING:"meeting",ON_CALL:"on-call",ON_DEVICE:"on-device",ON_MOBILE:"on-mobile",PAUSE:"pause",PTO:"pto",PRESENTING:"presenting",QUIET:"quiet",SCHEDULED:"scheduled"},P={XX_SMALL:"xx_small",X_SMALL:"x_small",SMALL:"small",MIDSIZE:"midsize",LARGE:"large",X_LARGE:"x_large",XX_LARGE:"xx_large"},xt={TYPE:V.ACTIVE,SIZE:P.SMALL};var Ht=x.constructTagName("text"),O={BODY_SMALL_REGULAR:"body-small-regular",BODY_SMALL_MEDIUM:"body-small-medium",BODY_SMALL_BOLD:"body-small-bold",BODY_MIDSIZE_REGULAR:"body-midsize-regular",BODY_MIDSIZE_MEDIUM:"body-midsize-medium",BODY_MIDSIZE_BOLD:"body-midsize-bold",BODY_LARGE_REGULAR:"body-large-regular",BODY_LARGE_MEDIUM:"body-large-medium",BODY_LARGE_BOLD:"body-large-bold",BODY_SMALL_REGULAR_UNDERLINE:"body-small-regular-underline",BODY_SMALL_MEDIUM_UNDERLINE:"body-small-medium-underline",BODY_MIDSIZE_REGULAR_UNDERLINE:"body-midsize-regular-underline",BODY_MIDSIZE_MEDIUM_UNDERLINE:"body-midsize-medium-underline",BODY_LARGE_REGULAR_UNDERLINE:"body-large-regular-underline",BODY_LARGE_MEDIUM_UNDERLINE:"body-large-medium-underline",HEADING_SMALL_REGULAR:"heading-small-regular",HEADING_SMALL_MEDIUM:"heading-small-medium",HEADING_SMALL_BOLD:"heading-small-bold",HEADING_MIDSIZE_REGULAR:"heading-midsize-regular",HEADING_MIDSIZE_MEDIUM:"heading-midsize-medium",HEADING_MIDSIZE_BOLD:"heading-midsize-bold",HEADING_LARGE_REGULAR:"heading-large-regular",HEADING_LARGE_MEDIUM:"heading-large-medium",HEADING_LARGE_BOLD:"heading-large-bold",HEADING_XLARGE_REGULAR:"heading-xlarge-regular",HEADING_XLARGE_MEDIUM:"heading-xlarge-medium",HEADING_XLARGE_BOLD:"heading-xlarge-bold",HEADLINE_SMALL_LIGHT:"headline-small-light",HEADLINE_SMALL_REGULAR:"headline-small-regular"},z={H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",P:"p",SMALL:"small",SPAN:"span",DIV:"div"},X={TYPE:O.BODY_LARGE_REGULAR,TEXT_ELEMENT_TAGNAME:z.P,CSS_PART_TEXT:"text",CHILDREN:"The quick brown fox jumps over the lazy dog"};var Ji=o=>({[L[124]]:P.XX_LARGE,[L[88]]:P.X_LARGE,[L[72]]:P.LARGE,[L[64]]:P.MIDSIZE,[L[48]]:P.SMALL,[L[32]]:P.X_SMALL,[L[24]]:P.XX_SMALL})[o]||P.X_SMALL,en=o=>({[L[124]]:4.75,[L[88]]:3,[L[72]]:2.5,[L[64]]:2.25,[L[48]]:1.75,[L[32]]:1.25,[L[24]]:1})[o]||1.25,tn=o=>({[L[124]]:O.HEADING_XLARGE_MEDIUM,[L[88]]:O.HEADING_LARGE_MEDIUM,[L[72]]:O.HEADING_MIDSIZE_MEDIUM,[L[64]]:O.HEADING_SMALL_MEDIUM,[L[48]]:O.HEADING_SMALL_MEDIUM,[L[32]]:O.BODY_MIDSIZE_MEDIUM,[L[24]]:O.BODY_SMALL_MEDIUM})[o]||O.BODY_MIDSIZE_MEDIUM;var Ft=class extends Ir(de(E)){constructor(){super(...arguments);this.isPhotoLoaded=!1}getPresenceTemplateBasedOnType(e){return e===B.COUNTER&&(this.counter||this.counter===0)?y:this.presence?u`
|
250
250
|
<mdc-presence part="presence" type="${this.presence}" size="${Ji(this.size)}"></mdc-presence>
|
251
|
-
`:
|
251
|
+
`:y}handleOnLoad(){this.isPhotoLoaded=!0}handleOnError(){this.isPhotoLoaded=!1,this.onerror&&this.onerror("There was a problem while fetching the <img/>. Please check the src attribute and try again.")}photoTemplate(){return u`
|
252
252
|
<img
|
253
253
|
part="photo"
|
254
254
|
src="${A(this.src)}"
|
@@ -270,7 +270,7 @@
|
|
270
270
|
>
|
271
271
|
${e}
|
272
272
|
</mdc-text>
|
273
|
-
`}generateCounterText(e){return e<0?"0":e>xo?`${xo}+`:e.toString()}generateInitialsText(e){return e.toUpperCase().slice(0,2)}generateTextContent(e){let r="";return e===B.TEXT&&this.initials&&(r=this.generateInitialsText(this.initials)),e===B.COUNTER&&(this.counter||this.counter===0)&&(r=this.generateCounterText(this.counter)),this.textTemplate(r)}getTypeBasedOnInputs(){return this.src?B.PHOTO:this.iconName?B.ICON:this.initials?B.TEXT:this.counter||this.counter===0?B.COUNTER:B.ICON}getTemplateBasedOnType(e){switch(e){case B.PHOTO:return this.photoTemplate();case B.TEXT:case B.COUNTER:return this.generateTextContent(e);case B.ICON:default:return this.iconTemplate()}}getLoadingContent(){return this.isTyping?u`<div part="loading-wrapper"><div part="loader"></div></div>`:
|
273
|
+
`}generateCounterText(e){return e<0?"0":e>xo?`${xo}+`:e.toString()}generateInitialsText(e){return e.toUpperCase().slice(0,2)}generateTextContent(e){let r="";return e===B.TEXT&&this.initials&&(r=this.generateInitialsText(this.initials)),e===B.COUNTER&&(this.counter||this.counter===0)&&(r=this.generateCounterText(this.counter)),this.textTemplate(r)}getTypeBasedOnInputs(){return this.src?B.PHOTO:this.iconName?B.ICON:this.initials?B.TEXT:this.counter||this.counter===0?B.COUNTER:B.ICON}getTemplateBasedOnType(e){switch(e){case B.PHOTO:return this.photoTemplate();case B.TEXT:case B.COUNTER:return this.generateTextContent(e);case B.ICON:default:return this.iconTemplate()}}getLoadingContent(){return this.isTyping?u`<div part="loading-wrapper"><div part="loader"></div></div>`:y}getPhotoPlaceHolderContent(e){return this.isPhotoLoaded?y:e===B.PHOTO?this.initials?this.textTemplate(this.generateInitialsText(this.initials)):this.iconTemplate():y}update(e){super.update(e),e.has("src")&&!this.src&&(this.isPhotoLoaded=!1)}render(){let e=this.getTypeBasedOnInputs();return u`
|
274
274
|
<div part="content" aria-hidden="true">
|
275
275
|
${this.getPhotoPlaceHolderContent(e)}
|
276
276
|
${this.getTemplateBasedOnType(e)}
|
@@ -631,7 +631,7 @@
|
|
631
631
|
display: block;
|
632
632
|
font-family: var(--mdc-text-font-family);
|
633
633
|
}
|
634
|
-
`,nn],sn=ga;var Et=class extends E{constructor(){super(...arguments);this.type=X.TYPE;this.tagname=X.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case z.H1:return u`<h1 part=${X.CSS_PART_TEXT}><slot></slot></h1>`;case z.H2:return u`<h2 part=${X.CSS_PART_TEXT}><slot></slot></h2>`;case z.H3:return u`<h3 part=${X.CSS_PART_TEXT}><slot></slot></h3>`;case z.H4:return u`<h4 part=${X.CSS_PART_TEXT}><slot></slot></h4>`;case z.H5:return u`<h5 part=${X.CSS_PART_TEXT}><slot></slot></h5>`;case z.H6:return u`<h6 part=${X.CSS_PART_TEXT}><slot></slot></h6>`;case z.DIV:return u`<div part=${X.CSS_PART_TEXT}><slot></slot></div>`;case z.SPAN:return u`<span part=${X.CSS_PART_TEXT}><slot></slot></span>`;case z.SMALL:return u`<small part=${X.CSS_PART_TEXT}><slot></slot></small>`;case z.P:default:return u`<p part=${X.CSS_PART_TEXT}><slot></slot></p>`}}};Et.styles=[...E.styles,...sn],c([d({attribute:"type",reflect:!0,type:String})],Et.prototype,"type",2),c([d({attribute:"tagname",reflect:!0,type:String})],Et.prototype,"tagname",2);var Ao=Et;Ao.register(Ht);var va=Ao;Eo.register(ji);var ba=Eo;var wr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Bt=o=>(...t)=>({_$litDirective$:o,values:t}),Tt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this.t=t,this._$AM=e,this.i=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Cr=Bt(class extends Tt{constructor(o){var t;if(super(o),o.type!==wr.ATTRIBUTE||o.name!=="class"||((t=o.strings)==null?void 0:t.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]){var r,i;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(let n in t)t[n]&&!((r=this.nt)!=null&&r.has(n))&&this.st.add(n);return this.render(t)}let e=o.element.classList;for(let n of this.st)n in t||(e.remove(n),this.st.delete(n));for(let n in t){let s=!!t[n];s===this.st.has(n)||(i=this.nt)!=null&&i.has(n)||(s?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return xe}});var an=
|
634
|
+
`,nn],sn=ga;var Et=class extends E{constructor(){super(...arguments);this.type=X.TYPE;this.tagname=X.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case z.H1:return u`<h1 part=${X.CSS_PART_TEXT}><slot></slot></h1>`;case z.H2:return u`<h2 part=${X.CSS_PART_TEXT}><slot></slot></h2>`;case z.H3:return u`<h3 part=${X.CSS_PART_TEXT}><slot></slot></h3>`;case z.H4:return u`<h4 part=${X.CSS_PART_TEXT}><slot></slot></h4>`;case z.H5:return u`<h5 part=${X.CSS_PART_TEXT}><slot></slot></h5>`;case z.H6:return u`<h6 part=${X.CSS_PART_TEXT}><slot></slot></h6>`;case z.DIV:return u`<div part=${X.CSS_PART_TEXT}><slot></slot></div>`;case z.SPAN:return u`<span part=${X.CSS_PART_TEXT}><slot></slot></span>`;case z.SMALL:return u`<small part=${X.CSS_PART_TEXT}><slot></slot></small>`;case z.P:default:return u`<p part=${X.CSS_PART_TEXT}><slot></slot></p>`}}};Et.styles=[...E.styles,...sn],c([d({attribute:"type",reflect:!0,type:String})],Et.prototype,"type",2),c([d({attribute:"tagname",reflect:!0,type:String})],Et.prototype,"tagname",2);var Ao=Et;Ao.register(Ht);var va=Ao;Eo.register(ji);var ba=Eo;var wr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Bt=o=>(...t)=>({_$litDirective$:o,values:t}),Tt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this.t=t,this._$AM=e,this.i=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Cr=Bt(class extends Tt{constructor(o){var t;if(super(o),o.type!==wr.ATTRIBUTE||o.name!=="class"||((t=o.strings)==null?void 0:t.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]){var r,i;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(let n in t)t[n]&&!((r=this.nt)!=null&&r.has(n))&&this.st.add(n);return this.render(t)}let e=o.element.classList;for(let n of this.st)n in t||(e.remove(n),this.st.delete(n));for(let n in t){let s=!!t[n];s===this.st.has(n)||(i=this.nt)!=null&&i.has(n)||(s?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return xe}});var an=x.constructTagName("badge"),Te={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},kr={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},Rr={PRIMARY:"primary",SECONDARY:"secondary"},Gt={SUCCESS:"success",WARNING:"warning",ERROR:"error"},ep={...Rr,...Gt},Me={TYPE:Te.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:Rr.PRIMARY,ICON_SIZE:1};var ya=[C,g`
|
635
635
|
:host {
|
636
636
|
--mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
637
637
|
--mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);
|
@@ -714,7 +714,7 @@
|
|
714
714
|
>
|
715
715
|
${this.getCounterText(this.maxCounter,this.counter)}
|
716
716
|
</mdc-text>
|
717
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(Rr).includes(this.variant)&&(this.variant=Me.VARIANT);let{iconName:e,type:r,variant:i}=this;switch(r){case Te.ICON:return this.getBadgeIcon(e||"",i);case Te.COUNTER:return this.getBadgeCounterText();case Te.SUCCESS:return this.getBadgeIcon(kr.SUCCESS_ICON_NAME,Gt.SUCCESS);case Te.WARNING:return this.getBadgeIcon(kr.WARNING_ICON_NAME,Gt.WARNING);case Te.ERROR:return this.getBadgeIcon(kr.ERROR_ICON_NAME,Gt.ERROR);case Te.DOT:default:return this.type=Te.DOT,this.getBadgeDot()}}update(e){super.update(e),e.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};me.styles=[...E.styles,...ln],c([d({type:String,reflect:!0})],me.prototype,"type",2),c([d({type:String,reflect:!0})],me.prototype,"variant",2),c([d({type:Number})],me.prototype,"counter",2),c([d({type:Number,attribute:"max-counter",reflect:!0})],me.prototype,"maxCounter",2),c([d({type:Boolean})],me.prototype,"overlay",2),c([d({type:String,attribute:"aria-label"})],me.prototype,"ariaLabel",2);var So=me;So.register(an);var xa=So;var At=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return c([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var U=[];for(let o=0;o<256;++o)U.push((o+256).toString(16).slice(1));function cn(o,t=0){return(U[o[t+0]]+U[o[t+1]]+U[o[t+2]]+U[o[t+3]]+"-"+U[o[t+4]]+U[o[t+5]]+"-"+U[o[t+6]]+U[o[t+7]]+"-"+U[o[t+8]]+U[o[t+9]]+"-"+U[o[t+10]]+U[o[t+11]]+U[o[t+12]]+U[o[t+13]]+U[o[t+14]]+U[o[t+15]]).toLowerCase()}var _o,Ea=new Uint8Array(16);function Io(){if(!_o){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");_o=crypto.getRandomValues.bind(crypto)}return _o(Ea)}var Ta=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wo={randomUUID:Ta};function Aa(o,t,e){var i,n,s;if(wo.randomUUID&&!t&&!o)return wo.randomUUID();o=o||{};let r=(s=(n=o.random)!=null?n:(i=o.rng)==null?void 0:i.call(o))!=null?s:Io();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(e=e||0,e<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[e+a]=r[a];return t}return cn(r)}var Co=Aa;var he=o=>{class t extends o{constructor(...i){super(i);this.name="";this.value="";this.internals=this.attachInternals(),this.id=`mdc-input-${Co()}`}get form(){return this.internals.form}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}setValidity(){this.inputElement&&this.internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage,this.inputElement)}checkValidity(){return this.setValidity(),this.internals.checkValidity()}reportValidity(){return this.setValidity(),this.internals.reportValidity()}}return t.formAssociated=!0,c([d({reflect:!0,type:String})],t.prototype,"name",2),c([d({reflect:!0,type:String})],t.prototype,"value",2),c([d({reflect:!0,type:String,attribute:"validation-message"})],t.prototype,"validationMessage",2),c([bi("input")],t.prototype,"inputElement",2),t};var dn=o=>{class t extends o{constructor(){super(...arguments);this.tabIndex=0}}return c([d({reflect:!0,type:Number})],t.prototype,"tabIndex",2),t};var Fp=
|
717
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(Rr).includes(this.variant)&&(this.variant=Me.VARIANT);let{iconName:e,type:r,variant:i}=this;switch(r){case Te.ICON:return this.getBadgeIcon(e||"",i);case Te.COUNTER:return this.getBadgeCounterText();case Te.SUCCESS:return this.getBadgeIcon(kr.SUCCESS_ICON_NAME,Gt.SUCCESS);case Te.WARNING:return this.getBadgeIcon(kr.WARNING_ICON_NAME,Gt.WARNING);case Te.ERROR:return this.getBadgeIcon(kr.ERROR_ICON_NAME,Gt.ERROR);case Te.DOT:default:return this.type=Te.DOT,this.getBadgeDot()}}update(e){super.update(e),e.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};me.styles=[...E.styles,...ln],c([d({type:String,reflect:!0})],me.prototype,"type",2),c([d({type:String,reflect:!0})],me.prototype,"variant",2),c([d({type:Number})],me.prototype,"counter",2),c([d({type:Number,attribute:"max-counter",reflect:!0})],me.prototype,"maxCounter",2),c([d({type:Boolean})],me.prototype,"overlay",2),c([d({type:String,attribute:"aria-label"})],me.prototype,"ariaLabel",2);var So=me;So.register(an);var xa=So;var At=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return c([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var U=[];for(let o=0;o<256;++o)U.push((o+256).toString(16).slice(1));function cn(o,t=0){return(U[o[t+0]]+U[o[t+1]]+U[o[t+2]]+U[o[t+3]]+"-"+U[o[t+4]]+U[o[t+5]]+"-"+U[o[t+6]]+U[o[t+7]]+"-"+U[o[t+8]]+U[o[t+9]]+"-"+U[o[t+10]]+U[o[t+11]]+U[o[t+12]]+U[o[t+13]]+U[o[t+14]]+U[o[t+15]]).toLowerCase()}var _o,Ea=new Uint8Array(16);function Io(){if(!_o){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");_o=crypto.getRandomValues.bind(crypto)}return _o(Ea)}var Ta=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wo={randomUUID:Ta};function Aa(o,t,e){var i,n,s;if(wo.randomUUID&&!t&&!o)return wo.randomUUID();o=o||{};let r=(s=(n=o.random)!=null?n:(i=o.rng)==null?void 0:i.call(o))!=null?s:Io();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(e=e||0,e<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[e+a]=r[a];return t}return cn(r)}var Co=Aa;var he=o=>{class t extends o{constructor(...i){super(i);this.name="";this.value="";this.internals=this.attachInternals(),this.id=`mdc-input-${Co()}`}get form(){return this.internals.form}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}setValidity(){this.inputElement&&this.internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage,this.inputElement)}checkValidity(){return this.setValidity(),this.internals.checkValidity()}reportValidity(){return this.setValidity(),this.internals.reportValidity()}}return t.formAssociated=!0,c([d({reflect:!0,type:String})],t.prototype,"name",2),c([d({reflect:!0,type:String})],t.prototype,"value",2),c([d({reflect:!0,type:String,attribute:"validation-message"})],t.prototype,"validationMessage",2),c([bi("input")],t.prototype,"inputElement",2),t};var dn=o=>{class t extends o{constructor(){super(...arguments);this.tabIndex=0}}return c([d({reflect:!0,type:Number})],t.prototype,"tabIndex",2),t};var Fp=x.constructTagName("buttonsimple"),Sa={20:20,24:24,28:28,32:32,40:40,48:48,52:52,64:64,72:72,88:88,124:124},St={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},Lr={SIZE:Sa[32],TYPE:St.BUTTON,ROLE:"button"};var _a=[C,g`
|
718
718
|
:host {
|
719
719
|
border: 0.0625rem solid transparent;
|
720
720
|
cursor: pointer;
|
@@ -772,7 +772,7 @@
|
|
772
772
|
}
|
773
773
|
`,...$()],mn=_a;var Ae=class extends he(dn(At(E))){constructor(){super();this.active=!1;this.softDisabled=!1;this.size=Lr.SIZE;this.role=Lr.ROLE;this.type=Lr.TYPE;this.prevTabindex=0;this.addEventListener("click",this.executeAction.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.addEventListener("keyup",this.handleKeyUp.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this))}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this,this.disabled),e.has("softDisabled")&&this.setSoftDisabled(this,this.softDisabled),e.has("active")&&this.setActive(this,this.active)}executeAction(){this.type===St.SUBMIT&&this.form&&this.form.requestSubmit(),this.type===St.RESET&&this.form&&this.form.reset()}setActive(e,r){r?e.setAttribute("aria-pressed","true"):e.removeAttribute("aria-pressed")}setSoftDisabled(e,r){r?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}setDisabled(e,r){r?(e.setAttribute("aria-disabled","true"),this.prevTabindex=this.tabIndex,this.tabIndex=-1):(this.tabIndex===-1&&(this.tabIndex=this.prevTabindex),e.removeAttribute("aria-disabled"))}triggerClickEvent(){let e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});this.dispatchEvent(e)}handleBlur(){this.classList.contains("pressed")&&this.classList.remove("pressed")}handleKeyDown(e){["Enter"," "].includes(e.key)&&(this.classList.add("pressed"),e.key==="Enter"&&this.triggerClickEvent())}handleKeyUp(e){["Enter"," "].includes(e.key)&&(this.classList.remove("pressed"),e.key===" "&&this.triggerClickEvent())}render(){return u`
|
774
774
|
<slot></slot>
|
775
|
-
`}};Ae.styles=[...E.styles,...mn],c([d({type:Boolean,reflect:!0})],Ae.prototype,"active",2),c([d({type:Boolean,attribute:"soft-disabled"})],Ae.prototype,"softDisabled",2),c([d({type:Number,reflect:!0})],Ae.prototype,"size",2),c([d({type:String,reflect:!0})],Ae.prototype,"role",2),c([d({reflect:!0})],Ae.prototype,"type",2);var De=Ae;var qt=
|
775
|
+
`}};Ae.styles=[...E.styles,...mn],c([d({type:Boolean,reflect:!0})],Ae.prototype,"active",2),c([d({type:Boolean,attribute:"soft-disabled"})],Ae.prototype,"softDisabled",2),c([d({type:Number,reflect:!0})],Ae.prototype,"size",2),c([d({type:String,reflect:!0})],Ae.prototype,"role",2),c([d({reflect:!0})],Ae.prototype,"type",2);var De=Ae;var qt=x.constructTagName("button"),je={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary"},Nr={40:40,32:32,28:28,24:24},Se={64:64,52:52,20:20,...Nr},ko={POSITIVE:"positive",NEGATIVE:"negative",ACCENT:"accent",PROMOTIONAL:"promotional",DEFAULT:"default"},_t={PILL:"pill",ICON:"icon",PILL_WITH_ICON:"pill-with-icon"},pe={VARIANT:je.PRIMARY,SIZE:Nr[32],COLOR:ko.DEFAULT,TYPE_INTERNAL:_t.ICON,TYPE:St.BUTTON};var Ia=g`
|
776
776
|
:host {
|
777
777
|
background-color: transparent;
|
778
778
|
border-radius: 1.25rem;
|
@@ -1066,8 +1066,8 @@
|
|
1066
1066
|
border-top-right-radius: var(--mdc-popover-arrow-border-radius);
|
1067
1067
|
border-bottom-left-radius: 100%;
|
1068
1068
|
}
|
1069
|
-
`,Bn=[Xa];var Gn=y.constructTagName("modalcontainer"),Qt={TONAL:"tonal",CONTRAST:"contrast"},Za={0:0,1:1,2:2,3:3,4:4},Jt={COLOR:Qt.TONAL,ELEVATION:Za[0],ROLE:"dialog",ARIA_MODAL:!1,CHILDREN:"Lorem ipsum dolor sit amet"};var qn=y.constructTagName("popover"),Do={LEFT_START:"left-start",LEFT:"left",LEFT_END:"left-end",RIGHT_START:"right-start",RIGHT:"right",RIGHT_END:"right-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end",BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end"},$o={CLICK:"click",MOUSEENTER:"mouseenter",FOCUSIN:"focusin",MANUAL:"manual"},R={PLACEMENT:Do.BOTTOM,TRIGGER:$o.CLICK,COLOR:Qt.TONAL,OFFSET:4,VISIBLE:!1,ARROW:!1,CLOSE_BUTTON:!1,FOCUS_TRAP:!1,INTERACTIVE:!1,PREVENT_SCROLL:!1,HIDE_ON_ESCAPE:!1,HIDE_ON_BLUR:!1,HIDE_ON_CLICK_OUTSIDE:!1,FOCUS_BACK:!1,BACKDROP:!1,FLIP:!0,SIZE:!1,DELAY:"0,0",ROLE:"dialog",Z_INDEX:1e3};var Yn=o=>{class t extends o{constructor(...i){super(...i);this.enabledFocusTrap=R.FOCUS_TRAP;this.enabledPreventScroll=R.PREVENT_SCROLL;this.focusTrapIndex=-1;this.focusableElements=[];this.shouldWrapFocus=()=>!0;this.addEventListener("keydown",this.handleKeydown)}deactivateFocusTrap(){this.enabledFocusTrap=!1,this.enabledPreventScroll=!1,this.focusTrapIndex=-1,document.body.style.overflow=""}hasNoClientRects(i){return i.getClientRects().length===0}hasZeroDimensions(i){let{width:n,height:s}=i.getBoundingClientRect(),{offsetWidth:a,offsetHeight:l}=i;return a+l+s+n===0}isNotVisible(i){return this.hasZeroDimensions(i)||this.hasNoClientRects(i)}hasHiddenStyle(i){let{display:n,opacity:s,visibility:a}=i.style;return n==="none"||s==="0"||a==="hidden"||a==="collapse"}hasComputedHidden(i){let n=getComputedStyle(i);return n.visibility==="hidden"||n.height==="0"||n.display==="none"}isHidden(i){return i.hasAttribute("hidden")||i.getAttribute("aria-hidden")==="true"||this.hasHiddenStyle(i)||this.isNotVisible(i)||this.hasComputedHidden(i)}isNotTabbable(i){return i.getAttribute("tabindex")==="-1"}isInteractiveElement(i){return!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(i.tagName)||i instanceof HTMLAnchorElement&&i.hasAttribute("href")||i instanceof HTMLInputElement&&i.type!=="hidden"||(i instanceof HTMLAudioElement||i instanceof HTMLVideoElement)&&i.hasAttribute("controls")||(i instanceof HTMLImageElement||i instanceof HTMLObjectElement)&&i.hasAttribute("usemap")||i.hasAttribute("tabindex")&&i.tabIndex>-1)}isFocusable(i){return this.isHidden(i)||this.isNotTabbable(i)?!1:this.isInteractiveElement(i)}findFocusable(i,n=new Set){return i instanceof HTMLElement&&this.isFocusable(i)&&n.add(i),Array.from(i.children).forEach(a=>{let l=a;this.isFocusable(l)&&n.add(l),l.shadowRoot?this.findFocusable(l.shadowRoot,n):l.tagName==="SLOT"?l.assignedElements({flatten:!0}).forEach(h=>{h instanceof HTMLElement&&this.findFocusable(h,n)}):this.findFocusable(l,n)}),[...n]}setFocusableElements(){this.shadowRoot&&(this.focusableElements=this.findFocusable(this.shadowRoot,new Set))}setInitialFocus(i=0){this.focusableElements.length!==0&&(this.enabledPreventScroll&&(document.body.style.overflow="hidden"),this.focusableElements[i]&&(this.focusTrapIndex=i,this.focusableElements[i].focus()))}calculateNextIndex(i,n){let{length:s}=this.focusableElements,a=this.shouldWrapFocus();if(i===-1)return n>0?0:s-1;let l=i+n;return a?(l<0&&(l=s-1),l>=s&&(l=0)):(l<0&&(l=0),l>=s&&(l=s-1)),l}getDeepActiveElement(){var n;let i=document.activeElement||document.body;for(;i instanceof HTMLElement&&((n=i.shadowRoot)!=null&&n.activeElement);)i=i.shadowRoot.activeElement;return i||document.body}findElement(i){return this.focusableElements.findIndex(n=>this.isEqualFocusNode(i,n))}isEqualFocusNode(i,n){return i.nodeType>=0?n.isEqualNode(i)&&n===i:!1}trapFocus(i){if(this.focusableElements.length===0)return;let n=this.getDeepActiveElement(),s=this.findElement(n);i?this.focusTrapIndex=this.calculateNextIndex(s,-1):this.focusTrapIndex=this.calculateNextIndex(s,1);let a=this.focusableElements[this.focusTrapIndex];a&&a.focus()}handleKeydown(i){!this.enabledFocusTrap||!this.focusableElements.length||i.key==="Tab"&&(i.preventDefault(),this.trapFocus(i.shiftKey))}}return c([d({type:Boolean})],t.prototype,"enabledFocusTrap",2),c([d({type:Boolean})],t.prototype,"enabledPreventScroll",2),t};var Po=class{constructor(){this.stack=[]}push(t){this.stack.push(t)}pop(){return this.stack.pop()}peek(){return this.stack[this.stack.length-1]}remove(t){this.stack=this.stack.filter(e=>e!==t)}clear(){this.stack=[]}},ot=new Po;var W=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabel=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-label"})],t.prototype,"dataAriaLabel",2),t};var Fr=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaDescribedby=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-describedby"})],t.prototype,"dataAriaDescribedby",2),t};var Br=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabelledby=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-labelledby"})],t.prototype,"dataAriaLabelledby",2),t};var it=class{static dispatchPopoverEvent(t,e){e.dispatchEvent(new CustomEvent(t,{detail:{show:e.visible},composed:!0,bubbles:!0}))}static onShowPopover(t){this.dispatchPopoverEvent("popover-on-show",t)}static onHidePopover(t){this.dispatchPopoverEvent("popover-on-hide",t)}static onCreatedPopover(t){this.dispatchPopoverEvent("popover-on-created",t)}static onDestroyedPopover(t){this.dispatchPopoverEvent("popover-on-destroyed",t)}};var Gr=class{constructor(t){this.arrowPixelChange=!1;this.popover=t}setupDelay(){try{let[t,e]=this.popover.delay.split(",").map(r=>{let i=parseInt(r,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${r}`);return i});return[t,e]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(t){var a;let e=this.popover.renderRoot.querySelector(".popover-hover-bridge");Object.assign(e.style,{top:"",left:"",right:"",bottom:""});let r=`calc(${this.popover.showArrow?"0.75rem + ":""}${this.popover.offset}px)`,i=(a=this.popover.shadowRoot)==null?void 0:a.querySelector("mdc-modalcontainer"),n=i.offsetHeight||0,s=i.offsetWidth||0;if(e)switch(t.split("-")[0]){case"top":e.style.height=r,e.style.bottom=`calc(-1 * (${r}))`,e.style.left="50%",e.style.width=`${s}px`;break;case"left":e.style.height=`${n}px`,e.style.width=r,e.style.right=`calc(-1.5 * (${r}))`;break;case"right":e.style.height=`${n}px`,e.style.width=r,e.style.left=`calc(-0.5 * (${r}))`;break;case"bottom":default:e.style.height=r,e.style.top=`calc(-1 * (${r}))`,e.style.left="50%",e.style.width=`${s}px`;break}}setupAppendTo(){if(this.popover.appendTo){let t=document.getElementById(this.popover.appendTo);t&&t.appendChild(this.popover)}}setupAccessibility(){var t,e,r;this.popover.interactive&&(this.popover.dataAriaLabel||(this.popover.dataAriaLabel=((t=this.popover.triggerElement)==null?void 0:t.ariaLabel)||((e=this.popover.triggerElement)==null?void 0:e.textContent)||""),this.popover.dataAriaLabelledby||(this.popover.dataAriaLabelledby=((r=this.popover.triggerElement)==null?void 0:r.id)||""))}updateArrowStyle(t,e){var h;if(!this.popover.arrowElement)return;let r=e.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[r],{x:n,y:s}=t,a=this.popover.arrowElement.getBoundingClientRect(),l=(h=this.popover.arrowElement.offsetParent)==null?void 0:h.getBoundingClientRect();if(!this.arrowPixelChange){let p=l!=null&&l[i]?12-Math.abs(a[i]-l[i]):0;Math.round(p)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let m=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",r),Object.assign(this.popover.arrowElement.style,{left:n!=null?`${n}px`:"",top:s!=null?`${s}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-m}px`})}updatePopoverStyle(t,e){this.popover.containerElement&&Object.assign(this.popover.containerElement.style,{left:`${t}px`,top:`${e}px`})}};var k=class extends W(Br(Fr(Yn(E)))){constructor(){super();this.id="";this.triggerID="";this.trigger=R.TRIGGER;this.placement=R.PLACEMENT;this.color=R.COLOR;this.visible=R.VISIBLE;this.offset=R.OFFSET;this.focusTrap=R.FOCUS_TRAP;this.preventScroll=R.PREVENT_SCROLL;this.showArrow=R.ARROW;this.closeButton=R.CLOSE_BUTTON;this.interactive=R.INTERACTIVE;this.delay=R.DELAY;this.hideOnEscape=R.HIDE_ON_ESCAPE;this.hideOnBlur=R.HIDE_ON_BLUR;this.hideOnOutsideClick=R.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=R.FOCUS_BACK;this.backdrop=R.BACKDROP;this.flip=R.FLIP;this.size=R.SIZE;this.zIndex=R.Z_INDEX;this.appendTo="";this.closeButtonAriaLabel=null;this.dataRole=R.ROLE;this.arrowElement=null;this.triggerElement=null;this.containerElement=null;this.hoverTimer=null;this.isTriggerClicked=!1;this.openDelay=0;this.closeDelay=0;this.onOutsidePopoverClick=e=>{if(ot.peek()!==this)return;let r=!1,i=e.composedPath();r=this.contains(e.target)||i.includes(this.triggerElement);let n=this.renderRoot.querySelector(".popover-backdrop"),s=n?i.includes(n):!1;(!r||s)&&this.hidePopover()};this.onEscapeKeydown=e=>{!this.visible||e.code!=="Escape"||(e.preventDefault(),this.hidePopover())};this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()};this.startCloseDelay=()=>{if(!this.interactive)this.hidePopover();else{if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}};this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)};this.showPopover=()=>{this.cancelCloseDelay(),setTimeout(()=>{this.visible=!0,it.onShowPopover(this)},this.openDelay),ot.peek()!==this&&ot.push(this)};this.hidePopover=()=>{ot.peek()===this&&(setTimeout(()=>{this.visible=!1,it.onHidePopover(this),this.isTriggerClicked=!1},this.closeDelay),ot.pop())};this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)};this.utils=new Gr(this)}async firstUpdated(e){super.firstUpdated(e),this.containerElement=this.renderRoot.querySelector(".popover-container"),this.utils.setupAppendTo(),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),it.onCreatedPopover(this),this.visible&&(await this.positionPopover(),await this.handleCreatePopoverFirstUpdate())}async disconnectedCallback(){super.disconnectedCallback(),await this.removeEventListeners(),it.onDestroyedPopover(this),ot.remove(this)}setupTriggerListener(){var e,r;if(this.triggerID&&(this.triggerElement=document.getElementById(this.triggerID),!!this.triggerElement)){if(this.trigger==="mouseenter"&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.togglePopoverVisible),this.trigger.includes("mouseenter")){let i=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.showPopover),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),(e=this.containerElement)==null||e.addEventListener("mouseenter",this.cancelCloseDelay),(r=this.containerElement)==null||r.addEventListener("mouseleave",this.startCloseDelay),i==null||i.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.showPopover),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){var r,i;if(!this.triggerElement)return;let e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.togglePopoverVisible),this.triggerElement.removeEventListener("mouseenter",this.showPopover),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),(r=this.containerElement)==null||r.removeEventListener("mouseenter",this.cancelCloseDelay),(i=this.containerElement)==null||i.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.showPopover),this.triggerElement.removeEventListener("focusout",this.hidePopover),e==null||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}async updated(e){if(super.updated(e),e.has("visible")){let r=e.get("visible");await this.isOpenUpdated(r,this.visible)}if(e.has("placement")&&this.setAttribute("placement",Object.values(Do).includes(this.placement)?this.placement:R.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){let i=this.trigger.split(" ").filter(n=>Object.values($o).includes(n));this.setAttribute("trigger",i.length>0?this.trigger:R.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(Qt).includes(this.color)?this.color:R.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),e.has("append-to")&&this.utils.setupAppendTo(),(e.has("interactive")||e.has("data-aria-label")||e.has("data-aria-labelledby"))&&this.utils.setupAccessibility()}async isOpenUpdated(e,r){var i,n,s,a;if(!(e===r||!this.triggerElement))if(r){if(this.enabledFocusTrap=this.focusTrap,this.enabledPreventScroll=this.preventScroll,this.backdrop){let l=this.renderRoot.querySelector(".popover-backdrop");l.style.zIndex=`${this.zIndex-1}`,this.triggerElement.style.zIndex=`${this.zIndex}`}this.positionPopover(),await this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&((i=this.containerElement)==null||i.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="none")),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),this.triggerElement.setAttribute("aria-expanded","true"),this.interactive&&this.triggerElement.setAttribute("aria-haspopup",this.triggerElement.getAttribute("aria-haspopup")||"dialog")}else this.hideOnBlur&&((n=this.containerElement)==null||n.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),(s=this.deactivateFocusTrap)==null||s.call(this),this.triggerElement.removeAttribute("aria-expanded"),this.interactive&&this.triggerElement.removeAttribute("aria-haspopup"),this.focusBackToTrigger&&((a=this.triggerElement)==null||a.focus())}async handleCreatePopoverFirstUpdate(){var e,r;this.visible&&this.interactive&&((e=this.setFocusableElements)==null||e.call(this),await this.updateComplete,(r=this.setInitialFocus)==null||r.call(this))}positionPopover(){if(!this.triggerElement||!this.containerElement)return;let e=[Pn()],r=this.offset;if(this.flip&&e.push(Un()),this.size){let i=this.containerElement.querySelector('[part="popover-content"]');e.push(Vn({apply({availableHeight:n}){i&&Object.assign(i.style,{maxHeight:`${n}px`})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){let i=this.arrowElement.offsetHeight;r=Math.sqrt(2*i**2)/2+this.offset,e.push(Hn({element:this.arrowElement,padding:12}))}e.push($n(r)),Dn(this.triggerElement,this.containerElement,async()=>{if(!this.triggerElement||!this.containerElement)return;let{x:i,y:n,middlewareData:s,placement:a}=await Fn(this.triggerElement,this.containerElement,{placement:this.placement,middleware:e});this.utils.updatePopoverStyle(i,n),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,a),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(a)})}render(){return u`
|
1070
|
-
${this.backdrop&&this.visible?u`<div class="popover-backdrop"></div>`:
|
1069
|
+
`,Bn=[Xa];var Gn=x.constructTagName("modalcontainer"),Qt={TONAL:"tonal",CONTRAST:"contrast"},Za={0:0,1:1,2:2,3:3,4:4},Jt={COLOR:Qt.TONAL,ELEVATION:Za[0],ROLE:"dialog",ARIA_MODAL:!1,CHILDREN:"Lorem ipsum dolor sit amet"};var qn=x.constructTagName("popover"),Do={LEFT_START:"left-start",LEFT:"left",LEFT_END:"left-end",RIGHT_START:"right-start",RIGHT:"right",RIGHT_END:"right-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end",BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end"},$o={CLICK:"click",MOUSEENTER:"mouseenter",FOCUSIN:"focusin",MANUAL:"manual"},R={PLACEMENT:Do.BOTTOM,TRIGGER:$o.CLICK,COLOR:Qt.TONAL,OFFSET:4,VISIBLE:!1,ARROW:!1,CLOSE_BUTTON:!1,FOCUS_TRAP:!1,INTERACTIVE:!1,PREVENT_SCROLL:!1,HIDE_ON_ESCAPE:!1,HIDE_ON_BLUR:!1,HIDE_ON_CLICK_OUTSIDE:!1,FOCUS_BACK:!1,BACKDROP:!1,FLIP:!0,SIZE:!1,DELAY:"0,0",ROLE:"dialog",Z_INDEX:1e3};var Yn=o=>{class t extends o{constructor(...i){super(...i);this.enabledFocusTrap=R.FOCUS_TRAP;this.enabledPreventScroll=R.PREVENT_SCROLL;this.focusTrapIndex=-1;this.focusableElements=[];this.shouldWrapFocus=()=>!0;this.addEventListener("keydown",this.handleKeydown)}deactivateFocusTrap(){this.enabledFocusTrap=!1,this.enabledPreventScroll=!1,this.focusTrapIndex=-1,document.body.style.overflow=""}hasNoClientRects(i){return i.getClientRects().length===0}hasZeroDimensions(i){let{width:n,height:s}=i.getBoundingClientRect(),{offsetWidth:a,offsetHeight:l}=i;return a+l+s+n===0}isNotVisible(i){return this.hasZeroDimensions(i)||this.hasNoClientRects(i)}hasHiddenStyle(i){let{display:n,opacity:s,visibility:a}=i.style;return n==="none"||s==="0"||a==="hidden"||a==="collapse"}hasComputedHidden(i){let n=getComputedStyle(i);return n.visibility==="hidden"||n.height==="0"||n.display==="none"}isHidden(i){return i.hasAttribute("hidden")||i.getAttribute("aria-hidden")==="true"||this.hasHiddenStyle(i)||this.isNotVisible(i)||this.hasComputedHidden(i)}isNotTabbable(i){return i.getAttribute("tabindex")==="-1"}isInteractiveElement(i){return!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(i.tagName)||i instanceof HTMLAnchorElement&&i.hasAttribute("href")||i instanceof HTMLInputElement&&i.type!=="hidden"||(i instanceof HTMLAudioElement||i instanceof HTMLVideoElement)&&i.hasAttribute("controls")||(i instanceof HTMLImageElement||i instanceof HTMLObjectElement)&&i.hasAttribute("usemap")||i.hasAttribute("tabindex")&&i.tabIndex>-1)}isFocusable(i){return this.isHidden(i)||this.isNotTabbable(i)?!1:this.isInteractiveElement(i)}findFocusable(i,n=new Set){return i instanceof HTMLElement&&this.isFocusable(i)&&n.add(i),Array.from(i.children).forEach(a=>{let l=a;this.isFocusable(l)&&n.add(l),l.shadowRoot?this.findFocusable(l.shadowRoot,n):l.tagName==="SLOT"?l.assignedElements({flatten:!0}).forEach(h=>{h instanceof HTMLElement&&this.findFocusable(h,n)}):this.findFocusable(l,n)}),[...n]}setFocusableElements(){this.shadowRoot&&(this.focusableElements=this.findFocusable(this.shadowRoot,new Set))}setInitialFocus(i=0){this.focusableElements.length!==0&&(this.enabledPreventScroll&&(document.body.style.overflow="hidden"),this.focusableElements[i]&&(this.focusTrapIndex=i,this.focusableElements[i].focus()))}calculateNextIndex(i,n){let{length:s}=this.focusableElements,a=this.shouldWrapFocus();if(i===-1)return n>0?0:s-1;let l=i+n;return a?(l<0&&(l=s-1),l>=s&&(l=0)):(l<0&&(l=0),l>=s&&(l=s-1)),l}getDeepActiveElement(){var n;let i=document.activeElement||document.body;for(;i instanceof HTMLElement&&((n=i.shadowRoot)!=null&&n.activeElement);)i=i.shadowRoot.activeElement;return i||document.body}findElement(i){return this.focusableElements.findIndex(n=>this.isEqualFocusNode(i,n))}isEqualFocusNode(i,n){return i.nodeType>=0?n.isEqualNode(i)&&n===i:!1}trapFocus(i){if(this.focusableElements.length===0)return;let n=this.getDeepActiveElement(),s=this.findElement(n);i?this.focusTrapIndex=this.calculateNextIndex(s,-1):this.focusTrapIndex=this.calculateNextIndex(s,1);let a=this.focusableElements[this.focusTrapIndex];a&&a.focus()}handleKeydown(i){!this.enabledFocusTrap||!this.focusableElements.length||i.key==="Tab"&&(i.preventDefault(),this.trapFocus(i.shiftKey))}}return c([d({type:Boolean})],t.prototype,"enabledFocusTrap",2),c([d({type:Boolean})],t.prototype,"enabledPreventScroll",2),t};var Po=class{constructor(){this.stack=[]}push(t){this.stack.push(t)}pop(){return this.stack.pop()}peek(){return this.stack[this.stack.length-1]}remove(t){this.stack=this.stack.filter(e=>e!==t)}clear(){this.stack=[]}},ot=new Po;var W=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabel=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-label"})],t.prototype,"dataAriaLabel",2),t};var Fr=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaDescribedby=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-describedby"})],t.prototype,"dataAriaDescribedby",2),t};var Br=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabelledby=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-labelledby"})],t.prototype,"dataAriaLabelledby",2),t};var it=class{static dispatchPopoverEvent(t,e){e.dispatchEvent(new CustomEvent(t,{detail:{show:e.visible},composed:!0,bubbles:!0}))}static onShowPopover(t){this.dispatchPopoverEvent("popover-on-show",t)}static onHidePopover(t){this.dispatchPopoverEvent("popover-on-hide",t)}static onCreatedPopover(t){this.dispatchPopoverEvent("popover-on-created",t)}static onDestroyedPopover(t){this.dispatchPopoverEvent("popover-on-destroyed",t)}};var Gr=class{constructor(t){this.arrowPixelChange=!1;this.popover=t}setupDelay(){try{let[t,e]=this.popover.delay.split(",").map(r=>{let i=parseInt(r,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${r}`);return i});return[t,e]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(t){var a;let e=this.popover.renderRoot.querySelector(".popover-hover-bridge");Object.assign(e.style,{top:"",left:"",right:"",bottom:""});let r=`calc(${this.popover.showArrow?"0.75rem + ":""}${this.popover.offset}px)`,i=(a=this.popover.shadowRoot)==null?void 0:a.querySelector("mdc-modalcontainer"),n=i.offsetHeight||0,s=i.offsetWidth||0;if(e)switch(t.split("-")[0]){case"top":e.style.height=r,e.style.bottom=`calc(-1 * (${r}))`,e.style.left="50%",e.style.width=`${s}px`;break;case"left":e.style.height=`${n}px`,e.style.width=r,e.style.right=`calc(-1.5 * (${r}))`;break;case"right":e.style.height=`${n}px`,e.style.width=r,e.style.left=`calc(-0.5 * (${r}))`;break;case"bottom":default:e.style.height=r,e.style.top=`calc(-1 * (${r}))`,e.style.left="50%",e.style.width=`${s}px`;break}}setupAppendTo(){if(this.popover.appendTo){let t=document.getElementById(this.popover.appendTo);t&&t.appendChild(this.popover)}}setupAccessibility(){var t,e,r;this.popover.interactive&&(this.popover.dataAriaLabel||(this.popover.dataAriaLabel=((t=this.popover.triggerElement)==null?void 0:t.ariaLabel)||((e=this.popover.triggerElement)==null?void 0:e.textContent)||""),this.popover.dataAriaLabelledby||(this.popover.dataAriaLabelledby=((r=this.popover.triggerElement)==null?void 0:r.id)||""))}updateArrowStyle(t,e){var h;if(!this.popover.arrowElement)return;let r=e.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[r],{x:n,y:s}=t,a=this.popover.arrowElement.getBoundingClientRect(),l=(h=this.popover.arrowElement.offsetParent)==null?void 0:h.getBoundingClientRect();if(!this.arrowPixelChange){let p=l!=null&&l[i]?12-Math.abs(a[i]-l[i]):0;Math.round(p)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let m=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",r),Object.assign(this.popover.arrowElement.style,{left:n!=null?`${n}px`:"",top:s!=null?`${s}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-m}px`})}updatePopoverStyle(t,e){this.popover.containerElement&&Object.assign(this.popover.containerElement.style,{left:`${t}px`,top:`${e}px`})}};var k=class extends W(Br(Fr(Yn(E)))){constructor(){super();this.id="";this.triggerID="";this.trigger=R.TRIGGER;this.placement=R.PLACEMENT;this.color=R.COLOR;this.visible=R.VISIBLE;this.offset=R.OFFSET;this.focusTrap=R.FOCUS_TRAP;this.preventScroll=R.PREVENT_SCROLL;this.showArrow=R.ARROW;this.closeButton=R.CLOSE_BUTTON;this.interactive=R.INTERACTIVE;this.delay=R.DELAY;this.hideOnEscape=R.HIDE_ON_ESCAPE;this.hideOnBlur=R.HIDE_ON_BLUR;this.hideOnOutsideClick=R.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=R.FOCUS_BACK;this.backdrop=R.BACKDROP;this.flip=R.FLIP;this.size=R.SIZE;this.zIndex=R.Z_INDEX;this.appendTo="";this.closeButtonAriaLabel=null;this.dataRole=R.ROLE;this.arrowElement=null;this.triggerElement=null;this.containerElement=null;this.hoverTimer=null;this.isTriggerClicked=!1;this.openDelay=0;this.closeDelay=0;this.onOutsidePopoverClick=e=>{if(ot.peek()!==this)return;let r=!1,i=e.composedPath();r=this.contains(e.target)||i.includes(this.triggerElement);let n=this.renderRoot.querySelector(".popover-backdrop"),s=n?i.includes(n):!1;(!r||s)&&this.hidePopover()};this.onEscapeKeydown=e=>{!this.visible||e.code!=="Escape"||(e.preventDefault(),this.hidePopover())};this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()};this.startCloseDelay=()=>{if(!this.interactive)this.hidePopover();else{if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}};this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)};this.showPopover=()=>{this.cancelCloseDelay(),setTimeout(()=>{this.visible=!0,it.onShowPopover(this)},this.openDelay),ot.peek()!==this&&ot.push(this)};this.hidePopover=()=>{ot.peek()===this&&(setTimeout(()=>{this.visible=!1,it.onHidePopover(this),this.isTriggerClicked=!1},this.closeDelay),ot.pop())};this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)};this.utils=new Gr(this)}async firstUpdated(e){super.firstUpdated(e),this.containerElement=this.renderRoot.querySelector(".popover-container"),this.utils.setupAppendTo(),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),it.onCreatedPopover(this),this.visible&&(await this.positionPopover(),await this.handleCreatePopoverFirstUpdate())}async disconnectedCallback(){super.disconnectedCallback(),await this.removeEventListeners(),it.onDestroyedPopover(this),ot.remove(this)}setupTriggerListener(){var e,r;if(this.triggerID&&(this.triggerElement=document.getElementById(this.triggerID),!!this.triggerElement)){if(this.trigger==="mouseenter"&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.togglePopoverVisible),this.trigger.includes("mouseenter")){let i=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.showPopover),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),(e=this.containerElement)==null||e.addEventListener("mouseenter",this.cancelCloseDelay),(r=this.containerElement)==null||r.addEventListener("mouseleave",this.startCloseDelay),i==null||i.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.showPopover),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){var r,i;if(!this.triggerElement)return;let e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.togglePopoverVisible),this.triggerElement.removeEventListener("mouseenter",this.showPopover),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),(r=this.containerElement)==null||r.removeEventListener("mouseenter",this.cancelCloseDelay),(i=this.containerElement)==null||i.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.showPopover),this.triggerElement.removeEventListener("focusout",this.hidePopover),e==null||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}async updated(e){if(super.updated(e),e.has("visible")){let r=e.get("visible");await this.isOpenUpdated(r,this.visible)}if(e.has("placement")&&this.setAttribute("placement",Object.values(Do).includes(this.placement)?this.placement:R.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){let i=this.trigger.split(" ").filter(n=>Object.values($o).includes(n));this.setAttribute("trigger",i.length>0?this.trigger:R.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(Qt).includes(this.color)?this.color:R.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),e.has("append-to")&&this.utils.setupAppendTo(),(e.has("interactive")||e.has("data-aria-label")||e.has("data-aria-labelledby"))&&this.utils.setupAccessibility()}async isOpenUpdated(e,r){var i,n,s,a;if(!(e===r||!this.triggerElement))if(r){if(this.enabledFocusTrap=this.focusTrap,this.enabledPreventScroll=this.preventScroll,this.backdrop){let l=this.renderRoot.querySelector(".popover-backdrop");l.style.zIndex=`${this.zIndex-1}`,this.triggerElement.style.zIndex=`${this.zIndex}`}this.positionPopover(),await this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&((i=this.containerElement)==null||i.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="none")),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),this.triggerElement.setAttribute("aria-expanded","true"),this.interactive&&this.triggerElement.setAttribute("aria-haspopup",this.triggerElement.getAttribute("aria-haspopup")||"dialog")}else this.hideOnBlur&&((n=this.containerElement)==null||n.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),(s=this.deactivateFocusTrap)==null||s.call(this),this.triggerElement.removeAttribute("aria-expanded"),this.interactive&&this.triggerElement.removeAttribute("aria-haspopup"),this.focusBackToTrigger&&((a=this.triggerElement)==null||a.focus())}async handleCreatePopoverFirstUpdate(){var e,r;this.visible&&this.interactive&&((e=this.setFocusableElements)==null||e.call(this),await this.updateComplete,(r=this.setInitialFocus)==null||r.call(this))}positionPopover(){if(!this.triggerElement||!this.containerElement)return;let e=[Pn()],r=this.offset;if(this.flip&&e.push(Un()),this.size){let i=this.containerElement.querySelector('[part="popover-content"]');e.push(Vn({apply({availableHeight:n}){i&&Object.assign(i.style,{maxHeight:`${n}px`})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){let i=this.arrowElement.offsetHeight;r=Math.sqrt(2*i**2)/2+this.offset,e.push(Hn({element:this.arrowElement,padding:12}))}e.push($n(r)),Dn(this.triggerElement,this.containerElement,async()=>{if(!this.triggerElement||!this.containerElement)return;let{x:i,y:n,middlewareData:s,placement:a}=await Fn(this.triggerElement,this.containerElement,{placement:this.placement,middleware:e});this.utils.updatePopoverStyle(i,n),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,a),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(a)})}render(){return u`
|
1070
|
+
${this.backdrop&&this.visible?u`<div class="popover-backdrop"></div>`:y}
|
1071
1071
|
<mdc-modalcontainer
|
1072
1072
|
class="popover-container"
|
1073
1073
|
elevation="3"
|
@@ -1087,8 +1087,8 @@
|
|
1087
1087
|
size="20"
|
1088
1088
|
aria-label=${A(this.closeButtonAriaLabel)}
|
1089
1089
|
@click="${this.hidePopover}"
|
1090
|
-
></mdc-button>`:
|
1091
|
-
${this.showArrow?u`<div class="popover-arrow"></div>`:
|
1090
|
+
></mdc-button>`:y}
|
1091
|
+
${this.showArrow?u`<div class="popover-arrow"></div>`:y}
|
1092
1092
|
<div part="popover-content">
|
1093
1093
|
<slot></slot>
|
1094
1094
|
</div>
|
@@ -1163,7 +1163,7 @@
|
|
1163
1163
|
:host([size="large"]) {
|
1164
1164
|
height: var(--mdc-bullet-size-large);
|
1165
1165
|
}
|
1166
|
-
`,Zn=[Qa];var jn=
|
1166
|
+
`,Zn=[Qa];var jn=x.constructTagName("bullet"),Kn={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var er=class extends E{constructor(){super(...arguments);this.size=Kn.SMALL}};er.styles=[...E.styles,...Zn],c([d({type:String,reflect:!0})],er.prototype,"size",2);var Vo=er;Vo.register(jn);var Ja=Vo;var el=g`
|
1167
1167
|
:host {
|
1168
1168
|
--mdc-marker-width: 0.25rem;
|
1169
1169
|
--mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);
|
@@ -1188,7 +1188,7 @@
|
|
1188
1188
|
var(--mdc-marker-striped-background-color) 0.375rem
|
1189
1189
|
);
|
1190
1190
|
}
|
1191
|
-
`,Qn=[el];var Jn=
|
1191
|
+
`,Qn=[el];var Jn=x.constructTagName("marker"),es={SOLID:"solid",STRIPED:"striped"};var tr=class extends E{constructor(){super(...arguments);this.variant=es.SOLID}};tr.styles=[...E.styles,...Qn],c([d({type:String,reflect:!0})],tr.prototype,"variant",2);var Ho=tr;Ho.register(Jn);var tl=Ho;var ts=x.constructTagName("divider"),rr={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Fo={SOLID:"solid",GRADIENT:"gradient"},Ue={POSITIVE:"positive",NEGATIVE:"negative"},or={UP:"arrow-up-regular",DOWN:"arrow-down-regular",LEFT:"arrow-left-regular",RIGHT:"arrow-right-regular"},nt={ORIENTATION:rr.HORIZONTAL,VARIANT:Fo.SOLID,ARROW_DIRECTION:Ue.NEGATIVE,BUTTON_DIRECTION:Ue.NEGATIVE};var rl=[C,g`
|
1192
1192
|
:host {
|
1193
1193
|
--mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);
|
1194
1194
|
--mdc-divider-width: 0.0625rem;
|
@@ -1421,7 +1421,7 @@
|
|
1421
1421
|
size="${A(this.size)}"
|
1422
1422
|
src="${A(this.src)}"
|
1423
1423
|
></mdc-avatar>
|
1424
|
-
`}};ir.styles=[...os],c([d({type:String,attribute:"aria-label"})],ir.prototype,"ariaLabel",2);var Go=ir;var is=
|
1424
|
+
`}};ir.styles=[...os],c([d({type:String,attribute:"aria-label"})],ir.prototype,"ariaLabel",2);var Go=ir;var is=x.constructTagName("avatarbutton");Go.register(is);var nl=Go;var sl=[g`
|
1425
1425
|
:host{
|
1426
1426
|
--mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
1427
1427
|
--mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
@@ -1536,7 +1536,7 @@
|
|
1536
1536
|
opacity: 0;
|
1537
1537
|
pointer-events: none;
|
1538
1538
|
}
|
1539
|
-
`,...$(!0)],ns=sl;var ss=
|
1539
|
+
`,...$(!0)],ns=sl;var ss=x.constructTagName("formfieldwrapper"),fe={DEFAULT:"default",ERROR:"error",PRIORITY:"priority",SUCCESS:"success",WARNING:"warning"},H={VALIDATION:fe.DEFAULT,HELPER_TEXT_ID:"helper-text-id",HEADING_ID:"heading-id"},st={TAGNAME:z.SPAN,TYPE:O.BODY_MIDSIZE_REGULAR,HEADER_TYPE:O.BODY_MIDSIZE_BOLD};var al=[C,g`
|
1540
1540
|
:host {
|
1541
1541
|
flex-direction: column;
|
1542
1542
|
align-items: flex-start;
|
@@ -1591,11 +1591,11 @@
|
|
1591
1591
|
type="${st.HEADER_TYPE}"
|
1592
1592
|
part="label"
|
1593
1593
|
>${this.label}</mdc-text
|
1594
|
-
>`:
|
1594
|
+
>`:y}renderRequiredLabel(){return this.requiredLabel?u`
|
1595
1595
|
<mdc-text part="required-label" tagname=${st.TAGNAME} type=${st.TYPE}>
|
1596
1596
|
(${this.requiredLabel})
|
1597
1597
|
</mdc-text>
|
1598
|
-
`:
|
1598
|
+
`:y}renderHelpTextIcon(){if(!this.helpText)return y;let e=ls(this.helpTextType||H.VALIDATION);return e&&!this.disabled?u`<mdc-icon part="helper-icon" size="1" length-unit="rem" name=${e}></mdc-icon>`:y}renderHelpText(){return this.helpText?u`
|
1599
1599
|
<mdc-text
|
1600
1600
|
id="${H.HELPER_TEXT_ID}"
|
1601
1601
|
part="help-text"
|
@@ -1604,14 +1604,14 @@
|
|
1604
1604
|
>
|
1605
1605
|
${this.helpText}
|
1606
1606
|
</mdc-text>
|
1607
|
-
`:
|
1607
|
+
`:y}renderLabel(){return this.label?u`<div class="mdc-label-text" part="label-text">
|
1608
1608
|
<slot name="label">${this.renderLabelElement()}</slot>
|
1609
1609
|
<slot name="required-label">${this.renderRequiredLabel()}</slot>
|
1610
1610
|
<slot name="label-info"></slot>
|
1611
|
-
</div
|
1611
|
+
</div>`:y}renderHelperText(){return this.helpText?u`<div class="mdc-help-text" part="mdc-help-text">
|
1612
1612
|
<slot name="help-icon">${this.renderHelpTextIcon()}</slot>
|
1613
1613
|
<slot name="help-text">${this.renderHelpText()}</slot>
|
1614
|
-
</div>`:
|
1614
|
+
</div>`:y}};we.styles=[...E.styles,...as],c([d({reflect:!0,type:String})],we.prototype,"label",2),c([d({type:String,reflect:!0,attribute:"required-label"})],we.prototype,"requiredLabel",2),c([d({type:String})],we.prototype,"id",2),c([d({reflect:!0,attribute:"help-text-type"})],we.prototype,"helpTextType",2),c([d({type:String,reflect:!0,attribute:"help-text"})],we.prototype,"helpText",2);var ee=we;ee.register(ss);var kt=ee;var cs=x.constructTagName("input"),ds={OFF:"off",NONE:"none",ON:"on",SENTENCES:"sentences",WORDS:"words",CHARACTERS:"characters"},ms={MAX_LENGTH:10,HELPERTEXT:"Prefix text should not exceed 10 characters",VALIDATION:fe.ERROR},He={VALIDATION:fe.DEFAULT,ICON_SIZE_VALUE:1,ICON_SIZE_UNIT:"rem",CLEAR_BUTTON_ICON:"cancel-bold",CLEAR_BUTTON_VARIANT:je.TERTIARY,CLEAR_BUTTON_SIZE:Se[20],PREFIX_TEXT_TYPE:O.BODY_MIDSIZE_REGULAR,PREFIX_TEXT_TAG:z.SPAN};var M=class extends he(W(kt)){constructor(){super(...arguments);this.placeholder="";this.readonly=!1;this.trailingButton=!1;this.autocapitalize=ds.OFF;this.autocomplete="off";this.autofocus=!1;this.clearAriaLabel=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.inputElement&&(this.inputElement.checkValidity(),this.setInputValidity(),this.internals.setFormValue(this.inputElement.value))}).catch(e=>{this.onerror&&this.onerror(e)})}formResetCallback(){this.value="",this.requestUpdate()}formStateRestoreCallback(e){this.value=e}handleValueChange(){this.updateComplete.then(()=>{this.setInputValidity()}).catch(e=>{this.onerror&&this.onerror(e)})}updated(e){super.updated(e),e.has("value")&&this.handleValueChange()}setInputValidity(){this.validationMessage&&this.value===""?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()}attributeChangedCallback(e,r,i){super.attributeChangedCallback(e,r,i),["maxlength","minlength","pattern","required"].includes(e)&&this.updateComplete.then(()=>{this.setInputValidity()}).catch(s=>{this.onerror&&this.onerror(s)})}updateValue(){this.value=this.inputElement.value,this.internals.setFormValue(this.inputElement.value)}onInput(){this.updateValue(),this.setInputValidity()}onChange(e){this.updateValue(),this.setInputValidity();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}renderLeadingIcon(){return this.leadingIcon?u`
|
1615
1615
|
<mdc-icon
|
1616
1616
|
class="leading-icon"
|
1617
1617
|
part="leading-icon"
|
@@ -1619,7 +1619,7 @@
|
|
1619
1619
|
size="${He.ICON_SIZE_VALUE}"
|
1620
1620
|
length-unit="${He.ICON_SIZE_UNIT}">
|
1621
1621
|
</mdc-icon>
|
1622
|
-
`:
|
1622
|
+
`:y}renderPrefixText(){return this.prefixText?u`
|
1623
1623
|
<mdc-text
|
1624
1624
|
class="prefix-text"
|
1625
1625
|
tagname="${He.PREFIX_TEXT_TAG}"
|
@@ -1628,7 +1628,7 @@
|
|
1628
1628
|
>
|
1629
1629
|
${this.prefixText.slice(0,ms.MAX_LENGTH)}
|
1630
1630
|
</mdc-text>
|
1631
|
-
`:
|
1631
|
+
`:y}clearInputText(){var e;this.value="",(e=this.inputElement)==null||e.focus()}renderTrailingButton(){return this.trailingButton?u`
|
1632
1632
|
<mdc-button
|
1633
1633
|
part='trailing-button'
|
1634
1634
|
class='own-focus-ring ${this.value?"":"hidden"}'
|
@@ -1639,7 +1639,7 @@
|
|
1639
1639
|
@click=${this.clearInputText}
|
1640
1640
|
?disabled=${this.disabled||this.readonly||!this.value}
|
1641
1641
|
></mdc-button>
|
1642
|
-
`:
|
1642
|
+
`:y}render(){var e;return u`
|
1643
1643
|
${this.renderLabel()}
|
1644
1644
|
<div class="input-container mdc-focus-ring" part="input-container">
|
1645
1645
|
<slot name="input-leading-icon">${this.renderLeadingIcon()}</slot>
|
@@ -1676,8 +1676,8 @@
|
|
1676
1676
|
</div>
|
1677
1677
|
<slot name="trailing-button">${this.renderTrailingButton()}</slot>
|
1678
1678
|
</div>
|
1679
|
-
${this.helpText?this.renderHelperText():
|
1680
|
-
`}};M.styles=[...kt.styles,...ns],c([d({type:String})],M.prototype,"placeholder",2),c([d({type:Boolean})],M.prototype,"readonly",2),c([d({type:String,attribute:"prefix-text"})],M.prototype,"prefixText",2),c([d({type:String,attribute:"leading-icon"})],M.prototype,"leadingIcon",2),c([d({type:Boolean,attribute:"trailing-button"})],M.prototype,"trailingButton",2),c([d({type:Number})],M.prototype,"maxlength",2),c([d({type:Number})],M.prototype,"minlength",2),c([d({type:String})],M.prototype,"autocapitalize",2),c([d({type:String})],M.prototype,"autocomplete",2),c([d({type:Boolean})],M.prototype,"autofocus",2),c([d({type:String})],M.prototype,"dirname",2),c([d({type:String})],M.prototype,"pattern",2),c([d({type:String})],M.prototype,"list",2),c([d({type:Number})],M.prototype,"size",2),c([d({type:String,attribute:"clear-aria-label"})],M.prototype,"clearAriaLabel",2);var qo=M;qo.register(cs);var ll=qo;var hs=
|
1679
|
+
${this.helpText?this.renderHelperText():y}
|
1680
|
+
`}};M.styles=[...kt.styles,...ns],c([d({type:String})],M.prototype,"placeholder",2),c([d({type:Boolean})],M.prototype,"readonly",2),c([d({type:String,attribute:"prefix-text"})],M.prototype,"prefixText",2),c([d({type:String,attribute:"leading-icon"})],M.prototype,"leadingIcon",2),c([d({type:Boolean,attribute:"trailing-button"})],M.prototype,"trailingButton",2),c([d({type:Number})],M.prototype,"maxlength",2),c([d({type:Number})],M.prototype,"minlength",2),c([d({type:String})],M.prototype,"autocapitalize",2),c([d({type:String})],M.prototype,"autocomplete",2),c([d({type:Boolean})],M.prototype,"autofocus",2),c([d({type:String})],M.prototype,"dirname",2),c([d({type:String})],M.prototype,"pattern",2),c([d({type:String})],M.prototype,"list",2),c([d({type:Number})],M.prototype,"size",2),c([d({type:String,attribute:"clear-aria-label"})],M.prototype,"clearAriaLabel",2);var qo=M;qo.register(cs);var ll=qo;var hs=x.constructTagName("link"),qr={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},Yr={LARGE:1,MIDSIZE:.875,SMALL:.75},Wr={INLINE:!1,INVERTED:!1,LINK_SIZE:qr.LARGE};var cl=[C,g`
|
1681
1681
|
|
1682
1682
|
:host {
|
1683
1683
|
|
@@ -1833,7 +1833,9 @@
|
|
1833
1833
|
--mdc-toggle-icon-color-disabled: var(--mds-color-theme-common-inverted-text-primary-disabled);
|
1834
1834
|
--mdc-toggle-icon-background-color-normal: var(--mds-color-theme-common-text-primary-normal);
|
1835
1835
|
--mdc-toggle-icon-background-color-disabled: var(--mds-color-theme-common-text-primary-disabled);
|
1836
|
+
}
|
1836
1837
|
|
1838
|
+
:host([label]), :host([help-text]){
|
1837
1839
|
display: grid;
|
1838
1840
|
grid-template-rows: auto auto;
|
1839
1841
|
grid-template-columns: auto auto;
|
@@ -1842,6 +1844,7 @@
|
|
1842
1844
|
}
|
1843
1845
|
|
1844
1846
|
:host([help-text='']) {
|
1847
|
+
grid-template-rows: auto;
|
1845
1848
|
row-gap: 0rem;
|
1846
1849
|
}
|
1847
1850
|
|
@@ -1853,9 +1856,10 @@
|
|
1853
1856
|
.mdc-toggle__input {
|
1854
1857
|
opacity: 0;
|
1855
1858
|
position: absolute;
|
1859
|
+
cursor: pointer;
|
1860
|
+
margin: 0;
|
1856
1861
|
width: var(--mdc-toggle-width);
|
1857
1862
|
height: var(--mdc-toggle-height);
|
1858
|
-
cursor: pointer;
|
1859
1863
|
}
|
1860
1864
|
|
1861
1865
|
.mdc-toggle__slider {
|
@@ -1883,7 +1887,11 @@
|
|
1883
1887
|
height: var(--mdc-toggle-height-compact);
|
1884
1888
|
border-radius: var(--mdc-toggle-border-radius-compact);
|
1885
1889
|
}
|
1886
|
-
|
1890
|
+
:host([size='compact']) .mdc-toggle__input {
|
1891
|
+
width: var(--mdc-toggle-width-compact);
|
1892
|
+
height: var(--mdc-toggle-height-compact);
|
1893
|
+
}
|
1894
|
+
|
1887
1895
|
.mdc-toggle__icon {
|
1888
1896
|
padding: 0.25rem;
|
1889
1897
|
--mdc-icon-fill-color: var(--mdc-toggle-icon-color-normal);
|
@@ -1948,7 +1956,7 @@
|
|
1948
1956
|
border: var(--mdc-toggle-border);
|
1949
1957
|
}
|
1950
1958
|
}
|
1951
|
-
`,...$(!0)],us=ml;var fs=
|
1959
|
+
`,...$(!0)],us=ml;var fs=x.constructTagName("toggle"),Wo={DEFAULT:"default",COMPACT:"compact"},Xo={CHECKED:"check-bold",UNCHECKED:"cancel-bold"},gs={compact:.75,default:1.25},Zo={SIZE:Wo.DEFAULT,VALIDATION_MESSAGE:"Please toggle this switch if you want to proceed."};var lt=class extends he(W(kt)){constructor(){super();this.checked=!1;this.size=Zo.SIZE;this.autofocus=!1;this.helpTextType=void 0}formResetCallback(){this.checked=!1}formStateRestoreCallback(e){e&&(this.checked=!0)}manageRequired(){!this.checked&&this.requiredLabel?(this.validationMessage?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()):this.internals.setValidity({})}setFormValue(){let e=null;this.checked?e=this.value?this.value:"isActive":e=null,this.manageRequired(),this.internals.setFormValue(e)}toggleState(){this.disabled||(this.checked=!this.checked)}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}setToggleSize(e){this.setAttribute("size",Object.values(Wo).includes(e)?e:Zo.SIZE)}update(e){super.update(e),e.has("checked")&&this.setFormValue(),e.has("size")&&this.setToggleSize(this.size)}render(){var e;return u`
|
1952
1960
|
<div class="mdc-toggle__container mdc-focus-ring">
|
1953
1961
|
<input
|
1954
1962
|
id="${this.id}"
|
@@ -1979,7 +1987,7 @@
|
|
1979
1987
|
</div>
|
1980
1988
|
${this.renderLabel()}
|
1981
1989
|
${this.renderHelperText()}
|
1982
|
-
`}};lt.styles=[...kt.styles,...us],c([d({type:Boolean,reflect:!0})],lt.prototype,"checked",2),c([d({type:String,reflect:!0})],lt.prototype,"size",2),c([d({type:Boolean,reflect:!0})],lt.prototype,"autofocus",2);var jo=lt;jo.register(fs);var hl=jo;var vs=
|
1990
|
+
`}};lt.styles=[...kt.styles,...us],c([d({type:Boolean,reflect:!0})],lt.prototype,"checked",2),c([d({type:String,reflect:!0})],lt.prototype,"size",2),c([d({type:Boolean,reflect:!0})],lt.prototype,"autofocus",2);var jo=lt;jo.register(fs);var hl=jo;var vs=x.constructTagName("checkbox"),Ko={CHECKED:"check-bold",INDETERMINATE:"minus-bold"};var pl=[g`
|
1983
1991
|
:host {
|
1984
1992
|
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
1985
1993
|
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
@@ -2081,14 +2089,17 @@
|
|
2081
2089
|
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
2082
2090
|
}
|
2083
2091
|
}
|
2084
|
-
`,...$(!0)],bs=pl;var ct=class extends he(W(ee)){constructor(){super();this.checked=!1;this.indeterminate=!1;this.autofocus=!1;this.
|
2092
|
+
`,...$(!0)],bs=pl;var ct=class extends he(W(ee)){constructor(){super();this.checked=!1;this.indeterminate=!1;this.autofocus=!1;this.renderLabelAndHelperText=()=>this.label?u`<div class="text-container">
|
2093
|
+
${this.renderLabel()}
|
2094
|
+
${this.renderHelperText()}
|
2095
|
+
</div>`:y;this.helpTextType=void 0}setFormValue(){let e=null;this.checked?e=this.value?this.value:"on":e=null,this.manageRequired(),this.internals.setFormValue(e)}manageRequired(){!this.checked&&this.requiredLabel?(this.validationMessage?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()):this.internals.setValidity({})}formResetCallback(){this.checked=!1,this.indeterminate=!1}formStateRestoreCallback(e){e&&(this.checked=!0)}toggleState(){this.disabled||(this.checked=!this.checked,this.indeterminate=!1)}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}update(e){super.update(e),e.has("checked")&&this.setFormValue()}render(){var r;let e=this.checked||this.indeterminate?u`
|
2085
2096
|
<mdc-icon
|
2086
2097
|
class="icon"
|
2087
2098
|
name="${this.indeterminate?Ko.INDETERMINATE:Ko.CHECKED}"
|
2088
2099
|
size="1"
|
2089
2100
|
length-unit="rem"
|
2090
2101
|
></mdc-icon>
|
2091
|
-
`:
|
2102
|
+
`:y;return u`
|
2092
2103
|
<div class="container mdc-focus-ring">
|
2093
2104
|
<input
|
2094
2105
|
id="${this.id}"
|
@@ -2102,7 +2113,7 @@
|
|
2102
2113
|
aria-checked="${this.indeterminate?"mixed":this.checked}"
|
2103
2114
|
.indeterminate="${this.indeterminate}"
|
2104
2115
|
.disabled="${this.disabled}"
|
2105
|
-
aria-label="${(
|
2116
|
+
aria-label="${(r=this.dataAriaLabel)!=null?r:""}"
|
2106
2117
|
tabindex="${this.disabled?-1:0}"
|
2107
2118
|
aria-describedby="${A(this.helpText?H.HELPER_TEXT_ID:"")}"
|
2108
2119
|
@change=${this.handleChange}
|
@@ -2110,10 +2121,7 @@
|
|
2110
2121
|
/>
|
2111
2122
|
<div class="icon-container">${e}</div>
|
2112
2123
|
</div>
|
2113
|
-
|
2114
|
-
${this.renderLabel()}
|
2115
|
-
${r}
|
2116
|
-
</div>
|
2124
|
+
${this.renderLabelAndHelperText()}
|
2117
2125
|
`}};ct.styles=[...ee.styles,...bs],c([d({type:Boolean,reflect:!0})],ct.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"indeterminate",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"autofocus",2);var Qo=ct;Qo.register(vs);var ul=Qo;var fl=[C,g`
|
2118
2126
|
:host{
|
2119
2127
|
--mdc-radio-inner-circle-size: 0.375rem;
|
@@ -2276,7 +2284,10 @@
|
|
2276
2284
|
display: none;
|
2277
2285
|
}
|
2278
2286
|
|
2279
|
-
`,...$(!0)],ys=fl;var dt=class extends he(W(ee)){constructor(){super();this.checked=!1;this.readonly=!1;this.autofocus=!1;this.
|
2287
|
+
`,...$(!0)],ys=fl;var dt=class extends he(W(ee)){constructor(){super();this.checked=!1;this.readonly=!1;this.autofocus=!1;this.renderLabelAndHelperText=()=>this.label?u`<div class="mdc-radio__label-container">
|
2288
|
+
${this.renderLabel()}
|
2289
|
+
${this.renderHelperText()}
|
2290
|
+
</div>`:y;this.helpTextType=void 0}firstUpdated(){this.updateTabIndex()}getAllRadiosWithinSameGroup(){return Array.from(document.querySelectorAll(`mdc-radio[name="${this.name}"]`))}dispatchChangeEvent(e){let r=e.constructor;this.dispatchEvent(new r(e.type,e))}formResetCallback(){this.getAllRadiosWithinSameGroup().forEach(r=>{r.checked=!1}),this.updateComplete.then(()=>{this.setActualFormValue()}).catch(r=>{this.onerror&&this.onerror(r)})}formStateRestoreCallback(e){this.value===e&&e!==""&&(this.checked=!0)}setComponentValidity(e){e?this.internals.setValidity({}):this.requiredLabel&&!this.checked&&(this.validationMessage?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()),this.updateTabIndex()}setGroupValidity(e,r){this.updateComplete.then(()=>{e.forEach(i=>{i.setComponentValidity(r)})}).catch(i=>{this.onerror&&this.onerror(i)})}setActualFormValue(){let e="";this.checked?e=this.value?this.value:"on":e=null;let r=this.getAllRadiosWithinSameGroup();if(this.checked)this.setGroupValidity(r,!0);else{let i=r.some(a=>a.requiredLabel),n=!!r.find(a=>a.checked),s=i&&!n;this.setGroupValidity(r,!s)}this.internals.setFormValue(e)}handleChange(e){var n;if(this.disabled||this.readonly)return;this.getAllRadiosWithinSameGroup().forEach(s=>{var l;let a=(l=s.shadowRoot)==null?void 0:l.querySelector("input");a&&(s.checked=!1,a.checked=!1)}),this.checked=!0;let i=(n=this.shadowRoot)==null?void 0:n.querySelector("input");i&&(i.checked=!0),this.dispatchChangeEvent(e)}updateRadio(e,r,i){var n,s;(s=(n=e[r].shadowRoot)==null?void 0:n.querySelector("input"))==null||s.focus(),e[r].handleChange(i)}handleKeyDown(e){var s;if(this.disabled)return;let i=this.getAllRadiosWithinSameGroup().filter(a=>!a.disabled),n=i.indexOf(this);if(["ArrowDown","ArrowRight"].includes(e.key)){let a=(n+1)%i.length;this.updateRadio(i,a,e)}else if(["ArrowUp","ArrowLeft"].includes(e.key)){let a=(n-1+i.length)%i.length;this.updateRadio(i,a,e)}else e.key===" "&&this.updateRadio(i,n,e);this.updateTabIndex(),e.key==="Enter"&&((s=this.form)==null||s.requestSubmit())}updateTabIndex(){let e=this.getAllRadiosWithinSameGroup(),r=e.find(n=>n.checked),i=e.find(n=>!n.disabled);e.forEach(n=>{var a;let s=(a=n.shadowRoot)==null?void 0:a.querySelector("input");s&&(s.tabIndex=-1,(n===r||!r&&n===i)&&(s.tabIndex=0))})}update(e){super.update(e),e.has("checked")&&this.setActualFormValue()}render(){var e;return u`
|
2280
2291
|
<div class="mdc-radio__container">
|
2281
2292
|
<div class="mdc-radio__icon-container mdc-focus-ring">
|
2282
2293
|
<input
|
@@ -2295,19 +2306,16 @@
|
|
2295
2306
|
class="mdc-radio__input"
|
2296
2307
|
aria-checked="${this.checked}"
|
2297
2308
|
aria-describedby="${A(this.helpText?H.HELPER_TEXT_ID:"")}"
|
2298
|
-
aria-label="${(
|
2309
|
+
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
2299
2310
|
/>
|
2300
2311
|
<span class="mdc-radio__icon"></span>
|
2301
2312
|
</div>
|
2302
|
-
|
2303
|
-
${this.renderLabel()}
|
2304
|
-
${e}
|
2305
|
-
</div>
|
2313
|
+
${this.renderLabelAndHelperText()}
|
2306
2314
|
</div>
|
2307
|
-
`}};dt.styles=[...ee.styles,...ys],c([d({type:Boolean,reflect:!0})],dt.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],dt.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],dt.prototype,"autofocus",2);var Jo=dt;var Xr=
|
2315
|
+
`}};dt.styles=[...ee.styles,...ys],c([d({type:Boolean,reflect:!0})],dt.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],dt.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],dt.prototype,"autofocus",2);var Jo=dt;var Xr=x.constructTagName("radio");Jo.register(Xr);var gl=Jo;function mt(o,t,e){var n;let r=(n=e.initialDeps)!=null?n:[],i;return()=>{var s,a,l,m;let h;e.key&&((s=e.debug)!=null&&s.call(e))&&(h=Date.now());let p=o();if(!(p.length!==r.length||p.some((b,T)=>r[T]!==b)))return i;r=p;let f;if(e.key&&((a=e.debug)!=null&&a.call(e))&&(f=Date.now()),i=t(...p),e.key&&((l=e.debug)!=null&&l.call(e))){let b=Math.round((Date.now()-h)*100)/100,T=Math.round((Date.now()-f)*100)/100,_=T/16,S=(I,w)=>{for(I=String(I);I.length<w;)I=" "+I;return I};console.info(`%c\u23F1 ${S(T,5)} /${S(b,5)} ms`,`
|
2308
2316
|
font-size: .6rem;
|
2309
2317
|
font-weight: bold;
|
2310
|
-
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(m=e==null?void 0:e.onChange)==null||m.call(e,i),i}}function Zr(o,t){if(o===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return o}var xs=(o,t)=>Math.abs(o-t)<1,Es=(o,t,e)=>{let r;return function(...i){o.clearTimeout(r),r=o.setTimeout(()=>t.apply(this,i),e)}};var vl=o=>o,bl=o=>{let t=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1),r=[];for(let i=t;i<=e;i++)r.push(i);return r},As=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=s=>{let{width:a,height:l}=s;t({width:Math.round(a),height:Math.round(l)})};if(i(e.getBoundingClientRect()),!r.ResizeObserver)return()=>{};let n=new r.ResizeObserver(s=>{let a=s[0];if(a!=null&&a.borderBoxSize){let l=a.borderBoxSize[0];if(l){i({width:l.inlineSize,height:l.blockSize});return}}i(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},Ts={passive:!0};var yl=typeof window>"u"?!0:"onscrollend"in window,Ss=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=0,n=o.options.useScrollendEvent&&yl?()=>{}:Es(r,()=>{t(i,!1)},o.options.isScrollingResetDelay),s=m=>()=>{let{horizontal:h,isRtl:p}=o.options;i=h?e.scrollLeft*(p&&-1||1):e.scrollTop,n(),t(i,m)},a=s(!0),l=s(!1);return l(),e.addEventListener("scroll",a,Ts),e.addEventListener("scrollend",l,Ts),()=>{e.removeEventListener("scroll",a),e.removeEventListener("scrollend",l)}};var xl=(o,t,e)=>{if(t!=null&&t.borderBoxSize){let r=t.borderBoxSize[0];if(r)return Math.round(r[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])};var _s=(o,{adjustments:t=0,behavior:e},r)=>{var i,n;let s=o+t;(n=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||n.call(i,{[r.options.horizontal?"left":"top"]:s,behavior:e})},jr=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,r=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(i=>{i.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),e=null},observe:i=>{var n;return(n=r())==null?void 0:n.observe(i,{box:"border-box"})},unobserve:i=>{var n;return(n=r())==null?void 0:n.unobserve(i)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([r,i])=>{typeof i>"u"&&delete e[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:vl,rangeExtractor:bl,onChange:()=>{},measureElement:xl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,e)},this.maybeNotify=mt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;var e;let r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(i=(e=this.scrollElement)==null?void 0:e.window)!=null?i:null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>{var e;return this.options.enabled?(this.scrollRect=(e=this.scrollRect)!=null?e:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var e;return this.options.enabled?(this.scrollOffset=(e=this.scrollOffset)!=null?e:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(e,r)=>{let i=new Map,n=new Map;for(let s=r-1;s>=0;s--){let a=e[s];if(i.has(a.lane))continue;let l=n.get(a.lane);if(l==null||a.end>l.end?n.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=mt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,r,i,n,s)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:r,scrollMargin:i,getItemKey:n,enabled:s}),{key:!1}),this.getMeasurements=mt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:r,scrollMargin:i,getItemKey:n,enabled:s},a)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));let l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let m=this.measurementsCache.slice(0,l);for(let h=l;h<e;h++){let p=n(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),f=v?v.end+this.options.gap:r+i,b=a.get(p),T=typeof b=="number"?b:this.options.estimateSize(h),_=f+T,S=v?v.lane:h%this.options.lanes;m[h]={index:h,start:f,size:T,end:_,key:p,lane:S}}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=mt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,r,i)=>this.range=e.length>0&&r>0?El({measurements:e,outerSize:r,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=mt(()=>{let e=null,r=null,i=this.calculateRange();return i&&(e=i.startIndex,r=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,r]},(e,r,i,n,s)=>n===null||s===null?[]:e({startIndex:n,endIndex:s,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let r=this.options.indexAttribute,i=e.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(e,r)=>{let i=this.indexFromElement(e),n=this.measurementsCache[i];if(!n)return;let s=n.key,a=this.elementsCache.get(s);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(s,e)),e.isConnected&&this.resizeItem(i,this.options.measureElement(e,r,this))},this.resizeItem=(e,r)=>{var a;let i=this.measurementsCache[e];if(!i)return;let n=(a=this.itemSizeCache.get(i.key))!=null?a:i.size,s=r-n;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(e,void 0)},this.getVirtualItems=mt(()=>[this.getIndexes(),this.getMeasurements()],(e,r)=>{let i=[];for(let n=0,s=e.length;n<s;n++){let a=e[n],l=r[a];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let r=this.getMeasurements();if(r.length!==0)return Zr(r[Is(0,r.length-1,i=>Zr(r[i]).start,e)])},this.getOffsetForAlignment=(e,r)=>{let i=this.getSize(),n=this.getScrollOffset();r==="auto"&&e>=n+i&&(r="end"),r==="end"&&(e-=i);let s=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(l,e),0)},this.getOffsetForIndex=(e,r="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.measurementsCache[e];if(!i)return;let n=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(i.end>=s+n-this.options.scrollPaddingEnd)r="end";else if(i.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];let a=i.start-this.options.scrollPaddingStart+(i.size-n)/2;switch(r){case"center":return[this.getOffsetForAlignment(a,r),r];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(e,{align:r="auto",behavior:i}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let n=this.getOffsetForIndex(e,r);if(!n)return;let[s,a]=n;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){let[m]=Zr(this.getOffsetForIndex(e,a));xs(m,this.getScrollOffset())||this.scrollToIndex(e,{align:a,behavior:i})}else this.scrollToIndex(e,{align:a,behavior:i})}))},this.scrollBy=(e,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;var e;let r=this.getMeasurements(),i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?(n=(e=r[r.length-1])==null?void 0:e.end)!=null?n:0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:r,behavior:i})=>{this.options.scrollToFn(e,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}},Is=(o,t,e,r)=>{for(;o<=t;){let i=(o+t)/2|0,n=e(i);if(n<r)o=i+1;else if(n>r)t=i-1;else return i}return o>0?o-1:0};function El({measurements:o,outerSize:t,scrollOffset:e}){let r=o.length-1,n=Is(0,r,a=>o[a].start,e),s=n;for(;s<r&&o[s].end<e+t;)s++;return{startIndex:n,endIndex:s}}var ei=class{constructor(t,e){this.cleanup=()=>{},(this.host=t).addController(this);let r={...e,onChange:(i,n)=>{var s;this.host.updateComplete.then(()=>this.host.requestUpdate()),(s=e.onChange)==null||s.call(e,i,n)}};this.virtualizer=new jr(r)}getVirtualizer(){return this.virtualizer}async hostConnected(){this.cleanup=this.virtualizer._didMount()}hostUpdated(){this.virtualizer._willUpdate()}hostDisconnected(){this.cleanup()}},Kr=class extends ei{constructor(t,e){super(t,{observeElementRect:As,observeElementOffset:Ss,scrollToFn:_s,...e})}};var{I:Yy}=Ri;var ws=o=>o.strings===void 0;var nr=(o,t)=>{var r;let e=o._$AN;if(e===void 0)return!1;for(let i of e)(r=i._$AO)==null||r.call(i,t,!1),nr(i,t);return!0},Qr=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while((e==null?void 0:e.size)===0)},Cs=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Sl(t)}};function Tl(o){this._$AN!==void 0?(Qr(this),this._$AM=o,Cs(this)):this._$AM=o}function Al(o,t=!1,e=0){let r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)nr(r[n],!1),Qr(r[n]);else r!=null&&(nr(r,!1),Qr(r));else nr(this,o)}var Sl=o=>{var t,e;o.type==wr.CHILD&&((t=o._$AP)!=null||(o._$AP=Al),(e=o._$AQ)!=null||(o._$AQ=Tl))},Jr=class extends Tt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Cs(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),e&&(nr(this,t),Qr(this))}setValue(t){if(ws(this.t))this.t._$AI(t,this);else{let e=[...this.t._$AH];e[this.i]=t,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ks=()=>new ri,ri=class{},ti=new WeakMap,Rs=Bt(class extends Jr{render(o){return x}update(o,[t]){var r;let e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(r=o.options)==null?void 0:r.host,this.rt(this.ct=o.element)),x}rt(o){var t;if(this.isConnected||(o=void 0),typeof this.Y=="function"){let e=(t=this.ht)!=null?t:globalThis,r=ti.get(e);r===void 0&&(r=new WeakMap,ti.set(e,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,t,e;return typeof this.Y=="function"?(t=ti.get((o=this.ht)!=null?o:globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var _l=[g`
|
2318
|
+
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(m=e==null?void 0:e.onChange)==null||m.call(e,i),i}}function Zr(o,t){if(o===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return o}var xs=(o,t)=>Math.abs(o-t)<1,Es=(o,t,e)=>{let r;return function(...i){o.clearTimeout(r),r=o.setTimeout(()=>t.apply(this,i),e)}};var vl=o=>o,bl=o=>{let t=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1),r=[];for(let i=t;i<=e;i++)r.push(i);return r},As=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=s=>{let{width:a,height:l}=s;t({width:Math.round(a),height:Math.round(l)})};if(i(e.getBoundingClientRect()),!r.ResizeObserver)return()=>{};let n=new r.ResizeObserver(s=>{let a=s[0];if(a!=null&&a.borderBoxSize){let l=a.borderBoxSize[0];if(l){i({width:l.inlineSize,height:l.blockSize});return}}i(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},Ts={passive:!0};var yl=typeof window>"u"?!0:"onscrollend"in window,Ss=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=0,n=o.options.useScrollendEvent&&yl?()=>{}:Es(r,()=>{t(i,!1)},o.options.isScrollingResetDelay),s=m=>()=>{let{horizontal:h,isRtl:p}=o.options;i=h?e.scrollLeft*(p&&-1||1):e.scrollTop,n(),t(i,m)},a=s(!0),l=s(!1);return l(),e.addEventListener("scroll",a,Ts),e.addEventListener("scrollend",l,Ts),()=>{e.removeEventListener("scroll",a),e.removeEventListener("scrollend",l)}};var xl=(o,t,e)=>{if(t!=null&&t.borderBoxSize){let r=t.borderBoxSize[0];if(r)return Math.round(r[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])};var _s=(o,{adjustments:t=0,behavior:e},r)=>{var i,n;let s=o+t;(n=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||n.call(i,{[r.options.horizontal?"left":"top"]:s,behavior:e})},jr=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,r=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(i=>{i.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),e=null},observe:i=>{var n;return(n=r())==null?void 0:n.observe(i,{box:"border-box"})},unobserve:i=>{var n;return(n=r())==null?void 0:n.unobserve(i)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([r,i])=>{typeof i>"u"&&delete e[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:vl,rangeExtractor:bl,onChange:()=>{},measureElement:xl,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,e)},this.maybeNotify=mt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;var e;let r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(i=(e=this.scrollElement)==null?void 0:e.window)!=null?i:null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>{var e;return this.options.enabled?(this.scrollRect=(e=this.scrollRect)!=null?e:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var e;return this.options.enabled?(this.scrollOffset=(e=this.scrollOffset)!=null?e:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(e,r)=>{let i=new Map,n=new Map;for(let s=r-1;s>=0;s--){let a=e[s];if(i.has(a.lane))continue;let l=n.get(a.lane);if(l==null||a.end>l.end?n.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=mt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,r,i,n,s)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:r,scrollMargin:i,getItemKey:n,enabled:s}),{key:!1}),this.getMeasurements=mt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:r,scrollMargin:i,getItemKey:n,enabled:s},a)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));let l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let m=this.measurementsCache.slice(0,l);for(let h=l;h<e;h++){let p=n(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),f=v?v.end+this.options.gap:r+i,b=a.get(p),T=typeof b=="number"?b:this.options.estimateSize(h),_=f+T,S=v?v.lane:h%this.options.lanes;m[h]={index:h,start:f,size:T,end:_,key:p,lane:S}}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=mt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,r,i)=>this.range=e.length>0&&r>0?El({measurements:e,outerSize:r,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=mt(()=>{let e=null,r=null,i=this.calculateRange();return i&&(e=i.startIndex,r=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,r]},(e,r,i,n,s)=>n===null||s===null?[]:e({startIndex:n,endIndex:s,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let r=this.options.indexAttribute,i=e.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(e,r)=>{let i=this.indexFromElement(e),n=this.measurementsCache[i];if(!n)return;let s=n.key,a=this.elementsCache.get(s);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(s,e)),e.isConnected&&this.resizeItem(i,this.options.measureElement(e,r,this))},this.resizeItem=(e,r)=>{var a;let i=this.measurementsCache[e];if(!i)return;let n=(a=this.itemSizeCache.get(i.key))!=null?a:i.size,s=r-n;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(e,void 0)},this.getVirtualItems=mt(()=>[this.getIndexes(),this.getMeasurements()],(e,r)=>{let i=[];for(let n=0,s=e.length;n<s;n++){let a=e[n],l=r[a];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let r=this.getMeasurements();if(r.length!==0)return Zr(r[Is(0,r.length-1,i=>Zr(r[i]).start,e)])},this.getOffsetForAlignment=(e,r)=>{let i=this.getSize(),n=this.getScrollOffset();r==="auto"&&e>=n+i&&(r="end"),r==="end"&&(e-=i);let s=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(l,e),0)},this.getOffsetForIndex=(e,r="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.measurementsCache[e];if(!i)return;let n=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(i.end>=s+n-this.options.scrollPaddingEnd)r="end";else if(i.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];let a=i.start-this.options.scrollPaddingStart+(i.size-n)/2;switch(r){case"center":return[this.getOffsetForAlignment(a,r),r];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(e,{align:r="auto",behavior:i}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let n=this.getOffsetForIndex(e,r);if(!n)return;let[s,a]=n;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){let[m]=Zr(this.getOffsetForIndex(e,a));xs(m,this.getScrollOffset())||this.scrollToIndex(e,{align:a,behavior:i})}else this.scrollToIndex(e,{align:a,behavior:i})}))},this.scrollBy=(e,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;var e;let r=this.getMeasurements(),i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?(n=(e=r[r.length-1])==null?void 0:e.end)!=null?n:0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:r,behavior:i})=>{this.options.scrollToFn(e,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}},Is=(o,t,e,r)=>{for(;o<=t;){let i=(o+t)/2|0,n=e(i);if(n<r)o=i+1;else if(n>r)t=i-1;else return i}return o>0?o-1:0};function El({measurements:o,outerSize:t,scrollOffset:e}){let r=o.length-1,n=Is(0,r,a=>o[a].start,e),s=n;for(;s<r&&o[s].end<e+t;)s++;return{startIndex:n,endIndex:s}}var ei=class{constructor(t,e){this.cleanup=()=>{},(this.host=t).addController(this);let r={...e,onChange:(i,n)=>{var s;this.host.updateComplete.then(()=>this.host.requestUpdate()),(s=e.onChange)==null||s.call(e,i,n)}};this.virtualizer=new jr(r)}getVirtualizer(){return this.virtualizer}async hostConnected(){this.cleanup=this.virtualizer._didMount()}hostUpdated(){this.virtualizer._willUpdate()}hostDisconnected(){this.cleanup()}},Kr=class extends ei{constructor(t,e){super(t,{observeElementRect:As,observeElementOffset:Ss,scrollToFn:_s,...e})}};var{I:Yy}=Ri;var ws=o=>o.strings===void 0;var nr=(o,t)=>{var r;let e=o._$AN;if(e===void 0)return!1;for(let i of e)(r=i._$AO)==null||r.call(i,t,!1),nr(i,t);return!0},Qr=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while((e==null?void 0:e.size)===0)},Cs=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),Sl(t)}};function Tl(o){this._$AN!==void 0?(Qr(this),this._$AM=o,Cs(this)):this._$AM=o}function Al(o,t=!1,e=0){let r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)nr(r[n],!1),Qr(r[n]);else r!=null&&(nr(r,!1),Qr(r));else nr(this,o)}var Sl=o=>{var t,e;o.type==wr.CHILD&&((t=o._$AP)!=null||(o._$AP=Al),(e=o._$AQ)!=null||(o._$AQ=Tl))},Jr=class extends Tt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Cs(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),e&&(nr(this,t),Qr(this))}setValue(t){if(ws(this.t))this.t._$AI(t,this);else{let e=[...this.t._$AH];e[this.i]=t,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ks=()=>new ri,ri=class{},ti=new WeakMap,Rs=Bt(class extends Jr{render(o){return y}update(o,[t]){var r;let e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(r=o.options)==null?void 0:r.host,this.rt(this.ct=o.element)),y}rt(o){var t;if(this.isConnected||(o=void 0),typeof this.Y=="function"){let e=(t=this.ht)!=null?t:globalThis,r=ti.get(e);r===void 0&&(r=new WeakMap,ti.set(e,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,t,e;return typeof this.Y=="function"?(t=ti.get((o=this.ht)!=null?o:globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var _l=[g`
|
2311
2319
|
:host::part(scroll) {
|
2312
2320
|
height: 100%;
|
2313
2321
|
width: 100%;
|
@@ -2317,7 +2325,7 @@
|
|
2317
2325
|
position: relative;
|
2318
2326
|
width: 100%;
|
2319
2327
|
}
|
2320
|
-
`],Ls=_l;var Ns=
|
2328
|
+
`],Ls=_l;var Ns=x.constructTagName("virtualizedlist"),lx=x.constructTagName("virtualizedwrapper"),Os={VIRTUALIZER_PROPS:{count:0,estimateSize:()=>0}};var ht=class extends E{constructor(){super();this.virtualizerProps=Os.VIRTUALIZER_PROPS;this.scrollElementRef=ks();this.virtualItems=[];this.virtualizerController=null,this.virtualizer=null,this.setlistdata=null,this.onscroll=null}update(e){super.update(e),e.get("virtualizerProps")&&this.setVirtualizerOptions()}firstUpdated(e){super.firstUpdated(e),this.setVirtualizerOptions()}setVirtualizerOptions(){var e;(e=this.virtualizer)==null||e.setOptions({...this.virtualizer.options,...this.virtualizerProps}),this.requestUpdate()}connectedCallback(){var e;this.virtualizerController=new Kr(this,{count:this.virtualizerProps.count,estimateSize:(e=this.virtualizerProps)==null?void 0:e.estimateSize,getScrollElement:()=>this.scrollElementRef.value||null,...this.virtualizerProps}),super.connectedCallback()}getVirtualizedListWrapper(e){var a,l;this.virtualizer=e.getVirtualizer();let{getTotalSize:r,getVirtualItems:i,measureElement:n}=this.virtualizer,s=i();if(s!==this.virtualItems){this.virtualItems=s;let m=i(),h={position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${(l=(a=m[0])==null?void 0:a.start)!=null?l:0}px)`};this.setlistdata&&this.setlistdata({virtualItems:m,measureElement:n,listStyle:h})}return u`<div
|
2321
2329
|
part="container"
|
2322
2330
|
style="height: ${r()}px;"
|
2323
2331
|
>
|
@@ -2572,21 +2580,21 @@
|
|
2572
2580
|
color: var(--mdc-tab-pill-active-color-disabled);
|
2573
2581
|
}
|
2574
2582
|
|
2575
|
-
`,...$()],zs=wl;var Ms=
|
2583
|
+
`,...$()],zs=wl;var Ms=x.constructTagName("tab"),ii={GLASS:"glass",LINE:"line",PILL:"pill"},ni={VARIANT:ii.PILL};var Rt=class extends de(De){constructor(){super();this.variant=ni.VARIANT;this.role="tab",this.softDisabled=void 0,this.size=void 0,this.type=void 0}modifyIconName(e){this.iconName&&(e?(this.prevIconName=this.iconName,this.iconName=`${Yt(this.iconName)}-filled`):this.prevIconName&&(this.iconName=this.prevIconName))}setVariant(e){this.setAttribute("variant",Object.values(ii).includes(e)?e:ni.VARIANT)}setActive(e,r){e.setAttribute("aria-selected",r?"true":"false"),this.modifyIconName(r)}executeAction(){this.active=!this.active}update(e){super.update(e),e.has("variant")&&this.setVariant(this.variant)}render(){return u`
|
2576
2584
|
<div part="container">
|
2577
|
-
${this.iconName?u` <mdc-icon name="${this.iconName}" size="1" length-unit="rem" part="icon"></mdc-icon>`:
|
2585
|
+
${this.iconName?u` <mdc-icon name="${this.iconName}" size="1" length-unit="rem" part="icon"></mdc-icon>`:y}
|
2578
2586
|
${this.text?u` <mdc-text
|
2579
2587
|
type=${this.active?O.BODY_MIDSIZE_BOLD:O.BODY_MIDSIZE_MEDIUM}
|
2580
2588
|
tagname=${z.SPAN}
|
2581
2589
|
data-text=${this.text}
|
2582
2590
|
part="text"
|
2583
2591
|
>${this.text}</mdc-text
|
2584
|
-
>`:
|
2592
|
+
>`:y}
|
2585
2593
|
<slot name="badge"></slot>
|
2586
2594
|
<slot name="chip"></slot>
|
2587
2595
|
</div>
|
2588
2596
|
<div part="indicator"></div>
|
2589
|
-
`}};Rt.styles=[...De.styles,...zs],c([d({type:String,reflect:!0})],Rt.prototype,"text",2),c([d({type:String,reflect:!0})],Rt.prototype,"variant",2);var si=Rt;si.register(Ms);var Cl=si;var Ds=
|
2597
|
+
`}};Rt.styles=[...De.styles,...zs],c([d({type:String,reflect:!0})],Rt.prototype,"text",2),c([d({type:String,reflect:!0})],Rt.prototype,"variant",2);var si=Rt;si.register(Ms);var Cl=si;var Ds=x.constructTagName("formfieldgroup"),ai={RADIOGROUP:"radiogroup",GROUP:"group"};var kl=g`
|
2590
2598
|
|
2591
2599
|
:host::part(container) {
|
2592
2600
|
display: flex;
|
@@ -2679,11 +2687,11 @@
|
|
2679
2687
|
stroke-dashoffset: -292;
|
2680
2688
|
}
|
2681
2689
|
}
|
2682
|
-
`],Ps=Rl;var Us=
|
2690
|
+
`],Ps=Rl;var Us=x.constructTagName("spinner"),Ll={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},Nl={STANDALONE:"standalone",BUTTON:"button"},ro={VARIANT:Nl.STANDALONE,SIZE:Ll.MIDSIZE,INVERTED:!1};var Fe=class extends E{constructor(){super(...arguments);this.inverted=ro.INVERTED;this.size=ro.SIZE;this.ariaLabel=null;this.variant=ro.VARIANT}updated(e){super.updated(e),e.has("ariaLabel")&&(this.role=this.ariaLabel?"img":null,this.ariaHidden=this.ariaLabel?"false":"true")}render(){return u`
|
2683
2691
|
<svg part="container" viewBox="0 0 100 100">
|
2684
2692
|
<circle part="circle" cx="50" cy="50" r="46"></circle>
|
2685
2693
|
</svg>
|
2686
|
-
`}};Fe.styles=[...E.styles,...Ps],c([d({type:Boolean,reflect:!0})],Fe.prototype,"inverted",2),c([d({type:String,reflect:!0})],Fe.prototype,"size",2),c([d({type:String,attribute:"aria-label"})],Fe.prototype,"ariaLabel",2),c([d({type:String,reflect:!0})],Fe.prototype,"variant",2);var ci=Fe;ci.register(Us);var Ol=ci;var sr=class extends to{constructor(){super();this.name="";this.isRadio=!0}firstUpdated(){var e,r,i,n,s;(s=(n=(i=(r=Array.from(((e=this.shadowRoot)==null?void 0:e.querySelectorAll("slot"))||[]))==null?void 0:r.flatMap(a=>a.assignedElements({flatten:!0})))==null?void 0:i.filter(a=>a.tagName.toLowerCase()===Xr))==null?void 0:n.filter(a=>!a.hasAttribute("name")))==null||s.forEach(a=>{a.setAttribute("name",this.name),this.requiredLabel&&a.setAttribute("required-label",this.requiredLabel)})}};sr.styles=[...to.styles],c([d({type:String})],sr.prototype,"name",2);var di=sr;var Vs=
|
2694
|
+
`}};Fe.styles=[...E.styles,...Ps],c([d({type:Boolean,reflect:!0})],Fe.prototype,"inverted",2),c([d({type:String,reflect:!0})],Fe.prototype,"size",2),c([d({type:String,attribute:"aria-label"})],Fe.prototype,"ariaLabel",2),c([d({type:String,reflect:!0})],Fe.prototype,"variant",2);var ci=Fe;ci.register(Us);var Ol=ci;var sr=class extends to{constructor(){super();this.name="";this.isRadio=!0}firstUpdated(){var e,r,i,n,s;(s=(n=(i=(r=Array.from(((e=this.shadowRoot)==null?void 0:e.querySelectorAll("slot"))||[]))==null?void 0:r.flatMap(a=>a.assignedElements({flatten:!0})))==null?void 0:i.filter(a=>a.tagName.toLowerCase()===Xr))==null?void 0:n.filter(a=>!a.hasAttribute("name")))==null||s.forEach(a=>{a.setAttribute("name",this.name),this.requiredLabel&&a.setAttribute("required-label",this.requiredLabel)})}};sr.styles=[...to.styles],c([d({type:String})],sr.prototype,"name",2);var di=sr;var Vs=x.constructTagName("radiogroup");di.register(Vs);var zl=di;})();
|
2687
2695
|
/*! Bundled license information:
|
2688
2696
|
|
2689
2697
|
@lit/reactive-element/decorators/custom-element.js:
|