cas-ds-web-components 1.2.59 → 1.2.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cas-accordion-element.js +29 -29
- package/build/cas-accordion.js +29 -29
- package/build/cas-alert.js +47 -47
- package/build/cas-button.js +81 -81
- package/build/cas-checkbox.js +1 -1
- package/build/cas-date-picker-range.js +471 -0
- package/build/cas-ds-web-components.js +512 -511
- package/build/cas-header.js +1 -0
- package/build/cas-icon.js +295 -295
- package/build/cas-input.js +290 -199
- package/build/cas-select.js +1 -0
- package/build/cas-snackbar.js +31 -31
- package/build/cas-text.js +18 -18
- package/build/cas-toggle.js +1 -1
- package/package.json +1 -1
- package/build/cas-share.js +0 -332
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
(function(A,
|
|
1
|
+
(function(A,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("@eloisa-ds/base-styles")):typeof define=="function"&&define.amd?define(["exports","@eloisa-ds/base-styles"],p):(A=typeof globalThis<"u"?globalThis:A||self,p(A["cas-accordion"]={},A.baseStyles))})(this,function(A,p){"use strict";var Ce=Object.defineProperty;var He=(A,p,g)=>p in A?Ce(A,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):A[p]=g;var Q=(A,p,g)=>(He(A,typeof p!="symbol"?p+"":p,g),g);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const g=window,X=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),vt=new WeakMap;let _t=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==tt)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(X&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vt.set(e,t))}return t}toString(){return this.cssText}};const f=n=>new _t(typeof n=="string"?n:n+"",void 0,tt),Kt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>i+(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.")})(s)+n[o+1],n[0]);return new _t(e,n,tt)},Yt=(n,t)=>{X?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=g.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},At=X?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var et;const q=window,ft=q.trustedTypes,Ft=ft?ft.emptyScript:"",gt=q.reactiveElementPolyfillSupport,it={toAttribute(n,t){switch(t){case Boolean:n=n?Ft:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},mt=(n,t)=>t!==n&&(t==t||n==n),st={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:mt},nt="finalized";let T=class 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,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),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 i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||st}static finalize(){if(this.hasOwnProperty(nt))return!1;this[nt]=!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,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(At(s))}else t!==void 0&&e.push(At(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i: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,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.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 Yt(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 i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=st){var s;const o=this.constructor._$Ep(t,i);if(o!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:it).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=s.getPropertyOptions(o),a=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:it;this._$El=o,this[o]=a.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||mt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(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((s,o)=>this[o]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};T[nt]=!0,T.elementProperties=new Map,T.elementStyles=[],T.shadowRootOptions={mode:"open"},gt==null||gt({ReactiveElement:T}),((et=q.reactiveElementVersions)!==null&&et!==void 0?et:q.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var ot;const J=window,M=J.trustedTypes,yt=M?M.createPolicy("lit-html",{createHTML:n=>n}):void 0,rt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,xt="?"+y,Gt=`<${xt}>`,b=document,K=()=>b.createComment(""),B=n=>n===null||typeof n!="object"&&typeof n!="function",bt=Array.isArray,Qt=n=>bt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",lt=`[
|
|
14
|
+
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,St=/>/g,E=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ht=/^(?:script|style|textarea|title)$/i,Xt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),te=Xt(1),N=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Tt=new WeakMap,S=b.createTreeWalker(b,129,null,!1);function Mt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return yt!==void 0?yt.createHTML(t):t}const ee=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=I;for(let a=0;a<e;a++){const l=n[a];let h,d,c=-1,u=0;for(;u<l.length&&(r.lastIndex=u,d=r.exec(l),d!==null);)u=r.lastIndex,r===I?d[1]==="!--"?r=Et:d[1]!==void 0?r=St:d[2]!==void 0?(Ht.test(d[2])&&(s=RegExp("</"+d[2],"g")),r=E):d[3]!==void 0&&(r=E):r===E?d[0]===">"?(r=s??I,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,h=d[1],r=d[3]===void 0?E:d[3]==='"'?Ct:wt):r===Ct||r===wt?r=E:r===Et||r===St?r=I:(r=E,s=void 0);const $=r===E&&n[a+1].startsWith("/>")?" ":"";o+=r===I?l+Gt:c>=0?(i.push(h),l.slice(0,c)+rt+l.slice(c)+y+$):l+y+(c===-2?(i.push(void 0),a):$)}return[Mt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};let ht=class qt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,d]=ee(t,e);if(this.el=qt.createElement(h,i),S.currentNode=this.el.content,e===2){const c=this.el.content,u=c.firstChild;u.remove(),c.append(...u.childNodes)}for(;(s=S.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const u of s.getAttributeNames())if(u.endsWith(rt)||u.startsWith(y)){const $=d[r++];if(c.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+rt).split(y),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?se:m[1]==="?"?oe:m[1]==="@"?re:Y})}else l.push({type:6,index:o})}for(const u of c)s.removeAttribute(u)}if(Ht.test(s.tagName)){const c=s.textContent.split(y),u=c.length-1;if(u>0){s.textContent=M?M.emptyScript:"";for(let $=0;$<u;$++)s.append(c[$],K()),S.nextNode(),l.push({type:2,index:++o});s.append(c[u],K())}}}else if(s.nodeType===8)if(s.data===xt)l.push({type:2,index:o});else{let c=-1;for(;(c=s.data.indexOf(y,c+1))!==-1;)l.push({type:7,index:o}),c+=y.length-1}o++}}static createElement(t,e){const i=b.createElement("template");return i.innerHTML=t,i}};function U(n,t,e=n,i){var s,o,r,a;if(t===N)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=B(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=U(n,l._$AS(n,t.values),l,i)),t}let ie=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:b).importNode(i,!0);S.currentNode=o;let r=S.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let d;h.type===2?d=new Nt(r,r.nextSibling,this,t):h.type===1?d=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(d=new le(r,this,t)),this._$AV.push(d),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=S.nextNode(),a++)}return S.currentNode=b,o}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Nt=class Jt{constructor(t,e,i,s){var o;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),B(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Qt(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!==v&&B(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=ht.createElement(Mt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new ie(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=Tt.get(t.strings);return e===void 0&&Tt.set(t.strings,e=new ht(t)),e}T(t){bt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Jt(this.k(K()),this.k(K()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},Y=class{constructor(t,e,i,s,o){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=U(this,t,e,0),r=!B(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=U(this,a[i+l],e,l),h===N&&(h=this._$AH[l]),r||(r=!B(h)||h!==this._$AH[l]),h===v?t=v:t!==v&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},se=class extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}};const ne=M?M.emptyScript:"";let oe=class extends Y{constructor(){super(...arguments),this.type=4}j(t){t&&t!==v?this.element.setAttribute(this.name,ne):this.element.removeAttribute(this.name)}},re=class extends Y{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=U(this,t,e,0))!==null&&i!==void 0?i:v)===N)return;const s=this._$AH,o=t===v&&s!==v||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==v&&(s===v||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},le=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}};const Ut=J.litHtmlPolyfillSupport;Ut==null||Ut(ht,Nt),((ot=J.litHtmlVersions)!==null&&ot!==void 0?ot:J.litHtmlVersions=[]).push("2.8.0");/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
20
|
-
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
19
|
+
*/var at;const F=window,P=F.trustedTypes,Pt=P?P.createPolicy("lit-html",{createHTML:n=>n}):void 0,dt="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,Rt="?"+x,he=`<${Rt}>`,w=document,j=()=>w.createComment(""),z=n=>n===null||typeof n!="object"&&typeof n!="function",kt=Array.isArray,ae=n=>kt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",ct=`[
|
|
20
|
+
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ot=/-->/g,Lt=/>/g,C=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Bt=/'/g,It=/"/g,jt=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),zt=new WeakMap,H=w.createTreeWalker(w,129,null,!1);function Dt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pt!==void 0?Pt.createHTML(t):t}const de=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=D;for(let a=0;a<e;a++){const l=n[a];let h,d,c=-1,u=0;for(;u<l.length&&(r.lastIndex=u,d=r.exec(l),d!==null);)u=r.lastIndex,r===D?d[1]==="!--"?r=Ot:d[1]!==void 0?r=Lt:d[2]!==void 0?(jt.test(d[2])&&(s=RegExp("</"+d[2],"g")),r=C):d[3]!==void 0&&(r=C):r===C?d[0]===">"?(r=s??D,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,h=d[1],r=d[3]===void 0?C:d[3]==='"'?It:Bt):r===It||r===Bt?r=C:r===Ot||r===Lt?r=D:(r=C,s=void 0);const $=r===C&&n[a+1].startsWith("/>")?" ":"";o+=r===D?l+he:c>=0?(i.push(h),l.slice(0,c)+dt+l.slice(c)+x+$):l+x+(c===-2?(i.push(void 0),a):$)}return[Dt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class V{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,d]=de(t,e);if(this.el=V.createElement(h,i),H.currentNode=this.el.content,e===2){const c=this.el.content,u=c.firstChild;u.remove(),c.append(...u.childNodes)}for(;(s=H.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const u of s.getAttributeNames())if(u.endsWith(dt)||u.startsWith(x)){const $=d[r++];if(c.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+dt).split(x),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?ue:m[1]==="?"?$e:m[1]==="@"?ve:G})}else l.push({type:6,index:o})}for(const u of c)s.removeAttribute(u)}if(jt.test(s.tagName)){const c=s.textContent.split(x),u=c.length-1;if(u>0){s.textContent=P?P.emptyScript:"";for(let $=0;$<u;$++)s.append(c[$],j()),H.nextNode(),l.push({type:2,index:++o});s.append(c[u],j())}}}else if(s.nodeType===8)if(s.data===Rt)l.push({type:2,index:o});else{let c=-1;for(;(c=s.data.indexOf(x,c+1))!==-1;)l.push({type:7,index:o}),c+=x.length-1}o++}}static createElement(t,e){const i=w.createElement("template");return i.innerHTML=t,i}}function k(n,t,e=n,i){var s,o,r,a;if(t===R)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=z(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=k(n,l._$AS(n,t.values),l,i)),t}class ce{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:i},parts:s}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:w).importNode(i,!0);H.currentNode=o;let r=H.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let d;h.type===2?d=new W(r,r.nextSibling,this,t):h.type===1?d=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(d=new _e(r,this,t)),this._$AV.push(d),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=H.nextNode(),a++)}return H.currentNode=w,o}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class W{constructor(t,e,i,s){var o;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=k(this,t,e),z(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ae(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!==_&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(Dt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new ce(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=zt.get(t.strings);return e===void 0&&zt.set(t.strings,e=new V(t)),e}T(t){kt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new W(this.k(j()),this.k(j()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class G{constructor(t,e,i,s,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=k(this,t,e,0),r=!z(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=k(this,a[i+l],e,l),h===R&&(h=this._$AH[l]),r||(r=!z(h)||h!==this._$AH[l]),h===_?t=_:t!==_&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ue extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const pe=P?P.emptyScript:"";class $e extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,pe):this.element.removeAttribute(this.name)}}class ve extends G{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=k(this,t,e,0))!==null&&i!==void 0?i:_)===R)return;const s=this._$AH,o=t===_&&s!==_||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==_&&(s===_||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class _e{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){k(this,t)}}const Vt=F.litHtmlPolyfillSupport;Vt==null||Vt(V,W),((at=F.litHtmlVersions)!==null&&at!==void 0?at:F.litHtmlVersions=[]).push("2.8.0");const Ae=(n,t,e)=>{var i,s;const o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let r=o._$litPart$;if(r===void 0){const a=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new W(t.insertBefore(j(),a),a,void 0,e??{})}return r._$AI(n),r};/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/var
|
|
25
|
+
*/var ut,pt;let O=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ae(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 R}};O.finalized=!0,O._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:O});const Wt=globalThis.litElementPolyfillSupport;Wt==null||Wt({LitElement:O}),((pt=globalThis.litElementVersions)!==null&&pt!==void 0?pt:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/const
|
|
29
|
+
*/const fe=Symbol.for(""),ge=n=>{if((n==null?void 0:n.r)===fe)return n==null?void 0:n._$litStatic$},Zt=new Map,me=n=>(t,...e)=>{const i=e.length;let s,o;const r=[],a=[];let l,h=0,d=!1;for(;h<i;){for(l=t[h];h<i&&(o=e[h],(s=ge(o))!==void 0);)l+=s+t[++h],d=!0;h!==i&&a.push(o),r.push(l),h++}if(h===i&&r.push(t[i]),d){const c=r.join("$$lit$$");(t=Zt.get(c))===void 0&&(r.raw=r,Zt.set(c,t=r)),e=a}return n(t,...e)},Z=me(te),ye=Kt`
|
|
30
30
|
.accordion-container {
|
|
31
31
|
position: relative;
|
|
32
32
|
box-sizing: border-box;
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-direction: column;
|
|
35
35
|
width: 100%;
|
|
36
|
-
background: ${f(
|
|
36
|
+
background: ${f(p.casColorBackground1ModeLight)};
|
|
37
37
|
border-radius: 8px;
|
|
38
38
|
margin-bottom: 12px;
|
|
39
39
|
}
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.box:hover {
|
|
50
|
-
background: ${f(
|
|
50
|
+
background: ${f(p.casColorBackground1ModeLight)};
|
|
51
51
|
box-shadow: 0 6px 20px #b2b9cf;
|
|
52
52
|
border-radius: 8px;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.accordion-container:hover header {
|
|
56
|
-
color: ${f(
|
|
56
|
+
color: ${f(p.casColorPrimary1ModeLight)};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.accordion-container:active header {
|
|
60
|
-
color: ${f(
|
|
60
|
+
color: ${f(p.casColorPrimary2ModeLight)};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
header {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
align-items: center;
|
|
70
70
|
gap: 32px;
|
|
71
71
|
padding: 24px 32px 24px 40px;
|
|
72
|
-
color: ${f(
|
|
72
|
+
color: ${f(p.casColorTertiary2ModeLight)};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
header:after {
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
display: flex;
|
|
81
81
|
width: 100%;
|
|
82
82
|
height: 1px;
|
|
83
|
-
background: ${f(
|
|
83
|
+
background: ${f(p.casColorTertiary10ModeLight)};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.open header:after {
|
|
87
|
-
background: ${f(
|
|
87
|
+
background: ${f(p.casColorPrimary4ModeLight)};
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.box header:after {
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
header cas-text:nth-child(2) {
|
|
97
|
-
color: ${f(
|
|
97
|
+
color: ${f(p.casColorTertiary3ModeLight)};
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.open.box header {
|
|
101
|
-
color: ${f(
|
|
101
|
+
color: ${f(p.casColorPrimary1ModeLight)};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.open.box header:after {
|
|
105
|
-
background: ${f(
|
|
105
|
+
background: ${f(p.casColorTertiary10ModeLight)};
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
header .left {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
display: flex;
|
|
119
119
|
flex-direction: column;
|
|
120
120
|
gap: 24px;
|
|
121
|
-
color: ${f(
|
|
121
|
+
color: ${f(p.casColorTertiary2ModeLight)};
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.box .content {
|
|
@@ -147,24 +147,24 @@
|
|
|
147
147
|
* @license
|
|
148
148
|
* Copyright 2017 Google LLC
|
|
149
149
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const
|
|
150
|
+
*/const xe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},be=n=>(...t)=>({_$litDirective$:n,values:t});class Ee{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
151
151
|
* @license
|
|
152
152
|
* Copyright 2018 Google LLC
|
|
153
153
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
154
|
-
*/const
|
|
154
|
+
*/const Se=be(class extends Ee{constructor(n){var t;if(super(n),n.type!==xe.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((e=this.nt)===null||e===void 0)&&e.has(o))&&this.it.add(o);return this.render(t)}const s=n.element.classList;this.it.forEach(o=>{o in t||(s.remove(o),this.it.delete(o))});for(const o in t){const r=!!t[o];r===this.it.has(o)||!((i=this.nt)===null||i===void 0)&&i.has(o)||(r?(s.add(o),this.it.add(o)):(s.remove(o),this.it.delete(o)))}return N}});function we({variant:n,open:t}){const e=Se({"accordion-container":!0,[n]:!0,open:t}),s=(()=>{if(window.matchMedia("(min-width: 768px)").matches)return"desktop";if(window.matchMedia("(max-width: 767px)").matches)return"mobile"})();return{accordionStyle:e,iconSize:{desktop:"24",mobile:"16"}[s]}}class L extends O{constructor(){super(),this.open=!1,this.variant="simple",this.title="",this.text=""}toggleAccordion(){this.open=!this.open,this.requestUpdate()}render(){const{open:t,title:e,text:i,content:s}=this,{accordionStyle:o,iconSize:r}=we({variant:this.variant,open:this.open}),a={true:"flat-minus",false:"flat-plus"};return Z`
|
|
155
155
|
<article class=${o}>
|
|
156
156
|
<header @click="${this.toggleAccordion}">
|
|
157
157
|
<div class="left">
|
|
158
|
-
${e!==""?
|
|
159
|
-
${i!==""?
|
|
158
|
+
${e!==""?Z` <cas-text variant="headline3">${e}</cas-text>`:""}
|
|
159
|
+
${i!==""?Z` <cas-text variant="footnote2">${i}</cas-text>`:""}
|
|
160
160
|
</div>
|
|
161
161
|
<cas-icon name="${a[t]}" size="${r}"></cas-icon>
|
|
162
162
|
</header>
|
|
163
|
-
${t?
|
|
163
|
+
${t?Z`
|
|
164
164
|
<div class="content">
|
|
165
|
-
${s!==""?
|
|
165
|
+
${s!==""?Z` <cas-text variant="body1" text="${s}"></cas-text>`:""}
|
|
166
166
|
<slot></slot>
|
|
167
167
|
</div>
|
|
168
168
|
`:""}
|
|
169
169
|
</article>
|
|
170
|
-
`}}Q(L,"styles",
|
|
170
|
+
`}}Q(L,"styles",ye),Q(L,"shadowRootOptions",{...O.shadowRootOptions,mode:"open"}),Q(L,"properties",{open:{type:Boolean},variant:{type:String},title:{type:String},text:{type:String},content:{type:String}}),customElements.define("cas-accordion",L),customElements.get("cas-accordion-element")||customElements.define("cas-accordion-element",class extends L{}),A.CasAccordion=L,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
package/build/cas-accordion.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
(function(A,
|
|
1
|
+
(function(A,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("@eloisa-ds/base-styles")):typeof define=="function"&&define.amd?define(["exports","@eloisa-ds/base-styles"],p):(A=typeof globalThis<"u"?globalThis:A||self,p(A["cas-accordion"]={},A.baseStyles))})(this,function(A,p){"use strict";var Ce=Object.defineProperty;var He=(A,p,g)=>p in A?Ce(A,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):A[p]=g;var Q=(A,p,g)=>(He(A,typeof p!="symbol"?p+"":p,g),g);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const g=window,X=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),vt=new WeakMap;let _t=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==tt)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(X&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vt.set(e,t))}return t}toString(){return this.cssText}};const f=n=>new _t(typeof n=="string"?n:n+"",void 0,tt),Kt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>i+(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.")})(s)+n[o+1],n[0]);return new _t(e,n,tt)},Yt=(n,t)=>{X?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=g.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},At=X?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var et;const q=window,ft=q.trustedTypes,Ft=ft?ft.emptyScript:"",gt=q.reactiveElementPolyfillSupport,it={toAttribute(n,t){switch(t){case Boolean:n=n?Ft:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},mt=(n,t)=>t!==n&&(t==t||n==n),st={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:mt},nt="finalized";let T=class 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,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),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 i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||st}static finalize(){if(this.hasOwnProperty(nt))return!1;this[nt]=!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,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(At(s))}else t!==void 0&&e.push(At(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i: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,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.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 Yt(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 i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=st){var s;const o=this.constructor._$Ep(t,i);if(o!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:it).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=s.getPropertyOptions(o),a=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:it;this._$El=o,this[o]=a.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||mt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(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((s,o)=>this[o]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),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,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};T[nt]=!0,T.elementProperties=new Map,T.elementStyles=[],T.shadowRootOptions={mode:"open"},gt==null||gt({ReactiveElement:T}),((et=q.reactiveElementVersions)!==null&&et!==void 0?et:q.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/var ot;const J=window,M=J.trustedTypes,yt=M?M.createPolicy("lit-html",{createHTML:n=>n}):void 0,rt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,xt="?"+y,Gt=`<${xt}>`,b=document,K=()=>b.createComment(""),B=n=>n===null||typeof n!="object"&&typeof n!="function",bt=Array.isArray,Qt=n=>bt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",lt=`[
|
|
14
|
+
\f\r]`,I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,St=/>/g,E=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ht=/^(?:script|style|textarea|title)$/i,Xt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),te=Xt(1),N=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Tt=new WeakMap,S=b.createTreeWalker(b,129,null,!1);function Mt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return yt!==void 0?yt.createHTML(t):t}const ee=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=I;for(let a=0;a<e;a++){const l=n[a];let h,d,c=-1,u=0;for(;u<l.length&&(r.lastIndex=u,d=r.exec(l),d!==null);)u=r.lastIndex,r===I?d[1]==="!--"?r=Et:d[1]!==void 0?r=St:d[2]!==void 0?(Ht.test(d[2])&&(s=RegExp("</"+d[2],"g")),r=E):d[3]!==void 0&&(r=E):r===E?d[0]===">"?(r=s??I,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,h=d[1],r=d[3]===void 0?E:d[3]==='"'?Ct:wt):r===Ct||r===wt?r=E:r===Et||r===St?r=I:(r=E,s=void 0);const $=r===E&&n[a+1].startsWith("/>")?" ":"";o+=r===I?l+Gt:c>=0?(i.push(h),l.slice(0,c)+rt+l.slice(c)+y+$):l+y+(c===-2?(i.push(void 0),a):$)}return[Mt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};let ht=class qt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,d]=ee(t,e);if(this.el=qt.createElement(h,i),S.currentNode=this.el.content,e===2){const c=this.el.content,u=c.firstChild;u.remove(),c.append(...u.childNodes)}for(;(s=S.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const u of s.getAttributeNames())if(u.endsWith(rt)||u.startsWith(y)){const $=d[r++];if(c.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+rt).split(y),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?se:m[1]==="?"?oe:m[1]==="@"?re:Y})}else l.push({type:6,index:o})}for(const u of c)s.removeAttribute(u)}if(Ht.test(s.tagName)){const c=s.textContent.split(y),u=c.length-1;if(u>0){s.textContent=M?M.emptyScript:"";for(let $=0;$<u;$++)s.append(c[$],K()),S.nextNode(),l.push({type:2,index:++o});s.append(c[u],K())}}}else if(s.nodeType===8)if(s.data===xt)l.push({type:2,index:o});else{let c=-1;for(;(c=s.data.indexOf(y,c+1))!==-1;)l.push({type:7,index:o}),c+=y.length-1}o++}}static createElement(t,e){const i=b.createElement("template");return i.innerHTML=t,i}};function U(n,t,e=n,i){var s,o,r,a;if(t===N)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=B(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=U(n,l._$AS(n,t.values),l,i)),t}let ie=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:b).importNode(i,!0);S.currentNode=o;let r=S.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let d;h.type===2?d=new Nt(r,r.nextSibling,this,t):h.type===1?d=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(d=new le(r,this,t)),this._$AV.push(d),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=S.nextNode(),a++)}return S.currentNode=b,o}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Nt=class Jt{constructor(t,e,i,s){var o;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),B(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Qt(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!==v&&B(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=ht.createElement(Mt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new ie(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=Tt.get(t.strings);return e===void 0&&Tt.set(t.strings,e=new ht(t)),e}T(t){bt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Jt(this.k(K()),this.k(K()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},Y=class{constructor(t,e,i,s,o){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=U(this,t,e,0),r=!B(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=U(this,a[i+l],e,l),h===N&&(h=this._$AH[l]),r||(r=!B(h)||h!==this._$AH[l]),h===v?t=v:t!==v&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},se=class extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}};const ne=M?M.emptyScript:"";let oe=class extends Y{constructor(){super(...arguments),this.type=4}j(t){t&&t!==v?this.element.setAttribute(this.name,ne):this.element.removeAttribute(this.name)}},re=class extends Y{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=U(this,t,e,0))!==null&&i!==void 0?i:v)===N)return;const s=this._$AH,o=t===v&&s!==v||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==v&&(s===v||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},le=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}};const Ut=J.litHtmlPolyfillSupport;Ut==null||Ut(ht,Nt),((ot=J.litHtmlVersions)!==null&&ot!==void 0?ot:J.litHtmlVersions=[]).push("2.8.0");/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var
|
|
20
|
-
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
19
|
+
*/var at;const F=window,P=F.trustedTypes,Pt=P?P.createPolicy("lit-html",{createHTML:n=>n}):void 0,dt="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,Rt="?"+x,he=`<${Rt}>`,w=document,j=()=>w.createComment(""),z=n=>n===null||typeof n!="object"&&typeof n!="function",kt=Array.isArray,ae=n=>kt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",ct=`[
|
|
20
|
+
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ot=/-->/g,Lt=/>/g,C=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Bt=/'/g,It=/"/g,jt=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),zt=new WeakMap,H=w.createTreeWalker(w,129,null,!1);function Dt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pt!==void 0?Pt.createHTML(t):t}const de=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=D;for(let a=0;a<e;a++){const l=n[a];let h,d,c=-1,u=0;for(;u<l.length&&(r.lastIndex=u,d=r.exec(l),d!==null);)u=r.lastIndex,r===D?d[1]==="!--"?r=Ot:d[1]!==void 0?r=Lt:d[2]!==void 0?(jt.test(d[2])&&(s=RegExp("</"+d[2],"g")),r=C):d[3]!==void 0&&(r=C):r===C?d[0]===">"?(r=s??D,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,h=d[1],r=d[3]===void 0?C:d[3]==='"'?It:Bt):r===It||r===Bt?r=C:r===Ot||r===Lt?r=D:(r=C,s=void 0);const $=r===C&&n[a+1].startsWith("/>")?" ":"";o+=r===D?l+he:c>=0?(i.push(h),l.slice(0,c)+dt+l.slice(c)+x+$):l+x+(c===-2?(i.push(void 0),a):$)}return[Dt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class V{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,d]=de(t,e);if(this.el=V.createElement(h,i),H.currentNode=this.el.content,e===2){const c=this.el.content,u=c.firstChild;u.remove(),c.append(...u.childNodes)}for(;(s=H.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const u of s.getAttributeNames())if(u.endsWith(dt)||u.startsWith(x)){const $=d[r++];if(c.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+dt).split(x),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?ue:m[1]==="?"?$e:m[1]==="@"?ve:G})}else l.push({type:6,index:o})}for(const u of c)s.removeAttribute(u)}if(jt.test(s.tagName)){const c=s.textContent.split(x),u=c.length-1;if(u>0){s.textContent=P?P.emptyScript:"";for(let $=0;$<u;$++)s.append(c[$],j()),H.nextNode(),l.push({type:2,index:++o});s.append(c[u],j())}}}else if(s.nodeType===8)if(s.data===Rt)l.push({type:2,index:o});else{let c=-1;for(;(c=s.data.indexOf(x,c+1))!==-1;)l.push({type:7,index:o}),c+=x.length-1}o++}}static createElement(t,e){const i=w.createElement("template");return i.innerHTML=t,i}}function k(n,t,e=n,i){var s,o,r,a;if(t===R)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=z(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=k(n,l._$AS(n,t.values),l,i)),t}class ce{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:i},parts:s}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:w).importNode(i,!0);H.currentNode=o;let r=H.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let d;h.type===2?d=new W(r,r.nextSibling,this,t):h.type===1?d=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(d=new _e(r,this,t)),this._$AV.push(d),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=H.nextNode(),a++)}return H.currentNode=w,o}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class W{constructor(t,e,i,s){var o;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=k(this,t,e),z(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ae(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!==_&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(Dt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new ce(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=zt.get(t.strings);return e===void 0&&zt.set(t.strings,e=new V(t)),e}T(t){kt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new W(this.k(j()),this.k(j()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class G{constructor(t,e,i,s,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=k(this,t,e,0),r=!z(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=k(this,a[i+l],e,l),h===R&&(h=this._$AH[l]),r||(r=!z(h)||h!==this._$AH[l]),h===_?t=_:t!==_&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class ue extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const pe=P?P.emptyScript:"";class $e extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,pe):this.element.removeAttribute(this.name)}}class ve extends G{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=k(this,t,e,0))!==null&&i!==void 0?i:_)===R)return;const s=this._$AH,o=t===_&&s!==_||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==_&&(s===_||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class _e{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){k(this,t)}}const Vt=F.litHtmlPolyfillSupport;Vt==null||Vt(V,W),((at=F.litHtmlVersions)!==null&&at!==void 0?at:F.litHtmlVersions=[]).push("2.8.0");const Ae=(n,t,e)=>{var i,s;const o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let r=o._$litPart$;if(r===void 0){const a=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new W(t.insertBefore(j(),a),a,void 0,e??{})}return r._$AI(n),r};/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/var
|
|
25
|
+
*/var ut,pt;let O=class extends T{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ae(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 R}};O.finalized=!0,O._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:O});const Wt=globalThis.litElementPolyfillSupport;Wt==null||Wt({LitElement:O}),((pt=globalThis.litElementVersions)!==null&&pt!==void 0?pt:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/const
|
|
29
|
+
*/const fe=Symbol.for(""),ge=n=>{if((n==null?void 0:n.r)===fe)return n==null?void 0:n._$litStatic$},Zt=new Map,me=n=>(t,...e)=>{const i=e.length;let s,o;const r=[],a=[];let l,h=0,d=!1;for(;h<i;){for(l=t[h];h<i&&(o=e[h],(s=ge(o))!==void 0);)l+=s+t[++h],d=!0;h!==i&&a.push(o),r.push(l),h++}if(h===i&&r.push(t[i]),d){const c=r.join("$$lit$$");(t=Zt.get(c))===void 0&&(r.raw=r,Zt.set(c,t=r)),e=a}return n(t,...e)},Z=me(te),ye=Kt`
|
|
30
30
|
.accordion-container {
|
|
31
31
|
position: relative;
|
|
32
32
|
box-sizing: border-box;
|
|
33
33
|
display: flex;
|
|
34
34
|
flex-direction: column;
|
|
35
35
|
width: 100%;
|
|
36
|
-
background: ${f(
|
|
36
|
+
background: ${f(p.casColorBackground1ModeLight)};
|
|
37
37
|
border-radius: 8px;
|
|
38
38
|
margin-bottom: 12px;
|
|
39
39
|
}
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.box:hover {
|
|
50
|
-
background: ${f(
|
|
50
|
+
background: ${f(p.casColorBackground1ModeLight)};
|
|
51
51
|
box-shadow: 0 6px 20px #b2b9cf;
|
|
52
52
|
border-radius: 8px;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.accordion-container:hover header {
|
|
56
|
-
color: ${f(
|
|
56
|
+
color: ${f(p.casColorPrimary1ModeLight)};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.accordion-container:active header {
|
|
60
|
-
color: ${f(
|
|
60
|
+
color: ${f(p.casColorPrimary2ModeLight)};
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
header {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
align-items: center;
|
|
70
70
|
gap: 32px;
|
|
71
71
|
padding: 24px 32px 24px 40px;
|
|
72
|
-
color: ${f(
|
|
72
|
+
color: ${f(p.casColorTertiary2ModeLight)};
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
header:after {
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
display: flex;
|
|
81
81
|
width: 100%;
|
|
82
82
|
height: 1px;
|
|
83
|
-
background: ${f(
|
|
83
|
+
background: ${f(p.casColorTertiary10ModeLight)};
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.open header:after {
|
|
87
|
-
background: ${f(
|
|
87
|
+
background: ${f(p.casColorPrimary4ModeLight)};
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.box header:after {
|
|
@@ -94,15 +94,15 @@
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
header cas-text:nth-child(2) {
|
|
97
|
-
color: ${f(
|
|
97
|
+
color: ${f(p.casColorTertiary3ModeLight)};
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.open.box header {
|
|
101
|
-
color: ${f(
|
|
101
|
+
color: ${f(p.casColorPrimary1ModeLight)};
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.open.box header:after {
|
|
105
|
-
background: ${f(
|
|
105
|
+
background: ${f(p.casColorTertiary10ModeLight)};
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
header .left {
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
display: flex;
|
|
119
119
|
flex-direction: column;
|
|
120
120
|
gap: 24px;
|
|
121
|
-
color: ${f(
|
|
121
|
+
color: ${f(p.casColorTertiary2ModeLight)};
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.box .content {
|
|
@@ -147,24 +147,24 @@
|
|
|
147
147
|
* @license
|
|
148
148
|
* Copyright 2017 Google LLC
|
|
149
149
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const
|
|
150
|
+
*/const xe={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},be=n=>(...t)=>({_$litDirective$:n,values:t});class Ee{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
151
151
|
* @license
|
|
152
152
|
* Copyright 2018 Google LLC
|
|
153
153
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
154
|
-
*/const
|
|
154
|
+
*/const Se=be(class extends Ee{constructor(n){var t;if(super(n),n.type!==xe.ATTRIBUTE||n.name!=="class"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((e=this.nt)===null||e===void 0)&&e.has(o))&&this.it.add(o);return this.render(t)}const s=n.element.classList;this.it.forEach(o=>{o in t||(s.remove(o),this.it.delete(o))});for(const o in t){const r=!!t[o];r===this.it.has(o)||!((i=this.nt)===null||i===void 0)&&i.has(o)||(r?(s.add(o),this.it.add(o)):(s.remove(o),this.it.delete(o)))}return N}});function we({variant:n,open:t}){const e=Se({"accordion-container":!0,[n]:!0,open:t}),s=(()=>{if(window.matchMedia("(min-width: 768px)").matches)return"desktop";if(window.matchMedia("(max-width: 767px)").matches)return"mobile"})();return{accordionStyle:e,iconSize:{desktop:"24",mobile:"16"}[s]}}class L extends O{constructor(){super(),this.open=!1,this.variant="simple",this.title="",this.text=""}toggleAccordion(){this.open=!this.open,this.requestUpdate()}render(){const{open:t,title:e,text:i,content:s}=this,{accordionStyle:o,iconSize:r}=we({variant:this.variant,open:this.open}),a={true:"flat-minus",false:"flat-plus"};return Z`
|
|
155
155
|
<article class=${o}>
|
|
156
156
|
<header @click="${this.toggleAccordion}">
|
|
157
157
|
<div class="left">
|
|
158
|
-
${e!==""?
|
|
159
|
-
${i!==""?
|
|
158
|
+
${e!==""?Z` <cas-text variant="headline3">${e}</cas-text>`:""}
|
|
159
|
+
${i!==""?Z` <cas-text variant="footnote2">${i}</cas-text>`:""}
|
|
160
160
|
</div>
|
|
161
161
|
<cas-icon name="${a[t]}" size="${r}"></cas-icon>
|
|
162
162
|
</header>
|
|
163
|
-
${t?
|
|
163
|
+
${t?Z`
|
|
164
164
|
<div class="content">
|
|
165
|
-
${s!==""?
|
|
165
|
+
${s!==""?Z` <cas-text variant="body1" text="${s}"></cas-text>`:""}
|
|
166
166
|
<slot></slot>
|
|
167
167
|
</div>
|
|
168
168
|
`:""}
|
|
169
169
|
</article>
|
|
170
|
-
`}}Q(L,"styles",
|
|
170
|
+
`}}Q(L,"styles",ye),Q(L,"shadowRootOptions",{...O.shadowRootOptions,mode:"open"}),Q(L,"properties",{open:{type:Boolean},variant:{type:String},title:{type:String},text:{type:String},content:{type:String}}),customElements.define("cas-accordion",L),customElements.get("cas-accordion-element")||customElements.define("cas-accordion-element",class extends L{}),A.CasAccordion=L,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|