@momentum-design/components 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
package/dist/browser/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
"use strict";(()=>{var
|
1
|
+
"use strict";(()=>{var Ie=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var l=(r,t,e,s)=>{for(var i=s>1?void 0:s?ke(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&Ie(t,e,i),i};var et=globalThis,st=et.ShadowRoot&&(et.ShadyCSS===void 0||et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xt=Symbol(),Ft=new WeakMap,D=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==xt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(st&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Ft.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Ft.set(e,t))}return t}toString(){return this.cssText}},jt=r=>new D(typeof r=="string"?r:r+"",void 0,xt),f=(r,...t)=>{let e=r.length===1?r[0]:t.reduce((s,i,n)=>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.")})(i)+r[n+1],r[0]);return new D(e,r,xt)},vt=(r,t)=>{if(st)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),i=et.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},it=st?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return jt(e)})(r):r;var{is:He,defineProperty:De,getOwnPropertyDescriptor:qe,getOwnPropertyNames:Fe,getOwnPropertySymbols:je,getPrototypeOf:Ge}=Object,S=globalThis,Gt=S.trustedTypes,Ve=Gt?Gt.emptyScript:"",bt=S.reactiveElementPolyfillSupport,q=(r,t)=>r,F={toAttribute(r,t){switch(t){case Boolean:r=r?Ve:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},rt=(r,t)=>!He(r,t),Vt={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:rt},Wt,Bt;(Wt=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Bt=S.litPropertyMetadata)!=null||(S.litPropertyMetadata=new WeakMap);var E=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&De(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var o;let{get:i,set:n}=(o=qe(this.prototype,t))!=null?o:{get(){return this[e]},set(a){this[e]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){let c=i==null?void 0:i.call(this);n.call(this,a),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:Vt}static _$Ei(){if(this.hasOwnProperty(q("elementProperties")))return;let t=Ge(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(q("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(q("properties"))){let e=this.properties,s=[...Fe(e),...je(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(it(i))}else t!==void 0&&e.push(it(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return vt(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:F).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){var n;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=s.getPropertyOptions(i),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:F;this._$Em=i,this[i]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s){var i;if(t!==void 0){if(s!=null||(s=this.constructor.getPropertyOptions(t)),!((i=s.hasChanged)!=null?i:rt)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){var i;this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&((i=this._$Ej)!=null?i:this._$Ej=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,a]of n)a.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],a)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var o;return(o=n.hostUpdate)==null?void 0:o.call(n)}),this.update(e)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}},Zt;E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[q("elementProperties")]=new Map,E[q("finalized")]=new Map,bt==null||bt({ReactiveElement:E}),((Zt=S.reactiveElementVersions)!=null?Zt:S.reactiveElementVersions=[]).push("2.0.4");var We={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:rt},Be=(r=We,t,e)=>{let{kind:s,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,r),s==="accessor"){let{name:o}=e;return{set(a){let c=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,c,r)},init(a){return a!==void 0&&this.P(o,void 0,r),a}}}if(s==="setter"){let{name:o}=e;return function(a){let c=this[o];t.call(this,a),this.requestUpdate(o,c,r)}}throw Error("Unsupported decorator location: "+s)};function h(r){return(t,e)=>typeof e=="object"?Be(r,t,e):((s,i,n)=>{let o=i.hasOwnProperty(n);return i.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}function M(r){return h({...r,state:!0,attribute:!1})}var Ze={PREFIX:"mdc",SEPARATOR:"-"},Xe={NAMESPACE:Ze},Et=Xe;var Ye=r=>[Et.NAMESPACE.PREFIX,r].join(Et.NAMESPACE.SEPARATOR),y={constructTagName:Ye};var nt=y.constructTagName("themeprovider"),At={THEMECLASS:"mds-theme-stable-darkWebex"};var G=globalThis,at=G.trustedTypes,Xt=at?at.createPolicy("lit-html",{createHTML:r=>r}):void 0,se="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,ie="?"+C,Ke=`<${ie}>`,R=document,V=()=>R.createComment(""),W=r=>r===null||typeof r!="object"&&typeof r!="function",Pt=Array.isArray,Je=r=>Pt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",_t=`[
|
2
2
|
\f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yt=/-->/g,Kt=/>/g,P=RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,Qt=/"/g,re=/^(?:script|style|textarea|title)$/i,Ut=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),g=Ut(1),Js=Ut(2),Qs=Ut(3),A=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),te=new WeakMap,U=R.createTreeWalker(R,129);function oe(r,t){if(!Pt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xt!==void 0?Xt.createHTML(t):t}var Qe=(r,t)=>{let e=r.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",o=j;for(let a=0;a<e;a++){let l=r[a],m,d,p=-1,b=0;for(;b<l.length&&(o.lastIndex=b,d=o.exec(l),d!==null);)b=o.lastIndex,o===j?d[1]==="!--"?o=Yt:d[1]!==void 0?o=Kt:d[2]!==void 0?(re.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=P):d[3]!==void 0&&(o=P):o===P?d[0]===">"?(o=i!=null?i:j,p=-1):d[1]===void 0?p=-2:(p=o.lastIndex-d[2].length,m=d[1],o=d[3]===void 0?P:d[3]==='"'?Qt:Jt):o===Qt||o===Jt?o=P:o===Yt||o===Kt?o=j:(o=P,i=void 0);let $=o===P&&r[a+1].startsWith("/>")?" ":"";n+=o===j?l+Ke:p>=0?(s.push(m),l.slice(0,p)+se+l.slice(p)+C+$):l+C+(p===-2?a:$)}return[oe(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0,a=t.length-1,l=this.parts,[m,d]=Qe(t,e);if(this.el=r.createElement(m,s),U.currentNode=this.el.content,e===2||e===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=U.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(se)){let b=d[o++],$=i.getAttribute(p).split(C),tt=/([.?@])?(.*)/.exec(b);l.push({type:1,index:n,name:tt[2],strings:$,ctor:tt[1]==="."?Ct:tt[1]==="?"?Tt:tt[1]==="@"?Nt:z}),i.removeAttribute(p)}else p.startsWith(C)&&(l.push({type:6,index:n}),i.removeAttribute(p));if(re.test(i.tagName)){let p=i.textContent.split(C),b=p.length-1;if(b>0){i.textContent=at?at.emptyScript:"";for(let $=0;$<b;$++)i.append(p[$],V()),U.nextNode(),l.push({type:2,index:++n});i.append(p[b],V())}}}else if(i.nodeType===8)if(i.data===ie)l.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(C,p+1))!==-1;)l.push({type:7,index:n}),p+=C.length-1}n++}}static createElement(t,e){let s=R.createElement("template");return s.innerHTML=t,s}};function O(r,t,e=r,s){var o,a,l;if(t===A)return t;let i=s!==void 0?(o=e.o)==null?void 0:o[s]:e.l,n=W(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?((l=e.o)!=null?l:e.o=[])[s]=i:e.l=i),i!==void 0&&(t=O(r,i._$AS(r,t.values),i,s)),t}var St=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var m;let{el:{content:e},parts:s}=this._$AD,i=((m=t==null?void 0:t.creationScope)!=null?m:R).importNode(e,!0);U.currentNode=i;let n=U.nextNode(),o=0,a=0,l=s[0];for(;l!==void 0;){if(o===l.index){let d;l.type===2?d=new Z(n,n.nextSibling,this,t):l.type===1?d=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(d=new wt(n,this,t)),this._$AV.push(d),l=s[++a]}o!==(l==null?void 0:l.index)&&(n=U.nextNode(),o++)}return U.currentNode=R,i}p(t){let e=0;for(let 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++}},Z=class r{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this.v}constructor(t,e,s,i){var n;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=O(this,t,e),W(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.$(t):t.nodeType!==void 0?this.T(t):Je(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(R.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(oe(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let o=new St(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=te.get(t.strings);return e===void 0&&te.set(t.strings,e=new B(t)),e}k(t){Pt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new r(this.O(V()),this.O(V()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}},z=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){let n=this.strings,o=!1;if(n===void 0)t=O(this,t,e,0),o=!W(t)||t!==this._$AH&&t!==A,o&&(this._$AH=t);else{let a=t,l,m;for(t=n[0],l=0;l<n.length-1;l++)m=O(this,a[s+l],e,l),m===A&&(m=this._$AH[l]),o||(o=!W(m)||m!==this._$AH[l]),m===u?t=u:t!==u&&(t+=(m!=null?m:"")+n[l+1]),this._$AH[l]=m}o&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},Ct=class extends z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},Tt=class extends z{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},Nt=class extends z{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var o;if((t=(o=O(this,t,e,0))!=null?o:u)===A)return;let s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&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?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},wt=class{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){O(this,t)}};var $t=G.litHtmlPolyfillSupport,ee;$t==null||$t(B,Z),((ee=G.litHtmlVersions)!=null?ee:G.litHtmlVersions=[]).push("3.2.0");var ne=(r,t,e)=>{var n,o;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let a=(o=e==null?void 0:e.renderBefore)!=null?o:null;s._$litPart$=i=new Z(t.insertBefore(V(),a),a,void 0,e!=null?e:{})}return i._$AI(r),i};var T=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=ne(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return A}},ae;T._$litElement$=!0,T.finalized=!0,(ae=globalThis.litElementHydrateSupport)==null||ae.call(globalThis,{LitElement:T});var Rt=globalThis.litElementPolyfillSupport;Rt==null||Rt({LitElement:T});var le;((le=globalThis.litElementVersions)!=null?le:globalThis.litElementVersions=[]).push("4.1.0");var Lt=class extends T{static register(t){customElements.get(t)||customElements.define(t,this)}},ce=Lt;var v=ce;var N=class extends Event{constructor(t,e,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=s!=null?s:!1}};var k=class{constructor(t,e,s,i){var n;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,a)),this.unsubscribe=a},this.host=t,e.context!==void 0){let o=e;this.context=o.context,this.callback=o.callback,this.subscribe=(n=o.subscribe)!=null?n:!1}else this.context=e,this.callback=s,this.subscribe=i!=null?i:!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new N(this.context,this.t,this.subscribe))}};var lt=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){let s=e||!Object.is(t,this.o);this.o=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:s}]of this.subscriptions)e(this.o,s)},t!==void 0&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});let{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var Mt=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},I=class extends lt{constructor(t,e,s){var i,n;super(e.context!==void 0?e.initialValue:s),this.onContextRequest=o=>{let a=o.composedPath()[0];o.context===this.context&&a!==this.host&&(o.stopPropagation(),this.addCallback(o.callback,a,o.subscribe))},this.onProviderRequest=o=>{let a=o.composedPath()[0];if(o.context!==this.context||a===this.host)return;let l=new Set;for(let[m,{consumerHost:d}]of this.subscriptions)l.has(m)||(l.add(m),d.dispatchEvent(new N(this.context,m,!0)));o.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(n=(i=this.host).addController)==null||n.call(i,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Mt(this.context))}};var ts=f`
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,Qt=/"/g,re=/^(?:script|style|textarea|title)$/i,Ut=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),g=Ut(1),Js=Ut(2),Qs=Ut(3),A=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),te=new WeakMap,U=R.createTreeWalker(R,129);function oe(r,t){if(!Pt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xt!==void 0?Xt.createHTML(t):t}var Qe=(r,t)=>{let e=r.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",o=j;for(let a=0;a<e;a++){let c=r[a],m,d,p=-1,b=0;for(;b<c.length&&(o.lastIndex=b,d=o.exec(c),d!==null);)b=o.lastIndex,o===j?d[1]==="!--"?o=Yt:d[1]!==void 0?o=Kt:d[2]!==void 0?(re.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=P):d[3]!==void 0&&(o=P):o===P?d[0]===">"?(o=i!=null?i:j,p=-1):d[1]===void 0?p=-2:(p=o.lastIndex-d[2].length,m=d[1],o=d[3]===void 0?P:d[3]==='"'?Qt:Jt):o===Qt||o===Jt?o=P:o===Yt||o===Kt?o=j:(o=P,i=void 0);let $=o===P&&r[a+1].startsWith("/>")?" ":"";n+=o===j?c+Ke:p>=0?(s.push(m),c.slice(0,p)+se+c.slice(p)+C+$):c+C+(p===-2?a:$)}return[oe(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0,a=t.length-1,c=this.parts,[m,d]=Qe(t,e);if(this.el=r.createElement(m,s),U.currentNode=this.el.content,e===2||e===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=U.nextNode())!==null&&c.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(se)){let b=d[o++],$=i.getAttribute(p).split(C),tt=/([.?@])?(.*)/.exec(b);c.push({type:1,index:n,name:tt[2],strings:$,ctor:tt[1]==="."?Ct:tt[1]==="?"?Tt:tt[1]==="@"?Nt:z}),i.removeAttribute(p)}else p.startsWith(C)&&(c.push({type:6,index:n}),i.removeAttribute(p));if(re.test(i.tagName)){let p=i.textContent.split(C),b=p.length-1;if(b>0){i.textContent=at?at.emptyScript:"";for(let $=0;$<b;$++)i.append(p[$],V()),U.nextNode(),c.push({type:2,index:++n});i.append(p[b],V())}}}else if(i.nodeType===8)if(i.data===ie)c.push({type:2,index:n});else{let p=-1;for(;(p=i.data.indexOf(C,p+1))!==-1;)c.push({type:7,index:n}),p+=C.length-1}n++}}static createElement(t,e){let s=R.createElement("template");return s.innerHTML=t,s}};function O(r,t,e=r,s){var o,a,c;if(t===A)return t;let i=s!==void 0?(o=e.o)==null?void 0:o[s]:e.l,n=W(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?((c=e.o)!=null?c:e.o=[])[s]=i:e.l=i),i!==void 0&&(t=O(r,i._$AS(r,t.values),i,s)),t}var St=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var m;let{el:{content:e},parts:s}=this._$AD,i=((m=t==null?void 0:t.creationScope)!=null?m:R).importNode(e,!0);U.currentNode=i;let n=U.nextNode(),o=0,a=0,c=s[0];for(;c!==void 0;){if(o===c.index){let d;c.type===2?d=new Z(n,n.nextSibling,this,t):c.type===1?d=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(d=new wt(n,this,t)),this._$AV.push(d),c=s[++a]}o!==(c==null?void 0:c.index)&&(n=U.nextNode(),o++)}return U.currentNode=R,i}p(t){let e=0;for(let 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++}},Z=class r{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this.v}constructor(t,e,s,i){var n;this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this.v=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=O(this,t,e),W(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.$(t):t.nodeType!==void 0?this.T(t):Je(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(R.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(oe(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let o=new St(i,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=te.get(t.strings);return e===void 0&&te.set(t.strings,e=new B(t)),e}k(t){Pt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new r(this.O(V()),this.O(V()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}},z=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){let n=this.strings,o=!1;if(n===void 0)t=O(this,t,e,0),o=!W(t)||t!==this._$AH&&t!==A,o&&(this._$AH=t);else{let a=t,c,m;for(t=n[0],c=0;c<n.length-1;c++)m=O(this,a[s+c],e,c),m===A&&(m=this._$AH[c]),o||(o=!W(m)||m!==this._$AH[c]),m===u?t=u:t!==u&&(t+=(m!=null?m:"")+n[c+1]),this._$AH[c]=m}o&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},Ct=class extends z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}},Tt=class extends z{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}},Nt=class extends z{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var o;if((t=(o=O(this,t,e,0))!=null?o:u)===A)return;let s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&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?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},wt=class{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){O(this,t)}};var $t=G.litHtmlPolyfillSupport,ee;$t==null||$t(B,Z),((ee=G.litHtmlVersions)!=null?ee:G.litHtmlVersions=[]).push("3.2.0");var ne=(r,t,e)=>{var n,o;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let a=(o=e==null?void 0:e.renderBefore)!=null?o:null;s._$litPart$=i=new Z(t.insertBefore(V(),a),a,void 0,e!=null?e:{})}return i._$AI(r),i};var T=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=ne(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return A}},ae;T._$litElement$=!0,T.finalized=!0,(ae=globalThis.litElementHydrateSupport)==null||ae.call(globalThis,{LitElement:T});var Rt=globalThis.litElementPolyfillSupport;Rt==null||Rt({LitElement:T});var ce;((ce=globalThis.litElementVersions)!=null?ce:globalThis.litElementVersions=[]).push("4.1.0");var Lt=class extends T{static register(t){customElements.get(t)||customElements.define(t,this)}},le=Lt;var v=le;var N=class extends Event{constructor(t,e,s){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=s!=null?s:!1}};var I=class{constructor(t,e,s,i){var n;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(o,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=o,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(o,a)),this.unsubscribe=a},this.host=t,e.context!==void 0){let o=e;this.context=o.context,this.callback=o.callback,this.subscribe=(n=o.subscribe)!=null?n:!1}else this.context=e,this.callback=s,this.subscribe=i!=null?i:!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new N(this.context,this.t,this.subscribe))}};var ct=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){let s=e||!Object.is(t,this.o);this.o=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:s}]of this.subscriptions)e(this.o,s)},t!==void 0&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});let{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}};var Mt=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},k=class extends ct{constructor(t,e,s){var i,n;super(e.context!==void 0?e.initialValue:s),this.onContextRequest=o=>{let a=o.composedPath()[0];o.context===this.context&&a!==this.host&&(o.stopPropagation(),this.addCallback(o.callback,a,o.subscribe))},this.onProviderRequest=o=>{let a=o.composedPath()[0];if(o.context!==this.context||a===this.host)return;let c=new Set;for(let[m,{consumerHost:d}]of this.subscriptions)c.has(m)||(c.add(m),d.dispatchEvent(new N(this.context,m,!0)));o.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(n=(i=this.host).addController)==null||n.call(i,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new Mt(this.context))}};var ts=f`
|
4
4
|
:host {
|
5
5
|
border: 0;
|
6
6
|
display: block;
|
@@ -9,16 +9,15 @@
|
|
9
9
|
padding: 0;
|
10
10
|
width: 100%;
|
11
11
|
}
|
12
|
-
`,pe=ts;var
|
12
|
+
`,pe=ts;var lt=class extends v{constructor({context:t,initialValue:e}){super(),this.context=new k(this,{context:t,initialValue:e})}render(){return this.updateContext(),g`<slot></slot>`}};lt.styles=pe;var de=lt;var X=de;var ht=class{constructor(t){this.themeclass=t}};ht.context=nt;var pt=ht;var es=f`
|
13
13
|
:host {
|
14
|
-
// todo: use type tokens once the full set with fallbacks is available
|
15
14
|
--mdc-themeprovider-font-family: "Momentum";
|
16
15
|
--mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);
|
17
16
|
|
18
17
|
font-family: var(--mdc-themeprovider-font-family);
|
19
18
|
color: var(--mdc-themeprovider-color-default);
|
20
19
|
}
|
21
|
-
`,me=es;var H=class extends X{constructor(){super({context:pt.context,initialValue:new pt(At.THEMECLASS)});this.themeclass=At.THEMECLASS}static get Context(){return pt.context}updated(e){super.updated(e),e.has("themeclass")&&(this.setThemeInClassList(),this.currentThemeClass=this.themeclass)}updateContext(){this.context.value.themeclass!==this.themeclass&&(this.context.value.themeclass=this.themeclass,this.context.updateObservers())}setThemeInClassList(){this.currentThemeClass&&this.classList.remove(...this.currentThemeClass.split(" ")),this.themeclass&&this.classList.add(...this.themeclass.split(" "))}};H.styles=me,
|
20
|
+
`,me=es;var H=class extends X{constructor(){super({context:pt.context,initialValue:new pt(At.THEMECLASS)});this.themeclass=At.THEMECLASS}static get Context(){return pt.context}updated(e){super.updated(e),e.has("themeclass")&&(this.setThemeInClassList(),this.currentThemeClass=this.themeclass)}updateContext(){this.context.value.themeclass!==this.themeclass&&(this.context.value.themeclass=this.themeclass,this.context.updateObservers())}setThemeInClassList(){this.currentThemeClass&&this.classList.remove(...this.currentThemeClass.split(" ")),this.themeclass&&this.classList.add(...this.themeclass.split(" "))}};H.styles=me,l([M()],H.prototype,"currentThemeClass",2),l([h({type:String})],H.prototype,"themeclass",2);var Ot=H;Ot.register(nt);var ss=Ot;var dt=f`
|
22
21
|
:host {
|
23
22
|
align-items: center;
|
24
23
|
display: flex;
|
@@ -32,7 +31,7 @@
|
|
32
31
|
width: 100%;
|
33
32
|
fill: currentColor;
|
34
33
|
}
|
35
|
-
`],ue=is;var rs=r=>{let{host:t,context:e,subscribe:s}=r;return new
|
34
|
+
`],ue=is;var rs=r=>{let{host:t,context:e,subscribe:s}=r;return new I(t,{context:e,subscribe:s!=null?s:!0})},os={consume:rs},fe=os;var mt=y.constructTagName("iconprovider"),ge=["svg"],ye=["em","rem","px"],Y={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",LENGTH_UNIT_SIZE:{px:16,em:1,rem:1}};var ut=class{};ut.context=mt;var ft=ut;var L=class extends X{constructor(){super({context:ft.context,initialValue:new ft});this.fileExtension=Y.FILE_EXTENSION;this.lengthUnit=Y.LENGTH_UNIT;this.size=Y.LENGTH_UNIT_SIZE[Y.LENGTH_UNIT]}static get Context(){return ft.context}updateValuesInContext(){this.fileExtension&&ge.includes(this.fileExtension)&&(this.context.value.fileExtension=this.fileExtension),this.context.value.url=this.url,this.lengthUnit&&ye.includes(this.lengthUnit)&&(this.context.value.lengthUnit=this.lengthUnit),this.context.value.size=this.size}updateContext(){let e=!1;(this.context.value.fileExtension!==this.fileExtension||this.context.value.url!==this.url||this.context.value.lengthUnit!==this.lengthUnit||this.context.value.size!==this.size)&&(this.updateValuesInContext(),e=!0),e&&this.context.updateObservers()}};l([h({type:String})],L.prototype,"url",2),l([h({type:String,attribute:"file-extension",reflect:!0})],L.prototype,"fileExtension",2),l([h({type:String,attribute:"length-unit",reflect:!0})],L.prototype,"lengthUnit",2),l([h({type:Number,reflect:!0})],L.prototype,"size",2);var K=L;var xe=async(r,t,e)=>fetch(`${r}/${t}.${e}`).then(s=>{if(!s.ok)throw new Error("There was a problem while fetching the icon!");return s.text()}).then(s=>new DOMParser().parseFromString(s,"text/html").body.children[0]);var ve=y.constructTagName("icon"),zt={NAME:void 0,SIZE:1};var x=class extends v{constructor(){super(...arguments);this.name=zt.NAME;this.role=null;this.ariaLabel=null;this.iconProviderContext=fe.consume({host:this,context:K.Context})}async getIconData(){if(this.iconProviderContext.value){let{fileExtension:e,url:s}=this.iconProviderContext.value;if(s&&e&&this.name){let i=await xe(s,this.name,e);this.iconData=i,this.setRoleOnIcon(),this.setAriaLabelOnIcon()}}}updateSize(){var e;if(this.computedIconSize&&(this.lengthUnit||this.lengthUnitFromContext)){let s=`${this.computedIconSize}${(e=this.lengthUnit)!=null?e:this.lengthUnitFromContext}`;this.style.width=s,this.style.height=s}}setRoleOnIcon(){var e,s;this.role?(e=this.iconData)==null||e.setAttribute("role",this.role):(s=this.iconData)==null||s.removeAttribute("role")}setAriaLabelOnIcon(){var e,s;this.ariaLabel?(e=this.iconData)==null||e.setAttribute("aria-label",this.ariaLabel):(s=this.iconData)==null||s.removeAttribute("aria-label")}get computedIconSize(){var e,s;return(s=(e=this.size)!=null?e:this.sizeFromContext)!=null?s:zt.SIZE}updated(e){var s,i,n,o;super.updated(e),e.has("name")&&this.getIconData().catch(a=>{console.error(a)}),e.has("role")&&this.setRoleOnIcon(),e.has("ariaLabel")&&this.setAriaLabelOnIcon(),(e.has("size")||e.has("lengthUnit"))&&this.updateSize(),this.lengthUnitFromContext!==((s=this.iconProviderContext.value)==null?void 0:s.lengthUnit)&&(this.lengthUnitFromContext=(i=this.iconProviderContext.value)==null?void 0:i.lengthUnit,this.updateSize()),this.sizeFromContext!==((n=this.iconProviderContext.value)==null?void 0:n.size)&&(this.sizeFromContext=(o=this.iconProviderContext.value)==null?void 0:o.size,this.updateSize())}render(){return g` ${this.iconData} `}};x.styles=ue,l([M()],x.prototype,"iconData",2),l([M()],x.prototype,"lengthUnitFromContext",2),l([M()],x.prototype,"sizeFromContext",2),l([h({type:String,reflect:!0})],x.prototype,"name",2),l([h({type:Number})],x.prototype,"size",2),l([h({type:String,attribute:"length-unit"})],x.prototype,"lengthUnit",2),l([h({type:String})],x.prototype,"role",2),l([h({type:String,attribute:"aria-label"})],x.prototype,"ariaLabel",2);var It=x;It.register(ve);var ns=It;K.register(mt);var as=K;var J=r=>r!=null?r:u;var cs=f`
|
36
35
|
:host {
|
37
36
|
display: flex;
|
38
37
|
justify-content: center;
|
@@ -47,12 +46,12 @@
|
|
47
46
|
width: inherit;
|
48
47
|
object-fit: cover;
|
49
48
|
}
|
50
|
-
`,be=
|
49
|
+
`,be=cs;var Ee=y.constructTagName("avatar"),Ae="rem",kt={TYPE:"photo",SIZE:1.5};var w=class extends v{constructor(){super(...arguments);this.type=kt.TYPE;this.size=kt.SIZE}updateSize(){if(this.size){let e=`${this.size}${Ae}`;this.style.width=e,this.style.height=e}}updated(e){super.updated(e),e.has("size")&&this.updateSize()}photoTemplate(){return g`
|
51
50
|
<img
|
52
51
|
src="${J(this.src)}"
|
53
52
|
alt="${J(this.alt)}"
|
54
53
|
/>
|
55
|
-
`}render(){let e;return this.type==="photo"?e=this.photoTemplate():e=g``,g`${e}`}};w.styles=be,
|
54
|
+
`}render(){let e;return this.type==="photo"?e=this.photoTemplate():e=g``,g`${e}`}};w.styles=be,l([h({type:String,reflect:!0})],w.prototype,"type",2),l([h({type:String})],w.prototype,"alt",2),l([h({type:String})],w.prototype,"src",2),l([h({type:Number})],w.prototype,"size",2);var Ht=w;Ht.register(Ee);var ls=Ht;var _e={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$e=r=>(...t)=>({_$litDirective$:r,values:t}),gt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this.t=t,this._$AM=e,this.i=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Se="important",hs=" !"+Se,Ce=$e(class extends gt{constructor(r){var t;if(super(r),r.type!==_e.ATTRIBUTE||r.name!=="style"||((t=r.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(r){return Object.keys(r).reduce((t,e)=>{let s=r[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(r,[t]){let{style:e}=r.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let i=t[s];if(i!=null){this.ft.add(s);let n=typeof i=="string"&&i.endsWith(hs);s.includes("-")||n?e.setProperty(s,n?i.slice(0,-11):i,n?Se:""):e[s]=i}}return A}});var Te=y.constructTagName("badge"),Ne="warning-badge-filled",yt={TYPE:"regular",SIZE:1,LENGTH_UNIT:"rem"};var ps=[dt,f`
|
56
55
|
:host {
|
57
56
|
--mdc-badge-icon-background-color: var(--mds-color-theme-background-accent-normal);
|
58
57
|
--mdc-badge-icon-color: var(--mds-color-theme-common-text-primary-normal);
|
@@ -73,7 +72,7 @@
|
|
73
72
|
}
|
74
73
|
`],we=ps;var _=class extends v{constructor(){super(...arguments);this.type=yt.TYPE;this.size=yt.SIZE;this.lengthUnit=yt.LENGTH_UNIT}updateSize(){}updated(e){super.updated(e),(e.has("size")||e.has("lengthUnit"))&&this.updateSize()}iconTemplate(){return g`<div class="mdc-badge-icon-container">
|
75
74
|
<mdc-icon name=${J(this.iconName)} size="100" length-unit="%"></mdc-icon>
|
76
|
-
</div>`}textTemplate(){return g`${this.text}`}warningTemplate(){return g` <mdc-icon name="${Ne}" class="mdc-badge-warning"></mdc-icon> `}render(){let e,s=`${this.size}${this.lengthUnit}`,i={width:s,height:s};switch(this.type){case"regular":e=g``;break;case"icon":e=this.iconTemplate();break;case"text":e=this.textTemplate(),i={height:i.height};break;case"warning":e=this.warningTemplate();break;default:e=g``;break}return g`<div class="mdc-badge-container" style=${Ce(i)}>${e}</div>`}};_.styles=we,
|
75
|
+
</div>`}textTemplate(){return g`${this.text}`}warningTemplate(){return g` <mdc-icon name="${Ne}" class="mdc-badge-warning"></mdc-icon> `}render(){let e,s=`${this.size}${this.lengthUnit}`,i={width:s,height:s};switch(this.type){case"regular":e=g``;break;case"icon":e=this.iconTemplate();break;case"text":e=this.textTemplate(),i={height:i.height};break;case"warning":e=this.warningTemplate();break;default:e=g``;break}return g`<div class="mdc-badge-container" style=${Ce(i)}>${e}</div>`}};_.styles=we,l([h({type:String,reflect:!0})],_.prototype,"type",2),l([h({type:Number})],_.prototype,"size",2),l([h({type:String,attribute:"length-unit"})],_.prototype,"lengthUnit",2),l([h({type:String,attribute:"icon-name"})],_.prototype,"iconName",2),l([h({type:String})],_.prototype,"text",2);var Dt=_;Dt.register(Te);var ds=Dt;var Pe=f`
|
77
76
|
:host([type="heading-1"]) {
|
78
77
|
font-size: 7.5rem;
|
79
78
|
font-style: normal;
|
@@ -174,7 +173,7 @@
|
|
174
173
|
display: block;
|
175
174
|
font-family: var(--mdc-text-font-family);
|
176
175
|
}
|
177
|
-
`,Pe],Ue=ms;var Re=r=>{let t=r.split("-");return{firstPart:t[0],secondPart:t[1]}},Le=r=>{let{firstPart:t,secondPart:e}=Re(r);return t==="heading"&&+e>0&&+e<7},Me=r=>r?Le(r)?"heading":"paragraph":null,Oe=r=>{if(r&&Le(r)){let{secondPart:t}=Re(r);return t}return null};var Q=class extends v{handleTypeChanged(){this.role=Me(this.type),this.ariaLevel=Oe(this.type)}updated(t){super.updated(t),t.has("type")&&this.handleTypeChanged()}render(){return g`<slot></slot>`}};Q.styles=Ue,
|
176
|
+
`,Pe],Ue=ms;var Re=r=>{let t=r.split("-");return{firstPart:t[0],secondPart:t[1]}},Le=r=>{let{firstPart:t,secondPart:e}=Re(r);return t==="heading"&&+e>0&&+e<7},Me=r=>r?Le(r)?"heading":"paragraph":null,Oe=r=>{if(r&&Le(r)){let{secondPart:t}=Re(r);return t}return null};var Q=class extends v{handleTypeChanged(){this.role=Me(this.type),this.ariaLevel=Oe(this.type)}updated(t){super.updated(t),t.has("type")&&this.handleTypeChanged()}render(){return g`<slot></slot>`}};Q.styles=Ue,l([h({attribute:"type",reflect:!0,type:String})],Q.prototype,"type",2);var qt=Q;var ze=y.constructTagName("text");qt.register(ze);var us=qt;})();
|
178
177
|
/*! Bundled license information:
|
179
178
|
|
180
179
|
@lit/reactive-element/decorators/custom-element.js:
|