@momentum-design/components 0.27.6 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +314 -131
- package/dist/browser/index.js.map +4 -4
- package/dist/components/button/button.styles.js +1 -0
- package/dist/components/buttonsimple/buttonsimple.component.d.ts +5 -0
- package/dist/components/buttonsimple/buttonsimple.component.js +10 -0
- package/dist/components/modalcontainer/modalcontainer.component.d.ts +9 -3
- package/dist/components/modalcontainer/modalcontainer.component.js +26 -15
- package/dist/components/modalcontainer/modalcontainer.constants.d.ts +2 -5
- package/dist/components/modalcontainer/modalcontainer.constants.js +3 -6
- package/dist/components/modalcontainer/modalcontainer.styles.js +6 -6
- package/dist/components/modalcontainer/modalcontainer.types.d.ts +1 -2
- package/dist/components/popover/index.d.ts +9 -0
- package/dist/components/popover/index.js +6 -0
- package/dist/components/popover/popover.component.d.ts +256 -0
- package/dist/components/popover/popover.component.js +675 -0
- package/dist/components/popover/popover.constants.d.ts +44 -0
- package/dist/components/popover/popover.constants.js +46 -0
- package/dist/components/popover/popover.events.d.ts +34 -0
- package/dist/components/popover/popover.events.js +47 -0
- package/dist/components/popover/popover.stack.d.ts +45 -0
- package/dist/components/popover/popover.stack.js +55 -0
- package/dist/components/popover/popover.styles.d.ts +2 -0
- package/dist/components/popover/popover.styles.js +109 -0
- package/dist/components/popover/popover.types.d.ts +4 -0
- package/dist/components/popover/popover.types.js +1 -0
- package/dist/components/popover/popover.utils.d.ts +48 -0
- package/dist/components/popover/popover.utils.js +156 -0
- package/dist/custom-elements.json +4135 -2187
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +2 -1
- package/dist/react/popover/index.d.ts +24 -0
- package/dist/react/popover/index.js +33 -0
- package/dist/utils/mixins/DataAriaDescribedbyMixin.d.ts +6 -0
- package/dist/utils/mixins/DataAriaDescribedbyMixin.js +30 -0
- package/dist/utils/mixins/DataAriaLabelledbyMixin.d.ts +6 -0
- package/dist/utils/mixins/DataAriaLabelledbyMixin.js +29 -0
- package/dist/utils/mixins/FocusTrapMixin.d.ts +9 -0
- package/dist/utils/mixins/FocusTrapMixin.js +323 -0
- package/package.json +2 -1
package/dist/browser/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
"use strict";(()=>{var
|
2
|
-
\f\r]`,
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
1
|
+
"use strict";(()=>{var Bs=Object.defineProperty;var Gs=Object.getOwnPropertyDescriptor;var c=(o,t,e,r)=>{for(var i=r>1?void 0:r?Gs(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Bs(t,e,i),i};var lr=globalThis,cr=lr.ShadowRoot&&(lr.ShadyCSS===void 0||lr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,no=Symbol(),pi=new WeakMap,Ot=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==no)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(cr&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=pi.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&pi.set(e,t))}return t}toString(){return this.cssText}},hi=o=>new Ot(typeof o=="string"?o:o+"",void 0,no),g=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,n)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1],o[0]);return new Ot(e,o,no)},so=(o,t)=>{if(cr)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=lr.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},dr=cr?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return hi(e)})(o):o;var{is:Ys,defineProperty:Ws,getOwnPropertyDescriptor:qs,getOwnPropertyNames:Xs,getOwnPropertySymbols:Zs,getPrototypeOf:js}=Object,Oe=globalThis,ui=Oe.trustedTypes,Ks=ui?ui.emptyScript:"",ao=Oe.reactiveElementPolyfillSupport,zt=(o,t)=>o,Mt={toAttribute(o,t){switch(t){case Boolean:o=o?Ks:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},mr=(o,t)=>!Ys(o,t),fi={attribute:!0,type:String,converter:Mt,reflect:!1,hasChanged:mr},gi,vi;(gi=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(vi=Oe.litPropertyMetadata)!=null||(Oe.litPropertyMetadata=new WeakMap);var ye=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=fi){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&Ws(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var s;let{get:i,set:n}=(s=qs(this.prototype,t))!=null?s:{get(){return this[e]},set(a){this[e]=a}};return{get(){return i==null?void 0:i.call(this)},set(a){let l=i==null?void 0:i.call(this);n.call(this,a),this.requestUpdate(t,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:fi}static _$Ei(){if(this.hasOwnProperty(zt("elementProperties")))return;let t=js(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zt("properties"))){let e=this.properties,r=[...Xs(e),...Zs(e)];for(let i of r)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(dr(i))}else t!==void 0&&e.push(dr(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,r;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return so(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostConnected)==null?void 0:i.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$EC(t,e){var n;let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let s=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Mt).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var n;let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let s=r.getPropertyOptions(i),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((n=s.converter)==null?void 0:n.fromAttribute)!==void 0?s.converter:Mt;this._$Em=i,this[i]=a.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,r){var i;if(t!==void 0){if(r!=null||(r=this.constructor.getPropertyOptions(t)),!((i=r.hasChanged)!=null?i:mr)(this[t],e))return;this.P(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,r){var i;this._$AL.has(t)||this._$AL.set(t,e),r.reflect===!0&&this._$Em!==t&&((i=this._$Ej)!=null?i:this._$Ej=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((r=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,a]of this._$Ep)this[s]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,a]of n)a.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],a)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(n=>{var s;return(s=n.hostUpdate)==null?void 0:s.call(n)}),this.update(e)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}},bi;ye.elementStyles=[],ye.shadowRootOptions={mode:"open"},ye[zt("elementProperties")]=new Map,ye[zt("finalized")]=new Map,ao==null||ao({ReactiveElement:ye}),((bi=Oe.reactiveElementVersions)!=null?bi:Oe.reactiveElementVersions=[]).push("2.0.4");var Qs={attribute:!0,type:String,converter:Mt,reflect:!1,hasChanged:mr},Js=(o=Qs,t,e)=>{let{kind:r,metadata:i}=e,n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),n.set(e.name,o),r==="accessor"){let{name:s}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,l,o)},init(a){return a!==void 0&&this.P(s,void 0,o),a}}}if(r==="setter"){let{name:s}=e;return function(a){let l=this[s];t.call(this,a),this.requestUpdate(s,l,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?Js(o,t,e):((r,i,n)=>{let s=i.hasOwnProperty(n);return i.constructor.createProperty(n,s?{...r,wrapped:!0}:r),s?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}function Y(o){return d({...o,state:!0,attribute:!1})}var Ye=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function yi(o,t){return(e,r,i)=>{let n=s=>{var a,l;return(l=(a=s.renderRoot)==null?void 0:a.querySelector(o))!=null?l:null};if(t){let{get:s,set:a}=typeof r=="object"?e:i!=null?i:(()=>{let l=Symbol();return{get(){return this[l]},set(m){this[l]=m}}})();return Ye(e,r,{get(){let l=s.call(this);return l===void 0&&(l=n(this),(l!==null||this.hasUpdated)&&a.call(this,l)),l}})}return Ye(e,r,{get(){return n(this)}})}}var ea={PREFIX:"mdc",SEPARATOR:"-"},ta={NAMESPACE:ea},lo=ta;var ra=o=>[lo.NAMESPACE.PREFIX,o].join(lo.NAMESPACE.SEPARATOR),y={constructTagName:ra};var pr=y.constructTagName("themeprovider"),co={THEMECLASS:"mds-theme-stable-darkWebex"};var $t=globalThis,hr=$t.trustedTypes,xi=hr?hr.createPolicy("lit-html",{createHTML:o=>o}):void 0,ho="$lit$",xe=`lit$${Math.random().toFixed(9).slice(2)}$`,uo="?"+xe,oa=`<${uo}>`,Xe=document,Pt=()=>Xe.createComment(""),Ut=o=>o===null||typeof o!="object"&&typeof o!="function",fo=Array.isArray,wi=o=>fo(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",mo=`[
|
2
|
+
\f\r]`,Dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ei=/-->/g,Ti=/>/g,We=RegExp(`>|${mo}(?:([^\\s"'>=/]+)(${mo}*=${mo}*(?:[^
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ai=/'/g,Si=/"/g,Ci=/^(?:script|style|textarea|title)$/i,go=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),u=go(1),yc=go(2),xc=go(3),Ee=Symbol.for("lit-noChange"),x=Symbol.for("lit-nothing"),_i=new WeakMap,qe=Xe.createTreeWalker(Xe,129);function Li(o,t){if(!fo(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return xi!==void 0?xi.createHTML(t):t}var Ri=(o,t)=>{let e=o.length-1,r=[],i,n=t===2?"<svg>":t===3?"<math>":"",s=Dt;for(let a=0;a<e;a++){let l=o[a],m,p,h=-1,v=0;for(;v<l.length&&(s.lastIndex=v,p=s.exec(l),p!==null);)v=s.lastIndex,s===Dt?p[1]==="!--"?s=Ei:p[1]!==void 0?s=Ti:p[2]!==void 0?(Ci.test(p[2])&&(i=RegExp("</"+p[2],"g")),s=We):p[3]!==void 0&&(s=We):s===We?p[0]===">"?(s=i!=null?i:Dt,h=-1):p[1]===void 0?h=-2:(h=s.lastIndex-p[2].length,m=p[1],s=p[3]===void 0?We:p[3]==='"'?Si:Ai):s===Si||s===Ai?s=We:s===Ei||s===Ti?s=Dt:(s=We,i=void 0);let f=s===We&&o[a+1].startsWith("/>")?" ":"";n+=s===Dt?l+oa:h>=0?(r.push(m),l.slice(0,h)+ho+l.slice(h)+xe+f):l+xe+(h===-2?a:f)}return[Li(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Ht=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,s=0,a=t.length-1,l=this.parts,[m,p]=Ri(t,e);if(this.el=o.createElement(m,r),qe.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=qe.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let h of i.getAttributeNames())if(h.endsWith(ho)){let v=p[s++],f=i.getAttribute(h).split(xe),b=/([.?@])?(.*)/.exec(v);l.push({type:1,index:n,name:b[2],strings:f,ctor:b[1]==="."?fr:b[1]==="?"?gr:b[1]==="@"?vr:je}),i.removeAttribute(h)}else h.startsWith(xe)&&(l.push({type:6,index:n}),i.removeAttribute(h));if(Ci.test(i.tagName)){let h=i.textContent.split(xe),v=h.length-1;if(v>0){i.textContent=hr?hr.emptyScript:"";for(let f=0;f<v;f++)i.append(h[f],Pt()),qe.nextNode(),l.push({type:2,index:++n});i.append(h[v],Pt())}}}else if(i.nodeType===8)if(i.data===uo)l.push({type:2,index:n});else{let h=-1;for(;(h=i.data.indexOf(xe,h+1))!==-1;)l.push({type:7,index:n}),h+=xe.length-1}n++}}static createElement(t,e){let r=Xe.createElement("template");return r.innerHTML=t,r}};function Ze(o,t,e=o,r){var s,a,l;if(t===Ee)return t;let i=r!==void 0?(s=e.o)==null?void 0:s[r]:e.l,n=Ut(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,r)),r!==void 0?((l=e.o)!=null?l:e.o=[])[r]=i:e.l=i),i!==void 0&&(t=Ze(o,i._$AS(o,t.values),i,r)),t}var ur=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var m;let{el:{content:e},parts:r}=this._$AD,i=((m=t==null?void 0:t.creationScope)!=null?m:Xe).importNode(e,!0);qe.currentNode=i;let n=qe.nextNode(),s=0,a=0,l=r[0];for(;l!==void 0;){if(s===l.index){let p;l.type===2?p=new gt(n,n.nextSibling,this,t):l.type===1?p=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(p=new br(n,this,t)),this._$AV.push(p),l=r[++a]}s!==(l==null?void 0:l.index)&&(n=qe.nextNode(),s++)}return qe.currentNode=Xe,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},gt=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this.v}constructor(t,e,r,i){var n;this.type=2,this._$AH=x,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this.v=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ze(this,t,e),Ut(t)?t===x||t==null||t===""?(this._$AH!==x&&this._$AR(),this._$AH=x):t!==this._$AH&&t!==Ee&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):wi(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!==x&&Ut(this._$AH)?this._$AA.nextSibling.data=t:this.T(Xe.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Ht.createElement(Li(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let s=new ur(i,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=_i.get(t.strings);return e===void 0&&_i.set(t.strings,e=new Ht(t)),e}k(t){fo(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let n of t)i===e.length?e.push(r=new o(this.O(Pt()),this.O(Pt()),this,this.options)):r=e[i],r._$AI(n),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}},je=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=x,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=x}_$AI(t,e=this,r,i){let n=this.strings,s=!1;if(n===void 0)t=Ze(this,t,e,0),s=!Ut(t)||t!==this._$AH&&t!==Ee,s&&(this._$AH=t);else{let a=t,l,m;for(t=n[0],l=0;l<n.length-1;l++)m=Ze(this,a[r+l],e,l),m===Ee&&(m=this._$AH[l]),s||(s=!Ut(m)||m!==this._$AH[l]),m===x?t=x:t!==x&&(t+=(m!=null?m:"")+n[l+1]),this._$AH[l]=m}s&&!i&&this.j(t)}j(t){t===x?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},fr=class extends je{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===x?void 0:t}},gr=class extends je{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==x)}},vr=class extends je{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=Ze(this,t,e,0))!=null?s:x)===Ee)return;let r=this._$AH,i=t===x&&r!==x||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==x&&(r===x||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,r;typeof this._$AH=="function"?this._$AH.call((r=(e=this.options)==null?void 0:e.host)!=null?r:this.element,t):this._$AH.handleEvent(t)}},br=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){Ze(this,t)}},Ni={M:ho,P:xe,A:uo,C:1,L:Ri,R:ur,D:wi,V:Ze,I:gt,H:je,N:gr,U:vr,B:fr,F:br},po=$t.litHtmlPolyfillSupport,Ii;po==null||po(Ht,gt),((Ii=$t.litHtmlVersions)!=null?Ii:$t.litHtmlVersions=[]).push("3.2.0");var ki=(o,t,e)=>{var n,s;let r=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=r._$litPart$;if(i===void 0){let a=(s=e==null?void 0:e.renderBefore)!=null?s:null;r._$litPart$=i=new gt(t.insertBefore(Pt(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var ze=class extends ye{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e,r;let t=super.createRenderRoot();return(r=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=ki(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 Ee}},Oi;ze._$litElement$=!0,ze.finalized=!0,(Oi=globalThis.litElementHydrateSupport)==null||Oi.call(globalThis,{LitElement:ze});var vo=globalThis.litElementPolyfillSupport;vo==null||vo({LitElement:ze});var zi;((zi=globalThis.litElementVersions)!=null?zi:globalThis.litElementVersions=[]).push("4.1.0");var Mi=g`
|
4
4
|
:host {
|
5
5
|
box-sizing: border-box;
|
6
6
|
}
|
@@ -10,11 +10,11 @@
|
|
10
10
|
:host *::after {
|
11
11
|
box-sizing: inherit;
|
12
12
|
}
|
13
|
-
`;var
|
13
|
+
`;var yr=class extends ze{static register(t){customElements.get(t)||customElements.define(t,this)}};yr.styles=[Mi];var Di=yr;var E=Di;var Me=class extends Event{constructor(t,e,r){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=e,this.subscribe=r!=null?r:!1}};var vt=class{constructor(t,e,r,i){var n;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(s,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=s,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(s,a)),this.unsubscribe=a},this.host=t,e.context!==void 0){let s=e;this.context=s.context,this.callback=s.callback,this.subscribe=(n=s.subscribe)!=null?n:!1}else this.context=e,this.callback=r,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 Me(this.context,this.t,this.subscribe))}};var xr=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){let r=e||!Object.is(t,this.o);this.o=t,r&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[e,{disposer:r}]of this.subscriptions)e(this.o,r)},t!==void 0&&(this.value=t)}addCallback(t,e,r){if(!r)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 bo=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},bt=class extends xr{constructor(t,e,r){var i,n;super(e.context!==void 0?e.initialValue:r),this.onContextRequest=s=>{let a=s.composedPath()[0];s.context===this.context&&a!==this.host&&(s.stopPropagation(),this.addCallback(s.callback,a,s.subscribe))},this.onProviderRequest=s=>{let a=s.composedPath()[0];if(s.context!==this.context||a===this.host)return;let l=new Set;for(let[m,{consumerHost:p}]of this.subscriptions)l.has(m)||(l.add(m),p.dispatchEvent(new Me(this.context,m,!0)));s.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 bo(this.context))}};var ia=g`
|
14
14
|
:host {
|
15
15
|
display: contents;
|
16
16
|
}
|
17
|
-
`,
|
17
|
+
`,Pi=ia;var Er=class extends E{constructor({context:t,initialValue:e}){super(),this.context=new bt(this,{context:t,initialValue:e})}render(){return this.updateContext(),u`<slot></slot>`}};Er.styles=[...E.styles,Pi];var Ui=Er;var yt=Ui;var Tr=class{constructor(t){this.themeclass=t}};Tr.context=pr;var Ar=Tr;var na=g`
|
18
18
|
:host {
|
19
19
|
--mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);
|
20
20
|
--mdc-themeprovider-font-family: var(--mds-font-family-primary);
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
font-feature-settings: var(--mdc-themeprovider-font-feature-settings);
|
33
33
|
}
|
34
|
-
`,
|
34
|
+
`,Hi=[na];var xt=class extends yt{constructor(){super({context:Ar.context,initialValue:new Ar(co.THEMECLASS)});this.themeclass=co.THEMECLASS}static get Context(){return Ar.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(" "))}};xt.styles=[...yt.styles,...Hi],c([Y()],xt.prototype,"currentThemeClass",2),c([d({type:String})],xt.prototype,"themeclass",2);var yo=xt;yo.register(pr);var sa=yo;var C=g`
|
35
35
|
:host {
|
36
36
|
align-items: center;
|
37
37
|
display: flex;
|
@@ -39,7 +39,7 @@
|
|
39
39
|
justify-content: center;
|
40
40
|
width: fit-content;
|
41
41
|
}
|
42
|
-
|
42
|
+
`,$=(o=!1)=>{let t=g`
|
43
43
|
:host {
|
44
44
|
--mdc-focus-ring-inner-color: var(--mds-color-theme-focus-default-0);
|
45
45
|
--mdc-focus-ring-middle-color: var(--mds-color-theme-focus-default-1);
|
@@ -52,10 +52,10 @@
|
|
52
52
|
--mdc-focus-ring-middle-offset: var(--mdc-focus-ring-inner-width);
|
53
53
|
--mdc-focus-ring-outer-offset: calc(var(--mdc-focus-ring-inner-width) + var(--mdc-focus-ring-middle-width));
|
54
54
|
}
|
55
|
-
`,e=
|
55
|
+
`,e=g`0 0 0 var(--mdc-focus-ring-inner-width) var(--mdc-focus-ring-inner-color),
|
56
56
|
0 0 0 var(--mdc-focus-ring-middle-width) var(--mdc-focus-ring-middle-color),
|
57
57
|
0 0 0 var(--mdc-focus-ring-outer-width) var(--mdc-focus-ring-outer-color)
|
58
|
-
`;return
|
58
|
+
`;return o?[t,g`
|
59
59
|
.mdc-focus-ring:focus-visible {
|
60
60
|
outline: none;
|
61
61
|
}
|
@@ -72,7 +72,7 @@
|
|
72
72
|
outline: 0.125rem solid var(--mds-color-theme-focus-default-0);
|
73
73
|
}
|
74
74
|
}
|
75
|
-
`]:[t,
|
75
|
+
`]:[t,g`
|
76
76
|
:host(:focus-visible) {
|
77
77
|
outline: none;
|
78
78
|
}
|
@@ -89,7 +89,7 @@
|
|
89
89
|
outline: 0.125rem solid var(--mds-color-theme-focus-default-0);
|
90
90
|
}
|
91
91
|
}
|
92
|
-
`]};var
|
92
|
+
`]};var aa=[C,g`
|
93
93
|
:host {
|
94
94
|
--mdc-icon-fill-color: currentColor;
|
95
95
|
--mdc-icon-size: var(--computed-icon-size);
|
@@ -104,7 +104,7 @@
|
|
104
104
|
width: 100%;
|
105
105
|
fill: var(--mdc-icon-fill-color);
|
106
106
|
}
|
107
|
-
|
107
|
+
`,...$()],Vi=aa;var la=o=>{let{host:t,context:e,subscribe:r}=o;return new vt(t,{context:e,subscribe:r!=null?r:!0})},ca={consume:la},Fi=ca;var Sr=y.constructTagName("iconprovider"),Bi=["svg"],Gi=["em","rem","px","%"],da={px:16,em:1,rem:1,"%":100},Te={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",SIZE:da.em,SHOULD_CACHE:!1,ICON_SET:"momentum-icons"};var _r=class{};_r.context=Sr;var Ir=_r;var ce=class extends yt{constructor(){super({context:Ir.context,initialValue:new Ir});this.iconSet=Te.ICON_SET;this.fileExtension=Te.FILE_EXTENSION;this.lengthUnit=Te.LENGTH_UNIT;this.size=Te.SIZE}static get Context(){return Ir.context}updateValuesInContext(){this.fileExtension&&Bi.includes(this.fileExtension)?this.context.value.fileExtension=this.fileExtension:(this.fileExtension=Te.FILE_EXTENSION,this.context.value.fileExtension=Te.FILE_EXTENSION),this.context.value.iconSet=this.iconSet,this.context.value.url=this.url,this.context.value.size=this.size,this.context.value.cacheName=this.cacheName,this.context.value.cacheStrategy=this.cacheStrategy,this.lengthUnit&&Gi.includes(this.lengthUnit)?this.context.value.lengthUnit=this.lengthUnit:(this.lengthUnit=Te.LENGTH_UNIT,this.context.value.lengthUnit=Te.LENGTH_UNIT)}updateContext(){(this.context.value.fileExtension!==this.fileExtension||this.context.value.iconSet!==this.iconSet||this.context.value.url!==this.url||this.context.value.lengthUnit!==this.lengthUnit||this.context.value.size!==this.size||this.context.value.cacheName!==this.cacheName||this.context.value.cacheStrategy!==this.cacheStrategy)&&(this.updateValuesInContext(),this.context.updateObservers())}};c([d({type:String,attribute:"icon-set",reflect:!0})],ce.prototype,"iconSet",2),c([d({type:String})],ce.prototype,"url",2),c([d({type:String,attribute:"file-extension",reflect:!0})],ce.prototype,"fileExtension",2),c([d({type:String,attribute:"length-unit",reflect:!0})],ce.prototype,"lengthUnit",2),c([d({type:Number,reflect:!0})],ce.prototype,"size",2),c([d({type:String,attribute:"cache-strategy"})],ce.prototype,"cacheStrategy",2),c([d({type:String,attribute:"cache-name"})],ce.prototype,"cacheName",2);var Vt=ce;var Ft={},Yi=async o=>(Ft[o]===void 0&&(Ft[o]=new Map),{async set(t,e){Ft[o].set(t.url,await e.text())},async get(t){return Ft[o].get(t.url)},async delete(t){Ft[o].delete(t.url)}}),Wi=async o=>{let t=await caches.open(o);return{set:async(e,r)=>{await t.put(e,r)},get:async e=>{let r=await t.match(e);return r==null?void 0:r.text()},delete:async e=>{await t.delete(e)}}},qi=async(o,t)=>t==="in-memory-cache"?Yi(o):Wi(o);var Xi=async o=>fetch(o).then(t=>{if(!t.ok)throw new Error("There was a problem while fetching the icon!");return t}),Zi=async({url:o,name:t,fileExtension:e,cacheStrategy:r,cacheName:i,renewSignal:n})=>{let s=n(),a=new Request(`${o}/${t}.${e}`,{signal:s});return!i||!r||!["in-memory-cache","web-cache-api"].includes(r)?Xi(a).then(l=>l.text()):qi(i,r).then(l=>l.get(a).then(m=>m||Xi(a.clone()).then(p=>{var h;return p.status<400&&p.headers.has("content-type")?(h=l.set)==null?void 0:h.call(l,a,p.clone()).then(()=>p.text()):p.text()})).catch(m=>{throw new Error(`Error in caching the Icon ${t}, ${m}`)}))};var ji=y.constructTagName("icon"),xo={NAME:void 0,SIZE:1};var j=class extends E{constructor(){super();this.name=xo.NAME;this.ariaLabel=null;this.iconProviderContext=Fi.consume({host:this,context:Vt.Context});this.abortController=new AbortController}prepareIconElement(e){let r=new DOMParser().parseFromString(e,"text/html").body.children[0];return this.name&&r.setAttribute("data-name",this.name),r.setAttribute("part","icon"),r.setAttribute("aria-hidden","true"),r}async getIconData(){if(this.iconProviderContext.value){let{fileExtension:r,url:i,cacheName:n,iconSet:s,cacheStrategy:a}=this.iconProviderContext.value;if(s==="custom-icons"&&i&&r&&this.name){let l=()=>(this.abortController.abort(),this.abortController=new AbortController,this.abortController.signal);return Zi({url:i,name:this.name,fileExtension:r,cacheName:n,cacheStrategy:a,renewSignal:l}).then(m=>{let p=this.prepareIconElement(m);this.handleIconLoadedSuccess(p)}).catch(m=>{this.handleIconLoadedFailure(m)})}if(s==="momentum-icons"&&this.name)return import(`@momentum-design/icons/dist/ts/${this.name}.ts`).then(l=>{this.handleIconLoadedSuccess(l.default())}).catch(l=>{this.handleIconLoadedFailure(l)})}let e=new Error("IconProvider not found or not properly set up.");return this.handleIconLoadedFailure(e),Promise.reject(e)}handleIconLoadedSuccess(e){this.iconData=e;let r=new Event("load",{bubbles:!0,cancelable:!0});this.dispatchEvent(r)}handleIconLoadedFailure(e){let r=new CustomEvent("error",{bubbles:!0,cancelable:!0,detail:{error:e}});this.dispatchEvent(r)}updateSize(){var e;if(this.computedIconSize&&(this.lengthUnit||this.lengthUnitFromContext)){let r=`${this.computedIconSize}${(e=this.lengthUnit)!=null?e:this.lengthUnitFromContext}`;this.style.setProperty("--computed-icon-size",r)}}get computedIconSize(){var e,r;return(r=(e=this.size)!=null?e:this.sizeFromContext)!=null?r:xo.SIZE}updated(e){var r,i,n,s;super.updated(e),e.has("name")&&this.getIconData().catch(a=>{a.name!=="AbortError"&&this.onerror&&this.onerror(a)}),e.has("ariaLabel")&&(this.role=this.ariaLabel?"img":null),(e.has("size")||e.has("lengthUnit"))&&this.updateSize(),this.lengthUnitFromContext!==((r=this.iconProviderContext.value)==null?void 0:r.lengthUnit)&&(this.lengthUnitFromContext=(i=this.iconProviderContext.value)==null?void 0:i.lengthUnit,this.updateSize()),this.sizeFromContext!==((n=this.iconProviderContext.value)==null?void 0:n.size)&&(this.sizeFromContext=(s=this.iconProviderContext.value)==null?void 0:s.size,this.updateSize())}render(){return u` ${this.iconData} `}};j.styles=[...E.styles,...Vi],c([Y()],j.prototype,"iconData",2),c([Y()],j.prototype,"lengthUnitFromContext",2),c([Y()],j.prototype,"sizeFromContext",2),c([d({type:String,reflect:!0})],j.prototype,"name",2),c([d({type:Number})],j.prototype,"size",2),c([d({type:String,attribute:"length-unit"})],j.prototype,"lengthUnit",2),c([d({type:String,attribute:"aria-label"})],j.prototype,"ariaLabel",2),c([Y()],j.prototype,"abortController",2);var Eo=j;Eo.register(ji);var ma=Eo;Vt.register(Sr);var pa=Vt;var S=o=>o!=null?o:x;var Ki=y.constructTagName("avatar"),B={COUNTER:"counter",ICON:"icon",PHOTO:"photo",TEXT:"text"},To=99,ha="user-regular",N={24:24,32:32,48:48,64:64,72:72,88:88,124:124},Et={TYPE:B.PHOTO,SIZE:N[32],ICON_NAME:ha};var wr=o=>{class t extends o{constructor(){super(...arguments);this.size=Et.SIZE;this.isTyping=!1}}return c([d({type:String})],t.prototype,"src",2),c([d({type:String})],t.prototype,"initials",2),c([d({type:String})],t.prototype,"presence",2),c([d({type:Number,reflect:!0,attribute:"size"})],t.prototype,"size",2),c([d({type:Number})],t.prototype,"counter",2),c([d({type:Boolean,attribute:"is-typing"})],t.prototype,"isTyping",2),t};var de=o=>{class t extends o{}return c([d({type:String,attribute:"icon-name"})],t.prototype,"iconName",2),t};var ua=[C,g`
|
108
108
|
:host {
|
109
109
|
--mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);
|
110
110
|
--mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
@@ -227,38 +227,38 @@
|
|
227
227
|
outline: 0.125rem solid;
|
228
228
|
}
|
229
229
|
}
|
230
|
-
`]
|
231
|
-
<mdc-presence class="presence" type="${this.presence}" size="${
|
232
|
-
`:
|
230
|
+
`],Qi=ua;var Ji=y.constructTagName("presence"),H={ACTIVE:"active",AWAY:"away",AWAY_CALLING:"away-calling",BUSY:"busy",DND:"dnd",MEETING:"meeting",ON_CALL:"on-call",ON_DEVICE:"on-device",ON_MOBILE:"on-mobile",PAUSE:"pause",PTO:"pto",PRESENTING:"presenting",QUIET:"quiet",SCHEDULED:"scheduled"},P={XX_SMALL:"xx_small",X_SMALL:"x_small",SMALL:"small",MIDSIZE:"midsize",LARGE:"large",X_LARGE:"x_large",XX_LARGE:"xx_large"},Tt={TYPE:H.ACTIVE,SIZE:P.SMALL};var Bt=y.constructTagName("text"),z={BODY_SMALL_REGULAR:"body-small-regular",BODY_SMALL_MEDIUM:"body-small-medium",BODY_SMALL_BOLD:"body-small-bold",BODY_MIDSIZE_REGULAR:"body-midsize-regular",BODY_MIDSIZE_MEDIUM:"body-midsize-medium",BODY_MIDSIZE_BOLD:"body-midsize-bold",BODY_LARGE_REGULAR:"body-large-regular",BODY_LARGE_MEDIUM:"body-large-medium",BODY_LARGE_BOLD:"body-large-bold",BODY_SMALL_REGULAR_UNDERLINE:"body-small-regular-underline",BODY_SMALL_MEDIUM_UNDERLINE:"body-small-medium-underline",BODY_MIDSIZE_REGULAR_UNDERLINE:"body-midsize-regular-underline",BODY_MIDSIZE_MEDIUM_UNDERLINE:"body-midsize-medium-underline",BODY_LARGE_REGULAR_UNDERLINE:"body-large-regular-underline",BODY_LARGE_MEDIUM_UNDERLINE:"body-large-medium-underline",HEADING_SMALL_REGULAR:"heading-small-regular",HEADING_SMALL_MEDIUM:"heading-small-medium",HEADING_SMALL_BOLD:"heading-small-bold",HEADING_MIDSIZE_REGULAR:"heading-midsize-regular",HEADING_MIDSIZE_MEDIUM:"heading-midsize-medium",HEADING_MIDSIZE_BOLD:"heading-midsize-bold",HEADING_LARGE_REGULAR:"heading-large-regular",HEADING_LARGE_MEDIUM:"heading-large-medium",HEADING_LARGE_BOLD:"heading-large-bold",HEADING_XLARGE_REGULAR:"heading-xlarge-regular",HEADING_XLARGE_MEDIUM:"heading-xlarge-medium",HEADING_XLARGE_BOLD:"heading-xlarge-bold",HEADLINE_SMALL_LIGHT:"headline-small-light",HEADLINE_SMALL_REGULAR:"headline-small-regular"},M={H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",P:"p",SMALL:"small",SPAN:"span",DIV:"div"},X={TYPE:z.BODY_LARGE_REGULAR,TEXT_ELEMENT_TAGNAME:M.P,CSS_PART_TEXT:"text",CHILDREN:"The quick brown fox jumps over the lazy dog"};var en=o=>({[N[124]]:P.XX_LARGE,[N[88]]:P.X_LARGE,[N[72]]:P.LARGE,[N[64]]:P.MIDSIZE,[N[48]]:P.SMALL,[N[32]]:P.X_SMALL,[N[24]]:P.XX_SMALL})[o]||P.X_SMALL,tn=o=>({[N[124]]:4.75,[N[88]]:3,[N[72]]:2.5,[N[64]]:2.25,[N[48]]:1.75,[N[32]]:1.25,[N[24]]:1})[o]||1.25,rn=o=>({[N[124]]:z.HEADING_XLARGE_MEDIUM,[N[88]]:z.HEADING_LARGE_MEDIUM,[N[72]]:z.HEADING_MIDSIZE_MEDIUM,[N[64]]:z.HEADING_SMALL_MEDIUM,[N[48]]:z.HEADING_SMALL_MEDIUM,[N[32]]:z.BODY_MIDSIZE_MEDIUM,[N[24]]:z.BODY_SMALL_MEDIUM})[o]||z.BODY_MIDSIZE_MEDIUM;var Gt=class extends wr(de(E)){constructor(){super(...arguments);this.isPhotoLoaded=!1}getPresenceTemplateBasedOnType(e){return e===B.COUNTER&&(this.counter||this.counter===0)?x:this.presence?u`
|
231
|
+
<mdc-presence class="presence" type="${this.presence}" size="${en(this.size)}"></mdc-presence>
|
232
|
+
`:x}handleOnLoad(){this.isPhotoLoaded=!0}handleOnError(){this.isPhotoLoaded=!1,this.onerror&&this.onerror("There was a problem while fetching the <img/>. Please check the src attribute and try again.")}photoTemplate(){return u`
|
233
233
|
<img
|
234
234
|
class="photo"
|
235
|
-
src="${
|
235
|
+
src="${S(this.src)}"
|
236
236
|
aria-hidden="true"
|
237
237
|
?hidden="${!this.isPhotoLoaded}"
|
238
238
|
@load="${this.handleOnLoad}"
|
239
239
|
@error="${this.handleOnError}"
|
240
240
|
/>
|
241
|
-
`}iconTemplate(){let e=this.iconName||
|
241
|
+
`}iconTemplate(){let e=this.iconName||Et.ICON_NAME;return u`
|
242
242
|
<mdc-icon
|
243
|
-
name="${
|
243
|
+
name="${S(e)}"
|
244
244
|
length-unit="rem"
|
245
|
-
size="${
|
245
|
+
size="${tn(this.size)}"
|
246
246
|
></mdc-icon>
|
247
|
-
`}textTemplate(e){return
|
247
|
+
`}textTemplate(e){return u`
|
248
248
|
<mdc-text
|
249
|
-
type="${
|
249
|
+
type="${rn(this.size)}"
|
250
250
|
tagname="span"
|
251
251
|
>
|
252
252
|
${e}
|
253
253
|
</mdc-text>
|
254
|
-
`}generateCounterText(e){return e<0?"0":e>
|
254
|
+
`}generateCounterText(e){return e<0?"0":e>To?`${To}+`:e.toString()}generateInitialsText(e){return e.toUpperCase().slice(0,2)}generateTextContent(e){let r="";return e===B.TEXT&&this.initials&&(r=this.generateInitialsText(this.initials)),e===B.COUNTER&&(this.counter||this.counter===0)&&(r=this.generateCounterText(this.counter)),this.textTemplate(r)}getTypeBasedOnInputs(){return this.src?B.PHOTO:this.iconName?B.ICON:this.initials?B.TEXT:this.counter||this.counter===0?B.COUNTER:B.ICON}getTemplateBasedOnType(e){switch(e){case B.PHOTO:return this.photoTemplate();case B.TEXT:case B.COUNTER:return this.generateTextContent(e);case B.ICON:default:return this.iconTemplate()}}getLoadingContent(){return this.isTyping?u`<div class="loading__wrapper"><div class="loader"></div></div>`:x}getPhotoPlaceHolderContent(e){return this.isPhotoLoaded?x:e===B.PHOTO?this.initials?this.textTemplate(this.generateInitialsText(this.initials)):this.iconTemplate():x}update(e){super.update(e),e.has("src")&&!this.src&&(this.isPhotoLoaded=!1)}render(){let e=this.getTypeBasedOnInputs();return u`
|
255
255
|
<div class="content" aria-hidden="true">
|
256
256
|
${this.getPhotoPlaceHolderContent(e)}
|
257
257
|
${this.getTemplateBasedOnType(e)}
|
258
258
|
${this.getLoadingContent()}
|
259
259
|
${this.getPresenceTemplateBasedOnType(e)}
|
260
260
|
</div>
|
261
|
-
`}};
|
261
|
+
`}};Gt.styles=[...E.styles,...Qi],c([Y()],Gt.prototype,"isPhotoLoaded",2);var Ao=Gt;var fa=[C,g`
|
262
262
|
:host {
|
263
263
|
--mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);
|
264
264
|
--mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);
|
@@ -352,7 +352,7 @@
|
|
352
352
|
.mdc-presence-icon__scheduled {
|
353
353
|
color: var(--mdc-presence-scheduled-background-color);
|
354
354
|
}
|
355
|
-
`],
|
355
|
+
`],on=fa;var nn=o=>{switch(o){case H.AWAY:return"recents-presence-badge-filled";case H.AWAY_CALLING:return"away-calling-presence-filled";case H.BUSY:return"busy-presence-bold";case H.DND:return"dnd-presence-badge-filled";case H.MEETING:return"camera-filled";case H.ON_CALL:return"handset-filled";case H.ON_DEVICE:return"generic-device-video-badge-filled";case H.ON_MOBILE:return"phone-badge-filled";case H.PAUSE:return"pause-badge-filled";case H.PTO:return"pto-presence-filled";case H.PRESENTING:return"share-screen-badge-filled";case H.QUIET:return"quiet-hours-presence-filled";case H.SCHEDULED:return"meetings-presence-badge-filled";case H.ACTIVE:default:return"active-presence-small-filled"}};var Ke=class extends E{constructor(){super(...arguments);this.type=Tt.TYPE;this.size=Tt.SIZE;this.currentIconType=Tt.TYPE}get iconSize(){switch(this.size){case P.MIDSIZE:return 1.16125;case P.LARGE:return 1.30625;case P.X_LARGE:return 1.596875;case P.XX_LARGE:return 2.25;case P.XX_SMALL:case P.X_SMALL:case P.SMALL:default:return this.size=Tt.SIZE,.875}}get icon(){let e=nn(this.type);return e==="active-presence-small-filled"&&(this.type=Tt.TYPE),e}handleOnLoad(){this.currentIconType=this.type}handleOnError(){this.onerror&&this.onerror("There was a problem while fetching the icon. Please check the icon name and try again.")}render(){return u`
|
356
356
|
<div class="mdc-presence mdc-presence__${this.size}">
|
357
357
|
<mdc-icon
|
358
358
|
class="mdc-presence-icon mdc-presence-icon__${this.currentIconType}"
|
@@ -362,7 +362,7 @@
|
|
362
362
|
@error="${this.handleOnError}"
|
363
363
|
></mdc-icon>
|
364
364
|
</div>
|
365
|
-
`}};
|
365
|
+
`}};Ke.styles=[...E.styles,...on],c([d({type:String,reflect:!0})],Ke.prototype,"type",2),c([d({type:String,reflect:!0})],Ke.prototype,"size",2),c([Y()],Ke.prototype,"currentIconType",2);var So=Ke;So.register(Ji);var ga=So;var sn=g`
|
366
366
|
:host::part(text) {
|
367
367
|
font-size: unset;
|
368
368
|
font-weight: unset;
|
@@ -605,14 +605,14 @@
|
|
605
605
|
text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);
|
606
606
|
text-transform: var(--mds-font-apps-body-small-regular-text-case);
|
607
607
|
}
|
608
|
-
`;var
|
608
|
+
`;var va=[g`
|
609
609
|
:host {
|
610
610
|
--mdc-text-font-family: var(--mdc-themeprovider-font-family);
|
611
611
|
|
612
612
|
display: block;
|
613
613
|
font-family: var(--mdc-text-font-family);
|
614
614
|
}
|
615
|
-
`,
|
615
|
+
`,sn],an=va;var At=class extends E{constructor(){super(...arguments);this.type=X.TYPE;this.tagname=X.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case M.H1:return u`<h1 part=${X.CSS_PART_TEXT}><slot></slot></h1>`;case M.H2:return u`<h2 part=${X.CSS_PART_TEXT}><slot></slot></h2>`;case M.H3:return u`<h3 part=${X.CSS_PART_TEXT}><slot></slot></h3>`;case M.H4:return u`<h4 part=${X.CSS_PART_TEXT}><slot></slot></h4>`;case M.H5:return u`<h5 part=${X.CSS_PART_TEXT}><slot></slot></h5>`;case M.H6:return u`<h6 part=${X.CSS_PART_TEXT}><slot></slot></h6>`;case M.DIV:return u`<div part=${X.CSS_PART_TEXT}><slot></slot></div>`;case M.SPAN:return u`<span part=${X.CSS_PART_TEXT}><slot></slot></span>`;case M.SMALL:return u`<small part=${X.CSS_PART_TEXT}><slot></slot></small>`;case M.P:default:return u`<p part=${X.CSS_PART_TEXT}><slot></slot></p>`}}};At.styles=[...E.styles,...an],c([d({attribute:"type",reflect:!0,type:String})],At.prototype,"type",2),c([d({attribute:"tagname",reflect:!0,type:String})],At.prototype,"tagname",2);var _o=At;_o.register(Bt);var ba=_o;Ao.register(Ki);var ya=Ao;var Cr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Yt=o=>(...t)=>({_$litDirective$:o,values:t}),St=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this.t=t,this._$AM=e,this.i=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Lr=Yt(class extends St{constructor(o){var t;if(super(o),o.type!==Cr.ATTRIBUTE||o.name!=="class"||((t=o.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){var r,i;if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(let n in t)t[n]&&!((r=this.nt)!=null&&r.has(n))&&this.st.add(n);return this.render(t)}let e=o.element.classList;for(let n of this.st)n in t||(e.remove(n),this.st.delete(n));for(let n in t){let s=!!t[n];s===this.st.has(n)||(i=this.nt)!=null&&i.has(n)||(s?(e.add(n),this.st.add(n)):(e.remove(n),this.st.delete(n)))}return Ee}});var ln=y.constructTagName("badge"),Ae={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},Rr={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},Nr={PRIMARY:"primary",SECONDARY:"secondary"},Wt={SUCCESS:"success",WARNING:"warning",ERROR:"error"},th={...Nr,...Wt},De={TYPE:Ae.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:Nr.PRIMARY,ICON_SIZE:1};var xa=[C,g`
|
616
616
|
:host {
|
617
617
|
--mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
618
618
|
--mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);
|
@@ -681,21 +681,21 @@
|
|
681
681
|
outline: 0.125rem solid;
|
682
682
|
}
|
683
683
|
}
|
684
|
-
`],
|
684
|
+
`],cn=xa;var me=class extends de(E){constructor(){super(...arguments);this.variant=De.VARIANT;this.maxCounter=De.MAX_COUNTER;this.overlay=!1;this.ariaLabel=null}getCounterText(e,r){return r===void 0||typeof r!="number"||e===0?"":r>e?`${e}+`:e>De.MAX_COUNTER_LIMIT||r>De.MAX_COUNTER_LIMIT?`${De.MAX_COUNTER_LIMIT}+`:r.toString()}getBadgeIcon(e,r){return u`
|
685
685
|
<mdc-icon
|
686
|
-
class="mdc-badge-icon ${
|
687
|
-
name="${
|
688
|
-
size="${
|
686
|
+
class="mdc-badge-icon ${Lr({"mdc-badge-overlay":this.overlay,[`mdc-badge-icon__${r}`]:!0})}"
|
687
|
+
name="${S(e)}"
|
688
|
+
size="${De.ICON_SIZE}"
|
689
689
|
></mdc-icon>
|
690
|
-
`}getBadgeDot(){return
|
690
|
+
`}getBadgeDot(){return u`<div class="mdc-badge-dot ${Lr({"mdc-badge-overlay":this.overlay})}"></div>`}getBadgeCounterText(){return u`
|
691
691
|
<mdc-text
|
692
|
-
type="${
|
693
|
-
tagname="${
|
694
|
-
class="mdc-badge-text ${
|
692
|
+
type="${z.BODY_SMALL_MEDIUM}"
|
693
|
+
tagname="${M.DIV}"
|
694
|
+
class="mdc-badge-text ${Lr({"mdc-badge-overlay":this.overlay})}"
|
695
695
|
>
|
696
696
|
${this.getCounterText(this.maxCounter,this.counter)}
|
697
697
|
</mdc-text>
|
698
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(
|
698
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(Nr).includes(this.variant)&&(this.variant=De.VARIANT);let{iconName:e,type:r,variant:i}=this;switch(r){case Ae.ICON:return this.getBadgeIcon(e||"",i);case Ae.COUNTER:return this.getBadgeCounterText();case Ae.SUCCESS:return this.getBadgeIcon(Rr.SUCCESS_ICON_NAME,Wt.SUCCESS);case Ae.WARNING:return this.getBadgeIcon(Rr.WARNING_ICON_NAME,Wt.WARNING);case Ae.ERROR:return this.getBadgeIcon(Rr.ERROR_ICON_NAME,Wt.ERROR);case Ae.DOT:default:return this.type=Ae.DOT,this.getBadgeDot()}}update(e){super.update(e),e.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};me.styles=[...E.styles,...cn],c([d({type:String,reflect:!0})],me.prototype,"type",2),c([d({type:String,reflect:!0})],me.prototype,"variant",2),c([d({type:Number})],me.prototype,"counter",2),c([d({type:Number,attribute:"max-counter",reflect:!0})],me.prototype,"maxCounter",2),c([d({type:Boolean})],me.prototype,"overlay",2),c([d({type:String,attribute:"aria-label"})],me.prototype,"ariaLabel",2);var Io=me;Io.register(ln);var Ea=Io;var _t=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return c([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var dn=o=>{class t extends o{constructor(){super(...arguments);this.tabIndex=0}}return c([d({reflect:!0,type:Number})],t.prototype,"tabIndex",2),t};var Rh=y.constructTagName("buttonsimple"),Ta={20:20,24:24,28:28,32:32,40:40,48:48,52:52,64:64,72:72,88:88,124:124},It={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},kr={SIZE:Ta[32],TYPE:It.BUTTON,ROLE:"button"};var Aa=[C,g`
|
699
699
|
:host {
|
700
700
|
border: 0.0625rem solid transparent;
|
701
701
|
cursor: pointer;
|
@@ -751,9 +751,9 @@
|
|
751
751
|
:host([size="20"]){
|
752
752
|
height: var(--mdc-button-height-size-20);
|
753
753
|
}
|
754
|
-
|
754
|
+
`,...$()],mn=Aa;var pe=class extends dn(_t(E)){constructor(){super();this.active=!1;this.softDisabled=!1;this.size=kr.SIZE;this.role=kr.ROLE;this.type=kr.TYPE;this.prevTabindex=0;this.addEventListener("click",this.executeAction.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.addEventListener("keyup",this.handleKeyUp.bind(this)),this.addEventListener("blur",this.handleBlur.bind(this)),this.internals=this.attachInternals()}get form(){return this.internals.form}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this,this.disabled),e.has("softDisabled")&&this.setSoftDisabled(this,this.softDisabled),e.has("active")&&this.setActive(this,this.active)}executeAction(){this.type===It.SUBMIT&&this.internals.form&&this.internals.form.requestSubmit(),this.type===It.RESET&&this.internals.form&&this.internals.form.reset()}setActive(e,r){r?e.setAttribute("aria-pressed","true"):e.removeAttribute("aria-pressed")}setSoftDisabled(e,r){r?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}setDisabled(e,r){r?(e.setAttribute("aria-disabled","true"),this.prevTabindex=this.tabIndex,this.tabIndex=-1):(this.tabIndex===-1&&(this.tabIndex=this.prevTabindex),e.removeAttribute("aria-disabled"))}triggerClickEvent(){let e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});this.dispatchEvent(e)}handleBlur(){this.classList.contains("pressed")&&this.classList.remove("pressed")}handleKeyDown(e){["Enter"," "].includes(e.key)&&(this.classList.add("pressed"),e.key==="Enter"&&this.triggerClickEvent())}handleKeyUp(e){["Enter"," "].includes(e.key)&&(this.classList.remove("pressed"),e.key===" "&&this.triggerClickEvent())}render(){return u`
|
755
755
|
<slot></slot>
|
756
|
-
`}};
|
756
|
+
`}};pe.formAssociated=!0,pe.styles=[...E.styles,...mn],c([d({type:Boolean,reflect:!0})],pe.prototype,"active",2),c([d({type:Boolean,attribute:"soft-disabled"})],pe.prototype,"softDisabled",2),c([d({type:Number,reflect:!0})],pe.prototype,"size",2),c([d({type:String,reflect:!0})],pe.prototype,"role",2),c([d({reflect:!0})],pe.prototype,"type",2);var $e=pe;var qt=y.constructTagName("button"),Qe={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary"},Or={40:40,32:32,28:28,24:24},Se={64:64,52:52,20:20,...Or},wo={POSITIVE:"positive",NEGATIVE:"negative",ACCENT:"accent",PROMOTIONAL:"promotional",DEFAULT:"default"},wt={PILL:"pill",ICON:"icon",PILL_WITH_ICON:"pill-with-icon"},he={VARIANT:Qe.PRIMARY,SIZE:Or[32],COLOR:wo.DEFAULT,TYPE_INTERNAL:wt.ICON,TYPE:It.BUTTON};var Sa=g`
|
757
757
|
:host {
|
758
758
|
background-color: transparent;
|
759
759
|
border-radius: 1.25rem;
|
@@ -878,6 +878,7 @@
|
|
878
878
|
}
|
879
879
|
:host([size="20"]){
|
880
880
|
padding: 0.0625rem;
|
881
|
+
aspect-ratio: 1;
|
881
882
|
}
|
882
883
|
|
883
884
|
:host([color="accent"]){
|
@@ -924,8 +925,8 @@
|
|
924
925
|
--mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);
|
925
926
|
--mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);
|
926
927
|
}
|
927
|
-
`,
|
928
|
-
${this.prefixIcon?
|
928
|
+
`,pn=[Sa];var hn=o=>{switch(o){case Se[64]:return 2;case Se[52]:return 1.75;case Se[40]:return 1.25;default:return 1}},Xt=o=>{let t=o.split("-"),e=["bold","filled","regular","light"];return t.filter(r=>!e.includes(r)).join("-")};var K=class extends $e{constructor(){super(...arguments);this.variant=he.VARIANT;this.size=he.SIZE;this.color=he.COLOR;this.role="button";this.typeInternal=he.TYPE_INTERNAL;this.iconSize=1}update(e){super.update(e),e.has("active")&&this.modifyIconName(this.active),e.has("size")&&this.setSize(this.size),e.has("variant")&&(this.setVariant(this.variant),this.setSize(this.size)),e.has("color")&&this.setColor(this.color),e.has("typeInternal")&&this.setSize(this.size),(e.has("prefixIcon")||e.has("postfixIcon"))&&this.inferButtonType()}modifyIconName(e){e?(this.prefixIcon&&(this.prevPrefixIcon=this.prefixIcon,this.prefixIcon=`${Xt(this.prefixIcon)}-filled`),this.postfixIcon&&(this.prevPostfixIcon=this.postfixIcon,this.postfixIcon=`${Xt(this.postfixIcon)}-filled`)):(this.prevPrefixIcon&&(this.prefixIcon=this.prevPrefixIcon),this.prevPostfixIcon&&(this.postfixIcon=this.prevPostfixIcon))}setVariant(e){this.setAttribute("variant",Object.values(Qe).includes(e)?e:he.VARIANT)}setSize(e){let i=this.typeInternal===wt.ICON?Object.values(Se).includes(e)&&!(e===Se[20]&&this.variant!==Qe.TERTIARY):Object.values(Or).includes(e);this.setAttribute("size",i?`${e}`:`${he.SIZE}`),this.iconSize=hn(e)}setColor(e){!Object.values(wo).includes(e)||this.variant===Qe.TERTIARY?this.setAttribute("color",`${he.COLOR}`):this.setAttribute("color",e)}inferButtonType(){var r,i;let e=(i=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"))==null?void 0:i.assignedNodes().filter(n=>{var s;return n.nodeType!==Node.TEXT_NODE||((s=n.textContent)==null?void 0:s.trim())}).length;e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=wt.PILL_WITH_ICON,this.setAttribute("data-btn-type","pill-with-icon")):!e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=wt.ICON,this.setAttribute("data-btn-type","icon")):(this.typeInternal=wt.PILL,this.setAttribute("data-btn-type","pill"))}render(){return u`
|
929
|
+
${this.prefixIcon?u` <mdc-icon
|
929
930
|
name="${this.prefixIcon}"
|
930
931
|
part="prefix-icon"
|
931
932
|
size=${this.iconSize}
|
@@ -933,14 +934,196 @@
|
|
933
934
|
>
|
934
935
|
</mdc-icon>`:""}
|
935
936
|
<slot @slotchange=${this.inferButtonType}></slot>
|
936
|
-
${this.postfixIcon?
|
937
|
+
${this.postfixIcon?u` <mdc-icon
|
937
938
|
name="${this.postfixIcon}"
|
938
939
|
part="postfix-icon"
|
939
940
|
size=${this.iconSize}
|
940
941
|
length-unit="rem"
|
941
942
|
>
|
942
943
|
</mdc-icon>`:""}
|
943
|
-
`}};$.styles=[...se.styles,...jo],a([c({type:String,attribute:"prefix-icon",reflect:!0})],$.prototype,"prefixIcon",2),a([c({type:String,attribute:"postfix-icon",reflect:!0})],$.prototype,"postfixIcon",2),a([c({type:String})],$.prototype,"variant",2),a([c({type:Number})],$.prototype,"size",2),a([c({type:String})],$.prototype,"color",2),a([c({type:String,reflect:!0})],$.prototype,"role",2),a([L()],$.prototype,"typeInternal",2),a([L()],$.prototype,"iconSize",2);var xr=$;xr.register(ot);var Ns=xr;var ks=h`
|
944
|
+
`}};K.styles=[...$e.styles,...pn],c([d({type:String,attribute:"prefix-icon",reflect:!0})],K.prototype,"prefixIcon",2),c([d({type:String,attribute:"postfix-icon",reflect:!0})],K.prototype,"postfixIcon",2),c([d({type:String})],K.prototype,"variant",2),c([d({type:Number})],K.prototype,"size",2),c([d({type:String})],K.prototype,"color",2),c([d({type:String,reflect:!0})],K.prototype,"role",2),c([Y()],K.prototype,"typeInternal",2),c([Y()],K.prototype,"iconSize",2);var Co=K;Co.register(qt);var _a=Co;var ue=Math.min,G=Math.max,jt=Math.round,Kt=Math.floor,oe=o=>({x:o,y:o}),Ia={left:"right",right:"left",bottom:"top",top:"bottom"},wa={start:"end",end:"start"};function Mr(o,t,e){return G(o,ue(t,e))}function Je(o,t){return typeof o=="function"?o(t):o}function _e(o){return o.split("-")[0]}function et(o){return o.split("-")[1]}function Lo(o){return o==="x"?"y":"x"}function Dr(o){return o==="y"?"height":"width"}function Pe(o){return["top","bottom"].includes(_e(o))?"y":"x"}function $r(o){return Lo(Pe(o))}function un(o,t,e){e===void 0&&(e=!1);let r=et(o),i=$r(o),n=Dr(i),s=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=Zt(s)),[s,Zt(s)]}function fn(o){let t=Zt(o);return[zr(o),t,zr(t)]}function zr(o){return o.replace(/start|end/g,t=>wa[t])}function Ca(o,t,e){let r=["left","right"],i=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(o){case"top":case"bottom":return e?t?i:r:t?r:i;case"left":case"right":return t?n:s;default:return[]}}function gn(o,t,e,r){let i=et(o),n=Ca(_e(o),e==="start",r);return i&&(n=n.map(s=>s+"-"+i),t&&(n=n.concat(n.map(zr)))),n}function Zt(o){return o.replace(/left|right|bottom|top/g,t=>Ia[t])}function La(o){return{top:0,right:0,bottom:0,left:0,...o}}function Ro(o){return typeof o!="number"?La(o):{top:o,right:o,bottom:o,left:o}}function tt(o){let{x:t,y:e,width:r,height:i}=o;return{width:r,height:i,top:e,left:t,right:t+r,bottom:e+i,x:t,y:e}}function vn(o,t,e){let{reference:r,floating:i}=o,n=Pe(t),s=$r(t),a=Dr(s),l=_e(t),m=n==="y",p=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,v=r[a]/2-i[a]/2,f;switch(l){case"top":f={x:p,y:r.y-i.height};break;case"bottom":f={x:p,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:h};break;case"left":f={x:r.x-i.width,y:h};break;default:f={x:r.x,y:r.y}}switch(et(t)){case"start":f[s]-=v*(e&&m?-1:1);break;case"end":f[s]+=v*(e&&m?-1:1);break}return f}var bn=async(o,t,e)=>{let{placement:r="bottom",strategy:i="absolute",middleware:n=[],platform:s}=e,a=n.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),m=await s.getElementRects({reference:o,floating:t,strategy:i}),{x:p,y:h}=vn(m,r,l),v=r,f={},b=0;for(let T=0;T<a.length;T++){let{name:_,fn:A}=a[T],{x:I,y:w,data:D,reset:k}=await A({x:p,y:h,initialPlacement:r,placement:v,strategy:i,middlewareData:f,rects:m,platform:s,elements:{reference:o,floating:t}});p=I!=null?I:p,h=w!=null?w:h,f={...f,[_]:{...f[_],...D}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(m=k.rects===!0?await s.getElementRects({reference:o,floating:t,strategy:i}):k.rects),{x:p,y:h}=vn(m,v,l)),T=-1)}return{x:p,y:h,placement:v,strategy:i,middlewareData:f}};async function Pr(o,t){var e;t===void 0&&(t={});let{x:r,y:i,platform:n,rects:s,elements:a,strategy:l}=o,{boundary:m="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:v=!1,padding:f=0}=Je(t,o),b=Ro(f),_=a[v?h==="floating"?"reference":"floating":h],A=tt(await n.getClippingRect({element:(e=await(n.isElement==null?void 0:n.isElement(_)))==null||e?_:_.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:m,rootBoundary:p,strategy:l})),I=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),D=await(n.isElement==null?void 0:n.isElement(w))?await(n.getScale==null?void 0:n.getScale(w))||{x:1,y:1}:{x:1,y:1},k=tt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:I,offsetParent:w,strategy:l}):I);return{top:(A.top-k.top+b.top)/D.y,bottom:(k.bottom-A.bottom+b.bottom)/D.y,left:(A.left-k.left+b.left)/D.x,right:(k.right-A.right+b.right)/D.x}}var yn=o=>({name:"arrow",options:o,async fn(t){let{x:e,y:r,placement:i,rects:n,platform:s,elements:a,middlewareData:l}=t,{element:m,padding:p=0}=Je(o,t)||{};if(m==null)return{};let h=Ro(p),v={x:e,y:r},f=$r(i),b=Dr(f),T=await s.getDimensions(m),_=f==="y",A=_?"top":"left",I=_?"bottom":"right",w=_?"clientHeight":"clientWidth",D=n.reference[b]+n.reference[f]-v[f]-n.floating[b],k=v[f]-n.reference[f],Z=await(s.getOffsetParent==null?void 0:s.getOffsetParent(m)),te=Z?Z[w]:0;(!te||!await(s.isElement==null?void 0:s.isElement(Z)))&&(te=a.floating[w]||n.floating[b]);let ve=D/2-k/2,se=te/2-T[b]/2-1,re=ue(h[A],se),Le=ue(h[I],se),ae=re,Re=te-T[b]-Le,F=te/2-T[b]/2+ve,ft=Mr(ae,F,Re),be=!l.arrow&&et(i)!=null&&F!==ft&&n.reference[b]/2-(F<ae?re:Le)-T[b]/2<0,le=be?F<ae?F-ae:F-Re:0;return{[f]:v[f]+le,data:{[f]:ft,centerOffset:F-ft-le,...be&&{alignmentOffset:le}},reset:be}}});var xn=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(t){var e,r;let{placement:i,middlewareData:n,rects:s,initialPlacement:a,platform:l,elements:m}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:T=!0,..._}=Je(o,t);if((e=n.arrow)!=null&&e.alignmentOffset)return{};let A=_e(i),I=Pe(a),w=_e(a)===a,D=await(l.isRTL==null?void 0:l.isRTL(m.floating)),k=v||(w||!T?[Zt(a)]:fn(a)),Z=b!=="none";!v&&Z&&k.push(...gn(a,T,b,D));let te=[a,...k],ve=await Pr(t,_),se=[],re=((r=n.flip)==null?void 0:r.overflows)||[];if(p&&se.push(ve[A]),h){let F=un(i,s,D);se.push(ve[F[0]],ve[F[1]])}if(re=[...re,{placement:i,overflows:se}],!se.every(F=>F<=0)){var Le,ae;let F=(((Le=n.flip)==null?void 0:Le.index)||0)+1,ft=te[F];if(ft)return{data:{index:F,overflows:re},reset:{placement:ft}};let be=(ae=re.filter(le=>le.overflows[0]<=0).sort((le,Ne)=>le.overflows[1]-Ne.overflows[1])[0])==null?void 0:ae.placement;if(!be)switch(f){case"bestFit":{var Re;let le=(Re=re.filter(Ne=>{if(Z){let ke=Pe(Ne.placement);return ke===I||ke==="y"}return!0}).map(Ne=>[Ne.placement,Ne.overflows.filter(ke=>ke>0).reduce((ke,Fs)=>ke+Fs,0)]).sort((Ne,ke)=>Ne[1]-ke[1])[0])==null?void 0:Re[0];le&&(be=le);break}case"initialPlacement":be=a;break}if(i!==be)return{reset:{placement:be}}}return{}}}};async function Ra(o,t){let{placement:e,platform:r,elements:i}=o,n=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=_e(e),a=et(e),l=Pe(e)==="y",m=["left","top"].includes(s)?-1:1,p=n&&l?-1:1,h=Je(t,o),{mainAxis:v,crossAxis:f,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(f=a==="end"?b*-1:b),l?{x:f*p,y:v*m}:{x:v*m,y:f*p}}var En=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(t){var e,r;let{x:i,y:n,placement:s,middlewareData:a}=t,l=await Ra(t,o);return s===((e=a.offset)==null?void 0:e.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:n+l.y,data:{...l,placement:s}}}}},Tn=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(t){let{x:e,y:r,placement:i}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:_=>{let{x:A,y:I}=_;return{x:A,y:I}}},...l}=Je(o,t),m={x:e,y:r},p=await Pr(t,l),h=Pe(_e(i)),v=Lo(h),f=m[v],b=m[h];if(n){let _=v==="y"?"top":"left",A=v==="y"?"bottom":"right",I=f+p[_],w=f-p[A];f=Mr(I,f,w)}if(s){let _=h==="y"?"top":"left",A=h==="y"?"bottom":"right",I=b+p[_],w=b-p[A];b=Mr(I,b,w)}let T=a.fn({...t,[v]:f,[h]:b});return{...T,data:{x:T.x-e,y:T.y-r,enabled:{[v]:n,[h]:s}}}}}};var An=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(t){var e,r;let{placement:i,rects:n,platform:s,elements:a}=t,{apply:l=()=>{},...m}=Je(o,t),p=await Pr(t,m),h=_e(i),v=et(i),f=Pe(i)==="y",{width:b,height:T}=n.floating,_,A;h==="top"||h==="bottom"?(_=h,A=v===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(A=h,_=v==="end"?"top":"bottom");let I=T-p.top-p.bottom,w=b-p.left-p.right,D=ue(T-p[_],I),k=ue(b-p[A],w),Z=!t.middlewareData.shift,te=D,ve=k;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(ve=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(te=I),Z&&!v){let re=G(p.left,0),Le=G(p.right,0),ae=G(p.top,0),Re=G(p.bottom,0);f?ve=b-2*(re!==0||Le!==0?re+Le:G(p.left,p.right)):te=T-2*(ae!==0||Re!==0?ae+Re:G(p.top,p.bottom))}await l({...t,availableWidth:ve,availableHeight:te});let se=await s.getDimensions(a.floating);return b!==se.width||T!==se.height?{reset:{rects:!0}}:{}}}};function Ur(){return typeof window<"u"}function rt(o){return _n(o)?(o.nodeName||"").toLowerCase():"#document"}function W(o){var t;return(o==null||(t=o.ownerDocument)==null?void 0:t.defaultView)||window}function ie(o){var t;return(t=(_n(o)?o.ownerDocument:o.document)||window.document)==null?void 0:t.documentElement}function _n(o){return Ur()?o instanceof Node||o instanceof W(o).Node:!1}function Q(o){return Ur()?o instanceof Element||o instanceof W(o).Element:!1}function ne(o){return Ur()?o instanceof HTMLElement||o instanceof W(o).HTMLElement:!1}function Sn(o){return!Ur()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof W(o).ShadowRoot}function Lt(o){let{overflow:t,overflowX:e,overflowY:r,display:i}=J(o);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!["inline","contents"].includes(i)}function In(o){return["table","td","th"].includes(rt(o))}function Qt(o){return[":popover-open",":modal"].some(t=>{try{return o.matches(t)}catch{return!1}})}function Hr(o){let t=Vr(),e=Q(o)?J(o):o;return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(e.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(e.contain||"").includes(r))}function wn(o){let t=Ie(o);for(;ne(t)&&!ot(t);){if(Hr(t))return t;if(Qt(t))return null;t=Ie(t)}return null}function Vr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ot(o){return["html","body","#document"].includes(rt(o))}function J(o){return W(o).getComputedStyle(o)}function Jt(o){return Q(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function Ie(o){if(rt(o)==="html")return o;let t=o.assignedSlot||o.parentNode||Sn(o)&&o.host||ie(o);return Sn(t)?t.host:t}function Cn(o){let t=Ie(o);return ot(t)?o.ownerDocument?o.ownerDocument.body:o.body:ne(t)&&Lt(t)?t:Cn(t)}function Ct(o,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=Cn(o),n=i===((r=o.ownerDocument)==null?void 0:r.body),s=W(i);if(n){let a=Fr(s);return t.concat(s,s.visualViewport||[],Lt(i)?i:[],a&&e?Ct(a):[])}return t.concat(i,Ct(i,[],e))}function Fr(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function Nn(o){let t=J(o),e=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ne(o),n=i?o.offsetWidth:e,s=i?o.offsetHeight:r,a=jt(e)!==n||jt(r)!==s;return a&&(e=n,r=s),{width:e,height:r,$:a}}function ko(o){return Q(o)?o:o.contextElement}function Rt(o){let t=ko(o);if(!ne(t))return oe(1);let e=t.getBoundingClientRect(),{width:r,height:i,$:n}=Nn(t),s=(n?jt(e.width):e.width)/r,a=(n?jt(e.height):e.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var Na=oe(0);function kn(o){let t=W(o);return!Vr()||!t.visualViewport?Na:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ka(o,t,e){return t===void 0&&(t=!1),!e||t&&e!==W(o)?!1:t}function it(o,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=o.getBoundingClientRect(),n=ko(o),s=oe(1);t&&(r?Q(r)&&(s=Rt(r)):s=Rt(o));let a=ka(n,e,r)?kn(n):oe(0),l=(i.left+a.x)/s.x,m=(i.top+a.y)/s.y,p=i.width/s.x,h=i.height/s.y;if(n){let v=W(n),f=r&&Q(r)?W(r):r,b=v,T=Fr(b);for(;T&&r&&f!==b;){let _=Rt(T),A=T.getBoundingClientRect(),I=J(T),w=A.left+(T.clientLeft+parseFloat(I.paddingLeft))*_.x,D=A.top+(T.clientTop+parseFloat(I.paddingTop))*_.y;l*=_.x,m*=_.y,p*=_.x,h*=_.y,l+=w,m+=D,b=W(T),T=Fr(b)}}return tt({width:p,height:h,x:l,y:m})}function Oo(o,t){let e=Jt(o).scrollLeft;return t?t.left+e:it(ie(o)).left+e}function On(o,t,e){e===void 0&&(e=!1);let r=o.getBoundingClientRect(),i=r.left+t.scrollLeft-(e?0:Oo(o,r)),n=r.top+t.scrollTop;return{x:i,y:n}}function Oa(o){let{elements:t,rect:e,offsetParent:r,strategy:i}=o,n=i==="fixed",s=ie(r),a=t?Qt(t.floating):!1;if(r===s||a&&n)return e;let l={scrollLeft:0,scrollTop:0},m=oe(1),p=oe(0),h=ne(r);if((h||!h&&!n)&&((rt(r)!=="body"||Lt(s))&&(l=Jt(r)),ne(r))){let f=it(r);m=Rt(r),p.x=f.x+r.clientLeft,p.y=f.y+r.clientTop}let v=s&&!h&&!n?On(s,l,!0):oe(0);return{width:e.width*m.x,height:e.height*m.y,x:e.x*m.x-l.scrollLeft*m.x+p.x+v.x,y:e.y*m.y-l.scrollTop*m.y+p.y+v.y}}function za(o){return Array.from(o.getClientRects())}function Ma(o){let t=ie(o),e=Jt(o),r=o.ownerDocument.body,i=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-e.scrollLeft+Oo(o),a=-e.scrollTop;return J(r).direction==="rtl"&&(s+=G(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:a}}function Da(o,t){let e=W(o),r=ie(o),i=e.visualViewport,n=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){n=i.width,s=i.height;let m=Vr();(!m||m&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:n,height:s,x:a,y:l}}function $a(o,t){let e=it(o,!0,t==="fixed"),r=e.top+o.clientTop,i=e.left+o.clientLeft,n=ne(o)?Rt(o):oe(1),s=o.clientWidth*n.x,a=o.clientHeight*n.y,l=i*n.x,m=r*n.y;return{width:s,height:a,x:l,y:m}}function Ln(o,t,e){let r;if(t==="viewport")r=Da(o,e);else if(t==="document")r=Ma(ie(o));else if(Q(t))r=$a(t,e);else{let i=kn(o);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return tt(r)}function zn(o,t){let e=Ie(o);return e===t||!Q(e)||ot(e)?!1:J(e).position==="fixed"||zn(e,t)}function Pa(o,t){let e=t.get(o);if(e)return e;let r=Ct(o,[],!1).filter(a=>Q(a)&&rt(a)!=="body"),i=null,n=J(o).position==="fixed",s=n?Ie(o):o;for(;Q(s)&&!ot(s);){let a=J(s),l=Hr(s);!l&&a.position==="fixed"&&(i=null),(n?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Lt(s)&&!l&&zn(o,s))?r=r.filter(p=>p!==s):i=a,s=Ie(s)}return t.set(o,r),r}function Ua(o){let{element:t,boundary:e,rootBoundary:r,strategy:i}=o,s=[...e==="clippingAncestors"?Qt(t)?[]:Pa(t,this._c):[].concat(e),r],a=s[0],l=s.reduce((m,p)=>{let h=Ln(t,p,i);return m.top=G(h.top,m.top),m.right=ue(h.right,m.right),m.bottom=ue(h.bottom,m.bottom),m.left=G(h.left,m.left),m},Ln(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ha(o){let{width:t,height:e}=Nn(o);return{width:t,height:e}}function Va(o,t,e){let r=ne(t),i=ie(t),n=e==="fixed",s=it(o,!0,n,t),a={scrollLeft:0,scrollTop:0},l=oe(0);if(r||!r&&!n)if((rt(t)!=="body"||Lt(i))&&(a=Jt(t)),r){let v=it(t,!0,n,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else i&&(l.x=Oo(i));let m=i&&!r&&!n?On(i,a):oe(0),p=s.left+a.scrollLeft-l.x-m.x,h=s.top+a.scrollTop-l.y-m.y;return{x:p,y:h,width:s.width,height:s.height}}function No(o){return J(o).position==="static"}function Rn(o,t){if(!ne(o)||J(o).position==="fixed")return null;if(t)return t(o);let e=o.offsetParent;return ie(o)===e&&(e=e.ownerDocument.body),e}function Mn(o,t){let e=W(o);if(Qt(o))return e;if(!ne(o)){let i=Ie(o);for(;i&&!ot(i);){if(Q(i)&&!No(i))return i;i=Ie(i)}return e}let r=Rn(o,t);for(;r&&In(r)&&No(r);)r=Rn(r,t);return r&&ot(r)&&No(r)&&!Hr(r)?e:r||wn(o)||e}var Fa=async function(o){let t=this.getOffsetParent||Mn,e=this.getDimensions,r=await e(o.floating);return{reference:Va(o.reference,await t(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ba(o){return J(o).direction==="rtl"}var Ga={convertOffsetParentRelativeRectToViewportRelativeRect:Oa,getDocumentElement:ie,getClippingRect:Ua,getOffsetParent:Mn,getElementRects:Fa,getClientRects:za,getDimensions:Ha,getScale:Rt,isElement:Q,isRTL:Ba};function Ya(o,t){let e=null,r,i=ie(o);function n(){var a;clearTimeout(r),(a=e)==null||a.disconnect(),e=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),n();let{left:m,top:p,width:h,height:v}=o.getBoundingClientRect();if(a||t(),!h||!v)return;let f=Kt(p),b=Kt(i.clientWidth-(m+h)),T=Kt(i.clientHeight-(p+v)),_=Kt(m),I={rootMargin:-f+"px "+-b+"px "+-T+"px "+-_+"px",threshold:G(0,ue(1,l))||1},w=!0;function D(k){let Z=k[0].intersectionRatio;if(Z!==l){if(!w)return s();Z?s(!1,Z):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{e=new IntersectionObserver(D,{...I,root:i.ownerDocument})}catch{e=new IntersectionObserver(D,I)}e.observe(o)}return s(!0),n}function Dn(o,t,e,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,m=ko(o),p=i||n?[...m?Ct(m):[],...Ct(t)]:[];p.forEach(A=>{i&&A.addEventListener("scroll",e,{passive:!0}),n&&A.addEventListener("resize",e)});let h=m&&a?Ya(m,e):null,v=-1,f=null;s&&(f=new ResizeObserver(A=>{let[I]=A;I&&I.target===m&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),e()}),m&&!l&&f.observe(m),f.observe(t));let b,T=l?it(o):null;l&&_();function _(){let A=it(o);T&&(A.x!==T.x||A.y!==T.y||A.width!==T.width||A.height!==T.height)&&e(),T=A,b=requestAnimationFrame(_)}return e(),()=>{var A;p.forEach(I=>{i&&I.removeEventListener("scroll",e),n&&I.removeEventListener("resize",e)}),h==null||h(),(A=f)==null||A.disconnect(),f=null,l&&cancelAnimationFrame(b)}}var $n=En;var Pn=Tn,Un=xn,Hn=An;var Vn=yn;var Fn=(o,t,e)=>{let r=new Map,i={platform:Ga,...e},n={...i.platform,_c:r};return bn(o,t,{...i,platform:n})};var Wa=g`
|
945
|
+
:host {
|
946
|
+
--mdc-popover-arrow-border-radius: 0.1875rem;
|
947
|
+
--mdc-popover-arrow-border: 0.0625rem solid var(--mds-color-theme-outline-secondary-normal);
|
948
|
+
|
949
|
+
--mdc-popover-primary-background-color: var(--mds-color-theme-background-solid-primary-normal);
|
950
|
+
--mdc-popover-inverted-background-color: var(--mds-color-theme-inverted-background-normal);
|
951
|
+
--mdc-popover-inverted-border-color: var(--mds-color-theme-inverted-outline-primary-normal);
|
952
|
+
--mdc-popover-inverted-text-color: var(--mds-color-theme-inverted-text-primary-normal);
|
953
|
+
}
|
954
|
+
|
955
|
+
:host([color='contrast']) .popover-container {
|
956
|
+
.popover-arrow {
|
957
|
+
background-color: var(--mdc-popover-inverted-background-color);
|
958
|
+
border-color: var(--mdc-popover-inverted-border-color);
|
959
|
+
}
|
960
|
+
|
961
|
+
.popover-close {
|
962
|
+
color: var(--mdc-popover-inverted-text-color);
|
963
|
+
}
|
964
|
+
}
|
965
|
+
|
966
|
+
.popover-container {
|
967
|
+
display: none;
|
968
|
+
position: absolute;
|
969
|
+
box-sizing: content-box;
|
970
|
+
}
|
971
|
+
|
972
|
+
:host([visible]) .popover-container {
|
973
|
+
display: block;
|
974
|
+
}
|
975
|
+
|
976
|
+
.popover-container::part(container) {
|
977
|
+
padding: 0;
|
978
|
+
}
|
979
|
+
|
980
|
+
:host::part(popover-content) {
|
981
|
+
position: relative;
|
982
|
+
padding: 0.75rem;
|
983
|
+
overflow-y: auto;
|
984
|
+
min-width: max-content;
|
985
|
+
z-index: 9998;
|
986
|
+
}
|
987
|
+
|
988
|
+
.popover-backdrop {
|
989
|
+
z-index: 999;
|
990
|
+
position: fixed;
|
991
|
+
top: 0;
|
992
|
+
left: 0;
|
993
|
+
width: 100%;
|
994
|
+
height: 100%;
|
995
|
+
background: transparent;
|
996
|
+
}
|
997
|
+
|
998
|
+
.popover-hover-bridge {
|
999
|
+
position: absolute;
|
1000
|
+
transform: translateX(-50%);
|
1001
|
+
background: transparent;
|
1002
|
+
pointer-events: auto;
|
1003
|
+
}
|
1004
|
+
|
1005
|
+
.popover-arrow {
|
1006
|
+
position: absolute;
|
1007
|
+
width: 1rem;
|
1008
|
+
height: 1rem;
|
1009
|
+
background-color: var(--mdc-popover-primary-background-color);
|
1010
|
+
transform: rotate(45deg);
|
1011
|
+
pointer-events: none;
|
1012
|
+
border: var(--mdc-popover-arrow-border);
|
1013
|
+
}
|
1014
|
+
|
1015
|
+
.popover-close {
|
1016
|
+
position: absolute;
|
1017
|
+
right: 0.75rem;
|
1018
|
+
top: 0.75rem;
|
1019
|
+
cursor: pointer;
|
1020
|
+
z-index: 9999;
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
.popover-arrow[data-side='top'] {
|
1024
|
+
border-top: none;
|
1025
|
+
border-left: none;
|
1026
|
+
border-bottom-right-radius: var(--mdc-popover-arrow-border-radius);
|
1027
|
+
border-top-left-radius: 100%;
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
.popover-arrow[data-side='bottom'] {
|
1031
|
+
border-bottom: none;
|
1032
|
+
border-right: none;
|
1033
|
+
border-top-left-radius: var(--mdc-popover-arrow-border-radius);
|
1034
|
+
border-bottom-right-radius: 100%;
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
.popover-arrow[data-side='right'] {
|
1038
|
+
border-top: none;
|
1039
|
+
border-right: none;
|
1040
|
+
border-bottom-left-radius: var(--mdc-popover-arrow-border-radius);
|
1041
|
+
border-top-right-radius: 100%;
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
.popover-arrow[data-side='left'] {
|
1045
|
+
border-bottom: none;
|
1046
|
+
border-left: none;
|
1047
|
+
border-top-right-radius: var(--mdc-popover-arrow-border-radius);
|
1048
|
+
border-bottom-left-radius: 100%;
|
1049
|
+
}
|
1050
|
+
`,Bn=[Wa];var Gn=y.constructTagName("modalcontainer"),er={TONAL:"tonal",CONTRAST:"contrast"},qa={0:0,1:1,2:2,3:3,4:4},tr={COLOR:er.TONAL,ELEVATION:qa[0],ROLE:"dialog",ARIA_MODAL:!1,CHILDREN:"Lorem ipsum dolor sit amet"};var Yn=y.constructTagName("popover"),zo={LEFT_START:"left-start",LEFT:"left",LEFT_END:"left-end",RIGHT_START:"right-start",RIGHT:"right",RIGHT_END:"right-end",TOP_START:"top-start",TOP:"top",TOP_END:"top-end",BOTTOM_START:"bottom-start",BOTTOM:"bottom",BOTTOM_END:"bottom-end"},Mo={CLICK:"click",MOUSEENTER:"mouseenter",FOCUSIN:"focusin",MANUAL:"manual"},R={PLACEMENT:zo.BOTTOM,TRIGGER:Mo.CLICK,COLOR:er.TONAL,OFFSET:4,VISIBLE:!1,ARROW:!1,CLOSE_BUTTON:!1,FOCUS_TRAP:!1,INTERACTIVE:!1,PREVENT_SCROLL:!1,HIDE_ON_ESCAPE:!1,HIDE_ON_BLUR:!1,HIDE_ON_CLICK_OUTSIDE:!1,FOCUS_BACK:!1,BACKDROP:!1,FLIP:!0,SIZE:!1,DELAY:"0,0",ROLE:"dialog",Z_INDEX:1e3};var Wn=o=>{class t extends o{constructor(...i){super(...i);this.enabledFocusTrap=R.FOCUS_TRAP;this.enabledPreventScroll=R.PREVENT_SCROLL;this.focusTrapIndex=-1;this.focusableElements=[];this.shouldWrapFocus=()=>!0;this.addEventListener("keydown",this.handleKeydown)}deactivateFocusTrap(){this.enabledFocusTrap=!1,this.enabledPreventScroll=!1,this.focusTrapIndex=-1,document.body.style.overflow=""}hasNoClientRects(i){return i.getClientRects().length===0}hasZeroDimensions(i){let{width:n,height:s}=i.getBoundingClientRect(),{offsetWidth:a,offsetHeight:l}=i;return a+l+s+n===0}isNotVisible(i){return this.hasZeroDimensions(i)||this.hasNoClientRects(i)}hasHiddenStyle(i){let{display:n,opacity:s,visibility:a}=i.style;return n==="none"||s==="0"||a==="hidden"||a==="collapse"}hasComputedHidden(i){let n=getComputedStyle(i);return n.visibility==="hidden"||n.height==="0"||n.display==="none"}isHidden(i){return i.hasAttribute("hidden")||i.getAttribute("aria-hidden")==="true"||this.hasHiddenStyle(i)||this.isNotVisible(i)||this.hasComputedHidden(i)}isNotTabbable(i){return i.getAttribute("tabindex")==="-1"}isInteractiveElement(i){return!!(new Set(["BUTTON","DETAILS","EMBED","IFRAME","SELECT","TEXTAREA"]).has(i.tagName)||i instanceof HTMLAnchorElement&&i.hasAttribute("href")||i instanceof HTMLInputElement&&i.type!=="hidden"||(i instanceof HTMLAudioElement||i instanceof HTMLVideoElement)&&i.hasAttribute("controls")||(i instanceof HTMLImageElement||i instanceof HTMLObjectElement)&&i.hasAttribute("usemap")||i.hasAttribute("tabindex")&&i.tabIndex>-1)}isFocusable(i){return this.isHidden(i)||this.isNotTabbable(i)?!1:this.isInteractiveElement(i)}findFocusable(i,n=new Set){return i instanceof HTMLElement&&this.isFocusable(i)&&n.add(i),Array.from(i.children).forEach(a=>{let l=a;this.isFocusable(l)&&n.add(l),l.shadowRoot?this.findFocusable(l.shadowRoot,n):l.tagName==="SLOT"?l.assignedElements({flatten:!0}).forEach(p=>{p instanceof HTMLElement&&this.findFocusable(p,n)}):this.findFocusable(l,n)}),[...n]}setFocusableElements(){this.shadowRoot&&(this.focusableElements=this.findFocusable(this.shadowRoot,new Set))}setInitialFocus(i=0){this.focusableElements.length!==0&&(this.enabledPreventScroll&&(document.body.style.overflow="hidden"),this.focusableElements[i]&&(this.focusTrapIndex=i,this.focusableElements[i].focus()))}calculateNextIndex(i,n){let{length:s}=this.focusableElements,a=this.shouldWrapFocus();if(i===-1)return n>0?0:s-1;let l=i+n;return a?(l<0&&(l=s-1),l>=s&&(l=0)):(l<0&&(l=0),l>=s&&(l=s-1)),l}getDeepActiveElement(){var n;let i=document.activeElement||document.body;for(;i instanceof HTMLElement&&((n=i.shadowRoot)!=null&&n.activeElement);)i=i.shadowRoot.activeElement;return i||document.body}findElement(i){return this.focusableElements.findIndex(n=>this.isEqualFocusNode(i,n))}isEqualFocusNode(i,n){return i.nodeType>=0?n.isEqualNode(i)&&n===i:!1}trapFocus(i){if(this.focusableElements.length===0)return;let n=this.getDeepActiveElement(),s=this.findElement(n);i?this.focusTrapIndex=this.calculateNextIndex(s,-1):this.focusTrapIndex=this.calculateNextIndex(s,1);let a=this.focusableElements[this.focusTrapIndex];a&&a.focus()}handleKeydown(i){!this.enabledFocusTrap||!this.focusableElements.length||i.key==="Tab"&&(i.preventDefault(),this.trapFocus(i.shiftKey))}}return c([d({type:Boolean})],t.prototype,"enabledFocusTrap",2),c([d({type:Boolean})],t.prototype,"enabledPreventScroll",2),t};var Do=class{constructor(){this.stack=[]}push(t){this.stack.push(t)}pop(){return this.stack.pop()}peek(){return this.stack[this.stack.length-1]}remove(t){this.stack=this.stack.filter(e=>e!==t)}clear(){this.stack=[]}},nt=new Do;var q=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabel=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-label"})],t.prototype,"dataAriaLabel",2),t};var Br=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaDescribedby=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-describedby"})],t.prototype,"dataAriaDescribedby",2),t};var Gr=o=>{class t extends o{constructor(){super(...arguments);this.dataAriaLabelledby=null}}return c([d({type:String,reflect:!0,attribute:"data-aria-labelledby"})],t.prototype,"dataAriaLabelledby",2),t};var st=class{static dispatchPopoverEvent(t,e){e.dispatchEvent(new CustomEvent(t,{detail:{show:e.visible},composed:!0,bubbles:!0}))}static onShowPopover(t){this.dispatchPopoverEvent("popover-on-show",t)}static onHidePopover(t){this.dispatchPopoverEvent("popover-on-hide",t)}static onCreatedPopover(t){this.dispatchPopoverEvent("popover-on-created",t)}static onDestroyedPopover(t){this.dispatchPopoverEvent("popover-on-destroyed",t)}};var Yr=class{constructor(t){this.arrowPixelChange=!1;this.popover=t}setupDelay(){try{let[t,e]=this.popover.delay.split(",").map(r=>{let i=parseInt(r,10);if(Number.isNaN(i)||i<0)throw new Error(`Invalid delay value: ${r}`);return i});return[t,e]}catch{return this.popover.delay="0,0",[0,0]}}setupHoverBridge(t){var a;let e=this.popover.renderRoot.querySelector(".popover-hover-bridge");Object.assign(e.style,{top:"",left:"",right:"",bottom:""});let r=`calc(${this.popover.showArrow?"0.75rem + ":""}${this.popover.offset}px)`,i=(a=this.popover.shadowRoot)==null?void 0:a.querySelector("mdc-modalcontainer"),n=i.offsetHeight||0,s=i.offsetWidth||0;if(e)switch(t.split("-")[0]){case"top":e.style.height=r,e.style.bottom=`calc(-1 * (${r}))`,e.style.left="50%",e.style.width=`${s}px`;break;case"left":e.style.height=`${n}px`,e.style.width=r,e.style.right=`calc(-1.5 * (${r}))`;break;case"right":e.style.height=`${n}px`,e.style.width=r,e.style.left=`calc(-0.5 * (${r}))`;break;case"bottom":default:e.style.height=r,e.style.top=`calc(-1 * (${r}))`,e.style.left="50%",e.style.width=`${s}px`;break}}setupAppendTo(){if(this.popover.appendTo){let t=document.getElementById(this.popover.appendTo);t&&t.appendChild(this.popover)}}setupAccessibility(){var t,e,r;this.popover.interactive&&(this.popover.dataAriaLabel||(this.popover.dataAriaLabel=((t=this.popover.triggerElement)==null?void 0:t.ariaLabel)||((e=this.popover.triggerElement)==null?void 0:e.textContent)||""),this.popover.dataAriaLabelledby||(this.popover.dataAriaLabelledby=((r=this.popover.triggerElement)==null?void 0:r.id)||""))}updateArrowStyle(t,e){var p;if(!this.popover.arrowElement)return;let r=e.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[r],{x:n,y:s}=t,a=this.popover.arrowElement.getBoundingClientRect(),l=(p=this.popover.arrowElement.offsetParent)==null?void 0:p.getBoundingClientRect();if(!this.arrowPixelChange){let h=l!=null&&l[i]?12-Math.abs(a[i]-l[i]):0;Math.round(h)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let m=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",r),Object.assign(this.popover.arrowElement.style,{left:n!=null?`${n}px`:"",top:s!=null?`${s}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-m}px`})}updatePopoverStyle(t,e){this.popover.containerElement&&Object.assign(this.popover.containerElement.style,{left:`${t}px`,top:`${e}px`})}};var L=class extends q(Gr(Br(Wn(E)))){constructor(){super();this.id="";this.triggerID="";this.trigger=R.TRIGGER;this.placement=R.PLACEMENT;this.color=R.COLOR;this.visible=R.VISIBLE;this.offset=R.OFFSET;this.focusTrap=R.FOCUS_TRAP;this.preventScroll=R.PREVENT_SCROLL;this.showArrow=R.ARROW;this.closeButton=R.CLOSE_BUTTON;this.interactive=R.INTERACTIVE;this.delay=R.DELAY;this.hideOnEscape=R.HIDE_ON_ESCAPE;this.hideOnBlur=R.HIDE_ON_BLUR;this.hideOnOutsideClick=R.HIDE_ON_CLICK_OUTSIDE;this.focusBackToTrigger=R.FOCUS_BACK;this.backdrop=R.BACKDROP;this.flip=R.FLIP;this.size=R.SIZE;this.zIndex=R.Z_INDEX;this.appendTo="";this.closeButtonAriaLabel=null;this.dataRole=R.ROLE;this.arrowElement=null;this.triggerElement=null;this.containerElement=null;this.hoverTimer=null;this.isTriggerClicked=!1;this.openDelay=0;this.closeDelay=0;this.onOutsidePopoverClick=e=>{if(nt.peek()!==this)return;let r=!1,i=e.composedPath();r=this.contains(e.target)||i.includes(this.triggerElement);let n=this.renderRoot.querySelector(".popover-backdrop"),s=n?i.includes(n):!1;(!r||s)&&this.hidePopover()};this.onEscapeKeydown=e=>{!this.visible||e.code!=="Escape"||(e.preventDefault(),this.hidePopover())};this.onPopoverFocusOut=e=>{this.contains(e.relatedTarget)||this.hidePopover()};this.startCloseDelay=()=>{if(!this.interactive)this.hidePopover();else{if(this.isTriggerClicked)return;this.hoverTimer=window.setTimeout(()=>{this.visible=!1},this.closeDelay)}};this.cancelCloseDelay=()=>{this.hoverTimer&&(clearTimeout(this.hoverTimer),this.hoverTimer=null)};this.showPopover=()=>{this.cancelCloseDelay(),setTimeout(()=>{this.visible=!0,st.onShowPopover(this)},this.openDelay),nt.peek()!==this&&nt.push(this)};this.hidePopover=()=>{nt.peek()===this&&(setTimeout(()=>{this.visible=!1,st.onHidePopover(this),this.isTriggerClicked=!1},this.closeDelay),nt.pop())};this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)};this.utils=new Yr(this)}async firstUpdated(e){super.firstUpdated(e),this.containerElement=this.renderRoot.querySelector(".popover-container"),this.utils.setupAppendTo(),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),st.onCreatedPopover(this),this.visible&&(await this.positionPopover(),await this.handleCreatePopoverFirstUpdate())}async disconnectedCallback(){super.disconnectedCallback(),await this.removeEventListeners(),st.onDestroyedPopover(this),nt.remove(this)}setupTriggerListener(){var e,r;if(this.triggerID&&(this.triggerElement=document.getElementById(this.triggerID),!!this.triggerElement)){if(this.trigger==="mouseenter"&&(this.interactive?this.trigger="mouseenter click":this.trigger="mouseenter focusin"),this.trigger.includes("click")&&this.triggerElement.addEventListener("click",this.togglePopoverVisible),this.trigger.includes("mouseenter")){let i=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.showPopover),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),(e=this.containerElement)==null||e.addEventListener("mouseenter",this.cancelCloseDelay),(r=this.containerElement)==null||r.addEventListener("mouseleave",this.startCloseDelay),i==null||i.addEventListener("mouseenter",this.cancelCloseDelay)}this.trigger.includes("focusin")&&(this.triggerElement.addEventListener("focusin",this.showPopover),this.interactive||this.triggerElement.addEventListener("focusout",this.hidePopover)),this.addEventListener("focus-trap-exit",this.hidePopover)}}removeEventListeners(){var r,i;if(!this.triggerElement)return;let e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.removeEventListener("click",this.togglePopoverVisible),this.triggerElement.removeEventListener("mouseenter",this.showPopover),this.triggerElement.removeEventListener("mouseleave",this.hidePopover),(r=this.containerElement)==null||r.removeEventListener("mouseenter",this.cancelCloseDelay),(i=this.containerElement)==null||i.removeEventListener("mouseleave",this.startCloseDelay),this.triggerElement.removeEventListener("focusin",this.showPopover),this.triggerElement.removeEventListener("focusout",this.hidePopover),e==null||e.removeEventListener("mouseenter",this.cancelCloseDelay),this.removeEventListener("focus-trap-exit",this.hidePopover)}async updated(e){if(super.updated(e),e.has("visible")){let r=e.get("visible");await this.isOpenUpdated(r,this.visible)}if(e.has("placement")&&this.setAttribute("placement",Object.values(zo).includes(this.placement)?this.placement:R.PLACEMENT),e.has("delay")&&([this.openDelay,this.closeDelay]=this.utils.setupDelay()),e.has("trigger")){let i=this.trigger.split(" ").filter(n=>Object.values(Mo).includes(n));this.setAttribute("trigger",i.length>0?this.trigger:R.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(er).includes(this.color)?this.color:R.COLOR),e.has("zIndex")&&this.setAttribute("z-index",`${this.zIndex}`),e.has("append-to")&&this.utils.setupAppendTo(),(e.has("interactive")||e.has("data-aria-label")||e.has("data-aria-labelledby"))&&this.utils.setupAccessibility()}async isOpenUpdated(e,r){var i,n,s,a;if(!(e===r||!this.triggerElement))if(r){if(this.enabledFocusTrap=this.focusTrap,this.enabledPreventScroll=this.preventScroll,this.backdrop){let l=this.renderRoot.querySelector(".popover-backdrop");l.style.zIndex=`${this.zIndex-1}`,this.triggerElement.style.zIndex=`${this.zIndex}`}this.positionPopover(),await this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&((i=this.containerElement)==null||i.addEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="none")),this.hideOnOutsideClick&&document.addEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.addEventListener("keydown",this.onEscapeKeydown),this.triggerElement.setAttribute("aria-expanded","true"),this.interactive&&this.triggerElement.setAttribute("aria-haspopup",this.triggerElement.getAttribute("aria-haspopup")||"dialog")}else this.hideOnBlur&&((n=this.containerElement)==null||n.removeEventListener("focusout",this.onPopoverFocusOut),this.trigger==="click"&&(this.triggerElement.style.pointerEvents="")),this.hideOnOutsideClick&&document.removeEventListener("click",this.onOutsidePopoverClick),this.hideOnEscape&&document.removeEventListener("keydown",this.onEscapeKeydown),(s=this.deactivateFocusTrap)==null||s.call(this),this.triggerElement.removeAttribute("aria-expanded"),this.interactive&&this.triggerElement.removeAttribute("aria-haspopup"),this.focusBackToTrigger&&((a=this.triggerElement)==null||a.focus())}async handleCreatePopoverFirstUpdate(){var e,r;this.visible&&this.interactive&&((e=this.setFocusableElements)==null||e.call(this),await this.updateComplete,(r=this.setInitialFocus)==null||r.call(this))}positionPopover(){if(!this.triggerElement||!this.containerElement)return;let e=[Pn()],r=this.offset;if(this.flip&&e.push(Un()),this.size){let i=this.containerElement.querySelector('[part="popover-content"]');e.push(Hn({apply({availableHeight:n}){i&&Object.assign(i.style,{maxHeight:`${n}px`})},padding:50}))}if(this.showArrow&&(this.arrowElement=this.renderRoot.querySelector(".popover-arrow"),this.arrowElement)){let i=this.arrowElement.offsetHeight;r=Math.sqrt(2*i**2)/2+this.offset,e.push(Vn({element:this.arrowElement,padding:12}))}e.push($n(r)),Dn(this.triggerElement,this.containerElement,async()=>{if(!this.triggerElement||!this.containerElement)return;let{x:i,y:n,middlewareData:s,placement:a}=await Fn(this.triggerElement,this.containerElement,{placement:this.placement,middleware:e});this.utils.updatePopoverStyle(i,n),s.arrow&&this.arrowElement&&this.utils.updateArrowStyle(s.arrow,a),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(a)})}render(){return u`
|
1051
|
+
${this.backdrop&&this.visible?u`<div class="popover-backdrop"></div>`:x}
|
1052
|
+
<mdc-modalcontainer
|
1053
|
+
class="popover-container"
|
1054
|
+
elevation="3"
|
1055
|
+
color=${this.color}
|
1056
|
+
?data-aria-modal=${this.interactive}
|
1057
|
+
data-role="${S(this.dataRole)}"
|
1058
|
+
data-aria-label="${S(this.interactive?this.dataAriaLabel:void 0)}"
|
1059
|
+
data-aria-labelledby="${S(this.interactive?this.dataAriaLabelledby:void 0)}"
|
1060
|
+
data-aria-describedby="${S(this.interactive?this.dataAriaDescribedby:void 0)}"
|
1061
|
+
style="z-index: ${this.zIndex};"
|
1062
|
+
>
|
1063
|
+
<div class="popover-hover-bridge"></div>
|
1064
|
+
${this.closeButton?u` <mdc-button
|
1065
|
+
class="popover-close"
|
1066
|
+
prefix-icon="cancel-bold"
|
1067
|
+
variant="tertiary"
|
1068
|
+
size="20"
|
1069
|
+
aria-label=${S(this.closeButtonAriaLabel)}
|
1070
|
+
@click="${this.hidePopover}"
|
1071
|
+
></mdc-button>`:x}
|
1072
|
+
${this.showArrow?u`<div class="popover-arrow"></div>`:x}
|
1073
|
+
<div part="popover-content">
|
1074
|
+
<slot></slot>
|
1075
|
+
</div>
|
1076
|
+
</mdc-modalcontainer>
|
1077
|
+
`}};L.styles=[...E.styles,...Bn],c([d({type:String})],L.prototype,"id",2),c([d({type:String})],L.prototype,"triggerID",2),c([d({type:String,reflect:!0})],L.prototype,"trigger",2),c([d({type:String,reflect:!0})],L.prototype,"placement",2),c([d({type:String,reflect:!0})],L.prototype,"color",2),c([d({type:Boolean,reflect:!0})],L.prototype,"visible",2),c([d({type:Number,reflect:!0})],L.prototype,"offset",2),c([d({type:Boolean,reflect:!0,attribute:"focus-trap"})],L.prototype,"focusTrap",2),c([d({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],L.prototype,"preventScroll",2),c([d({type:Boolean,attribute:"show-arrow"})],L.prototype,"showArrow",2),c([d({type:Boolean,reflect:!0,attribute:"close-button"})],L.prototype,"closeButton",2),c([d({type:Boolean,reflect:!0})],L.prototype,"interactive",2),c([d({type:String,reflect:!0})],L.prototype,"delay",2),c([d({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],L.prototype,"hideOnEscape",2),c([d({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],L.prototype,"hideOnBlur",2),c([d({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],L.prototype,"hideOnOutsideClick",2),c([d({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],L.prototype,"focusBackToTrigger",2),c([d({type:Boolean,reflect:!0})],L.prototype,"backdrop",2),c([d({type:Boolean,reflect:!0})],L.prototype,"flip",2),c([d({type:Boolean,reflect:!0})],L.prototype,"size",2),c([d({type:Number,reflect:!0,attribute:"z-index"})],L.prototype,"zIndex",2),c([d({type:String,reflect:!0,attribute:"append-to"})],L.prototype,"appendTo",2),c([d({type:String,attribute:"close-button-aria-label"})],L.prototype,"closeButtonAriaLabel",2),c([d({type:String,reflect:!0,attribute:"data-role"})],L.prototype,"dataRole",2);var $o=L;var Xa=[C,g`
|
1078
|
+
:host {
|
1079
|
+
--mdc-modalcontainer-primary-background-color: var(--mds-color-theme-background-solid-primary-normal);
|
1080
|
+
--mdc-modalcontainer-border-color: var(--mds-color-theme-outline-secondary-normal);
|
1081
|
+
--mdc-modalcontainer-inverted-background-color: var(--mds-color-theme-inverted-background-normal);
|
1082
|
+
--mdc-modalcontainer-inverted-border-color: var(--mds-color-theme-inverted-outline-primary-normal);
|
1083
|
+
--mdc-modalcontainer-inverted-text-color: var(--mds-color-theme-inverted-text-primary-normal);
|
1084
|
+
--mdc-modalcontainer-elevation-1: var(--mds-elevation-1);
|
1085
|
+
--mdc-modalcontainer-elevation-2: var(--mds-elevation-2);
|
1086
|
+
--mdc-modalcontainer-elevation-3: var(--mds-elevation-3);
|
1087
|
+
--mdc-modalcontainer-elevation-4: var(--mds-elevation-4);
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
:host::part(container) {
|
1091
|
+
padding: 0.75rem;
|
1092
|
+
background-color: var(--mdc-modalcontainer-primary-background-color);
|
1093
|
+
border-radius: 0.5rem;
|
1094
|
+
border: 0.0625rem solid var(--mdc-modalcontainer-border-color);
|
1095
|
+
}
|
1096
|
+
|
1097
|
+
:host([color='contrast'])::part(container) {
|
1098
|
+
background-color: var(--mdc-modalcontainer-inverted-background-color);
|
1099
|
+
border: 0.0625rem solid var(--mdc-modalcontainer-inverted-border-color);
|
1100
|
+
color: var(--mdc-modalcontainer-inverted-text-color);
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
:host([elevation='1'])::part(container) {
|
1104
|
+
filter: var(--mdc-modalcontainer-elevation-1);
|
1105
|
+
}
|
1106
|
+
:host([elevation='2'])::part(container) {
|
1107
|
+
filter: var(--mdc-modalcontainer-elevation-2);
|
1108
|
+
}
|
1109
|
+
:host([elevation='3'])::part(container) {
|
1110
|
+
filter: var(--mdc-modalcontainer-elevation-3);
|
1111
|
+
}
|
1112
|
+
:host([elevation='4'])::part(container) {
|
1113
|
+
filter: var(--mdc-modalcontainer-elevation-4);
|
1114
|
+
}
|
1115
|
+
`],qn=Xa;var Ue=class extends q(Gr(Br(E))){constructor(){super(...arguments);this.color=tr.COLOR;this.elevation=tr.ELEVATION;this.dataRole=tr.ROLE;this.dataAriaModal=tr.ARIA_MODAL}render(){return u`
|
1116
|
+
<div
|
1117
|
+
role="${S(this.dataRole)}"
|
1118
|
+
aria-modal=${S(this.dataAriaModal===!0?"true":void 0)}
|
1119
|
+
aria-label="${S(this.dataAriaLabel)}"
|
1120
|
+
aria-labelledby="${S(this.dataAriaLabelledby)}"
|
1121
|
+
aria-describedby="${S(this.dataAriaDescribedby)}"
|
1122
|
+
part="container"
|
1123
|
+
>
|
1124
|
+
<slot></slot>
|
1125
|
+
</div>
|
1126
|
+
`}};Ue.styles=[...E.styles,...qn],c([d({type:String,reflect:!0})],Ue.prototype,"color",2),c([d({type:Number,reflect:!0})],Ue.prototype,"elevation",2),c([d({type:String,reflect:!0,attribute:"data-role"})],Ue.prototype,"dataRole",2),c([d({type:Boolean,reflect:!0,attribute:"data-aria-modal"})],Ue.prototype,"dataAriaModal",2);var Xn=Ue;Xn.register(Gn);$o.register(Yn);var Za=$o;var ja=g`
|
944
1127
|
:host {
|
945
1128
|
--mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);
|
946
1129
|
--mdc-bullet-size-small: 0.25rem;
|
@@ -961,7 +1144,7 @@
|
|
961
1144
|
:host([size="large"]) {
|
962
1145
|
height: var(--mdc-bullet-size-large);
|
963
1146
|
}
|
964
|
-
`,
|
1147
|
+
`,Zn=[ja];var jn=y.constructTagName("bullet"),Kn={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var rr=class extends E{constructor(){super(...arguments);this.size=Kn.SMALL}};rr.styles=[...E.styles,...Zn],c([d({type:String,reflect:!0})],rr.prototype,"size",2);var Po=rr;Po.register(jn);var Ka=Po;var Qa=g`
|
965
1148
|
:host {
|
966
1149
|
--mdc-marker-width: 0.25rem;
|
967
1150
|
--mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);
|
@@ -986,7 +1169,7 @@
|
|
986
1169
|
var(--mdc-marker-striped-background-color) 0.375rem
|
987
1170
|
);
|
988
1171
|
}
|
989
|
-
`,
|
1172
|
+
`,Qn=[Qa];var Jn=y.constructTagName("marker"),es={SOLID:"solid",STRIPED:"striped"};var or=class extends E{constructor(){super(...arguments);this.variant=es.SOLID}};or.styles=[...E.styles,...Qn],c([d({type:String,reflect:!0})],or.prototype,"variant",2);var Uo=or;Uo.register(Jn);var Ja=Uo;var ts=y.constructTagName("divider"),ir={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Ho={SOLID:"solid",GRADIENT:"gradient"},He={POSITIVE:"positive",NEGATIVE:"negative"},nr={UP:"arrow-up-regular",DOWN:"arrow-down-regular",LEFT:"arrow-left-regular",RIGHT:"arrow-right-regular"},at={ORIENTATION:ir.HORIZONTAL,VARIANT:Ho.SOLID,ARROW_DIRECTION:He.NEGATIVE,BUTTON_DIRECTION:He.NEGATIVE};var el=[C,g`
|
990
1173
|
:host {
|
991
1174
|
--mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);
|
992
1175
|
--mdc-divider-width: 0.0625rem;
|
@@ -1197,29 +1380,29 @@
|
|
1197
1380
|
font-size: var(--mdc-divider-text-size);
|
1198
1381
|
line-height: var(--mdc-divider-text-line-height);
|
1199
1382
|
}
|
1200
|
-
`],
|
1383
|
+
`],rs=el;var Ve=class extends E{constructor(){super();this.orientation=at.ORIENTATION;this.variant=at.VARIANT;this.arrowDirection=at.ARROW_DIRECTION;this.buttonPosition=at.BUTTON_DIRECTION;this.setAttribute("data-type","mdc-primary-divider")}setVariant(e){this.setAttribute("variant",Object.values(Ho).includes(e)?e:at.VARIANT)}setOrientation(e){this.setAttribute("orientation",Object.values(ir).includes(e)?e:at.ORIENTATION)}ensureValidDirections(){let e=this.orientation===ir.HORIZONTAL?He.NEGATIVE:He.POSITIVE;Object.values(He).includes(this.buttonPosition)||(this.buttonPosition=e),Object.values(He).includes(this.arrowDirection)||(this.arrowDirection=e)}setGrabberButton(){this.ensureValidDirections();let e=this.querySelector("mdc-button");if(e){let r=this.getArrowIcon();e.setAttribute("variant","secondary"),e.setAttribute("prefix-icon",r)}}getArrowIcon(){let e=this.orientation===ir.HORIZONTAL,r=this.arrowDirection===He.POSITIVE;return e?r?nr.UP:nr.DOWN:r?nr.RIGHT:nr.LEFT}update(e){super.update(e),e.has("orientation")&&this.setOrientation(this.orientation),e.has("variant")&&this.setVariant(this.variant),(e.has("orientation")||e.has("arrowDirection")||e.has("buttonPosition"))&&this.setGrabberButton()}inferDividerType(){var s;let e=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"),r=(e==null?void 0:e.assignedElements({flatten:!0}))||[];if(r.length>1)return;let i=r.some(a=>a.tagName===Bt.toUpperCase()),n=r.some(a=>a.tagName===qt.toUpperCase());i&&!n?this.setAttribute("data-type","mdc-text-divider"):!i&&n&&(this.setAttribute("data-type","mdc-grabber-divider"),this.setGrabberButton())}render(){return u`
|
1201
1384
|
<div></div>
|
1202
1385
|
<slot @slotchange=${this.inferDividerType}></slot>
|
1203
1386
|
<div></div>
|
1204
|
-
`}};
|
1387
|
+
`}};Ve.styles=[...E.styles,...rs],c([d({type:String,reflect:!0})],Ve.prototype,"orientation",2),c([d({type:String,reflect:!0})],Ve.prototype,"variant",2),c([d({type:String,attribute:"arrow-direction",reflect:!0})],Ve.prototype,"arrowDirection",2),c([d({type:String,attribute:"button-position",reflect:!0})],Ve.prototype,"buttonPosition",2);var Vo=Ve;Vo.register(ts);var tl=Vo;var rl=[C,g`
|
1205
1388
|
:host {
|
1206
1389
|
padding: unset;
|
1207
1390
|
margin: unset;
|
1208
1391
|
outline: none;
|
1209
1392
|
border-radius: 0.25rem;
|
1210
1393
|
}
|
1211
|
-
|
1394
|
+
`,...$()],os=rl;var sr=class extends wr(de($e)){constructor(){super();this.ariaLabel=null;this.active=void 0,this.disabled=void 0,this.softDisabled=void 0,this.role="button",this.type=he.TYPE}update(e){super.update(e),e.has("size")&&this.setSize(this.size)}setSize(e){this.setAttribute("size",Object.values(N).includes(e)?`${e}`:Et.SIZE.toString())}render(){return u`
|
1212
1395
|
<mdc-avatar
|
1213
1396
|
slot="prefixIcon"
|
1214
1397
|
?is-typing="${this.isTyping}"
|
1215
|
-
counter="${
|
1216
|
-
icon-name="${
|
1217
|
-
initials="${
|
1218
|
-
presence="${
|
1219
|
-
size="${
|
1220
|
-
src="${
|
1398
|
+
counter="${S(this.counter)}"
|
1399
|
+
icon-name="${S(this.iconName)}"
|
1400
|
+
initials="${S(this.initials)}"
|
1401
|
+
presence="${S(this.presence)}"
|
1402
|
+
size="${S(this.size)}"
|
1403
|
+
src="${S(this.src)}"
|
1221
1404
|
></mdc-avatar>
|
1222
|
-
`}};
|
1405
|
+
`}};sr.styles=[...os],c([d({type:String,attribute:"aria-label"})],sr.prototype,"ariaLabel",2);var Fo=sr;var is=y.constructTagName("avatarbutton");Fo.register(is);var ol=Fo;var U=[];for(let o=0;o<256;++o)U.push((o+256).toString(16).slice(1));function ns(o,t=0){return(U[o[t+0]]+U[o[t+1]]+U[o[t+2]]+U[o[t+3]]+"-"+U[o[t+4]]+U[o[t+5]]+"-"+U[o[t+6]]+U[o[t+7]]+"-"+U[o[t+8]]+U[o[t+9]]+"-"+U[o[t+10]]+U[o[t+11]]+U[o[t+12]]+U[o[t+13]]+U[o[t+14]]+U[o[t+15]]).toLowerCase()}var Bo,il=new Uint8Array(16);function Go(){if(!Bo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bo=crypto.getRandomValues.bind(crypto)}return Bo(il)}var nl=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Yo={randomUUID:nl};function sl(o,t,e){var i,n,s;if(Yo.randomUUID&&!t&&!o)return Yo.randomUUID();o=o||{};let r=(s=(n=o.random)!=null?n:(i=o.rng)==null?void 0:i.call(o))!=null?s:Go();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(e=e||0,e<0||e+16>t.length)throw new RangeError(`UUID byte range ${e}:${e+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[e+a]=r[a];return t}return ns(r)}var we=sl;var al=[g`
|
1223
1406
|
:host{
|
1224
1407
|
--mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
1225
1408
|
--mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
@@ -1334,7 +1517,7 @@
|
|
1334
1517
|
opacity: 0;
|
1335
1518
|
pointer-events: none;
|
1336
1519
|
}
|
1337
|
-
|
1520
|
+
`,...$(!0)],ss=al;var as=y.constructTagName("formfieldwrapper"),fe={DEFAULT:"default",ERROR:"error",PRIORITY:"priority",SUCCESS:"success",WARNING:"warning"},V={VALIDATION:fe.DEFAULT,HELPER_TEXT_ID:"helper-text-id",HEADING_ID:"heading-id"},lt={TAGNAME:M.SPAN,TYPE:z.BODY_MIDSIZE_REGULAR,HEADER_TYPE:z.BODY_MIDSIZE_BOLD};var ll=[C,g`
|
1338
1521
|
:host {
|
1339
1522
|
flex-direction: column;
|
1340
1523
|
align-items: flex-start;
|
@@ -1383,61 +1566,61 @@
|
|
1383
1566
|
:host([help-text-type='priority']) .mdc-help-text {
|
1384
1567
|
color: var(--mds-color-theme-text-accent-normal);
|
1385
1568
|
}
|
1386
|
-
`],
|
1387
|
-
id="${
|
1388
|
-
tagname="${
|
1389
|
-
type="${
|
1569
|
+
`],ls=ll;var cs=o=>({[fe.ERROR]:"error-legacy-badge-filled",[fe.WARNING]:"warning-badge-filled",[fe.SUCCESS]:"check-circle-badge-filled",[fe.PRIORITY]:"priority-badge-filled",[fe.DEFAULT]:""})[o]||"";var Ce=class extends _t(E){constructor(){super(...arguments);this.id="";this.helpTextType=V.VALIDATION;this.shouldRenderLabel=!0}renderLabelElement(){return this.label?this.shouldRenderLabel?u`<label for="${this.id}" class="mdc-label" part="label">${this.label}</label>`:u` <mdc-text
|
1570
|
+
id="${V.HEADING_ID}"
|
1571
|
+
tagname="${lt.TAGNAME}"
|
1572
|
+
type="${lt.HEADER_TYPE}"
|
1390
1573
|
part="label"
|
1391
1574
|
>${this.label}</mdc-text
|
1392
|
-
>`:
|
1393
|
-
<mdc-text part="required-label" tagname=${
|
1575
|
+
>`:x}renderRequiredLabel(){return this.requiredLabel?u`
|
1576
|
+
<mdc-text part="required-label" tagname=${lt.TAGNAME} type=${lt.TYPE}>
|
1394
1577
|
(${this.requiredLabel})
|
1395
1578
|
</mdc-text>
|
1396
|
-
`:
|
1579
|
+
`:x}renderHelpTextIcon(){if(!this.helpText)return x;let e=cs(this.helpTextType||V.VALIDATION);return e&&!this.disabled?u`<mdc-icon part="helper-icon" size="1" length-unit="rem" name=${e}></mdc-icon>`:x}renderHelpText(){return this.helpText?u`
|
1397
1580
|
<mdc-text
|
1398
|
-
id="${
|
1581
|
+
id="${V.HELPER_TEXT_ID}"
|
1399
1582
|
part="help-text"
|
1400
|
-
tagname=${
|
1401
|
-
type=${
|
1583
|
+
tagname=${lt.TAGNAME}
|
1584
|
+
type=${lt.TYPE}
|
1402
1585
|
>
|
1403
1586
|
${this.helpText}
|
1404
1587
|
</mdc-text>
|
1405
|
-
`:
|
1588
|
+
`:x}renderLabel(){return u`<div class="mdc-label-text" part="label-text">
|
1406
1589
|
<slot name="label">${this.renderLabelElement()}</slot>
|
1407
1590
|
<slot name="required-label">${this.renderRequiredLabel()}</slot>
|
1408
1591
|
<slot name="label-info"></slot>
|
1409
|
-
</div>`}renderHelperText(){return this.helpText?
|
1592
|
+
</div>`}renderHelperText(){return this.helpText?u`<div class="mdc-help-text" part="mdc-help-text">
|
1410
1593
|
<slot name="help-icon">${this.renderHelpTextIcon()}</slot>
|
1411
1594
|
<slot name="help-text">${this.renderHelpText()}</slot>
|
1412
|
-
</div>`:
|
1595
|
+
</div>`:x}};Ce.styles=[...E.styles,...ls],c([d({reflect:!0,type:String})],Ce.prototype,"label",2),c([d({type:String,reflect:!0,attribute:"required-label"})],Ce.prototype,"requiredLabel",2),c([d({type:String})],Ce.prototype,"id",2),c([d({reflect:!0,attribute:"help-text-type"})],Ce.prototype,"helpTextType",2),c([d({type:String,reflect:!0,attribute:"help-text"})],Ce.prototype,"helpText",2);var ee=Ce;ee.register(as);var Nt=ee;var ge=o=>{class t extends o{constructor(){super(...arguments);this.name=""}}return c([d({reflect:!0,type:String})],t.prototype,"name",2),t};var ds=y.constructTagName("input"),ms={OFF:"off",NONE:"none",ON:"on",SENTENCES:"sentences",WORDS:"words",CHARACTERS:"characters"},ps={MAX_LENGTH:10,HELPERTEXT:"Prefix text should not exceed 10 characters",VALIDATION:fe.ERROR},Fe={VALIDATION:fe.DEFAULT,ICON_SIZE_VALUE:1,ICON_SIZE_UNIT:"rem",CLEAR_BUTTON_ICON:"cancel-bold",CLEAR_BUTTON_VARIANT:Qe.TERTIARY,CLEAR_BUTTON_SIZE:Se[20],PREFIX_TEXT_TYPE:z.BODY_MIDSIZE_REGULAR,PREFIX_TEXT_TAG:M.SPAN};var Be=o=>{class t extends o{constructor(){super(...arguments);this.value=""}}return c([d({reflect:!0,type:String})],t.prototype,"value",2),t};var O=class extends q(Be(ge(Nt))){constructor(){super();this.placeholder="";this.readonly=!1;this.trailingButton=!1;this.autocapitalize=ms.OFF;this.autocomplete="off";this.autofocus=!1;this.clearAriaLabel="";this.internals=this.attachInternals(),this.id=`mdc-input-${we()}`}checkValidity(){return this.setValidityFromInput(),this.internals.checkValidity()}reportValidity(){return this.setValidityFromInput(),this.internals.reportValidity()}get form(){return this.internals.form}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.inputElement&&(this.inputElement.checkValidity(),this.setValidityFromInput(),this.internals.setFormValue(this.inputElement.value))}).catch(e=>{this.onerror&&this.onerror(e)})}updated(e){super.updated(e),e.has("value")&&this.handleValueChange()}handleValueChange(){this.internals.setFormValue(this.value),this.updateComplete.then(()=>{this.setValidityFromInput()}).catch(e=>{this.onerror&&this.onerror(e)})}attributeChangedCallback(e,r,i){super.attributeChangedCallback(e,r,i),["maxlength","minlength","pattern","required"].includes(e)&&this.updateComplete.then(()=>{this.setValidityFromInput()}).catch(s=>{this.onerror&&this.onerror(s)})}setValidityFromInput(){this.inputElement&&this.internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage,this.inputElement)}updateValue(){this.value=this.inputElement.value,this.internals.setFormValue(this.inputElement.value)}onInput(){this.updateValue(),this.setValidityFromInput()}onChange(e){this.updateValue(),this.setValidityFromInput();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.internals.form)==null||r.requestSubmit())}renderLeadingIcon(){return this.leadingIcon?u`
|
1413
1596
|
<mdc-icon
|
1414
1597
|
class="leading-icon"
|
1415
1598
|
part="leading-icon"
|
1416
1599
|
name=${this.leadingIcon}
|
1417
|
-
size="${
|
1418
|
-
length-unit="${
|
1600
|
+
size="${Fe.ICON_SIZE_VALUE}"
|
1601
|
+
length-unit="${Fe.ICON_SIZE_UNIT}">
|
1419
1602
|
</mdc-icon>
|
1420
|
-
`:
|
1603
|
+
`:x}renderPrefixText(){return this.prefixText?u`
|
1421
1604
|
<mdc-text
|
1422
1605
|
class="prefix-text"
|
1423
|
-
tagname="${
|
1424
|
-
type="${
|
1606
|
+
tagname="${Fe.PREFIX_TEXT_TAG}"
|
1607
|
+
type="${Fe.PREFIX_TEXT_TYPE}"
|
1425
1608
|
aria-hidden="true"
|
1426
1609
|
>
|
1427
|
-
${this.prefixText.slice(0,
|
1610
|
+
${this.prefixText.slice(0,ps.MAX_LENGTH)}
|
1428
1611
|
</mdc-text>
|
1429
|
-
`:
|
1612
|
+
`:x}clearInputText(){var e;this.value="",(e=this.inputElement)==null||e.focus()}renderTrailingButton(){return this.trailingButton?u`
|
1430
1613
|
<mdc-button
|
1431
1614
|
part='trailing-button'
|
1432
1615
|
class='${this.value?"":"hidden"}'
|
1433
|
-
prefix-icon='${
|
1434
|
-
variant='${
|
1435
|
-
size="${
|
1616
|
+
prefix-icon='${Fe.CLEAR_BUTTON_ICON}'
|
1617
|
+
variant='${Fe.CLEAR_BUTTON_VARIANT}'
|
1618
|
+
size="${Fe.CLEAR_BUTTON_SIZE}"
|
1436
1619
|
aria-label="${this.clearAriaLabel}"
|
1437
1620
|
@click=${this.clearInputText}
|
1438
1621
|
?disabled=${this.disabled||this.readonly||!this.value}
|
1439
1622
|
></mdc-button>
|
1440
|
-
`:
|
1623
|
+
`:x}render(){var e;return u`
|
1441
1624
|
${this.renderLabel()}
|
1442
1625
|
<div class="input-container mdc-focus-ring" part="input-container">
|
1443
1626
|
<slot name="input-leading-icon">${this.renderLeadingIcon()}</slot>
|
@@ -1455,17 +1638,17 @@
|
|
1455
1638
|
?readonly="${this.readonly}"
|
1456
1639
|
?required="${!!this.requiredLabel}"
|
1457
1640
|
type="text"
|
1458
|
-
aria-describedby="${
|
1459
|
-
placeholder=${
|
1460
|
-
minlength=${
|
1461
|
-
maxlength=${
|
1641
|
+
aria-describedby="${V.HELPER_TEXT_ID}"
|
1642
|
+
placeholder=${S(this.placeholder)}
|
1643
|
+
minlength=${S(this.minlength)}
|
1644
|
+
maxlength=${S(this.maxlength)}
|
1462
1645
|
autocapitalize=${this.autocapitalize}
|
1463
1646
|
autocomplete=${this.autocomplete}
|
1464
1647
|
?autofocus="${this.autofocus}"
|
1465
|
-
dirname=${
|
1466
|
-
pattern=${
|
1467
|
-
list=${
|
1468
|
-
size=${
|
1648
|
+
dirname=${S(this.dirname)}
|
1649
|
+
pattern=${S(this.pattern)}
|
1650
|
+
list=${S(this.list)}
|
1651
|
+
size=${S(this.size)}
|
1469
1652
|
@input=${this.onInput}
|
1470
1653
|
@change=${this.onChange}
|
1471
1654
|
@keydown=${this.handleKeyDown}
|
@@ -1474,8 +1657,8 @@
|
|
1474
1657
|
</div>
|
1475
1658
|
<slot name="trailing-button">${this.renderTrailingButton()}</slot>
|
1476
1659
|
</div>
|
1477
|
-
${this.helpText?this.renderHelperText():
|
1478
|
-
`}};
|
1660
|
+
${this.helpText?this.renderHelperText():x}
|
1661
|
+
`}};O.formAssociated=!0,O.styles=[...Nt.styles,...ss],c([d({type:String})],O.prototype,"placeholder",2),c([d({type:Boolean})],O.prototype,"readonly",2),c([d({type:String,attribute:"prefix-text"})],O.prototype,"prefixText",2),c([d({type:String,attribute:"leading-icon"})],O.prototype,"leadingIcon",2),c([d({type:Boolean,attribute:"trailing-button"})],O.prototype,"trailingButton",2),c([d({type:Number})],O.prototype,"maxlength",2),c([d({type:Number})],O.prototype,"minlength",2),c([d({type:String})],O.prototype,"autocapitalize",2),c([d({type:String})],O.prototype,"autocomplete",2),c([d({type:Boolean})],O.prototype,"autofocus",2),c([d({type:String})],O.prototype,"dirname",2),c([d({type:String})],O.prototype,"pattern",2),c([d({type:String})],O.prototype,"list",2),c([d({type:Number})],O.prototype,"size",2),c([d({type:String,attribute:"clear-aria-label"})],O.prototype,"clearAriaLabel",2),c([yi("input")],O.prototype,"inputElement",2);var Wo=O;Wo.register(ds);var cl=Wo;var hs=y.constructTagName("link"),Wr={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},qr={LARGE:1,MIDSIZE:.875,SMALL:.75},Xr={INLINE:!1,INVERTED:!1,LINK_SIZE:Wr.LARGE};var dl=[C,g`
|
1479
1662
|
|
1480
1663
|
:host {
|
1481
1664
|
|
@@ -1586,11 +1769,11 @@
|
|
1586
1769
|
:host([inverted][disabled]) {
|
1587
1770
|
color: var(--mdc-link-inverted-color-disabled);
|
1588
1771
|
}
|
1589
|
-
|
1772
|
+
`,...$(),g`
|
1590
1773
|
:host(:active) {
|
1591
1774
|
box-shadow: none;
|
1592
1775
|
}
|
1593
|
-
`],
|
1776
|
+
`],us=dl;var ct=class extends _t(de(E)){constructor(){super(...arguments);this.inline=Xr.INLINE;this.inverted=Xr.INVERTED;this.size=Xr.LINK_SIZE;this.prevTabindex=null}getIconSize(){switch(this.size){case Wr.SMALL:return qr.SMALL;case Wr.MIDSIZE:return qr.MIDSIZE;default:return qr.LARGE}}setDisabled(e){e?(this.prevTabindex=this.hasAttribute("tabindex")?this.tabIndex:null,this.tabIndex=-1,this.setAttribute("aria-disabled","true")):this.prevTabindex===null?(this.removeAttribute("tabindex"),this.removeAttribute("aria-disabled")):(this.tabIndex=this.prevTabindex,this.removeAttribute("aria-disabled"))}updateTrailingIcon(){var i,n;let e=(n=(i=this.shadowRoot)==null?void 0:i.querySelector("slot"))==null?void 0:n.assignedElements({flatten:!0}).find(s=>s.tagName==="A"),r=this.getIconSize();if(this.iconName&&e){let s=document.createElement("mdc-icon");s.setAttribute("name",this.iconName),s.setAttribute("size",`${r}`),s.setAttribute("length-unit","rem"),e.appendChild(s)}}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this.disabled)}render(){return u`<slot @slotchange=${this.updateTrailingIcon}></slot>`}};ct.styles=[...E.styles,...us],c([d({type:Boolean,reflect:!0})],ct.prototype,"inline",2),c([d({type:Boolean,reflect:!0})],ct.prototype,"inverted",2),c([d({type:String,reflect:!0})],ct.prototype,"size",2);var qo=ct;qo.register(hs);var ml=qo;var pl=[C,g`
|
1594
1777
|
:host {
|
1595
1778
|
--mdc-toggle-width: 3rem;
|
1596
1779
|
--mdc-toggle-height: 1.5rem;
|
@@ -1734,34 +1917,34 @@
|
|
1734
1917
|
border: var(--mdc-toggle-border);
|
1735
1918
|
}
|
1736
1919
|
}
|
1737
|
-
|
1920
|
+
`,...$(!0)],fs=pl;var gs=y.constructTagName("toggle"),Xo={DEFAULT:"default",COMPACT:"compact"},Zo={CHECKED:"check-bold",UNCHECKED:"cancel-bold"},vs={compact:.75,default:1.25},jo={SIZE:Xo.DEFAULT};var dt=class extends ge(Be(q(Nt))){constructor(){super();this.checked=!1;this.size=jo.SIZE;this.internals=this.attachInternals(),this.helpTextType=void 0,this.id=`mdc-input-${we()}`}get form(){return this.internals.form}setFormValue(){let e=null;this.checked&&(e=this.value?this.value:"isActive"),this.internals.setFormValue(e)}toggleState(){this.disabled||(this.checked=!this.checked)}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}setToggleSize(e){this.setAttribute("size",Object.values(Xo).includes(e)?e:jo.SIZE)}update(e){super.update(e),e.has("checked")&&this.setFormValue(),e.has("size")&&this.setToggleSize(this.size)}render(){var e;return u`
|
1738
1921
|
<div class="mdc-toggle__container mdc-focus-ring">
|
1739
1922
|
<input
|
1740
1923
|
id="${this.id}"
|
1741
1924
|
type="checkbox"
|
1742
1925
|
class="mdc-toggle__input"
|
1743
1926
|
role="switch"
|
1744
|
-
name="${
|
1745
|
-
value="${
|
1927
|
+
name="${S(this.name)}"
|
1928
|
+
value="${S(this.value)}"
|
1746
1929
|
.checked="${this.checked}"
|
1747
1930
|
.disabled="${this.disabled}"
|
1748
|
-
aria-describedby="${
|
1931
|
+
aria-describedby="${V.HELPER_TEXT_ID}"
|
1749
1932
|
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
1750
1933
|
tabindex="${this.disabled?-1:0}"
|
1751
1934
|
@change="${this.handleChange}"
|
1752
1935
|
/>
|
1753
1936
|
<div class="mdc-toggle__slider">
|
1754
1937
|
<mdc-icon
|
1755
|
-
name="${this.checked?
|
1938
|
+
name="${this.checked?Zo.CHECKED:Zo.UNCHECKED}"
|
1756
1939
|
class="mdc-toggle__icon"
|
1757
1940
|
length-unit="rem"
|
1758
|
-
size="${
|
1941
|
+
size="${vs[this.size]}"
|
1759
1942
|
></mdc-icon>
|
1760
1943
|
</div>
|
1761
1944
|
</div>
|
1762
1945
|
${this.renderLabel()}
|
1763
1946
|
${this.renderHelperText()}
|
1764
|
-
`}};
|
1947
|
+
`}};dt.formAssociated=!0,dt.styles=[...Nt.styles,...fs],c([d({type:Boolean,reflect:!0})],dt.prototype,"checked",2),c([d({type:String,reflect:!0})],dt.prototype,"size",2);var Ko=dt;Ko.register(gs);var hl=Ko;var bs=y.constructTagName("checkbox"),Qo={CHECKED:"check-bold",INDETERMINATE:"minus-bold"};var ul=[g`
|
1765
1948
|
:host {
|
1766
1949
|
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
1767
1950
|
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
@@ -1863,26 +2046,26 @@
|
|
1863
2046
|
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
1864
2047
|
}
|
1865
2048
|
}
|
1866
|
-
|
2049
|
+
`,...$(!0)],ys=ul;var mt=class extends ge(Be(q(ee))){constructor(){super();this.checked=!1;this.indeterminate=!1;this.internals=this.attachInternals(),this.helpTextType=void 0,this.id=`mdc-input-${we()}`}get form(){return this.internals.form}setFormValue(){let e=null;this.checked&&(e=this.value?this.value:"on"),this.internals.setFormValue(e)}toggleState(){this.disabled||(this.checked=!this.checked,this.indeterminate=!1)}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}update(e){super.update(e),e.has("checked")&&this.setFormValue()}render(){var i;let e=this.checked||this.indeterminate?u`
|
1867
2050
|
<mdc-icon
|
1868
2051
|
class="icon"
|
1869
|
-
name="${this.indeterminate?
|
2052
|
+
name="${this.indeterminate?Qo.INDETERMINATE:Qo.CHECKED}"
|
1870
2053
|
size="1"
|
1871
2054
|
length-unit="rem"
|
1872
2055
|
></mdc-icon>
|
1873
|
-
`:
|
2056
|
+
`:x,r=this.helpText?this.renderHelperText():x;return u`
|
1874
2057
|
<div class="container mdc-focus-ring">
|
1875
2058
|
<input
|
1876
2059
|
id="${this.id}"
|
1877
2060
|
type="checkbox"
|
1878
2061
|
class="input"
|
1879
|
-
name="${
|
1880
|
-
value="${
|
2062
|
+
name="${S(this.name)}"
|
2063
|
+
value="${S(this.value)}"
|
1881
2064
|
.checked="${this.checked}"
|
1882
2065
|
.indeterminate="${this.indeterminate}"
|
1883
2066
|
.disabled="${this.disabled}"
|
1884
|
-
aria-label="${(
|
1885
|
-
aria-describedby="${
|
2067
|
+
aria-label="${(i=this.dataAriaLabel)!=null?i:""}"
|
2068
|
+
aria-describedby="${V.HELPER_TEXT_ID}"
|
1886
2069
|
@change=${this.handleChange}
|
1887
2070
|
@keydown=${this.handleKeyDown}
|
1888
2071
|
/>
|
@@ -1892,7 +2075,7 @@
|
|
1892
2075
|
${this.renderLabel()}
|
1893
2076
|
${r}
|
1894
2077
|
</div>
|
1895
|
-
`}};
|
2078
|
+
`}};mt.formAssociated=!0,mt.styles=[...ee.styles,...ys],c([d({type:Boolean,reflect:!0})],mt.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],mt.prototype,"indeterminate",2);var Jo=mt;Jo.register(bs);var fl=Jo;var gl=[C,g`
|
1896
2079
|
:host{
|
1897
2080
|
--mdc-radio-inner-circle-size: 0.375rem;
|
1898
2081
|
--mdc-radio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);
|
@@ -2050,15 +2233,15 @@
|
|
2050
2233
|
justify-content: center;
|
2051
2234
|
gap: 0.25rem;
|
2052
2235
|
}
|
2053
|
-
|
2236
|
+
`,...$(!0)],xs=gl;var pt=class extends ge(Be(q(ee))){constructor(){super();this.checked=!1;this.readonly=!1;this.internals=this.attachInternals(),this.id=`mdc-input-${we()}`}get form(){return this.internals.form}setFormValue(){this.internals.setFormValue(this.checked?this.value:null)}firstUpdated(){this.updateTabIndex()}getAllRadiosWithinSameGroup(){return Array.from(document.querySelectorAll(`mdc-radio[name="${this.name}"]`))}dispatchChangeEvent(e){let r=e.constructor;this.dispatchEvent(new r(e.type,e))}handleChange(e){var n;if(this.disabled||this.readonly)return;this.getAllRadiosWithinSameGroup().forEach(s=>{var l;let a=(l=s.shadowRoot)==null?void 0:l.querySelector("input");a&&(s.checked=!1,a.checked=!1)}),this.checked=!0;let i=(n=this.shadowRoot)==null?void 0:n.querySelector("input");i&&(i.checked=!0),this.updateTabIndex(),this.dispatchChangeEvent(e)}updateRadio(e,r,i){var n,s;(s=(n=e[r].shadowRoot)==null?void 0:n.querySelector("input"))==null||s.focus(),e[r].handleChange(i)}handleKeyDown(e){if(this.disabled)return;let i=this.getAllRadiosWithinSameGroup().filter(s=>!s.disabled),n=i.indexOf(this);if(["ArrowDown","ArrowRight"].includes(e.key)){let s=(n+1)%i.length;this.updateRadio(i,s,e)}else if(["ArrowUp","ArrowLeft"].includes(e.key)){let s=(n-1+i.length)%i.length;this.updateRadio(i,s,e)}this.updateTabIndex()}updateTabIndex(){let e=this.getAllRadiosWithinSameGroup(),r=e.find(n=>n.checked),i=e.find(n=>!n.disabled);e.forEach(n=>{var a;let s=(a=n.shadowRoot)==null?void 0:a.querySelector("input");s&&(s.tabIndex=-1,(n===r||!r&&n===i)&&(s.tabIndex=0))})}update(e){super.update(e),e.has("checked")&&this.setFormValue()}render(){var r;let e=this.helpText?this.renderHelperText():x;return u`
|
2054
2237
|
<div class="mdc-radio__container">
|
2055
2238
|
<div class="mdc-radio__icon-container mdc-focus-ring">
|
2056
2239
|
<input
|
2057
2240
|
id="${this.id}"
|
2058
2241
|
type="radio"
|
2059
2242
|
role="radio"
|
2060
|
-
name="${
|
2061
|
-
value="${
|
2243
|
+
name="${S(this.name)}"
|
2244
|
+
value="${S(this.value)}"
|
2062
2245
|
@change=${this.handleChange}
|
2063
2246
|
@keydown=${this.handleKeyDown}
|
2064
2247
|
?checked=${this.checked}
|
@@ -2066,7 +2249,7 @@
|
|
2066
2249
|
?disabled=${this.disabled}
|
2067
2250
|
class="mdc-radio__input"
|
2068
2251
|
aria-checked="${this.checked}"
|
2069
|
-
aria-describedby="${
|
2252
|
+
aria-describedby="${S(this.helpText?V.HELPER_TEXT_ID:"")}"
|
2070
2253
|
aria-label="${(r=this.dataAriaLabel)!=null?r:""}"
|
2071
2254
|
/>
|
2072
2255
|
<span class="mdc-radio__icon"></span>
|
@@ -2076,10 +2259,10 @@
|
|
2076
2259
|
${e}
|
2077
2260
|
</div>
|
2078
2261
|
</div>
|
2079
|
-
`}};
|
2262
|
+
`}};pt.formAssociated=!0,pt.styles=[...ee.styles,...xs],c([d({type:Boolean,reflect:!0})],pt.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],pt.prototype,"readonly",2);var ei=pt;var Zr=y.constructTagName("radio");ei.register(Zr);var vl=ei;function ht(o,t,e){var n;let r=(n=e.initialDeps)!=null?n:[],i;return()=>{var s,a,l,m;let p;e.key&&((s=e.debug)!=null&&s.call(e))&&(p=Date.now());let h=o();if(!(h.length!==r.length||h.some((b,T)=>r[T]!==b)))return i;r=h;let f;if(e.key&&((a=e.debug)!=null&&a.call(e))&&(f=Date.now()),i=t(...h),e.key&&((l=e.debug)!=null&&l.call(e))){let b=Math.round((Date.now()-p)*100)/100,T=Math.round((Date.now()-f)*100)/100,_=T/16,A=(I,w)=>{for(I=String(I);I.length<w;)I=" "+I;return I};console.info(`%c\u23F1 ${A(T,5)} /${A(b,5)} ms`,`
|
2080
2263
|
font-size: .6rem;
|
2081
2264
|
font-weight: bold;
|
2082
|
-
color: hsl(${Math.max(0,Math.min(120-120*Kt,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(p=e==null?void 0:e.onChange)==null||p.call(e,o),o}}function Gt(i,t){if(i===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return i}var Ai=(i,t)=>Math.abs(i-t)<1,_i=(i,t,e)=>{let r;return function(...o){i.clearTimeout(r),r=i.setTimeout(()=>t.apply(this,o),e)}};var Ws=i=>i,Ks=i=>{let t=Math.max(i.startIndex-i.overscan,0),e=Math.min(i.endIndex+i.overscan,i.count-1),r=[];for(let o=t;o<=e;o++)r.push(o);return r},Ii=(i,t)=>{let e=i.scrollElement;if(!e)return;let r=i.targetWindow;if(!r)return;let o=s=>{let{width:d,height:l}=s;t({width:Math.round(d),height:Math.round(l)})};if(o(e.getBoundingClientRect()),!r.ResizeObserver)return()=>{};let n=new r.ResizeObserver(s=>{let d=s[0];if(d!=null&&d.borderBoxSize){let l=d.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},Si={passive:!0};var Qs=typeof window>"u"?!0:"onscrollend"in window,Ni=(i,t)=>{let e=i.scrollElement;if(!e)return;let r=i.targetWindow;if(!r)return;let o=0,n=i.options.useScrollendEvent&&Qs?()=>{}:_i(r,()=>{t(o,!1)},i.options.isScrollingResetDelay),s=p=>()=>{let{horizontal:u,isRtl:f}=i.options;o=u?e.scrollLeft*(f&&-1||1):e.scrollTop,n(),t(o,p)},d=s(!0),l=s(!1);return l(),e.addEventListener("scroll",d,Si),e.addEventListener("scrollend",l,Si),()=>{e.removeEventListener("scroll",d),e.removeEventListener("scrollend",l)}};var Js=(i,t,e)=>{if(t!=null&&t.borderBoxSize){let r=t.borderBoxSize[0];if(r)return Math.round(r[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(i.getBoundingClientRect()[e.options.horizontal?"width":"height"])};var ki=(i,{adjustments:t=0,behavior:e},r)=>{var o,n;let s=i+t;(n=(o=r.scrollElement)==null?void 0:o.scrollTo)==null||n.call(o,{[r.options.horizontal?"left":"top"]:s,behavior:e})},Ft=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,r=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(o=>{o.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var o;(o=r())==null||o.disconnect(),e=null},observe:o=>{var n;return(n=r())==null?void 0:n.observe(o,{box:"border-box"})},unobserve:o=>{var n;return(n=r())==null?void 0:n.unobserve(o)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([r,o])=>{typeof o>"u"&&delete e[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ws,rangeExtractor:Ks,onChange:()=>{},measureElement:Js,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var r,o;(o=(r=this.options).onChange)==null||o.call(r,this,e)},this.maybeNotify=Ie(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;var e;let r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(o=(e=this.scrollElement)==null?void 0:e.window)!=null?o:null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>{var e;return this.options.enabled?(this.scrollRect=(e=this.scrollRect)!=null?e:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var e;return this.options.enabled?(this.scrollOffset=(e=this.scrollOffset)!=null?e:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(e,r)=>{let o=new Map,n=new Map;for(let s=r-1;s>=0;s--){let d=e[s];if(o.has(d.lane))continue;let l=n.get(d.lane);if(l==null||d.end>l.end?n.set(d.lane,d):d.end<l.end&&o.set(d.lane,!0),o.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((s,d)=>s.end===d.end?s.index-d.index:s.end-d.end)[0]:void 0},this.getMeasurementOptions=Ie(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,r,o,n,s)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:r,scrollMargin:o,getItemKey:n,enabled:s}),{key:!1}),this.getMeasurements=Ie(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:r,scrollMargin:o,getItemKey:n,enabled:s},d)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));let l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let p=this.measurementsCache.slice(0,l);for(let u=l;u<e;u++){let f=n(u),z=this.options.lanes===1?p[u-1]:this.getFurthestMeasurement(p,u),w=z?z.end+this.options.gap:r+o,P=d.get(f),me=typeof P=="number"?P:this.options.estimateSize(u),Kt=w+me,mt=z?z.lane:u%this.options.lanes;p[u]={index:u,start:w,size:me,end:Kt,key:f,lane:mt}}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Ie(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,r,o)=>this.range=e.length>0&&r>0?en({measurements:e,outerSize:r,scrollOffset:o}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Ie(()=>{let e=null,r=null,o=this.calculateRange();return o&&(e=o.startIndex,r=o.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,r]},(e,r,o,n,s)=>n===null||s===null?[]:e({startIndex:n,endIndex:s,overscan:r,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let r=this.options.indexAttribute,o=e.getAttribute(r);return o?parseInt(o,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(e,r)=>{let o=this.indexFromElement(e),n=this.measurementsCache[o];if(!n)return;let s=n.key,d=this.elementsCache.get(s);d!==e&&(d&&this.observer.unobserve(d),this.observer.observe(e),this.elementsCache.set(s,e)),e.isConnected&&this.resizeItem(o,this.options.measureElement(e,r,this))},this.resizeItem=(e,r)=>{var d;let o=this.measurementsCache[e];if(!o)return;let n=(d=this.itemSizeCache.get(o.key))!=null?d:o.size,s=r-n;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,s,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,r)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((r,o)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(o))});return}this._measureElement(e,void 0)},this.getVirtualItems=Ie(()=>[this.getIndexes(),this.getMeasurements()],(e,r)=>{let o=[];for(let n=0,s=e.length;n<s;n++){let d=e[n],l=r[d];o.push(l)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let r=this.getMeasurements();if(r.length!==0)return Gt(r[Ci(0,r.length-1,o=>Gt(r[o]).start,e)])},this.getOffsetForAlignment=(e,r)=>{let o=this.getSize(),n=this.getScrollOffset();r==="auto"&&e>=n+o&&(r="end"),r==="end"&&(e-=o);let s=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-o;return Math.max(Math.min(l,e),0)},this.getOffsetForIndex=(e,r="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let o=this.measurementsCache[e];if(!o)return;let n=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(o.end>=s+n-this.options.scrollPaddingEnd)r="end";else if(o.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];let d=o.start-this.options.scrollPaddingStart+(o.size-n)/2;switch(r){case"center":return[this.getOffsetForAlignment(d,r),r];case"end":return[this.getOffsetForAlignment(o.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(o.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:r="start",behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,r),{adjustments:void 0,behavior:o})},this.scrollToIndex=(e,{align:r="auto",behavior:o}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let n=this.getOffsetForIndex(e,r);if(!n)return;let[s,d]=n;this._scrollToOffset(s,{adjustments:void 0,behavior:o}),o!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){let[p]=Gt(this.getOffsetForIndex(e,d));Ai(p,this.getScrollOffset())||this.scrollToIndex(e,{align:d,behavior:o})}else this.scrollToIndex(e,{align:d,behavior:o})}))},this.scrollBy=(e,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;var e;let r=this.getMeasurements(),o;return r.length===0?o=this.options.paddingStart:o=this.options.lanes===1?(n=(e=r[r.length-1])==null?void 0:e.end)!=null?n:0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:r,behavior:o})=>{this.options.scrollToFn(e,{behavior:o,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}},Ci=(i,t,e,r)=>{for(;i<=t;){let o=(i+t)/2|0,n=e(o);if(n<r)i=o+1;else if(n>r)t=o-1;else return o}return i>0?i-1:0};function en({measurements:i,outerSize:t,scrollOffset:e}){let r=i.length-1,n=Ci(0,r,d=>i[d].start,e),s=n;for(;s<r&&i[s].end<e+t;)s++;return{startIndex:n,endIndex:s}}var Pr=class{constructor(t,e){this.cleanup=()=>{},(this.host=t).addController(this);let r={...e,onChange:(o,n)=>{var s;this.host.updateComplete.then(()=>this.host.requestUpdate()),(s=e.onChange)==null||s.call(e,o,n)}};this.virtualizer=new Ft(r)}getVirtualizer(){return this.virtualizer}async hostConnected(){this.cleanup=this.virtualizer._didMount()}hostUpdated(){this.virtualizer._willUpdate()}hostDisconnected(){this.cleanup()}},Bt=class extends Pr{constructor(t,e){super(t,{observeElementRect:Ii,observeElementOffset:Ni,scrollToFn:ki,...e})}};var{I:ab}=go;var zi=i=>i.strings===void 0;var lt=(i,t)=>{var r;let e=i._$AN;if(e===void 0)return!1;for(let o of e)(r=o._$AO)==null||r.call(o,t,!1),lt(o,t);return!0},Yt=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while((e==null?void 0:e.size)===0)},Ri=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),on(t)}};function tn(i){this._$AN!==void 0?(Yt(this),this._$AM=i,Ri(this)):this._$AM=i}function rn(i,t=!1,e=0){let r=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)lt(r[n],!1),Yt(r[n]);else r!=null&&(lt(r,!1),Yt(r));else lt(this,i)}var on=i=>{var t,e;i.type==wt.CHILD&&((t=i._$AP)!=null||(i._$AP=rn),(e=i._$AQ)!=null||(i._$AQ=tn))},Xt=class extends De{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Ri(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,o;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(o=this.disconnected)==null||o.call(this)),e&&(lt(this,t),Yt(this))}setValue(t){if(zi(this.t))this.t._$AI(t,this);else{let e=[...this.t._$AH];e[this.i]=t,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}};var wi=()=>new Vr,Vr=class{},Ur=new WeakMap,Li=tt(class extends Xt{render(i){return b}update(i,[t]){var r;let e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(r=i.options)==null?void 0:r.host,this.rt(this.ct=i.element)),b}rt(i){var t;if(this.isConnected||(i=void 0),typeof this.Y=="function"){let e=(t=this.ht)!=null?t:globalThis,r=Ur.get(e);r===void 0&&(r=new WeakMap,Ur.set(e,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,i),i!==void 0&&this.Y.call(this.ht,i)}else this.Y.value=i}get lt(){var i,t,e;return typeof this.Y=="function"?(t=Ur.get((i=this.ht)!=null?i:globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var sn=[h`
|
2265
|
+
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(m=e==null?void 0:e.onChange)==null||m.call(e,i),i}}function jr(o,t){if(o===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return o}var Es=(o,t)=>Math.abs(o-t)<1,Ts=(o,t,e)=>{let r;return function(...i){o.clearTimeout(r),r=o.setTimeout(()=>t.apply(this,i),e)}};var bl=o=>o,yl=o=>{let t=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1),r=[];for(let i=t;i<=e;i++)r.push(i);return r},Ss=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=s=>{let{width:a,height:l}=s;t({width:Math.round(a),height:Math.round(l)})};if(i(e.getBoundingClientRect()),!r.ResizeObserver)return()=>{};let n=new r.ResizeObserver(s=>{let a=s[0];if(a!=null&&a.borderBoxSize){let l=a.borderBoxSize[0];if(l){i({width:l.inlineSize,height:l.blockSize});return}}i(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},As={passive:!0};var xl=typeof window>"u"?!0:"onscrollend"in window,_s=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=0,n=o.options.useScrollendEvent&&xl?()=>{}:Ts(r,()=>{t(i,!1)},o.options.isScrollingResetDelay),s=m=>()=>{let{horizontal:p,isRtl:h}=o.options;i=p?e.scrollLeft*(h&&-1||1):e.scrollTop,n(),t(i,m)},a=s(!0),l=s(!1);return l(),e.addEventListener("scroll",a,As),e.addEventListener("scrollend",l,As),()=>{e.removeEventListener("scroll",a),e.removeEventListener("scrollend",l)}};var El=(o,t,e)=>{if(t!=null&&t.borderBoxSize){let r=t.borderBoxSize[0];if(r)return Math.round(r[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])};var Is=(o,{adjustments:t=0,behavior:e},r)=>{var i,n;let s=o+t;(n=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||n.call(i,{[r.options.horizontal?"left":"top"]:s,behavior:e})},Kr=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,r=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(i=>{i.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),e=null},observe:i=>{var n;return(n=r())==null?void 0:n.observe(i,{box:"border-box"})},unobserve:i=>{var n;return(n=r())==null?void 0:n.unobserve(i)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([r,i])=>{typeof i>"u"&&delete e[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:bl,rangeExtractor:yl,onChange:()=>{},measureElement:El,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var r,i;(i=(r=this.options).onChange)==null||i.call(r,this,e)},this.maybeNotify=ht(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i;var e;let r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(i=(e=this.scrollElement)==null?void 0:e.window)!=null?i:null,this.elementsCache.forEach(n=>{this.observer.observe(n)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,n=>{this.scrollRect=n,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(n,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<n?"forward":"backward":null,this.scrollOffset=n,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>{var e;return this.options.enabled?(this.scrollRect=(e=this.scrollRect)!=null?e:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var e;return this.options.enabled?(this.scrollOffset=(e=this.scrollOffset)!=null?e:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(e,r)=>{let i=new Map,n=new Map;for(let s=r-1;s>=0;s--){let a=e[s];if(i.has(a.lane))continue;let l=n.get(a.lane);if(l==null||a.end>l.end?n.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=ht(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,r,i,n,s)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:r,scrollMargin:i,getItemKey:n,enabled:s}),{key:!1}),this.getMeasurements=ht(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:r,scrollMargin:i,getItemKey:n,enabled:s},a)=>{if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));let l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let m=this.measurementsCache.slice(0,l);for(let p=l;p<e;p++){let h=n(p),v=this.options.lanes===1?m[p-1]:this.getFurthestMeasurement(m,p),f=v?v.end+this.options.gap:r+i,b=a.get(h),T=typeof b=="number"?b:this.options.estimateSize(p),_=f+T,A=v?v.lane:p%this.options.lanes;m[p]={index:p,start:f,size:T,end:_,key:h,lane:A}}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ht(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,r,i)=>this.range=e.length>0&&r>0?Tl({measurements:e,outerSize:r,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=ht(()=>{let e=null,r=null,i=this.calculateRange();return i&&(e=i.startIndex,r=i.endIndex),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,r]},(e,r,i,n,s)=>n===null||s===null?[]:e({startIndex:n,endIndex:s,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let r=this.options.indexAttribute,i=e.getAttribute(r);return i?parseInt(i,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(e,r)=>{let i=this.indexFromElement(e),n=this.measurementsCache[i];if(!n)return;let s=n.key,a=this.elementsCache.get(s);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(s,e)),e.isConnected&&this.resizeItem(i,this.options.measureElement(e,r,this))},this.resizeItem=(e,r)=>{var a;let i=this.measurementsCache[e];if(!i)return;let n=(a=this.itemSizeCache.get(i.key))!=null?a:i.size,s=r-n;s!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,s,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,r)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((r,i)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(i))});return}this._measureElement(e,void 0)},this.getVirtualItems=ht(()=>[this.getIndexes(),this.getMeasurements()],(e,r)=>{let i=[];for(let n=0,s=e.length;n<s;n++){let a=e[n],l=r[a];i.push(l)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let r=this.getMeasurements();if(r.length!==0)return jr(r[ws(0,r.length-1,i=>jr(r[i]).start,e)])},this.getOffsetForAlignment=(e,r)=>{let i=this.getSize(),n=this.getScrollOffset();r==="auto"&&e>=n+i&&(r="end"),r==="end"&&(e-=i);let s=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-i;return Math.max(Math.min(l,e),0)},this.getOffsetForIndex=(e,r="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.measurementsCache[e];if(!i)return;let n=this.getSize(),s=this.getScrollOffset();if(r==="auto")if(i.end>=s+n-this.options.scrollPaddingEnd)r="end";else if(i.start<=s+this.options.scrollPaddingStart)r="start";else return[s,r];let a=i.start-this.options.scrollPaddingStart+(i.size-n)/2;switch(r){case"center":return[this.getOffsetForAlignment(a,r),r];case"end":return[this.getOffsetForAlignment(i.end+this.options.scrollPaddingEnd,r),r];default:return[this.getOffsetForAlignment(i.start-this.options.scrollPaddingStart,r),r]}},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:r="start",behavior:i}={})=>{this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,r),{adjustments:void 0,behavior:i})},this.scrollToIndex=(e,{align:r="auto",behavior:i}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");let n=this.getOffsetForIndex(e,r);if(!n)return;let[s,a]=n;this._scrollToOffset(s,{adjustments:void 0,behavior:i}),i!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){let[m]=jr(this.getOffsetForIndex(e,a));Es(m,this.getScrollOffset())||this.scrollToIndex(e,{align:a,behavior:i})}else this.scrollToIndex(e,{align:a,behavior:i})}))},this.scrollBy=(e,{behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;var e;let r=this.getMeasurements(),i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?(n=(e=r[r.length-1])==null?void 0:e.end)!=null?n:0:Math.max(...r.slice(-this.options.lanes).map(s=>s.end)),Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:r,behavior:i})=>{this.options.scrollToFn(e,{behavior:i,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}},ws=(o,t,e,r)=>{for(;o<=t;){let i=(o+t)/2|0,n=e(i);if(n<r)o=i+1;else if(n>r)t=i-1;else return i}return o>0?o-1:0};function Tl({measurements:o,outerSize:t,scrollOffset:e}){let r=o.length-1,n=ws(0,r,a=>o[a].start,e),s=n;for(;s<r&&o[s].end<e+t;)s++;return{startIndex:n,endIndex:s}}var ti=class{constructor(t,e){this.cleanup=()=>{},(this.host=t).addController(this);let r={...e,onChange:(i,n)=>{var s;this.host.updateComplete.then(()=>this.host.requestUpdate()),(s=e.onChange)==null||s.call(e,i,n)}};this.virtualizer=new Kr(r)}getVirtualizer(){return this.virtualizer}async hostConnected(){this.cleanup=this.virtualizer._didMount()}hostUpdated(){this.virtualizer._willUpdate()}hostDisconnected(){this.cleanup()}},Qr=class extends ti{constructor(t,e){super(t,{observeElementRect:Ss,observeElementOffset:_s,scrollToFn:Is,...e})}};var{I:Qy}=Ni;var Cs=o=>o.strings===void 0;var ar=(o,t)=>{var r;let e=o._$AN;if(e===void 0)return!1;for(let i of e)(r=i._$AO)==null||r.call(i,t,!1),ar(i,t);return!0},Jr=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while((e==null?void 0:e.size)===0)},Ls=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),_l(t)}};function Al(o){this._$AN!==void 0?(Jr(this),this._$AM=o,Ls(this)):this._$AM=o}function Sl(o,t=!1,e=0){let r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)ar(r[n],!1),Jr(r[n]);else r!=null&&(ar(r,!1),Jr(r));else ar(this,o)}var _l=o=>{var t,e;o.type==Cr.CHILD&&((t=o._$AP)!=null||(o._$AP=Sl),(e=o._$AQ)!=null||(o._$AQ=Al))},eo=class extends St{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Ls(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),e&&(ar(this,t),Jr(this))}setValue(t){if(Cs(this.t))this.t._$AI(t,this);else{let e=[...this.t._$AH];e[this.i]=t,this.t._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Rs=()=>new oi,oi=class{},ri=new WeakMap,Ns=Yt(class extends eo{render(o){return x}update(o,[t]){var r;let e=t!==this.Y;return e&&this.Y!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.Y=t,this.ht=(r=o.options)==null?void 0:r.host,this.rt(this.ct=o.element)),x}rt(o){var t;if(this.isConnected||(o=void 0),typeof this.Y=="function"){let e=(t=this.ht)!=null?t:globalThis,r=ri.get(e);r===void 0&&(r=new WeakMap,ri.set(e,r)),r.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),r.set(this.Y,o),o!==void 0&&this.Y.call(this.ht,o)}else this.Y.value=o}get lt(){var o,t,e;return typeof this.Y=="function"?(t=ri.get((o=this.ht)!=null?o:globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Il=[g`
|
2083
2266
|
:host {
|
2084
2267
|
.mdc-virtualizedlist-scroll {
|
2085
2268
|
height: 100%;
|
@@ -2091,19 +2274,19 @@
|
|
2091
2274
|
width: 100%;
|
2092
2275
|
}
|
2093
2276
|
}
|
2094
|
-
`],
|
2277
|
+
`],ks=Il;var Os=y.constructTagName("virtualizedlist"),ux=y.constructTagName("virtualizedwrapper"),zs={VIRTUALIZER_PROPS:{count:0,estimateSize:()=>0}};var ut=class extends E{constructor(){super();this.virtualizerprops=zs.VIRTUALIZER_PROPS;this.scrollElementRef=Rs();this.virtualizerController=null,this.virtualizer=null,this.setlistdata=null,this.onscroll=null}update(e){var r;super.update(e),e.get("virtualizerprops")&&((r=this.virtualizer)==null||r.setOptions({...this.virtualizer.options,...this.virtualizerprops}),this.requestUpdate())}connectedCallback(){var e;this.virtualizerController=new Qr(this,{count:this.virtualizerprops.count,estimateSize:(e=this.virtualizerprops)==null?void 0:e.estimateSize,getScrollElement:()=>this.scrollElementRef.value||null,...this.virtualizerprops}),super.connectedCallback()}getVirtualizedListWrapper(e){var l,m;this.virtualizer=e.getVirtualizer();let{getVirtualItems:r,measureElement:i,getTotalSize:n}=this.virtualizer,s=r(),a={position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${(m=(l=s[0])==null?void 0:l.start)!=null?m:0}px)`};return this.setlistdata&&this.setlistdata({virtualItems:s,measureElement:i,listStyle:a}),u`<div
|
2095
2278
|
class="mdc-virtualizedlist-container"
|
2096
2279
|
style="height: ${n()}px;"
|
2097
2280
|
>
|
2098
2281
|
<slot></slot>
|
2099
|
-
</div>`}render(){return
|
2100
|
-
${
|
2282
|
+
</div>`}render(){return u`<div
|
2283
|
+
${Ns(this.scrollElementRef)}
|
2101
2284
|
class="mdc-virtualizedlist-scroll"
|
2102
2285
|
@scroll=${this.onscroll&&this.onscroll}
|
2103
2286
|
>
|
2104
|
-
${this.virtualizerController?this.getVirtualizedListWrapper(this.virtualizerController):
|
2287
|
+
${this.virtualizerController?this.getVirtualizedListWrapper(this.virtualizerController):u``}
|
2105
2288
|
</div>
|
2106
|
-
`}};
|
2289
|
+
`}};ut.styles=[...E.styles,...ks],c([d({type:Function,attribute:"onscroll"})],ut.prototype,"onscroll",2),c([d({type:Object,attribute:"virtualizerprops"})],ut.prototype,"virtualizerprops",2),c([d({type:Function,attribute:"setlistdata"})],ut.prototype,"setlistdata",2);var ii=ut;ii.register(Os);var wl=ii;var Cl=[C,g`
|
2107
2290
|
|
2108
2291
|
:host {
|
2109
2292
|
--mdc-tab-content-gap: 0.5rem;
|
@@ -2346,21 +2529,21 @@
|
|
2346
2529
|
color: var(--mdc-tab-pill-active-color-disabled);
|
2347
2530
|
}
|
2348
2531
|
|
2349
|
-
|
2532
|
+
`,...$()],Ms=Cl;var Ds=y.constructTagName("tab"),ni={GLASS:"glass",LINE:"line",PILL:"pill"},si={VARIANT:ni.PILL};var kt=class extends de($e){constructor(){super();this.variant=si.VARIANT;this.role="tab",this.softDisabled=void 0,this.size=void 0,this.type=void 0}modifyIconName(e){this.iconName&&(e?(this.prevIconName=this.iconName,this.iconName=`${Xt(this.iconName)}-filled`):this.prevIconName&&(this.iconName=this.prevIconName))}setVariant(e){this.setAttribute("variant",Object.values(ni).includes(e)?e:si.VARIANT)}setActive(e,r){e.setAttribute("aria-selected",r?"true":"false"),this.modifyIconName(r)}executeAction(){this.active=!this.active}update(e){super.update(e),e.has("variant")&&this.setVariant(this.variant)}render(){return u`
|
2350
2533
|
<div part="container">
|
2351
|
-
${this.iconName?
|
2352
|
-
${this.text?
|
2353
|
-
type=${this.active?
|
2354
|
-
tagname=${
|
2534
|
+
${this.iconName?u` <mdc-icon name="${this.iconName}" size="1" length-unit="rem" part="icon"></mdc-icon>`:x}
|
2535
|
+
${this.text?u` <mdc-text
|
2536
|
+
type=${this.active?z.BODY_MIDSIZE_BOLD:z.BODY_MIDSIZE_MEDIUM}
|
2537
|
+
tagname=${M.SPAN}
|
2355
2538
|
data-text=${this.text}
|
2356
2539
|
part="text"
|
2357
2540
|
>${this.text}</mdc-text
|
2358
|
-
>`:
|
2541
|
+
>`:x}
|
2359
2542
|
<slot name="badge"></slot>
|
2360
2543
|
<slot name="chip"></slot>
|
2361
2544
|
</div>
|
2362
2545
|
<div part="indicator"></div>
|
2363
|
-
`}};
|
2546
|
+
`}};kt.styles=[...$e.styles,...Ms],c([d({type:String,reflect:!0})],kt.prototype,"text",2),c([d({type:String,reflect:!0})],kt.prototype,"variant",2);var ai=kt;ai.register(Ds);var Ll=ai;var $s=y.constructTagName("formfieldgroup"),li={RADIOGROUP:"radiogroup",GROUP:"group"};var Rl=g`
|
2364
2547
|
|
2365
2548
|
:host::part(container) {
|
2366
2549
|
display: flex;
|
@@ -2377,12 +2560,12 @@
|
|
2377
2560
|
:host::part(label-text){
|
2378
2561
|
font-weight: bold;
|
2379
2562
|
}
|
2380
|
-
`,
|
2563
|
+
`,Ps=[Rl];var to=class extends q(ee){constructor(){super();this.isRadio=!1;this.shouldRenderLabel=!1,this.id="",this.helpTextType=void 0,this.disabled=void 0}render(){var e;return u`
|
2381
2564
|
<div
|
2382
2565
|
part="container"
|
2383
|
-
role="${this.isRadio?
|
2384
|
-
aria-labelledby="${
|
2385
|
-
aria-describedby="${
|
2566
|
+
role="${this.isRadio?li.RADIOGROUP:li.GROUP}"
|
2567
|
+
aria-labelledby="${V.HEADING_ID}"
|
2568
|
+
aria-describedby="${V.HELPER_TEXT_ID}"
|
2386
2569
|
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
2387
2570
|
>
|
2388
2571
|
<div part="group-header">
|
@@ -2391,7 +2574,7 @@
|
|
2391
2574
|
</div>
|
2392
2575
|
<slot></slot>
|
2393
2576
|
</div>
|
2394
|
-
`}};
|
2577
|
+
`}};to.styles=[...ee.styles,...Ps];var ci=to;ci.register($s);var ro=ci;var Nl=[C,g`
|
2395
2578
|
:host {
|
2396
2579
|
--mdc-spinner-default-color: var(--mds-color-theme-control-active-normal);
|
2397
2580
|
--mdc-spinner-inverted-color: var(--mds-color-theme-inverted-control-active-normal);
|
@@ -2453,11 +2636,11 @@
|
|
2453
2636
|
stroke-dashoffset: -292;
|
2454
2637
|
}
|
2455
2638
|
}
|
2456
|
-
`],
|
2639
|
+
`],Us=Nl;var Hs=y.constructTagName("spinner"),kl={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},Ol={STANDALONE:"standalone",BUTTON:"button"},oo={VARIANT:Ol.STANDALONE,SIZE:kl.MIDSIZE,INVERTED:!1};var Ge=class extends E{constructor(){super(...arguments);this.inverted=oo.INVERTED;this.size=oo.SIZE;this.ariaLabel=null;this.variant=oo.VARIANT}updated(e){super.updated(e),e.has("ariaLabel")&&(this.role=this.ariaLabel?"img":null,this.ariaHidden=this.ariaLabel?"false":"true")}render(){return u`
|
2457
2640
|
<svg part="container" viewBox="0 0 100 100">
|
2458
2641
|
<circle part="circle" cx="50" cy="50" r="46"></circle>
|
2459
2642
|
</svg>
|
2460
|
-
`}};
|
2643
|
+
`}};Ge.styles=[...E.styles,...Us],c([d({type:Boolean,reflect:!0})],Ge.prototype,"inverted",2),c([d({type:String,reflect:!0})],Ge.prototype,"size",2),c([d({type:String,attribute:"aria-label"})],Ge.prototype,"ariaLabel",2),c([d({type:String,reflect:!0})],Ge.prototype,"variant",2);var di=Ge;di.register(Hs);var zl=di;var io=class extends ge(ro){constructor(){super(),this.isRadio=!0}firstUpdated(){var t,e,r,i,n;(n=(i=(r=(e=Array.from(((t=this.shadowRoot)==null?void 0:t.querySelectorAll("slot"))||[]))==null?void 0:e.flatMap(s=>s.assignedElements({flatten:!0})))==null?void 0:r.filter(s=>s.tagName.toLowerCase()===Zr))==null?void 0:i.filter(s=>!s.hasAttribute("name")))==null||n.forEach(s=>s.setAttribute("name",this.name))}};io.styles=[...ro.styles];var mi=io;var Vs=y.constructTagName("radiogroup");mi.register(Vs);var Ml=mi;})();
|
2461
2644
|
/*! Bundled license information:
|
2462
2645
|
|
2463
2646
|
@lit/reactive-element/decorators/custom-element.js:
|