@momentum-design/components 0.32.0 → 0.33.0
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 +313 -140
- package/dist/browser/index.js.map +4 -4
- package/dist/components/input/input.component.js +1 -1
- package/dist/components/popover/popover.component.d.ts +5 -0
- package/dist/components/popover/popover.component.js +15 -2
- package/dist/components/popover/popover.constants.d.ts +1 -0
- package/dist/components/popover/popover.constants.js +1 -0
- package/dist/components/textarea/index.d.ts +10 -0
- package/dist/components/textarea/index.js +7 -0
- package/dist/components/textarea/textarea.component.d.ts +203 -0
- package/dist/components/textarea/textarea.component.js +432 -0
- package/dist/components/textarea/textarea.constants.d.ts +21 -0
- package/dist/components/textarea/textarea.constants.js +25 -0
- package/dist/components/textarea/textarea.styles.d.ts +2 -0
- package/dist/components/textarea/textarea.styles.js +122 -0
- package/dist/components/textarea/textarea.types.d.ts +5 -0
- package/dist/components/textarea/textarea.types.js +1 -0
- package/dist/custom-elements.json +1792 -836
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +3 -2
- package/dist/react/index.js +3 -2
- package/dist/react/textarea/index.d.ts +61 -0
- package/dist/react/textarea/index.js +70 -0
- package/dist/utils/mixins/FormInternalsMixin.d.ts +2 -2
- package/dist/utils/mixins/FormInternalsMixin.js +1 -1
- package/package.json +1 -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 ea=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var c=(o,t,e,r)=>{for(var i=r>1?void 0:r?ta(t,e):t,s=o.length-1,n;s>=0;s--)(n=o[s])&&(i=(r?n(t,e,i):n(i))||i);return r&&i&&ea(t,e,i),i};var dr=globalThis,mr=dr.ShadowRoot&&(dr.ShadyCSS===void 0||dr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lo=Symbol(),Ti=new WeakMap,zt=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==lo)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(mr&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=Ti.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&Ti.set(e,t))}return t}toString(){return this.cssText}},Ai=o=>new zt(typeof o=="string"?o:o+"",void 0,lo),g=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((r,i,s)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[s+1],o[0]);return new zt(e,o,lo)},co=(o,t)=>{if(mr)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=dr.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,o.appendChild(r)}},hr=mr?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return Ai(e)})(o):o;var{is:ra,defineProperty:oa,getOwnPropertyDescriptor:ia,getOwnPropertyNames:sa,getOwnPropertySymbols:na,getPrototypeOf:aa}=Object,$e=globalThis,Si=$e.trustedTypes,la=Si?Si.emptyScript:"",mo=$e.reactiveElementPolyfillSupport,Mt=(o,t)=>o,$t={toAttribute(o,t){switch(t){case Boolean:o=o?la: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}},pr=(o,t)=>!ra(o,t),_i={attribute:!0,type:String,converter:$t,reflect:!1,hasChanged:pr},Ii,wi;(Ii=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(wi=$e.litPropertyMetadata)!=null||($e.litPropertyMetadata=new WeakMap);var Te=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=_i){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&&oa(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){var n;let{get:i,set:s}=(n=ia(this.prototype,t))!=null?n:{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);s.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:_i}static _$Ei(){if(this.hasOwnProperty(Mt("elementProperties")))return;let t=aa(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Mt("properties"))){let e=this.properties,r=[...sa(e),...na(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(hr(i))}else t!==void 0&&e.push(hr(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 co(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 s;let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){let n=(((s=r.converter)==null?void 0:s.toAttribute)!==void 0?r.converter:$t).toAttribute(e,r.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var s;let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let n=r.getPropertyOptions(i),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((s=n.converter)==null?void 0:s.fromAttribute)!==void 0?n.converter:$t;this._$Em=i,this[i]=a.fromAttribute(e,n.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:pr)(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[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[n,a]of s)a.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],a)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}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){}},Ci;Te.elementStyles=[],Te.shadowRootOptions={mode:"open"},Te[Mt("elementProperties")]=new Map,Te[Mt("finalized")]=new Map,mo==null||mo({ReactiveElement:Te}),((Ci=$e.reactiveElementVersions)!=null?Ci:$e.reactiveElementVersions=[]).push("2.0.4");var Pt=globalThis,ur=Pt.trustedTypes,ki=ur?ur.createPolicy("lit-html",{createHTML:o=>o}):void 0,uo="$lit$",Ae=`lit$${Math.random().toFixed(9).slice(2)}$`,fo="?"+Ae,ca=`<${fo}>`,je=document,Ut=()=>je.createComment(""),Vt=o=>o===null||typeof o!="object"&&typeof o!="function",go=Array.isArray,$i=o=>go(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",ho=`[
|
2
|
+
\f\r]`,Dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ri=/-->/g,Li=/>/g,Xe=RegExp(`>|${ho}(?:([^\\s"'>=/]+)(${ho}*=${ho}*(?:[^
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ni=/'/g,Oi=/"/g,Di=/^(?:script|style|textarea|title)$/i,vo=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),u=vo(1),ic=vo(2),sc=vo(3),Se=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),zi=new WeakMap,Ze=je.createTreeWalker(je,129);function Pi(o,t){if(!go(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ki!==void 0?ki.createHTML(t):t}var Ui=(o,t)=>{let e=o.length-1,r=[],i,s=t===2?"<svg>":t===3?"<math>":"",n=Dt;for(let a=0;a<e;a++){let l=o[a],m,h,p=-1,b=0;for(;b<l.length&&(n.lastIndex=b,h=n.exec(l),h!==null);)b=n.lastIndex,n===Dt?h[1]==="!--"?n=Ri:h[1]!==void 0?n=Li:h[2]!==void 0?(Di.test(h[2])&&(i=RegExp("</"+h[2],"g")),n=Xe):h[3]!==void 0&&(n=Xe):n===Xe?h[0]===">"?(n=i!=null?i:Dt,p=-1):h[1]===void 0?p=-2:(p=n.lastIndex-h[2].length,m=h[1],n=h[3]===void 0?Xe:h[3]==='"'?Oi:Ni):n===Oi||n===Ni?n=Xe:n===Ri||n===Li?n=Dt:(n=Xe,i=void 0);let f=n===Xe&&o[a+1].startsWith("/>")?" ":"";s+=n===Dt?l+ca:p>=0?(r.push(m),l.slice(0,p)+uo+l.slice(p)+Ae+f):l+Ae+(p===-2?a:f)}return[Pi(o,s+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},Ht=class o{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let s=0,n=0,a=t.length-1,l=this.parts,[m,h]=Ui(t,e);if(this.el=o.createElement(m,r),Ze.currentNode=this.el.content,e===2||e===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Ze.nextNode())!==null&&l.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(let p of i.getAttributeNames())if(p.endsWith(uo)){let b=h[n++],f=i.getAttribute(p).split(Ae),x=/([.?@])?(.*)/.exec(b);l.push({type:1,index:s,name:x[2],strings:f,ctor:x[1]==="."?gr:x[1]==="?"?vr:x[1]==="@"?br:Qe}),i.removeAttribute(p)}else p.startsWith(Ae)&&(l.push({type:6,index:s}),i.removeAttribute(p));if(Di.test(i.tagName)){let p=i.textContent.split(Ae),b=p.length-1;if(b>0){i.textContent=ur?ur.emptyScript:"";for(let f=0;f<b;f++)i.append(p[f],Ut()),Ze.nextNode(),l.push({type:2,index:++s});i.append(p[b],Ut())}}}else if(i.nodeType===8)if(i.data===fo)l.push({type:2,index:s});else{let p=-1;for(;(p=i.data.indexOf(Ae,p+1))!==-1;)l.push({type:7,index:s}),p+=Ae.length-1}s++}}static createElement(t,e){let r=je.createElement("template");return r.innerHTML=t,r}};function Ke(o,t,e=o,r){var n,a,l;if(t===Se)return t;let i=r!==void 0?(n=e.o)==null?void 0:n[r]:e.l,s=Vt(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((a=i==null?void 0:i._$AO)==null||a.call(i,!1),s===void 0?i=void 0:(i=new s(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=Ke(o,i._$AS(o,t.values),i,r)),t}var fr=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:je).importNode(e,!0);Ze.currentNode=i;let s=Ze.nextNode(),n=0,a=0,l=r[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new bt(s,s.nextSibling,this,t):l.type===1?h=new l.ctor(s,l.name,l.strings,this,t):l.type===6&&(h=new yr(s,this,t)),this._$AV.push(h),l=r[++a]}n!==(l==null?void 0:l.index)&&(s=Ze.nextNode(),n++)}return Ze.currentNode=je,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++}},bt=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 s;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this.v=(s=i==null?void 0:i.isConnected)!=null?s:!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=Ke(this,t,e),Vt(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==Se&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):$i(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!==v&&Vt(this._$AH)?this._$AA.nextSibling.data=t:this.T(je.createTextNode(t)),this._$AH=t}$(t){var s;let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=Ht.createElement(Pi(r.h,r.h[0]),this.options)),r);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(e);else{let n=new fr(i,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n}}_$AC(t){let e=zi.get(t.strings);return e===void 0&&zi.set(t.strings,e=new Ht(t)),e}k(t){go(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let s of t)i===e.length?e.push(r=new o(this.O(Ut()),this.O(Ut()),this,this.options)):r=e[i],r._$AI(s),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))}},Qe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,s){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=v}_$AI(t,e=this,r,i){let s=this.strings,n=!1;if(s===void 0)t=Ke(this,t,e,0),n=!Vt(t)||t!==this._$AH&&t!==Se,n&&(this._$AH=t);else{let a=t,l,m;for(t=s[0],l=0;l<s.length-1;l++)m=Ke(this,a[r+l],e,l),m===Se&&(m=this._$AH[l]),n||(n=!Vt(m)||m!==this._$AH[l]),m===v?t=v:t!==v&&(t+=(m!=null?m:"")+s[l+1]),this._$AH[l]=m}n&&!i&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},gr=class extends Qe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}},vr=class extends Qe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==v)}},br=class extends Qe{constructor(t,e,r,i,s){super(t,e,r,i,s),this.type=5}_$AI(t,e=this){var n;if((t=(n=Ke(this,t,e,0))!=null?n:v)===Se)return;let r=this._$AH,i=t===v&&r!==v||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,s=t!==v&&(r===v||i);i&&this.element.removeEventListener(this.name,this,r),s&&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)}},yr=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){Ke(this,t)}},Vi={M:uo,P:Ae,A:fo,C:1,L:Ui,R:fr,D:$i,V:Ke,I:bt,H:Qe,N:vr,U:br,B:gr,F:yr},po=Pt.litHtmlPolyfillSupport,Mi;po==null||po(Ht,bt),((Mi=Pt.litHtmlVersions)!=null?Mi:Pt.litHtmlVersions=[]).push("3.2.0");var Hi=(o,t,e)=>{var s,n;let r=(s=e==null?void 0:e.renderBefore)!=null?s:t,i=r._$litPart$;if(i===void 0){let a=(n=e==null?void 0:e.renderBefore)!=null?n:null;r._$litPart$=i=new bt(t.insertBefore(Ut(),a),a,void 0,e!=null?e:{})}return i._$AI(o),i};var De=class extends Te{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=Hi(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 Se}},Fi;De._$litElement$=!0,De.finalized=!0,(Fi=globalThis.litElementHydrateSupport)==null||Fi.call(globalThis,{LitElement:De});var bo=globalThis.litElementPolyfillSupport;bo==null||bo({LitElement:De});var Bi;((Bi=globalThis.litElementVersions)!=null?Bi:globalThis.litElementVersions=[]).push("4.1.0");var da={attribute:!0,type:String,converter:$t,reflect:!1,hasChanged:pr},ma=(o=da,t,e)=>{let{kind:r,metadata:i}=e,s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(e.name,o),r==="accessor"){let{name:n}=e;return{set(a){let l=t.get.call(this);t.set.call(this,a),this.requestUpdate(n,l,o)},init(a){return a!==void 0&&this.P(n,void 0,o),a}}}if(r==="setter"){let{name:n}=e;return function(a){let l=this[n];t.call(this,a),this.requestUpdate(n,l,o)}}throw Error("Unsupported decorator location: "+r)};function d(o){return(t,e)=>typeof e=="object"?ma(o,t,e):((r,i,s)=>{let n=i.hasOwnProperty(s);return i.constructor.createProperty(s,n?{...r,wrapped:!0}:r),n?Object.getOwnPropertyDescriptor(i,s):void 0})(o,t,e)}function W(o){return d({...o,state:!0,attribute:!1})}var Pe=(o,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(o,t,e),e);function xr(o,t){return(e,r,i)=>{let s=n=>{var a,l;return(l=(a=n.renderRoot)==null?void 0:a.querySelector(o))!=null?l:null};if(t){let{get:n,set:a}=typeof r=="object"?e:i!=null?i:(()=>{let l=Symbol();return{get(){return this[l]},set(m){this[l]=m}}})();return Pe(e,r,{get(){let l=n.call(this);return l===void 0&&(l=s(this),(l!==null||this.hasUpdated)&&a.call(this,l)),l}})}return Pe(e,r,{get(){return s(this)}})}}function Ft(o){return(t,e)=>{let{slot:r,selector:i}=o!=null?o:{},s="slot"+(r?`[name=${r}]`:":not([name])");return Pe(t,e,{get(){var l,m;let n=(l=this.renderRoot)==null?void 0:l.querySelector(s),a=(m=n==null?void 0:n.assignedElements(o))!=null?m:[];return i===void 0?a:a.filter(h=>h.matches(i))}})}}var A=o=>o!=null?o:v;var Gi=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 Er=class extends De{static register(t){customElements.get(t)||customElements.define(t,this)}};Er.styles=[Gi];var qi=Er;var E=qi;var Ue=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 yt=class{constructor(t,e,r,i){var s;if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(n,a)=>{this.unsubscribe&&(this.unsubscribe!==a&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=n,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(n,a)),this.unsubscribe=a},this.host=t,e.context!==void 0){let n=e;this.context=n.context,this.callback=n.callback,this.subscribe=(s=n.subscribe)!=null?s:!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 Ue(this.context,this.t,this.subscribe))}};var Tr=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 yo=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},xt=class extends Tr{constructor(t,e,r){var i,s;super(e.context!==void 0?e.initialValue:r),this.onContextRequest=n=>{let a=n.composedPath()[0];n.context===this.context&&a!==this.host&&(n.stopPropagation(),this.addCallback(n.callback,a,n.subscribe))},this.onProviderRequest=n=>{let a=n.composedPath()[0];if(n.context!==this.context||a===this.host)return;let l=new Set;for(let[m,{consumerHost:h}]of this.subscriptions)l.has(m)||(l.add(m),h.dispatchEvent(new Ue(this.context,m,!0)));n.stopPropagation()},this.host=t,e.context!==void 0?this.context=e.context:this.context=e,this.attachListeners(),(s=(i=this.host).addController)==null||s.call(i,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new yo(this.context))}};var ha=g`
|
14
14
|
:host {
|
15
15
|
display: contents;
|
16
16
|
}
|
17
|
-
`,
|
17
|
+
`,Wi=ha;var Ar=class extends E{constructor({context:t,initialValue:e}){super(),this.context=new xt(this,{context:t,initialValue:e})}render(){return this.updateContext(),u`<slot></slot>`}};Ar.styles=[...E.styles,Wi];var Xi=Ar;var Et=Xi;var pa={PREFIX:"mdc",SEPARATOR:"-"},ua={NAMESPACE:pa},xo=ua;var fa=o=>[xo.NAMESPACE.PREFIX,o].join(xo.NAMESPACE.SEPARATOR),y={constructTagName:fa};var Zi=y.constructTagName("avatar"),q={COUNTER:"counter",ICON:"icon",PHOTO:"photo",TEXT:"text"},Eo=99,ga="user-regular",N={24:24,32:32,48:48,64:64,72:72,88:88,124:124},Tt={TYPE:q.PHOTO,SIZE:N[32],ICON_NAME:ga};var Sr=o=>{class t extends o{constructor(){super(...arguments);this.size=Tt.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 pe=o=>{class t extends o{}return c([d({type:String,attribute:"icon-name"})],t.prototype,"iconName",2),t};var L=g`
|
18
18
|
:host {
|
19
19
|
align-items: center;
|
20
20
|
display: flex;
|
@@ -79,7 +79,7 @@
|
|
79
79
|
outline: 0.125rem solid var(--mds-color-theme-focus-default-0);
|
80
80
|
}
|
81
81
|
}
|
82
|
-
`]};var
|
82
|
+
`]};var va=[L,g`
|
83
83
|
:host {
|
84
84
|
--mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);
|
85
85
|
--mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
@@ -202,38 +202,38 @@
|
|
202
202
|
outline: 0.125rem solid;
|
203
203
|
}
|
204
204
|
}
|
205
|
-
`],
|
206
|
-
<mdc-presence part="presence" type="${this.presence}" size="${
|
207
|
-
`:
|
205
|
+
`],ji=va;var Ki=y.constructTagName("presence"),F={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"},U={XX_SMALL:"xx_small",X_SMALL:"x_small",SMALL:"small",MIDSIZE:"midsize",LARGE:"large",X_LARGE:"x_large",XX_LARGE:"xx_large"},At={TYPE:F.ACTIVE,SIZE:U.SMALL};var Bt=y.constructTagName("text"),C={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"},O={H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",P:"p",SMALL:"small",SPAN:"span",DIV:"div"},Z={TYPE:C.BODY_LARGE_REGULAR,TEXT_ELEMENT_TAGNAME:O.P,CSS_PART_TEXT:"text",CHILDREN:"The quick brown fox jumps over the lazy dog"};var Qi=o=>({[N[124]]:U.XX_LARGE,[N[88]]:U.X_LARGE,[N[72]]:U.LARGE,[N[64]]:U.MIDSIZE,[N[48]]:U.SMALL,[N[32]]:U.X_SMALL,[N[24]]:U.XX_SMALL})[o]||U.X_SMALL,Ji=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,es=o=>({[N[124]]:C.HEADING_XLARGE_MEDIUM,[N[88]]:C.HEADING_LARGE_MEDIUM,[N[72]]:C.HEADING_MIDSIZE_MEDIUM,[N[64]]:C.HEADING_SMALL_MEDIUM,[N[48]]:C.HEADING_SMALL_MEDIUM,[N[32]]:C.BODY_MIDSIZE_MEDIUM,[N[24]]:C.BODY_SMALL_MEDIUM})[o]||C.BODY_MIDSIZE_MEDIUM;var Gt=class extends Sr(pe(E)){constructor(){super(...arguments);this.isPhotoLoaded=!1}getPresenceTemplateBasedOnType(e){return e===q.COUNTER&&(this.counter||this.counter===0)?v:this.presence?u`
|
206
|
+
<mdc-presence part="presence" type="${this.presence}" size="${Qi(this.size)}"></mdc-presence>
|
207
|
+
`:v}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`
|
208
208
|
<img
|
209
209
|
part="photo"
|
210
|
-
src="${
|
210
|
+
src="${A(this.src)}"
|
211
211
|
aria-hidden="true"
|
212
212
|
?hidden="${!this.isPhotoLoaded}"
|
213
213
|
@load="${this.handleOnLoad}"
|
214
214
|
@error="${this.handleOnError}"
|
215
215
|
/>
|
216
|
-
`}iconTemplate(){let e=this.iconName||
|
216
|
+
`}iconTemplate(){let e=this.iconName||Tt.ICON_NAME;return u`
|
217
217
|
<mdc-icon
|
218
|
-
name="${
|
218
|
+
name="${A(e)}"
|
219
219
|
length-unit="rem"
|
220
|
-
size="${
|
220
|
+
size="${Ji(this.size)}"
|
221
221
|
></mdc-icon>
|
222
222
|
`}textTemplate(e){return u`
|
223
223
|
<mdc-text
|
224
|
-
type="${
|
224
|
+
type="${es(this.size)}"
|
225
225
|
tagname="span"
|
226
226
|
>
|
227
227
|
${e}
|
228
228
|
</mdc-text>
|
229
|
-
`}generateCounterText(e){return e<0?"0":e>
|
229
|
+
`}generateCounterText(e){return e<0?"0":e>Eo?`${Eo}+`:e.toString()}generateInitialsText(e){return e.toUpperCase().slice(0,2)}generateTextContent(e){let r="";return e===q.TEXT&&this.initials&&(r=this.generateInitialsText(this.initials)),e===q.COUNTER&&(this.counter||this.counter===0)&&(r=this.generateCounterText(this.counter)),this.textTemplate(r)}getTypeBasedOnInputs(){return this.src?q.PHOTO:this.iconName?q.ICON:this.initials?q.TEXT:this.counter||this.counter===0?q.COUNTER:q.ICON}getTemplateBasedOnType(e){switch(e){case q.PHOTO:return this.photoTemplate();case q.TEXT:case q.COUNTER:return this.generateTextContent(e);case q.ICON:default:return this.iconTemplate()}}getLoadingContent(){return this.isTyping?u`<div part="loading-wrapper"><div part="loader"></div></div>`:v}getPhotoPlaceHolderContent(e){return this.isPhotoLoaded?v:e===q.PHOTO?this.initials?this.textTemplate(this.generateInitialsText(this.initials)):this.iconTemplate():v}update(e){super.update(e),e.has("src")&&!this.src&&(this.isPhotoLoaded=!1)}render(){let e=this.getTypeBasedOnInputs();return u`
|
230
230
|
<div part="content" aria-hidden="true">
|
231
231
|
${this.getPhotoPlaceHolderContent(e)}
|
232
232
|
${this.getTemplateBasedOnType(e)}
|
233
233
|
${this.getLoadingContent()}
|
234
234
|
${this.getPresenceTemplateBasedOnType(e)}
|
235
235
|
</div>
|
236
|
-
`}};
|
236
|
+
`}};Gt.styles=[...E.styles,...ji],c([W()],Gt.prototype,"isPhotoLoaded",2);var To=Gt;var ba=[L,g`
|
237
237
|
:host {
|
238
238
|
--mdc-icon-fill-color: currentColor;
|
239
239
|
--mdc-icon-size: var(--computed-icon-size);
|
@@ -248,7 +248,7 @@
|
|
248
248
|
width: 100%;
|
249
249
|
fill: var(--mdc-icon-fill-color);
|
250
250
|
}
|
251
|
-
`,...M()],
|
251
|
+
`,...M()],ts=ba;var ya=o=>{let{host:t,context:e,subscribe:r}=o;return new yt(t,{context:e,subscribe:r!=null?r:!0})},xa={consume:ya},rs=xa;var _r=y.constructTagName("iconprovider"),os=["svg"],is=["em","rem","px","%"],Ea={px:16,em:1,rem:1,"%":100},_e={FILE_EXTENSION:"svg",LENGTH_UNIT:"em",SIZE:Ea.em,SHOULD_CACHE:!1,ICON_SET:"momentum-icons"};var Ir=class{};Ir.context=_r;var wr=Ir;var ue=class extends Et{constructor(){super({context:wr.context,initialValue:new wr});this.iconSet=_e.ICON_SET;this.fileExtension=_e.FILE_EXTENSION;this.lengthUnit=_e.LENGTH_UNIT;this.size=_e.SIZE}static get Context(){return wr.context}updateValuesInContext(){this.fileExtension&&os.includes(this.fileExtension)?this.context.value.fileExtension=this.fileExtension:(this.fileExtension=_e.FILE_EXTENSION,this.context.value.fileExtension=_e.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&&is.includes(this.lengthUnit)?this.context.value.lengthUnit=this.lengthUnit:(this.lengthUnit=_e.LENGTH_UNIT,this.context.value.lengthUnit=_e.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})],ue.prototype,"iconSet",2),c([d({type:String})],ue.prototype,"url",2),c([d({type:String,attribute:"file-extension",reflect:!0})],ue.prototype,"fileExtension",2),c([d({type:String,attribute:"length-unit",reflect:!0})],ue.prototype,"lengthUnit",2),c([d({type:Number,reflect:!0})],ue.prototype,"size",2),c([d({type:String,attribute:"cache-strategy"})],ue.prototype,"cacheStrategy",2),c([d({type:String,attribute:"cache-name"})],ue.prototype,"cacheName",2);var qt=ue;var Yt={},ss=async o=>(Yt[o]===void 0&&(Yt[o]=new Map),{async set(t,e){Yt[o].set(t.url,await e.text())},async get(t){return Yt[o].get(t.url)},async delete(t){Yt[o].delete(t.url)}}),ns=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)}}},as=async(o,t)=>t==="in-memory-cache"?ss(o):ns(o);var ls=async o=>fetch(o).then(t=>{if(!t.ok)throw new Error("There was a problem while fetching the icon!");return t}),cs=async({url:o,name:t,fileExtension:e,cacheStrategy:r,cacheName:i,renewSignal:s})=>{let n=s(),a=new Request(`${o}/${t}.${e}`,{signal:n});return!i||!r||!["in-memory-cache","web-cache-api"].includes(r)?ls(a).then(l=>l.text()):as(i,r).then(l=>l.get(a).then(m=>m||ls(a.clone()).then(h=>{var p;return h.status<400&&h.headers.has("content-type")?(p=l.set)==null?void 0:p.call(l,a,h.clone()).then(()=>h.text()):h.text()})).catch(m=>{throw new Error(`Error in caching the Icon ${t}, ${m}`)}))};var ds=y.constructTagName("icon"),Ao={NAME:void 0,SIZE:1};var K=class extends E{constructor(){super();this.name=Ao.NAME;this.ariaLabel=null;this.iconProviderContext=rs.consume({host:this,context:qt.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:s,iconSet:n,cacheStrategy:a}=this.iconProviderContext.value;if(n==="custom-icons"&&i&&r&&this.name){let l=()=>(this.abortController.abort(),this.abortController=new AbortController,this.abortController.signal);return cs({url:i,name:this.name,fileExtension:r,cacheName:s,cacheStrategy:a,renewSignal:l}).then(m=>{let h=this.prepareIconElement(m);this.handleIconLoadedSuccess(h)}).catch(m=>{this.handleIconLoadedFailure(m)})}if(n==="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:Ao.SIZE}updated(e){var r,i,s,n;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!==((s=this.iconProviderContext.value)==null?void 0:s.size)&&(this.sizeFromContext=(n=this.iconProviderContext.value)==null?void 0:n.size,this.updateSize())}render(){return u` ${this.iconData} `}};K.styles=[...E.styles,...ts],c([W()],K.prototype,"iconData",2),c([W()],K.prototype,"lengthUnitFromContext",2),c([W()],K.prototype,"sizeFromContext",2),c([d({type:String,reflect:!0})],K.prototype,"name",2),c([d({type:Number})],K.prototype,"size",2),c([d({type:String,attribute:"length-unit"})],K.prototype,"lengthUnit",2),c([d({type:String,attribute:"aria-label"})],K.prototype,"ariaLabel",2),c([W()],K.prototype,"abortController",2);var So=K;So.register(ds);var Ta=So;var Aa=[L,g`
|
252
252
|
:host {
|
253
253
|
--mdc-presence-active-background-color: var(--mds-color-theme-indicator-stable);
|
254
254
|
--mdc-presence-away-background-color: var(--mds-color-theme-indicator-locked);
|
@@ -342,7 +342,7 @@
|
|
342
342
|
.mdc-presence-icon__scheduled {
|
343
343
|
color: var(--mdc-presence-scheduled-background-color);
|
344
344
|
}
|
345
|
-
`],
|
345
|
+
`],ms=Aa;var hs=o=>{switch(o){case F.AWAY:return"recents-presence-badge-filled";case F.AWAY_CALLING:return"away-calling-presence-filled";case F.BUSY:return"busy-presence-bold";case F.DND:return"dnd-presence-badge-filled";case F.MEETING:return"camera-filled";case F.ON_CALL:return"handset-filled";case F.ON_DEVICE:return"generic-device-video-badge-filled";case F.ON_MOBILE:return"phone-badge-filled";case F.PAUSE:return"pause-badge-filled";case F.PTO:return"pto-presence-filled";case F.PRESENTING:return"share-screen-badge-filled";case F.QUIET:return"quiet-hours-presence-filled";case F.SCHEDULED:return"meetings-presence-badge-filled";case F.ACTIVE:default:return"active-presence-small-filled"}};var Je=class extends E{constructor(){super(...arguments);this.type=At.TYPE;this.size=At.SIZE;this.currentIconType=At.TYPE}get iconSize(){switch(this.size){case U.MIDSIZE:return 1.16125;case U.LARGE:return 1.30625;case U.X_LARGE:return 1.596875;case U.XX_LARGE:return 2.25;case U.XX_SMALL:case U.X_SMALL:case U.SMALL:default:return this.size=At.SIZE,.875}}get icon(){let e=hs(this.type);return e==="active-presence-small-filled"&&(this.type=At.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`
|
346
346
|
<div class="mdc-presence mdc-presence__${this.size}">
|
347
347
|
<mdc-icon
|
348
348
|
class="mdc-presence-icon mdc-presence-icon__${this.currentIconType}"
|
@@ -352,7 +352,7 @@
|
|
352
352
|
@error="${this.handleOnError}"
|
353
353
|
></mdc-icon>
|
354
354
|
</div>
|
355
|
-
`}};
|
355
|
+
`}};Je.styles=[...E.styles,...ms],c([d({type:String,reflect:!0})],Je.prototype,"type",2),c([d({type:String,reflect:!0})],Je.prototype,"size",2),c([W()],Je.prototype,"currentIconType",2);var _o=Je;_o.register(Ki);var Sa=_o;var ps=g`
|
356
356
|
:host::part(text) {
|
357
357
|
font-size: unset;
|
358
358
|
font-weight: unset;
|
@@ -595,14 +595,14 @@
|
|
595
595
|
text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);
|
596
596
|
text-transform: var(--mds-font-apps-body-small-regular-text-case);
|
597
597
|
}
|
598
|
-
`;var
|
598
|
+
`;var _a=[g`
|
599
599
|
:host {
|
600
600
|
--mdc-text-font-family: var(--mdc-themeprovider-font-family);
|
601
601
|
|
602
602
|
display: block;
|
603
603
|
font-family: var(--mdc-text-font-family);
|
604
604
|
}
|
605
|
-
`,
|
605
|
+
`,ps],us=_a;var St=class extends E{constructor(){super(...arguments);this.type=Z.TYPE;this.tagname=Z.TEXT_ELEMENT_TAGNAME}render(){switch(this.tagname){case O.H1:return u`<h1 part=${Z.CSS_PART_TEXT}><slot></slot></h1>`;case O.H2:return u`<h2 part=${Z.CSS_PART_TEXT}><slot></slot></h2>`;case O.H3:return u`<h3 part=${Z.CSS_PART_TEXT}><slot></slot></h3>`;case O.H4:return u`<h4 part=${Z.CSS_PART_TEXT}><slot></slot></h4>`;case O.H5:return u`<h5 part=${Z.CSS_PART_TEXT}><slot></slot></h5>`;case O.H6:return u`<h6 part=${Z.CSS_PART_TEXT}><slot></slot></h6>`;case O.DIV:return u`<div part=${Z.CSS_PART_TEXT}><slot></slot></div>`;case O.SPAN:return u`<span part=${Z.CSS_PART_TEXT}><slot></slot></span>`;case O.SMALL:return u`<small part=${Z.CSS_PART_TEXT}><slot></slot></small>`;case O.P:default:return u`<p part=${Z.CSS_PART_TEXT}><slot></slot></p>`}}};St.styles=[...E.styles,...us],c([d({attribute:"type",reflect:!0,type:String})],St.prototype,"type",2),c([d({attribute:"tagname",reflect:!0,type:String})],St.prototype,"tagname",2);var Io=St;Io.register(Bt);var Ia=Io;To.register(Zi);var wa=To;var Wh=y.constructTagName("buttonsimple"),Ca={20:20,24:24,28:28,32:32,40:40,48:48,52:52,64:64,72:72,88:88,124:124},_t={BUTTON:"button",SUBMIT:"submit",RESET:"reset"},Cr={SIZE:Ca[32],TYPE:_t.BUTTON,ROLE:"button"};var Wt=y.constructTagName("button"),Ie={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary"},kr={40:40,32:32,28:28,24:24},ne={64:64,52:52,20:20,...kr},wo={POSITIVE:"positive",NEGATIVE:"negative",ACCENT:"accent",PROMOTIONAL:"promotional",DEFAULT:"default"},It={PILL:"pill",ICON:"icon",PILL_WITH_ICON:"pill-with-icon"},fe={VARIANT:Ie.PRIMARY,SIZE:kr[32],COLOR:wo.DEFAULT,TYPE_INTERNAL:It.ICON,TYPE:_t.BUTTON};var Ve=o=>{class t extends o{constructor(){super(...arguments);this.disabled=!1}}return c([d({reflect:!0,type:Boolean})],t.prototype,"disabled",2),t};var Rr=o=>{class t extends o{constructor(){super(...arguments);this.tabIndex=0}}return c([d({reflect:!0,type:Number})],t.prototype,"tabIndex",2),t};var ka=[L,g`
|
606
606
|
:host {
|
607
607
|
border: 0.0625rem solid transparent;
|
608
608
|
cursor: pointer;
|
@@ -658,27 +658,27 @@
|
|
658
658
|
:host([size="20"]){
|
659
659
|
height: var(--mdc-button-height-size-20);
|
660
660
|
}
|
661
|
-
`,...M()],
|
661
|
+
`,...M()],fs=ka;var ge=class extends Rr(Ve(E)){constructor(){super();this.active=!1;this.softDisabled=!1;this.size=Cr.SIZE;this.role=Cr.ROLE;this.type=Cr.TYPE;this.prevTabindex=0;this.internals=this.attachInternals(),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))}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===_t.SUBMIT&&this.form&&this.form.requestSubmit(),this.type===_t.RESET&&this.form&&this.form.reset()}setActive(e,r){r?e.setAttribute("aria-pressed","true"):e.removeAttribute("aria-pressed")}setSoftDisabled(e,r){r?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}setDisabled(e,r){r?(e.setAttribute("aria-disabled","true"),this.prevTabindex=this.tabIndex,this.tabIndex=-1):(this.tabIndex===-1&&(this.tabIndex=this.prevTabindex),e.removeAttribute("aria-disabled"))}triggerClickEvent(){let e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});this.dispatchEvent(e)}handleBlur(){this.classList.contains("pressed")&&this.classList.remove("pressed")}handleKeyDown(e){["Enter"," "].includes(e.key)&&(this.classList.add("pressed"),e.key==="Enter"&&this.triggerClickEvent())}handleKeyUp(e){["Enter"," "].includes(e.key)&&(this.classList.remove("pressed"),e.key===" "&&this.triggerClickEvent())}render(){return u`
|
662
662
|
<slot></slot>
|
663
|
-
`}};
|
663
|
+
`}};ge.formAssociated=!0,ge.styles=[...E.styles,...fs],c([d({type:Boolean,reflect:!0})],ge.prototype,"active",2),c([d({type:Boolean,attribute:"soft-disabled"})],ge.prototype,"softDisabled",2),c([d({type:Number,reflect:!0})],ge.prototype,"size",2),c([d({type:String,reflect:!0})],ge.prototype,"role",2),c([d({reflect:!0})],ge.prototype,"type",2);var He=ge;var Ra=[L,g`
|
664
664
|
:host {
|
665
665
|
padding: unset;
|
666
666
|
margin: unset;
|
667
667
|
outline: none;
|
668
668
|
border-radius: 0.25rem;
|
669
669
|
}
|
670
|
-
`,...M()],
|
670
|
+
`,...M()],gs=Ra;var Xt=class extends Sr(pe(He)){constructor(){super();this.ariaLabel=null;this.active=void 0,this.disabled=void 0,this.softDisabled=void 0,this.role="button",this.type=fe.TYPE}update(e){super.update(e),e.has("size")&&this.setSize(this.size)}setSize(e){this.setAttribute("size",Object.values(N).includes(e)?`${e}`:Tt.SIZE.toString())}render(){return u`
|
671
671
|
<mdc-avatar
|
672
672
|
slot="prefixIcon"
|
673
673
|
?is-typing="${this.isTyping}"
|
674
|
-
counter="${
|
675
|
-
icon-name="${
|
676
|
-
initials="${
|
677
|
-
presence="${
|
678
|
-
size="${
|
679
|
-
src="${
|
674
|
+
counter="${A(this.counter)}"
|
675
|
+
icon-name="${A(this.iconName)}"
|
676
|
+
initials="${A(this.initials)}"
|
677
|
+
presence="${A(this.presence)}"
|
678
|
+
size="${A(this.size)}"
|
679
|
+
src="${A(this.src)}"
|
680
680
|
></mdc-avatar>
|
681
|
-
`}};
|
681
|
+
`}};Xt.styles=[...gs],c([d({type:String,attribute:"aria-label"})],Xt.prototype,"ariaLabel",2);var Co=Xt;var vs=y.constructTagName("avatarbutton");Co.register(vs);var La=Co;var Lr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Zt=o=>(...t)=>({_$litDirective$:o,values:t}),wt=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 Nr=Zt(class extends wt{constructor(o){var t;if(super(o),o.type!==Lr.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(s=>s!=="")));for(let s in t)t[s]&&!((r=this.nt)!=null&&r.has(s))&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let n=!!t[s];n===this.st.has(s)||(i=this.nt)!=null&&i.has(s)||(n?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return Se}});var bs=y.constructTagName("badge"),we={DOT:"dot",ICON:"icon",COUNTER:"counter",SUCCESS:"success",WARNING:"warning",ERROR:"error"},Or={SUCCESS_ICON_NAME:"check-circle-badge-filled",WARNING_ICON_NAME:"warning-badge-filled",ERROR_ICON_NAME:"error-legacy-badge-filled"},zr={PRIMARY:"primary",SECONDARY:"secondary"},jt={SUCCESS:"success",WARNING:"warning",ERROR:"error"},Gp={...zr,...jt},Fe={TYPE:we.DOT,MAX_COUNTER:99,MAX_COUNTER_LIMIT:999,VARIANT:zr.PRIMARY,ICON_SIZE:1};var Na=[L,g`
|
682
682
|
:host {
|
683
683
|
--mdc-badge-primary-foreground-color: var(--mds-color-theme-common-text-primary-normal);
|
684
684
|
--mdc-badge-primary-background-color: var(--mds-color-theme-background-accent-normal);
|
@@ -747,21 +747,21 @@
|
|
747
747
|
outline: 0.125rem solid;
|
748
748
|
}
|
749
749
|
}
|
750
|
-
`],
|
750
|
+
`],ys=Na;var ve=class extends pe(E){constructor(){super(...arguments);this.variant=Fe.VARIANT;this.maxCounter=Fe.MAX_COUNTER;this.overlay=!1;this.ariaLabel=null}getCounterText(e,r){return r===void 0||typeof r!="number"||e===0?"":r>e?`${e}+`:e>Fe.MAX_COUNTER_LIMIT||r>Fe.MAX_COUNTER_LIMIT?`${Fe.MAX_COUNTER_LIMIT}+`:r.toString()}getBadgeIcon(e,r){return u`
|
751
751
|
<mdc-icon
|
752
|
-
class="mdc-badge-icon ${
|
753
|
-
name="${
|
754
|
-
size="${
|
752
|
+
class="mdc-badge-icon ${Nr({"mdc-badge-overlay":this.overlay,[`mdc-badge-icon__${r}`]:!0})}"
|
753
|
+
name="${A(e)}"
|
754
|
+
size="${Fe.ICON_SIZE}"
|
755
755
|
></mdc-icon>
|
756
|
-
`}getBadgeDot(){return u`<div class="mdc-badge-dot ${
|
756
|
+
`}getBadgeDot(){return u`<div class="mdc-badge-dot ${Nr({"mdc-badge-overlay":this.overlay})}"></div>`}getBadgeCounterText(){return u`
|
757
757
|
<mdc-text
|
758
|
-
type="${
|
758
|
+
type="${C.BODY_SMALL_MEDIUM}"
|
759
759
|
tagname="${O.DIV}"
|
760
|
-
class="mdc-badge-text ${
|
760
|
+
class="mdc-badge-text ${Nr({"mdc-badge-overlay":this.overlay})}"
|
761
761
|
>
|
762
762
|
${this.getCounterText(this.maxCounter,this.counter)}
|
763
763
|
</mdc-text>
|
764
|
-
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(
|
764
|
+
`}setRoleByAriaLabel(){this.ariaLabel?this.role="img":this.role=null}getBadgeContentBasedOnType(){this.variant&&!Object.values(zr).includes(this.variant)&&(this.variant=Fe.VARIANT);let{iconName:e,type:r,variant:i}=this;switch(r){case we.ICON:return this.getBadgeIcon(e||"",i);case we.COUNTER:return this.getBadgeCounterText();case we.SUCCESS:return this.getBadgeIcon(Or.SUCCESS_ICON_NAME,jt.SUCCESS);case we.WARNING:return this.getBadgeIcon(Or.WARNING_ICON_NAME,jt.WARNING);case we.ERROR:return this.getBadgeIcon(Or.ERROR_ICON_NAME,jt.ERROR);case we.DOT:default:return this.type=we.DOT,this.getBadgeDot()}}update(e){super.update(e),e.has("ariaLabel")&&this.setRoleByAriaLabel()}render(){return this.getBadgeContentBasedOnType()}};ve.styles=[...E.styles,...ys],c([d({type:String,reflect:!0})],ve.prototype,"type",2),c([d({type:String,reflect:!0})],ve.prototype,"variant",2),c([d({type:Number})],ve.prototype,"counter",2),c([d({type:Number,attribute:"max-counter",reflect:!0})],ve.prototype,"maxCounter",2),c([d({type:Boolean})],ve.prototype,"overlay",2),c([d({type:String,attribute:"aria-label"})],ve.prototype,"ariaLabel",2);var ko=ve;ko.register(bs);var Oa=ko;var za=g`
|
765
765
|
:host {
|
766
766
|
--mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);
|
767
767
|
--mdc-bullet-size-small: 0.25rem;
|
@@ -782,7 +782,7 @@
|
|
782
782
|
:host([size="large"]) {
|
783
783
|
height: var(--mdc-bullet-size-large);
|
784
784
|
}
|
785
|
-
`,
|
785
|
+
`,xs=[za];var Es=y.constructTagName("bullet"),Ts={SMALL:"small",MEDIUM:"medium",LARGE:"large"};var Kt=class extends E{constructor(){super(...arguments);this.size=Ts.SMALL}};Kt.styles=[...E.styles,...xs],c([d({type:String,reflect:!0})],Kt.prototype,"size",2);var Ro=Kt;Ro.register(Es);var Ma=Ro;var $a=g`
|
786
786
|
:host {
|
787
787
|
background-color: transparent;
|
788
788
|
border-radius: 1.25rem;
|
@@ -954,7 +954,7 @@
|
|
954
954
|
--mdc-button-secondary-hover-background-color: var(--mds-color-theme-button-secondary-hover);
|
955
955
|
--mdc-button-secondary-pressed-background-color: var(--mds-color-theme-button-secondary-pressed);
|
956
956
|
}
|
957
|
-
`,
|
957
|
+
`,As=[$a];var Ss=o=>{switch(o){case ne[64]:return 2;case ne[52]:return 1.75;case ne[40]:return 1.25;default:return 1}},Qt=o=>{let t=o.split("-"),e=["bold","filled","regular","light"];return t.filter(r=>!e.includes(r)).join("-")};var Q=class extends He{constructor(){super(...arguments);this.variant=fe.VARIANT;this.size=fe.SIZE;this.color=fe.COLOR;this.role="button";this.typeInternal=fe.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=`${Qt(this.prefixIcon)}-filled`),this.postfixIcon&&(this.prevPostfixIcon=this.postfixIcon,this.postfixIcon=`${Qt(this.postfixIcon)}-filled`)):(this.prevPrefixIcon&&(this.prefixIcon=this.prevPrefixIcon),this.prevPostfixIcon&&(this.postfixIcon=this.prevPostfixIcon))}setVariant(e){this.setAttribute("variant",Object.values(Ie).includes(e)?e:fe.VARIANT)}setSize(e){let i=this.typeInternal===It.ICON?Object.values(ne).includes(e)&&!(e===ne[20]&&this.variant!==Ie.TERTIARY):Object.values(kr).includes(e);this.setAttribute("size",i?`${e}`:`${fe.SIZE}`),this.iconSize=Ss(e)}setColor(e){!Object.values(wo).includes(e)||this.variant===Ie.TERTIARY?this.setAttribute("color",`${fe.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(s=>{var n;return s.nodeType!==Node.TEXT_NODE||((n=s.textContent)==null?void 0:n.trim())}).length;e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=It.PILL_WITH_ICON,this.setAttribute("data-btn-type","pill-with-icon")):!e&&(this.prefixIcon||this.postfixIcon)?(this.typeInternal=It.ICON,this.setAttribute("data-btn-type","icon")):(this.typeInternal=It.PILL,this.setAttribute("data-btn-type","pill"))}render(){return u`
|
958
958
|
${this.prefixIcon?u` <mdc-icon
|
959
959
|
name="${this.prefixIcon}"
|
960
960
|
part="prefix-icon"
|
@@ -970,7 +970,7 @@
|
|
970
970
|
length-unit="rem"
|
971
971
|
>
|
972
972
|
</mdc-icon>`:""}
|
973
|
-
`}};
|
973
|
+
`}};Q.styles=[...He.styles,...As],c([d({type:String,attribute:"prefix-icon",reflect:!0})],Q.prototype,"prefixIcon",2),c([d({type:String,attribute:"postfix-icon",reflect:!0})],Q.prototype,"postfixIcon",2),c([d({type:String})],Q.prototype,"variant",2),c([d({type:Number})],Q.prototype,"size",2),c([d({type:String})],Q.prototype,"color",2),c([d({type:String,reflect:!0})],Q.prototype,"role",2),c([W()],Q.prototype,"typeInternal",2),c([W()],Q.prototype,"iconSize",2);var Lo=Q;Lo.register(Wt);var Da=Lo;var B=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 H=[];for(let o=0;o<256;++o)H.push((o+256).toString(16).slice(1));function _s(o,t=0){return(H[o[t+0]]+H[o[t+1]]+H[o[t+2]]+H[o[t+3]]+"-"+H[o[t+4]]+H[o[t+5]]+"-"+H[o[t+6]]+H[o[t+7]]+"-"+H[o[t+8]]+H[o[t+9]]+"-"+H[o[t+10]]+H[o[t+11]]+H[o[t+12]]+H[o[t+13]]+H[o[t+14]]+H[o[t+15]]).toLowerCase()}var No,Pa=new Uint8Array(16);function Oo(){if(!No){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");No=crypto.getRandomValues.bind(crypto)}return No(Pa)}var Ua=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),zo={randomUUID:Ua};function Va(o,t,e){var i,s,n;if(zo.randomUUID&&!t&&!o)return zo.randomUUID();o=o||{};let r=(n=(s=o.random)!=null?s:(i=o.rng)==null?void 0:i.call(o))!=null?n:Oo();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 _s(r)}var Mo=Va;var be=o=>{class t extends o{constructor(...i){super(i);this.name="";this.value="";this.internals=this.attachInternals(),this.id=`mdc-input-${Mo()}`}get form(){return this.internals.form}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}setValidity(){this.inputElement&&this.internals.setValidity(this.inputElement.validity,this.inputElement.validationMessage,this.inputElement)}checkValidity(){return this.setValidity(),this.internals.checkValidity()}reportValidity(){return this.setValidity(),this.internals.reportValidity()}}return t.formAssociated=!0,c([d({reflect:!0,type:String})],t.prototype,"name",2),c([d({reflect:!0,type:String})],t.prototype,"value",2),c([d({reflect:!0,type:String,attribute:"validation-message"})],t.prototype,"validationMessage",2),c([xr("input")],t.prototype,"inputElement",2),t};var Is=y.constructTagName("formfieldwrapper"),J={DEFAULT:"default",ERROR:"error",PRIORITY:"priority",SUCCESS:"success",WARNING:"warning"},V={VALIDATION:J.DEFAULT,HELPER_TEXT_ID:"helper-text-id",HEADING_ID:"heading-id"},et={TAGNAME:O.SPAN,TYPE:C.BODY_MIDSIZE_REGULAR,HEADER_TYPE:C.BODY_MIDSIZE_BOLD};var Ha=[L,g`
|
974
974
|
:host {
|
975
975
|
flex-direction: column;
|
976
976
|
align-items: flex-start;
|
@@ -1019,33 +1019,33 @@
|
|
1019
1019
|
:host([help-text-type='priority']) .mdc-help-text {
|
1020
1020
|
color: var(--mds-color-theme-text-accent-normal);
|
1021
1021
|
}
|
1022
|
-
`],
|
1023
|
-
id="${
|
1024
|
-
tagname="${
|
1025
|
-
type="${
|
1022
|
+
`],ws=Ha;var Cs=o=>({[J.ERROR]:"error-legacy-badge-filled",[J.WARNING]:"warning-badge-filled",[J.SUCCESS]:"check-circle-badge-filled",[J.PRIORITY]:"priority-badge-filled",[J.DEFAULT]:""})[o]||"";var Ce=class extends Ve(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
|
1023
|
+
id="${V.HEADING_ID}"
|
1024
|
+
tagname="${et.TAGNAME}"
|
1025
|
+
type="${et.HEADER_TYPE}"
|
1026
1026
|
part="label"
|
1027
1027
|
>${this.label}</mdc-text
|
1028
|
-
>`:
|
1029
|
-
<mdc-text part="required-label" tagname=${
|
1028
|
+
>`:v}renderRequiredLabel(){return this.requiredLabel?u`
|
1029
|
+
<mdc-text part="required-label" tagname=${et.TAGNAME} type=${et.TYPE}>
|
1030
1030
|
(${this.requiredLabel})
|
1031
1031
|
</mdc-text>
|
1032
|
-
`:
|
1032
|
+
`:v}renderHelpTextIcon(){if(!this.helpText)return v;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>`:v}renderHelpText(){return this.helpText?u`
|
1033
1033
|
<mdc-text
|
1034
|
-
id="${
|
1034
|
+
id="${V.HELPER_TEXT_ID}"
|
1035
1035
|
part="help-text"
|
1036
|
-
tagname=${
|
1037
|
-
type=${
|
1036
|
+
tagname=${et.TAGNAME}
|
1037
|
+
type=${et.TYPE}
|
1038
1038
|
>
|
1039
1039
|
${this.helpText}
|
1040
1040
|
</mdc-text>
|
1041
|
-
`:
|
1041
|
+
`:v}renderLabel(){return this.label?u`<div class="mdc-label-text" part="label-text">
|
1042
1042
|
<slot name="label">${this.renderLabelElement()}</slot>
|
1043
1043
|
<slot name="required-label">${this.renderRequiredLabel()}</slot>
|
1044
1044
|
<slot name="label-info"></slot>
|
1045
|
-
</div>`:
|
1045
|
+
</div>`:v}renderHelperText(){return this.helpText?u`<div class="mdc-help-text" part="mdc-help-text">
|
1046
1046
|
<slot name="help-icon">${this.renderHelpTextIcon()}</slot>
|
1047
1047
|
<slot name="help-text">${this.renderHelpText()}</slot>
|
1048
|
-
</div>`:
|
1048
|
+
</div>`:v}};Ce.styles=[...E.styles,...ws],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;var ks=y.constructTagName("checkbox"),$o={CHECKED:"check-bold",INDETERMINATE:"minus-bold"};var Fa=[g`
|
1049
1049
|
:host {
|
1050
1050
|
--mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
|
1051
1051
|
--mdc-checkbox-border-color: var(--mds-color-theme-outline-button-normal);
|
@@ -1149,25 +1149,25 @@
|
|
1149
1149
|
border: 0.0625rem solid var(--mdc-checkbox-border-color);
|
1150
1150
|
}
|
1151
1151
|
}
|
1152
|
-
`,...M(!0)],
|
1152
|
+
`,...M(!0)],Rs=Fa;var tt=class extends be(B(ee)){constructor(){super();this.checked=!1;this.indeterminate=!1;this.autofocus=!1;this.renderLabelAndHelperText=()=>this.label?u`<div class="text-container">
|
1153
1153
|
${this.renderLabel()}
|
1154
1154
|
${this.renderHelperText()}
|
1155
|
-
</div>`:
|
1155
|
+
</div>`:v;this.helpTextType=void 0}setFormValue(){let e=null;this.checked?e=this.value?this.value:"on":e=null,this.manageRequired(),this.internals.setFormValue(e)}manageRequired(){!this.checked&&this.requiredLabel?(this.validationMessage?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()):this.internals.setValidity({})}formResetCallback(){this.checked=!1,this.indeterminate=!1}formStateRestoreCallback(e){e&&(this.checked=!0)}toggleState(){this.disabled||(this.checked=!this.checked,this.indeterminate=!1)}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}update(e){super.update(e),e.has("checked")&&this.setFormValue()}render(){var r;let e=this.checked||this.indeterminate?u`
|
1156
1156
|
<mdc-icon
|
1157
1157
|
class="icon"
|
1158
|
-
name="${this.indeterminate
|
1158
|
+
name="${this.indeterminate?$o.INDETERMINATE:$o.CHECKED}"
|
1159
1159
|
size="1"
|
1160
1160
|
length-unit="rem"
|
1161
1161
|
></mdc-icon>
|
1162
|
-
`:
|
1162
|
+
`:v;return u`
|
1163
1163
|
<div class="container mdc-focus-ring">
|
1164
1164
|
<input
|
1165
1165
|
id="${this.id}"
|
1166
1166
|
type="checkbox"
|
1167
1167
|
class="input"
|
1168
1168
|
?autofocus="${this.autofocus}"
|
1169
|
-
name="${
|
1170
|
-
value="${
|
1169
|
+
name="${A(this.name)}"
|
1170
|
+
value="${A(this.value)}"
|
1171
1171
|
?required="${!!this.requiredLabel}"
|
1172
1172
|
.checked="${this.checked}"
|
1173
1173
|
aria-checked="${this.indeterminate?"mixed":this.checked}"
|
@@ -1175,14 +1175,14 @@
|
|
1175
1175
|
.disabled="${this.disabled}"
|
1176
1176
|
aria-label="${(r=this.dataAriaLabel)!=null?r:""}"
|
1177
1177
|
tabindex="${this.disabled?-1:0}"
|
1178
|
-
aria-describedby="${
|
1178
|
+
aria-describedby="${A(this.helpText?V.HELPER_TEXT_ID:"")}"
|
1179
1179
|
@change=${this.handleChange}
|
1180
1180
|
@keydown=${this.handleKeyDown}
|
1181
1181
|
/>
|
1182
1182
|
<div class="icon-container">${e}</div>
|
1183
1183
|
</div>
|
1184
1184
|
${this.renderLabelAndHelperText()}
|
1185
|
-
`}};
|
1185
|
+
`}};tt.styles=[...ee.styles,...Rs],c([d({type:Boolean,reflect:!0})],tt.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],tt.prototype,"indeterminate",2),c([d({type:Boolean,reflect:!0})],tt.prototype,"autofocus",2);var Do=tt;Do.register(ks);var Ba=Do;var Ls=y.constructTagName("divider"),Jt={HORIZONTAL:"horizontal",VERTICAL:"vertical"},Po={SOLID:"solid",GRADIENT:"gradient"},Be={POSITIVE:"positive",NEGATIVE:"negative"},er={UP:"arrow-up-regular",DOWN:"arrow-down-regular",LEFT:"arrow-left-regular",RIGHT:"arrow-right-regular"},rt={ORIENTATION:Jt.HORIZONTAL,VARIANT:Po.SOLID,ARROW_DIRECTION:Be.NEGATIVE,BUTTON_DIRECTION:Be.NEGATIVE};var Ga=[L,g`
|
1186
1186
|
:host {
|
1187
1187
|
--mdc-divider-background-color: var(--mds-color-theme-outline-secondary-normal);
|
1188
1188
|
--mdc-divider-width: 0.0625rem;
|
@@ -1393,11 +1393,11 @@
|
|
1393
1393
|
font-size: var(--mdc-divider-text-size);
|
1394
1394
|
line-height: var(--mdc-divider-text-line-height);
|
1395
1395
|
}
|
1396
|
-
`],
|
1396
|
+
`],Ns=Ga;var Ge=class extends E{constructor(){super();this.orientation=rt.ORIENTATION;this.variant=rt.VARIANT;this.arrowDirection=rt.ARROW_DIRECTION;this.buttonPosition=rt.BUTTON_DIRECTION;this.setAttribute("data-type","mdc-primary-divider")}setVariant(e){this.setAttribute("variant",Object.values(Po).includes(e)?e:rt.VARIANT)}setOrientation(e){this.setAttribute("orientation",Object.values(Jt).includes(e)?e:rt.ORIENTATION)}ensureValidDirections(){let e=this.orientation===Jt.HORIZONTAL?Be.NEGATIVE:Be.POSITIVE;Object.values(Be).includes(this.buttonPosition)||(this.buttonPosition=e),Object.values(Be).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===Jt.HORIZONTAL,r=this.arrowDirection===Be.POSITIVE;return e?r?er.UP:er.DOWN:r?er.RIGHT:er.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 n;let e=(n=this.shadowRoot)==null?void 0:n.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()),s=r.some(a=>a.tagName===Wt.toUpperCase());i&&!s?this.setAttribute("data-type","mdc-text-divider"):!i&&s&&(this.setAttribute("data-type","mdc-grabber-divider"),this.setGrabberButton())}render(){return u`
|
1397
1397
|
<div></div>
|
1398
1398
|
<slot @slotchange=${this.inferDividerType}></slot>
|
1399
1399
|
<div></div>
|
1400
|
-
`}};
|
1400
|
+
`}};Ge.styles=[...E.styles,...Ns],c([d({type:String,reflect:!0})],Ge.prototype,"orientation",2),c([d({type:String,reflect:!0})],Ge.prototype,"variant",2),c([d({type:String,attribute:"arrow-direction",reflect:!0})],Ge.prototype,"arrowDirection",2),c([d({type:String,attribute:"button-position",reflect:!0})],Ge.prototype,"buttonPosition",2);var Uo=Ge;Uo.register(Ls);var qa=Uo;var Os=y.constructTagName("formfieldgroup"),Vo={RADIOGROUP:"radiogroup",GROUP:"group"};var Ya=g`
|
1401
1401
|
|
1402
1402
|
:host::part(container) {
|
1403
1403
|
display: flex;
|
@@ -1414,12 +1414,12 @@
|
|
1414
1414
|
:host::part(label-text){
|
1415
1415
|
font-weight: bold;
|
1416
1416
|
}
|
1417
|
-
`,
|
1417
|
+
`,zs=[Ya];var Mr=class extends B(ee){constructor(){super();this.isRadio=!1;this.shouldRenderLabel=!1,this.id="",this.helpTextType=void 0,this.disabled=void 0}render(){var e;return u`
|
1418
1418
|
<div
|
1419
1419
|
part="container"
|
1420
|
-
role="${this.isRadio?
|
1421
|
-
aria-labelledby="${
|
1422
|
-
aria-describedby="${
|
1420
|
+
role="${this.isRadio?Vo.RADIOGROUP:Vo.GROUP}"
|
1421
|
+
aria-labelledby="${V.HEADING_ID}"
|
1422
|
+
aria-describedby="${A(this.helpText?V.HELPER_TEXT_ID:"")}"
|
1423
1423
|
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
1424
1424
|
>
|
1425
1425
|
<div part="group-header">
|
@@ -1428,7 +1428,7 @@
|
|
1428
1428
|
</div>
|
1429
1429
|
<slot></slot>
|
1430
1430
|
</div>
|
1431
|
-
`}};
|
1431
|
+
`}};Mr.styles=[...ee.styles,...zs];var Ho=Mr;Ho.register(Os);var $r=Ho;qt.register(_r);var Wa=qt;var Xa=[g`
|
1432
1432
|
:host{
|
1433
1433
|
--mdc-input-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
1434
1434
|
--mdc-input-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
@@ -1543,35 +1543,35 @@
|
|
1543
1543
|
opacity: 0;
|
1544
1544
|
pointer-events: none;
|
1545
1545
|
}
|
1546
|
-
`,...M(!0)],
|
1546
|
+
`,...M(!0)],Ms=Xa;ee.register(Is);var ke=ee;var $s=y.constructTagName("input"),Dr={OFF:"off",NONE:"none",ON:"on",SENTENCES:"sentences",WORDS:"words",CHARACTERS:"characters"},Ds={MAX_LENGTH:10,HELPERTEXT:"Prefix text should not exceed 10 characters",VALIDATION:J.ERROR},qe={VALIDATION:J.DEFAULT,ICON_SIZE_VALUE:1,ICON_SIZE_UNIT:"rem",CLEAR_BUTTON_ICON:"cancel-bold",CLEAR_BUTTON_VARIANT:Ie.TERTIARY,CLEAR_BUTTON_SIZE:ne[20],PREFIX_TEXT_TYPE:C.BODY_MIDSIZE_REGULAR,PREFIX_TEXT_TAG:O.SPAN};var $=class extends be(B(ke)){constructor(){super(...arguments);this.placeholder="";this.readonly=!1;this.trailingButton=!1;this.autocapitalize=Dr.OFF;this.autocomplete="off";this.autofocus=!1;this.clearAriaLabel=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.inputElement&&(this.inputElement.checkValidity(),this.setInputValidity(),this.internals.setFormValue(this.inputElement.value))}).catch(e=>{this.onerror&&this.onerror(e)})}formResetCallback(){this.value="",this.requestUpdate()}formStateRestoreCallback(e){this.value=e}handleValueChange(){this.updateComplete.then(()=>{this.setInputValidity()}).catch(e=>{this.onerror&&this.onerror(e)})}updated(e){super.updated(e),e.has("value")&&this.handleValueChange()}setInputValidity(){this.requiredLabel&&this.validationMessage&&this.value===""?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()}attributeChangedCallback(e,r,i){super.attributeChangedCallback(e,r,i),["maxlength","minlength","pattern","required"].includes(e)&&this.updateComplete.then(()=>{this.setInputValidity()}).catch(n=>{this.onerror&&this.onerror(n)})}updateValue(){this.value=this.inputElement.value,this.internals.setFormValue(this.inputElement.value)}onInput(){this.updateValue(),this.setInputValidity()}onChange(e){this.updateValue(),this.setInputValidity();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}renderLeadingIcon(){return this.leadingIcon?u`
|
1547
1547
|
<mdc-icon
|
1548
1548
|
class="leading-icon"
|
1549
1549
|
part="leading-icon"
|
1550
1550
|
name=${this.leadingIcon}
|
1551
|
-
size="${
|
1552
|
-
length-unit="${
|
1551
|
+
size="${qe.ICON_SIZE_VALUE}"
|
1552
|
+
length-unit="${qe.ICON_SIZE_UNIT}">
|
1553
1553
|
</mdc-icon>
|
1554
|
-
`:
|
1554
|
+
`:v}renderPrefixText(){return this.prefixText?u`
|
1555
1555
|
<mdc-text
|
1556
1556
|
class="prefix-text"
|
1557
|
-
tagname="${
|
1558
|
-
type="${
|
1557
|
+
tagname="${qe.PREFIX_TEXT_TAG}"
|
1558
|
+
type="${qe.PREFIX_TEXT_TYPE}"
|
1559
1559
|
aria-hidden="true"
|
1560
1560
|
>
|
1561
|
-
${this.prefixText.slice(0,
|
1561
|
+
${this.prefixText.slice(0,Ds.MAX_LENGTH)}
|
1562
1562
|
</mdc-text>
|
1563
|
-
`:
|
1563
|
+
`:v}clearInputText(){var e;this.value="",(e=this.inputElement)==null||e.focus()}renderTrailingButton(){return this.trailingButton?u`
|
1564
1564
|
<mdc-button
|
1565
1565
|
part='trailing-button'
|
1566
1566
|
class='own-focus-ring ${this.value?"":"hidden"}'
|
1567
|
-
prefix-icon='${
|
1568
|
-
variant='${
|
1569
|
-
size="${
|
1567
|
+
prefix-icon='${qe.CLEAR_BUTTON_ICON}'
|
1568
|
+
variant='${qe.CLEAR_BUTTON_VARIANT}'
|
1569
|
+
size="${qe.CLEAR_BUTTON_SIZE}"
|
1570
1570
|
aria-label="${this.clearAriaLabel}"
|
1571
1571
|
@click=${this.clearInputText}
|
1572
1572
|
?disabled=${this.disabled||this.readonly||!this.value}
|
1573
1573
|
></mdc-button>
|
1574
|
-
`:
|
1574
|
+
`:v}render(){var e;return u`
|
1575
1575
|
${this.renderLabel()}
|
1576
1576
|
<div class="input-container mdc-focus-ring" part="input-container">
|
1577
1577
|
<slot name="input-leading-icon">${this.renderLeadingIcon()}</slot>
|
@@ -1589,18 +1589,18 @@
|
|
1589
1589
|
?readonly="${this.readonly}"
|
1590
1590
|
?required="${!!this.requiredLabel}"
|
1591
1591
|
type="text"
|
1592
|
-
aria-describedby="${
|
1592
|
+
aria-describedby="${A(this.helpText?V.HELPER_TEXT_ID:"")}"
|
1593
1593
|
aria-invalid="${this.helpTextType==="error"?"true":"false"}"
|
1594
|
-
placeholder=${
|
1595
|
-
minlength=${
|
1596
|
-
maxlength=${
|
1594
|
+
placeholder=${A(this.placeholder)}
|
1595
|
+
minlength=${A(this.minlength)}
|
1596
|
+
maxlength=${A(this.maxlength)}
|
1597
1597
|
autocapitalize=${this.autocapitalize}
|
1598
1598
|
autocomplete=${this.autocomplete}
|
1599
1599
|
?autofocus="${this.autofocus}"
|
1600
|
-
dirname=${
|
1601
|
-
pattern=${
|
1602
|
-
list=${
|
1603
|
-
size=${
|
1600
|
+
dirname=${A(this.dirname)}
|
1601
|
+
pattern=${A(this.pattern)}
|
1602
|
+
list=${A(this.list)}
|
1603
|
+
size=${A(this.size)}
|
1604
1604
|
@input=${this.onInput}
|
1605
1605
|
@change=${this.onChange}
|
1606
1606
|
@keydown=${this.handleKeyDown}
|
@@ -1609,8 +1609,8 @@
|
|
1609
1609
|
</div>
|
1610
1610
|
<slot name="trailing-button">${this.renderTrailingButton()}</slot>
|
1611
1611
|
</div>
|
1612
|
-
${this.helpText?this.renderHelperText():
|
1613
|
-
`}}
|
1612
|
+
${this.helpText?this.renderHelperText():v}
|
1613
|
+
`}};$.styles=[...ke.styles,...Ms],c([d({type:String})],$.prototype,"placeholder",2),c([d({type:Boolean})],$.prototype,"readonly",2),c([d({type:String,attribute:"prefix-text"})],$.prototype,"prefixText",2),c([d({type:String,attribute:"leading-icon"})],$.prototype,"leadingIcon",2),c([d({type:Boolean,attribute:"trailing-button"})],$.prototype,"trailingButton",2),c([d({type:Number})],$.prototype,"maxlength",2),c([d({type:Number})],$.prototype,"minlength",2),c([d({type:String})],$.prototype,"autocapitalize",2),c([d({type:String})],$.prototype,"autocomplete",2),c([d({type:Boolean})],$.prototype,"autofocus",2),c([d({type:String})],$.prototype,"dirname",2),c([d({type:String})],$.prototype,"pattern",2),c([d({type:String})],$.prototype,"list",2),c([d({type:Number})],$.prototype,"size",2),c([d({type:String,attribute:"clear-aria-label"})],$.prototype,"clearAriaLabel",2);var Fo=$;Fo.register($s);var Za=Fo;var Ps=y.constructTagName("link"),Pr={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},Ur={LARGE:1,MIDSIZE:.875,SMALL:.75},Vr={INLINE:!1,INVERTED:!1,LINK_SIZE:Pr.LARGE};var ja=[L,g`
|
1614
1614
|
|
1615
1615
|
:host {
|
1616
1616
|
|
@@ -1733,31 +1733,31 @@
|
|
1733
1733
|
:host(:active)::part(link-container) {
|
1734
1734
|
box-shadow: none;
|
1735
1735
|
}
|
1736
|
-
`],
|
1736
|
+
`],Us=ja;var ot=class extends Ve(pe(E)){constructor(){super(...arguments);this.inline=Vr.INLINE;this.inverted=Vr.INVERTED;this.size=Vr.LINK_SIZE;this.prevTabindex=null}getIconSize(){switch(this.size){case Pr.SMALL:return Ur.SMALL;case Pr.MIDSIZE:return Ur.MIDSIZE;default:return Ur.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,s;let e=(s=(i=this.shadowRoot)==null?void 0:i.querySelector("slot"))==null?void 0:s.assignedElements({flatten:!0}).find(n=>n.tagName==="A"),r=this.getIconSize();if(this.iconName&&e){let n=document.createElement("mdc-icon");n.setAttribute("name",this.iconName),n.setAttribute("size",`${r}`),n.setAttribute("length-unit","rem"),e.appendChild(n)}}update(e){super.update(e),e.has("disabled")&&this.setDisabled(this.disabled)}render(){return u`
|
1737
1737
|
<div part='link-container' class='mdc-focus-ring'>
|
1738
1738
|
<slot @slotchange=${this.updateTrailingIcon}></slot>
|
1739
1739
|
</div>
|
1740
|
-
`}};
|
1740
|
+
`}};ot.styles=[...E.styles,...Us],c([d({type:Boolean,reflect:!0})],ot.prototype,"inline",2),c([d({type:Boolean,reflect:!0})],ot.prototype,"inverted",2),c([d({type:String,reflect:!0})],ot.prototype,"size",2);var Bo=ot;Bo.register(Ps);var Ka=Bo;var Hr=y.constructTagName("listitem"),Qa={FULL_WIDTH:"full-width",INSET_PILL:"inset-pill",INSET_RECTANGLE:"inset-rectangle"},Vs={VARIANT:Qa.FULL_WIDTH};var Hs=y.constructTagName("list"),tr={ARROW_DOWN:"ArrowDown",ARROW_UP:"ArrowUp",HOME:"Home",END:"End"},Go="header-id";var Ja=g`
|
1741
1741
|
:host::part(header-text) {
|
1742
1742
|
padding: 0.5rem 0.75rem;
|
1743
1743
|
}
|
1744
|
-
`,
|
1744
|
+
`,Fs=[Ja];var Ct=class extends B(E){constructor(){super(),this.addEventListener("keydown",this.handleKeyDown)}handleKeyDown(t){var i;let e=this.getCurrentIndex(t.target),r=this.getNewIndexBasedOnKey(t.key,e,this.listItems.length);r!==void 0&&((i=this.listItems[r])==null||i.focus(),this.resetTabIndexAndSetActiveTabIndex(r))}getCurrentIndex(t){return this.listItems.findIndex(e=>e===t||e===t.parentElement)}getNewIndexBasedOnKey(t,e,r){switch(t){case tr.ARROW_DOWN:return(e+1)%r;case tr.ARROW_UP:return(e-1+r)%r;case tr.HOME:return 0;case tr.END:return r-1;default:return}}handleMouseClick(t){let e=this.getCurrentIndex(t.target);this.resetTabIndexAndSetActiveTabIndex(e)}resetTabIndexAndSetActiveTabIndex(t){this.listItems.forEach((e,r)=>{let i=t===r?"0":"-1";e==null||e.setAttribute("tabindex",i)})}firstUpdated(){this.resetTabIndexAndSetActiveTabIndex(0)}render(){var e;let t=this.headerText?u`
|
1745
1745
|
<mdc-text
|
1746
|
-
id="${
|
1746
|
+
id="${Go}"
|
1747
1747
|
part="header-text"
|
1748
|
-
type="${
|
1748
|
+
type="${C.BODY_MIDSIZE_BOLD}"
|
1749
1749
|
tagname="${O.SPAN}"
|
1750
1750
|
>${this.headerText}</mdc-text>
|
1751
|
-
`:
|
1751
|
+
`:v;return u`
|
1752
1752
|
<div
|
1753
1753
|
role="list"
|
1754
|
-
aria-labelledby="${this.headerText?
|
1754
|
+
aria-labelledby="${this.headerText?Go:""}"
|
1755
1755
|
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
1756
1756
|
>
|
1757
1757
|
${t}
|
1758
1758
|
<slot role="presentation" @click="${this.handleMouseClick}"></slot>
|
1759
1759
|
</div>
|
1760
|
-
`}};
|
1760
|
+
`}};Ct.styles=[...E.styles,...Fs],c([Ft({selector:Hr})],Ct.prototype,"listItems",2),c([d({type:String,attribute:"header-text",reflect:!0})],Ct.prototype,"headerText",2);var qo=Ct;qo.register(Hs);var el=qo;var tl=g`
|
1761
1761
|
:host {
|
1762
1762
|
--mdc-listitem-default-background-color: var(--mds-color-theme-background-primary-ghost);
|
1763
1763
|
--mdc-listitem-background-color-hover: var(--mds-color-theme-background-primary-hover);
|
@@ -1823,27 +1823,27 @@
|
|
1823
1823
|
display: flex;
|
1824
1824
|
flex-direction: row;
|
1825
1825
|
}
|
1826
|
-
`,
|
1826
|
+
`,Bs=[tl,...M()];var te=class extends B(Ve(Rr(E))){constructor(){super();this.variant=Vs.VARIANT;this.role="listitem"}getText(e,r,i){return i?u`
|
1827
1827
|
<slot name="${e}">
|
1828
1828
|
<mdc-text part="${e}" type="${r}" tagname="${O.SPAN}">${i}</mdc-text>
|
1829
1829
|
</slot>
|
1830
|
-
`:
|
1830
|
+
`:v}disableSlottedChildren(e){[...this.leadingControlsSlot,...this.trailingControlsSlot].forEach(r=>{e?r.setAttribute("disabled",""):r.removeAttribute("disabled")})}update(e){super.update(e),e.has("disabled")&&(this.tabIndex=this.disabled?-1:0,this.disableSlottedChildren(this.disabled))}render(){return u`
|
1831
1831
|
<div part="leading">
|
1832
1832
|
<slot name="leading-controls"></slot>
|
1833
1833
|
<div part="leading-text">
|
1834
|
-
${this.getText("leading-text-primary-label",
|
1835
|
-
${this.getText("leading-text-secondary-label",
|
1836
|
-
${this.getText("leading-text-tertiary-label",
|
1834
|
+
${this.getText("leading-text-primary-label",C.BODY_MIDSIZE_REGULAR,this.label)}
|
1835
|
+
${this.getText("leading-text-secondary-label",C.BODY_SMALL_REGULAR,this.secondaryLabel)}
|
1836
|
+
${this.getText("leading-text-tertiary-label",C.BODY_SMALL_REGULAR,this.tertiaryLabel)}
|
1837
1837
|
</div>
|
1838
1838
|
</div>
|
1839
1839
|
<div part="trailing">
|
1840
1840
|
<div part="trailing-text">
|
1841
|
-
${this.getText("trailing-text-side-header",
|
1842
|
-
${this.getText("trailing-text-subline",
|
1841
|
+
${this.getText("trailing-text-side-header",C.BODY_MIDSIZE_REGULAR,this.sideHeaderText)}
|
1842
|
+
${this.getText("trailing-text-subline",C.BODY_SMALL_REGULAR,this.sublineText)}
|
1843
1843
|
</div>
|
1844
1844
|
<slot name="trailing-controls"></slot>
|
1845
1845
|
</div>
|
1846
|
-
`}};
|
1846
|
+
`}};te.styles=[...E.styles,...Bs],c([Ft({slot:"leading-controls"})],te.prototype,"leadingControlsSlot",2),c([Ft({slot:"trailing-controls"})],te.prototype,"trailingControlsSlot",2),c([d({type:String,reflect:!0})],te.prototype,"variant",2),c([d({type:String,reflect:!0})],te.prototype,"label",2),c([d({type:String,reflect:!0,attribute:"secondary-label"})],te.prototype,"secondaryLabel",2),c([d({type:String,reflect:!0,attribute:"tertiary-label"})],te.prototype,"tertiaryLabel",2),c([d({type:String,reflect:!0,attribute:"side-header-text"})],te.prototype,"sideHeaderText",2),c([d({type:String,reflect:!0,attribute:"subline-text"})],te.prototype,"sublineText",2);var Yo=te;Yo.register(Hr);var rl=Yo;var ol=g`
|
1847
1847
|
:host {
|
1848
1848
|
--mdc-marker-width: 0.25rem;
|
1849
1849
|
--mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);
|
@@ -1868,7 +1868,7 @@
|
|
1868
1868
|
var(--mdc-marker-striped-background-color) 0.375rem
|
1869
1869
|
);
|
1870
1870
|
}
|
1871
|
-
`,Hn=[ja];var Fn=x.constructTagName("marker"),Bn={SOLID:"solid",STRIPED:"striped"};var er=class extends E{constructor(){super(...arguments);this.variant=Bn.SOLID}};er.styles=[...E.styles,...Hn],c([d({type:String,reflect:!0})],er.prototype,"variant",2);var Bo=er;Bo.register(Fn);var Ka=Bo;var ge=Math.min,G=Math.max,rr=Math.round,or=Math.floor,ie=o=>({x:o,y:o}),Qa={left:"right",right:"left",bottom:"top",top:"bottom"},Ja={start:"end",end:"start"};function Ur(o,t,e){return G(o,ge(t,e))}function rt(o,t){return typeof o=="function"?o(t):o}function Ie(o){return o.split("-")[0]}function ot(o){return o.split("-")[1]}function Go(o){return o==="x"?"y":"x"}function Vr(o){return o==="y"?"height":"width"}function Be(o){return["top","bottom"].includes(Ie(o))?"y":"x"}function Hr(o){return Go(Be(o))}function Gn(o,t,e){e===void 0&&(e=!1);let r=ot(o),i=Hr(o),n=Vr(i),s=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=tr(s)),[s,tr(s)]}function qn(o){let t=tr(o);return[Pr(o),t,Pr(t)]}function Pr(o){return o.replace(/start|end/g,t=>Ja[t])}function el(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 Yn(o,t,e,r){let i=ot(o),n=el(Ie(o),e==="start",r);return i&&(n=n.map(s=>s+"-"+i),t&&(n=n.concat(n.map(Pr)))),n}function tr(o){return o.replace(/left|right|bottom|top/g,t=>Qa[t])}function tl(o){return{top:0,right:0,bottom:0,left:0,...o}}function qo(o){return typeof o!="number"?tl(o):{top:o,right:o,bottom:o,left:o}}function it(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 Wn(o,t,e){let{reference:r,floating:i}=o,n=Be(t),s=Hr(t),a=Vr(s),l=Ie(t),m=n==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,v=r[a]/2-i[a]/2,f;switch(l){case"top":f={x:h,y:r.y-i.height};break;case"bottom":f={x:h,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-i.width,y:p};break;default:f={x:r.x,y:r.y}}switch(ot(t)){case"start":f[s]-=v*(e&&m?-1:1);break;case"end":f[s]+=v*(e&&m?-1:1);break}return f}var Xn=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:h,y:p}=Wn(m,r,l),v=r,f={},y=0;for(let T=0;T<a.length;T++){let{name:S,fn:A}=a[T],{x:_,y:C,data:$,reset:z}=await A({x:h,y:p,initialPlacement:r,placement:v,strategy:i,middlewareData:f,rects:m,platform:s,elements:{reference:o,floating:t}});h=_!=null?_:h,p=C!=null?C:p,f={...f,[S]:{...f[S],...$}},z&&y<=50&&(y++,typeof z=="object"&&(z.placement&&(v=z.placement),z.rects&&(m=z.rects===!0?await s.getElementRects({reference:o,floating:t,strategy:i}):z.rects),{x:h,y:p}=Wn(m,v,l)),T=-1)}return{x:h,y:p,placement:v,strategy:i,middlewareData:f}};async function Fr(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:h="viewport",elementContext:p="floating",altBoundary:v=!1,padding:f=0}=rt(t,o),y=qo(f),S=a[v?p==="floating"?"reference":"floating":p],A=it(await n.getClippingRect({element:(e=await(n.isElement==null?void 0:n.isElement(S)))==null||e?S:S.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:m,rootBoundary:h,strategy:l})),_=p==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,C=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),$=await(n.isElement==null?void 0:n.isElement(C))?await(n.getScale==null?void 0:n.getScale(C))||{x:1,y:1}:{x:1,y:1},z=it(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:C,strategy:l}):_);return{top:(A.top-z.top+y.top)/$.y,bottom:(z.bottom-A.bottom+y.bottom)/$.y,left:(A.left-z.left+y.left)/$.x,right:(z.right-A.right+y.right)/$.x}}var Zn=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:h=0}=rt(o,t)||{};if(m==null)return{};let p=qo(h),v={x:e,y:r},f=Hr(i),y=Vr(f),T=await s.getDimensions(m),S=f==="y",A=S?"top":"left",_=S?"bottom":"right",C=S?"clientHeight":"clientWidth",$=n.reference[y]+n.reference[f]-v[f]-n.floating[y],z=v[f]-n.reference[f],Z=await(s.getOffsetParent==null?void 0:s.getOffsetParent(m)),re=Z?Z[C]:0;(!re||!await(s.isElement==null?void 0:s.isElement(Z)))&&(re=a.floating[C]||n.floating[y]);let ve=$/2-z/2,ae=re/2-T[y]/2-1,oe=ge(p[A],ae),Ce=ge(p[_],ae),le=oe,ke=re-T[y]-Ce,F=re/2-T[y]/2+ve,ut=Ur(le,F,ke),be=!l.arrow&&ot(i)!=null&&F!==ut&&n.reference[y]/2-(F<le?oe:Ce)-T[y]/2<0,ce=be?F<le?F-le:F-ke:0;return{[f]:v[f]+ce,data:{[f]:ut,centerOffset:F-ut-ce,...be&&{alignmentOffset:ce}},reset:be}}});var jn=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:h=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:T=!0,...S}=rt(o,t);if((e=n.arrow)!=null&&e.alignmentOffset)return{};let A=Ie(i),_=Be(a),C=Ie(a)===a,$=await(l.isRTL==null?void 0:l.isRTL(m.floating)),z=v||(C||!T?[tr(a)]:qn(a)),Z=y!=="none";!v&&Z&&z.push(...Yn(a,T,y,$));let re=[a,...z],ve=await Fr(t,S),ae=[],oe=((r=n.flip)==null?void 0:r.overflows)||[];if(h&&ae.push(ve[A]),p){let F=Gn(i,s,$);ae.push(ve[F[0]],ve[F[1]])}if(oe=[...oe,{placement:i,overflows:ae}],!ae.every(F=>F<=0)){var Ce,le;let F=(((Ce=n.flip)==null?void 0:Ce.index)||0)+1,ut=re[F];if(ut)return{data:{index:F,overflows:oe},reset:{placement:ut}};let be=(le=oe.filter(ce=>ce.overflows[0]<=0).sort((ce,Re)=>ce.overflows[1]-Re.overflows[1])[0])==null?void 0:le.placement;if(!be)switch(f){case"bestFit":{var ke;let ce=(ke=oe.filter(Re=>{if(Z){let Le=Be(Re.placement);return Le===_||Le==="y"}return!0}).map(Re=>[Re.placement,Re.overflows.filter(Le=>Le>0).reduce((Le,Ys)=>Le+Ys,0)]).sort((Re,Le)=>Re[1]-Le[1])[0])==null?void 0:ke[0];ce&&(be=ce);break}case"initialPlacement":be=a;break}if(i!==be)return{reset:{placement:be}}}return{}}}};async function rl(o,t){let{placement:e,platform:r,elements:i}=o,n=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Ie(e),a=ot(e),l=Be(e)==="y",m=["left","top"].includes(s)?-1:1,h=n&&l?-1:1,p=rt(t,o),{mainAxis:v,crossAxis:f,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof y=="number"&&(f=a==="end"?y*-1:y),l?{x:f*h,y:v*m}:{x:v*m,y:f*h}}var Kn=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 rl(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}}}}},Qn=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:S=>{let{x:A,y:_}=S;return{x:A,y:_}}},...l}=rt(o,t),m={x:e,y:r},h=await Fr(t,l),p=Be(Ie(i)),v=Go(p),f=m[v],y=m[p];if(n){let S=v==="y"?"top":"left",A=v==="y"?"bottom":"right",_=f+h[S],C=f-h[A];f=Ur(_,f,C)}if(s){let S=p==="y"?"top":"left",A=p==="y"?"bottom":"right",_=y+h[S],C=y-h[A];y=Ur(_,y,C)}let T=a.fn({...t,[v]:f,[p]:y});return{...T,data:{x:T.x-e,y:T.y-r,enabled:{[v]:n,[p]:s}}}}}};var Jn=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}=rt(o,t),h=await Fr(t,m),p=Ie(i),v=ot(i),f=Be(i)==="y",{width:y,height:T}=n.floating,S,A;p==="top"||p==="bottom"?(S=p,A=v===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(A=p,S=v==="end"?"top":"bottom");let _=T-h.top-h.bottom,C=y-h.left-h.right,$=ge(T-h[S],_),z=ge(y-h[A],C),Z=!t.middlewareData.shift,re=$,ve=z;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(ve=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(re=_),Z&&!v){let oe=G(h.left,0),Ce=G(h.right,0),le=G(h.top,0),ke=G(h.bottom,0);f?ve=y-2*(oe!==0||Ce!==0?oe+Ce:G(h.left,h.right)):re=T-2*(le!==0||ke!==0?le+ke:G(h.top,h.bottom))}await l({...t,availableWidth:ve,availableHeight:re});let ae=await s.getDimensions(a.floating);return y!==ae.width||T!==ae.height?{reset:{rects:!0}}:{}}}};function Br(){return typeof window<"u"}function nt(o){return ts(o)?(o.nodeName||"").toLowerCase():"#document"}function W(o){var t;return(o==null||(t=o.ownerDocument)==null?void 0:t.defaultView)||window}function ne(o){var t;return(t=(ts(o)?o.ownerDocument:o.document)||window.document)==null?void 0:t.documentElement}function ts(o){return Br()?o instanceof Node||o instanceof W(o).Node:!1}function ee(o){return Br()?o instanceof Element||o instanceof W(o).Element:!1}function se(o){return Br()?o instanceof HTMLElement||o instanceof W(o).HTMLElement:!1}function es(o){return!Br()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof W(o).ShadowRoot}function Ct(o){let{overflow:t,overflowX:e,overflowY:r,display:i}=te(o);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!["inline","contents"].includes(i)}function rs(o){return["table","td","th"].includes(nt(o))}function ir(o){return[":popover-open",":modal"].some(t=>{try{return o.matches(t)}catch{return!1}})}function Gr(o){let t=qr(),e=ee(o)?te(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 os(o){let t=we(o);for(;se(t)&&!st(t);){if(Gr(t))return t;if(ir(t))return null;t=we(t)}return null}function qr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function st(o){return["html","body","#document"].includes(nt(o))}function te(o){return W(o).getComputedStyle(o)}function nr(o){return ee(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function we(o){if(nt(o)==="html")return o;let t=o.assignedSlot||o.parentNode||es(o)&&o.host||ne(o);return es(t)?t.host:t}function is(o){let t=we(o);return st(t)?o.ownerDocument?o.ownerDocument.body:o.body:se(t)&&Ct(t)?t:is(t)}function wt(o,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=is(o),n=i===((r=o.ownerDocument)==null?void 0:r.body),s=W(i);if(n){let a=Yr(s);return t.concat(s,s.visualViewport||[],Ct(i)?i:[],a&&e?wt(a):[])}return t.concat(i,wt(i,[],e))}function Yr(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function as(o){let t=te(o),e=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=se(o),n=i?o.offsetWidth:e,s=i?o.offsetHeight:r,a=rr(e)!==n||rr(r)!==s;return a&&(e=n,r=s),{width:e,height:r,$:a}}function Wo(o){return ee(o)?o:o.contextElement}function kt(o){let t=Wo(o);if(!se(t))return ie(1);let e=t.getBoundingClientRect(),{width:r,height:i,$:n}=as(t),s=(n?rr(e.width):e.width)/r,a=(n?rr(e.height):e.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var ol=ie(0);function ls(o){let t=W(o);return!qr()||!t.visualViewport?ol:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function il(o,t,e){return t===void 0&&(t=!1),!e||t&&e!==W(o)?!1:t}function at(o,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=o.getBoundingClientRect(),n=Wo(o),s=ie(1);t&&(r?ee(r)&&(s=kt(r)):s=kt(o));let a=il(n,e,r)?ls(n):ie(0),l=(i.left+a.x)/s.x,m=(i.top+a.y)/s.y,h=i.width/s.x,p=i.height/s.y;if(n){let v=W(n),f=r&&ee(r)?W(r):r,y=v,T=Yr(y);for(;T&&r&&f!==y;){let S=kt(T),A=T.getBoundingClientRect(),_=te(T),C=A.left+(T.clientLeft+parseFloat(_.paddingLeft))*S.x,$=A.top+(T.clientTop+parseFloat(_.paddingTop))*S.y;l*=S.x,m*=S.y,h*=S.x,p*=S.y,l+=C,m+=$,y=W(T),T=Yr(y)}}return it({width:h,height:p,x:l,y:m})}function Xo(o,t){let e=nr(o).scrollLeft;return t?t.left+e:at(ne(o)).left+e}function cs(o,t,e){e===void 0&&(e=!1);let r=o.getBoundingClientRect(),i=r.left+t.scrollLeft-(e?0:Xo(o,r)),n=r.top+t.scrollTop;return{x:i,y:n}}function nl(o){let{elements:t,rect:e,offsetParent:r,strategy:i}=o,n=i==="fixed",s=ne(r),a=t?ir(t.floating):!1;if(r===s||a&&n)return e;let l={scrollLeft:0,scrollTop:0},m=ie(1),h=ie(0),p=se(r);if((p||!p&&!n)&&((nt(r)!=="body"||Ct(s))&&(l=nr(r)),se(r))){let f=at(r);m=kt(r),h.x=f.x+r.clientLeft,h.y=f.y+r.clientTop}let v=s&&!p&&!n?cs(s,l,!0):ie(0);return{width:e.width*m.x,height:e.height*m.y,x:e.x*m.x-l.scrollLeft*m.x+h.x+v.x,y:e.y*m.y-l.scrollTop*m.y+h.y+v.y}}function sl(o){return Array.from(o.getClientRects())}function al(o){let t=ne(o),e=nr(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+Xo(o),a=-e.scrollTop;return te(r).direction==="rtl"&&(s+=G(t.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:a}}function ll(o,t){let e=W(o),r=ne(o),i=e.visualViewport,n=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){n=i.width,s=i.height;let m=qr();(!m||m&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:n,height:s,x:a,y:l}}function cl(o,t){let e=at(o,!0,t==="fixed"),r=e.top+o.clientTop,i=e.left+o.clientLeft,n=se(o)?kt(o):ie(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 ns(o,t,e){let r;if(t==="viewport")r=ll(o,e);else if(t==="document")r=al(ne(o));else if(ee(t))r=cl(t,e);else{let i=ls(o);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return it(r)}function ds(o,t){let e=we(o);return e===t||!ee(e)||st(e)?!1:te(e).position==="fixed"||ds(e,t)}function dl(o,t){let e=t.get(o);if(e)return e;let r=wt(o,[],!1).filter(a=>ee(a)&&nt(a)!=="body"),i=null,n=te(o).position==="fixed",s=n?we(o):o;for(;ee(s)&&!st(s);){let a=te(s),l=Gr(s);!l&&a.position==="fixed"&&(i=null),(n?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ct(s)&&!l&&ds(o,s))?r=r.filter(h=>h!==s):i=a,s=we(s)}return t.set(o,r),r}function ml(o){let{element:t,boundary:e,rootBoundary:r,strategy:i}=o,s=[...e==="clippingAncestors"?ir(t)?[]:dl(t,this._c):[].concat(e),r],a=s[0],l=s.reduce((m,h)=>{let p=ns(t,h,i);return m.top=G(p.top,m.top),m.right=ge(p.right,m.right),m.bottom=ge(p.bottom,m.bottom),m.left=G(p.left,m.left),m},ns(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hl(o){let{width:t,height:e}=as(o);return{width:t,height:e}}function pl(o,t,e){let r=se(t),i=ne(t),n=e==="fixed",s=at(o,!0,n,t),a={scrollLeft:0,scrollTop:0},l=ie(0);if(r||!r&&!n)if((nt(t)!=="body"||Ct(i))&&(a=nr(t)),r){let v=at(t,!0,n,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else i&&(l.x=Xo(i));let m=i&&!r&&!n?cs(i,a):ie(0),h=s.left+a.scrollLeft-l.x-m.x,p=s.top+a.scrollTop-l.y-m.y;return{x:h,y:p,width:s.width,height:s.height}}function Yo(o){return te(o).position==="static"}function ss(o,t){if(!se(o)||te(o).position==="fixed")return null;if(t)return t(o);let e=o.offsetParent;return ne(o)===e&&(e=e.ownerDocument.body),e}function ms(o,t){let e=W(o);if(ir(o))return e;if(!se(o)){let i=we(o);for(;i&&!st(i);){if(ee(i)&&!Yo(i))return i;i=we(i)}return e}let r=ss(o,t);for(;r&&rs(r)&&Yo(r);)r=ss(r,t);return r&&st(r)&&Yo(r)&&!Gr(r)?e:r||os(o)||e}var ul=async function(o){let t=this.getOffsetParent||ms,e=this.getDimensions,r=await e(o.floating);return{reference:pl(o.reference,await t(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fl(o){return te(o).direction==="rtl"}var gl={convertOffsetParentRelativeRectToViewportRelativeRect:nl,getDocumentElement:ne,getClippingRect:ml,getOffsetParent:ms,getElementRects:ul,getClientRects:sl,getDimensions:hl,getScale:kt,isElement:ee,isRTL:fl};function vl(o,t){let e=null,r,i=ne(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:h,width:p,height:v}=o.getBoundingClientRect();if(a||t(),!p||!v)return;let f=or(h),y=or(i.clientWidth-(m+p)),T=or(i.clientHeight-(h+v)),S=or(m),_={rootMargin:-f+"px "+-y+"px "+-T+"px "+-S+"px",threshold:G(0,ge(1,l))||1},C=!0;function $(z){let Z=z[0].intersectionRatio;if(Z!==l){if(!C)return s();Z?s(!1,Z):r=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{e=new IntersectionObserver($,{..._,root:i.ownerDocument})}catch{e=new IntersectionObserver($,_)}e.observe(o)}return s(!0),n}function hs(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=Wo(o),h=i||n?[...m?wt(m):[],...wt(t)]:[];h.forEach(A=>{i&&A.addEventListener("scroll",e,{passive:!0}),n&&A.addEventListener("resize",e)});let p=m&&a?vl(m,e):null,v=-1,f=null;s&&(f=new ResizeObserver(A=>{let[_]=A;_&&_.target===m&&f&&(f.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=f)==null||C.observe(t)})),e()}),m&&!l&&f.observe(m),f.observe(t));let y,T=l?at(o):null;l&&S();function S(){let A=at(o);T&&(A.x!==T.x||A.y!==T.y||A.width!==T.width||A.height!==T.height)&&e(),T=A,y=requestAnimationFrame(S)}return e(),()=>{var A;h.forEach(_=>{i&&_.removeEventListener("scroll",e),n&&_.removeEventListener("resize",e)}),p==null||p(),(A=f)==null||A.disconnect(),f=null,l&&cancelAnimationFrame(y)}}var ps=Kn;var us=Qn,fs=jn,gs=Jn;var vs=Zn;var bs=(o,t,e)=>{let r=new Map,i={platform:gl,...e},n={...i.platform,_c:r};return Xn(o,t,{...i,platform:n})};var bl=g`
|
1871
|
+
`,Gs=[ol];var qs=y.constructTagName("marker"),Ys={SOLID:"solid",STRIPED:"striped"};var rr=class extends E{constructor(){super(...arguments);this.variant=Ys.SOLID}};rr.styles=[...E.styles,...Gs],c([d({type:String,reflect:!0})],rr.prototype,"variant",2);var Wo=rr;Wo.register(qs);var il=Wo;var ye=Math.min,Y=Math.max,ir=Math.round,sr=Math.floor,ae=o=>({x:o,y:o}),sl={left:"right",right:"left",bottom:"top",top:"bottom"},nl={start:"end",end:"start"};function Br(o,t,e){return Y(o,ye(t,e))}function it(o,t){return typeof o=="function"?o(t):o}function Re(o){return o.split("-")[0]}function st(o){return o.split("-")[1]}function Xo(o){return o==="x"?"y":"x"}function Gr(o){return o==="y"?"height":"width"}function Ye(o){return["top","bottom"].includes(Re(o))?"y":"x"}function qr(o){return Xo(Ye(o))}function Ws(o,t,e){e===void 0&&(e=!1);let r=st(o),i=qr(o),s=Gr(i),n=i==="x"?r===(e?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(n=or(n)),[n,or(n)]}function Xs(o){let t=or(o);return[Fr(o),t,Fr(t)]}function Fr(o){return o.replace(/start|end/g,t=>nl[t])}function al(o,t,e){let r=["left","right"],i=["right","left"],s=["top","bottom"],n=["bottom","top"];switch(o){case"top":case"bottom":return e?t?i:r:t?r:i;case"left":case"right":return t?s:n;default:return[]}}function Zs(o,t,e,r){let i=st(o),s=al(Re(o),e==="start",r);return i&&(s=s.map(n=>n+"-"+i),t&&(s=s.concat(s.map(Fr)))),s}function or(o){return o.replace(/left|right|bottom|top/g,t=>sl[t])}function ll(o){return{top:0,right:0,bottom:0,left:0,...o}}function Zo(o){return typeof o!="number"?ll(o):{top:o,right:o,bottom:o,left:o}}function nt(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 js(o,t,e){let{reference:r,floating:i}=o,s=Ye(t),n=qr(t),a=Gr(n),l=Re(t),m=s==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,b=r[a]/2-i[a]/2,f;switch(l){case"top":f={x:h,y:r.y-i.height};break;case"bottom":f={x:h,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:p};break;case"left":f={x:r.x-i.width,y:p};break;default:f={x:r.x,y:r.y}}switch(st(t)){case"start":f[n]-=b*(e&&m?-1:1);break;case"end":f[n]+=b*(e&&m?-1:1);break}return f}var Ks=async(o,t,e)=>{let{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:n}=e,a=s.filter(Boolean),l=await(n.isRTL==null?void 0:n.isRTL(t)),m=await n.getElementRects({reference:o,floating:t,strategy:i}),{x:h,y:p}=js(m,r,l),b=r,f={},x=0;for(let T=0;T<a.length;T++){let{name:_,fn:S}=a[T],{x:I,y:k,data:P,reset:z}=await S({x:h,y:p,initialPlacement:r,placement:b,strategy:i,middlewareData:f,rects:m,platform:n,elements:{reference:o,floating:t}});h=I!=null?I:h,p=k!=null?k:p,f={...f,[_]:{...f[_],...P}},z&&x<=50&&(x++,typeof z=="object"&&(z.placement&&(b=z.placement),z.rects&&(m=z.rects===!0?await n.getElementRects({reference:o,floating:t,strategy:i}):z.rects),{x:h,y:p}=js(m,b,l)),T=-1)}return{x:h,y:p,placement:b,strategy:i,middlewareData:f}};async function Yr(o,t){var e;t===void 0&&(t={});let{x:r,y:i,platform:s,rects:n,elements:a,strategy:l}=o,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:b=!1,padding:f=0}=it(t,o),x=Zo(f),_=a[b?p==="floating"?"reference":"floating":p],S=nt(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(_)))==null||e?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:m,rootBoundary:h,strategy:l})),I=p==="floating"?{x:r,y:i,width:n.floating.width,height:n.floating.height}:n.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),P=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},z=nt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:I,offsetParent:k,strategy:l}):I);return{top:(S.top-z.top+x.top)/P.y,bottom:(z.bottom-S.bottom+x.bottom)/P.y,left:(S.left-z.left+x.left)/P.x,right:(z.right-S.right+x.right)/P.x}}var Qs=o=>({name:"arrow",options:o,async fn(t){let{x:e,y:r,placement:i,rects:s,platform:n,elements:a,middlewareData:l}=t,{element:m,padding:h=0}=it(o,t)||{};if(m==null)return{};let p=Zo(h),b={x:e,y:r},f=qr(i),x=Gr(f),T=await n.getDimensions(m),_=f==="y",S=_?"top":"left",I=_?"bottom":"right",k=_?"clientHeight":"clientWidth",P=s.reference[x]+s.reference[f]-b[f]-s.floating[x],z=b[f]-s.reference[f],j=await(n.getOffsetParent==null?void 0:n.getOffsetParent(m)),ie=j?j[k]:0;(!ie||!await(n.isElement==null?void 0:n.isElement(j)))&&(ie=a.floating[k]||s.floating[x]);let xe=P/2-z/2,de=ie/2-T[x]/2-1,se=ye(p[S],de),Ne=ye(p[I],de),me=se,Oe=ie-T[x]-Ne,G=ie/2-T[x]/2+xe,vt=Br(me,G,Oe),Ee=!l.arrow&&st(i)!=null&&G!==vt&&s.reference[x]/2-(G<me?se:Ne)-T[x]/2<0,he=Ee?G<me?G-me:G-Oe:0;return{[f]:b[f]+he,data:{[f]:vt,centerOffset:G-vt-he,...Ee&&{alignmentOffset:he}},reset:Ee}}});var Js=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(t){var e,r;let{placement:i,middlewareData:s,rects:n,initialPlacement:a,platform:l,elements:m}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:T=!0,..._}=it(o,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let S=Re(i),I=Ye(a),k=Re(a)===a,P=await(l.isRTL==null?void 0:l.isRTL(m.floating)),z=b||(k||!T?[or(a)]:Xs(a)),j=x!=="none";!b&&j&&z.push(...Zs(a,T,x,P));let ie=[a,...z],xe=await Yr(t,_),de=[],se=((r=s.flip)==null?void 0:r.overflows)||[];if(h&&de.push(xe[S]),p){let G=Ws(i,n,P);de.push(xe[G[0]],xe[G[1]])}if(se=[...se,{placement:i,overflows:de}],!de.every(G=>G<=0)){var Ne,me;let G=(((Ne=s.flip)==null?void 0:Ne.index)||0)+1,vt=ie[G];if(vt)return{data:{index:G,overflows:se},reset:{placement:vt}};let Ee=(me=se.filter(he=>he.overflows[0]<=0).sort((he,ze)=>he.overflows[1]-ze.overflows[1])[0])==null?void 0:me.placement;if(!Ee)switch(f){case"bestFit":{var Oe;let he=(Oe=se.filter(ze=>{if(j){let Me=Ye(ze.placement);return Me===I||Me==="y"}return!0}).map(ze=>[ze.placement,ze.overflows.filter(Me=>Me>0).reduce((Me,Jn)=>Me+Jn,0)]).sort((ze,Me)=>ze[1]-Me[1])[0])==null?void 0:Oe[0];he&&(Ee=he);break}case"initialPlacement":Ee=a;break}if(i!==Ee)return{reset:{placement:Ee}}}return{}}}};async function cl(o,t){let{placement:e,platform:r,elements:i}=o,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),n=Re(e),a=st(e),l=Ye(e)==="y",m=["left","top"].includes(n)?-1:1,h=s&&l?-1:1,p=it(t,o),{mainAxis:b,crossAxis:f,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof x=="number"&&(f=a==="end"?x*-1:x),l?{x:f*h,y:b*m}:{x:b*m,y:f*h}}var en=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(t){var e,r;let{x:i,y:s,placement:n,middlewareData:a}=t,l=await cl(t,o);return n===((e=a.offset)==null?void 0:e.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:n}}}}},tn=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(t){let{x:e,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:n=!1,limiter:a={fn:_=>{let{x:S,y:I}=_;return{x:S,y:I}}},...l}=it(o,t),m={x:e,y:r},h=await Yr(t,l),p=Ye(Re(i)),b=Xo(p),f=m[b],x=m[p];if(s){let _=b==="y"?"top":"left",S=b==="y"?"bottom":"right",I=f+h[_],k=f-h[S];f=Br(I,f,k)}if(n){let _=p==="y"?"top":"left",S=p==="y"?"bottom":"right",I=x+h[_],k=x-h[S];x=Br(I,x,k)}let T=a.fn({...t,[b]:f,[p]:x});return{...T,data:{x:T.x-e,y:T.y-r,enabled:{[b]:s,[p]:n}}}}}};var rn=function(o){return o===void 0&&(o={}),{name:"size",options:o,async fn(t){var e,r;let{placement:i,rects:s,platform:n,elements:a}=t,{apply:l=()=>{},...m}=it(o,t),h=await Yr(t,m),p=Re(i),b=st(i),f=Ye(i)==="y",{width:x,height:T}=s.floating,_,S;p==="top"||p==="bottom"?(_=p,S=b===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(S=p,_=b==="end"?"top":"bottom");let I=T-h.top-h.bottom,k=x-h.left-h.right,P=ye(T-h[_],I),z=ye(x-h[S],k),j=!t.middlewareData.shift,ie=P,xe=z;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(xe=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(ie=I),j&&!b){let se=Y(h.left,0),Ne=Y(h.right,0),me=Y(h.top,0),Oe=Y(h.bottom,0);f?xe=x-2*(se!==0||Ne!==0?se+Ne:Y(h.left,h.right)):ie=T-2*(me!==0||Oe!==0?me+Oe:Y(h.top,h.bottom))}await l({...t,availableWidth:xe,availableHeight:ie});let de=await n.getDimensions(a.floating);return x!==de.width||T!==de.height?{reset:{rects:!0}}:{}}}};function Wr(){return typeof window<"u"}function at(o){return sn(o)?(o.nodeName||"").toLowerCase():"#document"}function X(o){var t;return(o==null||(t=o.ownerDocument)==null?void 0:t.defaultView)||window}function le(o){var t;return(t=(sn(o)?o.ownerDocument:o.document)||window.document)==null?void 0:t.documentElement}function sn(o){return Wr()?o instanceof Node||o instanceof X(o).Node:!1}function re(o){return Wr()?o instanceof Element||o instanceof X(o).Element:!1}function ce(o){return Wr()?o instanceof HTMLElement||o instanceof X(o).HTMLElement:!1}function on(o){return!Wr()||typeof ShadowRoot>"u"?!1:o instanceof ShadowRoot||o instanceof X(o).ShadowRoot}function Rt(o){let{overflow:t,overflowX:e,overflowY:r,display:i}=oe(o);return/auto|scroll|overlay|hidden|clip/.test(t+r+e)&&!["inline","contents"].includes(i)}function nn(o){return["table","td","th"].includes(at(o))}function nr(o){return[":popover-open",":modal"].some(t=>{try{return o.matches(t)}catch{return!1}})}function Xr(o){let t=Zr(),e=re(o)?oe(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 an(o){let t=Le(o);for(;ce(t)&&!lt(t);){if(Xr(t))return t;if(nr(t))return null;t=Le(t)}return null}function Zr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lt(o){return["html","body","#document"].includes(at(o))}function oe(o){return X(o).getComputedStyle(o)}function ar(o){return re(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.scrollX,scrollTop:o.scrollY}}function Le(o){if(at(o)==="html")return o;let t=o.assignedSlot||o.parentNode||on(o)&&o.host||le(o);return on(t)?t.host:t}function ln(o){let t=Le(o);return lt(t)?o.ownerDocument?o.ownerDocument.body:o.body:ce(t)&&Rt(t)?t:ln(t)}function kt(o,t,e){var r;t===void 0&&(t=[]),e===void 0&&(e=!0);let i=ln(o),s=i===((r=o.ownerDocument)==null?void 0:r.body),n=X(i);if(s){let a=jr(n);return t.concat(n,n.visualViewport||[],Rt(i)?i:[],a&&e?kt(a):[])}return t.concat(i,kt(i,[],e))}function jr(o){return o.parent&&Object.getPrototypeOf(o.parent)?o.frameElement:null}function mn(o){let t=oe(o),e=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ce(o),s=i?o.offsetWidth:e,n=i?o.offsetHeight:r,a=ir(e)!==s||ir(r)!==n;return a&&(e=s,r=n),{width:e,height:r,$:a}}function Ko(o){return re(o)?o:o.contextElement}function Lt(o){let t=Ko(o);if(!ce(t))return ae(1);let e=t.getBoundingClientRect(),{width:r,height:i,$:s}=mn(t),n=(s?ir(e.width):e.width)/r,a=(s?ir(e.height):e.height)/i;return(!n||!Number.isFinite(n))&&(n=1),(!a||!Number.isFinite(a))&&(a=1),{x:n,y:a}}var dl=ae(0);function hn(o){let t=X(o);return!Zr()||!t.visualViewport?dl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ml(o,t,e){return t===void 0&&(t=!1),!e||t&&e!==X(o)?!1:t}function ct(o,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=!1);let i=o.getBoundingClientRect(),s=Ko(o),n=ae(1);t&&(r?re(r)&&(n=Lt(r)):n=Lt(o));let a=ml(s,e,r)?hn(s):ae(0),l=(i.left+a.x)/n.x,m=(i.top+a.y)/n.y,h=i.width/n.x,p=i.height/n.y;if(s){let b=X(s),f=r&&re(r)?X(r):r,x=b,T=jr(x);for(;T&&r&&f!==x;){let _=Lt(T),S=T.getBoundingClientRect(),I=oe(T),k=S.left+(T.clientLeft+parseFloat(I.paddingLeft))*_.x,P=S.top+(T.clientTop+parseFloat(I.paddingTop))*_.y;l*=_.x,m*=_.y,h*=_.x,p*=_.y,l+=k,m+=P,x=X(T),T=jr(x)}}return nt({width:h,height:p,x:l,y:m})}function Qo(o,t){let e=ar(o).scrollLeft;return t?t.left+e:ct(le(o)).left+e}function pn(o,t,e){e===void 0&&(e=!1);let r=o.getBoundingClientRect(),i=r.left+t.scrollLeft-(e?0:Qo(o,r)),s=r.top+t.scrollTop;return{x:i,y:s}}function hl(o){let{elements:t,rect:e,offsetParent:r,strategy:i}=o,s=i==="fixed",n=le(r),a=t?nr(t.floating):!1;if(r===n||a&&s)return e;let l={scrollLeft:0,scrollTop:0},m=ae(1),h=ae(0),p=ce(r);if((p||!p&&!s)&&((at(r)!=="body"||Rt(n))&&(l=ar(r)),ce(r))){let f=ct(r);m=Lt(r),h.x=f.x+r.clientLeft,h.y=f.y+r.clientTop}let b=n&&!p&&!s?pn(n,l,!0):ae(0);return{width:e.width*m.x,height:e.height*m.y,x:e.x*m.x-l.scrollLeft*m.x+h.x+b.x,y:e.y*m.y-l.scrollTop*m.y+h.y+b.y}}function pl(o){return Array.from(o.getClientRects())}function ul(o){let t=le(o),e=ar(o),r=o.ownerDocument.body,i=Y(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Y(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),n=-e.scrollLeft+Qo(o),a=-e.scrollTop;return oe(r).direction==="rtl"&&(n+=Y(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:n,y:a}}function fl(o,t){let e=X(o),r=le(o),i=e.visualViewport,s=r.clientWidth,n=r.clientHeight,a=0,l=0;if(i){s=i.width,n=i.height;let m=Zr();(!m||m&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:n,x:a,y:l}}function gl(o,t){let e=ct(o,!0,t==="fixed"),r=e.top+o.clientTop,i=e.left+o.clientLeft,s=ce(o)?Lt(o):ae(1),n=o.clientWidth*s.x,a=o.clientHeight*s.y,l=i*s.x,m=r*s.y;return{width:n,height:a,x:l,y:m}}function cn(o,t,e){let r;if(t==="viewport")r=fl(o,e);else if(t==="document")r=ul(le(o));else if(re(t))r=gl(t,e);else{let i=hn(o);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nt(r)}function un(o,t){let e=Le(o);return e===t||!re(e)||lt(e)?!1:oe(e).position==="fixed"||un(e,t)}function vl(o,t){let e=t.get(o);if(e)return e;let r=kt(o,[],!1).filter(a=>re(a)&&at(a)!=="body"),i=null,s=oe(o).position==="fixed",n=s?Le(o):o;for(;re(n)&&!lt(n);){let a=oe(n),l=Xr(n);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Rt(n)&&!l&&un(o,n))?r=r.filter(h=>h!==n):i=a,n=Le(n)}return t.set(o,r),r}function bl(o){let{element:t,boundary:e,rootBoundary:r,strategy:i}=o,n=[...e==="clippingAncestors"?nr(t)?[]:vl(t,this._c):[].concat(e),r],a=n[0],l=n.reduce((m,h)=>{let p=cn(t,h,i);return m.top=Y(p.top,m.top),m.right=ye(p.right,m.right),m.bottom=ye(p.bottom,m.bottom),m.left=Y(p.left,m.left),m},cn(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yl(o){let{width:t,height:e}=mn(o);return{width:t,height:e}}function xl(o,t,e){let r=ce(t),i=le(t),s=e==="fixed",n=ct(o,!0,s,t),a={scrollLeft:0,scrollTop:0},l=ae(0);if(r||!r&&!s)if((at(t)!=="body"||Rt(i))&&(a=ar(t)),r){let b=ct(t,!0,s,t);l.x=b.x+t.clientLeft,l.y=b.y+t.clientTop}else i&&(l.x=Qo(i));let m=i&&!r&&!s?pn(i,a):ae(0),h=n.left+a.scrollLeft-l.x-m.x,p=n.top+a.scrollTop-l.y-m.y;return{x:h,y:p,width:n.width,height:n.height}}function jo(o){return oe(o).position==="static"}function dn(o,t){if(!ce(o)||oe(o).position==="fixed")return null;if(t)return t(o);let e=o.offsetParent;return le(o)===e&&(e=e.ownerDocument.body),e}function fn(o,t){let e=X(o);if(nr(o))return e;if(!ce(o)){let i=Le(o);for(;i&&!lt(i);){if(re(i)&&!jo(i))return i;i=Le(i)}return e}let r=dn(o,t);for(;r&&nn(r)&&jo(r);)r=dn(r,t);return r&<(r)&&jo(r)&&!Xr(r)?e:r||an(o)||e}var El=async function(o){let t=this.getOffsetParent||fn,e=this.getDimensions,r=await e(o.floating);return{reference:xl(o.reference,await t(o.floating),o.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tl(o){return oe(o).direction==="rtl"}var Al={convertOffsetParentRelativeRectToViewportRelativeRect:hl,getDocumentElement:le,getClippingRect:bl,getOffsetParent:fn,getElementRects:El,getClientRects:pl,getDimensions:yl,getScale:Lt,isElement:re,isRTL:Tl};function Sl(o,t){let e=null,r,i=le(o);function s(){var a;clearTimeout(r),(a=e)==null||a.disconnect(),e=null}function n(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();let{left:m,top:h,width:p,height:b}=o.getBoundingClientRect();if(a||t(),!p||!b)return;let f=sr(h),x=sr(i.clientWidth-(m+p)),T=sr(i.clientHeight-(h+b)),_=sr(m),I={rootMargin:-f+"px "+-x+"px "+-T+"px "+-_+"px",threshold:Y(0,ye(1,l))||1},k=!0;function P(z){let j=z[0].intersectionRatio;if(j!==l){if(!k)return n();j?n(!1,j):r=setTimeout(()=>{n(!1,1e-7)},1e3)}k=!1}try{e=new IntersectionObserver(P,{...I,root:i.ownerDocument})}catch{e=new IntersectionObserver(P,I)}e.observe(o)}return n(!0),s}function gn(o,t,e,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,m=Ko(o),h=i||s?[...m?kt(m):[],...kt(t)]:[];h.forEach(S=>{i&&S.addEventListener("scroll",e,{passive:!0}),s&&S.addEventListener("resize",e)});let p=m&&a?Sl(m,e):null,b=-1,f=null;n&&(f=new ResizeObserver(S=>{let[I]=S;I&&I.target===m&&f&&(f.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(t)})),e()}),m&&!l&&f.observe(m),f.observe(t));let x,T=l?ct(o):null;l&&_();function _(){let S=ct(o);T&&(S.x!==T.x||S.y!==T.y||S.width!==T.width||S.height!==T.height)&&e(),T=S,x=requestAnimationFrame(_)}return e(),()=>{var S;h.forEach(I=>{i&&I.removeEventListener("scroll",e),s&&I.removeEventListener("resize",e)}),p==null||p(),(S=f)==null||S.disconnect(),f=null,l&&cancelAnimationFrame(x)}}var vn=en;var bn=tn,yn=Js,xn=rn;var En=Qs;var Tn=(o,t,e)=>{let r=new Map,i={platform:Al,...e},s={...i.platform,_c:r};return Ks(o,t,{...i,platform:s})};var _l=g`
|
1872
1872
|
:host {
|
1873
1873
|
--mdc-popover-arrow-border-radius: 0.1875rem;
|
1874
1874
|
--mdc-popover-arrow-border: 0.0625rem solid var(--mds-color-theme-outline-secondary-normal);
|
@@ -1971,7 +1971,7 @@
|
|
1971
1971
|
border-top-right-radius: var(--mdc-popover-arrow-border-radius);
|
1972
1972
|
border-bottom-left-radius: 100%;
|
1973
1973
|
}
|
1974
|
-
`,
|
1974
|
+
`,An=[_l];var Sn=y.constructTagName("popover"),Jo={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"},ei={CLICK:"click",MOUSEENTER:"mouseenter",FOCUSIN:"focusin",MANUAL:"manual"},ti={TONAL:"tonal",CONTRAST:"contrast"},R={PLACEMENT:Jo.BOTTOM,TRIGGER:ei.CLICK,COLOR:ti.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,DISABLE_ARIA_EXPANDED:!1};var _n=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:s,height:n}=i.getBoundingClientRect(),{offsetWidth:a,offsetHeight:l}=i;return a+l+n+s===0}isNotVisible(i){return this.hasZeroDimensions(i)||this.hasNoClientRects(i)}hasHiddenStyle(i){let{display:s,opacity:n,visibility:a}=i.style;return s==="none"||n==="0"||a==="hidden"||a==="collapse"}hasComputedHidden(i){let s=getComputedStyle(i);return s.visibility==="hidden"||s.height==="0"||s.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,s=new Set){return i instanceof HTMLElement&&this.isFocusable(i)&&s.add(i),Array.from(i.children).forEach(a=>{let l=a;this.isFocusable(l)&&s.add(l),l.shadowRoot?this.findFocusable(l.shadowRoot,s):l.tagName==="SLOT"?l.assignedElements({flatten:!0}).forEach(h=>{h instanceof HTMLElement&&this.findFocusable(h,s)}):this.findFocusable(l,s)}),[...s]}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,s){let{length:n}=this.focusableElements,a=this.shouldWrapFocus();if(i===-1)return s>0?0:n-1;let l=i+s;return a?(l<0&&(l=n-1),l>=n&&(l=0)):(l<0&&(l=0),l>=n&&(l=n-1)),l}getDeepActiveElement(){var s;let i=document.activeElement||document.body;for(;i instanceof HTMLElement&&((s=i.shadowRoot)!=null&&s.activeElement);)i=i.shadowRoot.activeElement;return i||document.body}findElement(i){return this.focusableElements.findIndex(s=>this.isEqualFocusNode(i,s))}isEqualFocusNode(i,s){return i.nodeType>=0?s.isEqualNode(i)&&s===i:!1}trapFocus(i){if(this.focusableElements.length===0)return;let s=this.getDeepActiveElement(),n=this.findElement(s);i?this.focusTrapIndex=this.calculateNextIndex(n,-1):this.focusTrapIndex=this.calculateNextIndex(n,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 ri=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=[]}},dt=new ri;var mt=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 Kr=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){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=this.popover.offsetHeight||0,s=this.popover.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=`${i}px`,e.style.width=r,e.style.right=`calc(-1.5 * (${r}))`;break;case"right":e.style.height=`${i}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.toggleAttribute("aria-modal",this.popover.interactive),this.popover.interactive&&(this.popover.ariaLabel||(this.popover.ariaLabel=((t=this.popover.triggerElement)==null?void 0:t.ariaLabel)||((e=this.popover.triggerElement)==null?void 0:e.textContent)||""),this.popover.ariaLabelledby||(this.popover.ariaLabelledby=((r=this.popover.triggerElement)==null?void 0:r.id)||""))}updateArrowStyle(t,e){var h;if(!this.popover.arrowElement)return;let r=e.split("-")[0],i={top:"bottom",right:"left",bottom:"top",left:"right"}[r],{x:s,y:n}=t,a=this.popover.arrowElement.getBoundingClientRect(),l=(h=this.popover.arrowElement.offsetParent)==null?void 0:h.getBoundingClientRect();if(!this.arrowPixelChange){let p=l!=null&&l[i]?12-Math.abs(a[i]-l[i]):0;Math.round(p)===1?this.arrowPixelChange=!0:this.arrowPixelChange=!1}let m=this.arrowPixelChange?.5:0;this.popover.arrowElement.setAttribute("data-side",r),Object.assign(this.popover.arrowElement.style,{left:s!=null?`${s}px`:"",top:n!=null?`${n}px`:"",[i]:`${-this.popover.arrowElement.offsetHeight/2-m}px`})}updatePopoverStyle(t,e){Object.assign(this.popover.style,{left:`${t}px`,top:`${e}px`})}createBackdrop(){var t;if(!this.popover.backdropElement){let e=document.createElement("div");e.classList.add("popover-backdrop"),(t=this.popover.parentElement)==null||t.appendChild(e);let r=document.createElement("style");r.textContent=`
|
1975
1975
|
.popover-backdrop {
|
1976
1976
|
position: fixed;
|
1977
1977
|
top: 0;
|
@@ -1981,21 +1981,21 @@
|
|
1981
1981
|
background: transparent;
|
1982
1982
|
z-index: ${this.popover.zIndex-1};
|
1983
1983
|
}
|
1984
|
-
`,e.appendChild(r),this.popover.backdropElement=e}}};var w=class extends
|
1984
|
+
`,e.appendChild(r),this.popover.backdropElement=e}}};var w=class extends _n(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.role=R.ROLE;this.ariaLabelledby=null;this.ariaDescribedby=null;this.disableAriaExpanded=R.DISABLE_ARIA_EXPANDED;this.arrowElement=null;this.triggerElement=null;this.hoverTimer=null;this.isTriggerClicked=!1;this.openDelay=0;this.closeDelay=0;this.backdropElement=null;this.onOutsidePopoverClick=e=>{if(dt.peek()!==this)return;let r=!1,i=e.composedPath();r=this.contains(e.target)||i.includes(this.triggerElement);let s=this.backdropElement?i.includes(this.backdropElement):!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},this.openDelay)};this.hidePopover=()=>{dt.peek()===this&&setTimeout(()=>{this.visible=!1,this.isTriggerClicked=!1},this.closeDelay)};this.togglePopoverVisible=()=>{this.isTriggerClicked?this.hidePopover():(this.showPopover(),this.isTriggerClicked=!0)};this.utils=new Kr(this)}async firstUpdated(e){super.firstUpdated(e),this.utils.setupAppendTo(),[this.openDelay,this.closeDelay]=this.utils.setupDelay(),this.setupTriggerListener(),this.utils.setupAccessibility(),this.style.zIndex=`${this.zIndex}`,mt.onCreatedPopover(this),this.visible&&(this.positionPopover(),await this.handleCreatePopoverFirstUpdate())}async disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners(),mt.onDestroyedPopover(this),dt.remove(this)}setupTriggerListener(){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 e=this.renderRoot.querySelector(".popover-hover-bridge");this.triggerElement.addEventListener("mouseenter",this.showPopover),this.triggerElement.addEventListener("mouseleave",this.startCloseDelay),this.addEventListener("mouseenter",this.cancelCloseDelay),this.addEventListener("mouseleave",this.startCloseDelay),e==null||e.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(){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),this.removeEventListener("mouseenter",this.cancelCloseDelay),this.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(Jo).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(s=>Object.values(ei).includes(s));this.setAttribute("trigger",i.length>0?this.trigger:R.TRIGGER),this.removeEventListeners(),this.setupTriggerListener()}e.has("color")&&this.setAttribute("color",Object.values(ti).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("aria-label")||e.has("aria-labelledby"))&&this.utils.setupAccessibility()}async isOpenUpdated(e,r){var i,s,n;e===r||!this.triggerElement||(r?(dt.peek()!==this&&dt.push(this),this.enabledFocusTrap=this.focusTrap,this.enabledPreventScroll=this.preventScroll,this.backdrop&&(this.utils.createBackdrop(),this.triggerElement.style.zIndex=`${this.zIndex}`),this.positionPopover(),await this.handleCreatePopoverFirstUpdate(),this.hideOnBlur&&(this.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.disableAriaExpanded||this.triggerElement.setAttribute("aria-expanded","true"),this.interactive&&this.triggerElement.setAttribute("aria-haspopup",this.triggerElement.getAttribute("aria-haspopup")||"dialog"),mt.onShowPopover(this)):(dt.pop(),this.backdropElement&&((i=this.backdropElement)==null||i.remove(),this.backdropElement=null),this.hideOnBlur&&(this.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.disableAriaExpanded||this.triggerElement.removeAttribute("aria-expanded"),this.interactive&&this.triggerElement.removeAttribute("aria-haspopup"),this.focusBackToTrigger&&((n=this.triggerElement)==null||n.focus()),mt.onHidePopover(this)))}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)return;let e=[bn()],r=this.offset;if(this.flip&&e.push(yn()),this.size){let i=this.renderRoot.querySelector('[part="popover-content"]');e.push(xn({apply({availableHeight:s}){i&&Object.assign(i.style,{maxHeight:`${s}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(En({element:this.arrowElement,padding:12}))}e.push(vn(r)),gn(this.triggerElement,this,async()=>{if(!this.triggerElement)return;let{x:i,y:s,middlewareData:n,placement:a}=await Tn(this.triggerElement,this,{placement:this.placement,middleware:e});this.utils.updatePopoverStyle(i,s),n.arrow&&this.arrowElement&&this.utils.updateArrowStyle(n.arrow,a),this.trigger.includes("mouseenter")&&this.utils.setupHoverBridge(a)})}render(){return u`
|
1985
1985
|
<div class="popover-hover-bridge"></div>
|
1986
1986
|
${this.closeButton?u` <mdc-button
|
1987
1987
|
class="popover-close"
|
1988
1988
|
prefix-icon="cancel-bold"
|
1989
1989
|
variant="tertiary"
|
1990
1990
|
size="20"
|
1991
|
-
aria-label=${
|
1991
|
+
aria-label=${A(this.closeButtonAriaLabel)}
|
1992
1992
|
@click="${this.hidePopover}"
|
1993
|
-
></mdc-button>`:
|
1994
|
-
${this.showArrow?u`<div class="popover-arrow"></div>`:
|
1993
|
+
></mdc-button>`:v}
|
1994
|
+
${this.showArrow?u`<div class="popover-arrow"></div>`:v}
|
1995
1995
|
<div part="popover-content">
|
1996
1996
|
<slot></slot>
|
1997
1997
|
</div>
|
1998
|
-
`}};w.styles=[...E.styles,...
|
1998
|
+
`}};w.styles=[...E.styles,...An],c([d({type:String})],w.prototype,"id",2),c([d({type:String})],w.prototype,"triggerID",2),c([d({type:String,reflect:!0})],w.prototype,"trigger",2),c([d({type:String,reflect:!0})],w.prototype,"placement",2),c([d({type:String,reflect:!0})],w.prototype,"color",2),c([d({type:Boolean,reflect:!0})],w.prototype,"visible",2),c([d({type:Number,reflect:!0})],w.prototype,"offset",2),c([d({type:Boolean,reflect:!0,attribute:"focus-trap"})],w.prototype,"focusTrap",2),c([d({type:Boolean,reflect:!0,attribute:"prevent-scroll"})],w.prototype,"preventScroll",2),c([d({type:Boolean,attribute:"show-arrow"})],w.prototype,"showArrow",2),c([d({type:Boolean,reflect:!0,attribute:"close-button"})],w.prototype,"closeButton",2),c([d({type:Boolean,reflect:!0})],w.prototype,"interactive",2),c([d({type:String,reflect:!0})],w.prototype,"delay",2),c([d({type:Boolean,reflect:!0,attribute:"hide-on-escape"})],w.prototype,"hideOnEscape",2),c([d({type:Boolean,reflect:!0,attribute:"hide-on-blur"})],w.prototype,"hideOnBlur",2),c([d({type:Boolean,reflect:!0,attribute:"hide-on-outside-click"})],w.prototype,"hideOnOutsideClick",2),c([d({type:Boolean,reflect:!0,attribute:"focus-back-to-trigger"})],w.prototype,"focusBackToTrigger",2),c([d({type:Boolean,reflect:!0})],w.prototype,"backdrop",2),c([d({type:Boolean,reflect:!0})],w.prototype,"flip",2),c([d({type:Boolean,reflect:!0})],w.prototype,"size",2),c([d({type:Number,reflect:!0,attribute:"z-index"})],w.prototype,"zIndex",2),c([d({type:String,reflect:!0,attribute:"append-to"})],w.prototype,"appendTo",2),c([d({type:String,attribute:"close-button-aria-label"})],w.prototype,"closeButtonAriaLabel",2),c([d({type:String,reflect:!0})],w.prototype,"role",2),c([d({type:String,reflect:!0,attribute:"aria-labelledby"})],w.prototype,"ariaLabelledby",2),c([d({type:String,reflect:!0,attribute:"aria-describedby"})],w.prototype,"ariaDescribedby",2),c([d({type:Boolean,reflect:!0,attribute:"disable-aria-expanded"})],w.prototype,"disableAriaExpanded",2);var oi=w;oi.register(Sn);var Il=oi;var wl=[L,g`
|
1999
1999
|
:host{
|
2000
2000
|
--mdc-radio-inner-circle-size: 0.375rem;
|
2001
2001
|
--mdc-radio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);
|
@@ -2157,10 +2157,10 @@
|
|
2157
2157
|
display: none;
|
2158
2158
|
}
|
2159
2159
|
|
2160
|
-
`,...M(!0)],
|
2160
|
+
`,...M(!0)],In=wl;var ht=class extends be(B(ee)){constructor(){super();this.checked=!1;this.readonly=!1;this.autofocus=!1;this.renderLabelAndHelperText=()=>this.label?u`<div class="mdc-radio__label-container">
|
2161
2161
|
${this.renderLabel()}
|
2162
2162
|
${this.renderHelperText()}
|
2163
|
-
</div>`:
|
2163
|
+
</div>`:v;this.helpTextType=void 0}firstUpdated(){this.updateTabIndex()}getAllRadiosWithinSameGroup(){return Array.from(document.querySelectorAll(`mdc-radio[name="${this.name}"]`))}dispatchChangeEvent(e){let r=e.constructor;this.dispatchEvent(new r(e.type,e))}formResetCallback(){this.getAllRadiosWithinSameGroup().forEach(r=>{r.checked=!1}),this.updateComplete.then(()=>{this.setActualFormValue()}).catch(r=>{this.onerror&&this.onerror(r)})}formStateRestoreCallback(e){this.value===e&&e!==""&&(this.checked=!0)}setComponentValidity(e){e?this.internals.setValidity({}):this.requiredLabel&&!this.checked&&(this.validationMessage?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()),this.updateTabIndex()}setGroupValidity(e,r){this.updateComplete.then(()=>{e.forEach(i=>{i.setComponentValidity(r)})}).catch(i=>{this.onerror&&this.onerror(i)})}setActualFormValue(){let e="";this.checked?e=this.value?this.value:"on":e=null;let r=this.getAllRadiosWithinSameGroup();if(this.checked)this.setGroupValidity(r,!0);else{let i=r.some(a=>a.requiredLabel),s=!!r.find(a=>a.checked),n=i&&!s;this.setGroupValidity(r,!n)}this.internals.setFormValue(e)}handleChange(e){var s;if(this.disabled||this.readonly)return;this.getAllRadiosWithinSameGroup().forEach(n=>{var l;let a=(l=n.shadowRoot)==null?void 0:l.querySelector("input");a&&(n.checked=!1,a.checked=!1)}),this.checked=!0;let i=(s=this.shadowRoot)==null?void 0:s.querySelector("input");i&&(i.checked=!0),this.dispatchChangeEvent(e)}updateRadio(e,r,i){var s,n;(n=(s=e[r].shadowRoot)==null?void 0:s.querySelector("input"))==null||n.focus(),e[r].handleChange(i)}handleKeyDown(e){var n;if(this.disabled)return;let i=this.getAllRadiosWithinSameGroup().filter(a=>!a.disabled),s=i.indexOf(this);if(["ArrowDown","ArrowRight"].includes(e.key)){let a=(s+1)%i.length;this.updateRadio(i,a,e)}else if(["ArrowUp","ArrowLeft"].includes(e.key)){let a=(s-1+i.length)%i.length;this.updateRadio(i,a,e)}else e.key===" "&&this.updateRadio(i,s,e);this.updateTabIndex(),e.key==="Enter"&&((n=this.form)==null||n.requestSubmit())}updateTabIndex(){let e=this.getAllRadiosWithinSameGroup(),r=e.find(s=>s.checked),i=e.find(s=>!s.disabled);e.forEach(s=>{var a;let n=(a=s.shadowRoot)==null?void 0:a.querySelector("input");n&&(n.tabIndex=-1,(s===r||!r&&s===i)&&(n.tabIndex=0))})}update(e){super.update(e),e.has("checked")&&this.setActualFormValue()}render(){var e;return u`
|
2164
2164
|
<div class="mdc-radio__container">
|
2165
2165
|
<div class="mdc-radio__icon-container mdc-focus-ring">
|
2166
2166
|
<input
|
@@ -2168,8 +2168,8 @@
|
|
2168
2168
|
type="radio"
|
2169
2169
|
role="radio"
|
2170
2170
|
?autofocus="${this.autofocus}"
|
2171
|
-
name="${
|
2172
|
-
value="${
|
2171
|
+
name="${A(this.name)}"
|
2172
|
+
value="${A(this.value)}"
|
2173
2173
|
?required="${!!this.requiredLabel}"
|
2174
2174
|
@change=${this.handleChange}
|
2175
2175
|
@keydown=${this.handleKeyDown}
|
@@ -2178,14 +2178,14 @@
|
|
2178
2178
|
?disabled=${this.disabled}
|
2179
2179
|
class="mdc-radio__input"
|
2180
2180
|
aria-checked="${this.checked}"
|
2181
|
-
aria-describedby="${
|
2181
|
+
aria-describedby="${A(this.helpText?V.HELPER_TEXT_ID:"")}"
|
2182
2182
|
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
2183
2183
|
/>
|
2184
2184
|
<span class="mdc-radio__icon"></span>
|
2185
2185
|
</div>
|
2186
2186
|
${this.renderLabelAndHelperText()}
|
2187
2187
|
</div>
|
2188
|
-
`}};
|
2188
|
+
`}};ht.styles=[...ee.styles,...In],c([d({type:Boolean,reflect:!0})],ht.prototype,"checked",2),c([d({type:Boolean,reflect:!0})],ht.prototype,"readonly",2),c([d({type:Boolean,reflect:!0})],ht.prototype,"autofocus",2);var ii=ht;var Qr=y.constructTagName("radio");ii.register(Qr);var Cl=ii;var lr=class extends $r{constructor(){super();this.name="";this.isRadio=!0}firstUpdated(){var e,r,i,s,n;(n=(s=(i=(r=Array.from(((e=this.shadowRoot)==null?void 0:e.querySelectorAll("slot"))||[]))==null?void 0:r.flatMap(a=>a.assignedElements({flatten:!0})))==null?void 0:i.filter(a=>a.tagName.toLowerCase()===Qr))==null?void 0:s.filter(a=>!a.hasAttribute("name")))==null||n.forEach(a=>{a.setAttribute("name",this.name),this.requiredLabel&&a.setAttribute("required-label",this.requiredLabel)})}};lr.styles=[...$r.styles],c([d({type:String})],lr.prototype,"name",2);var si=lr;var wn=y.constructTagName("radiogroup");si.register(wn);var kl=si;var Rl=[L,g`
|
2189
2189
|
:host {
|
2190
2190
|
--mdc-spinner-default-color: var(--mds-color-theme-control-active-normal);
|
2191
2191
|
--mdc-spinner-inverted-color: var(--mds-color-theme-inverted-control-active-normal);
|
@@ -2247,11 +2247,11 @@
|
|
2247
2247
|
stroke-dashoffset: -292;
|
2248
2248
|
}
|
2249
2249
|
}
|
2250
|
-
`],
|
2250
|
+
`],Cn=Rl;var kn=y.constructTagName("spinner"),Ll={LARGE:"large",MIDSIZE:"midsize",SMALL:"small"},Nl={STANDALONE:"standalone",BUTTON:"button"},Jr={VARIANT:Nl.STANDALONE,SIZE:Ll.MIDSIZE,INVERTED:!1};var We=class extends E{constructor(){super(...arguments);this.inverted=Jr.INVERTED;this.size=Jr.SIZE;this.ariaLabel=null;this.variant=Jr.VARIANT}updated(e){super.updated(e),e.has("ariaLabel")&&(this.role=this.ariaLabel?"img":null,this.ariaHidden=this.ariaLabel?"false":"true")}render(){return u`
|
2251
2251
|
<svg part="container" viewBox="0 0 100 100">
|
2252
2252
|
<circle part="circle" cx="50" cy="50" r="46"></circle>
|
2253
2253
|
</svg>
|
2254
|
-
`}};
|
2254
|
+
`}};We.styles=[...E.styles,...Cn],c([d({type:Boolean,reflect:!0})],We.prototype,"inverted",2),c([d({type:String,reflect:!0})],We.prototype,"size",2),c([d({type:String,attribute:"aria-label"})],We.prototype,"ariaLabel",2),c([d({type:String,reflect:!0})],We.prototype,"variant",2);var ni=We;ni.register(kn);var Ol=ni;var zl=[L,g`
|
2255
2255
|
|
2256
2256
|
:host {
|
2257
2257
|
--mdc-tab-content-gap: 0.5rem;
|
@@ -2494,21 +2494,21 @@
|
|
2494
2494
|
color: var(--mdc-tab-pill-active-color-disabled);
|
2495
2495
|
}
|
2496
2496
|
|
2497
|
-
`,...M()],
|
2497
|
+
`,...M()],Rn=zl;var Ln=y.constructTagName("tab"),ai={GLASS:"glass",LINE:"line",PILL:"pill"},li={VARIANT:ai.PILL};var Nt=class extends pe(He){constructor(){super();this.variant=li.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=`${Qt(this.iconName)}-filled`):this.prevIconName&&(this.iconName=this.prevIconName))}setVariant(e){this.setAttribute("variant",Object.values(ai).includes(e)?e:li.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`
|
2498
2498
|
<div part="container">
|
2499
|
-
${this.iconName?u` <mdc-icon name="${this.iconName}" size="1" length-unit="rem" part="icon"></mdc-icon>`:
|
2499
|
+
${this.iconName?u` <mdc-icon name="${this.iconName}" size="1" length-unit="rem" part="icon"></mdc-icon>`:v}
|
2500
2500
|
${this.text?u` <mdc-text
|
2501
|
-
type=${this.active?
|
2501
|
+
type=${this.active?C.BODY_MIDSIZE_BOLD:C.BODY_MIDSIZE_MEDIUM}
|
2502
2502
|
tagname=${O.SPAN}
|
2503
2503
|
data-text=${this.text}
|
2504
2504
|
part="text"
|
2505
2505
|
>${this.text}</mdc-text
|
2506
|
-
>`:
|
2506
|
+
>`:v}
|
2507
2507
|
<slot name="badge"></slot>
|
2508
2508
|
<slot name="chip"></slot>
|
2509
2509
|
</div>
|
2510
2510
|
<div part="indicator"></div>
|
2511
|
-
`}};
|
2511
|
+
`}};Nt.styles=[...He.styles,...Rn],c([d({type:String,reflect:!0})],Nt.prototype,"text",2),c([d({type:String,reflect:!0})],Nt.prototype,"variant",2);var ci=Nt;ci.register(Ln);var Ml=ci;var eo=y.constructTagName("themeprovider"),di={THEMECLASS:"mds-theme-stable-darkWebex"};var to=class{constructor(t){this.themeclass=t}};to.context=eo;var ro=to;var $l=g`
|
2512
2512
|
:host {
|
2513
2513
|
--mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);
|
2514
2514
|
--mdc-themeprovider-font-family: var(--mds-font-family-primary);
|
@@ -2537,7 +2537,7 @@
|
|
2537
2537
|
* {
|
2538
2538
|
scrollbar-color: var(--mdc-themeprovider-scrollbar-thumb-color) var(--mdc-themeprovider-scrollbar-track-color);
|
2539
2539
|
}
|
2540
|
-
`,
|
2540
|
+
`,Nn=[$l];var Ot=class extends Et{constructor(){super({context:ro.context,initialValue:new ro(di.THEMECLASS)});this.themeclass=di.THEMECLASS}static get Context(){return ro.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(" "))}};Ot.styles=[...Et.styles,...Nn],c([W()],Ot.prototype,"currentThemeClass",2),c([d({type:String})],Ot.prototype,"themeclass",2);var mi=Ot;mi.register(eo);var Dl=mi;var Pl=[L,g`
|
2541
2541
|
:host {
|
2542
2542
|
--mdc-toggle-width: 3rem;
|
2543
2543
|
--mdc-toggle-height: 1.5rem;
|
@@ -2689,7 +2689,7 @@
|
|
2689
2689
|
border: var(--mdc-toggle-border);
|
2690
2690
|
}
|
2691
2691
|
}
|
2692
|
-
`,...M(!0)],
|
2692
|
+
`,...M(!0)],On=Pl;var zn=y.constructTagName("toggle"),hi={DEFAULT:"default",COMPACT:"compact"},pi={CHECKED:"check-bold",UNCHECKED:"cancel-bold"},Mn={compact:.75,default:1.25},ui={SIZE:hi.DEFAULT,VALIDATION_MESSAGE:"Please toggle this switch if you want to proceed."};var pt=class extends be(B(ke)){constructor(){super();this.checked=!1;this.size=ui.SIZE;this.autofocus=!1;this.helpTextType=void 0}formResetCallback(){this.checked=!1}formStateRestoreCallback(e){e&&(this.checked=!0)}manageRequired(){!this.checked&&this.requiredLabel?(this.validationMessage?this.inputElement.setCustomValidity(this.validationMessage):this.inputElement.setCustomValidity(""),this.setValidity()):this.internals.setValidity({})}setFormValue(){let e=null;this.checked?e=this.value?this.value:"isActive":e=null,this.manageRequired(),this.internals.setFormValue(e)}toggleState(){this.disabled||(this.checked=!this.checked)}handleKeyDown(e){var r;e.key==="Enter"&&((r=this.form)==null||r.requestSubmit())}handleChange(e){this.toggleState();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}setToggleSize(e){this.setAttribute("size",Object.values(hi).includes(e)?e:ui.SIZE)}update(e){super.update(e),e.has("checked")&&this.setFormValue(),e.has("size")&&this.setToggleSize(this.size)}render(){var e;return u`
|
2693
2693
|
<div class="mdc-toggle__container mdc-focus-ring">
|
2694
2694
|
<input
|
2695
2695
|
id="${this.id}"
|
@@ -2698,12 +2698,12 @@
|
|
2698
2698
|
role="switch"
|
2699
2699
|
?autofocus="${this.autofocus}"
|
2700
2700
|
?required="${!!this.requiredLabel}"
|
2701
|
-
name="${
|
2702
|
-
value="${
|
2701
|
+
name="${A(this.name)}"
|
2702
|
+
value="${A(this.value)}"
|
2703
2703
|
.checked="${this.checked}"
|
2704
2704
|
aria-checked="${this.checked}"
|
2705
2705
|
.disabled="${this.disabled}"
|
2706
|
-
aria-describedby="${
|
2706
|
+
aria-describedby="${A(this.helpText?V.HELPER_TEXT_ID:"")}"
|
2707
2707
|
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
2708
2708
|
tabindex="${this.disabled?-1:0}"
|
2709
2709
|
@change="${this.handleChange}"
|
@@ -2711,19 +2711,19 @@
|
|
2711
2711
|
/>
|
2712
2712
|
<div class="mdc-toggle__slider">
|
2713
2713
|
<mdc-icon
|
2714
|
-
name="${this.checked?
|
2714
|
+
name="${this.checked?pi.CHECKED:pi.UNCHECKED}"
|
2715
2715
|
class="mdc-toggle__icon"
|
2716
2716
|
length-unit="rem"
|
2717
|
-
size="${
|
2717
|
+
size="${Mn[this.size]}"
|
2718
2718
|
></mdc-icon>
|
2719
2719
|
</div>
|
2720
2720
|
</div>
|
2721
2721
|
${this.renderLabel()}
|
2722
2722
|
${this.renderHelperText()}
|
2723
|
-
`}};
|
2723
|
+
`}};pt.styles=[...ke.styles,...On],c([d({type:Boolean,reflect:!0})],pt.prototype,"checked",2),c([d({type:String,reflect:!0})],pt.prototype,"size",2),c([d({type:Boolean,reflect:!0})],pt.prototype,"autofocus",2);var fi=pt;fi.register(zn);var Ul=fi;function ut(o,t,e){var s;let r=(s=e.initialDeps)!=null?s:[],i;return()=>{var n,a,l,m;let h;e.key&&((n=e.debug)!=null&&n.call(e))&&(h=Date.now());let p=o();if(!(p.length!==r.length||p.some((x,T)=>r[T]!==x)))return i;r=p;let f;if(e.key&&((a=e.debug)!=null&&a.call(e))&&(f=Date.now()),i=t(...p),e.key&&((l=e.debug)!=null&&l.call(e))){let x=Math.round((Date.now()-h)*100)/100,T=Math.round((Date.now()-f)*100)/100,_=T/16,S=(I,k)=>{for(I=String(I);I.length<k;)I=" "+I;return I};console.info(`%c\u23F1 ${S(T,5)} /${S(x,5)} ms`,`
|
2724
2724
|
font-size: .6rem;
|
2725
2725
|
font-weight: bold;
|
2726
|
-
color: hsl(${Math.max(0,Math.min(120-120*S,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 Ns=(o,t)=>Math.abs(o-t)<1,Os=(o,t,e)=>{let r;return function(...i){o.clearTimeout(r),r=o.setTimeout(()=>t.apply(this,i),e)}};var Ol=o=>o,zl=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},Ms=(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)}},zs={passive:!0};var Ml=typeof window>"u"?!0:"onscrollend"in window,Ds=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=0,n=o.options.useScrollendEvent&&Ml?()=>{}:Os(r,()=>{t(i,!1)},o.options.isScrollingResetDelay),s=m=>()=>{let{horizontal:h,isRtl:p}=o.options;i=h?e.scrollLeft*(p&&-1||1):e.scrollTop,n(),t(i,m)},a=s(!0),l=s(!1);return l(),e.addEventListener("scroll",a,zs),e.addEventListener("scrollend",l,zs),()=>{e.removeEventListener("scroll",a),e.removeEventListener("scrollend",l)}};var Dl=(o,t,e)=>{if(t!=null&&t.borderBoxSize){let r=t.borderBoxSize[0];if(r)return Math.round(r[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])};var $s=(o,{adjustments:t=0,behavior:e},r)=>{var i,n;let s=o+t;(n=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||n.call(i,{[r.options.horizontal?"left":"top"]:s,behavior:e})},eo=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:Ol,rangeExtractor:zl,onChange:()=>{},measureElement:Dl,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(h=>{this.itemSizeCache.set(h.key,h.size)}));let l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let m=this.measurementsCache.slice(0,l);for(let h=l;h<e;h++){let p=n(h),v=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),f=v?v.end+this.options.gap:r+i,y=a.get(p),T=typeof y=="number"?y:this.options.estimateSize(h),S=f+T,A=v?v.lane:h%this.options.lanes;m[h]={index:h,start:f,size:T,end:S,key:p,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?$l({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[Ps(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));Ns(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)}},Ps=(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 $l({measurements:o,outerSize:t,scrollOffset:e}){let r=o.length-1,n=Ps(0,r,a=>o[a].start,e),s=n;for(;s<r&&o[s].end<e+t;)s++;return{startIndex:n,endIndex:s}}var hi=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 eo(r)}getVirtualizer(){return this.virtualizer}async hostConnected(){this.cleanup=this.virtualizer._didMount()}hostUpdated(){this.virtualizer._willUpdate()}hostDisconnected(){this.cleanup()}},to=class extends hi{constructor(t,e){super(t,{observeElementRect:Ms,observeElementOffset:Ds,scrollToFn:$s,...e})}};var{I:gE}=zi;var Us=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},ro=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)},Vs=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),Vl(t)}};function Pl(o){this._$AN!==void 0?(ro(this),this._$AM=o,Vs(this)):this._$AM=o}function Ul(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),ro(r[n]);else r!=null&&(ar(r,!1),ro(r));else ar(this,o)}var Vl=o=>{var t,e;o.type==Cr.CHILD&&((t=o._$AP)!=null||(o._$AP=Ul),(e=o._$AQ)!=null||(o._$AQ=Pl))},oo=class extends St{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Vs(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),ro(this))}setValue(t){if(Us(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 Hs=()=>new ui,ui=class{},pi=new WeakMap,Fs=Wt(class extends oo{render(o){return b}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)),b}rt(o){var t;if(this.isConnected||(o=void 0),typeof this.Y=="function"){let e=(t=this.ht)!=null?t:globalThis,r=pi.get(e);r===void 0&&(r=new WeakMap,pi.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=pi.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 Hl=[g`
|
2726
|
+
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 oo(o,t){if(o===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return o}var $n=(o,t)=>Math.abs(o-t)<1,Dn=(o,t,e)=>{let r;return function(...i){o.clearTimeout(r),r=o.setTimeout(()=>t.apply(this,i),e)}};var Vl=o=>o,Hl=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},Un=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=n=>{let{width:a,height:l}=n;t({width:Math.round(a),height:Math.round(l)})};if(i(e.getBoundingClientRect()),!r.ResizeObserver)return()=>{};let s=new r.ResizeObserver(n=>{let a=n[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 s.observe(e,{box:"border-box"}),()=>{s.unobserve(e)}},Pn={passive:!0};var Fl=typeof window>"u"?!0:"onscrollend"in window,Vn=(o,t)=>{let e=o.scrollElement;if(!e)return;let r=o.targetWindow;if(!r)return;let i=0,s=o.options.useScrollendEvent&&Fl?()=>{}:Dn(r,()=>{t(i,!1)},o.options.isScrollingResetDelay),n=m=>()=>{let{horizontal:h,isRtl:p}=o.options;i=h?e.scrollLeft*(p&&-1||1):e.scrollTop,s(),t(i,m)},a=n(!0),l=n(!1);return l(),e.addEventListener("scroll",a,Pn),e.addEventListener("scrollend",l,Pn),()=>{e.removeEventListener("scroll",a),e.removeEventListener("scrollend",l)}};var Bl=(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 Hn=(o,{adjustments:t=0,behavior:e},r)=>{var i,s;let n=o+t;(s=(i=r.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[r.options.horizontal?"left":"top"]:n,behavior:e})},io=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(s=>{this._measureElement(s.target,s)})}));return{disconnect:()=>{var i;(i=r())==null||i.disconnect(),e=null},observe:i=>{var s;return(s=r())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=r())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([r,i])=>{typeof i>"u"&&delete e[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Vl,rangeExtractor:Hl,onChange:()=>{},measureElement:Bl,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=ut(()=>(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(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=n,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,s=new Map;for(let n=r-1;n>=0;n--){let a=e[n];if(i.has(a.lane))continue;let l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((n,a)=>n.end===a.end?n.index-a.index:n.end-a.end)[0]:void 0},this.getMeasurementOptions=ut(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,r,i,s,n)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:n}),{key:!1}),this.getMeasurements=ut(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:r,scrollMargin:i,getItemKey:s,enabled:n},a)=>{if(!n)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));let l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let m=this.measurementsCache.slice(0,l);for(let h=l;h<e;h++){let p=s(h),b=this.options.lanes===1?m[h-1]:this.getFurthestMeasurement(m,h),f=b?b.end+this.options.gap:r+i,x=a.get(p),T=typeof x=="number"?x:this.options.estimateSize(h),_=f+T,S=b?b.lane:h%this.options.lanes;m[h]={index:h,start:f,size:T,end:_,key:p,lane:S}}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ut(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,r,i)=>this.range=e.length>0&&r>0?Gl({measurements:e,outerSize:r,scrollOffset:i}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=ut(()=>{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,s,n)=>s===null||n===null?[]:e({startIndex:s,endIndex:n,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),s=this.measurementsCache[i];if(!s)return;let n=s.key,a=this.elementsCache.get(n);a!==e&&(a&&this.observer.unobserve(a),this.observer.observe(e),this.elementsCache.set(n,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 s=(a=this.itemSizeCache.get(i.key))!=null?a:i.size,n=r-s;n!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,n,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=n,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=ut(()=>[this.getIndexes(),this.getMeasurements()],(e,r)=>{let i=[];for(let s=0,n=e.length;s<n;s++){let a=e[s],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 oo(r[Fn(0,r.length-1,i=>oo(r[i]).start,e)])},this.getOffsetForAlignment=(e,r)=>{let i=this.getSize(),s=this.getScrollOffset();r==="auto"&&e>=s+i&&(r="end"),r==="end"&&(e-=i);let n=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[n]:this.scrollElement[n]: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 s=this.getSize(),n=this.getScrollOffset();if(r==="auto")if(i.end>=n+s-this.options.scrollPaddingEnd)r="end";else if(i.start<=n+this.options.scrollPaddingStart)r="start";else return[n,r];let a=i.start-this.options.scrollPaddingStart+(i.size-s)/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 s=this.getOffsetForIndex(e,r);if(!s)return;let[n,a]=s;this._scrollToOffset(n,{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]=oo(this.getOffsetForIndex(e,a));$n(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 s;var e;let r=this.getMeasurements(),i;return r.length===0?i=this.options.paddingStart:i=this.options.lanes===1?(s=(e=r[r.length-1])==null?void 0:e.end)!=null?s:0:Math.max(...r.slice(-this.options.lanes).map(n=>n.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)}},Fn=(o,t,e,r)=>{for(;o<=t;){let i=(o+t)/2|0,s=e(i);if(s<r)o=i+1;else if(s>r)t=i-1;else return i}return o>0?o-1:0};function Gl({measurements:o,outerSize:t,scrollOffset:e}){let r=o.length-1,s=Fn(0,r,a=>o[a].start,e),n=s;for(;n<r&&o[n].end<e+t;)n++;return{startIndex:s,endIndex:n}}var gi=class{constructor(t,e){this.cleanup=()=>{},(this.host=t).addController(this);let r={...e,onChange:(i,s)=>{var n;this.host.updateComplete.then(()=>this.host.requestUpdate()),(n=e.onChange)==null||n.call(e,i,s)}};this.virtualizer=new io(r)}getVirtualizer(){return this.virtualizer}async hostConnected(){this.cleanup=this.virtualizer._didMount()}hostUpdated(){this.virtualizer._willUpdate()}hostDisconnected(){this.cleanup()}},so=class extends gi{constructor(t,e){super(t,{observeElementRect:Un,observeElementOffset:Vn,scrollToFn:Hn,...e})}};var{I:IE}=Vi;var Bn=o=>o.strings===void 0;var cr=(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),cr(i,t);return!0},no=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)},Gn=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),Wl(t)}};function ql(o){this._$AN!==void 0?(no(this),this._$AM=o,Gn(this)):this._$AM=o}function Yl(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 s=e;s<r.length;s++)cr(r[s],!1),no(r[s]);else r!=null&&(cr(r,!1),no(r));else cr(this,o)}var Wl=o=>{var t,e;o.type==Lr.CHILD&&((t=o._$AP)!=null||(o._$AP=Yl),(e=o._$AQ)!=null||(o._$AQ=ql))},ao=class extends wt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),Gn(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&&(cr(this,t),no(this))}setValue(t){if(Bn(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 qn=()=>new bi,bi=class{},vi=new WeakMap,Yn=Zt(class extends ao{render(o){return v}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)),v}rt(o){var t;if(this.isConnected||(o=void 0),typeof this.Y=="function"){let e=(t=this.ht)!=null?t:globalThis,r=vi.get(e);r===void 0&&(r=new WeakMap,vi.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=vi.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 Xl=[g`
|
2727
2727
|
:host::part(scroll) {
|
2728
2728
|
height: 100%;
|
2729
2729
|
width: 100%;
|
@@ -2733,19 +2733,192 @@
|
|
2733
2733
|
position: relative;
|
2734
2734
|
width: 100%;
|
2735
2735
|
}
|
2736
|
-
`],
|
2736
|
+
`],Wn=Xl;var Xn=y.constructTagName("virtualizedlist"),FE=y.constructTagName("virtualizedwrapper"),Zn={VIRTUALIZER_PROPS:{count:0,estimateSize:()=>0}};var ft=class extends E{constructor(){super();this.virtualizerProps=Zn.VIRTUALIZER_PROPS;this.scrollElementRef=qn();this.virtualItems=[];this.virtualizerController=null,this.virtualizer=null,this.setlistdata=null,this.onscroll=null}update(e){super.update(e),e.get("virtualizerProps")&&this.setVirtualizerOptions()}firstUpdated(e){super.firstUpdated(e),this.setVirtualizerOptions()}setVirtualizerOptions(){var e;(e=this.virtualizer)==null||e.setOptions({...this.virtualizer.options,...this.virtualizerProps}),this.requestUpdate()}connectedCallback(){var e;this.virtualizerController=new so(this,{count:this.virtualizerProps.count,estimateSize:(e=this.virtualizerProps)==null?void 0:e.estimateSize,getScrollElement:()=>this.scrollElementRef.value||null,...this.virtualizerProps}),super.connectedCallback()}getVirtualizedListWrapper(e){var a,l;this.virtualizer=e.getVirtualizer();let{getTotalSize:r,getVirtualItems:i,measureElement:s}=this.virtualizer,n=i();if(n!==this.virtualItems){this.virtualItems=n;let m=i(),h={position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${(l=(a=m[0])==null?void 0:a.start)!=null?l:0}px)`};this.setlistdata&&this.setlistdata({virtualItems:m,measureElement:s,listStyle:h})}return u`<div
|
2737
2737
|
part="container"
|
2738
2738
|
style="height: ${r()}px;"
|
2739
2739
|
>
|
2740
2740
|
<slot></slot>
|
2741
2741
|
</div>`}render(){return u`<div
|
2742
|
-
${
|
2742
|
+
${Yn(this.scrollElementRef)}
|
2743
2743
|
part="scroll"
|
2744
2744
|
@scroll=${this.onscroll&&this.onscroll}
|
2745
2745
|
>
|
2746
2746
|
${this.virtualizerController?this.getVirtualizedListWrapper(this.virtualizerController):u``}
|
2747
2747
|
</div>
|
2748
|
-
`}};
|
2748
|
+
`}};ft.styles=[...E.styles,...Wn],c([d({type:Function,attribute:"onscroll"})],ft.prototype,"onscroll",2),c([d({type:Object,attribute:"virtualizerprops"})],ft.prototype,"virtualizerProps",2),c([d({type:Function,attribute:"setlistdata"})],ft.prototype,"setlistdata",2);var yi=ft;yi.register(Xn);var Zl=yi;var jl=[g`
|
2749
|
+
:host {
|
2750
|
+
--mdc-textarea-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
|
2751
|
+
--mdc-textarea-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
|
2752
|
+
--mdc-textarea-disabled-background-color: var(--mds-color-theme-background-primary-disabled);
|
2753
|
+
--mdc-textarea-text-color: var(--mds-color-theme-text-primary-normal);
|
2754
|
+
--mdc-textarea-background-color: var(--mds-color-theme-background-primary-ghost);
|
2755
|
+
--mdc-textarea-border-color: var(--mds-color-theme-outline-input-normal);
|
2756
|
+
--mdc-textarea-text-secondary-normal : var(--mds-color-theme-text-secondary-normal);
|
2757
|
+
--mdc-textarea-error-border-color: var(--mds-color-theme-text-error-normal);
|
2758
|
+
--mdc-textarea-warning-border-color: var(--mds-color-theme-text-warning-normal);
|
2759
|
+
--mdc-textarea-success-border-color: var(--mds-color-theme-text-success-normal);
|
2760
|
+
--mdc-textarea-primary-border-color: var(--mds-color-theme-text-accent-normal);
|
2761
|
+
--mdc-textarea-hover-background-color: var(--mds-color-theme-background-primary-hover);
|
2762
|
+
--mdc-textarea-focused-background-color: var(--mds-color-theme-background-primary-active);
|
2763
|
+
--mdc-textarea-focused-border-color: var(--mds-color-theme-outline-input-active);
|
2764
|
+
--mdc-textarea-text-font-size: var(--mds-font-size-body-midsize);
|
2765
|
+
--mdc-textarea-text-line-height: var(--mds-font-lineheight-body-midsize);
|
2766
|
+
}
|
2767
|
+
|
2768
|
+
:host([disabled])::part(textarea),
|
2769
|
+
:host([disabled])::part(textarea)::placeholder{
|
2770
|
+
color: var(--mdc-input-disabled-text-color);
|
2771
|
+
}
|
2772
|
+
|
2773
|
+
:host([disabled])::part(textarea),
|
2774
|
+
:host([readonly])::part(textarea){
|
2775
|
+
border-color: var(--mdc-textarea-disabled-border-color);
|
2776
|
+
background: var(--mdc-textarea-disabled-background-color);
|
2777
|
+
}
|
2778
|
+
|
2779
|
+
:host([disabled][help-text-type="default"])::part(textarea-container),
|
2780
|
+
:host([disabled][help-text-type="success"])::part(textarea-container),
|
2781
|
+
:host([disabled][help-text-type="warning"])::part(textarea-container),
|
2782
|
+
:host([disabled][help-text-type="error"])::part(textarea-container),
|
2783
|
+
:host([disabled][help-text-type="priority"])::part(textarea-container){
|
2784
|
+
border-color: var(--mdc-textarea-disabled-border-color);
|
2785
|
+
}
|
2786
|
+
|
2787
|
+
:host::part(textarea){
|
2788
|
+
min-height: 6.25rem;
|
2789
|
+
color: var(--mdc-textarea-text-color);
|
2790
|
+
font-family: inherit;
|
2791
|
+
font-size: var(--mdc-textarea-text-font-size);
|
2792
|
+
line-height: var(--mdc-textarea-text-line-height);
|
2793
|
+
background-color: var(--mdc-textarea-background-color);
|
2794
|
+
resize: none;
|
2795
|
+
border: none;
|
2796
|
+
outline: none;
|
2797
|
+
box-sizing: border-box;
|
2798
|
+
}
|
2799
|
+
|
2800
|
+
|
2801
|
+
:host::part(textarea-container) {
|
2802
|
+
display: flex;
|
2803
|
+
gap: 0.5rem;
|
2804
|
+
border-radius: 0.5rem;
|
2805
|
+
border: 0.0625rem solid var(--mdc-textarea-border-color);
|
2806
|
+
overflow: hidden;
|
2807
|
+
padding: 0.375rem 0.25rem 0.25rem 0.75rem;
|
2808
|
+
}
|
2809
|
+
|
2810
|
+
:host(:not([disabled]))::part(textarea-container):hover{
|
2811
|
+
background-color: var(--mdc-textarea-hover-background-color);
|
2812
|
+
}
|
2813
|
+
|
2814
|
+
:host(:not([disabled]))::part(textarea-container):active,
|
2815
|
+
:host(:not([disabled]))::part(textarea-container):focus-within{
|
2816
|
+
background-color: var(--mdc-textarea-focused-background-color);
|
2817
|
+
border-color: var(--mdc-textarea-focused-border-color);
|
2818
|
+
}
|
2819
|
+
|
2820
|
+
:host::part(textarea-footer) {
|
2821
|
+
display: flex;
|
2822
|
+
justify-content: space-between;
|
2823
|
+
align-items: center;
|
2824
|
+
width: 100%;
|
2825
|
+
}
|
2826
|
+
|
2827
|
+
.textarea::placeholder{
|
2828
|
+
color: var(--mdc-textarea-text-secondary-normal);
|
2829
|
+
}
|
2830
|
+
|
2831
|
+
:host::part(character-counter){
|
2832
|
+
margin-left: auto;
|
2833
|
+
color: var(--mdc-textarea-text-secondary-normal);
|
2834
|
+
}
|
2835
|
+
|
2836
|
+
:host([help-text-type="error"])::part(character-counter) {
|
2837
|
+
color: var(--mdc-textarea-error-border-color);
|
2838
|
+
}
|
2839
|
+
|
2840
|
+
:host([disabled])::part(character-counter){
|
2841
|
+
color: var(--mds-color-theme-text-primary-disabled);
|
2842
|
+
}
|
2843
|
+
|
2844
|
+
:host([help-text-type="error"])::part(textarea-container),
|
2845
|
+
:host([help-text-type="error"])::part(textarea-container):focus-within {
|
2846
|
+
border-color: var(--mdc-textarea-error-border-color);
|
2847
|
+
}
|
2848
|
+
:host([help-text-type="warning"])::part(textarea-container),
|
2849
|
+
:host([help-text-type="warning"])::part(textarea-container):focus-within {
|
2850
|
+
border-color: var(--mdc-textarea-warning-border-color);
|
2851
|
+
}
|
2852
|
+
:host([help-text-type="success"])::part(textarea-container),
|
2853
|
+
:host([help-text-type="success"])::part(textarea-container):focus-within {
|
2854
|
+
border-color: var(--mdc-textarea-success-border-color);
|
2855
|
+
}
|
2856
|
+
:host([help-text-type="priority"])::part(textarea-container),
|
2857
|
+
:host([help-text-type="priority"])::part(textarea-container):focus-within {
|
2858
|
+
border-color: var(--mdc-textarea-primary-border-color);
|
2859
|
+
}
|
2860
|
+
|
2861
|
+
.hidden {
|
2862
|
+
opacity: 0;
|
2863
|
+
pointer-events: none;
|
2864
|
+
}
|
2865
|
+
|
2866
|
+
`,...M(!0)],jn=jl;var Kn=y.constructTagName("textarea"),Kl="cancel-bold",xi={HARD:"hard",SOFT:"soft"},Qn={OFF:"off",ON:"on"},gt={ICON_SIZE_VALUE:1,ICON_SIZE_UNIT:"rem",CLEAR_BUTTON_ICON:Kl,CLEAR_BUTTON_VARIANT:Ie.TERTIARY,CLEAR_BUTTON_SIZE:ne[20],CHARACTER_COUNTER_TYPE:C.BODY_MIDSIZE_REGULAR,ROWS:5,COLS:40,WRAP:xi.SOFT};var D=class extends be(B(ke)){constructor(){var e;super();this.readonly=!1;this.rows=gt.ROWS;this.cols=gt.COLS;this.wrap=xi.SOFT;this.autocapitalize=Dr.OFF;this.autocomplete=Qn.OFF;this.autofocus=!1;this.clearButton=!1;this.clearAriaLabel="";this.characterLimitExceedingFired=!1;this.value=((e=this.textContent)==null?void 0:e.trim())||this.value}get textarea(){return this.inputElement}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.textarea&&(this.textarea.checkValidity(),this.setTextareaValidity(),this.internals.setFormValue(this.textarea.value))}).catch(e=>{this.onerror&&this.onerror(e)})}setTextareaValidity(){this.requiredLabel&&this.validationMessage&&this.value===""?this.textarea.setCustomValidity(this.validationMessage):this.maxCharacterLimit&&this.value.length>this.maxCharacterLimit&&this.helpTextType===J.ERROR&&this.helpText?this.textarea.setCustomValidity(this.helpText):this.textarea.setCustomValidity(""),this.setValidity()}formResetCallback(){this.value="",this.requestUpdate()}formStateRestoreCallback(e){this.value=e}handleValueChange(){this.updateComplete.then(()=>{this.setTextareaValidity()}).catch(e=>{this.onerror&&this.onerror(e)})}updated(e){super.updated(e),e.has("value")&&(this.handleValueChange(),this.handleCharacterOverflowStateChange())}attributeChangedCallback(e,r,i){super.attributeChangedCallback(e,r,i),["maxlength","minlength","required"].includes(e)&&this.updateComplete.then(()=>{this.setTextareaValidity()}).catch(n=>{this.onerror&&this.onerror(n)})}dispatchCharacterOverflowStateChangeEvent(){this.dispatchEvent(new CustomEvent("limitexceeded",{detail:{currentCharacterCount:this.value.length,maxCharacterLimit:this.maxCharacterLimit,value:this.value},bubbles:!0,composed:!0}))}handleCharacterOverflowStateChange(){this.maxCharacterLimit&&(this.value.length>this.maxCharacterLimit&&!this.characterLimitExceedingFired?(this.dispatchCharacterOverflowStateChangeEvent(),this.characterLimitExceedingFired=!0):this.value.length<=this.maxCharacterLimit&&this.characterLimitExceedingFired&&(this.dispatchCharacterOverflowStateChangeEvent(),this.characterLimitExceedingFired=!1))}updateValue(){this.value=this.textarea.value,this.internals.setFormValue(this.textarea.value)}onChange(e){this.updateValue();let r=e.constructor;this.dispatchEvent(new r(e.type,e))}handleKeyDown(e){["Enter"].includes(e.key)&&(e.preventDefault(),this.clearInputText())}clearInputText(){this.value="",this.textarea.focus()}renderClearButton(){return this.clearButton?u`
|
2867
|
+
<mdc-button
|
2868
|
+
part='clear-button'
|
2869
|
+
class='own-focus-ring ${this.value?"":"hidden"}'
|
2870
|
+
prefix-icon='${gt.CLEAR_BUTTON_ICON}'
|
2871
|
+
variant='${gt.CLEAR_BUTTON_VARIANT}'
|
2872
|
+
size="${gt.CLEAR_BUTTON_SIZE}"
|
2873
|
+
aria-label="${this.clearAriaLabel}"
|
2874
|
+
?disabled=${this.disabled||this.readonly||!this.value}
|
2875
|
+
@click=${this.clearInputText}
|
2876
|
+
@keydown=${this.handleKeyDown}
|
2877
|
+
></mdc-button>
|
2878
|
+
`:v}renderCharacterCounter(){return this.maxCharacterLimit?u`
|
2879
|
+
<mdc-text
|
2880
|
+
part="character-counter"
|
2881
|
+
tagname="span"
|
2882
|
+
type=${gt.CHARACTER_COUNTER_TYPE}
|
2883
|
+
>
|
2884
|
+
${this.value.length<10?`0${this.value.length}`:this.value.length}/${this.maxCharacterLimit}
|
2885
|
+
</mdc-text>
|
2886
|
+
`:v}renderTextareaFooter(){return!this.helpText&&!this.maxCharacterLimit?v:u`
|
2887
|
+
<div part="textarea-footer">
|
2888
|
+
${this.renderHelperText()}
|
2889
|
+
${this.renderCharacterCounter()}
|
2890
|
+
</div>
|
2891
|
+
`}render(){var e;return u`
|
2892
|
+
${this.renderLabel()}
|
2893
|
+
<div class="textarea-container mdc-focus-ring" part="textarea-container">
|
2894
|
+
<textarea
|
2895
|
+
aria-label="${(e=this.dataAriaLabel)!=null?e:""}"
|
2896
|
+
part='textarea'
|
2897
|
+
id="${this.id}"
|
2898
|
+
name="${this.name}"
|
2899
|
+
.value="${this.value}"
|
2900
|
+
?disabled="${this.disabled}"
|
2901
|
+
?readonly="${this.readonly}"
|
2902
|
+
?required="${!!this.requiredLabel}"
|
2903
|
+
placeholder=${A(this.placeholder)}
|
2904
|
+
rows=${A(this.rows)}
|
2905
|
+
cols=${A(this.cols)}
|
2906
|
+
wrap=${A(this.wrap)}
|
2907
|
+
?autofocus="${this.autofocus}"
|
2908
|
+
autocapitalize=${this.autocapitalize}
|
2909
|
+
autocomplete=${this.autocomplete}
|
2910
|
+
minlength=${A(this.minlength)}
|
2911
|
+
maxlength=${A(this.maxlength)}
|
2912
|
+
dirname=${A(this.dirname)}
|
2913
|
+
@input=${this.updateValue}
|
2914
|
+
@change=${this.onChange}
|
2915
|
+
aria-describedby="${A(this.helpText?V.HELPER_TEXT_ID:"")}"
|
2916
|
+
aria-invalid="${this.helpTextType==="error"?"true":"false"}"
|
2917
|
+
></textarea>
|
2918
|
+
${this.renderClearButton()}
|
2919
|
+
</div>
|
2920
|
+
${this.renderTextareaFooter()}
|
2921
|
+
`}};D.styles=[...ke.styles,...jn],c([d({type:String})],D.prototype,"placeholder",2),c([d({type:Boolean})],D.prototype,"readonly",2),c([d({type:Number})],D.prototype,"rows",2),c([d({type:Number})],D.prototype,"cols",2),c([d({type:String})],D.prototype,"wrap",2),c([d({type:String})],D.prototype,"autocapitalize",2),c([d({type:String})],D.prototype,"autocomplete",2),c([d({type:Boolean})],D.prototype,"autofocus",2),c([d({type:String})],D.prototype,"dirname",2),c([d({type:Number})],D.prototype,"maxlength",2),c([d({type:Number})],D.prototype,"minlength",2),c([d({type:Boolean,attribute:"clear-button"})],D.prototype,"clearButton",2),c([d({type:String,attribute:"clear-aria-label"})],D.prototype,"clearAriaLabel",2),c([d({type:Number,attribute:"max-character-limit"})],D.prototype,"maxCharacterLimit",2),c([xr("textarea")],D.prototype,"inputElement",2);var Ei=D;Ei.register(Kn);var Ql=Ei;})();
|
2749
2922
|
/*! Bundled license information:
|
2750
2923
|
|
2751
2924
|
@lit/reactive-element/css-tag.js:
|