cas-ds-web-components 1.2.52 → 1.2.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,30 @@
1
- (function(g,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(g=typeof globalThis<"u"?globalThis:g||self,v(g["cas-share"]={}))})(this,function(g){"use strict";/**
1
+ (function(f,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(f=typeof globalThis<"u"?globalThis:f||self,$(f["cas-share"]={}))})(this,function(f){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const v=window,j=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,B=Symbol(),Z=new WeakMap;class J{constructor(t,e,s){if(this._$cssResult$=!0,s!==B)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(j&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Z.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Z.set(e,t))}return t}toString(){return this.cssText}}const m=i=>new J(typeof i=="string"?i:i+"",void 0,B),k=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,n,a)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[a+1],i[0]);return new J(e,i,B)},kt=(i,t)=>{j?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),n=v.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},Y=j?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return m(e)})(i):i;/**
5
+ */const $=window,V=$.ShadowRoot&&($.ShadyCSS===void 0||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,at=Symbol(),rt=new WeakMap;class Dt{constructor(t,e,s){if(this._$cssResult$=!0,s!==at)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(V&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=rt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&rt.set(e,t))}return t}toString(){return this.cssText}}const Ht=i=>new Dt(typeof i=="string"?i:i+"",void 0,at),zt=(i,t)=>{V?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),n=$.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},ct=V?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Ht(e)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var W;const P=window,Q=P.trustedTypes,_t=Q?Q.emptyScript:"",tt=P.reactiveElementPolyfillSupport,V={toAttribute(i,t){switch(t){case Boolean:i=i?_t:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},et=(i,t)=>t!==i&&(t==t||i==i),q={attribute:!0,type:String,converter:V,reflect:!1,hasChanged:et};class _ extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const a=this[t];this[e]=n,this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||q}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(Y(n))}else t!==void 0&&e.push(Y(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return kt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=q){var n;const a=this.constructor._$Ep(t,s);if(a!==void 0&&s.reflect===!0){const o=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:V).toAttribute(e,s.type);this._$El=t,o==null?this.removeAttribute(a):this.setAttribute(a,o),this._$El=null}}_$AK(t,e){var s;const n=this.constructor,a=n._$Ev.get(t);if(a!==void 0&&this._$El!==a){const o=n.getPropertyOptions(a),h=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:V;this._$El=a,this[a]=h.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||et)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,a)=>this[a]=n),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var a;return(a=n.hostUpdate)===null||a===void 0?void 0:a.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}_.finalized=!0,_.elementProperties=new Map,_.elementStyles=[],_.shadowRootOptions={mode:"open"},tt?.({ReactiveElement:_}),((W=P.reactiveElementVersions)!==null&&W!==void 0?W:P.reactiveElementVersions=[]).push("1.4.2");/**
9
+ */var W;const M=window,lt=M.trustedTypes,jt=lt?lt.emptyScript:"",ht=M.reactiveElementPolyfillSupport,q={toAttribute(i,t){switch(t){case Boolean:i=i?jt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},dt=(i,t)=>t!==i&&(t==t||i==i),K={attribute:!0,type:String,converter:q,reflect:!1,hasChanged:dt},X="finalized";class x extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=K){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||K}static finalize(){if(this.hasOwnProperty(X))return!1;this[X]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(ct(n))}else t!==void 0&&e.push(ct(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return zt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=K){var n;const o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===!0){const a=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:q).toAttribute(e,s.type);this._$El=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(t,e){var s;const n=this.constructor,o=n._$Ev.get(t);if(o!==void 0&&this._$El!==o){const a=n.getPropertyOptions(o),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?a.converter:q;this._$El=o,this[o]=l.fromAttribute(e,a.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||dt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,o)=>this[o]=n),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var o;return(o=n.hostUpdate)===null||o===void 0?void 0:o.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}x[X]=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},ht?.({ReactiveElement:x}),((W=M.reactiveElementVersions)!==null&&W!==void 0?W:M.reactiveElementVersions=[]).push("1.6.3");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var X;const M=window,w=M.trustedTypes,st=w?w.createPolicy("lit-html",{createHTML:i=>i}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,it="?"+$,wt=`<${it}>`,A=document,E=(i="")=>A.createComment(i),T=i=>i===null||typeof i!="object"&&typeof i!="function",nt=Array.isArray,At=i=>nt(i)||typeof i?.[Symbol.iterator]=="function",N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,at=/>/g,y=RegExp(`>|[
14
- \f\r](?:([^\\s"'>=/]+)([
15
- \f\r]*=[
16
- \f\r]*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,ct=/"/g,lt=/^(?:script|style|textarea|title)$/i,xt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),O=xt(1),x=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ht=new WeakMap,S=A.createTreeWalker(A,129,null,!1),St=(i,t)=>{const e=i.length-1,s=[];let n,a=t===2?"<svg>":"",o=N;for(let r=0;r<e;r++){const c=i[r];let u,l,d=-1,b=0;for(;b<c.length&&(o.lastIndex=b,l=o.exec(c),l!==null);)b=o.lastIndex,o===N?l[1]==="!--"?o=ot:l[1]!==void 0?o=at:l[2]!==void 0?(lt.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=y):l[3]!==void 0&&(o=y):o===y?l[0]===">"?(o=n??N,d=-1):l[1]===void 0?d=-2:(d=o.lastIndex-l[2].length,u=l[1],o=l[3]===void 0?y:l[3]==='"'?ct:rt):o===ct||o===rt?o=y:o===ot||o===at?o=N:(o=y,n=void 0);const z=o===y&&i[r+1].startsWith("/>")?" ":"";a+=o===N?c+wt:d>=0?(s.push(u),c.slice(0,d)+"$lit$"+c.slice(d)+$+z):c+$+(d===-2?(s.push(void 0),r):z)}const h=a+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[st!==void 0?st.createHTML(h):h,s]};class R{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let a=0,o=0;const h=t.length-1,r=this.parts,[c,u]=St(t,e);if(this.el=R.createElement(c,s),S.currentNode=this.el.content,e===2){const l=this.el.content,d=l.firstChild;d.remove(),l.append(...d.childNodes)}for(;(n=S.nextNode())!==null&&r.length<h;){if(n.nodeType===1){if(n.hasAttributes()){const l=[];for(const d of n.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith($)){const b=u[o++];if(l.push(d),b!==void 0){const z=n.getAttribute(b.toLowerCase()+"$lit$").split($),F=/([.?@])?(.*)/.exec(b);r.push({type:1,index:a,name:F[2],strings:z,ctor:F[1]==="."?Et:F[1]==="?"?Nt:F[1]==="@"?Ot:I})}else r.push({type:6,index:a})}for(const d of l)n.removeAttribute(d)}if(lt.test(n.tagName)){const l=n.textContent.split($),d=l.length-1;if(d>0){n.textContent=w?w.emptyScript:"";for(let b=0;b<d;b++)n.append(l[b],E()),S.nextNode(),r.push({type:2,index:++a});n.append(l[d],E())}}}else if(n.nodeType===8)if(n.data===it)r.push({type:2,index:a});else{let l=-1;for(;(l=n.data.indexOf($,l+1))!==-1;)r.push({type:7,index:a}),l+=$.length-1}a++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function C(i,t,e=i,s){var n,a,o,h;if(t===x)return t;let r=s!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[s]:e._$Cl;const c=T(t)?void 0:t._$litDirective$;return r?.constructor!==c&&((a=r?._$AO)===null||a===void 0||a.call(r,!1),c===void 0?r=void 0:(r=new c(i),r._$AT(i,e,s)),s!==void 0?((o=(h=e)._$Co)!==null&&o!==void 0?o:h._$Co=[])[s]=r:e._$Cl=r),r!==void 0&&(t=C(i,r._$AS(i,t.values),r,s)),t}class Ct{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:n}=this._$AD,a=((e=t?.creationScope)!==null&&e!==void 0?e:A).importNode(s,!0);S.currentNode=a;let o=S.nextNode(),h=0,r=0,c=n[0];for(;c!==void 0;){if(h===c.index){let u;c.type===2?u=new U(o,o.nextSibling,this,t):c.type===1?u=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(u=new Rt(o,this,t)),this.u.push(u),c=n[++r]}h!==c?.index&&(o=S.nextNode(),h++)}return a}p(t){let e=0;for(const s of this.u)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class U{constructor(t,e,s,n){var a;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cm=(a=n?.isConnected)===null||a===void 0||a}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),T(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==x&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):At(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==p&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:n}=t,a=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=R.createElement(n.h,this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===a)this._$AH.p(s);else{const o=new Ct(a,this),h=o.v(this.options);o.p(s),this.T(h),this._$AH=o}}_$AC(t){let e=ht.get(t.strings);return e===void 0&&ht.set(t.strings,e=new R(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const a of t)n===e.length?e.push(s=new U(this.O(E()),this.O(E()),this,this.options)):s=e[n],s._$AI(a),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class I{constructor(t,e,s,n,a){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=a,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,n){const a=this.strings;let o=!1;if(a===void 0)t=C(this,t,e,0),o=!T(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const h=t;let r,c;for(t=a[0],r=0;r<a.length-1;r++)c=C(this,h[s+r],e,r),c===x&&(c=this._$AH[r]),o||(o=!T(c)||c!==this._$AH[r]),c===p?t=p:t!==p&&(t+=(c??"")+a[r+1]),this._$AH[r]=c}o&&!n&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Et extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const Tt=w?w.emptyScript:"";class Nt extends I{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,Tt):this.element.removeAttribute(this.name)}}class Ot extends I{constructor(t,e,s,n,a){super(t,e,s,n,a),this.type=5}_$AI(t,e=this){var s;if((t=(s=C(this,t,e,0))!==null&&s!==void 0?s:p)===x)return;const n=this._$AH,a=t===p&&n!==p||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==p&&(n===p||a);a&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Rt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}}const dt=M.litHtmlPolyfillSupport;dt?.(R,U),((X=M.litHtmlVersions)!==null&&X!==void 0?X:M.litHtmlVersions=[]).push("2.4.0");const Ut=(i,t,e)=>{var s,n;const a=(s=e?.renderBefore)!==null&&s!==void 0?s:t;let o=a._$litPart$;if(o===void 0){const h=(n=e?.renderBefore)!==null&&n!==void 0?n:null;a._$litPart$=o=new U(t.insertBefore(E(),h),h,void 0,e??{})}return o._$AI(i),o};/**
13
+ */var J;const L=window,k=L.trustedTypes,pt=k?k.createPolicy("lit-html",{createHTML:i=>i}):void 0,G="$lit$",g=`lit$${(Math.random()+"").slice(9)}$`,ut="?"+g,Bt=`<${ut}>`,y=document,U=()=>y.createComment(""),P=i=>i===null||typeof i!="object"&&typeof i!="function",mt=Array.isArray,Ft=i=>mt(i)||typeof i?.[Symbol.iterator]=="function",Z=`[
14
+ \f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bt=/-->/g,vt=/>/g,_=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ft=/'/g,$t=/"/g,gt=/^(?:script|style|textarea|title)$/i,Vt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),R=Vt(1),S=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),yt=new WeakMap,w=y.createTreeWalker(y,129,null,!1);function _t(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return pt!==void 0?pt.createHTML(t):t}const Wt=(i,t)=>{const e=i.length-1,s=[];let n,o=t===2?"<svg>":"",a=O;for(let l=0;l<e;l++){const r=i[l];let c,h,d=-1,u=0;for(;u<r.length&&(a.lastIndex=u,h=a.exec(r),h!==null);)u=a.lastIndex,a===O?h[1]==="!--"?a=bt:h[1]!==void 0?a=vt:h[2]!==void 0?(gt.test(h[2])&&(n=RegExp("</"+h[2],"g")),a=_):h[3]!==void 0&&(a=_):a===_?h[0]===">"?(a=n??O,d=-1):h[1]===void 0?d=-2:(d=a.lastIndex-h[2].length,c=h[1],a=h[3]===void 0?_:h[3]==='"'?$t:ft):a===$t||a===ft?a=_:a===bt||a===vt?a=O:(a=_,n=void 0);const b=a===_&&i[l+1].startsWith("/>")?" ":"";o+=a===O?r+Bt:d>=0?(s.push(c),r.slice(0,d)+G+r.slice(d)+g+b):r+g+(d===-2?(s.push(void 0),l):b)}return[_t(i,o+(i[e]||"<?>")+(t===2?"</svg>":"")),s]};class T{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let o=0,a=0;const l=t.length-1,r=this.parts,[c,h]=Wt(t,e);if(this.el=T.createElement(c,s),w.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(n=w.nextNode())!==null&&r.length<l;){if(n.nodeType===1){if(n.hasAttributes()){const d=[];for(const u of n.getAttributeNames())if(u.endsWith(G)||u.startsWith(g)){const b=h[a++];if(d.push(u),b!==void 0){const ke=n.getAttribute(b.toLowerCase()+G).split(g),F=/([.?@])?(.*)/.exec(b);r.push({type:1,index:o,name:F[2],strings:ke,ctor:F[1]==="."?Kt:F[1]==="?"?Jt:F[1]==="@"?Gt:I})}else r.push({type:6,index:o})}for(const u of d)n.removeAttribute(u)}if(gt.test(n.tagName)){const d=n.textContent.split(g),u=d.length-1;if(u>0){n.textContent=k?k.emptyScript:"";for(let b=0;b<u;b++)n.append(d[b],U()),w.nextNode(),r.push({type:2,index:++o});n.append(d[u],U())}}}else if(n.nodeType===8)if(n.data===ut)r.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf(g,d+1))!==-1;)r.push({type:7,index:o}),d+=g.length-1}o++}}static createElement(t,e){const s=y.createElement("template");return s.innerHTML=t,s}}function E(i,t,e=i,s){var n,o,a,l;if(t===S)return t;let r=s!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[s]:e._$Cl;const c=P(t)?void 0:t._$litDirective$;return r?.constructor!==c&&((o=r?._$AO)===null||o===void 0||o.call(r,!1),c===void 0?r=void 0:(r=new c(i),r._$AT(i,e,s)),s!==void 0?((a=(l=e)._$Co)!==null&&a!==void 0?a:l._$Co=[])[s]=r:e._$Cl=r),r!==void 0&&(t=E(i,r._$AS(i,t.values),r,s)),t}class qt{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 e;const{el:{content:s},parts:n}=this._$AD,o=((e=t?.creationScope)!==null&&e!==void 0?e:y).importNode(s,!0);w.currentNode=o;let a=w.nextNode(),l=0,r=0,c=n[0];for(;c!==void 0;){if(l===c.index){let h;c.type===2?h=new N(a,a.nextSibling,this,t):c.type===1?h=new c.ctor(a,c.name,c.strings,this,t):c.type===6&&(h=new Zt(a,this,t)),this._$AV.push(h),c=n[++r]}l!==c?.index&&(a=w.nextNode(),l++)}return w.currentNode=y,o}v(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class N{constructor(t,e,s,n){var o;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cp=(o=n?.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),P(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==S&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Ft(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==p&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(y.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=T.createElement(_t(n.h,n.h[0]),this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(s);else{const a=new qt(o,this),l=a.u(this.options);a.v(s),this.$(l),this._$AH=a}}_$AC(t){let e=yt.get(t.strings);return e===void 0&&yt.set(t.strings,e=new T(t)),e}T(t){mt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const o of t)n===e.length?e.push(s=new N(this.k(U()),this.k(U()),this,this.options)):s=e[n],s._$AI(o),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class I{constructor(t,e,s,n,o){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,n){const o=this.strings;let a=!1;if(o===void 0)t=E(this,t,e,0),a=!P(t)||t!==this._$AH&&t!==S,a&&(this._$AH=t);else{const l=t;let r,c;for(t=o[0],r=0;r<o.length-1;r++)c=E(this,l[s+r],e,r),c===S&&(c=this._$AH[r]),a||(a=!P(c)||c!==this._$AH[r]),c===p?t=p:t!==p&&(t+=(c??"")+o[r+1]),this._$AH[r]=c}a&&!n&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Kt extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const Xt=k?k.emptyScript:"";class Jt extends I{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,Xt):this.element.removeAttribute(this.name)}}class Gt extends I{constructor(t,e,s,n,o){super(t,e,s,n,o),this.type=5}_$AI(t,e=this){var s;if((t=(s=E(this,t,e,0))!==null&&s!==void 0?s:p)===S)return;const n=this._$AH,o=t===p&&n!==p||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,a=t!==p&&(n===p||o);o&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Zt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const wt=L.litHtmlPolyfillSupport;wt?.(T,N),((J=L.litHtmlVersions)!==null&&J!==void 0?J:L.litHtmlVersions=[]).push("2.8.0");const Yt=(i,t,e)=>{var s,n;const o=(s=e?.renderBefore)!==null&&s!==void 0?s:t;let a=o._$litPart$;if(a===void 0){const l=(n=e?.renderBefore)!==null&&n!==void 0?n:null;o._$litPart$=a=new N(t.insertBefore(U(),l),l,void 0,e??{})}return a._$AI(i),a};/**
16
+ * @license
17
+ * Copyright 2019 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */const D=window,Y=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol(),kt=new WeakMap;class St{constructor(t,e,s){if(this._$cssResult$=!0,s!==Q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Y&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&kt.set(e,t))}return t}toString(){return this.cssText}}const m=i=>new St(typeof i=="string"?i:i+"",void 0,Q),A=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,n,o)=>s+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[o+1],i[0]);return new St(e,i,Q)},Qt=(i,t)=>{Y?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),n=D.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},Et=Y?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return m(e)})(i):i;/**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */var tt;const H=window,At=H.trustedTypes,te=At?At.emptyScript:"",Ct=H.reactiveElementPolyfillSupport,et={toAttribute(i,t){switch(t){case Boolean:i=i?te:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},xt=(i,t)=>t!==i&&(t==t||i==i),st={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:xt},it="finalized";class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||st}static finalize(){if(this.hasOwnProperty(it))return!1;this[it]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(Et(n))}else t!==void 0&&e.push(Et(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Qt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=st){var n;const o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===!0){const a=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:et).toAttribute(e,s.type);this._$El=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(t,e){var s;const n=this.constructor,o=n._$Ev.get(t);if(o!==void 0&&this._$El!==o){const a=n.getPropertyOptions(o),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((s=a.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?a.converter:et;this._$El=o,this[o]=l.fromAttribute(e,a.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||xt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,o)=>this[o]=n),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var o;return(o=n.hostUpdate)===null||o===void 0?void 0:o.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}C[it]=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},Ct?.({ReactiveElement:C}),((tt=H.reactiveElementVersions)!==null&&tt!==void 0?tt:H.reactiveElementVersions=[]).push("1.6.3");/**
18
24
  * @license
19
25
  * Copyright 2017 Google LLC
20
26
  * SPDX-License-Identifier: BSD-3-Clause
21
- */var K,G;class f extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ut(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return x}}f.finalized=!0,f._$litElement$=!0,(K=globalThis.litElementHydrateSupport)===null||K===void 0||K.call(globalThis,{LitElement:f});const pt=globalThis.litElementPolyfillSupport;pt?.({LitElement:f}),((G=globalThis.litElementVersions)!==null&&G!==void 0?G:globalThis.litElementVersions=[]).push("3.2.2");var Pt=k`
27
+ */var nt,ot;class v extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Yt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return S}}v.finalized=!0,v._$litElement$=!0,(nt=globalThis.litElementHydrateSupport)===null||nt===void 0||nt.call(globalThis,{LitElement:v});const Ut=globalThis.litElementPolyfillSupport;Ut?.({LitElement:v}),((ot=globalThis.litElementVersions)!==null&&ot!==void 0?ot:globalThis.litElementVersions=[]).push("3.3.3");var ee=A`
22
28
  * {
23
29
  box-sizing: border-box;
24
30
  }
@@ -125,7 +131,7 @@
125
131
  display: none;
126
132
  }
127
133
  }
128
- `;const Mt=k`
134
+ `;const se=A`
129
135
  :host {
130
136
  /* Colors: */
131
137
  --cas-snackbar-color-bg: rgb(53, 53, 53);
@@ -154,8 +160,8 @@
154
160
  --cas-snackbar-grid-gap: 1rem;
155
161
  --cas-snackbar-box-shadow: none;
156
162
  }
157
- `,It="#01736C",Ht="#5143D5",Lt="#364855",ut="#4D5D68",mt="#FFFFFF",Dt="#E53935",zt="#FFB300",Ft="#7CB342",jt=k`
158
- ${Mt}
163
+ `,ie="#01736C",ne="#5143D5",oe="#364855",Pt="#4D5D68",Ot="#FFFFFF",ae="#E53935",re="#FFB300",ce="#7CB342",le=A`
164
+ ${se}
159
165
  :host,
160
166
  :host([position="bottom left"]) {
161
167
  width: fit-content;
@@ -223,10 +229,10 @@
223
229
  margin-left: auto;
224
230
  margin-right: auto;
225
231
  }
226
- `,Bt=k`
232
+ `,he=A`
227
233
  :host {
228
234
  display: flex;
229
- background: ${m(mt)};
235
+ background: ${m(Ot)};
230
236
  box-shadow: 0 2px 10px #C9CFE3;
231
237
  border-radius: 8px;
232
238
  width: var(--cas-snackbar-width);
@@ -239,8 +245,8 @@
239
245
  align-items: center;
240
246
  justify-content: center;
241
247
  padding: 14px 12px;
242
- background-color: ${m(ut)};
243
- color: ${m(mt)};
248
+ background-color: ${m(Pt)};
249
+ color: ${m(Ot)};
244
250
  border-radius: 8px 0 0 8px;
245
251
  }
246
252
  :host .content {
@@ -249,56 +255,56 @@
249
255
  align-items: center;
250
256
  justify-content: space-between;
251
257
  gap:12px;
252
- color: ${m(Lt)};
258
+ color: ${m(oe)};
253
259
  padding: 14px 16px 14px 24px;
254
260
  }
255
261
  :host .content .text-container cas-text:nth-child(2) {
256
- color: ${m(ut)};
262
+ color: ${m(Pt)};
257
263
  }
258
264
  :host .content .text-container a {
259
- color: ${m(It)};
265
+ color: ${m(ie)};
260
266
  }
261
267
  /* VARIANTS*/
262
268
  :host([variant='success']) .icon {
263
- background-color: ${m(Ft)};
269
+ background-color: ${m(ce)};
264
270
  }
265
271
  :host([variant='error']) .icon {
266
- background-color: ${m(Dt)};
272
+ background-color: ${m(ae)};
267
273
  }
268
274
  :host([variant='warning']) .icon {
269
- background-color: ${m(zt)};
275
+ background-color: ${m(re)};
270
276
  }
271
277
  :host([variant='info']) .icon {
272
- background-color: ${m(Ht)};
278
+ background-color: ${m(ne)};
273
279
  }
274
- `,Wt={accessibilityLabel:null,animationDone:!1,animationDuration:300,animationName:"default",buttonCallback:null,buttonText:null,customClasses:null,duration:4e3,hideCallback:null,title:"Title is required",message:"Snackbar: It's a snackbar!",linkMessage:null,targetLink:"_parent",showCallback:null,size:"normal",type:"auto",variant:"default"},Vt=["default","slide-in","zoom"],qt=["small","normal","large"],Xt=["auto","dismiss"],Kt=["default","success","error","warning","info"],bt={accessibilityLabel:i=>!i||typeof i=="string",animationDuration:i=>!i||typeof i=="number",animationName:i=>!i||typeof i=="string"&&Vt.includes(i),buttonCallback:i=>!i||typeof i=="function",buttonText:i=>!i||typeof i=="string",customClasses:i=>!i||typeof i=="string",duration:i=>!i||typeof i=="number"&&!Number.isNaN(i),hideCallback:i=>!i||typeof i=="function",title:i=>!i||typeof i=="string"&&i.length>0,message:i=>!i||typeof i=="string"&&i.length>0,linkMessage:i=>!i||typeof i=="string"&&i.length>0,targetLink:i=>!i||typeof i=="string"&&i.length>0,showCallback:i=>!i||typeof i=="function",size:i=>!i||typeof i=="string"&&qt.includes(i),type:i=>!i||typeof i=="string"&&Xt.includes(i),variant:i=>!i||typeof i=="string"&&Kt.includes(i)};function Gt(i){return Object.keys(bt).filter(t=>!bt[t](i[t])).map(t=>new Error(`${t} is invalid.`))}/**
280
+ `,de={accessibilityLabel:null,animationDone:!1,animationDuration:300,animationName:"default",buttonCallback:null,buttonText:null,customClasses:null,duration:4e3,hideCallback:null,title:"Title is required",message:"Snackbar: It's a snackbar!",linkMessage:null,targetLink:"_parent",showCallback:null,size:"normal",type:"auto",variant:"default"},pe=["default","slide-in","zoom"],ue=["small","normal","large"],me=["auto","dismiss"],be=["default","success","error","warning","info"],Rt={accessibilityLabel:i=>!i||typeof i=="string",animationDuration:i=>!i||typeof i=="number",animationName:i=>!i||typeof i=="string"&&pe.includes(i),buttonCallback:i=>!i||typeof i=="function",buttonText:i=>!i||typeof i=="string",customClasses:i=>!i||typeof i=="string",duration:i=>!i||typeof i=="number"&&!Number.isNaN(i),hideCallback:i=>!i||typeof i=="function",title:i=>!i||typeof i=="string"&&i.length>0,message:i=>!i||typeof i=="string"&&i.length>0,linkMessage:i=>!i||typeof i=="string"&&i.length>0,targetLink:i=>!i||typeof i=="string"&&i.length>0,showCallback:i=>!i||typeof i=="function",size:i=>!i||typeof i=="string"&&ue.includes(i),type:i=>!i||typeof i=="string"&&me.includes(i),variant:i=>!i||typeof i=="string"&&be.includes(i)};function ve(i){return Object.keys(Rt).filter(t=>!Rt[t](i[t])).map(t=>new Error(`${t} is invalid.`))}/**
275
281
  * @license
276
282
  * Copyright 2020 Google LLC
277
283
  * SPDX-License-Identifier: BSD-3-Clause
278
- */const Zt=Symbol.for(""),Jt=i=>{if(i?.r===Zt)return i?._$litStatic$},ft=new Map,Yt=i=>(t,...e)=>{const s=e.length;let n,a;const o=[],h=[];let r,c=0,u=!1;for(;c<s;){for(r=t[c];c<s&&(a=e[c],(n=Jt(a))!==void 0);)r+=n+t[++c],u=!0;h.push(a),o.push(r),c++}if(c===s&&o.push(t[s]),u){const l=o.join("$$lit$$");(t=ft.get(l))===void 0&&(o.raw=o,ft.set(l,t=o)),e=h}return i(t,...e)},H=Yt(O),gt={default:{showAnimation:[{opacity:"0"},{opacity:"1"}],hideAnimation:[{opacity:"1"},{opacity:"0"}]},"slide-in":{showAnimation:[{transform:"translateX(-100%)",opacity:"0"},{transform:"translateX(0)",opacity:"1"}],hideAnimation:[{transform:"translateX(0)",opacity:"1"},{transform:"translateX(-100%)",opacity:"0"}]},zoom:{showAnimation:[{transform:"scale(0)",opacity:"0"},{transform:"scale(1)",opacity:"1"}],hideAnimation:[{transform:"scale(1)",opacity:"1"},{transform:"scale(0)",opacity:"0"}]}};function Qt({type:i,variant:t}){const s={default:{title:"body2",text:"footnote2"},autoClose:{title:"body1",text:"body1"}}[i==="auto"?"autoClose":"default"],a={success:"flat-success",error:"flat-error",warning:"flat-alert",info:"flat-info"}[t];return{textVariants:s,icon:a}}class te extends f{static get styles(){return k`${Bt}`}render(){const{message:t,title:e,linkMessage:s,type:n,targetLink:a,variant:o}=this,{textVariants:h,icon:r}=Qt({type:n,variant:o}),c=H`<cas-text variant=${h.text}>${t}</cas-text>`,u=H`<cas-text variant=${h.text}><a href="${s}" target="${a}">${t}</a></cas-text>`;return H`
284
+ */const fe=Symbol.for(""),$e=i=>{if(i?.r===fe)return i?._$litStatic$},Tt=new Map,ge=i=>(t,...e)=>{const s=e.length;let n,o;const a=[],l=[];let r,c=0,h=!1;for(;c<s;){for(r=t[c];c<s&&(o=e[c],(n=$e(o))!==void 0);)r+=n+t[++c],h=!0;c!==s&&l.push(o),a.push(r),c++}if(c===s&&a.push(t[s]),h){const d=a.join("$$lit$$");(t=Tt.get(d))===void 0&&(a.raw=a,Tt.set(d,t=a)),e=l}return i(t,...e)},z=ge(R),Nt={default:{showAnimation:[{opacity:"0"},{opacity:"1"}],hideAnimation:[{opacity:"1"},{opacity:"0"}]},"slide-in":{showAnimation:[{transform:"translateX(-100%)",opacity:"0"},{transform:"translateX(0)",opacity:"1"}],hideAnimation:[{transform:"translateX(0)",opacity:"1"},{transform:"translateX(-100%)",opacity:"0"}]},zoom:{showAnimation:[{transform:"scale(0)",opacity:"0"},{transform:"scale(1)",opacity:"1"}],hideAnimation:[{transform:"scale(1)",opacity:"1"},{transform:"scale(0)",opacity:"0"}]}};function ye({type:i,variant:t}){const s={default:{title:"body2",text:"footnote2"},autoClose:{title:"body1",text:"body1"}}[i==="auto"?"autoClose":"default"],o={success:"flat-success",error:"flat-error",warning:"flat-alert",info:"flat-info"}[t];return{textVariants:s,icon:o}}class _e extends v{static get styles(){return A`${he}`}render(){const{message:t,title:e,linkMessage:s,type:n,targetLink:o,variant:a}=this,{textVariants:l,icon:r}=ye({type:n,variant:a}),c=z`<cas-text variant=${l.text}>${t}</cas-text>`,h=z`<cas-text variant=${l.text}><a href="${s}" target="${o}">${t}</a></cas-text>`;return z`
279
285
  <div class="icon">
280
286
  <cas-icon name=${r} size="24"></cas-icon>
281
287
  </div>
282
288
  <div class="content">
283
289
  <div class="text-container">
284
- <cas-text id="snackbarMessage" variant=${h.title}>${e}</cas-text>
285
- ${s?u:c}
290
+ <cas-text id="snackbarMessage" variant=${l.title}>${e}</cas-text>
291
+ ${s?h:c}
286
292
  </div>
287
- ${n==="dismiss"?H`<div id="snackbarButton" class="close-icon" @click=${this._handleButtonClick}>
293
+ ${n==="dismiss"?z`<div id="snackbarButton" class="close-icon" @click=${this._handleButtonClick}>
288
294
  <cas-icon name="flat-close" size="16"></cas-icon>
289
295
  </div>`:""}
290
296
  </div>
291
- `}static get properties(){return{animationDone:{type:Boolean},animationDuration:{type:Number},animationName:{type:String},buttonCallback:{type:Function},buttonText:{type:String},duration:{type:Number},id:{type:String},title:{type:String},message:{type:String},linkMessage:{type:String},targetLink:{type:String},type:{type:String},variant:{type:String}}}constructor(){super(),this._timer=this._timer.bind(this),this._showStart=Date.now()}connectedCallback(){super.connectedCallback(),(this.type==="auto"||this.type!=="dismiss")&&this._timer(),this.setAttribute("aria-label",this.accessibilityLabel||`Snackbar: ${this.message}`),this.setAttribute("role","alert")}_timer(){Date.now()-this._showStart>=this.duration?(this._fadeOut(),cancelAnimationFrame(this._timer)):requestAnimationFrame(this._timer)}update(t){super.update(t),this.animationDone||this._fadeIn()}_fadeIn(){const t=gt[this.animationName].showAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.showCallback=="function"&&this.showCallback()},this.dispatchEvent(new CustomEvent("cas-snackbar-bar-has-faded-in",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_fadeOut(){const t=gt[this.animationName].hideAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.hideCallback=="function"&&this.hideCallback(),this._removeSnackbar()}}_removeSnackbar(){this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-remove",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_handleButtonClick(){this._fadeOut(),typeof this.buttonCallback=="function"&&this.buttonCallback()}}class ee extends f{static shadowRootOptions={...f.shadowRootOptions,mode:"open"};constructor(){super(),this.position="bottom left"}static properties={position:{type:String}};render(){const{position:t}=this;return O`
297
+ `}static get properties(){return{animationDone:{type:Boolean},animationDuration:{type:Number},animationName:{type:String},buttonCallback:{type:Function},buttonText:{type:String},duration:{type:Number},id:{type:String},title:{type:String},message:{type:String},linkMessage:{type:String},targetLink:{type:String},type:{type:String},variant:{type:String}}}constructor(){super(),this._timer=this._timer.bind(this),this._showStart=Date.now()}connectedCallback(){super.connectedCallback(),(this.type==="auto"||this.type!=="dismiss")&&this._timer(),this.setAttribute("aria-label",this.accessibilityLabel||`Snackbar: ${this.message}`),this.setAttribute("role","alert")}_timer(){Date.now()-this._showStart>=this.duration?(this._fadeOut(),cancelAnimationFrame(this._timer)):requestAnimationFrame(this._timer)}update(t){super.update(t),this.animationDone||this._fadeIn()}_fadeIn(){const t=Nt[this.animationName].showAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.showCallback=="function"&&this.showCallback()},this.dispatchEvent(new CustomEvent("cas-snackbar-bar-has-faded-in",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_fadeOut(){const t=Nt[this.animationName].hideAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.hideCallback=="function"&&this.hideCallback(),this._removeSnackbar()}}_removeSnackbar(){this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-remove",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_handleButtonClick(){this._fadeOut(),typeof this.buttonCallback=="function"&&this.buttonCallback()}}class we extends v{static shadowRootOptions={...v.shadowRootOptions,mode:"open"};constructor(){super(),this.position="bottom left"}static properties={position:{type:String}};render(){const{position:t}=this;return R`
292
298
  <cas-snackbar-provider-custom position=${t}></cas-snackbar-provider-custom>
293
299
  <slot></slot>
294
- `}}class vt extends f{render(){return O``}static get styles(){return k`
295
- ${jt}
296
- `}constructor(){super(),this.newSnackbarProperties=["accessibilityLabel","animationDuration","animationName","buttonCallback","duration","hideCallback","title","message","linkMessage","targetLink","showCallback","type","hasFadedIn"],this.newSnackbarAttributes=["id","size","variant"],window.addEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.addEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-ready",{bubbles:!0,composed:!0})),this.setAttribute("aria-live","polite")}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.removeEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}_handleSnackbarAdd(t){const e=t.detail||{},s=Gt(e);if(s.length>0)for(const{message:n}of s)console.error("There was a problem creating your snackbar. Please check your custom event options.",n);else{const n={id:Date.now(),...Wt,...e},a=this._createNewSnackbar(n);this.shadowRoot.prepend(a),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-added",{bubbles:!0,composed:!0,detail:{snackbarID:a.id}}))}}_handleSnackbarRemove(t){this.shadowRoot.getElementById(t.detail.snackbarID).remove(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-removed",{bubbles:!0,composed:!0,detail:{snackbarID:t.detail.snackbarID}}))}_createNewSnackbar(t){document.querySelector("cas-snackbar-provider")?.setAttribute("position",t.position);const s=document.createElement("cas-snackbar");return this.newSnackbarProperties.forEach(n=>{s[n]=t[n]}),this.newSnackbarAttributes.forEach(n=>{s.setAttribute(n,t[n])}),t.customClasses&&(s.className+=t.customClasses),s}}const L=({variant:i,config:t})=>{const{title:e,message:s,linkMessage:n,targetLink:a,autoHide:o,autoHideDuration:h,position:r}=t;window.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-add",{bubbles:!0,composed:!0,detail:{variant:i,title:e,message:s,linkMessage:n,targetLink:a,position:r||"bottom right",animationName:"slide-in",type:o?"auto":"dismiss",duration:h||4e3}}))},D={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info"},$t={success:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.SUCCESS,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})},error:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.ERROR,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})},warning:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.WARNING,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})},info:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.INFO,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})}};customElements.get("cas-snackbar")||customElements.define("cas-snackbar",te),customElements.get("cas-snackbar-provider-custom")||customElements.define("cas-snackbar-provider-custom",vt),customElements.get("cas-snackbar-provider")||customElements.define("cas-snackbar-provider",ee);class yt extends f{static styles=Pt;constructor(){super(),this.open=!1,this.text=document.title,this.isMobile=window.innerWidth<768,this.shareFacebook=this.shareFacebook.bind(this),this.shareTwitter=this.shareTwitter.bind(this),this.shareWhatsApp=this.shareWhatsApp.bind(this),this.shareTelegram=this.shareTelegram.bind(this),this.shareEmail=this.shareEmail.bind(this),this.shareInstagram=this.shareInstagram.bind(this),this.platforms=[{title:"WhatsApp",icon:"flat-whatsapp",share:this.shareWhatsApp},{title:"Instagram",icon:"flat-instagramSolid",share:this.shareInstagram},{title:"Facebook",icon:"flat-facebook",share:this.shareFacebook},{title:"Twitter",icon:"flat-twitter",share:this.shareTwitter},{title:"Correo",icon:"flat-mail",share:this.shareEmail}]}static get properties(){return{text:{type:String}}}firstUpdated(){this.shadowRoot.querySelector("cas-modal")?.addEventListener("close",()=>{this.open=!1,this.requestUpdate()});const e=()=>{this.isMobile=window.innerWidth<768,this.requestUpdate()};window.addEventListener("resize",e)}render(){const t=this.isMobile?"190px":"initial";return O`
300
+ `}}class Mt extends v{render(){return R``}static get styles(){return A`
301
+ ${le}
302
+ `}constructor(){super(),this.newSnackbarProperties=["accessibilityLabel","animationDuration","animationName","buttonCallback","duration","hideCallback","title","message","linkMessage","targetLink","showCallback","type","hasFadedIn"],this.newSnackbarAttributes=["id","size","variant"],window.addEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.addEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-ready",{bubbles:!0,composed:!0})),this.setAttribute("aria-live","polite")}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.removeEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}_handleSnackbarAdd(t){const e=t.detail||{},s=ve(e);if(s.length>0)for(const{message:n}of s)console.error("There was a problem creating your snackbar. Please check your custom event options.",n);else{const n={id:Date.now(),...de,...e},o=this._createNewSnackbar(n);this.shadowRoot.prepend(o),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-added",{bubbles:!0,composed:!0,detail:{snackbarID:o.id}}))}}_handleSnackbarRemove(t){this.shadowRoot.getElementById(t.detail.snackbarID).remove(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-removed",{bubbles:!0,composed:!0,detail:{snackbarID:t.detail.snackbarID}}))}_createNewSnackbar(t){document.querySelector("cas-snackbar-provider")?.setAttribute("position",t.position);const s=document.createElement("cas-snackbar");return this.newSnackbarProperties.forEach(n=>{s[n]=t[n]}),this.newSnackbarAttributes.forEach(n=>{s.setAttribute(n,t[n])}),t.customClasses&&(s.className+=t.customClasses),s}}const j=({variant:i,config:t})=>{const{title:e,message:s,linkMessage:n,targetLink:o,autoHide:a,autoHideDuration:l,position:r}=t;window.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-add",{bubbles:!0,composed:!0,detail:{variant:i,title:e,message:s,linkMessage:n,targetLink:o,position:r||"bottom right",animationName:"slide-in",type:a?"auto":"dismiss",duration:l||4e3}}))},B={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info"},Lt={success:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a})=>{j({variant:B.SUCCESS,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a}})},error:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a})=>{j({variant:B.ERROR,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a}})},warning:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a})=>{j({variant:B.WARNING,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a}})},info:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a})=>{j({variant:B.INFO,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:a}})}};customElements.get("cas-snackbar")||customElements.define("cas-snackbar",_e),customElements.get("cas-snackbar-provider-custom")||customElements.define("cas-snackbar-provider-custom",Mt),customElements.get("cas-snackbar-provider")||customElements.define("cas-snackbar-provider",we);class It extends v{static styles=ee;constructor(){super(),this.open=!1,this.text=document.title,this.isMobile=window.innerWidth<768,this.shareFacebook=this.shareFacebook.bind(this),this.shareTwitter=this.shareTwitter.bind(this),this.shareWhatsApp=this.shareWhatsApp.bind(this),this.shareTelegram=this.shareTelegram.bind(this),this.shareEmail=this.shareEmail.bind(this),this.shareInstagram=this.shareInstagram.bind(this),this.platforms=[{title:"WhatsApp",icon:"flat-whatsapp",share:this.shareWhatsApp},{title:"Instagram",icon:"flat-instagramSolid",share:this.shareInstagram},{title:"Facebook",icon:"flat-facebook",share:this.shareFacebook},{title:"Twitter",icon:"flat-twitter",share:this.shareTwitter},{title:"Correo",icon:"flat-mail",share:this.shareEmail}]}static get properties(){return{text:{type:String}}}firstUpdated(){this.shadowRoot.querySelector("cas-modal")?.addEventListener("close",()=>{this.open=!1,this.requestUpdate()});const e=()=>{this.isMobile=window.innerWidth<768,this.requestUpdate()};window.addEventListener("resize",e)}render(){const t=this.isMobile?"190px":"initial";return R`
297
303
  <cas-modal variant="compact" open="${this.open}" width=${t}>
298
304
  <div class="modal">
299
305
  <cas-text variant="headline3" class="hide-mobile">Compartir en:</cas-text>
300
306
  <div class="list">
301
- ${this.platforms.map(({title:e,icon:s,share:n})=>O` <button class="item" @click="${()=>n()}">
307
+ ${this.platforms.map(({title:e,icon:s,share:n})=>R` <button class="item" @click="${()=>n()}">
302
308
  <div class="icon">
303
309
  <cas-icon name="${s}" size="24"></cas-icon>
304
310
  </div>
@@ -325,4 +331,4 @@
325
331
  <button @click="${this.handleOpenShare}" class="share-icon">
326
332
  <cas-icon name="flat-share" size="20"></cas-icon>
327
333
  </button>
328
- `}handleOpenShare(){this.open=!0,this.requestUpdate();try{window.dataLayer.push({event:"evento-interactivo","evento-interactivo-categoria":"boton_compartir_blog","evento-interactivo-accion":"click","evento-interactivo-etiqueta":"compartir_articulo"})}catch(t){console.error("Error al enviar evento a GTM",t)}}shareFacebook(){const t=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(window.location.href)}`;window.open(t,"_blank","width=550,height=420")}shareTwitter(){const t=`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${this.text} ${window.location.href}`)}`;window.open(t,"_blank","width=550,height=420")}shareWhatsApp(){const t=`https://wa.me/?text=${encodeURIComponent(`${this.text} ${window.location.href}`)}`;window.open(t,"_blank","width=550,height=420")}shareTelegram(){const t=`https://t.me/share/url?text=${encodeURIComponent(`${this.text} ${window.location.href}`)}`;window.open(t,"_blank","width=550,height=420")}shareEmail(){const t=`mailto:?subject=${encodeURIComponent(this.text)}&body=${encodeURIComponent(window.location.href)}`;window.open(t,"_blank")}shareInstagram(){this.copyToClipboard(),window.open("https://www.instagram.com/direct/inbox/","_blank")}copyToClipboard(){navigator.clipboard.writeText(window.location.href),$t.success({title:"Enlace copiado al portapapeles",position:"top center",autoHide:!0,autoHideDuration:1600})}}customElements.define("cas-share",yt),g.CasShare=yt,g.CasSnackbarProvider=vt,g.snackbar=$t,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
334
+ `}handleOpenShare(){this.open=!0,this.requestUpdate();try{window.dataLayer.push({event:"evento-interactivo","evento-interactivo-categoria":"boton_compartir_blog","evento-interactivo-accion":"click","evento-interactivo-etiqueta":"compartir_articulo"})}catch(t){console.error("Error al enviar evento a GTM",t)}}shareFacebook(){const t=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(window.location.href)}`;window.open(t,"_blank","width=550,height=420")}shareTwitter(){const t=`https://twitter.com/intent/tweet?text=${encodeURIComponent(`${this.text} ${window.location.href}`)}`;window.open(t,"_blank","width=550,height=420")}shareWhatsApp(){const t=`https://wa.me/?text=${encodeURIComponent(`${this.text} ${window.location.href}`)}`;window.open(t,"_blank","width=550,height=420")}shareTelegram(){const t=`https://t.me/share/url?text=${encodeURIComponent(`${this.text} ${window.location.href}`)}`;window.open(t,"_blank","width=550,height=420")}shareEmail(){const t=`mailto:?subject=${encodeURIComponent(this.text)}&body=${encodeURIComponent(window.location.href)}`;window.open(t,"_blank")}shareInstagram(){this.copyToClipboard(),window.open("https://www.instagram.com/direct/inbox/","_blank")}copyToClipboard(){navigator.clipboard.writeText(window.location.href),Lt.success({title:"Enlace copiado al portapapeles",position:"top center",autoHide:!0,autoHideDuration:1600})}}customElements.define("cas-share",It),f.CasShare=It,f.CasSnackbarProvider=Mt,f.snackbar=Lt,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,24 +1,30 @@
1
- (function($,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):($=typeof globalThis<"u"?globalThis:$||self,f($["cas-snackbar"]={}))})(this,function($){"use strict";/**
1
+ (function(g,v){typeof exports=="object"&&typeof module<"u"?v(exports):typeof define=="function"&&define.amd?define(["exports"],v):(g=typeof globalThis<"u"?globalThis:g||self,v(g["cas-snackbar"]={}))})(this,function(g){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const f=window,B=f.ShadowRoot&&(f.ShadyCSS===void 0||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,j=Symbol(),G=new WeakMap;class J{constructor(t,e,s){if(this._$cssResult$=!0,s!==j)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=G.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&G.set(e,t))}return t}toString(){return this.cssText}}const m=i=>new J(typeof i=="string"?i:i+"",void 0,j),C=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,n,a)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[a+1],i[0]);return new J(e,i,j)},$t=(i,t)=>{B?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),n=f.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},Y=B?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return m(e)})(i):i;/**
5
+ */const v=window,V=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),at=new WeakMap;class Lt{constructor(t,e,s){if(this._$cssResult$=!0,s!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(V&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=at.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&at.set(e,t))}return t}toString(){return this.cssText}}const Dt=i=>new Lt(typeof i=="string"?i:i+"",void 0,rt),Ht=(i,t)=>{V?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),n=v.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},ct=V?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Dt(e)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var F;const R=window,Q=R.trustedTypes,yt=Q?Q.emptyScript:"",tt=R.reactiveElementPolyfillSupport,V={toAttribute(i,t){switch(t){case Boolean:i=i?yt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},et=(i,t)=>t!==i&&(t==t||i==i),W={attribute:!0,type:String,converter:V,reflect:!1,hasChanged:et};class _ extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=W){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const a=this[t];this[e]=n,this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||W}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(Y(n))}else t!==void 0&&e.push(Y(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return $t(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=W){var n;const a=this.constructor._$Ep(t,s);if(a!==void 0&&s.reflect===!0){const o=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:V).toAttribute(e,s.type);this._$El=t,o==null?this.removeAttribute(a):this.setAttribute(a,o),this._$El=null}}_$AK(t,e){var s;const n=this.constructor,a=n._$Ev.get(t);if(a!==void 0&&this._$El!==a){const o=n.getPropertyOptions(a),h=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:V;this._$El=a,this[a]=h.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||et)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,a)=>this[a]=n),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var a;return(a=n.hostUpdate)===null||a===void 0?void 0:a.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}_.finalized=!0,_.elementProperties=new Map,_.elementStyles=[],_.shadowRootOptions={mode:"open"},tt?.({ReactiveElement:_}),((F=R.reactiveElementVersions)!==null&&F!==void 0?F:R.reactiveElementVersions=[]).push("1.4.2");/**
9
+ */var F;const T=window,lt=T.trustedTypes,It=lt?lt.emptyScript:"",ht=T.reactiveElementPolyfillSupport,W={toAttribute(i,t){switch(t){case Boolean:i=i?It:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},dt=(i,t)=>t!==i&&(t==t||i==i),q={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:dt},K="finalized";class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||q}static finalize(){if(this.hasOwnProperty(K))return!1;this[K]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(ct(n))}else t!==void 0&&e.push(ct(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Ht(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=q){var n;const o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===!0){const r=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:W).toAttribute(e,s.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var s;const n=this.constructor,o=n._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=n.getPropertyOptions(o),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((s=r.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?r.converter:W;this._$El=o,this[o]=l.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||dt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,o)=>this[o]=n),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var o;return(o=n.hostUpdate)===null||o===void 0?void 0:o.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}C[K]=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},ht?.({ReactiveElement:C}),((F=T.reactiveElementVersions)!==null&&F!==void 0?F:T.reactiveElementVersions=[]).push("1.6.3");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var q;const M=window,k=M.trustedTypes,st=k?k.createPolicy("lit-html",{createHTML:i=>i}):void 0,g=`lit$${(Math.random()+"").slice(9)}$`,it="?"+g,_t=`<${it}>`,A=document,x=(i="")=>A.createComment(i),N=i=>i===null||typeof i!="object"&&typeof i!="function",nt=Array.isArray,kt=i=>nt(i)||typeof i?.[Symbol.iterator]=="function",O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ot=/-->/g,at=/>/g,y=RegExp(`>|[
14
- \f\r](?:([^\\s"'>=/]+)([
15
- \f\r]*=[
16
- \f\r]*(?:[^
17
- \f\r"'\`<>=]|("|')|))|$)`,"g"),rt=/'/g,ct=/"/g,lt=/^(?:script|style|textarea|title)$/i,At=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),X=At(1),S=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),ht=new WeakMap,w=A.createTreeWalker(A,129,null,!1),St=(i,t)=>{const e=i.length-1,s=[];let n,a=t===2?"<svg>":"",o=O;for(let r=0;r<e;r++){const c=i[r];let p,l,d=-1,b=0;for(;b<c.length&&(o.lastIndex=b,l=o.exec(c),l!==null);)b=o.lastIndex,o===O?l[1]==="!--"?o=ot:l[1]!==void 0?o=at:l[2]!==void 0?(lt.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=y):l[3]!==void 0&&(o=y):o===y?l[0]===">"?(o=n??O,d=-1):l[1]===void 0?d=-2:(d=o.lastIndex-l[2].length,p=l[1],o=l[3]===void 0?y:l[3]==='"'?ct:rt):o===ct||o===rt?o=y:o===ot||o===at?o=O:(o=y,n=void 0);const I=o===y&&i[r+1].startsWith("/>")?" ":"";a+=o===O?c+_t:d>=0?(s.push(p),c.slice(0,d)+"$lit$"+c.slice(d)+g+I):c+g+(d===-2?(s.push(void 0),r):I)}const h=a+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[st!==void 0?st.createHTML(h):h,s]};class P{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let a=0,o=0;const h=t.length-1,r=this.parts,[c,p]=St(t,e);if(this.el=P.createElement(c,s),w.currentNode=this.el.content,e===2){const l=this.el.content,d=l.firstChild;d.remove(),l.append(...d.childNodes)}for(;(n=w.nextNode())!==null&&r.length<h;){if(n.nodeType===1){if(n.hasAttributes()){const l=[];for(const d of n.getAttributeNames())if(d.endsWith("$lit$")||d.startsWith(g)){const b=p[o++];if(l.push(d),b!==void 0){const I=n.getAttribute(b.toLowerCase()+"$lit$").split(g),z=/([.?@])?(.*)/.exec(b);r.push({type:1,index:a,name:z[2],strings:I,ctor:z[1]==="."?Et:z[1]==="?"?xt:z[1]==="@"?Nt:U})}else r.push({type:6,index:a})}for(const d of l)n.removeAttribute(d)}if(lt.test(n.tagName)){const l=n.textContent.split(g),d=l.length-1;if(d>0){n.textContent=k?k.emptyScript:"";for(let b=0;b<d;b++)n.append(l[b],x()),w.nextNode(),r.push({type:2,index:++a});n.append(l[d],x())}}}else if(n.nodeType===8)if(n.data===it)r.push({type:2,index:a});else{let l=-1;for(;(l=n.data.indexOf(g,l+1))!==-1;)r.push({type:7,index:a}),l+=g.length-1}a++}}static createElement(t,e){const s=A.createElement("template");return s.innerHTML=t,s}}function E(i,t,e=i,s){var n,a,o,h;if(t===S)return t;let r=s!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[s]:e._$Cl;const c=N(t)?void 0:t._$litDirective$;return r?.constructor!==c&&((a=r?._$AO)===null||a===void 0||a.call(r,!1),c===void 0?r=void 0:(r=new c(i),r._$AT(i,e,s)),s!==void 0?((o=(h=e)._$Co)!==null&&o!==void 0?o:h._$Co=[])[s]=r:e._$Cl=r),r!==void 0&&(t=E(i,r._$AS(i,t.values),r,s)),t}class wt{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:s},parts:n}=this._$AD,a=((e=t?.creationScope)!==null&&e!==void 0?e:A).importNode(s,!0);w.currentNode=a;let o=w.nextNode(),h=0,r=0,c=n[0];for(;c!==void 0;){if(h===c.index){let p;c.type===2?p=new T(o,o.nextSibling,this,t):c.type===1?p=new c.ctor(o,c.name,c.strings,this,t):c.type===6&&(p=new Ot(o,this,t)),this.u.push(p),c=n[++r]}h!==c?.index&&(o=w.nextNode(),h++)}return a}p(t){let e=0;for(const s of this.u)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class T{constructor(t,e,s,n){var a;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cm=(a=n?.isConnected)===null||a===void 0||a}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cm}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),N(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==S&&this.g(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):kt(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==u&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){var e;const{values:s,_$litType$:n}=t,a=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=P.createElement(n.h,this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===a)this._$AH.p(s);else{const o=new wt(a,this),h=o.v(this.options);o.p(s),this.T(h),this._$AH=o}}_$AC(t){let e=ht.get(t.strings);return e===void 0&&ht.set(t.strings,e=new P(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const a of t)n===e.length?e.push(s=new T(this.O(x()),this.O(x()),this,this.options)):s=e[n],s._$AI(a),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cm=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class U{constructor(t,e,s,n,a){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=a,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,n){const a=this.strings;let o=!1;if(a===void 0)t=E(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==S,o&&(this._$AH=t);else{const h=t;let r,c;for(t=a[0],r=0;r<a.length-1;r++)c=E(this,h[s+r],e,r),c===S&&(c=this._$AH[r]),o||(o=!N(c)||c!==this._$AH[r]),c===u?t=u:t!==u&&(t+=(c??"")+a[r+1]),this._$AH[r]=c}o&&!n&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Et extends U{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}const Ct=k?k.emptyScript:"";class xt extends U{constructor(){super(...arguments),this.type=4}j(t){t&&t!==u?this.element.setAttribute(this.name,Ct):this.element.removeAttribute(this.name)}}class Nt extends U{constructor(t,e,s,n,a){super(t,e,s,n,a),this.type=5}_$AI(t,e=this){var s;if((t=(s=E(this,t,e,0))!==null&&s!==void 0?s:u)===S)return;const n=this._$AH,a=t===u&&n!==u||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==u&&(n===u||a);a&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Ot{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const dt=M.litHtmlPolyfillSupport;dt?.(P,T),((q=M.litHtmlVersions)!==null&&q!==void 0?q:M.litHtmlVersions=[]).push("2.4.0");const Pt=(i,t,e)=>{var s,n;const a=(s=e?.renderBefore)!==null&&s!==void 0?s:t;let o=a._$litPart$;if(o===void 0){const h=(n=e?.renderBefore)!==null&&n!==void 0?n:null;a._$litPart$=o=new T(t.insertBefore(x(),h),h,void 0,e??{})}return o._$AI(i),o};/**
13
+ */var X;const M=window,k=M.trustedTypes,ut=k?k.createPolicy("lit-html",{createHTML:i=>i}):void 0,J="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,pt="?"+$,zt=`<${pt}>`,_=document,x=()=>_.createComment(""),P=i=>i===null||typeof i!="object"&&typeof i!="function",mt=Array.isArray,jt=i=>mt(i)||typeof i?.[Symbol.iterator]=="function",Z=`[
14
+ \f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,bt=/-->/g,vt=/>/g,y=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),$t=/'/g,ft=/"/g,gt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),G=Bt(1),A=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),_t=new WeakMap,S=_.createTreeWalker(_,129,null,!1);function yt(i,t){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(t):t}const Vt=(i,t)=>{const e=i.length-1,s=[];let n,o=t===2?"<svg>":"",r=U;for(let l=0;l<e;l++){const a=i[l];let c,h,d=-1,p=0;for(;p<a.length&&(r.lastIndex=p,h=r.exec(a),h!==null);)p=r.lastIndex,r===U?h[1]==="!--"?r=bt:h[1]!==void 0?r=vt:h[2]!==void 0?(gt.test(h[2])&&(n=RegExp("</"+h[2],"g")),r=y):h[3]!==void 0&&(r=y):r===y?h[0]===">"?(r=n??U,d=-1):h[1]===void 0?d=-2:(d=r.lastIndex-h[2].length,c=h[1],r=h[3]===void 0?y:h[3]==='"'?ft:$t):r===ft||r===$t?r=y:r===bt||r===vt?r=U:(r=y,n=void 0);const b=r===y&&i[l+1].startsWith("/>")?" ":"";o+=r===U?a+zt:d>=0?(s.push(c),a.slice(0,d)+J+a.slice(d)+$+b):a+$+(d===-2?(s.push(void 0),l):b)}return[yt(i,o+(i[e]||"<?>")+(t===2?"</svg>":"")),s]};class O{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let o=0,r=0;const l=t.length-1,a=this.parts,[c,h]=Vt(t,e);if(this.el=O.createElement(c,s),S.currentNode=this.el.content,e===2){const d=this.el.content,p=d.firstChild;p.remove(),d.append(...p.childNodes)}for(;(n=S.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes()){const d=[];for(const p of n.getAttributeNames())if(p.endsWith(J)||p.startsWith($)){const b=h[r++];if(d.push(p),b!==void 0){const ye=n.getAttribute(b.toLowerCase()+J).split($),B=/([.?@])?(.*)/.exec(b);a.push({type:1,index:o,name:B[2],strings:ye,ctor:B[1]==="."?Wt:B[1]==="?"?Kt:B[1]==="@"?Xt:L})}else a.push({type:6,index:o})}for(const p of d)n.removeAttribute(p)}if(gt.test(n.tagName)){const d=n.textContent.split($),p=d.length-1;if(p>0){n.textContent=k?k.emptyScript:"";for(let b=0;b<p;b++)n.append(d[b],x()),S.nextNode(),a.push({type:2,index:++o});n.append(d[p],x())}}}else if(n.nodeType===8)if(n.data===pt)a.push({type:2,index:o});else{let d=-1;for(;(d=n.data.indexOf($,d+1))!==-1;)a.push({type:7,index:o}),d+=$.length-1}o++}}static createElement(t,e){const s=_.createElement("template");return s.innerHTML=t,s}}function E(i,t,e=i,s){var n,o,r,l;if(t===A)return t;let a=s!==void 0?(n=e._$Co)===null||n===void 0?void 0:n[s]:e._$Cl;const c=P(t)?void 0:t._$litDirective$;return a?.constructor!==c&&((o=a?._$AO)===null||o===void 0||o.call(a,!1),c===void 0?a=void 0:(a=new c(i),a._$AT(i,e,s)),s!==void 0?((r=(l=e)._$Co)!==null&&r!==void 0?r:l._$Co=[])[s]=a:e._$Cl=a),a!==void 0&&(t=E(i,a._$AS(i,t.values),a,s)),t}class Ft{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 e;const{el:{content:s},parts:n}=this._$AD,o=((e=t?.creationScope)!==null&&e!==void 0?e:_).importNode(s,!0);S.currentNode=o;let r=S.nextNode(),l=0,a=0,c=n[0];for(;c!==void 0;){if(l===c.index){let h;c.type===2?h=new N(r,r.nextSibling,this,t):c.type===1?h=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(h=new Jt(r,this,t)),this._$AV.push(h),c=n[++a]}l!==c?.index&&(r=S.nextNode(),l++)}return S.currentNode=_,o}v(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class N{constructor(t,e,s,n){var o;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cp=(o=n?.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),P(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):jt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==u&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=O.createElement(yt(n.h,n.h[0]),this.options)),n);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(s);else{const r=new Ft(o,this),l=r.u(this.options);r.v(s),this.$(l),this._$AH=r}}_$AC(t){let e=_t.get(t.strings);return e===void 0&&_t.set(t.strings,e=new O(t)),e}T(t){mt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const o of t)n===e.length?e.push(s=new N(this.k(x()),this.k(x()),this,this.options)):s=e[n],s._$AI(o),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class L{constructor(t,e,s,n,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,n){const o=this.strings;let r=!1;if(o===void 0)t=E(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==A,r&&(this._$AH=t);else{const l=t;let a,c;for(t=o[0],a=0;a<o.length-1;a++)c=E(this,l[s+a],e,a),c===A&&(c=this._$AH[a]),r||(r=!P(c)||c!==this._$AH[a]),c===u?t=u:t!==u&&(t+=(c??"")+o[a+1]),this._$AH[a]=c}r&&!n&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Wt extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}const qt=k?k.emptyScript:"";class Kt extends L{constructor(){super(...arguments),this.type=4}j(t){t&&t!==u?this.element.setAttribute(this.name,qt):this.element.removeAttribute(this.name)}}class Xt extends L{constructor(t,e,s,n,o){super(t,e,s,n,o),this.type=5}_$AI(t,e=this){var s;if((t=(s=E(this,t,e,0))!==null&&s!==void 0?s:u)===A)return;const n=this._$AH,o=t===u&&n!==u||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==u&&(n===u||o);o&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Jt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const St=M.litHtmlPolyfillSupport;St?.(O,N),((X=M.litHtmlVersions)!==null&&X!==void 0?X:M.litHtmlVersions=[]).push("2.8.0");const Zt=(i,t,e)=>{var s,n;const o=(s=e?.renderBefore)!==null&&s!==void 0?s:t;let r=o._$litPart$;if(r===void 0){const l=(n=e?.renderBefore)!==null&&n!==void 0?n:null;o._$litPart$=r=new N(t.insertBefore(x(),l),l,void 0,e??{})}return r._$AI(i),r};/**
16
+ * @license
17
+ * Copyright 2019 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */const D=window,Y=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Q=Symbol(),kt=new WeakMap;class At{constructor(t,e,s){if(this._$cssResult$=!0,s!==Q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Y&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&kt.set(e,t))}return t}toString(){return this.cssText}}const m=i=>new At(typeof i=="string"?i:i+"",void 0,Q),R=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,n,o)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[o+1],i[0]);return new At(e,i,Q)},Gt=(i,t)=>{Y?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),n=D.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,i.appendChild(s)})},Et=Y?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return m(e)})(i):i;/**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */var tt;const H=window,wt=H.trustedTypes,Yt=wt?wt.emptyScript:"",Ct=H.reactiveElementPolyfillSupport,et={toAttribute(i,t){switch(t){case Boolean:i=i?Yt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},xt=(i,t)=>t!==i&&(t==t||i==i),st={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:xt},it="finalized";class w extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const n=this._$Ep(s,e);n!==void 0&&(this._$Ev.set(n,s),t.push(n))}),t}static createProperty(t,e=st){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(n){const o=this[t];this[e]=n,this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||st}static finalize(){if(this.hasOwnProperty(it))return!1;this[it]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const n of s)this.createProperty(n,e[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(Et(n))}else t!==void 0&&e.push(Et(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Gt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=st){var n;const o=this.constructor._$Ep(t,s);if(o!==void 0&&s.reflect===!0){const r=(((n=s.converter)===null||n===void 0?void 0:n.toAttribute)!==void 0?s.converter:et).toAttribute(e,s.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var s;const n=this.constructor,o=n._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=n.getPropertyOptions(o),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((s=r.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?r.converter:et;this._$El=o,this[o]=l.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,s){let n=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||xt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((n,o)=>this[o]=n),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(n=>{var o;return(o=n.hostUpdate)===null||o===void 0?void 0:o.call(n)}),this.update(s)):this._$Ek()}catch(n){throw e=!1,this._$Ek(),n}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var n;return(n=s.hostUpdated)===null||n===void 0?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}w[it]=!0,w.elementProperties=new Map,w.elementStyles=[],w.shadowRootOptions={mode:"open"},Ct?.({ReactiveElement:w}),((tt=H.reactiveElementVersions)!==null&&tt!==void 0?tt:H.reactiveElementVersions=[]).push("1.6.3");/**
18
24
  * @license
19
25
  * Copyright 2017 Google LLC
20
26
  * SPDX-License-Identifier: BSD-3-Clause
21
- */var K,Z;class v extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return S}}v.finalized=!0,v._$litElement$=!0,(K=globalThis.litElementHydrateSupport)===null||K===void 0||K.call(globalThis,{LitElement:v});const ut=globalThis.litElementPolyfillSupport;ut?.({LitElement:v}),((Z=globalThis.litElementVersions)!==null&&Z!==void 0?Z:globalThis.litElementVersions=[]).push("3.2.2");const Tt=C`
27
+ */var nt,ot;class f extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Zt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return A}}f.finalized=!0,f._$litElement$=!0,(nt=globalThis.litElementHydrateSupport)===null||nt===void 0||nt.call(globalThis,{LitElement:f});const Pt=globalThis.litElementPolyfillSupport;Pt?.({LitElement:f}),((ot=globalThis.litElementVersions)!==null&&ot!==void 0?ot:globalThis.litElementVersions=[]).push("3.3.3");const Qt=R`
22
28
  :host {
23
29
  /* Colors: */
24
30
  --cas-snackbar-color-bg: rgb(53, 53, 53);
@@ -47,8 +53,8 @@
47
53
  --cas-snackbar-grid-gap: 1rem;
48
54
  --cas-snackbar-box-shadow: none;
49
55
  }
50
- `,Rt="#01736C",Mt="#5143D5",Ut="#364855",pt="#4D5D68",mt="#FFFFFF",Ht="#E53935",Lt="#FFB300",Dt="#7CB342",It=C`
51
- ${Tt}
56
+ `,te="#01736C",ee="#5143D5",se="#364855",Ut="#4D5D68",Ot="#FFFFFF",ie="#E53935",ne="#FFB300",oe="#7CB342",re=R`
57
+ ${Qt}
52
58
  :host,
53
59
  :host([position="bottom left"]) {
54
60
  width: fit-content;
@@ -116,10 +122,10 @@
116
122
  margin-left: auto;
117
123
  margin-right: auto;
118
124
  }
119
- `,zt=C`
125
+ `,ae=R`
120
126
  :host {
121
127
  display: flex;
122
- background: ${m(mt)};
128
+ background: ${m(Ot)};
123
129
  box-shadow: 0 2px 10px #C9CFE3;
124
130
  border-radius: 8px;
125
131
  width: var(--cas-snackbar-width);
@@ -132,8 +138,8 @@
132
138
  align-items: center;
133
139
  justify-content: center;
134
140
  padding: 14px 12px;
135
- background-color: ${m(pt)};
136
- color: ${m(mt)};
141
+ background-color: ${m(Ut)};
142
+ color: ${m(Ot)};
137
143
  border-radius: 8px 0 0 8px;
138
144
  }
139
145
  :host .content {
@@ -142,48 +148,48 @@
142
148
  align-items: center;
143
149
  justify-content: space-between;
144
150
  gap:12px;
145
- color: ${m(Ut)};
151
+ color: ${m(se)};
146
152
  padding: 14px 16px 14px 24px;
147
153
  }
148
154
  :host .content .text-container cas-text:nth-child(2) {
149
- color: ${m(pt)};
155
+ color: ${m(Ut)};
150
156
  }
151
157
  :host .content .text-container a {
152
- color: ${m(Rt)};
158
+ color: ${m(te)};
153
159
  }
154
160
  /* VARIANTS*/
155
161
  :host([variant='success']) .icon {
156
- background-color: ${m(Dt)};
162
+ background-color: ${m(oe)};
157
163
  }
158
164
  :host([variant='error']) .icon {
159
- background-color: ${m(Ht)};
165
+ background-color: ${m(ie)};
160
166
  }
161
167
  :host([variant='warning']) .icon {
162
- background-color: ${m(Lt)};
168
+ background-color: ${m(ne)};
163
169
  }
164
170
  :host([variant='info']) .icon {
165
- background-color: ${m(Mt)};
171
+ background-color: ${m(ee)};
166
172
  }
167
- `,Bt={accessibilityLabel:null,animationDone:!1,animationDuration:300,animationName:"default",buttonCallback:null,buttonText:null,customClasses:null,duration:4e3,hideCallback:null,title:"Title is required",message:"Snackbar: It's a snackbar!",linkMessage:null,targetLink:"_parent",showCallback:null,size:"normal",type:"auto",variant:"default"},jt=["default","slide-in","zoom"],Ft=["small","normal","large"],Vt=["auto","dismiss"],Wt=["default","success","error","warning","info"],bt={accessibilityLabel:i=>!i||typeof i=="string",animationDuration:i=>!i||typeof i=="number",animationName:i=>!i||typeof i=="string"&&jt.includes(i),buttonCallback:i=>!i||typeof i=="function",buttonText:i=>!i||typeof i=="string",customClasses:i=>!i||typeof i=="string",duration:i=>!i||typeof i=="number"&&!Number.isNaN(i),hideCallback:i=>!i||typeof i=="function",title:i=>!i||typeof i=="string"&&i.length>0,message:i=>!i||typeof i=="string"&&i.length>0,linkMessage:i=>!i||typeof i=="string"&&i.length>0,targetLink:i=>!i||typeof i=="string"&&i.length>0,showCallback:i=>!i||typeof i=="function",size:i=>!i||typeof i=="string"&&Ft.includes(i),type:i=>!i||typeof i=="string"&&Vt.includes(i),variant:i=>!i||typeof i=="string"&&Wt.includes(i)};function qt(i){return Object.keys(bt).filter(t=>!bt[t](i[t])).map(t=>new Error(`${t} is invalid.`))}/**
173
+ `,ce={accessibilityLabel:null,animationDone:!1,animationDuration:300,animationName:"default",buttonCallback:null,buttonText:null,customClasses:null,duration:4e3,hideCallback:null,title:"Title is required",message:"Snackbar: It's a snackbar!",linkMessage:null,targetLink:"_parent",showCallback:null,size:"normal",type:"auto",variant:"default"},le=["default","slide-in","zoom"],he=["small","normal","large"],de=["auto","dismiss"],ue=["default","success","error","warning","info"],Nt={accessibilityLabel:i=>!i||typeof i=="string",animationDuration:i=>!i||typeof i=="number",animationName:i=>!i||typeof i=="string"&&le.includes(i),buttonCallback:i=>!i||typeof i=="function",buttonText:i=>!i||typeof i=="string",customClasses:i=>!i||typeof i=="string",duration:i=>!i||typeof i=="number"&&!Number.isNaN(i),hideCallback:i=>!i||typeof i=="function",title:i=>!i||typeof i=="string"&&i.length>0,message:i=>!i||typeof i=="string"&&i.length>0,linkMessage:i=>!i||typeof i=="string"&&i.length>0,targetLink:i=>!i||typeof i=="string"&&i.length>0,showCallback:i=>!i||typeof i=="function",size:i=>!i||typeof i=="string"&&he.includes(i),type:i=>!i||typeof i=="string"&&de.includes(i),variant:i=>!i||typeof i=="string"&&ue.includes(i)};function pe(i){return Object.keys(Nt).filter(t=>!Nt[t](i[t])).map(t=>new Error(`${t} is invalid.`))}/**
168
174
  * @license
169
175
  * Copyright 2020 Google LLC
170
176
  * SPDX-License-Identifier: BSD-3-Clause
171
- */const Xt=Symbol.for(""),Kt=i=>{if(i?.r===Xt)return i?._$litStatic$},ft=new Map,Zt=i=>(t,...e)=>{const s=e.length;let n,a;const o=[],h=[];let r,c=0,p=!1;for(;c<s;){for(r=t[c];c<s&&(a=e[c],(n=Kt(a))!==void 0);)r+=n+t[++c],p=!0;h.push(a),o.push(r),c++}if(c===s&&o.push(t[s]),p){const l=o.join("$$lit$$");(t=ft.get(l))===void 0&&(o.raw=o,ft.set(l,t=o)),e=h}return i(t,...e)},H=Zt(X),gt={default:{showAnimation:[{opacity:"0"},{opacity:"1"}],hideAnimation:[{opacity:"1"},{opacity:"0"}]},"slide-in":{showAnimation:[{transform:"translateX(-100%)",opacity:"0"},{transform:"translateX(0)",opacity:"1"}],hideAnimation:[{transform:"translateX(0)",opacity:"1"},{transform:"translateX(-100%)",opacity:"0"}]},zoom:{showAnimation:[{transform:"scale(0)",opacity:"0"},{transform:"scale(1)",opacity:"1"}],hideAnimation:[{transform:"scale(1)",opacity:"1"},{transform:"scale(0)",opacity:"0"}]}};function Gt({type:i,variant:t}){const s={default:{title:"body2",text:"footnote2"},autoClose:{title:"body1",text:"body1"}}[i==="auto"?"autoClose":"default"],a={success:"flat-success",error:"flat-error",warning:"flat-alert",info:"flat-info"}[t];return{textVariants:s,icon:a}}class Jt extends v{static get styles(){return C`${zt}`}render(){const{message:t,title:e,linkMessage:s,type:n,targetLink:a,variant:o}=this,{textVariants:h,icon:r}=Gt({type:n,variant:o}),c=H`<cas-text variant=${h.text}>${t}</cas-text>`,p=H`<cas-text variant=${h.text}><a href="${s}" target="${a}">${t}</a></cas-text>`;return H`
177
+ */const me=Symbol.for(""),be=i=>{if(i?.r===me)return i?._$litStatic$},Rt=new Map,ve=i=>(t,...e)=>{const s=e.length;let n,o;const r=[],l=[];let a,c=0,h=!1;for(;c<s;){for(a=t[c];c<s&&(o=e[c],(n=be(o))!==void 0);)a+=n+t[++c],h=!0;c!==s&&l.push(o),r.push(a),c++}if(c===s&&r.push(t[s]),h){const d=r.join("$$lit$$");(t=Rt.get(d))===void 0&&(r.raw=r,Rt.set(d,t=r)),e=l}return i(t,...e)},I=ve(G),Tt={default:{showAnimation:[{opacity:"0"},{opacity:"1"}],hideAnimation:[{opacity:"1"},{opacity:"0"}]},"slide-in":{showAnimation:[{transform:"translateX(-100%)",opacity:"0"},{transform:"translateX(0)",opacity:"1"}],hideAnimation:[{transform:"translateX(0)",opacity:"1"},{transform:"translateX(-100%)",opacity:"0"}]},zoom:{showAnimation:[{transform:"scale(0)",opacity:"0"},{transform:"scale(1)",opacity:"1"}],hideAnimation:[{transform:"scale(1)",opacity:"1"},{transform:"scale(0)",opacity:"0"}]}};function $e({type:i,variant:t}){const s={default:{title:"body2",text:"footnote2"},autoClose:{title:"body1",text:"body1"}}[i==="auto"?"autoClose":"default"],o={success:"flat-success",error:"flat-error",warning:"flat-alert",info:"flat-info"}[t];return{textVariants:s,icon:o}}class fe extends f{static get styles(){return R`${ae}`}render(){const{message:t,title:e,linkMessage:s,type:n,targetLink:o,variant:r}=this,{textVariants:l,icon:a}=$e({type:n,variant:r}),c=I`<cas-text variant=${l.text}>${t}</cas-text>`,h=I`<cas-text variant=${l.text}><a href="${s}" target="${o}">${t}</a></cas-text>`;return I`
172
178
  <div class="icon">
173
- <cas-icon name=${r} size="24"></cas-icon>
179
+ <cas-icon name=${a} size="24"></cas-icon>
174
180
  </div>
175
181
  <div class="content">
176
182
  <div class="text-container">
177
- <cas-text id="snackbarMessage" variant=${h.title}>${e}</cas-text>
178
- ${s?p:c}
183
+ <cas-text id="snackbarMessage" variant=${l.title}>${e}</cas-text>
184
+ ${s?h:c}
179
185
  </div>
180
- ${n==="dismiss"?H`<div id="snackbarButton" class="close-icon" @click=${this._handleButtonClick}>
186
+ ${n==="dismiss"?I`<div id="snackbarButton" class="close-icon" @click=${this._handleButtonClick}>
181
187
  <cas-icon name="flat-close" size="16"></cas-icon>
182
188
  </div>`:""}
183
189
  </div>
184
- `}static get properties(){return{animationDone:{type:Boolean},animationDuration:{type:Number},animationName:{type:String},buttonCallback:{type:Function},buttonText:{type:String},duration:{type:Number},id:{type:String},title:{type:String},message:{type:String},linkMessage:{type:String},targetLink:{type:String},type:{type:String},variant:{type:String}}}constructor(){super(),this._timer=this._timer.bind(this),this._showStart=Date.now()}connectedCallback(){super.connectedCallback(),(this.type==="auto"||this.type!=="dismiss")&&this._timer(),this.setAttribute("aria-label",this.accessibilityLabel||`Snackbar: ${this.message}`),this.setAttribute("role","alert")}_timer(){Date.now()-this._showStart>=this.duration?(this._fadeOut(),cancelAnimationFrame(this._timer)):requestAnimationFrame(this._timer)}update(t){super.update(t),this.animationDone||this._fadeIn()}_fadeIn(){const t=gt[this.animationName].showAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.showCallback=="function"&&this.showCallback()},this.dispatchEvent(new CustomEvent("cas-snackbar-bar-has-faded-in",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_fadeOut(){const t=gt[this.animationName].hideAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.hideCallback=="function"&&this.hideCallback(),this._removeSnackbar()}}_removeSnackbar(){this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-remove",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_handleButtonClick(){this._fadeOut(),typeof this.buttonCallback=="function"&&this.buttonCallback()}}class Yt extends v{static shadowRootOptions={...v.shadowRootOptions,mode:"open"};constructor(){super(),this.position="bottom left"}static properties={position:{type:String}};render(){const{position:t}=this;return X`
190
+ `}static get properties(){return{animationDone:{type:Boolean},animationDuration:{type:Number},animationName:{type:String},buttonCallback:{type:Function},buttonText:{type:String},duration:{type:Number},id:{type:String},title:{type:String},message:{type:String},linkMessage:{type:String},targetLink:{type:String},type:{type:String},variant:{type:String}}}constructor(){super(),this._timer=this._timer.bind(this),this._showStart=Date.now()}connectedCallback(){super.connectedCallback(),(this.type==="auto"||this.type!=="dismiss")&&this._timer(),this.setAttribute("aria-label",this.accessibilityLabel||`Snackbar: ${this.message}`),this.setAttribute("role","alert")}_timer(){Date.now()-this._showStart>=this.duration?(this._fadeOut(),cancelAnimationFrame(this._timer)):requestAnimationFrame(this._timer)}update(t){super.update(t),this.animationDone||this._fadeIn()}_fadeIn(){const t=Tt[this.animationName].showAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.showCallback=="function"&&this.showCallback()},this.dispatchEvent(new CustomEvent("cas-snackbar-bar-has-faded-in",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_fadeOut(){const t=Tt[this.animationName].hideAnimation,e={duration:this.animationDuration,iterations:1},s=this.animate(t,e);s.onfinish=()=>{typeof this.hideCallback=="function"&&this.hideCallback(),this._removeSnackbar()}}_removeSnackbar(){this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-remove",{bubbles:!0,composed:!0,detail:{snackbarID:this.id}}))}_handleButtonClick(){this._fadeOut(),typeof this.buttonCallback=="function"&&this.buttonCallback()}}class ge extends f{static shadowRootOptions={...f.shadowRootOptions,mode:"open"};constructor(){super(),this.position="bottom left"}static properties={position:{type:String}};render(){const{position:t}=this;return G`
185
191
  <cas-snackbar-provider-custom position=${t}></cas-snackbar-provider-custom>
186
192
  <slot></slot>
187
- `}}class vt extends v{render(){return X``}static get styles(){return C`
188
- ${It}
189
- `}constructor(){super(),this.newSnackbarProperties=["accessibilityLabel","animationDuration","animationName","buttonCallback","duration","hideCallback","title","message","linkMessage","targetLink","showCallback","type","hasFadedIn"],this.newSnackbarAttributes=["id","size","variant"],window.addEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.addEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-ready",{bubbles:!0,composed:!0})),this.setAttribute("aria-live","polite")}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.removeEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}_handleSnackbarAdd(t){const e=t.detail||{},s=qt(e);if(s.length>0)for(const{message:n}of s)console.error("There was a problem creating your snackbar. Please check your custom event options.",n);else{const n={id:Date.now(),...Bt,...e},a=this._createNewSnackbar(n);this.shadowRoot.prepend(a),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-added",{bubbles:!0,composed:!0,detail:{snackbarID:a.id}}))}}_handleSnackbarRemove(t){this.shadowRoot.getElementById(t.detail.snackbarID).remove(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-removed",{bubbles:!0,composed:!0,detail:{snackbarID:t.detail.snackbarID}}))}_createNewSnackbar(t){document.querySelector("cas-snackbar-provider")?.setAttribute("position",t.position);const s=document.createElement("cas-snackbar");return this.newSnackbarProperties.forEach(n=>{s[n]=t[n]}),this.newSnackbarAttributes.forEach(n=>{s.setAttribute(n,t[n])}),t.customClasses&&(s.className+=t.customClasses),s}}const L=({variant:i,config:t})=>{const{title:e,message:s,linkMessage:n,targetLink:a,autoHide:o,autoHideDuration:h,position:r}=t;window.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-add",{bubbles:!0,composed:!0,detail:{variant:i,title:e,message:s,linkMessage:n,targetLink:a,position:r||"bottom right",animationName:"slide-in",type:o?"auto":"dismiss",duration:h||4e3}}))},D={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info"},Qt={success:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.SUCCESS,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})},error:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.ERROR,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})},warning:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.WARNING,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})},info:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o})=>{L({variant:D.INFO,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:a,position:o}})}};customElements.get("cas-snackbar")||customElements.define("cas-snackbar",Jt),customElements.get("cas-snackbar-provider-custom")||customElements.define("cas-snackbar-provider-custom",vt),customElements.get("cas-snackbar-provider")||customElements.define("cas-snackbar-provider",Yt),$.CasSnackbarProvider=vt,$.snackbar=Qt,Object.defineProperties($,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
193
+ `}}class Mt extends f{render(){return G``}static get styles(){return R`
194
+ ${re}
195
+ `}constructor(){super(),this.newSnackbarProperties=["accessibilityLabel","animationDuration","animationName","buttonCallback","duration","hideCallback","title","message","linkMessage","targetLink","showCallback","type","hasFadedIn"],this.newSnackbarAttributes=["id","size","variant"],window.addEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.addEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-ready",{bubbles:!0,composed:!0})),this.setAttribute("aria-live","polite")}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("cas-snackbar-snackbar-add",this._handleSnackbarAdd.bind(this)),window.removeEventListener("cas-snackbar-snackbar-remove",this._handleSnackbarRemove.bind(this))}_handleSnackbarAdd(t){const e=t.detail||{},s=pe(e);if(s.length>0)for(const{message:n}of s)console.error("There was a problem creating your snackbar. Please check your custom event options.",n);else{const n={id:Date.now(),...ce,...e},o=this._createNewSnackbar(n);this.shadowRoot.prepend(o),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-added",{bubbles:!0,composed:!0,detail:{snackbarID:o.id}}))}}_handleSnackbarRemove(t){this.shadowRoot.getElementById(t.detail.snackbarID).remove(),this.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-bar-removed",{bubbles:!0,composed:!0,detail:{snackbarID:t.detail.snackbarID}}))}_createNewSnackbar(t){document.querySelector("cas-snackbar-provider")?.setAttribute("position",t.position);const s=document.createElement("cas-snackbar");return this.newSnackbarProperties.forEach(n=>{s[n]=t[n]}),this.newSnackbarAttributes.forEach(n=>{s.setAttribute(n,t[n])}),t.customClasses&&(s.className+=t.customClasses),s}}const z=({variant:i,config:t})=>{const{title:e,message:s,linkMessage:n,targetLink:o,autoHide:r,autoHideDuration:l,position:a}=t;window.dispatchEvent(new CustomEvent("cas-snackbar-snackbar-add",{bubbles:!0,composed:!0,detail:{variant:i,title:e,message:s,linkMessage:n,targetLink:o,position:a||"bottom right",animationName:"slide-in",type:r?"auto":"dismiss",duration:l||4e3}}))},j={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info"},_e={success:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r})=>{z({variant:j.SUCCESS,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r}})},error:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r})=>{z({variant:j.ERROR,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r}})},warning:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r})=>{z({variant:j.WARNING,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r}})},info:({title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r})=>{z({variant:j.INFO,config:{title:i,message:t,linkMessage:e,targetLink:s,autoHide:n,autoHideDuration:o,position:r}})}};customElements.get("cas-snackbar")||customElements.define("cas-snackbar",fe),customElements.get("cas-snackbar-provider-custom")||customElements.define("cas-snackbar-provider-custom",Mt),customElements.get("cas-snackbar-provider")||customElements.define("cas-snackbar-provider",ge),g.CasSnackbarProvider=Mt,g.snackbar=_e,Object.defineProperties(g,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});