@m3e/web 2.5.15 → 2.5.16

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/all.min.js CHANGED
@@ -168,7 +168,7 @@ const ey=["m3e-input-chip-set","m3e-select"];function ty(e){return e instanceof
168
168
  * @license MIT
169
169
  * Copyright (c) 2025 Google LLC
170
170
  * See LICENSE file in the project root for full license text.
171
- */var iy,oy,ry,sy,ny,ly,cy,dy,hy,my,uy,py,vy,fy,by,gy,yy,wy,$y,xy,ky,Cy,Sy,_y,Ey,Ly,Py,My,Ty,zy;let Ay=class extends(Bo(mi(me))){constructor(){super(),iy.add(this),oy.set(this,null),ry.set(this,void 0),sy.set(this,()=>t(this,iy,"m",Ey).call(this)),ny.set(this,()=>t(this,iy,"m",Sy).call(this)),ly.set(this,new Ma(this,{target:null,config:{attributeFilter:["disabled","readonly","required"]},callback:()=>this.notifyControlStateChange()})),cy.set(this,new za(this,{target:null,callback:()=>t(this,iy,"m",xy).call(this)})),dy.set(this,new Sa(this,{target:null,filter:e=>t(this,iy,"m",Ly).call(this,e),callback:e=>{e=e&&!(t(this,oy,"f")?.disabled??1),fi(this,"--no-animate",!1),a(this,py,e,"f"),e?fi(this,"--float-label",!0):(this._invalid=!(t(this,oy,"f")?.checkValidity?.()??1),this.notifyControlStateChange())}})),hy.set(this,new Ma(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,iy,"m",Ty).call(this)})),my.set(this,new Ma(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,iy,"m",zy).call(this)})),uy.set(this,new Ta(this,{target:null,filter:e=>t(this,iy,"m",Ly).call(this,e),callback:e=>fi(this,"--pressed",e&&!(t(this,oy,"f")?.disabled??1))})),py.set(this,!1),this._pseudoLabel="",this._required=!1,this._invalid=!1,this._validationMessage="",vy.set(this,""),fy.set(this,""),this.variant="outlined",this.hideRequiredMarker=!1,this.hideSubscript="auto",this.floatLabel="auto",new _a(this,{callback:()=>fi(this,"--no-animate",!1)})}get menuAnchor(){return this._base}get control(){return t(this,oy,"f")}notifyControlStateChange(e=!1){this._required=!0===t(this,oy,"f")?.required,fi(this,"--required",this._required),fi(this,"--disabled",!0===t(this,oy,"f")?.disabled),fi(this,"--readonly",Wo(t(this,oy,"f"))&&!0===t(this,oy,"f").readOnly),"auto"===this.floatLabel&&fi(this,"--float-label",t(this,iy,"a",by)||t(this,py,"f")),e&&(this._invalid=!(t(this,oy,"f")?.checkValidity?.()??1)),fi(this,"--invalid",this._invalid),this._validationMessage=t(this,oy,"f")?.validationMessage??"",this.isUpdatePending||this.performUpdate()}connectedCallback(){super.connectedCallback(),fi(this,"--no-animate",!0)}disconnectedCallback(){super.disconnectedCallback(),t(this,iy,"m",Py).call(this,null)}reconnectedCallback(){super.reconnectedCallback(),t(this,iy,"m",gy).call(this)}firstUpdated(e){super.firstUpdated(e),t(this,iy,"m",gy).call(this)}update(e){super.update(e),e.has("_invalid")&&t(this,oy,"f")&&(t(this,oy,"f").ariaInvalid=this._invalid?"true":null,t(this,fy,"f")&&(this._invalid?Jn.describe(t(this,oy,"f"),t(this,fy,"f")):Jn.removeDescription(t(this,oy,"f"),t(this,fy,"f"))))}render(){return Y`<div class="base" @click="${t(this,iy,"m",Cy)}">${"outlined"===this.variant?Y`<div class="outline" aria-hidden="true"><div class="outline-start"></div><div class="outline-notch"><div class="pseudo-label">${this._pseudoLabel} ${!this.hideRequiredMarker&&this._required?Y`&nbsp;*`:X}</div></div><div class="outline-end"></div></div>`:X}<div class="prefix"><slot name="prefix" @slotchange="${t(this,iy,"m",wy)}"></slot></div><div class="content"><span class="prefix-text"><slot name="prefix-text"></slot></span><span class="input"><slot @slotchange="${t(this,iy,"m",ky)}" @change="${t(this,iy,"m",_y)}"></slot></span><span class="suffix-text"><slot name="suffix-text"></slot></span><span class="label"><slot name="label" @slotchange="${t(this,iy,"m",yy)}"></slot>${!this.hideRequiredMarker&&this._required?Y`<span class="required-marker" aria-hidden="true">&nbsp;*</span>`:X}</span></div><div class="suffix"><slot name="suffix" @slotchange="${t(this,iy,"m",$y)}"></slot></div></div><span class="subscript" aria-hidden="true"><span class="error"><slot name="error">${this._validationMessage}</slot></span><span class="hint"><slot name="hint"></slot></span></span>`}};oy=new WeakMap,ry=new WeakMap,sy=new WeakMap,ny=new WeakMap,ly=new WeakMap,cy=new WeakMap,dy=new WeakMap,hy=new WeakMap,my=new WeakMap,uy=new WeakMap,py=new WeakMap,vy=new WeakMap,fy=new WeakMap,iy=new WeakSet,by=function(){return void 0!==t(this,oy,"f")?.shouldLabelFloat?!0===t(this,oy,"f").shouldLabelFloat:"string"==typeof t(this,oy,"f")?.value&&t(this,oy,"f").value.length>0},gy=function(){t(this,dy,"f").observe(this._base),t(this,uy,"f").observe(this._base),t(this,hy,"f").observe(this._hint),t(this,iy,"m",Ty).call(this),t(this,my,"f").observe(this._error),t(this,iy,"m",zy).call(this)},yy=function(e){const t=e.target.assignedElements({flatten:!0});fi(this,"--with-label",t.length>0),this._pseudoLabel=t[0]?.textContent??""},wy=function(e){fi(this,"--with-prefix",et(e.target)),t(this,cy,"f").observe(this._prefix)},$y=function(e){fi(this,"--with-suffix",et(e.target))},xy=function(){"outlined"===this.variant&&this._base.style.setProperty("--_prefix-width",`${this._prefix.clientWidth}px`)},ky=function(e){t(this,iy,"m",Py).call(this,ay(e.target))},Cy=function(e){t(this,iy,"m",Ly).call(this,e)||!t(this,oy,"f")||t(this,py,"f")||t(this,oy,"f").disabled||(t(this,oy,"f").onContainerClick?t(this,oy,"f").onContainerClick(e):t(this,oy,"f").focus())},Sy=function(){this._invalid=!0,this.notifyControlStateChange()},_y=function(){this._invalid=!(t(this,oy,"f")?.checkValidity?.()??1),this.notifyControlStateChange()},Ey=function(){this._invalid=!1,setTimeout(()=>this.notifyControlStateChange())},Ly=function(e){return e.composed&&e.composedPath().includes(this._suffix)},Py=function(e){if(t(this,oy,"f")!==e&&(t(this,oy,"f")&&(t(this,vy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,vy,"f")),t(this,fy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,fy,"f")),t(this,ly,"f").unobserve(t(this,oy,"f")),t(this,oy,"f").removeEventListener("invalid",t(this,ny,"f")),t(this,oy,"f").form?.removeEventListener("reset",t(this,sy,"f")),t(this,ry,"f")?.call(this),a(this,ry,void 0,"f")),a(this,oy,e,"f"),["INPUT","TEXTAREA"].includes(t(this,oy,"f")?.tagName??"")?this._base.style.setProperty("--_form-field-cursor","text"):this._base.style.removeProperty("--_form-field-cursor"),fi(this,"--with-select","M3E-SELECT"===t(this,oy,"f")?.tagName),ui(this,"--with-select")&&this._base.style.setProperty("--_form-field-cursor","pointer"),t(this,oy,"f"))){t(this,ly,"f").observe(t(this,oy,"f")),t(this,oy,"f").addEventListener("invalid",t(this,ny,"f")),t(this,oy,"f").form?.addEventListener("reset",t(this,sy,"f")),t(this,oy,"f").removeAttribute("aria-invalid"),t(this,vy,"f")&&Jn.describe(t(this,oy,"f"),t(this,vy,"f")),this.notifyControlStateChange();const e=t(this,oy,"f").tagName.toLowerCase();e.startsWith("m3e-")&&!customElements.get(e)?customElements.whenDefined(e).then(()=>t(this,iy,"m",My).call(this)):t(this,iy,"m",My).call(this)}},My=function(){t(this,oy,"f")&&a(this,ry,tt(t(this,oy,"f"),"value",{set:(e,t)=>{t(e),this.notifyControlStateChange(!0)}}),"f")},Ty=function(){const e=Qe(this._hint,!0);e!==t(this,vy,"f")&&(t(this,oy,"f")&&t(this,vy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,vy,"f")),a(this,vy,e,"f"),t(this,oy,"f")&&t(this,vy,"f")&&Jn.describe(t(this,oy,"f"),t(this,vy,"f")))},zy=function(){const e=Qe(this._error,!0);e!==t(this,fy,"f")&&(t(this,oy,"f")&&t(this,fy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,fy,"f")),a(this,fy,e,"f"),t(this,oy,"f")&&t(this,fy,"f")&&this._invalid&&Jn.describe(t(this,oy,"f"),t(this,fy,"f")))},it(c`m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { user-select: none; color: currentColor; transition: opacity ${Xi.motion.duration.extraLong1}; } m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) input::placeholder, m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) textarea::placeholder { opacity: 0; transition: opacity 0s; } m3e-form-field[variant="outlined"] m3e-input-chip-set { margin-block: calc(calc(3.5rem + ${Xi.density.calc(-3)}) / 4); } m3e-form-field[variant="outlined"] textarea { margin-block: calc( var(--m3e-form-field-label-line-height, var(--md-sys-typescale-body-small-line-height, 1rem)) / 2 ); } @media (prefers-reduced-motion) { m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { transition: none !important; } }`),Ay.styles=c`:host { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: var(--m3e-form-field-font-size, ${Xi.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${Xi.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${Xi.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${Xi.typescale.standard.body.large.tracking}); width: var(--m3e-form-field-width, 14.5rem); color: var(--_form-field-color); } :host(:not(:is(:state(--disabled), :--disabled))) .base { cursor: var(--_form-field-cursor); } .base { display: flex; align-items: center; position: relative; min-height: calc(3.5rem + ${Xi.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); --_form-field-label-line-height: var( --m3e-form-field-label-line-height, ${Xi.typescale.standard.body.small.lineHeight} ); } .content { display: flex; align-items: center; position: relative; flex: 1 1 auto; min-width: 0; min-height: var(--m3e-form-field-icon-size, 1.5rem); } .prefix, .suffix { display: flex; align-items: center; position: relative; user-select: none; flex: none; font-size: var(--m3e-form-field-icon-size, 1.5rem); } .prefix-text, .suffix-text { opacity: 1; transition: opacity ${Xi.motion.duration.extraLong1}; user-select: none; flex: none; } .input { display: inline-flex; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; } .label { display: flex; position: absolute; pointer-events: none; user-select: none; top: 0; left: 0; right: 0; font-size: var(--m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-label-font-weight, ${Xi.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-label-line-height, ${Xi.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-label-tracking, ${Xi.typescale.standard.body.small.tracking}); color: var(--_form-field-label-color, inherit); transition: ${l(`top ${Xi.motion.duration.short4}, \n font-size ${Xi.motion.duration.short4}, \n line-height ${Xi.motion.duration.short4}`)}; } :host(:is(:state(--with-select), :--with-select)) .label { margin-inline-end: 1.5rem; } ::slotted([slot="label"]) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .subscript { display: inline-flex; width: 100%; margin-top: 0.25rem; font-size: var(--m3e-form-field-subscript-font-size, ${Xi.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-subscript-font-weight, ${Xi.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-subscript-line-height, ${Xi.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-subscript-tracking, ${Xi.typescale.standard.body.small.tracking}); min-height: var(--m3e-form-field-subscript-line-height, ${Xi.typescale.standard.body.small.lineHeight}); color: var(--m3e-form-field-subscript-color, ${Xi.color.onSurfaceVariant}); } .error, .hint { flex: 1 1 auto; } :host([hide-subscript="always"]) .subscript { display: none; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid))) .subscript { opacity: 0; margin-top: 0.25rem; transform: translateY(-0.25rem); transition: ${l(`opacity ${Xi.motion.duration.short4}, \n transform ${Xi.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript, :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed)) .subscript { opacity: 1; transform: translateY(0); } :host(:is(:state(--invalid), :--invalid)) .hint { display: none; } :host(:not(:is(:state(--invalid), :--invalid))) .error { display: none; } ::slotted(input), ::slotted(textarea), ::slotted(select) { outline: unset; border: unset; background-color: transparent; box-shadow: none; font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed))) .label { font-size: inherit; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .prefix-text, :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(:is(:state(--with-prefix), :--with-prefix)) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(:is(:state(--with-suffix), :--with-suffix)) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix { margin-inline-start: unset; } :host(:is(:state(--with-select), :--with-select)) .suffix-text { display: none; } :host([variant="outlined"]) .label { margin-top: calc(0px - var(--_form-field-label-line-height) / 2); } :host([variant="outlined"]) .outline { position: absolute; display: flex; pointer-events: none; left: 0; top: 0; bottom: 0; right: 0; } :host([variant="outlined"]) .pseudo-label { visibility: hidden; margin-inline-end: 0.5rem; font-size: var(--_form-field-label-font-size); line-height: var(--_form-field-label-line-height); letter-spacing: var(--_form-field-label-tracking); max-width: 100%; transition-property: max-width, margin-inline-end; transition-duration: 1ms; } :host( :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label)) ) .pseudo-label, :host( :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label)) ) .required-marker { display: none; } :host([variant="outlined"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${Xi.motion.duration.short2}; } :host([variant="outlined"]) .outline-start, :host([variant="outlined"]) .outline-notch, :host([variant="outlined"]) .outline-end { box-sizing: border-box; border-width: var(--_form-field-outline-size, 1px); border-color: var(--_form-field-outline-color); transition: border-color ${Xi.motion.duration.short4}; } :host([variant="outlined"]:not(:is(:state(--with-label), :--with-label))) .outline-notch { display: none; } :host([variant="outlined"]) .outline-start { min-width: 0.75rem; border-top-style: solid; border-inline-start-style: solid; border-bottom-style: solid; border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); } :host([variant="outlined"]) .outline-notch { border-bottom-style: solid; } :host([variant="outlined"]) .outline-end { flex-grow: 1; min-width: 1rem; border-top-style: solid; border-inline-end-style: solid; border-bottom-style: solid; border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); } :host([variant="outlined"]:is(:state(--with-prefix), :--with-prefix)) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed)) .outline { --_form-field-outline-size: 2px; } :host([variant="outlined"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="outlined"]) .content { min-height: calc(3.5rem + ${Xi.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { margin-top: unset; line-height: calc(3.5rem + ${Xi.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); } :host([variant="filled"]) .base { --_select-arrow-margin-top: calc( 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1)) ); } :host([variant="filled"]) .base::before { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; border-bottom-style: solid; border-width: 1px; border-radius: var(--m3e-form-field-container-shape, ${Xi.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled))) .base:hover::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed)) .base::before { border-width: 3px; } :host([variant="filled"]) .base::after { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--_form-field-hover-container-color); transition: background-color ${Xi.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${Xi.density.calc(-3)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: max(0px, calc(0.5rem + ${Xi.density.calc(-3)})); } :host( [variant="filled"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { top: 0px; line-height: calc(3.5rem + ${Xi.density.calc(-3)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--pressed))) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${Xi.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) { color: var(--m3e-form-field-color, ${Xi.color.onSurface}); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${Xi.color.outline}); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${Xi.color.onSurfaceVariant}); } :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${Xi.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${Xi.color.primary}); } :host(:not(:is(:state(--disabled), :--disabled))) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${Xi.color.surfaceContainerHighest} ); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${Xi.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${Xi.color.error}); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript { color: var(--m3e-form-field-invalid-color, ${Xi.color.error}); } :host(:is(:state(--disabled), :--disabled)) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${Xi.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(:is(:state(--disabled), :--disabled)) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${Xi.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(:is(:state(--no-animate), :--no-animate)) *, :host(:is(:state(--no-animate), :--no-animate)) *::before, :host(:is(:state(--no-animate), :--no-animate)) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(:is(:state(--disabled), :--disabled)) { --_form-field-input-color: GrayText; --_form-field-color: GrayText; --_form-field-label-color: GrayText; --_form-field-outline-color: GrayText; } } @media (prefers-reduced-motion) { .base::before, .prefix-text, .suffix-text, .label, .subscript, .outline-start, .outline-notch, .outline-end, .pseudo-label { transition: none !important; } }`,e([ye(".base")],Ay.prototype,"_base",void 0),e([ye(".prefix")],Ay.prototype,"_prefix",void 0),e([ye(".suffix")],Ay.prototype,"_suffix",void 0),e([ye(".error")],Ay.prototype,"_error",void 0),e([ye(".hint")],Ay.prototype,"_hint",void 0),e([be()],Ay.prototype,"_pseudoLabel",void 0),e([be()],Ay.prototype,"_required",void 0),e([be()],Ay.prototype,"_invalid",void 0),e([be()],Ay.prototype,"_validationMessage",void 0),e([fe({reflect:!0})],Ay.prototype,"variant",void 0),e([fe({attribute:"hide-required-marker",type:Boolean,reflect:!0})],Ay.prototype,"hideRequiredMarker",void 0),e([fe({attribute:"hide-subscript",reflect:!0})],Ay.prototype,"hideSubscript",void 0),e([fe({attribute:"float-label",reflect:!0})],Ay.prototype,"floatLabel",void 0),Ay=e([Aa("m3e-form-field")],Ay);let Iy=class extends me{constructor(){super(...arguments),this.emphasized=!1,this.variant="display",this.size="medium"}update(e){super.update(e),e.has("level")&&(this.ariaLevel=void 0!==this.level?`${this.level}`:null,this.role=this.ariaLevel?"heading":null)}render(){return Y`<slot></slot>`}};var Dy,Wy,Hy,Oy,By;Iy.styles=c`:host { display: block; } :host([variant="display"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.display.large.fontSize}; font-weight: ${Xi.typescale.standard.display.large.fontWeight}; line-height: ${Xi.typescale.standard.display.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.display.large.tracking}; } :host([variant="display"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.display.medium.fontSize}; font-weight: ${Xi.typescale.standard.display.medium.fontWeight}; line-height: ${Xi.typescale.standard.display.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.display.medium.tracking}; } :host([variant="display"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.display.small.fontSize}; font-weight: ${Xi.typescale.standard.display.small.fontWeight}; line-height: ${Xi.typescale.standard.display.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.display.small.tracking}; } :host([variant="headline"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.headline.large.fontSize}; font-weight: ${Xi.typescale.standard.headline.large.fontWeight}; line-height: ${Xi.typescale.standard.headline.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.headline.large.tracking}; } :host([variant="headline"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.headline.medium.fontSize}; font-weight: ${Xi.typescale.standard.headline.medium.fontWeight}; line-height: ${Xi.typescale.standard.headline.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.headline.medium.tracking}; } :host([variant="headline"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.headline.small.fontSize}; font-weight: ${Xi.typescale.standard.headline.small.fontWeight}; line-height: ${Xi.typescale.standard.headline.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.headline.small.tracking}; } :host([variant="title"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.title.large.fontSize}; font-weight: ${Xi.typescale.standard.title.large.fontWeight}; line-height: ${Xi.typescale.standard.title.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.title.large.tracking}; } :host([variant="title"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.title.medium.fontSize}; font-weight: ${Xi.typescale.standard.title.medium.fontWeight}; line-height: ${Xi.typescale.standard.title.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.title.medium.tracking}; } :host([variant="title"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.title.small.fontSize}; font-weight: ${Xi.typescale.standard.title.small.fontWeight}; line-height: ${Xi.typescale.standard.title.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.title.small.tracking}; } :host([variant="label"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.label.large.fontSize}; font-weight: ${Xi.typescale.standard.label.large.fontWeight}; line-height: ${Xi.typescale.standard.label.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.label.large.tracking}; } :host([variant="label"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.label.medium.fontSize}; font-weight: ${Xi.typescale.standard.label.medium.fontWeight}; line-height: ${Xi.typescale.standard.label.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.label.medium.tracking}; } :host([variant="label"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.label.small.fontSize}; font-weight: ${Xi.typescale.standard.label.small.fontWeight}; line-height: ${Xi.typescale.standard.label.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.label.small.tracking}; } :host([variant="display"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.display.large.fontSize}; font-weight: ${Xi.typescale.emphasized.display.large.fontWeight}; line-height: ${Xi.typescale.emphasized.display.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.display.large.tracking}; } :host([variant="display"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.display.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.display.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.display.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.display.medium.tracking}; } :host([variant="display"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.display.small.fontSize}; font-weight: ${Xi.typescale.emphasized.display.small.fontWeight}; line-height: ${Xi.typescale.emphasized.display.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.display.small.tracking}; } :host([variant="headline"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.headline.large.fontSize}; font-weight: ${Xi.typescale.emphasized.headline.large.fontWeight}; line-height: ${Xi.typescale.emphasized.headline.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.headline.large.tracking}; } :host([variant="headline"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.headline.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.headline.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.headline.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.headline.medium.tracking}; } :host([variant="headline"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.headline.small.fontSize}; font-weight: ${Xi.typescale.emphasized.headline.small.fontWeight}; line-height: ${Xi.typescale.emphasized.headline.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.headline.small.tracking}; } :host([variant="title"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.title.large.fontSize}; font-weight: ${Xi.typescale.emphasized.title.large.fontWeight}; line-height: ${Xi.typescale.emphasized.title.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.title.large.tracking}; } :host([variant="title"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.title.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.title.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.title.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.title.medium.tracking}; } :host([variant="title"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.title.small.fontSize}; font-weight: ${Xi.typescale.emphasized.title.small.fontWeight}; line-height: ${Xi.typescale.emphasized.title.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.title.small.tracking}; } :host([variant="label"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.label.large.fontSize}; font-weight: ${Xi.typescale.emphasized.label.large.fontWeight}; line-height: ${Xi.typescale.emphasized.label.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.label.large.tracking}; } :host([variant="label"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.label.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.label.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.label.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.label.medium.tracking}; } :host([variant="label"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.label.small.fontSize}; font-weight: ${Xi.typescale.emphasized.label.small.fontWeight}; line-height: ${Xi.typescale.emphasized.label.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.label.small.tracking}; }`,e([fe({type:Boolean,reflect:!0})],Iy.prototype,"emphasized",void 0),e([fe({reflect:!0})],Iy.prototype,"variant",void 0),e([fe({reflect:!0})],Iy.prototype,"size",void 0),e([fe({type:Number})],Iy.prototype,"level",void 0),Iy=e([Aa("m3e-heading")],Iy);const Ry=/^[MmLlHhVvCcSsQqTtAaZz0-9.,\s-]+$/,Fy=/^-?\d+(\.\d+)?\s+-?\d+(\.\d+)?\s+-?\d+(\.\d+)?\s+-?\d+(\.\d+)?$/;class Vy{static addIcon(e,a,i){const o="string"==typeof i.outlined,r="string"==typeof i.filled;if("string"==typeof i.outlined&&(i.outlined={viewBox:"0 -960 960 960",path:i.outlined}),"string"==typeof i.filled&&(i.filled={viewBox:"0 -960 960 960",path:i.filled}),t(this,Dy,"m",By).call(this,e,a,i.outlined,o),t(this,Dy,"m",By).call(this,e,a,i.filled,r),"undefined"==typeof window)return;const s=t(this,Dy,"m",Oy).call(this,e,a);t(this,Dy,"f",Wy).set(s,{outlined:K`<svg viewBox="${i.outlined.viewBox}"><path d="${i.outlined.path}"/></svg>`,filled:K`<svg viewBox="${i.filled.viewBox}"><path d="${i.filled.path}"/></svg>`}),t(this,Dy,"f",Hy).get(s)?.forEach(e=>e())}static isIconRegistered(e,a){return void 0!==window&&t(this,Dy,"f",Wy).has(t(this,Dy,"m",Oy).call(this,e,a))}static renderIcon(e,a,i){const o=t(this,Dy,"f",Wy).get(t(this,Dy,"m",Oy).call(this,e,a));return i?o?.filled:o?.outlined}static observe(e,a,i){if(void 0===window)return()=>{};const o=t(this,Dy,"m",Oy).call(this,e,a);return t(this,Dy,"f",Hy).has(o)?t(this,Dy,"f",Hy).get(o)?.push(i):t(this,Dy,"f",Hy).set(o,[i]),()=>{const e=t(this,Dy,"f",Hy).get(o);if(e){const a=e.indexOf(i);a>=0&&e.splice(a,1),0==e.length&&t(this,Dy,"f",Hy).delete(o)}}}}var Ny;Dy=Vy,Oy=function(e,t){return`${t}-${e}`},By=function(e,t,a,i=!1){if(!i&&!Fy.test(a.viewBox))throw new Error(`Unable to register icon '${e}' for variant '${t}'. Invalid viewbox data.`);if(!Ry.test(a.path))throw new Error(`Unable to register icon '${e}' for variant '${t}'. Invalid path data.`)},Wy={value:new Map},Hy={value:new Map};let qy=class extends(qo(me,"img")){constructor(){super(...arguments),Ny.set(this,void 0),this.name="",this.variant="outlined",this.filled=!1,this.grade="medium",this.weight=400,this.opticalSize=24}connectedCallback(){this.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby")||this.hasAttribute("aria-hidden")||(this.ariaHidden="true"),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),t(this,Ny,"f")?.call(this)}willUpdate(e){super.willUpdate(e),e.has("name")&&!Vy.isIconRegistered(this.name,this.variant)&&a(this,Ny,Vy.observe(this.name,this.variant,()=>{this.requestUpdate(),t(this,Ny,"f")?.call(this),a(this,Ny,void 0,"f")}),"f")}updated(e){super.updated(e),e.has("filled")&&this._icon?.style.setProperty("--_icon-fill",this.filled?"1":"0"),e.has("grade")&&this._icon?.style.setProperty("--_icon-grade","low"===this.grade?"-25":"high"===this.grade?"200":"0"),e.has("weight")&&this._icon?.style.setProperty("--_icon-weight",`${this.weight}`),e.has("opticalSize")&&this._icon?.style.setProperty("--_icon-optical-size",`${this.opticalSize}`)}render(){return Vy.isIconRegistered(this.name,this.variant)?Vy.renderIcon(this.name,this.variant,this.filled):Y`<div class="icon" aria-hidden="true" translate="no">${this.name}</div>`}};function Uy(e,t,a){Vy.addIcon(e,t,a)}var jy,Yy,Ky,Zy,Xy,Gy,Qy;Ny=new WeakMap,qy.styles=c`:host { display: inline-block; user-select: none; font-size: var(--m3e-icon-size, 1.5rem); width: 1em; height: 1em; vertical-align: middle; overflow: hidden; } .icon { font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; width: inherit; height: inherit; vertical-align: inherit; font-variation-settings: "FILL" var(--_icon-fill, 0), "wght" var(--_icon-weight, 400), "GRAD" var(--_icon-grade, 0), "opsz" var(--_icon-optical-size, 24); } :host([variant="outlined"]) .icon { font-family: "Material Symbols Outlined"; } :host([variant="rounded"]) .icon { font-family: "Material Symbols Rounded"; } :host([variant="sharp"]) .icon { font-family: "Material Symbols Sharp"; } svg { fill: currentColor; font-size: inherit; width: 1em; height: 1em; }`,e([ye(".icon")],qy.prototype,"_icon",void 0),e([fe()],qy.prototype,"name",void 0),e([fe({reflect:!0})],qy.prototype,"variant",void 0),e([fe({type:Boolean,reflect:!0})],qy.prototype,"filled",void 0),e([fe()],qy.prototype,"grade",void 0),e([fe({type:Number})],qy.prototype,"weight",void 0),e([fe({attribute:"optical-size",type:Number})],qy.prototype,"opticalSize",void 0),qy=e([Aa("m3e-icon")],qy);let Jy=class extends(Bo(mi(qo(me,"listitem")))){constructor(){super(...arguments),jy.add(this),Yy.set(this,new za(this,{target:null,callback:()=>t(this,jy,"m",Gy).call(this)})),Ky.set(this,void 0),Zy.set(this,void 0)}get leadingContentType(){return t(this,Ky,"f")}get trailingContentType(){return t(this,Zy,"f")}reconnectedCallback(){super.reconnectedCallback(),t(this,jy,"m",Xy).call(this)}firstUpdated(e){super.firstUpdated(e),t(this,jy,"m",Xy).call(this)}render(){return Y`<div class="base">${this._renderBase()}</div>`}_renderBase(){return Y`<slot name="leading" @slotchange="${this._handleLeadingSlotChange}"><slot name="leading-icon" @slotchange="${this._handleLeadingSlotChange}"></slot></slot><div class="content"><slot name="overline"></slot><slot></slot><slot name="supporting-text"></slot></div><slot name="trailing" @slotchange="${this._handleTrailingSlotChange}"><slot name="trailing-supporting-text" @slotchange="${this._handleTrailingSlotChange}"></slot><slot name="trailing-icon" @slotchange="${this._handleTrailingSlotChange}"></slot></slot>`}_handleLeadingSlotChange(e){const i=t(this,Ky,"f");a(this,Ky,t(this,jy,"m",Qy).call(this,e.target),"f"),fi(this,"--has-leading",void 0!==t(this,Ky,"f")),i!==t(this,Ky,"f")&&this.closest("m3e-list,m3e-action-list,m3e-selection-list")?.notifyLeadingContentTypeChange(i,t(this,Ky,"f"))}_handleTrailingSlotChange(e){const i=t(this,Zy,"f");a(this,Zy,t(this,jy,"m",Qy).call(this,e.target),"f"),fi(this,"--has-trailing",void 0!==t(this,Zy,"f")),i!==t(this,Zy,"f")&&this.closest("m3e-list,m3e-action-list,m3e-selection-list")?.notifyTrailingContentTypeChange(i,t(this,Zy,"f"))}};var ew,tw,aw,iw,ow;Yy=new WeakMap,Ky=new WeakMap,Zy=new WeakMap,jy=new WeakSet,Xy=function(){const e=this.shadowRoot?.querySelector(".content");e&&t(this,Yy,"f").observe(e)},Gy=function(){const e=this.shadowRoot?.querySelector(".content")??null,t=null===e?0:He(e);fi(this,"--one-line",t<=1),fi(this,"--two-line",2==t),fi(this,"--three-line",t>2)},Qy=function(e){const t=e.assignedElements({flatten:!0});return t.some(e=>"VIDEO"===e.tagName)?"video":t.some(e=>"IMG"===e.tagName)?"image":t.some(e=>"M3E-AVATAR"===e.tagName)?"avatar":t.some(e=>"M3E-ICON"===e.tagName)?"icon":t.length>0?"text":void 0},Jy.styles=c`:host { display: block; } .base { display: flex; min-height: inherit; width: 100%; box-sizing: border-box; column-gap: var(--m3e-list-item-between-space, 1rem); padding-inline-start: var(--m3e-list-item-leading-space, 1rem); padding-inline-end: var(--m3e-list-item-trailing-space, 1rem); border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); transition: ${l(`border-radius ${Xi.motion.spring.fastEffects}, background-color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } :host(:is(:state(--one-line), :--one-line)) { min-height: calc(var(--m3e-list-item-one-line-height, 3.5rem) + ${Xi.density.calc(-3)}); } :host(:is(:state(--one-line), :--one-line)) .base { padding-block-start: var(--m3e-list-item-one-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-one-line-bottom-space, 0.5rem); } :host(:is(:state(--two-line), :--two-line)) { min-height: calc(var(--m3e-list-item-two-line-height, 4.5rem) + ${Xi.density.calc(-3)}); } :host(:is(:state(--two-line), :--two-line)) .base { padding-block-start: var(--m3e-list-item-two-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-two-line-bottom-space, 0.5rem); } :host(:is(:state(--three-line), :--three-line)) { min-height: calc(var(--m3e-list-item-three-line-height, 5.5rem) + ${Xi.density.calc(-3)}); } :host(:is(:state(--three-line), :--three-line)) .base { padding-block-start: var(--m3e-list-item-three-line-top-space, 0.75rem); padding-block-end: var(--m3e-list-item-three-line-bottom-space, 0.75rem); } :host(:not(:is(:state(--three-line), :--three-line))) .base { align-items: center; } :host(:is(:state(--three-line), :--three-line)) .base { align-items: flex-start; } :host(:not(:disabled):not([selected])) .base:not(.hover).focus-visible:not(.pressed) { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); } :host(:not(:disabled):not([selected])) .base.hover, :host(:not(:disabled):not([selected])) .base.pressed { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); } .content { flex: 1 1 auto; display: flex; flex-direction: column; align-items: unset; justify-content: unset; } ::slotted([slot="overline"]) { font-size: var(--m3e-list-item-overline-font-size, ${Xi.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-list-item-overline-font-weight, ${Xi.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-list-item-overline-line-height, ${Xi.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-list-item-overline-tracking, ${Xi.typescale.standard.label.small.tracking}); } ::slotted([slot="supporting-text"]) { font-size: var(--m3e-list-item-supporting-text-font-size, ${Xi.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-list-item-supporting-text-font-weight, ${Xi.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-list-item-supporting-text-line-height, ${Xi.typescale.standard.body.medium.lineHeight} ); letter-spacing: var( --m3e-list-item-supporting-text-tracking, ${Xi.typescale.standard.body.medium.tracking} ); } ::slotted(:not([slot])) { font-size: var(--m3e-list-item-font-size, ${Xi.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-list-item-font-weight, ${Xi.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-list-item-line-height, ${Xi.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-list-item-tracking, ${Xi.typescale.standard.body.large.tracking}); } :host(:is(:state(--has-leading), :--has-leading)) slot[name="leading"], :host(:is(:state(--has-trailing), :--has-trailing)) slot[name="trailing"] { display: flex; justify-content: center; } :host(:not(:is(:state(--has-leading), :--has-leading))) slot[name="leading"] { display: var(--_list-item-leading-reserved-display, contents); } :host(:not(:is(:state(--has-trailing), :--has-trailing))) slot[name="trailing"] { display: var(--_list-item-trailing-reserved-display, contents); } slot[name="leading"] { min-width: var(--_list-item-leading-reserved-space, 0px); margin-inline-start: calc(0px - var(--_list-item-leading-reserved-outset, 0px)); } slot[name="trailing"] { min-width: var(--_list-item-trailing-reserved-space, 0px); margin-inline-end: calc(0px - var(--_list-item-trailing-reserved-outset, 0px)); } ::slotted(span[slot="trailing"]), ::slotted([slot="trailing-supporting-text"]) { white-space: nowrap; font-size: var(--m3e-list-item-trailing-text-font-size, ${Xi.typescale.standard.label.small.fontSize}); font-weight: var( --m3e-list-item-trailing-text-font-weight, ${Xi.typescale.standard.label.small.fontWeight} ); line-height: var( --m3e-list-item-trailing-text-line-height, ${Xi.typescale.standard.label.small.lineHeight} ); letter-spacing: var( --m3e-list-item-trailing-text-tracking, ${Xi.typescale.standard.label.small.tracking} ); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]), ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { display: block; margin: 0 auto; overflow: hidden; object-fit: cover; } ::slotted(video) { width: var(--m3e-list-item-video-width, 6.25rem); height: var(--m3e-list-item-video-height, 3.5rem); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]) { border-radius: var(--m3e-list-item-video-shape, ${Xi.shape.corner.none}); } ::slotted(video[slot="leading"]) { margin-inline-start: calc(0px - var(--_list-item-leading-video-outset, 0px)); } ::slotted(video[slot="trailing"]) { margin-inline-end: calc(0px - var(--_list-item-trailing-video-outset, 0px)); } ::slotted(img) { user-drag: none; user-select: none; pointer-events: none; width: var(--m3e-list-item-image-width, 3.5rem); height: var(--m3e-list-item-image-height, 3.5rem); } ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { border-radius: var(--m3e-list-item-image-shape, ${Xi.shape.corner.none}); } ::slotted(m3e-icon[slot="leading"]), ::slotted(m3e-icon[slot="leading-icon"]), ::slotted(m3e-icon[slot="trailing"]), ::slotted(m3e-icon[slot="trailing-icon"]) { --m3e-icon-size: var(--m3e-list-item-icon-size, 1.5rem); } :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading"]), :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading-icon"]) { color: var(--m3e-list-item-leading-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) .content { color: var(--m3e-list-item-label-text-color, ${Xi.color.onSurface}); } :host(:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-overline-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-supporting-text-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="trailing"]), :host(:not(:disabled)) ::slotted([slot="trailing-supporting-text"]), :host(:not(:disabled)) ::slotted([slot="trailing-icon"]) { color: var(--m3e-list-item-trailing-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) .base { background-color: var(--_list-item-container-color, var(--m3e-list-item-container-color, transparent)); } :host(:disabled) .base { background-color: var(--m3e-list-item-disabled-container-color, transparent); } :host(:disabled) ::slotted(video), :host(:disabled) ::slotted(img), :host(:disabled) ::slotted(m3e-avatar) { opacity: var(--m3e-list-item-disabled-media-opacity, 38%); } :host(:disabled) .content { color: color-mix( in srgb, var(--m3e-list-item-disabled-label-text-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="overline"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-overline-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-overline-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="supporting-text"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-supporting-text-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-supporting-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-leading-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-leading-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-trailing-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-trailing-opacity, 38%), transparent ); } :host(:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var(--m3e-list-item-hover-state-layer-color, ${Xi.color.onSurface}); --m3e-state-layer-hover-opacity: var( --m3e-list-item-hover-state-layer-opacity, ${Xi.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var(--m3e-list-item-focus-state-layer-color, ${Xi.color.onSurface}); --m3e-state-layer-focus-opacity: var( --m3e-list-item-focus-state-layer-opacity, ${Xi.state.focusStateLayerOpacity} ); } :host(:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-pressed-state-layer-color, ${Xi.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-pressed-state-layer-opacity, ${Xi.state.pressedStateLayerOpacity} ); } @media (forced-colors: active) { .base { transition: none; } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]), :host(:disabled) .content, :host(:disabled) ::slotted([slot="overline"]), :host(:disabled) ::slotted([slot="supporting-text"]), :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`,Jy=e([Aa("m3e-list-item")],Jy);let rw=class extends(mi(qo(me,"list"))){constructor(){super(...arguments),ew.add(this),tw.set(this,new Array),aw.set(this,{video:0,image:0,avatar:0,icon:0,text:0}),iw.set(this,{video:0,image:0,avatar:0,icon:0,text:0}),this.variant="standard"}get items(){return t(this,tw,"f")}get leadingContentType(){return t(this,aw,"f").video>0?"video":t(this,aw,"f").image>0?"image":t(this,aw,"f").avatar>0?"avatar":t(this,aw,"f").icon>0?"icon":t(this,aw,"f").text>0?"text":void 0}get trailingContentType(){return t(this,iw,"f").video>0?"video":t(this,iw,"f").image>0?"image":t(this,iw,"f").avatar>0?"avatar":t(this,iw,"f").icon>0?"icon":t(this,iw,"f").text>0?"text":void 0}render(){return Y`<slot @slotchange="${t(this,ew,"m",ow)}"></slot>`}notifyItemsChange(){}notifyLeadingContentTypeChange(e,a){e&&t(this,aw,"f")[e]--,a&&t(this,aw,"f")[a]++,["video","image","avatar","icon"].forEach(e=>{fi(this,`--has-leading-${e}`,this.leadingContentType===e)})}notifyTrailingContentTypeChange(e,a){e&&t(this,iw,"f")[e]--,a&&t(this,iw,"f")[a]--,["video","image","avatar","icon"].forEach(e=>{fi(this,`--has-trailing-${e}`,this.trailingContentType===e)})}};var sw,nw,lw,cw,dw,hw,mw,uw,pw;tw=new WeakMap,aw=new WeakMap,iw=new WeakMap,ew=new WeakSet,ow=function(e){a(this,tw,e.target.assignedElements({flatten:!0}).filter(e=>e instanceof Jy),"f"),t(this,tw,"f").forEach((e,a)=>{fi(e,"--first",0===a),fi(e,"--last",a===t(this,tw,"f").length-1)}),this.notifyItemsChange()},rw.styles=c`:host { display: flex; flex-direction: column; overflow-y: auto; box-sizing: border-box; padding-block: var(--m3e-list-block-padding, 0px); --m3e-divider-inset-start-size: var(--m3e-list-divider-inset-start-size, 1rem); --m3e-divider-inset-end-size: var(--m3e-list-divider-inset-end-size, 1.5rem); } :host([variant="standard"]) { --_list-item-leading-video-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-video-outset: var(--m3e-list-item-trailing-space, 1rem); --_expandable-list-item-expanded-toggle-icon-container-color: transparent; } :host([variant="segmented"]) { row-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); } :host([variant="segmented"]) { --m3e-list-item-container-color: var(--m3e-segmented-list-item-container-color, ${Xi.color.surface}); --m3e-list-item-disabled-container-color: var( --m3e-segmented-list-item-disabled-container-color, ${Xi.color.surface} ); --m3e-list-item-container-shape: var( --m3e-segmented-list-item-container-shape, ${Xi.shape.corner.extraSmall} ); --m3e-list-item-hover-container-shape: var( --m3e-segmented-list-item-hover-container-shape, ${Xi.shape.corner.medium} ); --m3e-list-item-focus-container-shape: var( --m3e-segmented-list-item-focus-container-shape, ${Xi.shape.corner.large} ); --m3e-list-item-selected-container-shape: var( --m3e-segmented-list-item-selected-container-shape, ${Xi.shape.corner.large} ); --m3e-list-item-video-shape: var(--m3e-segmented-list-item-video-shape, ${Xi.shape.corner.small}); --m3e-list-item-image-shape: var(--m3e-segmented-list-item-image-shape, ${Xi.shape.corner.small}); --m3e-list-item-between-space: var(--m3e-segmented-list-item-spacing, 0.75rem); --_expandable-list-item-items-segment-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); --_expandable-list-item-expanded-top-shape: var( --m3e-segmented-list-container-shape, ${Xi.shape.corner.large} ); } :host([variant="segmented"]) ::slotted(:is(:state(--first), :--first)), :host([variant="segmented"]) ::slotted(:is(:state(--has-previous-open), :--has-previous-open):not([open])) { --_list-item-top-container-shape: var(--m3e-segmented-list-container-shape, ${Xi.shape.corner.large}); } :host([variant="segmented"]) ::slotted(:is(:state(--has-next-open), :--has-next-open):not([open])), :host([variant="segmented"]) ::slotted(:is(:state(--last), :--last)) { --_list-item-bottom-container-shape: var(--m3e-segmented-list-container-shape, ${Xi.shape.corner.large}); } :host([variant="segmented"]) ::slotted(m3e-divider) { display: none; } :host(:is(:state(--has-leading-video), :--has-leading-video)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-video-width, 6.25rem); } :host([variant="standard"]:is(:state(--has-leading-video), :--has-leading-video)) { --_list-item-leading-reserved-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-reserved-outset: var(--m3e-list-item-trailing-space, 1rem); } :host(:is(:state(--has-leading-image), :--has-leading-image)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-image-width, 3.5rem); } :host(:is(:state(--has-leading-avatar), :--has-leading-avatar)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-avatar-size, 2.5rem); } :host(:is(:state(--has-leading-icon), :--has-leading-icon)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-icon-size, 1.5rem); }`,e([fe({reflect:!0})],rw.prototype,"variant",void 0),rw=e([Aa("m3e-list")],rw);let vw=pw=class extends Jy{constructor(){super(...arguments),sw.add(this),nw.set(this,pw.__nextId++),lw.set(this,`m3e-expandable-list-item-${t(this,nw,"f")}-content`),cw.set(this,`m3e-expandable-list-item-${t(this,nw,"f")}-header`),dw.set(this,new Array),this.disabled=!1,this.open=!1}get items(){return t(this,dw,"f")}focus(e){this.button?.focus(e)}blur(){this.button?.blur()}click(){this.button?.click()}updated(e){if(super.updated(e),e.has("open")){for(let e=this.previousElementSibling;e;e=e.previousElementSibling)if(e instanceof Jy){fi(e,"--has-next-open",this.open);break}for(let e=this.nextElementSibling;e;e=e.nextElementSibling)if(e instanceof Jy){fi(e,"--has-previous-open",this.open);break}}}render(){return Y`<div class="base"><m3e-list-item-button id="${t(this,cw,"f")}" class="header" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="${t(this,lw,"f")}" @click="${t(this,sw,"m",hw)}"><slot name="leading" slot="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><slot name="overline" slot="overline"></slot><slot></slot><slot name="supporting-text" slot="supporting-text"></slot><div class="toggle-container" slot="trailing" aria-hidden="true"><div class="toggle"><slot name="toggle-icon"><svg viewBox="0 -960 960 960" fill="currentColor"><path d="M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"/></svg></slot></div></div></m3e-list-item-button><m3e-collapsible id="${t(this,lw,"f")}" class="items" role="list" aria-labelledby="${t(this,cw,"f")}" ?open="${this.open}" @opening="${t(this,sw,"m",mw)}" @opened="${t(this,sw,"m",mw)}" @closing="${t(this,sw,"m",mw)}" @closed="${t(this,sw,"m",mw)}"><slot name="items" @slotchange="${t(this,sw,"m",uw)}"></slot></m3e-collapsible></div>`}};var fw,bw;nw=new WeakMap,lw=new WeakMap,cw=new WeakMap,dw=new WeakMap,sw=new WeakSet,hw=function(e){e.defaultPrevented||(this.open=!this.open,this.closest("m3e-action-list")?.[An].updateActiveItem(this.button))},mw=function(e){e.stopPropagation(),["opening","opened","closing","closed"].forEach(t=>{this.button?.classList.toggle(t,e.type===t)}),this.dispatchEvent(new Event(e.type,{bubbles:!0}))},uw=function(e){a(this,dw,e.target.assignedElements({flatten:!0}).flatMap(e=>[...e.childNodes].filter(e=>e instanceof Jy)),"f"),t(this,dw,"f").forEach((e,a)=>{a==t(this,dw,"f").length-1?e.style.setProperty("--_list-item-bottom-container-shape",`var(--m3e-segmented-list-container-shape, ${Xi.shape.corner.large})`):e.style.removeProperty("--_list-item-bottom-container-shape")}),this.closest("m3e-list, m3e-action-list, m3e-selection-list")?.notifyItemsChange()},vw.styles=c`:host { display: block; } .header { width: 100%; margin-bottom: 0px; transition: ${l(`margin-bottom \n var(--m3e-expandable-list-item-bounce-duration, ${Xi.motion.duration.medium1})\n ${Xi.motion.easing.standard}`)}; --_list-item-button-trailing-align-self: stretch; } .toggle-container { display: flex; align-items: center; justify-content: center; align-self: stretch; width: var(--m3e-expandable-list-item-toggle-icon-container-width, 2rem); border-radius: var(--m3e-expandable-list-item-toggle-icon-container-shape, ${Xi.shape.corner.full}); transition: ${l(`background-color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } .toggle { display: flex; align-items: center; justify-content: center; vertical-align: middle; font-size: var(--m3e-expandable-list-item-toggle-icon-size, 1.5rem); transition: ${l(`transform ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } .toggle svg, ::slotted(svg[slot="toggle-icon"]) { width: 1em; height: 1em; } :host([open]) .toggle-container { background-color: var( --_expandable-list-item-expanded-toggle-icon-container-color, var(--m3e-expandable-list-item-expanded-toggle-icon-container-color, ${Xi.color.surfaceContainer}) ); } :host([open]) .toggle { transform: rotate(180deg); } :host([open]) .header { --_list-item-top-container-shape: var(--_expandable-list-item-expanded-top-shape, initial); --_list-item-bottom-container-shape: initial; margin-bottom: var(--_expandable-list-item-items-segment-gap, 0px); } :host([open]) .header.opening { margin-bottom: calc( var(--_expandable-list-item-items-segment-gap, 0px) * var(--m3e-expandable-list-item-bounce-factor, 4) ); } :host([open]) .header, :host([open]) .items { --_list-item-container-color: var( --m3e-expandable-list-item-expanded-container-color, var(--m3e-list-item-container-color, transparent) ); } .base, ::slotted([slot="items"]) { display: flex; flex-direction: column; box-sizing: border-box; } ::slotted([slot="items"]) { flex: none; --_list-item-top-container-shape: initial; --_list-item-bottom-container-shape: initial; row-gap: var(--_expandable-list-item-items-segment-gap, 0px); } .items { --m3e-collapsible-animation-duration: var( --m3e-expandable-list-item-expand-duration, ${Xi.motion.duration.medium1} ); } @media (forced-colors: active) { .header { transition: none; } :host([open]) .header.opening { margin-bottom: var(--_expandable-list-item-items-segment-gap, 0px); } } @media (prefers-reduced-motion) { .header, .toggle-container, .toggle { transition: none; } }`,vw.__nextId=0,e([fe({type:Boolean,reflect:!0})],vw.prototype,"disabled",void 0),e([fe({type:Boolean,reflect:!0})],vw.prototype,"open",void 0),e([ye(".header")],vw.prototype,"button",void 0),vw=pw=e([Aa("m3e-expandable-list-item")],vw);let gw=class extends rw{constructor(){super(...arguments),fw.set(this,e=>this[An].onKeyDown(e)),this[bw]=(new Tn).withWrap().withHomeAndEnd().withVerticalOrientation().withSkipPredicate(e=>{if(e.disabled)return!0;const t=e.getRootNode().host;if("items"===t.parentElement?.slot){let e=t.closest("m3e-expandable-list-item");for(;e;){if(!e.open)return!0;const t=e.closest("m3e-expandable-list-item,m3e-action-list");if(!(t instanceof vw))break;e=t}}return!1})}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",t(this,fw,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,fw,"f"))}async notifyItemsChange(){const e=[...this.querySelectorAll("m3e-list-action,m3e-expandable-list-item")];for(const t of e)t.isUpdatePending&&await t.updateComplete;this.isUpdatePending&&await this.updateComplete;const{added:t}=this[An].setItems(e.map(e=>e.button));this[An].activeItem||this[An].updateActiveItem(t.find(e=>!e.disabled))}};fw=new WeakMap,bw=An,gw=e([Aa("m3e-action-list")],gw);let yw=class extends(Mo(Do(xo(Qi(mi(qo(Jy,"button"),!0)))))){constructor(){super(),new Sa(this,{callback:(e,t)=>this.shadowRoot?.querySelector(".base")?.classList.toggle("focus-visible",t)}),new Ta(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("pressed",e)}),new _a(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("hover",e)})}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this))}render(){return Y`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>${this[zo]()} ${super._renderBase()}</div>`}};var ww,$w;yw.styles=[Jy.styles,c`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } :host(:not(:disabled)) { cursor: pointer; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } slot[name="trailing"] { align-self: var(--_list-item-button-trailing-align-self, auto); }`],e([ye(".focus-ring")],yw.prototype,"_focusRing",void 0),e([ye(".state-layer")],yw.prototype,"_stateLayer",void 0),e([ye(".ripple")],yw.prototype,"_ripple",void 0),yw=e([Aa("m3e-list-item-button")],yw);let xw=class extends(Do(Jy,!0)){constructor(){super(...arguments),ww.add(this),this.disabled=!1}focus(e){this.button?.focus(e)}blur(){this.button?.blur()}click(){this.button?.click()}render(){return Y`<m3e-list-item-button class="button" ?disabled="${this.disabled}" href="${To(this.href||void 0)}" target="${To(this.target||void 0)}" download="${To(this.download||void 0)}" rel="${To(this.rel||void 0)}" @click="${t(this,ww,"m",$w)}"><slot name="leading" slot="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><slot name="overline" slot="overline"></slot><slot></slot><slot name="supporting-text" slot="supporting-text"></slot><slot name="trailing" slot="trailing" @slotchange="${this._handleTrailingSlotChange}"></slot></m3e-list-item-button>`}};var kw,Cw,Sw,_w,Ew,Lw;ww=new WeakSet,$w=function(e){e.defaultPrevented||this.closest("m3e-action-list")?.[An].updateActiveItem(this.button)},xw.styles=c`:host { display: block; } .button { width: 100%; }`,e([ye(".button")],xw.prototype,"button",void 0),e([fe({type:Boolean,reflect:!0})],xw.prototype,"disabled",void 0),xw=e([Aa("m3e-list-action")],xw);let Pw=class extends(Mo(xo(xi(Qi(mi(qo(Jy,"option"),!0)))))){constructor(){super(),kw.add(this),Cw.set(this,void 0),Sw.set(this,""),_w.set(this,e=>t(this,kw,"m",Lw).call(this,e)),new Sa(this,{callback:(e,t)=>this.shadowRoot?.querySelector(".base")?.classList.toggle("focus-visible",t)}),new Ta(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("pressed",e)}),new _a(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("hover",e)})}get value(){return t(this,Cw,"f")??t(this,Sw,"f")}set value(e){a(this,Cw,e,"f")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,_w,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,_w,"f"))}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this))}update(e){if(super.update(e),e.has("selected")){this.closest("m3e-selection-list")?.[An].notifySelectionChange(this);for(const e of this.querySelectorAll("m3e-icon"))e.toggleAttribute("filled",this.selected)}}render(){return Y`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><slot name="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><div class="content"><slot name="overline"></slot><slot @slotchange="${t(this,kw,"m",Ew)}"></slot><slot name="supporting-text"></slot></div><slot name="trailing" @slotchange="${this._handleTrailingSlotChange}"></slot><div class="indicator">${this.closest("m3e-selection-list")?.multi?Y`<m3e-pseudo-checkbox ?checked="${this.selected}" ?disabled="${this.disabled}"></m3e-pseudo-checkbox>`:Y`<m3e-pseudo-radio ?checked="${this.selected}" ?disabled="${this.disabled}"></m3e-pseudo-radio>`}</div></div>`}};var Mw,Tw,zw,Aw,Iw;Cw=new WeakMap,Sw=new WeakMap,_w=new WeakMap,kw=new WeakSet,Ew=function(e){a(this,Sw,Qe(e.target),"f")},Lw=function(e){const t=this.closest("m3e-selection-list");!e.defaultPrevented&&t&&(!t.multi&&this.selected||this.dispatchEvent(new Event("beforeinput",{bubbles:!0,cancelable:!0}))&&(this.selected=!this.selected,t[An].notifySelectionChange(this),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))))},Pw.styles=[Jy.styles,c`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } .indicator { min-width: 1.5rem; min-height: 1.5rem; display: flex; align-items: center; justify-content: center; } :host(:not(:disabled)) { cursor: pointer; } :host(:is(:state(--three-line), :--three-line)) .indicator { align-self: flex-start; margin-top: var(--m3e-list-item-three-line-top-offset, 0.25rem); } :host([selected]) .base, :host([selected]) .state-layer, :host([selected]) .ripple, :host([selected]) .focus-ring { border-radius: var(--m3e-list-item-selected-container-shape, ${Xi.shape.corner.large}); } :host([selected]:not(:disabled)) .content { color: var(--m3e-list-item-selected-label-text-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-selected-overline-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-selected-supporting-text-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="leading"]) { color: var(--m3e-list-item-selected-leading-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="trailing"]) { color: var(--m3e-list-item-selected-trailing-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) .base { background-color: var(--m3e-list-item-selected-container-color, ${Xi.color.secondaryContainer}); } :host([selected]:disabled) .base { background-color: color-mix( in srgb, var(--m3e-list-item-selected-disabled-container-color, ${Xi.color.onSurface}) var(--m3e-list-item-selected-disabled-container-opacity, 10%), transparent ); } :host([selected]:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var( --m3e-list-item-selected-hover-state-layer-color, ${Xi.color.onSurface} ); --m3e-state-layer-hover-opacity: var( --m3e-list-item-selected-hover-state-layer-opacity, ${Xi.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var( --m3e-list-item-selected-focus-state-layer-color, ${Xi.color.onSurface} ); --m3e-state-layer-focus-opacity: var( --m3e-list-item-selected-focus-state-layer-opacity, ${Xi.state.focusStateLayerOpacity} ); } :host([selected]:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-selected-pressed-state-layer-color, ${Xi.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-selected-pressed-state-layer-opacity, ${Xi.state.pressedStateLayerOpacity} ); } :host(:is(:state(--hide-selection), :--hide-selection)) .indicator, :host(:not(:is(:state(--hide-selection), :--hide-selection))) ::slotted([slot="trailing"]) { display: none; } @media (forced-colors: active) { :host([selected]:not(:disabled)) .content, :host([selected]:not(:disabled)) ::slotted([slot="overline"]), :host([selected]:not(:disabled)) ::slotted([slot="supporting-text"]), :host([selected]:not(:disabled)) ::slotted([slot="leading"]), :host([selected]:not(:disabled)) ::slotted([slot="trailing"]) { color: HighlightText; forced-color-adjust: none; } :host([selected]:not(:disabled)) .base { background-color: Highlight; } }`],e([ye(".focus-ring")],Pw.prototype,"_focusRing",void 0),e([ye(".state-layer")],Pw.prototype,"_stateLayer",void 0),e([ye(".ripple")],Pw.prototype,"_ripple",void 0),e([fe()],Pw.prototype,"value",null),Pw=e([Aa("m3e-list-option")],Pw);let Dw=class extends(no(Li(Ti(vo(Qi(mi(qo(rw,"listbox")))))))){constructor(){super(...arguments),Mw.add(this),Tw.set(this,e=>this[An].onKeyDown(e)),zw.set(this,e=>t(this,Mw,"m",Aw).call(this,e)),this[Iw]=(new In).withWrap().withHomeAndEnd().withVerticalOrientation(),this.multi=!1,this.hideSelectionIndicator=!1}get options(){return this[An]?.items??[]}get selected(){return this[An]?.selectedItems??[]}get value(){const e=this.selected.filter(e=>!e.disabled).map(e=>e.value);switch(e.length){case 0:return null;case 1:return e[0];default:return e}}get[(Tw=new WeakMap,zw=new WeakMap,Mw=new WeakSet,Iw=An,lo)](){const e=this.value;if(Array.isArray(e)){const t=new FormData;for(const a of e)t.append(this.name,a);return t}return e}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",t(this,Tw,"f")),this.addEventListener("change",t(this,zw,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,Tw,"f")),this.removeEventListener("change",t(this,zw,"f"))}update(e){super.update(e),e.has("disabled")&&(void 0!==e.get("disabled")||this.disabled)&&(this[An].disabled=this.disabled),e.has("multi")&&(this[An].multi=this.multi,this.multi?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable"),this[An].items.forEach(e=>e.requestUpdate())),e.has("hideSelectionIndicator")&&this[An].items.forEach(e=>fi(e,"--hide-selection",this.hideSelectionIndicator))}notifyItemsChange(){const{added:e}=this[An].setItems(this.items.filter(e=>e instanceof Pw));e.forEach(e=>fi(e,"--hide-selection",this.hideSelectionIndicator)),this[An].activeItem||this[An].updateActiveItem(e.find(e=>!e.disabled))}};Aw=function(e){e.target!==this&&(e.stopImmediatePropagation(),e.stopPropagation(),this.dispatchEvent(new Event("change",{bubbles:!0})))},e([fe({type:Boolean})],Dw.prototype,"multi",void 0),e([fe({attribute:"hide-selection-indicator",type:Boolean})],Dw.prototype,"hideSelectionIndicator",void 0),Dw=e([Aa("m3e-selection-list")],Dw);const Ww=l("var(--m3e-loading-indicator-size, 2.375rem)"),Hw=l(`var(--m3e-loading-indicator-active-indicator-color, ${Xi.color.primary})`),Ow=l(`var(--m3e-loading-indicator-contained-active-indicator-color, ${Xi.color.onPrimaryContainer})`),Bw=l(`var(--m3e-loading-indicator-contained-container-color, ${Xi.color.secondaryContainer})`),Rw=l(`var(--m3e-loading-indicator-container-shape, ${Xi.shape.corner.full})`),Fw=l("var(--m3e-loading-indicator-container-size, 3rem)"),Vw={"4-sided-cookie":"M230.389 50.473C293.109 23.2328 356.767 86.8908 329.527 149.611L325.023 159.981C316.707 179.13 316.707 200.87 325.023 220.019L329.527 230.389C356.767 293.109 293.109 356.767 230.389 329.527L220.019 325.023C200.87 316.707 179.13 316.707 159.981 325.023L149.611 329.527C86.8908 356.767 23.2328 293.109 50.473 230.389L54.9768 220.019C63.2934 200.87 63.2934 179.13 54.9768 159.981L50.473 149.611C23.2328 86.8908 86.8908 23.2328 149.611 50.473L159.981 54.9768C179.13 63.2934 200.87 63.2934 220.019 54.9768L230.389 50.473Z","9-sided-cookie":"M154.828 43.2756C156.574 41.8498 157.448 41.1369 158.245 40.535C177.03 26.3548 202.97 26.3548 221.755 40.535C222.552 41.1369 223.425 41.8498 225.172 43.2756C225.952 43.9121 226.342 44.2303 226.727 44.5333C235.567 51.4788 246.406 55.4147 257.652 55.7636C258.143 55.7788 258.647 55.785 259.654 55.7975C261.911 55.8255 263.039 55.8395 264.037 55.8898C287.563 57.0742 307.435 73.7107 312.689 96.6205C312.912 97.5928 313.121 98.6991 313.541 100.911C313.728 101.899 313.822 102.393 313.922 102.872C316.219 113.862 321.986 123.828 330.377 131.308C330.743 131.635 331.125 131.962 331.888 132.618C333.599 134.087 334.454 134.821 335.187 135.5C352.445 151.495 356.95 176.983 346.215 197.903C345.76 198.791 345.208 199.773 344.104 201.737C343.611 202.613 343.364 203.052 343.132 203.483C337.812 213.375 335.809 224.708 337.418 235.82C337.488 236.304 337.569 236.8 337.732 237.792C338.096 240.014 338.278 241.125 338.402 242.115C341.318 265.436 328.347 287.851 306.647 296.991C305.726 297.379 304.67 297.778 302.559 298.574C301.617 298.929 301.146 299.107 300.69 299.289C290.241 303.455 281.406 310.852 275.48 320.395C275.221 320.811 274.964 321.243 274.449 322.107C273.297 324.043 272.721 325.011 272.178 325.849C259.387 345.584 235.011 354.436 212.498 347.521C211.543 347.228 210.477 346.856 208.347 346.112C207.396 345.78 206.921 345.614 206.455 345.461C195.767 341.951 184.233 341.951 173.545 345.461C173.079 345.614 172.603 345.78 171.652 346.112C169.522 346.856 168.457 347.228 167.502 347.521C144.989 354.436 120.613 345.584 107.822 325.849C107.279 325.011 106.703 324.043 105.55 322.107C105.036 321.243 104.779 320.811 104.52 320.395C98.5939 310.852 89.7583 303.455 79.3096 299.289C78.8539 299.107 78.3827 298.929 77.4404 298.574C75.3294 297.778 74.274 297.379 73.3529 296.991C51.6523 287.851 38.6819 265.436 41.598 242.115C41.7218 241.125 41.9039 240.014 42.2682 237.792C42.4308 236.8 42.5121 236.304 42.5822 235.82C44.1908 224.708 42.188 213.375 36.8675 203.483C36.6354 203.052 36.389 202.613 35.8962 201.737C34.7921 199.773 34.2401 198.791 33.7845 197.903C23.0499 176.983 27.5544 151.495 44.8128 135.5C45.5454 134.821 46.4007 134.087 48.1113 132.618C48.875 131.962 49.2568 131.635 49.6228 131.308C58.0134 123.828 63.7804 113.862 66.0777 102.872C66.1779 102.393 66.2715 101.899 66.4588 100.911C66.8783 98.699 67.088 97.5928 67.311 96.6204C72.5652 73.7107 92.4369 57.0742 115.962 55.8898C116.961 55.8395 118.089 55.8255 120.346 55.7975C121.353 55.785 121.857 55.7788 122.347 55.7636C133.594 55.4147 144.432 51.4788 153.272 44.5333C153.658 44.2303 154.048 43.9121 154.828 43.2756Z",oval:"M271.309 271.309C201.705 340.913 108.877 360.935 63.9707 316.029C19.0648 271.123 39.0867 178.295 108.691 108.691C178.295 39.0867 271.123 19.0648 316.029 63.9707C360.935 108.877 340.913 201.705 271.309 271.309Z",pentagon:"M155.064 49.459C176.093 34.1803 204.569 34.1803 225.598 49.459L322.926 120.171C343.955 135.45 352.754 162.532 344.722 187.253L307.546 301.668C299.514 326.39 276.476 343.127 250.483 343.127H130.18C104.186 343.127 81.1489 326.39 73.1164 301.668L35.9407 187.253C27.9082 162.532 36.7077 135.45 57.737 120.171L155.064 49.459Z",pill:"M116.116 71.7851C169.162 18.7383 255.168 18.7383 308.215 71.7851C361.262 124.832 361.262 210.838 308.215 263.884L263.884 308.215C210.838 361.262 124.832 361.262 71.7851 308.215C18.7383 255.168 18.7383 169.162 71.7851 116.116L116.116 71.7851Z","soft-burst":"M175.147 33.1508C181.983 22.2831 198.017 22.2831 204.853 33.1508L221.238 59.2009C225.731 66.3458 234.797 69.2506 242.692 66.0751L271.475 54.4972C283.482 49.6671 296.455 58.9613 295.507 71.7154L293.235 102.288C292.612 110.673 298.215 118.278 306.494 120.284L336.681 127.601C349.275 130.653 354.23 145.692 345.861 155.461L325.8 178.877C320.298 185.3 320.298 194.7 325.8 201.123L345.861 224.539C354.23 234.308 349.275 249.347 336.681 252.399L306.494 259.716C298.215 261.722 292.612 269.327 293.235 277.712L295.507 308.285C296.455 321.039 283.482 330.333 271.475 325.503L242.692 313.925C234.797 310.749 225.731 313.654 221.238 320.799L204.853 346.849C198.017 357.717 181.983 357.717 175.147 346.849L158.762 320.799C154.269 313.654 145.203 310.749 137.308 313.925L108.525 325.503C96.5177 330.333 83.5454 321.039 84.4931 308.285L86.7649 277.712C87.388 269.327 81.785 261.722 73.5056 259.716L43.3186 252.399C30.7252 249.347 25.7702 234.308 34.1391 224.539L54.1997 201.123C59.7018 194.7 59.7018 185.3 54.1997 178.877L34.1391 155.461C25.7702 145.692 30.7252 130.653 43.3186 127.601L73.5056 120.284C81.785 118.278 87.388 110.673 86.7649 102.288L84.4931 71.7154C83.5454 58.9613 96.5177 49.6671 108.525 54.4972L137.308 66.0751C145.203 69.2506 154.269 66.3458 158.762 59.201L175.147 33.1508Z",sunny:"M276.453 68.8118C286.405 69.4881 291.381 69.8263 295.404 71.5853C301.223 74.1305 305.87 78.7766 308.415 84.5965C310.174 88.6186 310.512 93.5948 311.188 103.547L312.732 126.259C313.005 130.284 313.142 132.296 313.579 134.219C314.212 136.997 315.31 139.648 316.827 142.059C317.877 143.728 319.203 145.248 321.856 148.288L336.824 165.438C343.384 172.954 346.663 176.712 348.263 180.8C350.579 186.715 350.579 193.285 348.263 199.2C346.663 203.288 343.384 207.046 336.824 214.562L321.856 231.712C319.203 234.752 317.877 236.272 316.827 237.941C315.31 240.352 314.212 243.003 313.579 245.781C313.142 247.704 313.005 249.716 312.732 253.741L311.188 276.453C310.512 286.405 310.174 291.381 308.415 295.404C305.87 301.223 301.223 305.87 295.404 308.415C291.381 310.174 286.405 310.512 276.453 311.188L253.741 312.732C249.716 313.005 247.704 313.142 245.781 313.579C243.003 314.212 240.352 315.31 237.941 316.827C236.272 317.877 234.752 319.203 231.712 321.856L214.562 336.824C207.046 343.384 203.288 346.663 199.2 348.263C193.285 350.579 186.715 350.579 180.8 348.263C176.712 346.663 172.954 343.384 165.438 336.824L148.288 321.856C145.248 319.203 143.728 317.877 142.059 316.827C139.648 315.31 136.997 314.212 134.219 313.579C132.296 313.142 130.284 313.005 126.259 312.732L103.547 311.188C93.5947 310.512 88.6186 310.174 84.5965 308.415C78.7766 305.87 74.1305 301.223 71.5853 295.404C69.8263 291.381 69.4881 286.405 68.8118 276.453L67.2684 253.741C66.9949 249.716 66.8581 247.704 66.4206 245.781C65.7883 243.003 64.6903 240.352 63.173 237.941C62.123 236.272 60.7965 234.752 58.1437 231.712L43.1756 214.562C36.6164 207.046 33.3369 203.288 31.7366 199.2C29.4211 193.285 29.4211 186.715 31.7366 180.8C33.3369 176.712 36.6164 172.954 43.1756 165.438L58.1437 148.288C60.7965 145.248 62.123 143.728 63.173 142.059C64.6903 139.648 65.7883 136.997 66.4206 134.219C66.8581 132.296 66.9949 130.284 67.2684 126.259L68.8118 103.547C69.4881 93.5948 69.8263 88.6186 71.5853 84.5965C74.1305 78.7766 78.7766 74.1305 84.5965 71.5853C88.6186 69.8263 93.5948 69.4881 103.547 68.8118L126.259 67.2684C130.284 66.9949 132.296 66.8581 134.219 66.4206C136.997 65.7883 139.648 64.6903 142.059 63.173C143.728 62.123 145.248 60.7966 148.288 58.1437L165.438 43.1756C172.954 36.6164 176.712 33.3369 180.8 31.7366C186.715 29.4211 193.285 29.4211 199.2 31.7366C203.288 33.3369 207.046 36.6164 214.562 43.1756L231.712 58.1437C234.752 60.7966 236.272 62.123 237.941 63.173C240.352 64.6903 243.003 65.7883 245.781 66.4206C247.704 66.8581 249.716 66.9949 253.741 67.2684L276.453 68.8118Z"};let Nw=new Array;const qw=new Map;for(const e in Vw)Nw.push(Vw[e]),qw.set(e,Nw.length-1);const Uw={};Nw=Ke(Nw,300);for(const e of qw)Uw[e[0]]=l(Nw[e[1]]);const jw=Uw;let Yw=class extends(Bo(qo(me,"progressbar"))){constructor(){super(...arguments),this.variant="uncontained"}connectedCallback(){super.connectedCallback(),this.ariaValueMin=this.ariaValueMin||"0",this.ariaValueMax=this.ariaValueMax||"100"}disconnectedCallback(){super.disconnectedCallback(),this._container?.classList.toggle("animate",!1)}reconnectedCallback(){super.reconnectedCallback(),this._container?.classList.toggle("animate",!0)}firstUpdated(e){super.firstUpdated(e),this._container?.classList.toggle("animate",!0)}render(){return Y`<div class="container" aria-hidden="true"><div class="active-indicator-wrapper"><div class="active-indicator"></div></div></div>`}};Yw.styles=c`:host { display: inline-block; aspect-ratio: 1 / 1; contain: strict; vertical-align: middle; content-visibility: auto; } :host([variant="uncontained"]) { width: ${Ww}; } :host([variant="contained"]) { width: ${Fw}; } :host([variant="uncontained"]) .active-indicator { background-color: ${Hw}; } :host([variant="contained"]) .active-indicator { background-color: ${Ow}; } :host([variant="contained"]) .container { background-color: ${Bw}; } .container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: ${Rw}; } .active-indicator { margin: auto; aspect-ratio: 1 / 1; width: calc(${Ww} * 0.842); transform-origin: center; transition: clip-path ${Xi.motion.spring.slowEffects}; will-change: transform, clip-path; --_polygon-soft-burst: polygon(${jw["soft-burst"]}); --_polygon-9-sided-cookie: polygon(${jw["9-sided-cookie"]}); --_polygon-pentagon: polygon(${jw.pentagon}); --_polygon-pill: polygon(${jw.pill}); --_polygon-sunny: polygon(${jw.sunny}); --_polygon-4-sided-cookie: polygon(${jw["4-sided-cookie"]}); --_polygon-oval: polygon(${jw.oval}); } .container.animate .active-indicator-wrapper { animation: rotate-outer 4666ms linear infinite; transform-origin: center; display: flex; align-items: center; justify-content: center; will-change: transform; } @keyframes rotate-outer { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .container.animate .active-indicator { animation: rotate-inner 4666ms cubic-bezier(0.34, 0.88, 0.34, 1) infinite; } @keyframes rotate-inner { 0% { clip-path: var(--_polygon-soft-burst); transform: rotate(0deg); } 14% { clip-path: var(--_polygon-9-sided-cookie); transform: rotate(154deg) scale(1); } 29% { clip-path: var(--_polygon-pentagon); transform: rotate(309deg) scale(1); } 43% { clip-path: var(--_polygon-pill); transform: rotate(463deg) scale(1); } 57% { clip-path: var(--_polygon-sunny); transform: rotate(617deg) scale(1); } 71% { clip-path: var(--_polygon-4-sided-cookie); transform: rotate(771deg) scale(1); } 83% { clip-path: var(--_polygon-oval); transform: rotate(926deg) scale(1); } 100% { clip-path: var(--_polygon-soft-burst); transform: rotate(1080deg) scale(1); } } @media (forced-colors: active) { .active-indicator { background-color: CanvasText !important; } }`,e([ye(".container")],Yw.prototype,"_container",void 0),e([fe({reflect:!0})],Yw.prototype,"variant",void 0),Yw=e([Aa("m3e-loading-indicator")],Yw);class Kw extends(Mo(xo(mi(Qi(me),!0)))){constructor(){super(),new Sa(this,{callback:e=>{e&&this.menu?._activate()}})}get menu(){return this.closest("m3e-menu")}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this))}render(){return Y`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div>${Ao(this)?this[zo]():X}<div class="wrapper">${this._renderContent()}</div></div>`}}Kw.styles=c`:host { display: inline-block; outline: none; user-select: none; flex: none; height: calc(var(--m3e-menu-item-container-height, 2.75rem) + ${Xi.density.calc(-3)}); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:disabled)) .base { color: var(--m3e-menu-item-color, ${Xi.color.onSurface}); } :host(:not([aria-expanded="true"])) .base { --m3e-state-layer-hover-color: var(--m3e-menu-item-container-hover-color, ${Xi.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-menu-item-container-focus-color, ${Xi.color.onSurface}); --m3e-ripple-color: var(--m3e-menu-item-ripple-color, ${Xi.color.onSurface}); } :host(:not(:disabled)[aria-expanded="true"]) .base { background-color: color-mix( in srgb, var(--m3e-menu-item-active-state-layer-color, ${Xi.color.onSurface}) var(--m3e-menu-active-state-layer-opacity, 8%), transparent ); } :host([aria-expanded="true"]) .state-layer { display: none; } :host(:not(:disabled)[checked]) .base { color: var(--m3e-menu-item-selected-color, ${Xi.color.onTertiaryContainer}); background-color: var(--m3e-menu-item-selected-container-color, ${Xi.color.tertiaryContainer}); } :host([checked]) .base { --m3e-state-layer-hover-color: var( --m3e-menu-item-selected-container-hover-color, ${Xi.color.onTertiaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-menu-item-selected-container-focus-color, ${Xi.color.onTertiaryContainer} ); --m3e-ripple-color: var(--m3e-menu-item-selected-ripple-color, ${Xi.color.onTertiaryContainer}); } :host(:not(:disabled)) { cursor: pointer; } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-menu-item-disabled-color, ${Xi.color.onSurface}) var(--m3e-menu-item-disabled-opacity, 38%), transparent ); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; position: relative; width: 100%; height: 100%; border-radius: var(--m3e-menu-item-shape, ${Xi.shape.corner.extraSmall}); transition: ${l(`border-radius ${Xi.motion.spring.fastEffects}`)}; } :host([checked]:not(:is(:state(--first), :--first))) .base { border-top-left-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); border-top-right-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); } :host([checked]:not(:is(:state(--last), :--last))) .base { border-bottom-left-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); border-bottom-right-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); } :host(:is(:state(--first), :--first)) .base { border-top-left-radius: var(--m3e-menu-item-first-child-shape, ${Xi.shape.corner.medium}); border-top-right-radius: var(--m3e-menu-item-first-child-shape, ${Xi.shape.corner.medium}); } :host(:is(:state(--last), :--last)) .base { border-bottom-left-radius: var(--m3e-menu-item-last-child-shape, ${Xi.shape.corner.medium}); border-bottom-right-radius: var(--m3e-menu-item-last-child-shape, ${Xi.shape.corner.medium}); } .touch { position: absolute; height: calc( var(--m3e-menu-item-container-height, 2.75rem) + calc(var(--m3e-menu-gap, 0.125rem) * 2) + ${Xi.density.calc(-3)} ); left: 0; right: 0; } .wrapper { flex: 1 1 auto; display: inline-flex; align-items: center; column-gap: var(--m3e-menu-item-icon-label-space, 0.5rem); padding-inline-start: var(--m3e-menu-item-padding-start, 0.75rem); padding-inline-end: var(--m3e-menu-item-padding-end, 0.75rem); font-size: var(--m3e-menu-item-label-text-font-size, ${Xi.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-menu-item-label-text-font-weight, ${Xi.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-menu-item-label-text-line-height, ${Xi.typescale.standard.label.large.lineHeight} ); letter-spacing: var(--m3e-menu-item-label-text-tracking, ${Xi.typescale.standard.label.large.tracking}); } .focus-ring { border-radius: var(--m3e-menu-item-focus-ring-shape, inherit); } .content { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ::slotted([slot="icon"]), ::slotted([slot="trailing-icon"]), .trailing-icon { flex: none; width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { background-color: Menu; color: MenuText; } :host(:disabled) .base { color: GrayText; } }`,e([ye(".focus-ring")],Kw.prototype,"_focusRing",void 0),e([ye(".state-layer")],Kw.prototype,"_stateLayer",void 0),e([ye(".ripple")],Kw.prototype,"_ripple",void 0);let Zw=class extends(Po(ir)){get menu(){return"M3E-MENU"===this.control?.tagName?this.control:null}attach(e){super.attach(e);const t=this.menu;t&&(this.parentElement&&(this.parentElement.ariaHasPopup="menu",this.parentElement.ariaExpanded="false",t.id&&Wn(this.parentElement,"aria-controls",t.id)),this.closest("m3e-menu")&&(t.submenu=!0))}detach(){if(this.parentElement){this.parentElement.ariaHasPopup=null,this.parentElement.ariaExpanded=null;const e=this.menu;e?.id&&Hn(this.parentElement,"aria-controls",e.id)}super.detach()}_onClick(){this.parentElement&&("M3E-MENU-ITEM"===this.parentElement.tagName?this.menu?.show(this.parentElement):this.menu?.toggle(this.parentElement))}};var Xw,Gw,Qw,Jw,e$,t$,a$,i$,o$,r$,s$,n$;Zw=e([Aa("m3e-menu-trigger")],Zw);let l$=n$=class extends(Do(qo(Kw,"menuitem"))){constructor(){super(),Xw.add(this),Gw.set(this,e=>t(this,Xw,"m",o$).call(this,e)),Qw.set(this,e=>t(this,Xw,"m",r$).call(this,e)),Jw.set(this,()=>t(this,Xw,"m",s$).call(this)),this._hasSubmenu=!1,e$.set(this,void 0),new _a(this,{startDelay:500,endDelay:500,callback:e=>{e&&!this.disabled&&t(this,e$,"f")&&t(this,e$,"f").menu?.show(this)}})}get submenu(){return t(this,e$,"f")?.menu??null}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,Gw,"f")),this.addEventListener("keydown",t(this,Qw,"f")),this.addEventListener("mouseenter",t(this,Jw,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,Gw,"f")),this.removeEventListener("keydown",t(this,Qw,"f")),this.removeEventListener("mouseenter",t(this,Jw,"f"))}_renderContent(){return Y`<slot name="icon" aria-hidden="true" @slotchange="${t(this,Xw,"m",a$)}"></slot><span class="content"><slot @slotchange="${t(this,Xw,"m",t$)}"></slot></span>${this._hasSubmenu?"ltr"===El.current?Y`<svg class="trailing-icon" aria-hidden="true" viewBox="0 -960 960 960" fill="currentColor"><path d="M400-280v-400l200 200-200 200Z"/></svg>`:Y`<svg class="trailing-icon" aria-hidden="true" viewBox="0 -960 960 960" fill="currentColor"><path d="M560-280 360-480l200-200v400Z"/></svg>`:Y`<slot name="trailing-icon" aria-hidden="true" @slotchange="${t(this,Xw,"m",i$)}"></slot>`}`}};var c$,d$,h$,m$,u$,p$,v$,f$,b$,g$,y$,w$,$$,x$,k$,C$;Gw=new WeakMap,Qw=new WeakMap,Jw=new WeakMap,e$=new WeakMap,Xw=new WeakSet,t$=function(e){a(this,e$,e.target.assignedElements({flatten:!0}).find(e=>e instanceof Zw),"f"),this._hasSubmenu=void 0!==t(this,e$,"f")},a$=function(e){fi(this,"--with-icon",et(e.target))},i$=function(e){fi(this,"--with-trailing-icon",et(e.target))},o$=function(e){e.defaultPrevented||this._hasSubmenu||this.menu?.hideAll(!0)},r$=function(e){if(!e.defaultPrevented&&!this.disabled)switch(e.key){case"Right":case"ArrowRight":"ltr"===El.current&&(e.preventDefault(),this.submenu?.show(this));break;case"Left":case"ArrowLeft":"rtl"===El.current&&(e.preventDefault(),this.submenu?.show(this))}},s$=function(){this.menu?.items.forEach(e=>{e instanceof n$&&e!==this&&e.submenu?.isOpen&&e.submenu.hide()})},e([be()],l$.prototype,"_hasSubmenu",void 0),l$=n$=e([Aa("m3e-menu-item")],l$);let S$=C$=class extends(jo(mi(qo(me,"menu")))){constructor(){super(...arguments),c$.add(this),d$.set(this,void 0),h$.set(this,void 0),m$.set(this,void 0),u$.set(this,(new Tn).withWrap().withHomeAndEnd().withVerticalOrientation()),p$.set(this,e=>t(this,c$,"m",w$).call(this,e)),v$.set(this,()=>t(this,c$,"m",$$).call(this)),f$.set(this,new Ga(this,{target:null,callback:e=>e instanceof C$?e.items.filter(e=>e instanceof l$).forEach(e=>e.submenu?.hide()):this.hideAll()})),b$.set(this,new De(this,{target:null,callback:e=>{this.submenu||e.some(e=>e instanceof C$)||this.hide()}})),g$.set(this,e=>{switch(e.newState){case"open":t(this,b$,"f").observe(this),t(this,d$,"f")&&t(this,b$,"f").observe(t(this,d$,"f")),setTimeout(()=>t(this,u$,"f").setActiveItem(t(this,u$,"f").items.find(e=>!e.disabled)),40);break;case"closed":t(this,b$,"f").unobserveAll(),t(this,h$,"f")?.call(this),a(this,h$,void 0,"f"),a(this,m$,void 0,"f")}}),this.positionX="after",this.positionY="below",this.variant="standard",this.submenu=!1}get items(){return t(this,u$,"f").items}get isOpen(){return void 0!==t(this,d$,"f")}connectedCallback(){super.connectedCallback(),this.tabIndex=-1,this.setAttribute("popover","manual"),this.addEventListener("keydown",t(this,p$,"f")),this.addEventListener("mouseenter",t(this,v$,"f")),this.addEventListener("toggle",t(this,g$,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,p$,"f")),this.removeEventListener("mouseenter",t(this,v$,"f")),this.removeEventListener("toggle",t(this,g$,"f")),t(this,c$,"m",k$).call(this)}async show(e){t(this,d$,"f")&&t(this,d$,"f")!==e&&this.hide();let i=this.positionX;"rtl"===El.current&&(i="before"===i?"after":"before"),a(this,h$,await Xc(this,e,{position:this.submenu?"before"===i?"left-start":"right-start":"above"===this.positionY?"before"===i?"top-end":"top-start":"before"===i?"bottom-end":"bottom-start",inline:!0,flip:!0,shift:"main",offset:this.submenu?void 0:4},(e,i,o)=>{if(this.submenu){if(t(this,d$,"f")){const e=t(this,c$,"m",x$).call(this,t(this,d$,"f")).y;fi(this,"--shift-down",!1),fi(this,"--shift-up",!1),fi(this,Math.round(i)===Math.round(e)?"--shift-down":"--shift-up",!0)}}else fi(this,"--top",o.includes("top")),fi(this,"--bottom",o.includes("bottom"));t(this,m$,"f")?.dir===El.current&&t(this,m$,"f")?.x===e||("rtl"===El.current?this.style.right=window.innerWidth-e-this.clientWidth+"px":this.style.left=`${e}px`),t(this,m$,"f")?.y!==i&&(this.style.top=`${i}px`),a(this,m$,{x:e,y:i,dir:El.current},"f")}),"f");const o=e.closest("m3e-menu");o?this.variant=o.variant:this._activate(),this.showPopover(),a(this,d$,e,"f"),t(this,d$,"f").ariaExpanded="true",t(this,f$,"f").observe(t(this,d$,"f"))}hide(e=!1){for(const e of t(this,u$,"f").items){const t=e.submenu;t&&t.isOpen&&t.hide()}t(this,c$,"m",k$).call(this),this.hidePopover(),t(this,d$,"f")&&(t(this,d$,"f").ariaExpanded="false",e&&t(this,d$,"f").focus(),t(this,f$,"f").unobserve(t(this,d$,"f")),a(this,d$,void 0,"f"))}hideAll(e=!1){let a=this;for(;t(a,d$,"f");){const e=t(a,d$,"f").closest("m3e-menu");if(!e)break;a=e}a.hide(e)}async toggle(e){t(this,d$,"f")?this.hide():await this.show(e)}render(){return Y`<div class="base"><slot @slotchange="${t(this,c$,"m",y$)}"></slot></div>`}_activate(){this!==C$.__activeMenu&&(C$.__activeMenu&&vi(C$.__activeMenu,"--active"),C$.__activeMenu=this,pi(C$.__activeMenu,"--active"))}};var _$,E$,L$,P$,M$,T$,z$,A$,I$,D$,W$,H$;d$=new WeakMap,h$=new WeakMap,m$=new WeakMap,u$=new WeakMap,p$=new WeakMap,v$=new WeakMap,f$=new WeakMap,b$=new WeakMap,g$=new WeakMap,c$=new WeakSet,y$=function(){const{added:e}=t(this,u$,"f").setItems([...this.querySelectorAll("m3e-menu-item,m3e-menu-item-checkbox,m3e-menu-item-radio")].filter(e=>e.closest("m3e-menu")===this));t(this,u$,"f").activeItem||t(this,u$,"f").updateActiveItem(e.find(e=>!e.disabled)),t(this,u$,"f").items.forEach((e,a)=>{fi(e,"--first",0===a&&!e.previousElementSibling),fi(e,"--last",a===t(this,u$,"f").items.length-1)})},w$=function(e){switch(e.key){case"Right":case"ArrowRight":"rtl"===El.current?(e.preventDefault(),this.hide(!0)):t(this,u$,"f").onKeyDown(e);break;case"Left":case"ArrowLeft":"ltr"===El.current?(e.preventDefault(),this.hide(!0)):t(this,u$,"f").onKeyDown(e);break;case"Tab":this.hideAll();break;case"Escape":e.shiftKey||e.ctrlKey||this.hide(!0);break;default:t(this,u$,"f").onKeyDown(e)}},$$=function(){this._activate()},x$=function(e){let t=0,a=0;for(let i=e;i;i=i.offsetParent instanceof HTMLElement?i.offsetParent:null)t+=i.offsetLeft-i.scrollLeft+i.clientLeft,a+=i.offsetTop-i.scrollTop+i.clientTop;return{x:t,y:a}},k$=function(){this===C$.__activeMenu&&(vi(C$.__activeMenu,"--active"),C$.__activeMenu=void 0)},it(c`m3e-menu > m3e-divider { margin-block: var(--m3e-menu-divider-spacing, 0.5rem); }`),S$.styles=c`:host { position: absolute; padding: unset; margin: unset; border: unset; overflow-y: auto; overflow-x: visible; scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-menu-container-padding-block, 0.25rem) ); min-width: var(--m3e-menu-container-min-width, 7rem); max-width: var(--m3e-menu-container-max-width, 17.5rem); max-height: var(--m3e-menu-container-max-height, 17.5rem); box-shadow: var(--m3e-menu-container-elevation, ${Xi.elevation.level3}); opacity: 0; display: none; } .base { contain: layout style paint; display: flex; flex-direction: column; row-gap: var(--m3e-menu-gap, 0.125rem); min-width: inherit; max-width: inherit; padding-block: var(--m3e-menu-container-padding-block, 0.25rem); padding-inline: var(--m3e-menu-container-padding-inline, 0.25rem); --m3e-focus-ring-outward-offset: 0px; --m3e-focus-ring-growth-factor: 1.5; } :host(:not(:is(:state(--active), :--active))) { border-radius: var(--m3e-menu-container-shape, ${Xi.shape.corner.small}); } :host(:not(:is(:state(--active), :--active))) .base { --m3e-menu-item-first-child-shape: ${Xi.shape.corner.extraSmall}; --m3e-menu-item-last-child-shape: ${Xi.shape.corner.extraSmall}; } :host(:is(:state(--active), :--active)) { border-radius: var(--m3e-menu-active-container-shape, ${Xi.shape.corner.large}); } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${l(`opacity ${Xi.motion.duration.short2} ${Xi.motion.easing.standard}, \n transform ${Xi.motion.duration.short2} ${Xi.motion.easing.standard},\n overlay ${Xi.motion.duration.short2} ${Xi.motion.easing.standard} allow-discrete,\n display ${Xi.motion.duration.short2} ${Xi.motion.easing.standard} allow-discrete,\n border-radius ${Xi.motion.spring.fastEffects}`)}; } :host(:not([submenu])) { transform: scaleY(0.8); } :host(:not([submenu]):popover-open) { transform: scaleY(1); animation: ${l(`bounce-open ${Xi.motion.duration.medium1} ${Xi.motion.easing.standard}`)}; } @keyframes bounce-open { 0% { transform: scaleY(0.8); } 70% { transform: scaleY(1.02); } 100% { transform: scaleY(1); } } :host::backdrop { background-color: transparent; } :host(:popover-open) { display: block; opacity: 1; } :host(:is(:state(--bottom), :--bottom)) { transform-origin: top; } :host(:is(:state(--top), :--top)) { transform-origin: bottom; } :host(:is(:state(--shift-down), :--shift-down)) { margin-top: calc(0px - var(--m3e-menu-container-padding-block, 0.25rem)); } :host(:is(:state(--shift-up), :--shift-up)) { margin-top: var(--m3e-menu-container-padding-block, 0.25rem); } :host([variant="vibrant"]) { background-color: var(--m3e-vibrant-menu-container-color, ${Xi.color.tertiaryContainer}); --m3e-menu-item-color: var(--m3e-vibrant-menu-item-color, ${Xi.color.onTertiaryContainer}); --m3e-menu-item-container-hover-color: var( --m3e-vibrant-menu-item-container-hover-color, ${Xi.color.onTertiaryContainer} ); --m3e-menu-item-container-focus-color: var( --m3e-vibrant-menu-item-container-focus-color, ${Xi.color.onTertiaryContainer} ); --m3e-menu-item-ripple-color: var(--m3e-vibrant-menu-item-ripple-color, ${Xi.color.onTertiaryContainer}); --m3e-menu-item-active-state-layer-color: var( --m3e-vibrant-menu-item-active-state-layer-color, ${Xi.color.onTertiaryContainer} ); --m3e-menu-item-selected-color: var(--m3e-vibrant-menu-item-selected-color, ${Xi.color.onTertiary}); --m3e-menu-item-selected-container-color: var( --m3e-vibrant-menu-item-selected-container-color, ${Xi.color.tertiary} ); --m3e-menu-item-selected-container-hover-color: var( --m3e-vibrant-menu-item-selected-container-hover-color, ${Xi.color.onTertiary} ); --m3e-menu-item-container-selected-focus-color: var( --m3e-vibrant-menu-item-selected-container-focus-color, ${Xi.color.onTertiary} ); --m3e-menu-item-selected-ripple-color: var( --m3e-vibrant-menu-item-selected-ripple-color, ${Xi.color.onTertiary} ); --m3e-menu-item-disabled-color: var( --m3e-vibrant-menu-item-disabled-color, ${Xi.color.onTertiaryContainer} ); } :host([variant="standard"]) { background-color: var(--m3e-menu-container-color, ${Xi.color.surfaceContainer}); } @starting-style { :host(:popover-open) { opacity: 0; } } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`,e([fe({attribute:"position-x"})],S$.prototype,"positionX",void 0),e([fe({attribute:"position-y"})],S$.prototype,"positionY",void 0),e([fe({reflect:!0})],S$.prototype,"variant",void 0),e([fe({type:Boolean,reflect:!0})],S$.prototype,"submenu",void 0),S$=C$=e([Aa("m3e-menu")],S$);let O$=class extends(gi(qo(Kw,"menuitemcheckbox"))){constructor(){super(...arguments),_$.add(this),E$.set(this,e=>t(this,_$,"m",I$).call(this,e)),L$.set(this,e=>t(this,_$,"m",D$).call(this,e)),P$.set(this,()=>t(this,_$,"m",W$).call(this)),M$.set(this,()=>t(this,_$,"m",H$).call(this)),T$.set(this,!1)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,E$,"f")),this.addEventListener("keydown",t(this,L$,"f")),this.addEventListener("keyup",t(this,P$,"f")),this.addEventListener("mouseenter",t(this,M$,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,E$,"f")),this.removeEventListener("keydown",t(this,L$,"f")),this.removeEventListener("keyup",t(this,P$,"f")),this.removeEventListener("mouseenter",t(this,M$,"f"))}_renderContent(){return Y`<div class="icon"><svg class="check" viewBox="0 -960 960 960" aria-hidden="true"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg><slot name="icon" @slotchange="${t(this,_$,"m",z$)}"></slot></div><slot></slot><slot name="trailing-icon" aria-hidden="true" @slotchange="${t(this,_$,"m",A$)}"></slot>`}};E$=new WeakMap,L$=new WeakMap,P$=new WeakMap,M$=new WeakMap,T$=new WeakMap,_$=new WeakSet,z$=function(e){fi(this,"--with-icon",et(e.target))},A$=function(e){fi(this,"--with-trailing-icon",et(e.target))},I$=function(e){e.defaultPrevented||(this.checked=!this.checked,this.performUpdate(),t(this,T$,"f")||(at()?this.menu?.hideAll(!0):setTimeout(()=>this.menu?.hideAll(!0),150)))},D$=function(e){a(this,T$," "===e.key,"f")},W$=function(){a(this,T$,!1,"f")},H$=function(){this.menu?.items.forEach(e=>{e instanceof l$&&e.submenu?.isOpen&&e.submenu.hide()})},O$.styles=[Kw.styles,c`.icon { display: flex; align-items: center; justify-content: center; transition: margin-inline-start ${Xi.motion.spring.fastEffects}; } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-menu-item-icon-label-space, 0.75rem)); } .check { width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } :host(:not([checked])) .check { display: none; } :host([checked]) .icon { margin-inline-start: 0; } :host([checked]) ::slotted([slot="icon"]) { display: none !important; } @media (prefers-reduced-motion) { .icon { transition: none; } }`],O$=e([Aa("m3e-menu-item-checkbox")],O$);let B$=class extends(qo(me,"group")){render(){return Y`<slot></slot>`}};var R$,F$,V$,N$,q$,U$,j$,Y$,K$,Z$,X$,G$;B$.styles=c`:host { display: contents; }`,B$=e([Aa("m3e-menu-item-group")],B$);let Q$=class extends(gi(qo(Kw,"menuitemradio"))){constructor(){super(...arguments),R$.add(this),F$.set(this,e=>t(this,R$,"m",K$).call(this,e)),V$.set(this,e=>t(this,R$,"m",Z$).call(this,e)),N$.set(this,()=>t(this,R$,"m",X$).call(this)),q$.set(this,()=>t(this,R$,"m",G$).call(this)),U$.set(this,!1)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,F$,"f")),this.addEventListener("keydown",t(this,V$,"f")),this.addEventListener("keyup",t(this,N$,"f")),this.addEventListener("mouseenter",t(this,q$,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,F$,"f")),this.removeEventListener("keydown",t(this,V$,"f")),this.removeEventListener("keyup",t(this,N$,"f")),this.removeEventListener("mouseenter",t(this,q$,"f"))}update(e){super.update(e),e.has("checked")&&this.checked&&(this.closest("[role='group']")??this.closest("m3e-menu"))?.querySelectorAll("m3e-menu-item-radio").forEach(e=>{e!==this&&e.checked&&(e.checked=!1)})}_renderContent(){return Y`<div class="icon"><svg class="check" viewBox="0 -960 960 960" aria-hidden="true"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg><slot name="icon" @slotchange="${t(this,R$,"m",j$)}"></slot></div><slot></slot><slot name="trailing-icon" aria-hidden="true" @slotchange="${t(this,R$,"m",Y$)}"></slot>`}};var J$,ex,tx,ax,ix,ox;F$=new WeakMap,V$=new WeakMap,N$=new WeakMap,q$=new WeakMap,U$=new WeakMap,R$=new WeakSet,j$=function(e){fi(this,"--with-icon",et(e.target))},Y$=function(e){fi(this,"--with-trailing-icon",et(e.target))},K$=function(e){e.defaultPrevented||(this.checked=!0,this.performUpdate(),t(this,U$,"f")||(at()?this.menu?.hideAll(!0):setTimeout(()=>this.menu?.hideAll(!0),150)))},Z$=function(e){a(this,U$," "===e.key,"f")},X$=function(){a(this,U$,!1,"f")},G$=function(){this.menu?.items.forEach(e=>{e instanceof l$&&e.submenu?.isOpen&&e.submenu.hide()})},Q$.styles=O$.styles,Q$=e([Aa("m3e-menu-item-radio")],Q$);let rx=class extends(Bo(mi(qo(me,"navigation")))){constructor(){super(...arguments),J$.add(this),this[ox]=(new In).disableRovingTabIndex(),ex.set(this,void 0),this.mode="compact"}get items(){return this[An].items}get selected(){return this[An].selectedItems[0]??null}get currentMode(){return this._mode??("compact"!==this.mode?"expanded":"compact")}set currentMode(e){this._mode=e}disconnectedCallback(){super.disconnectedCallback(),this._mode=void 0,t(this,ex,"f")?.call(this)}reconnectedCallback(){super.reconnectedCallback(),"auto"===this.mode&&t(this,J$,"m",tx).call(this)}willUpdate(e){super.willUpdate(e),e.has("mode")&&(t(this,ex,"f")?.call(this),"auto"===this.mode?t(this,J$,"m",tx).call(this):(this._mode=void 0,this._updateItems())),e.has("_mode")&&this._updateItems()}render(){return Y`<div class="base"><slot @change="${t(this,J$,"m",ix)}" @slotchange="${t(this,J$,"m",ax)}"></slot></div>`}_updateItems(){const e="compact"===this.currentMode?"vertical":"horizontal";this._updateOrientation(e),fi(this,"--compact","vertical"===e)}_updateOrientation(e){this[An].items.forEach(t=>t.orientation=e)}};var sx,nx,lx,cx,dx,hx,mx,ux;ex=new WeakMap,J$=new WeakSet,ox=An,tx=function(){a(this,ex,Wf.observe([cf.XSmall,cf.Small],e=>{this._mode=e.get(cf.XSmall)||e.get(cf.Small)?"compact":"expanded",this._updateItems()}),"f")},ax=function(){this[An].setItems([...this.querySelectorAll("m3e-nav-item")]),this._updateItems()},ix=function(e){e.stopPropagation(),this.dispatchEvent(new Event("change",{bubbles:!0}))},rx.styles=c`:host { display: block; overflow-x: auto; overflow-y: hidden; scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; min-height: var(--m3e-nav-bar-height, 4rem); } .base { contain: layout style; display: flex; align-items: stretch; justify-content: center; box-sizing: border-box; min-height: inherit; height: inherit; width: 100%; background-color: var(--m3e-nav-bar-container-color, ${Xi.color.surfaceContainer}); --_vertical-nav-item-min-width: var(--m3e-nav-bar-vertical-item-width, 7rem); --_horizontal-nav-item-leading-space: var(--m3e-nav-bar-horizontal-nav-item-leading-space, 1rem); --_horizontal-nav-item-trailing-space: var(--m3e-nav-bar-horizontal-nav-item-trailing-space, 1rem); }`,e([be()],rx.prototype,"_mode",void 0),e([fe({reflect:!0})],rx.prototype,"mode",void 0),rx=e([Aa("m3e-nav-bar")],rx);let px=class extends(Bo(jo(Do(xi(Mo(xo(io(Qi(mi(qo(me,"button"),!0)))))))))){constructor(){super(...arguments),sx.add(this),nx.set(this,!1),lx.set(this,e=>t(this,sx,"m",dx).call(this,e)),cx.set(this,new za(this,{target:null,callback:e=>t(this,sx,"m",mx).call(this,e)})),this.orientation="vertical"}get navBar(){return this.closest("m3e-nav-bar")??this.closest("m3e-nav-rail")??null}[(nx=new WeakMap,lx=new WeakMap,cx=new WeakMap,sx=new WeakSet,Uo)](){t(this,nx,"f")&&super[Uo]()}connectedCallback(){a(this,nx,null!==this.closest("m3e-nav-rail"),"f"),super.connectedCallback(),this.addEventListener("click",t(this,lx,"f"),{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,lx,"f"),{capture:!0}),a(this,nx,!1,"f")}reconnectedCallback(){super.reconnectedCallback(),t(this,sx,"m",ux).call(this)}update(e){if(super.update(e),e.has("selected")){this.ariaSelected=null,this.ariaPressed=null,this.ariaCurrent=`${this.selected}`;for(const e of this.querySelectorAll("m3e-icon"))e.toggleAttribute("filled",this.selected);this.navBar?.[An].notifySelectionChange(this)}}updated(e){super.updated(e),e.has("orientation")&&this._focusRing?.attach(this)}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this)),t(this,sx,"m",ux).call(this)}render(){const e=this.disabled||this.disabledInteractive,a=Y`<div class="label"><slot></slot></div>`;return Y`${"vertical"===this.orientation?Y`<m3e-focus-ring class="focus-ring" inward></m3e-focus-ring>`:X}<div class="outer">${this[zo]()}<div class="inner">${"horizontal"===this.orientation?Y`<m3e-focus-ring class="focus-ring"></m3e-focus-ring>`:X}<m3e-state-layer class="state-layer" ?disabled="${e}"></m3e-state-layer><m3e-ripple class="ripple" centered ?disabled="${e}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="base"><div class="icon-wrapper" aria-hidden="true"><div class="icon"><slot name="icon"></slot><slot name="selected-icon" @slotchange="${t(this,sx,"m",hx)}"></slot></div></div><m3e-collapsible orientation="horizontal" ?no-animate="${!t(this,nx,"f")}" ?open="${"horizontal"===this.orientation}">${"horizontal"===this.orientation?a:X}</m3e-collapsible>${"horizontal"===this.orientation?X:a}</div></div></div>`}};var vx,fx,bx,gx,yx,wx,$x,xx,kx,Cx,Sx,_x;dx=function(e){e.defaultPrevented||this.dispatchEvent(new Event("beforeinput",{bubbles:!0,cancelable:!0}))&&(this.selected=!0,this.navBar?.[An].notifySelectionChange(this),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))},hx=function(e){fi(this,"--with-selected-icon",et(e.target))},mx=function(e){0!==e.length&&"vertical"!==this.orientation&&this._inner?.style.setProperty("--_expanded-width",`${e[0].contentRect.width}px`)},ux=function(){this._stateLayer&&t(this,nx,"f")&&t(this,cx,"f").observe(this._stateLayer)},px.styles=c`:host { display: inline-block; vertical-align: middle; position: relative; outline: none; user-select: none; flex: 1; font-size: var(--m3e-nav-item-label-text-font-size, ${Xi.typescale.standard.label.medium.fontSize}); font-weight: var( --m3e-nav-item-label-text-font-weight, ${Xi.typescale.standard.label.medium.fontWeight} ); line-height: var( --m3e-nav-item-label-text-line-height, ${Xi.typescale.standard.label.medium.lineHeight} ); letter-spacing: var(--m3e-nav-item-label-text-tracking, ${Xi.typescale.standard.label.medium.tracking}); border-radius: var(--m3e-nav-item-shape, ${Xi.shape.corner.full}); align-self: var(--_nav-item-align-self); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host([orientation="vertical"]) { min-width: var(--_vertical-nav-item-min-width); width: var(--_vertical-nav-item-width); margin-inline: var(--_vertical-nav-item-margin-inline); } :host([orientation="horizontal"]) { max-width: fit-content; } :host([orientation="horizontal"]) .outer { margin-inline-start: var(--_horizontal-nav-item-leading-space); margin-inline-end: var(--_horizontal-nav-item-trailing-space); } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } .outer { height: 100%; } .outer, .inner { display: flex; align-items: center; justify-content: var(--_nav-item-justify-content, center); position: relative; border-radius: inherit; } .icon-wrapper { position: relative; flex: none; } .base { contain: layout style; justify-content: unset; box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; } :host(:not(:is(:state(--no-animate), :--no-animate))) .base { transition: ${l(`margin-top ${Xi.motion.duration.short1} ${Xi.motion.easing.standard}`)}; } .icon { position: absolute; } .label { vertical-align: middle; } :host([orientation="horizontal"]) .label { white-space: nowrap; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]) { width: 1em; font-size: var(--m3e-nav-item-icon-size, 1.5rem) !important; } :host(:not(:is(:state(--no-animate), :--no-animate))) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))) .ripple { transition: ${l(`height ${Xi.motion.duration.short1} ${Xi.motion.easing.standard}`)}; } :host(:not([selected])) slot[name="selected-icon"], :host(:not(:is(:state(--with-selected-icon), :--with-selected-icon))) slot[name="selected-icon"], :host([selected]:is(:state(--with-selected-icon), :--with-selected-icon)) slot[name="icon"] { display: none; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-inactive-hover-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-inactive-focus-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-inactive-pressed-state-layer-color, ${Xi.color.onSecondaryContainer} ); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label { color: var(--m3e-nav-item-inactive-label-text-color, ${Xi.color.onSurfaceVariant}); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-inactive-icon-color, ${Xi.color.onSurfaceVariant}); } :host([selected]:not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-active-hover-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-active-focus-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-active-pressed-state-layer-color, ${Xi.color.onSecondaryContainer} ); } :host([selected]:not(:disabled):not([disabled-interactive]):not([orientation="horizontal"])) .label { color: var(--m3e-nav-item-active-label-text-color, ${Xi.color.secondary}); } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: var(--m3e-nav-item-active-container-color, ${Xi.color.secondaryContainer}); } :host([selected]:not(:disabled):not([disabled-interactive])[orientation="horizontal"]) .label, :host([selected]:not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-active-icon-color, ${Xi.color.onSecondaryContainer}); } :host([orientation="vertical"]) .outer { align-self: stretch; align-items: flex-start; } :host([orientation="vertical"]) .label { text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; } :host([orientation="vertical"]) .base { flex-direction: column; row-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="horizongal"]) .base { margin-top: 0; } :host([orientation="vertical"]) .base { margin-top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); margin-bottom: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple { top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); inset-inline-start: var(--_vertical-nav-item-inset-start); right: unset; bottom: unset; } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { min-width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem); } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .ripple { animation: collapse ${Xi.motion.duration.medium1}; } @keyframes collapse { from { width: var(--_expanded-width, var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem)); } to { width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem); } } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { height: var(--m3e-vertical-nav-item-active-indicator-height, 2rem); } :host([orientation="vertical"]) .icon { top: calc( calc(var(--m3e-vertical-nav-item-active-indicator-height, 2rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); left: calc( calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); } :host([orientation="vertical"]) .focus-ring { border-radius: var(--m3e-nav-item-focus-ring-shape, ${Xi.shape.corner.medium}); } :host([orientation="horizontal"]) .icon-wrapper { width: var(--m3e-nav-item-icon-size, 1.5rem); height: var(--m3e-nav-item-icon-size, 1.5rem); } :host([orientation="horizontal"]) .base { padding: var(--m3e-horizontal-nav-item-padding, 1rem); } :host([orientation="horizontal"]) .label { flex: 1 1 auto; } :host([orientation="horizontal"]) .base { column-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="horizontal"]) .state-layer, :host([orientation="horizontal"]) .ripple, :host([orientation="horizontal"]) .inner { height: var(--m3e-horizontal-nav-item-active-indicator-height, 2.5rem); } :host([orientation="horizontal"]) .inner { width: fit-content; } .state-layer, .ripple { margin-inline: auto; } :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper { animation: ${l(`slide-down ${Xi.motion.duration.short2} ${Xi.motion.easing.standard}`)}; } :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper { animation: ${l(`slide-up ${Xi.motion.duration.short2} ${Xi.motion.easing.standard}`)}; } @keyframes slide-down { from { transform: translateY(-4px); } to { transform: translateY(0); } } @keyframes slide-up { from { transform: translateY(4px); } to { transform: translateY(0); } } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .label { animation: horizontal-fade-in ${Xi.motion.duration.medium1}; } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .label { animation: vertical-fade-in ${Xi.motion.duration.medium1}; } @keyframes horizontal-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes vertical-fade-in { from { opacity: 0; } to { opacity: 1; } } :host(:disabled) .label, :host([disabled-interactive]) .label { color: color-mix( in srgb, var(--m3e-nav-item-disabled-label-text-color, ${Xi.color.onSurface}) var(--m3e-nav-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: color-mix( in srgb, var(--m3e-nav-item-disabled-icon-color, ${Xi.color.onSurface}) var(--m3e-nav-item-disabled-icon-opacity, 38%), transparent ); } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (prefers-reduced-motion) { :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper, :host( :not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"] ) .icon-wrapper, :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .ripple, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .label, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .label { animation: none; } :host(:not(:is(:state(--no-animate), :--no-animate))) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))) .ripple, :host(:not(:is(:state(--no-animate), :--no-animate))) .base { transition: none; } } @media (forced-colors: active) { :host(:disabled) .label, :host([disabled-interactive]) .label, :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: GrayText; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label, :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: ButtonText; } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: ButtonText; } :host([orientation="vertical"][selected]:not(:disabled):not([disabled-interactive])) .label { color: ButtonText; } :host([orientation="horizontal"][selected]:not(:disabled):not([disabled-interactive])) .label, :host([selected]:not(:disabled):not([disabled-interactive])) .icon { forced-color-adjust: none; color: ButtonFace; } }`,e([ye(".focus-ring")],px.prototype,"_focusRing",void 0),e([ye(".state-layer")],px.prototype,"_stateLayer",void 0),e([ye(".ripple")],px.prototype,"_ripple",void 0),e([ye(".inner")],px.prototype,"_inner",void 0),e([fe({reflect:!0})],px.prototype,"orientation",void 0),px=e([Aa("m3e-nav-item")],px);let Ex=_x=class extends(xi(Qi(mi(qo(me,"treeitem"),!0)))){constructor(){super(...arguments),vx.add(this),this._hasChildItems=!1,fx.set(this,[]),bx.set(this,null),gx.set(this,new Array),yx.set(this,null),this.open=!1}get link(){return t(this,yx,"f")}get label(){return this._base??null}get visible(){return!t(this,gx,"f").some(e=>!e.open)}get path(){return[...t(this,gx,"f"),this]}get hasChildItems(){return this._hasChildItems}get parentItem(){return t(this,gx,"f")[t(this,gx,"f").length-1]??null}get childItems(){return t(this,fx,"f")}get level(){return t(this,gx,"f").length+1}expand(e=!1){this.hasChildItems&&(this.open=!0,e&&this.childItems.forEach(e=>e.expand(!0)))}collapse(e=!1){this.hasChildItems&&(this.open=!1,e&&this.childItems.forEach(e=>e.collapse(!0)))}toggle(){this.hasChildItems&&(this.open=!this.open)}connectedCallback(){super.connectedCallback(),t(this,gx,"f").length=0;for(let e=this.parentElement?.closest("m3e-nav-menu-item");e;e=e.parentElement?.closest("m3e-nav-menu-item"))t(this,gx,"f").push(e);t(this,gx,"f").reverse(),this.style.setProperty("--_nav-menu-item-level",`${this.level}`),a(this,bx,this.closest("m3e-nav-menu"),"f")}disconnectedCallback(){super.disconnectedCallback(),t(this,gx,"f").length=0}update(e){if(super.update(e),e.has("selected")){this.ariaSelected=null,this.ariaCurrent=this.hasChildItems?null:`${this.selected}`;for(const e of this.querySelectorAll(":scope > m3e-icon[slot]"))e.toggleAttribute("filled",this.selected);t(this,gx,"f").forEach(e=>e.selected=this.selected),this.selected&&!this.hasChildItems&&this.closest("m3e-nav-menu")?.[An].notifySelectionChange(this)}(e.has("open")||e.has("_hasChildItems"))&&(this.ariaExpanded=this._hasChildItems?`${this.open}`:null),(e.has("_hasChildItems")&&this.disabled||e.has("disabled"))&&t(this,fx,"f").forEach(e=>e.disabled=this.disabled)}firstUpdated(e){super.firstUpdated(e);const t=this._base;t&&[this.focusRing,this.stateLayer,this.ripple].forEach(e=>e?.attach(t))}render(){return Y`<div class="base" @click="${t(this,vx,"m",Cx)}"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="icon" aria-hidden="true">${t(this,vx,"m",wx).call(this)}</div><div class="label"><slot name="label" @slotchange="${t(this,vx,"m",xx)}"></slot></div><slot name="badge"></slot><div aria-hidden="true" class="toggle"><slot name="toggle-icon"><svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><m3e-collapsible class="group" role="group" aria-hidden="${To(this._hasChildItems?void 0:"true")}" ?open="${this._hasChildItems&&this.open}" @opening="${t(this,vx,"m",Sx)}" @opened="${t(this,vx,"m",Sx)}" @closing="${t(this,vx,"m",Sx)}" @closed="${t(this,vx,"m",Sx)}"><slot @slotchange="${t(this,vx,"m",kx)}"></slot></m3e-collapsible>`}};var Lx,Px,Mx,Tx,zx,Ax,Ix,Dx,Wx,Hx,Ox,Bx,Rx,Fx,Vx;fx=new WeakMap,bx=new WeakMap,gx=new WeakMap,yx=new WeakMap,vx=new WeakSet,wx=function(){const e=Y`<slot name="icon" @slotchange="${t(this,vx,"m",$x)}"></slot>`;return this.selected&&!this.hasChildItems?Y`<slot name="selected-icon" @slotchange="${t(this,vx,"m",$x)}">${e}</slot>`:e},$x=function(e){fi(this,"--with-icon",et(e.target))},xx=function(e){a(this,yx,e.target.assignedElements({flatten:!0}).find(e=>e instanceof HTMLAnchorElement)??null,"f"),t(this,yx,"f")?.setAttribute("tabindex","-1")},kx=function(e){a(this,fx,e.target.assignedElements({flatten:!0}).filter(e=>e instanceof _x),"f");const i=this._hasChildItems;this._hasChildItems=t(this,fx,"f").length>0,fi(this,"--with-items",this._hasChildItems),(i||this._hasChildItems)&&(this.selected=t(this,fx,"f").some(e=>e.selected))},Cx=function(){if(!this.disabled)if(t(this,bx,"f")?.[An].setActiveItem(this),this._hasChildItems)this.toggle();else{t(this,bx,"f")?.[An].select(this),t(this,gx,"f").forEach(e=>e.selected=this.selected),t(this,yx,"f")?.click();const e=this.closest("m3e-drawer-container");if(e){const t=this.closest("[slot='start']")??this.closest("[slot='end']");t&&(ui(e,`--${t.slot}-push`)||ui(e,`--${t.slot}-over`))&&setTimeout(()=>{e.removeAttribute(t.slot),e.dispatchEvent(new Event("change",{bubbles:!0}))},300)}}},Sx=function(e){e.stopPropagation(),this.dispatchEvent(new Event(e.type,{bubbles:!0}))},it(c`m3e-nav-menu-item > m3e-divider { margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem); flex: none; } m3e-nav-menu-item > m3e-nav-menu-item:first-of-type { margin-block-start: var(--m3e-nav-menu-item-vertical-inset, 0.25rem); } m3e-nav-menu-item > m3e-nav-menu-item:last-of-type { margin-block-end: var(--m3e-nav-menu-item-vertical-inset, 0.25rem); }`),Ex.styles=c`:host { display: block; flex: none; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { contain: layout style; display: flex; align-items: center; position: relative; padding-inline: var(--m3e-nav-menu-item-padding, 1.5rem); height: calc(var(--m3e-nav-menu-item-height, 3.5rem) + ${Xi.density.calc(-3)}); column-gap: var(--m3e-nav-menu-item-spacing, 0.75rem); font-size: var(--m3e-nav-menu-item-font-size, ${Xi.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-font-weight, ${Xi.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-line-height, ${Xi.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-tracking, ${Xi.typescale.standard.label.large.tracking}); transition: ${l(`color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard},\n background-color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-nav-menu-item-shape, ${Xi.shape.corner.full}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .icon, .toggle { flex: none; display: flex; align-items: center; justify-content: center; position: relative; vertical-align: middle; } ::slotted([slot="badge"]) { flex: none; position: relative; font-size: var(--m3e-nav-menu-item-badge-font-size, ${Xi.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-badge-font-weight, ${Xi.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-badge-line-height, ${Xi.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-badge-tracking, ${Xi.typescale.standard.label.large.tracking}); } .toggle { transition: ${l(`transform var(--m3e-collapsible-animation-duration, ${Xi.motion.duration.medium1})\n ${Xi.motion.easing.standard}`)}; } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { display: none; } .icon { margin-inline-start: -0.5rem; } .toggle { margin-inline-end: -0.5rem; } .group { padding-inline-start: var(--m3e-nav-menu-item-inset, 1rem); } :host([open]) .toggle { transform: rotate(180deg); } :host(:not(:is(:state(--with-items), :--with-items))) .toggle, :host(:not(:is(:state(--with-items), :--with-items))) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-nav-menu-item-icon-size, 1.5rem); } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-nav-menu-item-label-color, ${Xi.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-nav-menu-item-disabled-color, ${Xi.color.onSurface}) var(--m3e-nav-menu-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base { color: var(--m3e-nav-menu-item-selected-label-color, ${Xi.color.onSecondaryContainer}); background-color: var(--m3e-nav-menu-item-selected-container-color, ${Xi.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-selected-container-focus-color, ${Xi.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-selected-container-hover-color, ${Xi.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-nav-menu-item-selected-ripple-color, ${Xi.color.onSecondaryContainer}); } :host(:not([selected]):not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-unselected-container-focus-color, ${Xi.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-unselected-container-hover-color, ${Xi.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-unselected-ripple-color, ${Xi.color.onSurface}); } .state-layer { margin-inline: auto; } :host([selected]:is(:state(--with-items), :--with-items):not(:disabled)) .base { background-color: var(--m3e-nav-menu-item-open-container-color, ${Xi.color.surfaceContainerHighest}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-open-container-focus-color, ${Xi.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-open-container-hover-color, ${Xi.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-open-ripple-color, ${Xi.color.onSurface}); } ::slotted(a[slot="label"]) { all: unset; } @media (prefers-reduced-motion) { .base, .toggle, .state-layer { transition: none !important; } } @media (forced-colors: active) { .base, .state-layer { transition: none !important; } :host(:disabled) .base { color: GrayText; } :host(:not(:disabled)) .base { color: LinkText; } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base, :host([selected]:is(:state(--with-items), :--with-items):not(:disabled)) .base { forced-color-adjust: none; background-color: unset; color: Highlight; } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base::after { content: ""; position: absolute; inset-inline-start: calc(calc(var(--m3e-nav-menu-item-padding, 1.5rem) / 2) - calc(0.375rem / 2)); inset-block-start: 50%; width: 0.375rem; height: 0.375rem; border-radius: 50%; transform: translateY(-50%); background-color: currentColor; } }`,e([ye(".state-layer")],Ex.prototype,"stateLayer",void 0),e([ye(".focus-ring")],Ex.prototype,"focusRing",void 0),e([ye(".ripple")],Ex.prototype,"ripple",void 0),e([ye(".base")],Ex.prototype,"_base",void 0),e([be()],Ex.prototype,"_hasChildItems",void 0),e([fe({type:Boolean,reflect:!0})],Ex.prototype,"open",void 0),Ex=_x=e([Aa("m3e-nav-menu-item")],Ex);let Nx=Vx=class extends(qo(me,"tree")){constructor(){super(),Lx.add(this),Px.set(this,!1),Mx.set(this,!1),this[Fx]=(new In).withVerticalOrientation().withHomeAndEnd().withTypeahead().withSkipPredicate(e=>e.disabled||!e.visible).disableRovingTabIndex().onActiveItemChange(()=>{this[An].activeItem&&t(this,Lx,"m",Ox).call(this,this[An].activeItem)}).onSelectedItemsChange(()=>{const e=this.selected;for(const a of this.items)a!==e&&t(this,Lx,"m",Rx).call(this,a,!1,!1);e?.label&&st(e.label,this,{block:"start",behavior:"smooth"})}),Tx.set(this,e=>t(this,Lx,"m",Dx).call(this,e)),zx.set(this,e=>t(this,Lx,"m",Wx).call(this,e)),Ax.set(this,e=>t(this,Lx,"m",Hx).call(this,e)),new Ta(this,{callback:e=>a(this,Mx,e,"f")}),new Sa(this,{callback:()=>{t(this,Mx,"f")||t(this,Lx,"m",Bx).call(this)}})}get selected(){return this[An].selectedItems[0]??null}get items(){return this[An].items}expand(e,t=!1){const a=Array.isArray(e)?e:this[An].items,i="boolean"==typeof e?e:t;a.forEach(e=>e.expand(i))}collapse(e,t=!1){const a=Array.isArray(e)?e:this[An].items,i="boolean"==typeof e?e:t;a.forEach(e=>e.collapse(i));const o=this[An].activeItem;if(o&&!o.visible)for(let e=o.parentItem;e;e=e.parentItem)if(e.visible){this[An].setActiveItem(e);break}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.addEventListener("keydown",t(this,Tx,"f")),this.addEventListener("keyup",t(this,zx,"f")),this.addEventListener("pointerdown",t(this,Ax,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,Tx,"f")),this.removeEventListener("keyup",t(this,zx,"f")),this.removeEventListener("pointerdown",t(this,Ax,"f"))}render(){return Y`<div class="base"><slot @slotchange="${t(this,Lx,"m",Ix)}"></slot></div>`}};var qx,Ux,jx,Yx,Kx;Px=new WeakMap,Mx=new WeakMap,Tx=new WeakMap,zx=new WeakMap,Ax=new WeakMap,Lx=new WeakSet,Fx=An,Ix=function(){for(const e of this.querySelectorAll("m3e-divider"))e.ariaHidden="true";const{added:e}=this[An].setItems([...this.querySelectorAll("m3e-nav-menu-item")]);for(const t of e)t.id=t.id||"m3e-nav-menu-item-"+Vx.__nextId++;this[An].activeItem?(this.setAttribute("aria-activedescendant",this[An].activeItem.id),t(this,Lx,"m",Bx).call(this)):this.removeAttribute("aria-activedescendant")},Dx=function(e){a(this,Px,!1,"f"),t(this,Lx,"m",Bx).call(this);const i=this[An].activeItem;if(!e.defaultPrevented&&i&&!i.disabled)switch(e.key){case"Enter":case" ":e.preventDefault()," "===e.key&&i.ripple&&!i.ripple.visible&&(i.ripple.centered=!0,i.ripple.show(0,0,!0),i.ripple.centered=!1),i.hasChildItems?requestAnimationFrame(()=>i.toggle()):i.selected||(this[An].select(i),i.link?.click());break;case"*":e.preventDefault(),i.expand(!0);break;case"Left":case"ArrowLeft":if(e.preventDefault(),"ltr"===El.current)if(i.hasChildItems&&i.open)requestAnimationFrame(()=>i.collapse());else{const e=i.parentItem;e&&this[An].setActiveItem(e)}else i.hasChildItems&&!i.open&&i.expand();break;case"Right":case"ArrowRight":if(e.preventDefault(),"rtl"===El.current)if(i.hasChildItems&&i.open)requestAnimationFrame(()=>i.collapse());else{const e=i.parentItem;e&&this[An].setActiveItem(e)}else i.hasChildItems&&!i.open&&i.expand();break;default:this[An].onKeyDown(e)}},Wx=function(e){const t=this[An].activeItem;e.defaultPrevented||!t||t.disabled||" "!==e.key||t.ripple?.hide()},Hx=function(e){if(!e.defaultPrevented&&!t(this,Px,"f")&&!Be()){a(this,Px,!0,"f");const i=e.composedPath().reverse().find(e=>e instanceof Ex);i&&!i.disabled&&t(this,Lx,"m",Rx).call(this,i,!0,!1)}},Ox=function(e){this.setAttribute("aria-activedescendant",e.id),e.label&&st(e.label,this,{block:"nearest",behavior:"smooth"}),t(this,Lx,"m",Bx).call(this)},Bx=function(){const e=this.matches(":focus-within"),a=e||this.matches(":focus"),i=a&&!t(this,Px,"f")&&(Be()||this.matches(":focus-visible")||e&&null!==this.querySelector("a:focus-visible"));this[An].items.forEach(e=>{const o=e===this[An].activeItem;t(this,Lx,"m",Rx).call(this,e,o&&a,o&&i)})},Rx=function(e,t,a){t&&a?e.stateLayer?.show("focused"):e.stateLayer?.hide("focused"),a?e.focusRing?.show():e.focusRing?.hide()},it(c`m3e-nav-menu > m3e-divider { margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem); flex: none; }`),Nx.styles=c`:host { display: block; outline: none; overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: ${Xi.scrollbar.width}; scrollbar-color: ${Xi.scrollbar.color}; } .base { contain: layout style; width: 100%; display: flex; flex-direction: column; position: relative; min-height: inherit; box-sizing: border-box; padding-block-start: var(--m3e-nav-menu-padding-top, 0.5rem); padding-block-end: var(--m3e-nav-menu-padding-bottom, 0.5rem); padding-inline-start: var(--m3e-nav-menu-padding-left, 0.75rem); padding-inline-end: var(--m3e-nav-menu-padding-right, 0.75rem); }`,Nx.__nextId=0,Nx=Vx=e([Aa("m3e-nav-menu")],Nx);let Zx=Kx=class extends(mi(qo(me,"group"))){constructor(){super(...arguments),qx.add(this),Ux.set(this,"m3e-nav-menu-item-group-label-"+Kx.__nextId++),jx.set(this,void 0)}connectedCallback(){super.connectedCallback(),fi(this,"--divided","M3E-DIVIDER"===this.previousElementSibling?.tagName)}disconnectedCallback(){super.disconnectedCallback(),vi(this,"--divided")}render(){return Y`<div class="label"><slot name="label" @slotchange="${t(this,qx,"m",Yx)}"></slot></div><slot></slot>`}};var Xx,Gx,Qx,Jx;Ux=new WeakMap,jx=new WeakMap,qx=new WeakSet,Yx=function(e){const i=e.target.assignedElements({flatten:!0})[0];i!==t(this,jx,"f")&&(t(this,jx,"f")?.id===t(this,Ux,"f")&&(t(this,jx,"f").id=""),a(this,jx,i,"f"),t(this,jx,"f")?(t(this,jx,"f").id=t(this,jx,"f").id||t(this,Ux,"f"),this.setAttribute("aria-labelledby",t(this,jx,"f").id)):this.removeAttribute("aria-labelledby")),fi(this,"--with-label",void 0!==t(this,jx,"f"))},Zx.styles=c`:host { display: contents; } :host(:not(:is(:state(--with-label), :--with-label))) .label { display: none; } .label { margin-inline-start: var(--m3e-nav-menu-item-group-label-inset, 1rem); margin-block-end: var(--m3e-nav-menu-item-group-label-space, 1rem); flex: none; } :host(:is(:state(--divided), :--divided)) .label { margin-block-start: calc( var(--m3e-nav-menu-item-group-label-space, 1rem) - var(--m3e-nav-menu-divider-margin, 0.25rem) ); } :host(:not(:is(:state(--divided), :--divided))) .label { margin-block-start: var(--m3e-nav-menu-item-group-label-space, 1rem); }`,Zx.__nextId=0,Zx=Kx=e([Aa("m3e-nav-menu-item-group")],Zx);let ek=class extends(jo(rx)){constructor(){super(),Xx.add(this),Gx.set(this,(new Tn).withHomeAndEnd().withWrap()),Qx.set(this,e=>t(this,Xx,"m",Jx).call(this,e)),this[An].onSelectedItemsChange(()=>{t(this,Gx,"f").updateActiveItem(this[An].activeItem)})}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",t(this,Qx,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,Qx,"f"))}_updateItems(){const e=el.findInteractiveElements(this,!0),{added:a}=t(this,Gx,"f").setItems(e);if(!t(this,Gx,"f").activeItem){const e=a.find(e=>!e.hasAttribute("disabled"));e&&t(this,Gx,"f").updateActiveItem(e)}this.items.forEach((e,t)=>fi(e,"--first",0===t)),super._updateItems()}_updateOrientation(e){super._updateOrientation(e),this.querySelectorAll("m3e-fab").forEach(t=>t.toggleAttribute("extended","horizontal"===e))}};var tk,ak,ik;Gx=new WeakMap,Qx=new WeakMap,Xx=new WeakSet,Jx=function(e){t(this,Gx,"f").onKeyDown(e)},it(c`m3e-nav-rail > m3e-icon-button, m3e-nav-rail > m3e-fab { margin-block-end: var(--m3e-nav-rail-button-item-space, 1rem); } m3e-nav-rail > m3e-icon-button { margin-inline-start: var(--m3e-nav-rail-icon-button-inset, 0.5rem); }`),ek.styles=c`:host { display: block; overflow-x: hidden; overflow-y: auto; scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${l(`width ${Xi.motion.duration.medium2} ${Xi.motion.easing.standard}`)}; } .base { contain: layout style; display: flex; width: inherit; flex-direction: column; align-items: flex-start; box-sizing: border-box; padding-block-start: var(--m3e-nav-rail-top-space, 2.75rem); padding-block-end: var(--m3e-nav-rail-bottom-space, 0.5rem); padding-inline: var(--m3e-nav-rail-inline-padding, 1.25rem); } :host(:is(:state(--compact), :--compact)) { width: var(--m3e-nav-rail-compact-width, 6rem); } :host(:is(:state(--compact), :--compact)) .base { --_vertical-nav-item-width: var(--m3e-nav-rail-compact-width, 6rem); --_vertical-nav-item-margin-inline: calc(0px - var(--m3e-nav-rail-inline-padding, 1.25rem)); --_vertical-nav-item-inset-start: calc( 50% - calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem)) / 2 ); } :host(:not(:is(:state(--compact), :--compact))) { width: var(--m3e-nav-rail-expanded-width, 13.75rem); } :host(:not(:is(:state(--compact), :--compact))) { --m3e-horizontal-nav-item-active-indicator-height: var(--m3e-nav-rail-expanded-item-height, 3.5rem); --_nav-item-align-self: stretch; --_nav-item-justify-content: flex-start; } ::slotted(*) { flex: none; } ::slotted(m3e-fab) { --m3e-fab-container-elevation: ${Xi.elevation.level0}; --m3e-fab-disabled-container-elevation: ${Xi.elevation.level0}; --m3e-fab-focus-container-elevation: ${Xi.elevation.level0}; --m3e-fab-pressed-container-elevation: ${Xi.elevation.level0}; --m3e-fab-hover-container-elevation: ${Xi.elevation.level1}; --m3e-fab-lowered-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-disabled-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-focus-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-pressed-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-hover-container-elevation: ${Xi.elevation.level1}; } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } }`,ek=e([Aa("m3e-nav-rail")],ek);let ok=class extends(Po(ir)){constructor(){super(...arguments),tk.add(this),ak.set(this,new Ma(this,{target:null,config:{attributeFilter:["class"]},callback:()=>t(this,tk,"m",ik).call(this)}))}attach(e){e instanceof ek&&t(this,ak,"f").observe(e),this.htmlFor&&this.parentElement&&Wn(this.parentElement,"aria-controls",this.htmlFor),super.attach(e),t(this,tk,"m",ik).call(this)}detach(){for(const e of t(this,ak,"f").targets)t(this,ak,"f").unobserve(e);this.parentElement&&(this.htmlFor&&Hn(this.parentElement,"aria-controls",this.htmlFor),this.parentElement.ariaExpanded=null),super.detach()}_onClick(){this.control instanceof ek&&(this.control.currentMode="compact"===this.control.currentMode?"expanded":"compact")}};var rk,sk,nk,lk,ck,dk,hk,mk,uk,pk,vk,fk,bk,gk,yk,wk,$k,xk,kk,Ck,Sk,_k,Ek,Lk,Pk,Mk,Tk,zk,Ak,Ik,Dk,Wk,Hk;ak=new WeakMap,tk=new WeakSet,ik=async function(){if(!this.parentElement)return;const e=this.control instanceof ek&&"expanded"===this.control.currentMode;this.parentElement.ariaExpanded=`${e}`,this.parentElement.hasAttribute("toggle")&&this.parentElement.toggleAttribute("selected",e),this.parentElement instanceof me&&(await this.parentElement.updateComplete,this.parentElement.ariaPressed=null)},ok=e([Aa("m3e-nav-rail-toggle")],ok);let Ok=Hk=class extends(xo(no(No(Li(Ti(Fo(wo(vo(Qi(mi(qo(me,"combobox")))))))))))){constructor(){super(),rk.add(this),this._options=new Array,sk.set(this,void 0),nk.set(this,void 0),lk.set(this,!1),ck.set(this,!1),dk.set(this,"m3e-select-"+Hk.__nextId++),hk.set(this,`${t(this,dk,"f")}-list`),mk.set(this,e=>t(this,rk,"m",Ck).call(this,e)),uk.set(this,e=>t(this,rk,"m",Sk).call(this,e)),pk.set(this,e=>t(this,rk,"m",_k).call(this,e)),vk.set(this,e=>t(this,rk,"m",Pk).call(this,e)),fk.set(this,e=>t(this,rk,"m",Ek).call(this,e)),bk.set(this,e=>t(this,rk,"m",Lk).call(this,e)),gk.set(this,void 0),this._listKeyManager=(new Pn).withWrap().withHomeAndEnd().withPageUpAndDown().withVerticalOrientation().withTypeahead().onActiveItemChange(()=>{this._listKeyManager.activeItem&&t(this,rk,"m",Ik).call(this,this._listKeyManager.activeItem)}),this.hideSelectionIndicator=!1,this.multi=!1,this.panelClass="",new Ma(this,{config:{childList:!0,subtree:!0},callback:()=>t(this,rk,"m",kk).call(this)})}get options(){return this._options??[]}get selected(){return this.options.filter(e=>e.selected)}get value(){const e=this.selected.filter(e=>!e.disabled).map(e=>e.value);switch(e.length){case 0:return null;case 1:return e[0];default:return e}}get[(sk=new WeakMap,nk=new WeakMap,lk=new WeakMap,ck=new WeakMap,dk=new WeakMap,hk=new WeakMap,mk=new WeakMap,uk=new WeakMap,pk=new WeakMap,vk=new WeakMap,fk=new WeakMap,bk=new WeakMap,gk=new WeakMap,rk=new WeakSet,yk=function(){return this._listKeyManager?.items??[]},wk=function(){return t(this,rk,"a",yk).filter(e=>e.selected)},lo)](){const e=this.value;if(Array.isArray(e)){const t=new FormData;for(const a of e)t.append(this.name,a);return t}return e}get shouldLabelFloat(){return this.selected.filter(e=>!e.isEmpty).length>0}onContainerClick(){a(this,ck,!0,"f"),t(this,rk,"m",Tk).call(this),this.focus({preventScroll:!0})}clear(e=!1){const a=t(this,rk,"a",wk),i=a.length>0;i&&(a.forEach(e=>{e.selected=!1,t(this,rk,"m",Dk).call(this,e)}),this.requestUpdate()),t(this,rk,"m",Ak).call(this),i&&this.dispatchEvent(new Event("change",{bubbles:!0})),e&&this.focus()}connectedCallback(){super.connectedCallback(),this.ariaHasPopup="listbox",this.ariaExpanded="false",this.addEventListener("click",t(this,mk,"f")),this.addEventListener("keydown",t(this,uk,"f")),this.addEventListener("keyup",t(this,pk,"f")),t(this,rk,"m",kk).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,mk,"f")),this.removeEventListener("keydown",t(this,uk,"f")),this.removeEventListener("keyup",t(this,pk,"f"))}update(e){super.update(e),e.has("hideSelectionIndicator")&&t(this,rk,"a",yk).forEach(e=>fi(e,"--hide-selection-indicator",this.hideSelectionIndicator))}firstUpdated(e){super.firstUpdated(e),this._focusRing?.attach(this),t(this,rk,"a",$k)&&this._focusRing&&(this._focusRing.style.display="none")}render(){return Y`<m3e-focus-ring class="focus-ring"></m3e-focus-ring><div class="base"><m3e-text-overflow><slot name="value">${this.selected.filter(e=>!e.isEmpty).map((e,t)=>t>0?Y`<span>, </span>${e.label}`:e.label)}</slot></m3e-text-overflow><div class="arrow-wrapper" aria-hidden="true"><slot name="arrow"><svg class="arrow" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><div class="options" aria-hidden="true" @state-change="${t(this,rk,"m",xk)}"><slot></slot></div>`}};
171
+ */var iy,oy,ry,sy,ny,ly,cy,dy,hy,my,uy,py,vy,fy,by,gy,yy,wy,$y,xy,ky,Cy,Sy,_y,Ey,Ly,Py,My,Ty,zy;let Ay=class extends(Bo(mi(me))){constructor(){super(),iy.add(this),oy.set(this,null),ry.set(this,void 0),sy.set(this,()=>t(this,iy,"m",Ey).call(this)),ny.set(this,()=>t(this,iy,"m",Sy).call(this)),ly.set(this,new Ma(this,{target:null,config:{attributeFilter:["disabled","readonly","required"]},callback:()=>this.notifyControlStateChange()})),cy.set(this,new za(this,{target:null,callback:()=>t(this,iy,"m",xy).call(this)})),dy.set(this,new Sa(this,{target:null,filter:e=>t(this,iy,"m",Ly).call(this,e),callback:e=>{e=e&&!(t(this,oy,"f")?.disabled??1),fi(this,"--no-animate",!1),a(this,py,e,"f"),e?fi(this,"--float-label",!0):(this._invalid=!(t(this,oy,"f")?.checkValidity?.()??1),this.notifyControlStateChange())}})),hy.set(this,new Ma(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,iy,"m",Ty).call(this)})),my.set(this,new Ma(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>t(this,iy,"m",zy).call(this)})),uy.set(this,new Ta(this,{target:null,filter:e=>t(this,iy,"m",Ly).call(this,e),callback:e=>fi(this,"--pressed",e&&!(t(this,oy,"f")?.disabled??1))})),py.set(this,!1),this._pseudoLabel="",this._required=!1,this._invalid=!1,this._validationMessage="",vy.set(this,""),fy.set(this,""),this.variant="outlined",this.hideRequiredMarker=!1,this.hideSubscript="auto",this.floatLabel="auto",new _a(this,{callback:()=>fi(this,"--no-animate",!1)})}get menuAnchor(){return this._base}get control(){return t(this,oy,"f")}notifyControlStateChange(e=!1){this._required=!0===t(this,oy,"f")?.required,fi(this,"--required",this._required),fi(this,"--disabled",!0===t(this,oy,"f")?.disabled),fi(this,"--readonly",Wo(t(this,oy,"f"))&&!0===t(this,oy,"f").readOnly),"auto"===this.floatLabel&&fi(this,"--float-label",t(this,iy,"a",by)||t(this,py,"f")),e&&(this._invalid=!(t(this,oy,"f")?.checkValidity?.()??1)),fi(this,"--invalid",this._invalid),this._validationMessage=t(this,oy,"f")?.validationMessage??"",this.isUpdatePending||this.performUpdate()}connectedCallback(){super.connectedCallback(),fi(this,"--no-animate",!0)}disconnectedCallback(){super.disconnectedCallback(),t(this,iy,"m",Py).call(this,null)}reconnectedCallback(){super.reconnectedCallback(),t(this,iy,"m",gy).call(this)}firstUpdated(e){super.firstUpdated(e),t(this,iy,"m",gy).call(this)}update(e){super.update(e),e.has("_invalid")&&t(this,oy,"f")&&(t(this,oy,"f").ariaInvalid=this._invalid?"true":null,t(this,fy,"f")&&(this._invalid?Jn.describe(t(this,oy,"f"),t(this,fy,"f")):Jn.removeDescription(t(this,oy,"f"),t(this,fy,"f"))))}render(){return Y`<div class="base" @click="${t(this,iy,"m",Cy)}">${"outlined"===this.variant?Y`<div class="outline" aria-hidden="true"><div class="outline-start"></div><div class="outline-notch"><div class="pseudo-label">${this._pseudoLabel} ${!this.hideRequiredMarker&&this._required?Y`&nbsp;*`:X}</div></div><div class="outline-end"></div></div>`:X}<div class="prefix"><slot name="prefix" @slotchange="${t(this,iy,"m",wy)}"></slot></div><div class="content"><span class="prefix-text"><slot name="prefix-text"></slot></span><span class="input"><slot @slotchange="${t(this,iy,"m",ky)}" @change="${t(this,iy,"m",_y)}"></slot></span><span class="suffix-text"><slot name="suffix-text"></slot></span><span class="label"><slot name="label" @slotchange="${t(this,iy,"m",yy)}"></slot>${!this.hideRequiredMarker&&this._required?Y`<span class="required-marker" aria-hidden="true">&nbsp;*</span>`:X}</span></div><div class="suffix"><slot name="suffix" @slotchange="${t(this,iy,"m",$y)}"></slot></div></div><span class="subscript" aria-hidden="true"><span class="error"><slot name="error">${this._validationMessage}</slot></span><span class="hint"><slot name="hint"></slot></span></span>`}};oy=new WeakMap,ry=new WeakMap,sy=new WeakMap,ny=new WeakMap,ly=new WeakMap,cy=new WeakMap,dy=new WeakMap,hy=new WeakMap,my=new WeakMap,uy=new WeakMap,py=new WeakMap,vy=new WeakMap,fy=new WeakMap,iy=new WeakSet,by=function(){return void 0!==t(this,oy,"f")?.shouldLabelFloat?!0===t(this,oy,"f").shouldLabelFloat:"string"==typeof t(this,oy,"f")?.value&&t(this,oy,"f").value.length>0},gy=function(){t(this,dy,"f").observe(this._base),t(this,uy,"f").observe(this._base),t(this,hy,"f").observe(this._hint),t(this,iy,"m",Ty).call(this),t(this,my,"f").observe(this._error),t(this,iy,"m",zy).call(this)},yy=function(e){const t=e.target.assignedElements({flatten:!0});fi(this,"--with-label",t.length>0),this._pseudoLabel=t[0]?.textContent??""},wy=function(e){fi(this,"--with-prefix",et(e.target)),t(this,cy,"f").observe(this._prefix)},$y=function(e){fi(this,"--with-suffix",et(e.target))},xy=function(){"outlined"===this.variant&&this._base.style.setProperty("--_prefix-width",`${this._prefix.clientWidth}px`)},ky=function(e){t(this,iy,"m",Py).call(this,ay(e.target))},Cy=function(e){t(this,iy,"m",Ly).call(this,e)||!t(this,oy,"f")||t(this,py,"f")||t(this,oy,"f").disabled||(t(this,oy,"f").onContainerClick?t(this,oy,"f").onContainerClick(e):t(this,oy,"f").focus())},Sy=function(){this._invalid=!0,this.notifyControlStateChange()},_y=function(){this._invalid=!(t(this,oy,"f")?.checkValidity?.()??1),this.notifyControlStateChange()},Ey=function(){this._invalid=!1,setTimeout(()=>this.notifyControlStateChange())},Ly=function(e){return e.composed&&e.composedPath().includes(this._suffix)},Py=function(e){if(t(this,oy,"f")!==e&&(t(this,oy,"f")&&(t(this,vy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,vy,"f")),t(this,fy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,fy,"f")),t(this,ly,"f").unobserve(t(this,oy,"f")),t(this,oy,"f").removeEventListener("invalid",t(this,ny,"f")),t(this,oy,"f").form?.removeEventListener("reset",t(this,sy,"f")),t(this,ry,"f")?.call(this),a(this,ry,void 0,"f")),a(this,oy,e,"f"),["INPUT","TEXTAREA"].includes(t(this,oy,"f")?.tagName??"")?this._base.style.setProperty("--_form-field-cursor","text"):this._base.style.removeProperty("--_form-field-cursor"),fi(this,"--with-select","M3E-SELECT"===t(this,oy,"f")?.tagName),ui(this,"--with-select")&&this._base.style.setProperty("--_form-field-cursor","pointer"),t(this,oy,"f"))){t(this,ly,"f").observe(t(this,oy,"f")),t(this,oy,"f").addEventListener("invalid",t(this,ny,"f")),t(this,oy,"f").form?.addEventListener("reset",t(this,sy,"f")),t(this,oy,"f").removeAttribute("aria-invalid"),t(this,vy,"f")&&Jn.describe(t(this,oy,"f"),t(this,vy,"f")),this.notifyControlStateChange();const e=t(this,oy,"f").tagName.toLowerCase();e.startsWith("m3e-")&&!customElements.get(e)?customElements.whenDefined(e).then(()=>t(this,iy,"m",My).call(this)):t(this,iy,"m",My).call(this)}},My=function(){t(this,oy,"f")&&a(this,ry,tt(t(this,oy,"f"),"value",{set:(e,t)=>{t(e),this.notifyControlStateChange(!0)}}),"f")},Ty=function(){const e=Qe(this._hint,!0);e!==t(this,vy,"f")&&(t(this,oy,"f")&&t(this,vy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,vy,"f")),a(this,vy,e,"f"),t(this,oy,"f")&&t(this,vy,"f")&&Jn.describe(t(this,oy,"f"),t(this,vy,"f")))},zy=function(){const e=Qe(this._error,!0);e!==t(this,fy,"f")&&(t(this,oy,"f")&&t(this,fy,"f")&&Jn.removeDescription(t(this,oy,"f"),t(this,fy,"f")),a(this,fy,e,"f"),t(this,oy,"f")&&t(this,fy,"f")&&this._invalid&&Jn.describe(t(this,oy,"f"),t(this,fy,"f")))},it(c`m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { user-select: none; color: currentColor; transition: opacity ${Xi.motion.duration.extraLong1}; } m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) input::placeholder, m3e-form-field[float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is( :state(--with-label), :--with-label ) textarea::placeholder { opacity: 0; transition: opacity 0s; } m3e-form-field[variant="outlined"] m3e-input-chip-set { margin-block: calc(calc(3.5rem + ${Xi.density.calc(-3)}) / 4); } m3e-form-field[variant="outlined"] textarea { margin-block: calc( var(--m3e-form-field-label-line-height, var(--md-sys-typescale-body-small-line-height, 1rem)) / 2 ); } @media (prefers-reduced-motion) { m3e-form-field input::placeholder, m3e-form-field textarea::placeholder { transition: none !important; } }`),Ay.styles=c`:host { display: inline-flex; flex-direction: column; vertical-align: middle; font-size: var(--m3e-form-field-font-size, ${Xi.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-form-field-font-weight, ${Xi.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-form-field-line-height, ${Xi.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-form-field-tracking, ${Xi.typescale.standard.body.large.tracking}); width: var(--m3e-form-field-width, 14.5rem); color: var(--_form-field-color); } :host(:not(:is(:state(--disabled), :--disabled))) .base { cursor: var(--_form-field-cursor); } .base { display: flex; align-items: center; position: relative; min-height: calc(3.5rem + ${Xi.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); --_form-field-label-line-height: var( --m3e-form-field-label-line-height, ${Xi.typescale.standard.body.small.lineHeight} ); } .content { display: flex; align-items: center; position: relative; flex: 1 1 auto; min-width: 0; min-height: var(--m3e-form-field-icon-size, 1.5rem); } .prefix, .suffix { display: flex; align-items: center; position: relative; user-select: none; flex: none; font-size: var(--m3e-form-field-icon-size, 1.5rem); } .prefix-text, .suffix-text { opacity: 1; transition: opacity ${Xi.motion.duration.extraLong1}; user-select: none; flex: none; } .input { display: inline-flex; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; } .label { display: flex; position: absolute; pointer-events: none; user-select: none; top: 0; left: 0; right: 0; font-size: var(--m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-label-font-weight, ${Xi.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-label-line-height, ${Xi.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-label-tracking, ${Xi.typescale.standard.body.small.tracking}); color: var(--_form-field-label-color, inherit); transition: ${l(`top ${Xi.motion.duration.short4}, \n font-size ${Xi.motion.duration.short4}, \n line-height ${Xi.motion.duration.short4}`)}; } :host(:is(:state(--with-select), :--with-select)) .label { margin-inline-end: 1.5rem; } ::slotted([slot="label"]) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .subscript { display: inline-flex; width: 100%; margin-top: 0.25rem; font-size: var(--m3e-form-field-subscript-font-size, ${Xi.typescale.standard.body.small.fontSize}); font-weight: var(--m3e-form-field-subscript-font-weight, ${Xi.typescale.standard.body.small.fontWeight}); line-height: var(--m3e-form-field-subscript-line-height, ${Xi.typescale.standard.body.small.lineHeight}); letter-spacing: var(--m3e-form-field-subscript-tracking, ${Xi.typescale.standard.body.small.tracking}); min-height: var(--m3e-form-field-subscript-line-height, ${Xi.typescale.standard.body.small.lineHeight}); color: var(--m3e-form-field-subscript-color, ${Xi.color.onSurfaceVariant}); } .error, .hint { flex: 1 1 auto; } :host([hide-subscript="always"]) .subscript { display: none; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid))) .subscript { opacity: 0; margin-top: 0.25rem; transform: translateY(-0.25rem); transition: ${l(`opacity ${Xi.motion.duration.short4}, \n transform ${Xi.motion.duration.short4}`)}; } :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):focus-within) .subscript, :host([hide-subscript="auto"]:not(:is(:state(--invalid), :--invalid)):is(:state(--pressed), :--pressed)) .subscript { opacity: 1; transform: translateY(0); } :host(:is(:state(--invalid), :--invalid)) .hint { display: none; } :host(:not(:is(:state(--invalid), :--invalid))) .error { display: none; } ::slotted(input), ::slotted(textarea), ::slotted(select) { outline: unset; border: unset; background-color: transparent; box-shadow: none; font-family: inherit; font-size: inherit; line-height: inherit; letter-spacing: inherit; color: var(--_form-field-input-color, inherit); flex: 1 1 auto; min-width: 0; padding: unset; } ::slotted(textarea) { scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; } ::slotted(m3e-select), ::slotted(m3e-input-chip-set) { flex: 1 1 auto; min-width: 0; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not(:is(:state(--pressed), :--pressed))) .label { font-size: inherit; } :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .prefix-text, :host([float-label="auto"]:not(:is(:state(--float-label), :--float-label)):is(:state(--with-label), :--with-label)) .suffix-text { opacity: 0; transition: opacity 0s; } .prefix { margin-inline-start: 1rem; } :host(:is(:state(--with-prefix), :--with-prefix)) .prefix { margin-inline-end: 1rem; margin-inline-start: 0.75rem; } .suffix { margin-inline-end: 1rem; } :host(:is(:state(--with-suffix), :--with-suffix)) .suffix { margin-inline-start: 0.25rem; margin-inline-end: 0.5rem; } :host(:is(:state(--with-suffix), :--with-suffix):is(:state(--with-select), :--with-select)) .suffix { margin-inline-start: unset; } :host(:is(:state(--with-select), :--with-select)) .suffix-text { display: none; } :host([variant="outlined"]) .label { margin-top: calc(0px - var(--_form-field-label-line-height) / 2); } :host([variant="outlined"]) .outline { position: absolute; display: flex; pointer-events: none; left: 0; top: 0; bottom: 0; right: 0; } :host([variant="outlined"]) .pseudo-label { visibility: hidden; margin-inline-end: 0.5rem; font-size: var(--_form-field-label-font-size); line-height: var(--_form-field-label-line-height); letter-spacing: var(--_form-field-label-tracking); max-width: 100%; transition-property: max-width, margin-inline-end; transition-duration: 1ms; } :host( :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label)) ) .pseudo-label, :host( :is(:state(--required), :--required):not([hide-required-marker]):not(:is(:state(--with-label), :--with-label)) ) .required-marker { display: none; } :host([variant="outlined"]:is(:state(--required), :--required):not([hide-required-marker])) .pseudo-label { margin-inline-end: 0.25rem; } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .pseudo-label { max-width: 0; margin-inline-end: 0px; transition-delay: ${Xi.motion.duration.short2}; } :host([variant="outlined"]) .outline-start, :host([variant="outlined"]) .outline-notch, :host([variant="outlined"]) .outline-end { box-sizing: border-box; border-width: var(--_form-field-outline-size, 1px); border-color: var(--_form-field-outline-color); transition: border-color ${Xi.motion.duration.short4}; } :host([variant="outlined"]:not(:is(:state(--with-label), :--with-label))) .outline-notch { display: none; } :host([variant="outlined"]) .outline-start { min-width: 0.75rem; border-top-style: solid; border-inline-start-style: solid; border-bottom-style: solid; border-start-start-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); border-end-start-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); } :host([variant="outlined"]) .outline-notch { border-bottom-style: solid; } :host([variant="outlined"]) .outline-end { flex-grow: 1; min-width: 1rem; border-top-style: solid; border-inline-end-style: solid; border-bottom-style: solid; border-start-end-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); border-end-end-radius: var(--m3e-outlined-form-field-container-shape, ${Xi.shape.corner.extraSmall}); } :host([variant="outlined"]:is(:state(--with-prefix), :--with-prefix)) .outline-start { min-width: calc(1.25rem + var(--_prefix-width, 0px) + 0.25rem); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled))) .base:hover .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):focus-within) .outline, :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed)) .outline { --_form-field-outline-size: 2px; } :host([variant="outlined"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="outlined"]) .content { min-height: calc(3.5rem + ${Xi.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); } :host( [variant="outlined"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { margin-top: unset; line-height: calc(3.5rem + ${Xi.density.calc(-3)}); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); } :host([variant="filled"]) .base { --_select-arrow-margin-top: calc( 0px - calc(1rem / max(calc(0 - calc(var(--md-sys-density-scale, 0) + var(--md-sys-density-scale, 0))), 1)) ); } :host([variant="filled"]) .base::before { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; border-bottom-style: solid; border-width: 1px; border-radius: var(--m3e-form-field-container-shape, ${Xi.shape.corner.extraSmallTop}); border-color: var(--_form-field-outline-color); background-color: var(--_form-field-container-color); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled))) .base:hover::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):focus-within) .base::before, :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):is(:state(--pressed), :--pressed)) .base::before { border-width: 3px; } :host([variant="filled"]) .base::after { content: ""; box-sizing: border-box; position: absolute; pointer-events: none; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--_form-field-hover-container-color); transition: background-color ${Xi.motion.duration.short4}; } :host([variant="filled"]) .subscript { margin-inline: 1rem; width: calc(100% - 2rem); } :host([variant="filled"]) .content { padding-top: calc(1.5rem + ${Xi.density.calc(-3)}); margin-bottom: 0.5rem; } :host([variant="filled"]) .label { top: max(0px, calc(0.5rem + ${Xi.density.calc(-3)})); } :host( [variant="filled"][float-label="auto"]:not(:is(:state(--float-label), :--float-label)):not( :is(:state(--pressed), :--pressed) ) ) .label { top: 0px; line-height: calc(3.5rem + ${Xi.density.calc(-3)} - 0.0625rem); --_form-field-label-font-size: var( --m3e-form-field-label-font-size, ${Xi.typescale.standard.body.small.fontSize} ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:focus-within):not(:is(:state(--pressed), :--pressed))) .base:hover { --_form-field-hover-container-color: color-mix( in srgb, var(--m3e-form-field-hover-container-color, ${Xi.color.onSurface}) var(--m3e-form-field-hover-container-opacity, 8%), transparent ); } :host(:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) { color: var(--m3e-form-field-color, ${Xi.color.onSurface}); } :host([variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${Xi.color.outline}); } :host([variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid))) .base { --_form-field-outline-color: var(--m3e-form-field-outline-color, ${Xi.color.onSurfaceVariant}); } :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="outlined"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not( :is(:state(--invalid), :--invalid) ):focus-within ) .base, :host( [variant="filled"]:not(:is(:state(--disabled), :--disabled)):not(:is(:state(--invalid), :--invalid)):is( :state(--pressed), :--pressed ) ) .base { --_form-field-outline-color: var(--m3e-form-field-focused-outline-color, ${Xi.color.primary}); --_form-field-label-color: var(--m3e-form-field-focused-color, ${Xi.color.primary}); } :host(:not(:is(:state(--disabled), :--disabled))) .base { --_form-field-container-color: var( --m3e-form-field-container-color, ${Xi.color.surfaceContainerHighest} ); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .base { --_form-field-label-color: var(--m3e-form-field-invalid-color, ${Xi.color.error}); --_form-field-outline-color: var(--m3e-form-field-invalid-color, ${Xi.color.error}); } :host(:not(:is(:state(--disabled), :--disabled)):is(:state(--invalid), :--invalid)) .subscript { color: var(--m3e-form-field-invalid-color, ${Xi.color.error}); } :host(:is(:state(--disabled), :--disabled)) { color: color-mix( in srgb, var(--m3e-form-field-disabled-color, ${Xi.color.onSurface}) var(--m3e-form-field-disabled-opacity, 38%), transparent ); } :host(:is(:state(--disabled), :--disabled)) .base { --_form-field-container-color: color-mix( in srgb, var(--m3e-form-field-disabled-container-color, ${Xi.color.onSurface}) var(--m3e-form-field-disabled-container-opacity, 4%), transparent ); } :host(:is(:state(--no-animate), :--no-animate)) *, :host(:is(:state(--no-animate), :--no-animate)) *::before, :host(:is(:state(--no-animate), :--no-animate)) *::after { transition: none !important; } @media (forced-colors: active) { :host([variant="filled"]) .base::after { transition: none; } :host { --_form-field-outline-color: CanvasText; } :host(:is(:state(--disabled), :--disabled)) { --_form-field-input-color: GrayText; --_form-field-color: GrayText; --_form-field-label-color: GrayText; --_form-field-outline-color: GrayText; } } @media (prefers-reduced-motion) { .base::before, .prefix-text, .suffix-text, .label, .subscript, .outline-start, .outline-notch, .outline-end, .pseudo-label { transition: none !important; } }`,e([ye(".base")],Ay.prototype,"_base",void 0),e([ye(".prefix")],Ay.prototype,"_prefix",void 0),e([ye(".suffix")],Ay.prototype,"_suffix",void 0),e([ye(".error")],Ay.prototype,"_error",void 0),e([ye(".hint")],Ay.prototype,"_hint",void 0),e([be()],Ay.prototype,"_pseudoLabel",void 0),e([be()],Ay.prototype,"_required",void 0),e([be()],Ay.prototype,"_invalid",void 0),e([be()],Ay.prototype,"_validationMessage",void 0),e([fe({reflect:!0})],Ay.prototype,"variant",void 0),e([fe({attribute:"hide-required-marker",type:Boolean,reflect:!0})],Ay.prototype,"hideRequiredMarker",void 0),e([fe({attribute:"hide-subscript",reflect:!0})],Ay.prototype,"hideSubscript",void 0),e([fe({attribute:"float-label",reflect:!0})],Ay.prototype,"floatLabel",void 0),Ay=e([Aa("m3e-form-field")],Ay);let Iy=class extends me{constructor(){super(...arguments),this.emphasized=!1,this.variant="display",this.size="medium"}update(e){super.update(e),e.has("level")&&(this.ariaLevel=void 0!==this.level?`${this.level}`:null,this.role=this.ariaLevel?"heading":null)}render(){return Y`<slot></slot>`}};var Dy,Wy,Hy,Oy,By;Iy.styles=c`:host { display: block; } :host([variant="display"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.display.large.fontSize}; font-weight: ${Xi.typescale.standard.display.large.fontWeight}; line-height: ${Xi.typescale.standard.display.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.display.large.tracking}; } :host([variant="display"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.display.medium.fontSize}; font-weight: ${Xi.typescale.standard.display.medium.fontWeight}; line-height: ${Xi.typescale.standard.display.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.display.medium.tracking}; } :host([variant="display"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.display.small.fontSize}; font-weight: ${Xi.typescale.standard.display.small.fontWeight}; line-height: ${Xi.typescale.standard.display.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.display.small.tracking}; } :host([variant="headline"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.headline.large.fontSize}; font-weight: ${Xi.typescale.standard.headline.large.fontWeight}; line-height: ${Xi.typescale.standard.headline.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.headline.large.tracking}; } :host([variant="headline"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.headline.medium.fontSize}; font-weight: ${Xi.typescale.standard.headline.medium.fontWeight}; line-height: ${Xi.typescale.standard.headline.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.headline.medium.tracking}; } :host([variant="headline"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.headline.small.fontSize}; font-weight: ${Xi.typescale.standard.headline.small.fontWeight}; line-height: ${Xi.typescale.standard.headline.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.headline.small.tracking}; } :host([variant="title"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.title.large.fontSize}; font-weight: ${Xi.typescale.standard.title.large.fontWeight}; line-height: ${Xi.typescale.standard.title.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.title.large.tracking}; } :host([variant="title"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.title.medium.fontSize}; font-weight: ${Xi.typescale.standard.title.medium.fontWeight}; line-height: ${Xi.typescale.standard.title.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.title.medium.tracking}; } :host([variant="title"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.title.small.fontSize}; font-weight: ${Xi.typescale.standard.title.small.fontWeight}; line-height: ${Xi.typescale.standard.title.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.title.small.tracking}; } :host([variant="label"][size="large"]:not([emphasized])) { font-size: ${Xi.typescale.standard.label.large.fontSize}; font-weight: ${Xi.typescale.standard.label.large.fontWeight}; line-height: ${Xi.typescale.standard.label.large.lineHeight}; letter-spacing: ${Xi.typescale.standard.label.large.tracking}; } :host([variant="label"][size="medium"]:not([emphasized])) { font-size: ${Xi.typescale.standard.label.medium.fontSize}; font-weight: ${Xi.typescale.standard.label.medium.fontWeight}; line-height: ${Xi.typescale.standard.label.medium.lineHeight}; letter-spacing: ${Xi.typescale.standard.label.medium.tracking}; } :host([variant="label"][size="small"]:not([emphasized])) { font-size: ${Xi.typescale.standard.label.small.fontSize}; font-weight: ${Xi.typescale.standard.label.small.fontWeight}; line-height: ${Xi.typescale.standard.label.small.lineHeight}; letter-spacing: ${Xi.typescale.standard.label.small.tracking}; } :host([variant="display"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.display.large.fontSize}; font-weight: ${Xi.typescale.emphasized.display.large.fontWeight}; line-height: ${Xi.typescale.emphasized.display.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.display.large.tracking}; } :host([variant="display"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.display.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.display.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.display.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.display.medium.tracking}; } :host([variant="display"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.display.small.fontSize}; font-weight: ${Xi.typescale.emphasized.display.small.fontWeight}; line-height: ${Xi.typescale.emphasized.display.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.display.small.tracking}; } :host([variant="headline"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.headline.large.fontSize}; font-weight: ${Xi.typescale.emphasized.headline.large.fontWeight}; line-height: ${Xi.typescale.emphasized.headline.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.headline.large.tracking}; } :host([variant="headline"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.headline.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.headline.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.headline.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.headline.medium.tracking}; } :host([variant="headline"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.headline.small.fontSize}; font-weight: ${Xi.typescale.emphasized.headline.small.fontWeight}; line-height: ${Xi.typescale.emphasized.headline.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.headline.small.tracking}; } :host([variant="title"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.title.large.fontSize}; font-weight: ${Xi.typescale.emphasized.title.large.fontWeight}; line-height: ${Xi.typescale.emphasized.title.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.title.large.tracking}; } :host([variant="title"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.title.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.title.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.title.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.title.medium.tracking}; } :host([variant="title"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.title.small.fontSize}; font-weight: ${Xi.typescale.emphasized.title.small.fontWeight}; line-height: ${Xi.typescale.emphasized.title.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.title.small.tracking}; } :host([variant="label"][size="large"][emphasized]) { font-size: ${Xi.typescale.emphasized.label.large.fontSize}; font-weight: ${Xi.typescale.emphasized.label.large.fontWeight}; line-height: ${Xi.typescale.emphasized.label.large.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.label.large.tracking}; } :host([variant="label"][size="medium"][emphasized]) { font-size: ${Xi.typescale.emphasized.label.medium.fontSize}; font-weight: ${Xi.typescale.emphasized.label.medium.fontWeight}; line-height: ${Xi.typescale.emphasized.label.medium.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.label.medium.tracking}; } :host([variant="label"][size="small"][emphasized]) { font-size: ${Xi.typescale.emphasized.label.small.fontSize}; font-weight: ${Xi.typescale.emphasized.label.small.fontWeight}; line-height: ${Xi.typescale.emphasized.label.small.lineHeight}; letter-spacing: ${Xi.typescale.emphasized.label.small.tracking}; }`,e([fe({type:Boolean,reflect:!0})],Iy.prototype,"emphasized",void 0),e([fe({reflect:!0})],Iy.prototype,"variant",void 0),e([fe({reflect:!0})],Iy.prototype,"size",void 0),e([fe({type:Number})],Iy.prototype,"level",void 0),Iy=e([Aa("m3e-heading")],Iy);const Ry=/^[MmLlHhVvCcSsQqTtAaZz0-9.,\s-]+$/,Fy=/^-?\d+(\.\d+)?\s+-?\d+(\.\d+)?\s+-?\d+(\.\d+)?\s+-?\d+(\.\d+)?$/;class Vy{static addIcon(e,a,i){const o="string"==typeof i.outlined,r="string"==typeof i.filled;if("string"==typeof i.outlined&&(i.outlined={viewBox:"0 -960 960 960",path:i.outlined}),"string"==typeof i.filled&&(i.filled={viewBox:"0 -960 960 960",path:i.filled}),t(this,Dy,"m",By).call(this,e,a,i.outlined,o),t(this,Dy,"m",By).call(this,e,a,i.filled,r),"undefined"==typeof window)return;const s=t(this,Dy,"m",Oy).call(this,e,a);t(this,Dy,"f",Wy).set(s,{outlined:K`<svg viewBox="${i.outlined.viewBox}"><path d="${i.outlined.path}"/></svg>`,filled:K`<svg viewBox="${i.filled.viewBox}"><path d="${i.filled.path}"/></svg>`}),t(this,Dy,"f",Hy).get(s)?.forEach(e=>e())}static isIconRegistered(e,a){return void 0!==window&&t(this,Dy,"f",Wy).has(t(this,Dy,"m",Oy).call(this,e,a))}static renderIcon(e,a,i){const o=t(this,Dy,"f",Wy).get(t(this,Dy,"m",Oy).call(this,e,a));return i?o?.filled:o?.outlined}static observe(e,a,i){if(void 0===window)return()=>{};const o=t(this,Dy,"m",Oy).call(this,e,a);return t(this,Dy,"f",Hy).has(o)?t(this,Dy,"f",Hy).get(o)?.push(i):t(this,Dy,"f",Hy).set(o,[i]),()=>{const e=t(this,Dy,"f",Hy).get(o);if(e){const a=e.indexOf(i);a>=0&&e.splice(a,1),0==e.length&&t(this,Dy,"f",Hy).delete(o)}}}}var Ny;Dy=Vy,Oy=function(e,t){return`${t}-${e}`},By=function(e,t,a,i=!1){if(!i&&!Fy.test(a.viewBox))throw new Error(`Unable to register icon '${e}' for variant '${t}'. Invalid viewbox data.`);if(!Ry.test(a.path))throw new Error(`Unable to register icon '${e}' for variant '${t}'. Invalid path data.`)},Wy={value:new Map},Hy={value:new Map};let qy=class extends(qo(me,"img")){constructor(){super(...arguments),Ny.set(this,void 0),this.name="",this.variant="outlined",this.filled=!1,this.grade="medium",this.weight=400,this.opticalSize=24}connectedCallback(){this.hasAttribute("aria-label")||this.hasAttribute("aria-labelledby")||this.hasAttribute("aria-hidden")||(this.ariaHidden="true"),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),t(this,Ny,"f")?.call(this)}willUpdate(e){super.willUpdate(e),e.has("name")&&!Vy.isIconRegistered(this.name,this.variant)&&a(this,Ny,Vy.observe(this.name,this.variant,()=>{this.requestUpdate(),t(this,Ny,"f")?.call(this),a(this,Ny,void 0,"f")}),"f")}updated(e){super.updated(e),e.has("filled")&&this._icon?.style.setProperty("--_icon-fill",this.filled?"1":"0"),e.has("grade")&&this._icon?.style.setProperty("--_icon-grade","low"===this.grade?"-25":"high"===this.grade?"200":"0"),e.has("weight")&&this._icon?.style.setProperty("--_icon-weight",`${this.weight}`),e.has("opticalSize")&&this._icon?.style.setProperty("--_icon-optical-size",`${this.opticalSize}`)}render(){return Vy.isIconRegistered(this.name,this.variant)?Vy.renderIcon(this.name,this.variant,this.filled):Y`<div class="icon" aria-hidden="true" translate="no">${this.name}</div>`}};function Uy(e,t,a){Vy.addIcon(e,t,a)}var jy,Yy,Ky,Zy,Xy,Gy,Qy;Ny=new WeakMap,qy.styles=c`:host { display: inline-block; user-select: none; font-size: var(--m3e-icon-size, 1.5rem); width: 1em; height: 1em; vertical-align: middle; overflow: hidden; } .icon { font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; width: inherit; height: inherit; vertical-align: inherit; font-variation-settings: "FILL" var(--_icon-fill, 0), "wght" var(--_icon-weight, 400), "GRAD" var(--_icon-grade, 0), "opsz" var(--_icon-optical-size, 24); } :host([variant="outlined"]) .icon { font-family: "Material Symbols Outlined"; } :host([variant="rounded"]) .icon { font-family: "Material Symbols Rounded"; } :host([variant="sharp"]) .icon { font-family: "Material Symbols Sharp"; } svg { fill: currentColor; font-size: inherit; width: 1em; height: 1em; }`,e([ye(".icon")],qy.prototype,"_icon",void 0),e([fe()],qy.prototype,"name",void 0),e([fe({reflect:!0})],qy.prototype,"variant",void 0),e([fe({type:Boolean,reflect:!0})],qy.prototype,"filled",void 0),e([fe()],qy.prototype,"grade",void 0),e([fe({type:Number})],qy.prototype,"weight",void 0),e([fe({attribute:"optical-size",type:Number})],qy.prototype,"opticalSize",void 0),qy=e([Aa("m3e-icon")],qy);let Jy=class extends(Bo(mi(qo(me,"listitem")))){constructor(){super(...arguments),jy.add(this),Yy.set(this,new za(this,{target:null,callback:()=>t(this,jy,"m",Gy).call(this)})),Ky.set(this,void 0),Zy.set(this,void 0)}get leadingContentType(){return t(this,Ky,"f")}get trailingContentType(){return t(this,Zy,"f")}reconnectedCallback(){super.reconnectedCallback(),t(this,jy,"m",Xy).call(this)}firstUpdated(e){super.firstUpdated(e),t(this,jy,"m",Xy).call(this)}render(){return Y`<div class="base">${this._renderBase()}</div>`}_renderBase(){return Y`<slot name="leading" @slotchange="${this._handleLeadingSlotChange}"><slot name="leading-icon" @slotchange="${this._handleLeadingSlotChange}"></slot></slot><div class="content"><slot name="overline"></slot><slot></slot><slot name="supporting-text"></slot></div><slot name="trailing" @slotchange="${this._handleTrailingSlotChange}"><slot name="trailing-supporting-text" @slotchange="${this._handleTrailingSlotChange}"></slot><slot name="trailing-icon" @slotchange="${this._handleTrailingSlotChange}"></slot></slot>`}_handleLeadingSlotChange(e){const i=t(this,Ky,"f");a(this,Ky,t(this,jy,"m",Qy).call(this,e.target),"f"),fi(this,"--has-leading",void 0!==t(this,Ky,"f")),i!==t(this,Ky,"f")&&this.closest("m3e-list,m3e-action-list,m3e-selection-list")?.notifyLeadingContentTypeChange(i,t(this,Ky,"f"))}_handleTrailingSlotChange(e){const i=t(this,Zy,"f");a(this,Zy,t(this,jy,"m",Qy).call(this,e.target),"f"),fi(this,"--has-trailing",void 0!==t(this,Zy,"f")),i!==t(this,Zy,"f")&&this.closest("m3e-list,m3e-action-list,m3e-selection-list")?.notifyTrailingContentTypeChange(i,t(this,Zy,"f"))}};var ew,tw,aw,iw,ow;Yy=new WeakMap,Ky=new WeakMap,Zy=new WeakMap,jy=new WeakSet,Xy=function(){const e=this.shadowRoot?.querySelector(".content");e&&t(this,Yy,"f").observe(e)},Gy=function(){const e=this.shadowRoot?.querySelector(".content")??null,t=null===e?0:He(e);fi(this,"--one-line",t<=1),fi(this,"--two-line",2==t),fi(this,"--three-line",t>2)},Qy=function(e){const t=e.assignedElements({flatten:!0});return t.some(e=>"VIDEO"===e.tagName)?"video":t.some(e=>"IMG"===e.tagName)?"image":t.some(e=>"M3E-AVATAR"===e.tagName)?"avatar":t.some(e=>"M3E-ICON"===e.tagName)?"icon":t.length>0?"text":void 0},Jy.styles=c`:host { display: block; } .base { display: flex; min-height: inherit; width: 100%; box-sizing: border-box; column-gap: var(--m3e-list-item-between-space, 1rem); padding-inline-start: var(--m3e-list-item-leading-space, 1rem); padding-inline-end: var(--m3e-list-item-trailing-space, 1rem); border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-container-shape, ${Xi.shape.corner.none}) ); transition: ${l(`border-radius ${Xi.motion.spring.fastEffects}, background-color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } :host(:is(:state(--one-line), :--one-line)) { min-height: calc(var(--m3e-list-item-one-line-height, 3.5rem) + ${Xi.density.calc(-3)}); } :host(:is(:state(--one-line), :--one-line)) .base { padding-block-start: var(--m3e-list-item-one-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-one-line-bottom-space, 0.5rem); } :host(:is(:state(--two-line), :--two-line)) { min-height: calc(var(--m3e-list-item-two-line-height, 4.5rem) + ${Xi.density.calc(-3)}); } :host(:is(:state(--two-line), :--two-line)) .base { padding-block-start: var(--m3e-list-item-two-line-top-space, 0.5rem); padding-block-end: var(--m3e-list-item-two-line-bottom-space, 0.5rem); } :host(:is(:state(--three-line), :--three-line)) { min-height: calc(var(--m3e-list-item-three-line-height, 5.5rem) + ${Xi.density.calc(-3)}); } :host(:is(:state(--three-line), :--three-line)) .base { padding-block-start: var(--m3e-list-item-three-line-top-space, 0.75rem); padding-block-end: var(--m3e-list-item-three-line-bottom-space, 0.75rem); } :host(:not(:is(:state(--three-line), :--three-line))) .base { align-items: center; } :host(:is(:state(--three-line), :--three-line)) .base { align-items: flex-start; } :host(:not(:disabled):not([selected])) .base:not(.hover).focus-visible:not(.pressed) { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-focus-container-shape, ${Xi.shape.corner.large}) ); } :host(:not(:disabled):not([selected])) .base.hover, :host(:not(:disabled):not([selected])) .base.pressed { border-top-left-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); border-top-right-radius: var( --_list-item-top-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); border-bottom-left-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); border-bottom-right-radius: var( --_list-item-bottom-container-shape, var(--m3e-list-item-hover-container-shape, ${Xi.shape.corner.medium}) ); } .content { flex: 1 1 auto; display: flex; flex-direction: column; align-items: unset; justify-content: unset; } ::slotted([slot="overline"]) { font-size: var(--m3e-list-item-overline-font-size, ${Xi.typescale.standard.label.small.fontSize}); font-weight: var(--m3e-list-item-overline-font-weight, ${Xi.typescale.standard.label.small.fontWeight}); line-height: var(--m3e-list-item-overline-line-height, ${Xi.typescale.standard.label.small.lineHeight}); letter-spacing: var(--m3e-list-item-overline-tracking, ${Xi.typescale.standard.label.small.tracking}); } ::slotted([slot="supporting-text"]) { font-size: var(--m3e-list-item-supporting-text-font-size, ${Xi.typescale.standard.body.medium.fontSize}); font-weight: var( --m3e-list-item-supporting-text-font-weight, ${Xi.typescale.standard.body.medium.fontWeight} ); line-height: var( --m3e-list-item-supporting-text-line-height, ${Xi.typescale.standard.body.medium.lineHeight} ); letter-spacing: var( --m3e-list-item-supporting-text-tracking, ${Xi.typescale.standard.body.medium.tracking} ); } ::slotted(:not([slot])) { font-size: var(--m3e-list-item-font-size, ${Xi.typescale.standard.body.large.fontSize}); font-weight: var(--m3e-list-item-font-weight, ${Xi.typescale.standard.body.large.fontWeight}); line-height: var(--m3e-list-item-line-height, ${Xi.typescale.standard.body.large.lineHeight}); letter-spacing: var(--m3e-list-item-tracking, ${Xi.typescale.standard.body.large.tracking}); } :host(:is(:state(--has-leading), :--has-leading)) slot[name="leading"], :host(:is(:state(--has-trailing), :--has-trailing)) slot[name="trailing"] { display: flex; justify-content: center; } :host(:not(:is(:state(--has-leading), :--has-leading))) slot[name="leading"] { display: var(--_list-item-leading-reserved-display, contents); } :host(:not(:is(:state(--has-trailing), :--has-trailing))) slot[name="trailing"] { display: var(--_list-item-trailing-reserved-display, contents); } slot[name="leading"] { min-width: var(--_list-item-leading-reserved-space, 0px); margin-inline-start: calc(0px - var(--_list-item-leading-reserved-outset, 0px)); } slot[name="trailing"] { min-width: var(--_list-item-trailing-reserved-space, 0px); margin-inline-end: calc(0px - var(--_list-item-trailing-reserved-outset, 0px)); } ::slotted(span[slot="trailing"]), ::slotted([slot="trailing-supporting-text"]) { white-space: nowrap; font-size: var(--m3e-list-item-trailing-text-font-size, ${Xi.typescale.standard.label.small.fontSize}); font-weight: var( --m3e-list-item-trailing-text-font-weight, ${Xi.typescale.standard.label.small.fontWeight} ); line-height: var( --m3e-list-item-trailing-text-line-height, ${Xi.typescale.standard.label.small.lineHeight} ); letter-spacing: var( --m3e-list-item-trailing-text-tracking, ${Xi.typescale.standard.label.small.tracking} ); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]), ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { display: block; margin: 0 auto; overflow: hidden; object-fit: cover; } ::slotted(video) { width: var(--m3e-list-item-video-width, 6.25rem); height: var(--m3e-list-item-video-height, 3.5rem); } ::slotted(video[slot="leading"]), ::slotted(video[slot="trailing"]) { border-radius: var(--m3e-list-item-video-shape, ${Xi.shape.corner.none}); } ::slotted(video[slot="leading"]) { margin-inline-start: calc(0px - var(--_list-item-leading-video-outset, 0px)); } ::slotted(video[slot="trailing"]) { margin-inline-end: calc(0px - var(--_list-item-trailing-video-outset, 0px)); } ::slotted(img) { user-drag: none; user-select: none; pointer-events: none; width: var(--m3e-list-item-image-width, 3.5rem); height: var(--m3e-list-item-image-height, 3.5rem); } ::slotted(img[slot="leading"]), ::slotted(img[slot="trailing"]) { border-radius: var(--m3e-list-item-image-shape, ${Xi.shape.corner.none}); } ::slotted(m3e-icon[slot="leading"]), ::slotted(m3e-icon[slot="leading-icon"]), ::slotted(m3e-icon[slot="trailing"]), ::slotted(m3e-icon[slot="trailing-icon"]) { --m3e-icon-size: var(--m3e-list-item-icon-size, 1.5rem); } :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading"]), :host(:not(:disabled)) ::slotted(m3e-icon[slot="leading-icon"]) { color: var(--m3e-list-item-leading-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) .content { color: var(--m3e-list-item-label-text-color, ${Xi.color.onSurface}); } :host(:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-overline-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-supporting-text-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) ::slotted([slot="trailing"]), :host(:not(:disabled)) ::slotted([slot="trailing-supporting-text"]), :host(:not(:disabled)) ::slotted([slot="trailing-icon"]) { color: var(--m3e-list-item-trailing-color, ${Xi.color.onSurfaceVariant}); } :host(:not(:disabled)) .base { background-color: var(--_list-item-container-color, var(--m3e-list-item-container-color, transparent)); } :host(:disabled) .base { background-color: var(--m3e-list-item-disabled-container-color, transparent); } :host(:disabled) ::slotted(video), :host(:disabled) ::slotted(img), :host(:disabled) ::slotted(m3e-avatar) { opacity: var(--m3e-list-item-disabled-media-opacity, 38%); } :host(:disabled) .content { color: color-mix( in srgb, var(--m3e-list-item-disabled-label-text-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="overline"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-overline-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-overline-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="supporting-text"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-supporting-text-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-supporting-text-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-leading-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-leading-opacity, 38%), transparent ); } :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: color-mix( in srgb, var(--m3e-list-item-disabled-trailing-color, ${Xi.color.onSurface}) var(--m3e-list-item-disabled-trailing-opacity, 38%), transparent ); } :host(:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var(--m3e-list-item-hover-state-layer-color, ${Xi.color.onSurface}); --m3e-state-layer-hover-opacity: var( --m3e-list-item-hover-state-layer-opacity, ${Xi.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var(--m3e-list-item-focus-state-layer-color, ${Xi.color.onSurface}); --m3e-state-layer-focus-opacity: var( --m3e-list-item-focus-state-layer-opacity, ${Xi.state.focusStateLayerOpacity} ); } :host(:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-pressed-state-layer-color, ${Xi.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-pressed-state-layer-opacity, ${Xi.state.pressedStateLayerOpacity} ); } @media (forced-colors: active) { .base { transition: none; } :host(:disabled) ::slotted([slot="leading"]), :host(:disabled) ::slotted([slot="leading-icon"]), :host(:disabled) .content, :host(:disabled) ::slotted([slot="overline"]), :host(:disabled) ::slotted([slot="supporting-text"]), :host(:disabled) ::slotted([slot="trailing"]), :host(:disabled) ::slotted([slot="trailing-supporting-text"]), :host(:disabled) ::slotted([slot="trailing-icon"]) { color: GrayText; } } @media (prefers-reduced-motion) { .base { transition: none; } }`,Jy=e([Aa("m3e-list-item")],Jy);let rw=class extends(mi(qo(me,"list"))){constructor(){super(...arguments),ew.add(this),tw.set(this,new Array),aw.set(this,{video:0,image:0,avatar:0,icon:0,text:0}),iw.set(this,{video:0,image:0,avatar:0,icon:0,text:0}),this.variant="standard"}get items(){return t(this,tw,"f")}get leadingContentType(){return t(this,aw,"f").video>0?"video":t(this,aw,"f").image>0?"image":t(this,aw,"f").avatar>0?"avatar":t(this,aw,"f").icon>0?"icon":t(this,aw,"f").text>0?"text":void 0}get trailingContentType(){return t(this,iw,"f").video>0?"video":t(this,iw,"f").image>0?"image":t(this,iw,"f").avatar>0?"avatar":t(this,iw,"f").icon>0?"icon":t(this,iw,"f").text>0?"text":void 0}render(){return Y`<slot @slotchange="${t(this,ew,"m",ow)}"></slot>`}notifyItemsChange(){}notifyLeadingContentTypeChange(e,a){e&&t(this,aw,"f")[e]--,a&&t(this,aw,"f")[a]++,["video","image","avatar","icon"].forEach(e=>{fi(this,`--has-leading-${e}`,this.leadingContentType===e)})}notifyTrailingContentTypeChange(e,a){e&&t(this,iw,"f")[e]--,a&&t(this,iw,"f")[a]--,["video","image","avatar","icon"].forEach(e=>{fi(this,`--has-trailing-${e}`,this.trailingContentType===e)})}};var sw,nw,lw,cw,dw,hw,mw,uw,pw;tw=new WeakMap,aw=new WeakMap,iw=new WeakMap,ew=new WeakSet,ow=function(e){a(this,tw,e.target.assignedElements({flatten:!0}).filter(e=>e instanceof Jy),"f"),t(this,tw,"f").forEach((e,a)=>{fi(e,"--first",0===a),fi(e,"--last",a===t(this,tw,"f").length-1)}),this.notifyItemsChange()},rw.styles=c`:host { display: flex; flex-direction: column; overflow-y: auto; box-sizing: border-box; padding-block: var(--m3e-list-block-padding, 0px); --m3e-divider-inset-start-size: var(--m3e-list-divider-inset-start-size, 1rem); --m3e-divider-inset-end-size: var(--m3e-list-divider-inset-end-size, 1.5rem); } :host([variant="standard"]) { --_list-item-leading-video-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-video-outset: var(--m3e-list-item-trailing-space, 1rem); --_expandable-list-item-expanded-toggle-icon-container-color: transparent; } :host([variant="segmented"]) { row-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); } :host([variant="segmented"]) { --m3e-list-item-container-color: var(--m3e-segmented-list-item-container-color, ${Xi.color.surface}); --m3e-list-item-disabled-container-color: var( --m3e-segmented-list-item-disabled-container-color, ${Xi.color.surface} ); --m3e-list-item-container-shape: var( --m3e-segmented-list-item-container-shape, ${Xi.shape.corner.extraSmall} ); --m3e-list-item-hover-container-shape: var( --m3e-segmented-list-item-hover-container-shape, ${Xi.shape.corner.medium} ); --m3e-list-item-focus-container-shape: var( --m3e-segmented-list-item-focus-container-shape, ${Xi.shape.corner.large} ); --m3e-list-item-selected-container-shape: var( --m3e-segmented-list-item-selected-container-shape, ${Xi.shape.corner.large} ); --m3e-list-item-video-shape: var(--m3e-segmented-list-item-video-shape, ${Xi.shape.corner.small}); --m3e-list-item-image-shape: var(--m3e-segmented-list-item-image-shape, ${Xi.shape.corner.small}); --m3e-list-item-between-space: var(--m3e-segmented-list-item-spacing, 0.75rem); --_expandable-list-item-items-segment-gap: var(--m3e-segmented-list-segment-gap, 0.125rem); --_expandable-list-item-expanded-top-shape: var( --m3e-segmented-list-container-shape, ${Xi.shape.corner.large} ); } :host([variant="segmented"]) ::slotted(:is(:state(--first), :--first)), :host([variant="segmented"]) ::slotted(:is(:state(--has-previous-open), :--has-previous-open):not([open])) { --_list-item-top-container-shape: var(--m3e-segmented-list-container-shape, ${Xi.shape.corner.large}); } :host([variant="segmented"]) ::slotted(:is(:state(--has-next-open), :--has-next-open):not([open])), :host([variant="segmented"]) ::slotted(:is(:state(--last), :--last)) { --_list-item-bottom-container-shape: var(--m3e-segmented-list-container-shape, ${Xi.shape.corner.large}); } :host([variant="segmented"]) ::slotted(m3e-divider) { display: none; } :host(:is(:state(--has-leading-video), :--has-leading-video)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-video-width, 6.25rem); } :host([variant="standard"]:is(:state(--has-leading-video), :--has-leading-video)) { --_list-item-leading-reserved-outset: var(--m3e-list-item-leading-space, 1rem); --_list-item-trailing-reserved-outset: var(--m3e-list-item-trailing-space, 1rem); } :host(:is(:state(--has-leading-image), :--has-leading-image)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-image-width, 3.5rem); } :host(:is(:state(--has-leading-avatar), :--has-leading-avatar)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-avatar-size, 2.5rem); } :host(:is(:state(--has-leading-icon), :--has-leading-icon)) { --_list-item-leading-reserved-display: block; --_list-item-leading-reserved-space: var(--m3e-list-item-icon-size, 1.5rem); }`,e([fe({reflect:!0})],rw.prototype,"variant",void 0),rw=e([Aa("m3e-list")],rw);let vw=pw=class extends Jy{constructor(){super(...arguments),sw.add(this),nw.set(this,pw.__nextId++),lw.set(this,`m3e-expandable-list-item-${t(this,nw,"f")}-content`),cw.set(this,`m3e-expandable-list-item-${t(this,nw,"f")}-header`),dw.set(this,new Array),this.disabled=!1,this.open=!1}get items(){return t(this,dw,"f")}focus(e){this.button?.focus(e)}blur(){this.button?.blur()}click(){this.button?.click()}updated(e){if(super.updated(e),e.has("open")){for(let e=this.previousElementSibling;e;e=e.previousElementSibling)if(e instanceof Jy){fi(e,"--has-next-open",this.open);break}for(let e=this.nextElementSibling;e;e=e.nextElementSibling)if(e instanceof Jy){fi(e,"--has-previous-open",this.open);break}}}render(){return Y`<div class="base"><m3e-list-item-button id="${t(this,cw,"f")}" class="header" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="${t(this,lw,"f")}" @click="${t(this,sw,"m",hw)}"><slot name="leading" slot="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><slot name="overline" slot="overline"></slot><slot></slot><slot name="supporting-text" slot="supporting-text"></slot><div class="toggle-container" slot="trailing" aria-hidden="true"><div class="toggle"><slot name="toggle-icon"><svg viewBox="0 -960 960 960" fill="currentColor"><path d="M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"/></svg></slot></div></div></m3e-list-item-button><m3e-collapsible id="${t(this,lw,"f")}" class="items" role="list" aria-labelledby="${t(this,cw,"f")}" ?open="${this.open}" @opening="${t(this,sw,"m",mw)}" @opened="${t(this,sw,"m",mw)}" @closing="${t(this,sw,"m",mw)}" @closed="${t(this,sw,"m",mw)}"><slot name="items" @slotchange="${t(this,sw,"m",uw)}"></slot></m3e-collapsible></div>`}};var fw,bw;nw=new WeakMap,lw=new WeakMap,cw=new WeakMap,dw=new WeakMap,sw=new WeakSet,hw=function(e){e.defaultPrevented||(this.open=!this.open,this.closest("m3e-action-list")?.[An].updateActiveItem(this.button))},mw=function(e){e.stopPropagation(),["opening","opened","closing","closed"].forEach(t=>{this.button?.classList.toggle(t,e.type===t)}),this.dispatchEvent(new Event(e.type,{bubbles:!0}))},uw=function(e){a(this,dw,e.target.assignedElements({flatten:!0}).flatMap(e=>[...e.childNodes].filter(e=>e instanceof Jy)),"f"),t(this,dw,"f").forEach((e,a)=>{a==t(this,dw,"f").length-1?e.style.setProperty("--_list-item-bottom-container-shape",`var(--m3e-segmented-list-container-shape, ${Xi.shape.corner.large})`):e.style.removeProperty("--_list-item-bottom-container-shape")}),this.closest("m3e-list, m3e-action-list, m3e-selection-list")?.notifyItemsChange()},vw.styles=c`:host { display: block; } .header { width: 100%; margin-bottom: 0px; transition: ${l(`margin-bottom \n var(--m3e-expandable-list-item-bounce-duration, ${Xi.motion.duration.medium1})\n ${Xi.motion.easing.standard}`)}; --_list-item-button-trailing-align-self: stretch; } .toggle-container { display: flex; align-items: center; justify-content: center; align-self: stretch; width: var(--m3e-expandable-list-item-toggle-icon-container-width, 2rem); border-radius: var(--m3e-expandable-list-item-toggle-icon-container-shape, ${Xi.shape.corner.full}); transition: ${l(`background-color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } .toggle { display: flex; align-items: center; justify-content: center; vertical-align: middle; font-size: var(--m3e-expandable-list-item-toggle-icon-size, 1.5rem); transition: ${l(`transform ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } .toggle svg, ::slotted(svg[slot="toggle-icon"]) { width: 1em; height: 1em; } :host([open]) .toggle-container { background-color: var( --_expandable-list-item-expanded-toggle-icon-container-color, var(--m3e-expandable-list-item-expanded-toggle-icon-container-color, ${Xi.color.surfaceContainer}) ); } :host([open]) .toggle { transform: rotate(180deg); } :host([open]) .header { --_list-item-top-container-shape: var(--_expandable-list-item-expanded-top-shape, initial); --_list-item-bottom-container-shape: initial; margin-bottom: var(--_expandable-list-item-items-segment-gap, 0px); } :host([open]) .header.opening { margin-bottom: calc( var(--_expandable-list-item-items-segment-gap, 0px) * var(--m3e-expandable-list-item-bounce-factor, 4) ); } :host([open]) .header, :host([open]) .items { --_list-item-container-color: var( --m3e-expandable-list-item-expanded-container-color, var(--m3e-list-item-container-color, transparent) ); } .base, ::slotted([slot="items"]) { display: flex; flex-direction: column; box-sizing: border-box; } ::slotted([slot="items"]) { flex: none; --_list-item-top-container-shape: initial; --_list-item-bottom-container-shape: initial; row-gap: var(--_expandable-list-item-items-segment-gap, 0px); } .items { --m3e-collapsible-animation-duration: var( --m3e-expandable-list-item-expand-duration, ${Xi.motion.duration.medium1} ); } @media (forced-colors: active) { .header { transition: none; } :host([open]) .header.opening { margin-bottom: var(--_expandable-list-item-items-segment-gap, 0px); } } @media (prefers-reduced-motion) { .header, .toggle-container, .toggle { transition: none; } }`,vw.__nextId=0,e([fe({type:Boolean,reflect:!0})],vw.prototype,"disabled",void 0),e([fe({type:Boolean,reflect:!0})],vw.prototype,"open",void 0),e([ye(".header")],vw.prototype,"button",void 0),vw=pw=e([Aa("m3e-expandable-list-item")],vw);let gw=class extends rw{constructor(){super(...arguments),fw.set(this,e=>this[An].onKeyDown(e)),this[bw]=(new Tn).withWrap().withHomeAndEnd().withVerticalOrientation().withSkipPredicate(e=>{if(e.disabled)return!0;const t=e.getRootNode().host;if("items"===t.parentElement?.slot){let e=t.closest("m3e-expandable-list-item");for(;e;){if(!e.open)return!0;const t=e.closest("m3e-expandable-list-item,m3e-action-list");if(!(t instanceof vw))break;e=t}}return!1})}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",t(this,fw,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,fw,"f"))}async notifyItemsChange(){const e=[...this.querySelectorAll("m3e-list-action,m3e-expandable-list-item")];for(const t of e)t.isUpdatePending&&await t.updateComplete;this.isUpdatePending&&await this.updateComplete;const{added:t}=this[An].setItems(e.map(e=>e.button));this[An].activeItem||this[An].updateActiveItem(t.find(e=>!e.disabled))}};fw=new WeakMap,bw=An,gw=e([Aa("m3e-action-list")],gw);let yw=class extends(Mo(Do(xo(Qi(mi(qo(Jy,"button"),!0)))))){constructor(){super(),new Sa(this,{callback:(e,t)=>this.shadowRoot?.querySelector(".base")?.classList.toggle("focus-visible",t)}),new Ta(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("pressed",e)}),new _a(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("hover",e)})}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this))}render(){return Y`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple>${this[zo]()} ${super._renderBase()}</div>`}};var ww,$w;yw.styles=[Jy.styles,c`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } :host(:not(:disabled)) { cursor: pointer; } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } slot[name="trailing"] { align-self: var(--_list-item-button-trailing-align-self, auto); }`],e([ye(".focus-ring")],yw.prototype,"_focusRing",void 0),e([ye(".state-layer")],yw.prototype,"_stateLayer",void 0),e([ye(".ripple")],yw.prototype,"_ripple",void 0),yw=e([Aa("m3e-list-item-button")],yw);let xw=class extends(Do(Jy,!0)){constructor(){super(...arguments),ww.add(this),this.disabled=!1}focus(e){this.button?.focus(e)}blur(){this.button?.blur()}click(){this.button?.click()}render(){return Y`<m3e-list-item-button class="button" ?disabled="${this.disabled}" href="${To(this.href||void 0)}" target="${To(this.target||void 0)}" download="${To(this.download||void 0)}" rel="${To(this.rel||void 0)}" @click="${t(this,ww,"m",$w)}"><slot name="leading" slot="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><slot name="overline" slot="overline"></slot><slot></slot><slot name="supporting-text" slot="supporting-text"></slot><slot name="trailing" slot="trailing" @slotchange="${this._handleTrailingSlotChange}"></slot></m3e-list-item-button>`}};var kw,Cw,Sw,_w,Ew,Lw;ww=new WeakSet,$w=function(e){e.defaultPrevented||this.closest("m3e-action-list")?.[An].updateActiveItem(this.button)},xw.styles=c`:host { display: block; } .button { width: 100%; }`,e([ye(".button")],xw.prototype,"button",void 0),e([fe({type:Boolean,reflect:!0})],xw.prototype,"disabled",void 0),xw=e([Aa("m3e-list-action")],xw);let Pw=class extends(Mo(xo(xi(Qi(mi(qo(Jy,"option"),!0)))))){constructor(){super(),kw.add(this),Cw.set(this,void 0),Sw.set(this,""),_w.set(this,e=>t(this,kw,"m",Lw).call(this,e)),new Sa(this,{callback:(e,t)=>this.shadowRoot?.querySelector(".base")?.classList.toggle("focus-visible",t)}),new Ta(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("pressed",e)}),new _a(this,{callback:e=>this.shadowRoot?.querySelector(".base")?.classList.toggle("hover",e)})}get value(){return t(this,Cw,"f")??t(this,Sw,"f")}set value(e){a(this,Cw,e,"f")}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,_w,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,_w,"f"))}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this))}update(e){if(super.update(e),e.has("selected")){this.closest("m3e-selection-list")?.[An].notifySelectionChange(this);for(const e of this.querySelectorAll("m3e-icon"))e.toggleAttribute("filled",this.selected)}}render(){return Y`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><slot name="leading" @slotchange="${this._handleLeadingSlotChange}"></slot><div class="content"><slot name="overline"></slot><slot @slotchange="${t(this,kw,"m",Ew)}"></slot><slot name="supporting-text"></slot></div><slot name="trailing" @slotchange="${this._handleTrailingSlotChange}"></slot><div class="indicator">${this.closest("m3e-selection-list")?.multi?Y`<m3e-pseudo-checkbox ?checked="${this.selected}" ?disabled="${this.disabled}"></m3e-pseudo-checkbox>`:Y`<m3e-pseudo-radio ?checked="${this.selected}" ?disabled="${this.disabled}"></m3e-pseudo-radio>`}</div></div>`}};var Mw,Tw,zw,Aw,Iw;Cw=new WeakMap,Sw=new WeakMap,_w=new WeakMap,kw=new WeakSet,Ew=function(e){a(this,Sw,Qe(e.target),"f")},Lw=function(e){const t=this.closest("m3e-selection-list");!e.defaultPrevented&&t&&(!t.multi&&this.selected||this.dispatchEvent(new Event("beforeinput",{bubbles:!0,cancelable:!0}))&&(this.selected=!this.selected,t[An].notifySelectionChange(this),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0}))))},Pw.styles=[Jy.styles,c`:host { outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { position: relative; } .indicator { min-width: 1.5rem; min-height: 1.5rem; display: flex; align-items: center; justify-content: center; } :host(:not(:disabled)) { cursor: pointer; } :host(:is(:state(--three-line), :--three-line)) .indicator { align-self: flex-start; margin-top: var(--m3e-list-item-three-line-top-offset, 0.25rem); } :host([selected]) .base, :host([selected]) .state-layer, :host([selected]) .ripple, :host([selected]) .focus-ring { border-radius: var(--m3e-list-item-selected-container-shape, ${Xi.shape.corner.large}); } :host([selected]:not(:disabled)) .content { color: var(--m3e-list-item-selected-label-text-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="overline"]) { color: var(--m3e-list-item-selected-overline-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="supporting-text"]) { color: var(--m3e-list-item-selected-supporting-text-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="leading"]) { color: var(--m3e-list-item-selected-leading-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) ::slotted([slot="trailing"]) { color: var(--m3e-list-item-selected-trailing-color, ${Xi.color.onSecondaryContainer}); } :host([selected]:not(:disabled)) .base { background-color: var(--m3e-list-item-selected-container-color, ${Xi.color.secondaryContainer}); } :host([selected]:disabled) .base { background-color: color-mix( in srgb, var(--m3e-list-item-selected-disabled-container-color, ${Xi.color.onSurface}) var(--m3e-list-item-selected-disabled-container-opacity, 10%), transparent ); } :host([selected]:not(:disabled)) .state-layer { --m3e-state-layer-hover-color: var( --m3e-list-item-selected-hover-state-layer-color, ${Xi.color.onSurface} ); --m3e-state-layer-hover-opacity: var( --m3e-list-item-selected-hover-state-layer-opacity, ${Xi.state.hoverStateLayerOpacity} ); --m3e-state-layer-focus-color: var( --m3e-list-item-selected-focus-state-layer-color, ${Xi.color.onSurface} ); --m3e-state-layer-focus-opacity: var( --m3e-list-item-selected-focus-state-layer-opacity, ${Xi.state.focusStateLayerOpacity} ); } :host([selected]:not(:disabled)) .ripple { --m3e-ripple-color: var(--m3e-list-item-selected-pressed-state-layer-color, ${Xi.color.onSurface}); --m3e-ripple-opacity: var( --m3e-list-item-selected-pressed-state-layer-opacity, ${Xi.state.pressedStateLayerOpacity} ); } :host(:is(:state(--hide-selection), :--hide-selection)) .indicator, :host(:not(:is(:state(--hide-selection), :--hide-selection))) ::slotted([slot="trailing"]) { display: none; } @media (forced-colors: active) { :host([selected]:not(:disabled)) .content, :host([selected]:not(:disabled)) ::slotted([slot="overline"]), :host([selected]:not(:disabled)) ::slotted([slot="supporting-text"]), :host([selected]:not(:disabled)) ::slotted([slot="leading"]), :host([selected]:not(:disabled)) ::slotted([slot="trailing"]) { color: HighlightText; forced-color-adjust: none; } :host([selected]:not(:disabled)) .base { background-color: Highlight; } }`],e([ye(".focus-ring")],Pw.prototype,"_focusRing",void 0),e([ye(".state-layer")],Pw.prototype,"_stateLayer",void 0),e([ye(".ripple")],Pw.prototype,"_ripple",void 0),e([fe()],Pw.prototype,"value",null),Pw=e([Aa("m3e-list-option")],Pw);let Dw=class extends(no(Li(Ti(vo(Qi(mi(qo(rw,"listbox")))))))){constructor(){super(...arguments),Mw.add(this),Tw.set(this,e=>this[An].onKeyDown(e)),zw.set(this,e=>t(this,Mw,"m",Aw).call(this,e)),this[Iw]=(new In).withWrap().withHomeAndEnd().withVerticalOrientation(),this.multi=!1,this.hideSelectionIndicator=!1}get options(){return this[An]?.items??[]}get selected(){return this[An]?.selectedItems??[]}get value(){const e=this.selected.filter(e=>!e.disabled).map(e=>e.value);switch(e.length){case 0:return null;case 1:return e[0];default:return e}}get[(Tw=new WeakMap,zw=new WeakMap,Mw=new WeakSet,Iw=An,lo)](){const e=this.value;if(Array.isArray(e)){const t=new FormData;for(const a of e)t.append(this.name,a);return t}return e}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",t(this,Tw,"f")),this.addEventListener("change",t(this,zw,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,Tw,"f")),this.removeEventListener("change",t(this,zw,"f"))}update(e){super.update(e),e.has("disabled")&&(void 0!==e.get("disabled")||this.disabled)&&(this[An].disabled=this.disabled),e.has("multi")&&(this[An].multi=this.multi,this.multi?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable"),this[An].items.forEach(e=>e.requestUpdate())),e.has("hideSelectionIndicator")&&this[An].items.forEach(e=>fi(e,"--hide-selection",this.hideSelectionIndicator))}notifyItemsChange(){const{added:e}=this[An].setItems(this.items.filter(e=>e instanceof Pw));e.forEach(e=>fi(e,"--hide-selection",this.hideSelectionIndicator)),this[An].activeItem||this[An].updateActiveItem(e.find(e=>!e.disabled))}};Aw=function(e){e.target!==this&&(e.stopImmediatePropagation(),e.stopPropagation(),this.dispatchEvent(new Event("change",{bubbles:!0})))},e([fe({type:Boolean})],Dw.prototype,"multi",void 0),e([fe({attribute:"hide-selection-indicator",type:Boolean})],Dw.prototype,"hideSelectionIndicator",void 0),Dw=e([Aa("m3e-selection-list")],Dw);const Ww=l("var(--m3e-loading-indicator-size, 2.375rem)"),Hw=l(`var(--m3e-loading-indicator-active-indicator-color, ${Xi.color.primary})`),Ow=l(`var(--m3e-loading-indicator-contained-active-indicator-color, ${Xi.color.onPrimaryContainer})`),Bw=l(`var(--m3e-loading-indicator-contained-container-color, ${Xi.color.secondaryContainer})`),Rw=l(`var(--m3e-loading-indicator-container-shape, ${Xi.shape.corner.full})`),Fw=l("var(--m3e-loading-indicator-container-size, 3rem)"),Vw={"4-sided-cookie":"M230.389 50.473C293.109 23.2328 356.767 86.8908 329.527 149.611L325.023 159.981C316.707 179.13 316.707 200.87 325.023 220.019L329.527 230.389C356.767 293.109 293.109 356.767 230.389 329.527L220.019 325.023C200.87 316.707 179.13 316.707 159.981 325.023L149.611 329.527C86.8908 356.767 23.2328 293.109 50.473 230.389L54.9768 220.019C63.2934 200.87 63.2934 179.13 54.9768 159.981L50.473 149.611C23.2328 86.8908 86.8908 23.2328 149.611 50.473L159.981 54.9768C179.13 63.2934 200.87 63.2934 220.019 54.9768L230.389 50.473Z","9-sided-cookie":"M154.828 43.2756C156.574 41.8498 157.448 41.1369 158.245 40.535C177.03 26.3548 202.97 26.3548 221.755 40.535C222.552 41.1369 223.425 41.8498 225.172 43.2756C225.952 43.9121 226.342 44.2303 226.727 44.5333C235.567 51.4788 246.406 55.4147 257.652 55.7636C258.143 55.7788 258.647 55.785 259.654 55.7975C261.911 55.8255 263.039 55.8395 264.037 55.8898C287.563 57.0742 307.435 73.7107 312.689 96.6205C312.912 97.5928 313.121 98.6991 313.541 100.911C313.728 101.899 313.822 102.393 313.922 102.872C316.219 113.862 321.986 123.828 330.377 131.308C330.743 131.635 331.125 131.962 331.888 132.618C333.599 134.087 334.454 134.821 335.187 135.5C352.445 151.495 356.95 176.983 346.215 197.903C345.76 198.791 345.208 199.773 344.104 201.737C343.611 202.613 343.364 203.052 343.132 203.483C337.812 213.375 335.809 224.708 337.418 235.82C337.488 236.304 337.569 236.8 337.732 237.792C338.096 240.014 338.278 241.125 338.402 242.115C341.318 265.436 328.347 287.851 306.647 296.991C305.726 297.379 304.67 297.778 302.559 298.574C301.617 298.929 301.146 299.107 300.69 299.289C290.241 303.455 281.406 310.852 275.48 320.395C275.221 320.811 274.964 321.243 274.449 322.107C273.297 324.043 272.721 325.011 272.178 325.849C259.387 345.584 235.011 354.436 212.498 347.521C211.543 347.228 210.477 346.856 208.347 346.112C207.396 345.78 206.921 345.614 206.455 345.461C195.767 341.951 184.233 341.951 173.545 345.461C173.079 345.614 172.603 345.78 171.652 346.112C169.522 346.856 168.457 347.228 167.502 347.521C144.989 354.436 120.613 345.584 107.822 325.849C107.279 325.011 106.703 324.043 105.55 322.107C105.036 321.243 104.779 320.811 104.52 320.395C98.5939 310.852 89.7583 303.455 79.3096 299.289C78.8539 299.107 78.3827 298.929 77.4404 298.574C75.3294 297.778 74.274 297.379 73.3529 296.991C51.6523 287.851 38.6819 265.436 41.598 242.115C41.7218 241.125 41.9039 240.014 42.2682 237.792C42.4308 236.8 42.5121 236.304 42.5822 235.82C44.1908 224.708 42.188 213.375 36.8675 203.483C36.6354 203.052 36.389 202.613 35.8962 201.737C34.7921 199.773 34.2401 198.791 33.7845 197.903C23.0499 176.983 27.5544 151.495 44.8128 135.5C45.5454 134.821 46.4007 134.087 48.1113 132.618C48.875 131.962 49.2568 131.635 49.6228 131.308C58.0134 123.828 63.7804 113.862 66.0777 102.872C66.1779 102.393 66.2715 101.899 66.4588 100.911C66.8783 98.699 67.088 97.5928 67.311 96.6204C72.5652 73.7107 92.4369 57.0742 115.962 55.8898C116.961 55.8395 118.089 55.8255 120.346 55.7975C121.353 55.785 121.857 55.7788 122.347 55.7636C133.594 55.4147 144.432 51.4788 153.272 44.5333C153.658 44.2303 154.048 43.9121 154.828 43.2756Z",oval:"M271.309 271.309C201.705 340.913 108.877 360.935 63.9707 316.029C19.0648 271.123 39.0867 178.295 108.691 108.691C178.295 39.0867 271.123 19.0648 316.029 63.9707C360.935 108.877 340.913 201.705 271.309 271.309Z",pentagon:"M155.064 49.459C176.093 34.1803 204.569 34.1803 225.598 49.459L322.926 120.171C343.955 135.45 352.754 162.532 344.722 187.253L307.546 301.668C299.514 326.39 276.476 343.127 250.483 343.127H130.18C104.186 343.127 81.1489 326.39 73.1164 301.668L35.9407 187.253C27.9082 162.532 36.7077 135.45 57.737 120.171L155.064 49.459Z",pill:"M116.116 71.7851C169.162 18.7383 255.168 18.7383 308.215 71.7851C361.262 124.832 361.262 210.838 308.215 263.884L263.884 308.215C210.838 361.262 124.832 361.262 71.7851 308.215C18.7383 255.168 18.7383 169.162 71.7851 116.116L116.116 71.7851Z","soft-burst":"M175.147 33.1508C181.983 22.2831 198.017 22.2831 204.853 33.1508L221.238 59.2009C225.731 66.3458 234.797 69.2506 242.692 66.0751L271.475 54.4972C283.482 49.6671 296.455 58.9613 295.507 71.7154L293.235 102.288C292.612 110.673 298.215 118.278 306.494 120.284L336.681 127.601C349.275 130.653 354.23 145.692 345.861 155.461L325.8 178.877C320.298 185.3 320.298 194.7 325.8 201.123L345.861 224.539C354.23 234.308 349.275 249.347 336.681 252.399L306.494 259.716C298.215 261.722 292.612 269.327 293.235 277.712L295.507 308.285C296.455 321.039 283.482 330.333 271.475 325.503L242.692 313.925C234.797 310.749 225.731 313.654 221.238 320.799L204.853 346.849C198.017 357.717 181.983 357.717 175.147 346.849L158.762 320.799C154.269 313.654 145.203 310.749 137.308 313.925L108.525 325.503C96.5177 330.333 83.5454 321.039 84.4931 308.285L86.7649 277.712C87.388 269.327 81.785 261.722 73.5056 259.716L43.3186 252.399C30.7252 249.347 25.7702 234.308 34.1391 224.539L54.1997 201.123C59.7018 194.7 59.7018 185.3 54.1997 178.877L34.1391 155.461C25.7702 145.692 30.7252 130.653 43.3186 127.601L73.5056 120.284C81.785 118.278 87.388 110.673 86.7649 102.288L84.4931 71.7154C83.5454 58.9613 96.5177 49.6671 108.525 54.4972L137.308 66.0751C145.203 69.2506 154.269 66.3458 158.762 59.201L175.147 33.1508Z",sunny:"M276.453 68.8118C286.405 69.4881 291.381 69.8263 295.404 71.5853C301.223 74.1305 305.87 78.7766 308.415 84.5965C310.174 88.6186 310.512 93.5948 311.188 103.547L312.732 126.259C313.005 130.284 313.142 132.296 313.579 134.219C314.212 136.997 315.31 139.648 316.827 142.059C317.877 143.728 319.203 145.248 321.856 148.288L336.824 165.438C343.384 172.954 346.663 176.712 348.263 180.8C350.579 186.715 350.579 193.285 348.263 199.2C346.663 203.288 343.384 207.046 336.824 214.562L321.856 231.712C319.203 234.752 317.877 236.272 316.827 237.941C315.31 240.352 314.212 243.003 313.579 245.781C313.142 247.704 313.005 249.716 312.732 253.741L311.188 276.453C310.512 286.405 310.174 291.381 308.415 295.404C305.87 301.223 301.223 305.87 295.404 308.415C291.381 310.174 286.405 310.512 276.453 311.188L253.741 312.732C249.716 313.005 247.704 313.142 245.781 313.579C243.003 314.212 240.352 315.31 237.941 316.827C236.272 317.877 234.752 319.203 231.712 321.856L214.562 336.824C207.046 343.384 203.288 346.663 199.2 348.263C193.285 350.579 186.715 350.579 180.8 348.263C176.712 346.663 172.954 343.384 165.438 336.824L148.288 321.856C145.248 319.203 143.728 317.877 142.059 316.827C139.648 315.31 136.997 314.212 134.219 313.579C132.296 313.142 130.284 313.005 126.259 312.732L103.547 311.188C93.5947 310.512 88.6186 310.174 84.5965 308.415C78.7766 305.87 74.1305 301.223 71.5853 295.404C69.8263 291.381 69.4881 286.405 68.8118 276.453L67.2684 253.741C66.9949 249.716 66.8581 247.704 66.4206 245.781C65.7883 243.003 64.6903 240.352 63.173 237.941C62.123 236.272 60.7965 234.752 58.1437 231.712L43.1756 214.562C36.6164 207.046 33.3369 203.288 31.7366 199.2C29.4211 193.285 29.4211 186.715 31.7366 180.8C33.3369 176.712 36.6164 172.954 43.1756 165.438L58.1437 148.288C60.7965 145.248 62.123 143.728 63.173 142.059C64.6903 139.648 65.7883 136.997 66.4206 134.219C66.8581 132.296 66.9949 130.284 67.2684 126.259L68.8118 103.547C69.4881 93.5948 69.8263 88.6186 71.5853 84.5965C74.1305 78.7766 78.7766 74.1305 84.5965 71.5853C88.6186 69.8263 93.5948 69.4881 103.547 68.8118L126.259 67.2684C130.284 66.9949 132.296 66.8581 134.219 66.4206C136.997 65.7883 139.648 64.6903 142.059 63.173C143.728 62.123 145.248 60.7966 148.288 58.1437L165.438 43.1756C172.954 36.6164 176.712 33.3369 180.8 31.7366C186.715 29.4211 193.285 29.4211 199.2 31.7366C203.288 33.3369 207.046 36.6164 214.562 43.1756L231.712 58.1437C234.752 60.7966 236.272 62.123 237.941 63.173C240.352 64.6903 243.003 65.7883 245.781 66.4206C247.704 66.8581 249.716 66.9949 253.741 67.2684L276.453 68.8118Z"};let Nw=new Array;const qw=new Map;for(const e in Vw)Nw.push(Vw[e]),qw.set(e,Nw.length-1);const Uw={};Nw=Ke(Nw,300);for(const e of qw)Uw[e[0]]=l(Nw[e[1]]);const jw=Uw;let Yw=class extends(Bo(qo(me,"progressbar"))){constructor(){super(...arguments),this.variant="uncontained"}connectedCallback(){super.connectedCallback(),this.ariaValueMin=this.ariaValueMin||"0",this.ariaValueMax=this.ariaValueMax||"100"}disconnectedCallback(){super.disconnectedCallback(),this._container?.classList.toggle("animate",!1)}reconnectedCallback(){super.reconnectedCallback(),this._container?.classList.toggle("animate",!0)}firstUpdated(e){super.firstUpdated(e),this._container?.classList.toggle("animate",!0)}render(){return Y`<div class="container" aria-hidden="true"><div class="active-indicator-wrapper"><div class="active-indicator"></div></div></div>`}};Yw.styles=c`:host { display: inline-block; aspect-ratio: 1 / 1; contain: strict; vertical-align: middle; content-visibility: auto; } :host([variant="uncontained"]) { width: ${Ww}; } :host([variant="contained"]) { width: ${Fw}; } :host([variant="uncontained"]) .active-indicator { background-color: ${Hw}; } :host([variant="contained"]) .active-indicator { background-color: ${Ow}; } :host([variant="contained"]) .container { background-color: ${Bw}; } .container { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: ${Rw}; } .active-indicator { margin: auto; aspect-ratio: 1 / 1; width: calc(${Ww} * 0.842); transform-origin: center; transition: clip-path ${Xi.motion.spring.slowEffects}; will-change: transform, clip-path; --_polygon-soft-burst: polygon(${jw["soft-burst"]}); --_polygon-9-sided-cookie: polygon(${jw["9-sided-cookie"]}); --_polygon-pentagon: polygon(${jw.pentagon}); --_polygon-pill: polygon(${jw.pill}); --_polygon-sunny: polygon(${jw.sunny}); --_polygon-4-sided-cookie: polygon(${jw["4-sided-cookie"]}); --_polygon-oval: polygon(${jw.oval}); } .container.animate .active-indicator-wrapper { animation: rotate-outer 4666ms linear infinite; transform-origin: center; display: flex; align-items: center; justify-content: center; will-change: transform; } @keyframes rotate-outer { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .container.animate .active-indicator { animation: rotate-inner 4666ms cubic-bezier(0.34, 0.88, 0.34, 1) infinite; } @keyframes rotate-inner { 0% { clip-path: var(--_polygon-soft-burst); transform: rotate(0deg); } 14% { clip-path: var(--_polygon-9-sided-cookie); transform: rotate(154deg) scale(1); } 29% { clip-path: var(--_polygon-pentagon); transform: rotate(309deg) scale(1); } 43% { clip-path: var(--_polygon-pill); transform: rotate(463deg) scale(1); } 57% { clip-path: var(--_polygon-sunny); transform: rotate(617deg) scale(1); } 71% { clip-path: var(--_polygon-4-sided-cookie); transform: rotate(771deg) scale(1); } 83% { clip-path: var(--_polygon-oval); transform: rotate(926deg) scale(1); } 100% { clip-path: var(--_polygon-soft-burst); transform: rotate(1080deg) scale(1); } } @media (forced-colors: active) { .active-indicator { background-color: CanvasText !important; } }`,e([ye(".container")],Yw.prototype,"_container",void 0),e([fe({reflect:!0})],Yw.prototype,"variant",void 0),Yw=e([Aa("m3e-loading-indicator")],Yw);class Kw extends(Mo(xo(mi(Qi(me),!0)))){constructor(){super(),new Sa(this,{callback:e=>{e&&this.menu?._activate()}})}get menu(){return this.closest("m3e-menu")}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this))}render(){return Y`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div>${Ao(this)?this[zo]():X}<div class="wrapper">${this._renderContent()}</div></div>`}}Kw.styles=c`:host { display: inline-block; outline: none; user-select: none; flex: none; height: calc(var(--m3e-menu-item-container-height, 2.75rem) + ${Xi.density.calc(-3)}); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not(:disabled)) .base { color: var(--m3e-menu-item-color, ${Xi.color.onSurface}); } :host(:not([aria-expanded="true"])) .base { --m3e-state-layer-hover-color: var(--m3e-menu-item-container-hover-color, ${Xi.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-menu-item-container-focus-color, ${Xi.color.onSurface}); --m3e-ripple-color: var(--m3e-menu-item-ripple-color, ${Xi.color.onSurface}); } :host(:not(:disabled)[aria-expanded="true"]) .base { background-color: color-mix( in srgb, var(--m3e-menu-item-active-state-layer-color, ${Xi.color.onSurface}) var(--m3e-menu-active-state-layer-opacity, 8%), transparent ); } :host([aria-expanded="true"]) .state-layer { display: none; } :host(:not(:disabled)[checked]) .base { color: var(--m3e-menu-item-selected-color, ${Xi.color.onTertiaryContainer}); background-color: var(--m3e-menu-item-selected-container-color, ${Xi.color.tertiaryContainer}); } :host([checked]) .base { --m3e-state-layer-hover-color: var( --m3e-menu-item-selected-container-hover-color, ${Xi.color.onTertiaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-menu-item-selected-container-focus-color, ${Xi.color.onTertiaryContainer} ); --m3e-ripple-color: var(--m3e-menu-item-selected-ripple-color, ${Xi.color.onTertiaryContainer}); } :host(:not(:disabled)) { cursor: pointer; } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-menu-item-disabled-color, ${Xi.color.onSurface}) var(--m3e-menu-item-disabled-opacity, 38%), transparent ); } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; position: relative; width: 100%; height: 100%; border-radius: var(--m3e-menu-item-shape, ${Xi.shape.corner.extraSmall}); transition: ${l(`border-radius ${Xi.motion.spring.fastEffects}`)}; } :host([checked]:not(:is(:state(--first), :--first))) .base { border-top-left-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); border-top-right-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); } :host([checked]:not(:is(:state(--last), :--last))) .base { border-bottom-left-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); border-bottom-right-radius: var(--m3e-menu-item-selected-shape, ${Xi.shape.corner.medium}); } :host(:is(:state(--first), :--first)) .base { border-top-left-radius: var(--m3e-menu-item-first-child-shape, ${Xi.shape.corner.medium}); border-top-right-radius: var(--m3e-menu-item-first-child-shape, ${Xi.shape.corner.medium}); } :host(:is(:state(--last), :--last)) .base { border-bottom-left-radius: var(--m3e-menu-item-last-child-shape, ${Xi.shape.corner.medium}); border-bottom-right-radius: var(--m3e-menu-item-last-child-shape, ${Xi.shape.corner.medium}); } .touch { position: absolute; height: calc( var(--m3e-menu-item-container-height, 2.75rem) + calc(var(--m3e-menu-gap, 0.125rem) * 2) + ${Xi.density.calc(-3)} ); left: 0; right: 0; } .wrapper { flex: 1 1 auto; display: inline-flex; align-items: center; column-gap: var(--m3e-menu-item-icon-label-space, 0.5rem); padding-inline-start: var(--m3e-menu-item-padding-start, 0.75rem); padding-inline-end: var(--m3e-menu-item-padding-end, 0.75rem); font-size: var(--m3e-menu-item-label-text-font-size, ${Xi.typescale.standard.label.large.fontSize}); font-weight: var( --m3e-menu-item-label-text-font-weight, ${Xi.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-menu-item-label-text-line-height, ${Xi.typescale.standard.label.large.lineHeight} ); letter-spacing: var(--m3e-menu-item-label-text-tracking, ${Xi.typescale.standard.label.large.tracking}); } .focus-ring { border-radius: var(--m3e-menu-item-focus-ring-shape, inherit); } .content { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } ::slotted([slot="icon"]), ::slotted([slot="trailing-icon"]), .trailing-icon { flex: none; width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } @media (prefers-reduced-motion) { .base { transition: none; } } @media (forced-colors: active) { .base { background-color: Menu; color: MenuText; } :host(:disabled) .base { color: GrayText; } }`,e([ye(".focus-ring")],Kw.prototype,"_focusRing",void 0),e([ye(".state-layer")],Kw.prototype,"_stateLayer",void 0),e([ye(".ripple")],Kw.prototype,"_ripple",void 0);let Zw=class extends(Po(ir)){get menu(){return"M3E-MENU"===this.control?.tagName?this.control:null}attach(e){super.attach(e);const t=this.menu;t&&(this.parentElement&&(this.parentElement.ariaHasPopup="menu",this.parentElement.ariaExpanded="false",t.id&&Wn(this.parentElement,"aria-controls",t.id)),this.closest("m3e-menu")&&(t.submenu=!0))}detach(){if(this.parentElement){this.parentElement.ariaHasPopup=null,this.parentElement.ariaExpanded=null;const e=this.menu;e?.id&&Hn(this.parentElement,"aria-controls",e.id)}super.detach()}_onClick(){this.parentElement&&("M3E-MENU-ITEM"===this.parentElement.tagName?this.menu?.show(this.parentElement):this.menu?.toggle(this.parentElement))}};var Xw,Gw,Qw,Jw,e$,t$,a$,i$,o$,r$,s$,n$;Zw=e([Aa("m3e-menu-trigger")],Zw);let l$=n$=class extends(Do(qo(Kw,"menuitem"))){constructor(){super(),Xw.add(this),Gw.set(this,e=>t(this,Xw,"m",o$).call(this,e)),Qw.set(this,e=>t(this,Xw,"m",r$).call(this,e)),Jw.set(this,()=>t(this,Xw,"m",s$).call(this)),this._hasSubmenu=!1,e$.set(this,void 0),new _a(this,{startDelay:500,endDelay:500,callback:e=>{e&&!this.disabled&&t(this,e$,"f")&&t(this,e$,"f").menu?.show(this)}})}get submenu(){return t(this,e$,"f")?.menu??null}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,Gw,"f")),this.addEventListener("keydown",t(this,Qw,"f")),this.addEventListener("mouseenter",t(this,Jw,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,Gw,"f")),this.removeEventListener("keydown",t(this,Qw,"f")),this.removeEventListener("mouseenter",t(this,Jw,"f"))}_renderContent(){return Y`<slot name="icon" aria-hidden="true" @slotchange="${t(this,Xw,"m",a$)}"></slot><span class="content"><slot @slotchange="${t(this,Xw,"m",t$)}"></slot></span>${this._hasSubmenu?"ltr"===El.current?Y`<svg class="trailing-icon" aria-hidden="true" viewBox="0 -960 960 960" fill="currentColor"><path d="M400-280v-400l200 200-200 200Z"/></svg>`:Y`<svg class="trailing-icon" aria-hidden="true" viewBox="0 -960 960 960" fill="currentColor"><path d="M560-280 360-480l200-200v400Z"/></svg>`:Y`<slot name="trailing-icon" aria-hidden="true" @slotchange="${t(this,Xw,"m",i$)}"></slot>`}`}};var c$,d$,h$,m$,u$,p$,v$,f$,b$,g$,y$,w$,$$,x$,k$,C$;Gw=new WeakMap,Qw=new WeakMap,Jw=new WeakMap,e$=new WeakMap,Xw=new WeakSet,t$=function(e){a(this,e$,e.target.assignedElements({flatten:!0}).find(e=>e instanceof Zw),"f"),this._hasSubmenu=void 0!==t(this,e$,"f")},a$=function(e){fi(this,"--with-icon",et(e.target))},i$=function(e){fi(this,"--with-trailing-icon",et(e.target))},o$=function(e){e.defaultPrevented||this._hasSubmenu||this.menu?.hideAll(!0)},r$=function(e){if(!e.defaultPrevented&&!this.disabled)switch(e.key){case"Right":case"ArrowRight":"ltr"===El.current&&(e.preventDefault(),this.submenu?.show(this));break;case"Left":case"ArrowLeft":"rtl"===El.current&&(e.preventDefault(),this.submenu?.show(this))}},s$=function(){this.menu?.items.forEach(e=>{e instanceof n$&&e!==this&&e.submenu?.isOpen&&e.submenu.hide()})},e([be()],l$.prototype,"_hasSubmenu",void 0),l$=n$=e([Aa("m3e-menu-item")],l$);let S$=C$=class extends(jo(mi(qo(me,"menu")))){constructor(){super(...arguments),c$.add(this),d$.set(this,void 0),h$.set(this,void 0),m$.set(this,void 0),u$.set(this,(new Tn).withWrap().withHomeAndEnd().withVerticalOrientation()),p$.set(this,e=>t(this,c$,"m",w$).call(this,e)),v$.set(this,()=>t(this,c$,"m",$$).call(this)),f$.set(this,new Ga(this,{target:null,callback:e=>e instanceof C$?e.items.filter(e=>e instanceof l$).forEach(e=>e.submenu?.hide()):this.hideAll()})),b$.set(this,new De(this,{target:null,callback:e=>{this.submenu||e.some(e=>e instanceof C$)||this.hide()}})),g$.set(this,e=>{switch(e.newState){case"open":t(this,b$,"f").observe(this),t(this,d$,"f")&&t(this,b$,"f").observe(t(this,d$,"f")),setTimeout(()=>t(this,u$,"f").setActiveItem(t(this,u$,"f").items.find(e=>!e.disabled)),40);break;case"closed":t(this,b$,"f").unobserveAll(),t(this,h$,"f")?.call(this),a(this,h$,void 0,"f"),a(this,m$,void 0,"f")}}),this.positionX="after",this.positionY="below",this.variant="standard",this.submenu=!1}get items(){return t(this,u$,"f").items}get isOpen(){return void 0!==t(this,d$,"f")}connectedCallback(){super.connectedCallback(),this.tabIndex=-1,this.setAttribute("popover","manual"),this.addEventListener("keydown",t(this,p$,"f")),this.addEventListener("mouseenter",t(this,v$,"f")),this.addEventListener("toggle",t(this,g$,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,p$,"f")),this.removeEventListener("mouseenter",t(this,v$,"f")),this.removeEventListener("toggle",t(this,g$,"f")),t(this,c$,"m",k$).call(this)}async show(e){t(this,d$,"f")&&t(this,d$,"f")!==e&&this.hide();let i=this.positionX;"rtl"===El.current&&(i="before"===i?"after":"before"),a(this,h$,await Xc(this,e,{position:this.submenu?"before"===i?"left-start":"right-start":"above"===this.positionY?"before"===i?"top-end":"top-start":"before"===i?"bottom-end":"bottom-start",inline:!0,flip:!0,shift:"main",offset:this.submenu?void 0:4},(e,i,o)=>{if(this.submenu){if(t(this,d$,"f")){const e=t(this,c$,"m",x$).call(this,t(this,d$,"f")).y;fi(this,"--shift-down",!1),fi(this,"--shift-up",!1),fi(this,Math.round(i)===Math.round(e)?"--shift-down":"--shift-up",!0)}}else fi(this,"--top",o.includes("top")),fi(this,"--bottom",o.includes("bottom"));t(this,m$,"f")?.dir===El.current&&t(this,m$,"f")?.x===e||("rtl"===El.current?this.style.right=window.innerWidth-e-this.clientWidth+"px":this.style.left=`${e}px`),t(this,m$,"f")?.y!==i&&(this.style.top=`${i}px`),a(this,m$,{x:e,y:i,dir:El.current},"f")}),"f");const o=e.closest("m3e-menu");o?this.variant=o.variant:this._activate(),this.showPopover(),a(this,d$,e,"f"),t(this,d$,"f").ariaExpanded="true",t(this,f$,"f").observe(t(this,d$,"f"))}hide(e=!1){for(const e of t(this,u$,"f").items){const t=e.submenu;t&&t.isOpen&&t.hide()}t(this,c$,"m",k$).call(this),this.hidePopover(),t(this,d$,"f")&&(t(this,d$,"f").ariaExpanded="false",e&&t(this,d$,"f").focus(),t(this,f$,"f").unobserve(t(this,d$,"f")),a(this,d$,void 0,"f"))}hideAll(e=!1){let a=this;for(;t(a,d$,"f");){const e=t(a,d$,"f").closest("m3e-menu");if(!e)break;a=e}a.hide(e)}async toggle(e){t(this,d$,"f")?this.hide():await this.show(e)}render(){return Y`<div class="base"><slot @slotchange="${t(this,c$,"m",y$)}"></slot></div>`}_activate(){this!==C$.__activeMenu&&(C$.__activeMenu&&vi(C$.__activeMenu,"--active"),C$.__activeMenu=this,pi(C$.__activeMenu,"--active"))}};var _$,E$,L$,P$,M$,T$,z$,A$,I$,D$,W$,H$;d$=new WeakMap,h$=new WeakMap,m$=new WeakMap,u$=new WeakMap,p$=new WeakMap,v$=new WeakMap,f$=new WeakMap,b$=new WeakMap,g$=new WeakMap,c$=new WeakSet,y$=function(){const{added:e}=t(this,u$,"f").setItems([...this.querySelectorAll("m3e-menu-item,m3e-menu-item-checkbox,m3e-menu-item-radio")].filter(e=>e.closest("m3e-menu")===this));t(this,u$,"f").activeItem||t(this,u$,"f").updateActiveItem(e.find(e=>!e.disabled)),t(this,u$,"f").items.forEach((e,a)=>{fi(e,"--first",0===a&&!e.previousElementSibling),fi(e,"--last",a===t(this,u$,"f").items.length-1)})},w$=function(e){switch(e.key){case"Right":case"ArrowRight":"rtl"===El.current?(e.preventDefault(),this.hide(!0)):t(this,u$,"f").onKeyDown(e);break;case"Left":case"ArrowLeft":"ltr"===El.current?(e.preventDefault(),this.hide(!0)):t(this,u$,"f").onKeyDown(e);break;case"Tab":this.hideAll();break;case"Escape":e.shiftKey||e.ctrlKey||this.hide(!0);break;default:t(this,u$,"f").onKeyDown(e)}},$$=function(){this._activate()},x$=function(e){let t=0,a=0;for(let i=e;i;i=i.offsetParent instanceof HTMLElement?i.offsetParent:null)t+=i.offsetLeft-i.scrollLeft+i.clientLeft,a+=i.offsetTop-i.scrollTop+i.clientTop;return{x:t,y:a}},k$=function(){this===C$.__activeMenu&&(vi(C$.__activeMenu,"--active"),C$.__activeMenu=void 0)},it(c`m3e-menu > m3e-divider { margin-block: var(--m3e-menu-divider-spacing, 0.5rem); }`),S$.styles=c`:host { position: absolute; padding: unset; margin: unset; border: unset; overflow-y: auto; overflow-x: visible; scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; scroll-padding-block: calc( var(--m3e-focus-ring-thickness, 3px) + var(--m3e-menu-container-padding-block, 0.25rem) ); min-width: var(--m3e-menu-container-min-width, 7rem); max-width: var(--m3e-menu-container-max-width, 17.5rem); max-height: var(--m3e-menu-container-max-height, 17.5rem); box-shadow: var(--m3e-menu-container-elevation, ${Xi.elevation.level3}); opacity: 0; display: none; } .base { contain: layout style paint; display: flex; flex-direction: column; row-gap: var(--m3e-menu-gap, 0.125rem); min-width: inherit; max-width: inherit; padding-block: var(--m3e-menu-container-padding-block, 0.25rem); padding-inline: var(--m3e-menu-container-padding-inline, 0.25rem); --m3e-focus-ring-outward-offset: 0px; --m3e-focus-ring-growth-factor: 1.5; } :host(:not(:is(:state(--active), :--active))) { border-radius: var(--m3e-menu-container-shape, ${Xi.shape.corner.small}); } :host(:not(:is(:state(--active), :--active))) .base { --m3e-menu-item-first-child-shape: ${Xi.shape.corner.extraSmall}; --m3e-menu-item-last-child-shape: ${Xi.shape.corner.extraSmall}; } :host(:is(:state(--active), :--active)) { border-radius: var(--m3e-menu-active-container-shape, ${Xi.shape.corner.large}); } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${l(`opacity ${Xi.motion.duration.short2} ${Xi.motion.easing.standard}, \n transform ${Xi.motion.duration.short2} ${Xi.motion.easing.standard},\n overlay ${Xi.motion.duration.short2} ${Xi.motion.easing.standard} allow-discrete,\n display ${Xi.motion.duration.short2} ${Xi.motion.easing.standard} allow-discrete,\n border-radius ${Xi.motion.spring.fastEffects}`)}; } :host(:not([submenu])) { transform: scaleY(0.8); } :host(:not([submenu]):popover-open) { transform: scaleY(1); animation: ${l(`bounce-open ${Xi.motion.duration.medium1} ${Xi.motion.easing.standard}`)}; } @keyframes bounce-open { 0% { transform: scaleY(0.8); } 70% { transform: scaleY(1.02); } 100% { transform: scaleY(1); } } :host::backdrop { background-color: transparent; } :host(:popover-open) { display: block; opacity: 1; } :host(:is(:state(--bottom), :--bottom)) { transform-origin: top; } :host(:is(:state(--top), :--top)) { transform-origin: bottom; } :host(:is(:state(--shift-down), :--shift-down)) { margin-top: calc(0px - var(--m3e-menu-container-padding-block, 0.25rem)); } :host(:is(:state(--shift-up), :--shift-up)) { margin-top: var(--m3e-menu-container-padding-block, 0.25rem); } :host([variant="vibrant"]) { background-color: var(--m3e-vibrant-menu-container-color, ${Xi.color.tertiaryContainer}); --m3e-menu-item-color: var(--m3e-vibrant-menu-item-color, ${Xi.color.onTertiaryContainer}); --m3e-menu-item-container-hover-color: var( --m3e-vibrant-menu-item-container-hover-color, ${Xi.color.onTertiaryContainer} ); --m3e-menu-item-container-focus-color: var( --m3e-vibrant-menu-item-container-focus-color, ${Xi.color.onTertiaryContainer} ); --m3e-menu-item-ripple-color: var(--m3e-vibrant-menu-item-ripple-color, ${Xi.color.onTertiaryContainer}); --m3e-menu-item-active-state-layer-color: var( --m3e-vibrant-menu-item-active-state-layer-color, ${Xi.color.onTertiaryContainer} ); --m3e-menu-item-selected-color: var(--m3e-vibrant-menu-item-selected-color, ${Xi.color.onTertiary}); --m3e-menu-item-selected-container-color: var( --m3e-vibrant-menu-item-selected-container-color, ${Xi.color.tertiary} ); --m3e-menu-item-selected-container-hover-color: var( --m3e-vibrant-menu-item-selected-container-hover-color, ${Xi.color.onTertiary} ); --m3e-menu-item-container-selected-focus-color: var( --m3e-vibrant-menu-item-selected-container-focus-color, ${Xi.color.onTertiary} ); --m3e-menu-item-selected-ripple-color: var( --m3e-vibrant-menu-item-selected-ripple-color, ${Xi.color.onTertiary} ); --m3e-menu-item-disabled-color: var( --m3e-vibrant-menu-item-disabled-color, ${Xi.color.onTertiaryContainer} ); } :host([variant="standard"]) { background-color: var(--m3e-menu-container-color, ${Xi.color.surfaceContainer}); } @starting-style { :host(:popover-open) { opacity: 0; } } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; outline: 1px solid MenuText; } }`,e([fe({attribute:"position-x"})],S$.prototype,"positionX",void 0),e([fe({attribute:"position-y"})],S$.prototype,"positionY",void 0),e([fe({reflect:!0})],S$.prototype,"variant",void 0),e([fe({type:Boolean,reflect:!0})],S$.prototype,"submenu",void 0),S$=C$=e([Aa("m3e-menu")],S$);let O$=class extends(gi(qo(Kw,"menuitemcheckbox"))){constructor(){super(...arguments),_$.add(this),E$.set(this,e=>t(this,_$,"m",I$).call(this,e)),L$.set(this,e=>t(this,_$,"m",D$).call(this,e)),P$.set(this,()=>t(this,_$,"m",W$).call(this)),M$.set(this,()=>t(this,_$,"m",H$).call(this)),T$.set(this,!1)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,E$,"f")),this.addEventListener("keydown",t(this,L$,"f")),this.addEventListener("keyup",t(this,P$,"f")),this.addEventListener("mouseenter",t(this,M$,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,E$,"f")),this.removeEventListener("keydown",t(this,L$,"f")),this.removeEventListener("keyup",t(this,P$,"f")),this.removeEventListener("mouseenter",t(this,M$,"f"))}_renderContent(){return Y`<div class="icon"><svg class="check" viewBox="0 -960 960 960" aria-hidden="true"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg><slot name="icon" @slotchange="${t(this,_$,"m",z$)}"></slot></div><slot></slot><slot name="trailing-icon" aria-hidden="true" @slotchange="${t(this,_$,"m",A$)}"></slot>`}};E$=new WeakMap,L$=new WeakMap,P$=new WeakMap,M$=new WeakMap,T$=new WeakMap,_$=new WeakSet,z$=function(e){fi(this,"--with-icon",et(e.target))},A$=function(e){fi(this,"--with-trailing-icon",et(e.target))},I$=function(e){e.defaultPrevented||(this.checked=!this.checked,this.performUpdate(),t(this,T$,"f")||(at()?this.menu?.hideAll(!0):setTimeout(()=>this.menu?.hideAll(!0),150)))},D$=function(e){a(this,T$," "===e.key,"f")},W$=function(){a(this,T$,!1,"f")},H$=function(){this.menu?.items.forEach(e=>{e instanceof l$&&e.submenu?.isOpen&&e.submenu.hide()})},O$.styles=[Kw.styles,c`.icon { display: flex; align-items: center; justify-content: center; transition: margin-inline-start ${Xi.motion.spring.fastEffects}; } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { margin-inline-start: calc(0px - var(--m3e-menu-item-icon-label-space, 0.75rem)); } .check { width: 1em; font-size: var(--m3e-menu-item-icon-size, 1.25rem) !important; } :host(:not([checked])) .check { display: none; } :host([checked]) .icon { margin-inline-start: 0; } :host([checked]) ::slotted([slot="icon"]) { display: none !important; } @media (prefers-reduced-motion) { .icon { transition: none; } }`],O$=e([Aa("m3e-menu-item-checkbox")],O$);let B$=class extends(qo(me,"group")){render(){return Y`<slot></slot>`}};var R$,F$,V$,N$,q$,U$,j$,Y$,K$,Z$,X$,G$;B$.styles=c`:host { display: contents; }`,B$=e([Aa("m3e-menu-item-group")],B$);let Q$=class extends(gi(qo(Kw,"menuitemradio"))){constructor(){super(...arguments),R$.add(this),F$.set(this,e=>t(this,R$,"m",K$).call(this,e)),V$.set(this,e=>t(this,R$,"m",Z$).call(this,e)),N$.set(this,()=>t(this,R$,"m",X$).call(this)),q$.set(this,()=>t(this,R$,"m",G$).call(this)),U$.set(this,!1)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",t(this,F$,"f")),this.addEventListener("keydown",t(this,V$,"f")),this.addEventListener("keyup",t(this,N$,"f")),this.addEventListener("mouseenter",t(this,q$,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,F$,"f")),this.removeEventListener("keydown",t(this,V$,"f")),this.removeEventListener("keyup",t(this,N$,"f")),this.removeEventListener("mouseenter",t(this,q$,"f"))}update(e){super.update(e),e.has("checked")&&this.checked&&(this.closest("[role='group']")??this.closest("m3e-menu"))?.querySelectorAll("m3e-menu-item-radio").forEach(e=>{e!==this&&e.checked&&(e.checked=!1)})}_renderContent(){return Y`<div class="icon"><svg class="check" viewBox="0 -960 960 960" aria-hidden="true"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg><slot name="icon" @slotchange="${t(this,R$,"m",j$)}"></slot></div><slot></slot><slot name="trailing-icon" aria-hidden="true" @slotchange="${t(this,R$,"m",Y$)}"></slot>`}};var J$,ex,tx,ax,ix,ox;F$=new WeakMap,V$=new WeakMap,N$=new WeakMap,q$=new WeakMap,U$=new WeakMap,R$=new WeakSet,j$=function(e){fi(this,"--with-icon",et(e.target))},Y$=function(e){fi(this,"--with-trailing-icon",et(e.target))},K$=function(e){e.defaultPrevented||(this.checked=!0,this.performUpdate(),t(this,U$,"f")||(at()?this.menu?.hideAll(!0):setTimeout(()=>this.menu?.hideAll(!0),150)))},Z$=function(e){a(this,U$," "===e.key,"f")},X$=function(){a(this,U$,!1,"f")},G$=function(){this.menu?.items.forEach(e=>{e instanceof l$&&e.submenu?.isOpen&&e.submenu.hide()})},Q$.styles=O$.styles,Q$=e([Aa("m3e-menu-item-radio")],Q$);let rx=class extends(Bo(mi(qo(me,"navigation")))){constructor(){super(...arguments),J$.add(this),this[ox]=(new In).disableRovingTabIndex(),ex.set(this,void 0),this.mode="compact"}get items(){return this[An].items}get selected(){return this[An].selectedItems[0]??null}get currentMode(){return this._mode??("compact"!==this.mode?"expanded":"compact")}set currentMode(e){this._mode=e}disconnectedCallback(){super.disconnectedCallback(),this._mode=void 0,t(this,ex,"f")?.call(this)}reconnectedCallback(){super.reconnectedCallback(),"auto"===this.mode&&t(this,J$,"m",tx).call(this)}willUpdate(e){super.willUpdate(e),e.has("mode")&&(t(this,ex,"f")?.call(this),"auto"===this.mode?t(this,J$,"m",tx).call(this):(this._mode=void 0,this._updateItems())),e.has("_mode")&&this._updateItems()}render(){return Y`<div class="base"><slot @change="${t(this,J$,"m",ix)}" @slotchange="${t(this,J$,"m",ax)}"></slot></div>`}_updateItems(){const e="compact"===this.currentMode?"vertical":"horizontal";this._updateOrientation(e),fi(this,"--compact","vertical"===e)}_updateOrientation(e){this[An].items.forEach(t=>t.orientation=e)}};var sx,nx,lx,cx,dx,hx,mx,ux;ex=new WeakMap,J$=new WeakSet,ox=An,tx=function(){a(this,ex,Wf.observe([cf.XSmall,cf.Small],e=>{this._mode=e.get(cf.XSmall)||e.get(cf.Small)?"compact":"expanded",this._updateItems()}),"f")},ax=function(){this[An].setItems([...this.querySelectorAll("m3e-nav-item")]),this._updateItems()},ix=function(e){e.stopPropagation(),this.dispatchEvent(new Event("change",{bubbles:!0}))},rx.styles=c`:host { display: block; overflow-x: auto; overflow-y: hidden; scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; min-height: var(--m3e-nav-bar-height, 4rem); } .base { contain: layout style; display: flex; align-items: stretch; justify-content: center; box-sizing: border-box; min-height: inherit; height: inherit; width: 100%; background-color: var(--m3e-nav-bar-container-color, ${Xi.color.surfaceContainer}); --_vertical-nav-item-min-width: var(--m3e-nav-bar-vertical-item-width, 7rem); --_horizontal-nav-item-leading-space: var(--m3e-nav-bar-horizontal-nav-item-leading-space, 1rem); --_horizontal-nav-item-trailing-space: var(--m3e-nav-bar-horizontal-nav-item-trailing-space, 1rem); }`,e([be()],rx.prototype,"_mode",void 0),e([fe({reflect:!0})],rx.prototype,"mode",void 0),rx=e([Aa("m3e-nav-bar")],rx);let px=class extends(Bo(jo(Do(xi(Mo(xo(io(Qi(mi(qo(me,"button"),!0)))))))))){constructor(){super(...arguments),sx.add(this),nx.set(this,!1),lx.set(this,e=>t(this,sx,"m",dx).call(this,e)),cx.set(this,new za(this,{target:null,callback:e=>t(this,sx,"m",mx).call(this,e)})),this.orientation="vertical"}get navBar(){return this.closest("m3e-nav-bar")??this.closest("m3e-nav-rail")??null}[(nx=new WeakMap,lx=new WeakMap,cx=new WeakMap,sx=new WeakSet,Uo)](){t(this,nx,"f")&&super[Uo]()}connectedCallback(){a(this,nx,null!==this.closest("m3e-nav-rail"),"f"),super.connectedCallback(),this.addEventListener("click",t(this,lx,"f"),{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,lx,"f"),{capture:!0}),a(this,nx,!1,"f")}reconnectedCallback(){super.reconnectedCallback(),t(this,sx,"m",ux).call(this)}update(e){if(super.update(e),e.has("selected")){this.ariaSelected=null,this.ariaPressed=null,this.ariaCurrent=`${this.selected}`;for(const e of this.querySelectorAll("m3e-icon"))e.toggleAttribute("filled",this.selected);this.navBar?.[An].notifySelectionChange(this)}}updated(e){super.updated(e),e.has("orientation")&&this._focusRing?.attach(this)}firstUpdated(e){super.firstUpdated(e),[this._focusRing,this._stateLayer,this._ripple].forEach(e=>e?.attach(this)),t(this,sx,"m",ux).call(this)}render(){const e=this.disabled||this.disabledInteractive,a=Y`<div class="label"><slot></slot></div>`;return Y`${"vertical"===this.orientation?Y`<m3e-focus-ring class="focus-ring" inward></m3e-focus-ring>`:X}<div class="outer">${this[zo]()}<div class="inner">${"horizontal"===this.orientation?Y`<m3e-focus-ring class="focus-ring"></m3e-focus-ring>`:X}<m3e-state-layer class="state-layer" ?disabled="${e}"></m3e-state-layer><m3e-ripple class="ripple" centered ?disabled="${e}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="base"><div class="icon-wrapper" aria-hidden="true"><div class="icon"><slot name="icon"></slot><slot name="selected-icon" @slotchange="${t(this,sx,"m",hx)}"></slot></div></div><m3e-collapsible orientation="horizontal" ?no-animate="${!t(this,nx,"f")}" ?open="${"horizontal"===this.orientation}">${"horizontal"===this.orientation?a:X}</m3e-collapsible>${"horizontal"===this.orientation?X:a}</div></div></div>`}};var vx,fx,bx,gx,yx,wx,$x,xx,kx,Cx,Sx,_x;dx=function(e){e.defaultPrevented||this.dispatchEvent(new Event("beforeinput",{bubbles:!0,cancelable:!0}))&&(this.selected=!0,this.navBar?.[An].notifySelectionChange(this),this.dispatchEvent(new Event("input",{bubbles:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})))},hx=function(e){fi(this,"--with-selected-icon",et(e.target))},mx=function(e){0!==e.length&&"vertical"!==this.orientation&&this._inner?.style.setProperty("--_expanded-width",`${e[0].contentRect.width}px`)},ux=function(){this._stateLayer&&t(this,nx,"f")&&t(this,cx,"f").observe(this._stateLayer)},px.styles=c`:host { display: inline-block; vertical-align: middle; position: relative; outline: none; user-select: none; flex: 1; font-size: var(--m3e-nav-item-label-text-font-size, ${Xi.typescale.standard.label.medium.fontSize}); font-weight: var( --m3e-nav-item-label-text-font-weight, ${Xi.typescale.standard.label.medium.fontWeight} ); line-height: var( --m3e-nav-item-label-text-line-height, ${Xi.typescale.standard.label.medium.lineHeight} ); letter-spacing: var(--m3e-nav-item-label-text-tracking, ${Xi.typescale.standard.label.medium.tracking}); border-radius: var(--m3e-nav-item-shape, ${Xi.shape.corner.full}); align-self: var(--_nav-item-align-self); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host([orientation="vertical"]) { min-width: var(--_vertical-nav-item-min-width); width: var(--_vertical-nav-item-width); margin-inline: var(--_vertical-nav-item-margin-inline); } :host([orientation="horizontal"]) { max-width: fit-content; } :host([orientation="horizontal"]) .outer { margin-inline-start: var(--_horizontal-nav-item-leading-space); margin-inline-end: var(--_horizontal-nav-item-trailing-space); } :host(:not(:disabled):not([disabled-interactive])) { cursor: pointer; } :host([disabled-interactive]) { cursor: not-allowed; } .outer { height: 100%; } .outer, .inner { display: flex; align-items: center; justify-content: var(--_nav-item-justify-content, center); position: relative; border-radius: inherit; } .icon-wrapper { position: relative; flex: none; } .base { contain: layout style; justify-content: unset; box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; width: 100%; } :host(:not(:is(:state(--no-animate), :--no-animate))) .base { transition: ${l(`margin-top ${Xi.motion.duration.short1} ${Xi.motion.easing.standard}`)}; } .icon { position: absolute; } .label { vertical-align: middle; } :host([orientation="horizontal"]) .label { white-space: nowrap; } ::slotted([slot="icon"]), ::slotted([slot="selected-icon"]) { width: 1em; font-size: var(--m3e-nav-item-icon-size, 1.5rem) !important; } :host(:not(:is(:state(--no-animate), :--no-animate))) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))) .ripple { transition: ${l(`height ${Xi.motion.duration.short1} ${Xi.motion.easing.standard}`)}; } :host(:not([selected])) slot[name="selected-icon"], :host(:not(:is(:state(--with-selected-icon), :--with-selected-icon))) slot[name="selected-icon"], :host([selected]:is(:state(--with-selected-icon), :--with-selected-icon)) slot[name="icon"] { display: none; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-inactive-hover-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-inactive-focus-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-inactive-pressed-state-layer-color, ${Xi.color.onSecondaryContainer} ); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label { color: var(--m3e-nav-item-inactive-label-text-color, ${Xi.color.onSurfaceVariant}); } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-inactive-icon-color, ${Xi.color.onSurfaceVariant}); } :host([selected]:not(:disabled):not([disabled-interactive])) .outer { --m3e-state-layer-hover-color: var( --m3e-nav-item-active-hover-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-nav-item-active-focus-state-layer-color, ${Xi.color.onSecondaryContainer} ); --m3e-ripple-color: var( --m3e-nav-item-active-pressed-state-layer-color, ${Xi.color.onSecondaryContainer} ); } :host([selected]:not(:disabled):not([disabled-interactive]):not([orientation="horizontal"])) .label { color: var(--m3e-nav-item-active-label-text-color, ${Xi.color.secondary}); } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: var(--m3e-nav-item-active-container-color, ${Xi.color.secondaryContainer}); } :host([selected]:not(:disabled):not([disabled-interactive])[orientation="horizontal"]) .label, :host([selected]:not(:disabled):not([disabled-interactive])) .icon { color: var(--m3e-nav-item-active-icon-color, ${Xi.color.onSecondaryContainer}); } :host([orientation="vertical"]) .outer { align-self: stretch; align-items: flex-start; } :host([orientation="vertical"]) .label { text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; } :host([orientation="vertical"]) .base { flex-direction: column; row-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="horizongal"]) .base { margin-top: 0; } :host([orientation="vertical"]) .base { margin-top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); margin-bottom: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple { top: var(--m3e-vertical-nav-item-active-indicator-margin, 0.375rem); bottom: unset; } :host([orientation="vertical"]:dir(rtl)) .state-layer, :host([orientation="vertical"]:dir(rtl)) .ripple { right: var(--_vertical-nav-item-inset-start); left: unset; } :host([orientation="vertical"]:not(:dir(rtl))) .state-layer, :host([orientation="vertical"]:not(:dir(rtl))) .ripple { left: var(--_vertical-nav-item-inset-start); right: unset; } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { min-width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem); } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .ripple { animation: collapse ${Xi.motion.duration.medium1}; } @keyframes collapse { from { width: var(--_expanded-width, var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem)); } to { width: var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem); } } :host([orientation="vertical"]) .state-layer, :host([orientation="vertical"]) .ripple, :host([orientation="vertical"]) .icon-wrapper { height: var(--m3e-vertical-nav-item-active-indicator-height, 2rem); } :host([orientation="vertical"]) .icon { top: calc( calc(var(--m3e-vertical-nav-item-active-indicator-height, 2rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); left: calc( calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem) / 2) - calc( var(--m3e-nav-item-icon-size, 1.5rem) / 2 ) ); } :host([orientation="vertical"]) .focus-ring { border-radius: var(--m3e-nav-item-focus-ring-shape, ${Xi.shape.corner.medium}); } :host([orientation="horizontal"]) .icon-wrapper { width: var(--m3e-nav-item-icon-size, 1.5rem); height: var(--m3e-nav-item-icon-size, 1.5rem); } :host([orientation="horizontal"]) .base { padding: var(--m3e-horizontal-nav-item-padding, 1rem); } :host([orientation="horizontal"]) .label { flex: 1 1 auto; } :host([orientation="horizontal"]) .base { column-gap: var(--m3e-nav-item-spacing, 0.25rem); } :host([orientation="horizontal"]) .state-layer, :host([orientation="horizontal"]) .ripple, :host([orientation="horizontal"]) .inner { height: var(--m3e-horizontal-nav-item-active-indicator-height, 2.5rem); } :host([orientation="horizontal"]) .inner { width: fit-content; } .state-layer, .ripple { margin-inline: auto; } :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper { animation: ${l(`slide-down ${Xi.motion.duration.short2} ${Xi.motion.easing.standard}`)}; } :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper { animation: ${l(`slide-up ${Xi.motion.duration.short2} ${Xi.motion.easing.standard}`)}; } @keyframes slide-down { from { transform: translateY(-4px); } to { transform: translateY(0); } } @keyframes slide-up { from { transform: translateY(4px); } to { transform: translateY(0); } } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .label { animation: horizontal-fade-in ${Xi.motion.duration.medium1}; } :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .label { animation: vertical-fade-in ${Xi.motion.duration.medium1}; } @keyframes horizontal-fade-in { from { opacity: 0; } to { opacity: 1; } } @keyframes vertical-fade-in { from { opacity: 0; } to { opacity: 1; } } :host(:disabled) .label, :host([disabled-interactive]) .label { color: color-mix( in srgb, var(--m3e-nav-item-disabled-label-text-color, ${Xi.color.onSurface}) var(--m3e-nav-item-disabled-label-text-opacity, 38%), transparent ); } :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: color-mix( in srgb, var(--m3e-nav-item-disabled-icon-color, ${Xi.color.onSurface}) var(--m3e-nav-item-disabled-icon-opacity, 38%), transparent ); } a { all: unset; display: block; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: 1; } @media (prefers-reduced-motion) { :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .icon-wrapper, :host(:not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper, :host( :not(:is(:state(--first), :--first)):not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"] ) .icon-wrapper, :host(:is(:state(--first), :--first):not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .icon-wrapper, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .ripple, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="horizontal"]) .label, :host(:not(:is(:state(--no-animate), :--no-animate))[orientation="vertical"]) .label { animation: none; } :host(:not(:is(:state(--no-animate), :--no-animate))) .state-layer, :host(:not(:is(:state(--no-animate), :--no-animate))) .ripple, :host(:not(:is(:state(--no-animate), :--no-animate))) .base { transition: none; } } @media (forced-colors: active) { :host(:disabled) .label, :host([disabled-interactive]) .label, :host(:disabled) .icon, :host([disabled-interactive]) .icon { color: GrayText; } :host(:not([selected]):not(:disabled):not([disabled-interactive])) .label, :host(:not([selected]):not(:disabled):not([disabled-interactive])) .icon { color: ButtonText; } :host([selected]:not(:disabled):not([disabled-interactive])) .state-layer { background-color: ButtonText; } :host([orientation="vertical"][selected]:not(:disabled):not([disabled-interactive])) .label { color: ButtonText; } :host([orientation="horizontal"][selected]:not(:disabled):not([disabled-interactive])) .label, :host([selected]:not(:disabled):not([disabled-interactive])) .icon { forced-color-adjust: none; color: ButtonFace; } }`,e([ye(".focus-ring")],px.prototype,"_focusRing",void 0),e([ye(".state-layer")],px.prototype,"_stateLayer",void 0),e([ye(".ripple")],px.prototype,"_ripple",void 0),e([ye(".inner")],px.prototype,"_inner",void 0),e([fe({reflect:!0})],px.prototype,"orientation",void 0),px=e([Aa("m3e-nav-item")],px);let Ex=_x=class extends(xi(Qi(mi(qo(me,"treeitem"),!0)))){constructor(){super(...arguments),vx.add(this),this._hasChildItems=!1,fx.set(this,[]),bx.set(this,null),gx.set(this,new Array),yx.set(this,null),this.open=!1}get link(){return t(this,yx,"f")}get label(){return this._base??null}get visible(){return!t(this,gx,"f").some(e=>!e.open)}get path(){return[...t(this,gx,"f"),this]}get hasChildItems(){return this._hasChildItems}get parentItem(){return t(this,gx,"f")[t(this,gx,"f").length-1]??null}get childItems(){return t(this,fx,"f")}get level(){return t(this,gx,"f").length+1}expand(e=!1){this.hasChildItems&&(this.open=!0,e&&this.childItems.forEach(e=>e.expand(!0)))}collapse(e=!1){this.hasChildItems&&(this.open=!1,e&&this.childItems.forEach(e=>e.collapse(!0)))}toggle(){this.hasChildItems&&(this.open=!this.open)}connectedCallback(){super.connectedCallback(),t(this,gx,"f").length=0;for(let e=this.parentElement?.closest("m3e-nav-menu-item");e;e=e.parentElement?.closest("m3e-nav-menu-item"))t(this,gx,"f").push(e);t(this,gx,"f").reverse(),this.style.setProperty("--_nav-menu-item-level",`${this.level}`),a(this,bx,this.closest("m3e-nav-menu"),"f")}disconnectedCallback(){super.disconnectedCallback(),t(this,gx,"f").length=0}update(e){if(super.update(e),e.has("selected")){this.ariaSelected=null,this.ariaCurrent=this.hasChildItems?null:`${this.selected}`;for(const e of this.querySelectorAll(":scope > m3e-icon[slot]"))e.toggleAttribute("filled",this.selected);t(this,gx,"f").forEach(e=>e.selected=this.selected),this.selected&&!this.hasChildItems&&this.closest("m3e-nav-menu")?.[An].notifySelectionChange(this)}(e.has("open")||e.has("_hasChildItems"))&&(this.ariaExpanded=this._hasChildItems?`${this.open}`:null),(e.has("_hasChildItems")&&this.disabled||e.has("disabled"))&&t(this,fx,"f").forEach(e=>e.disabled=this.disabled)}firstUpdated(e){super.firstUpdated(e);const t=this._base;t&&[this.focusRing,this.stateLayer,this.ripple].forEach(e=>e?.attach(t))}render(){return Y`<div class="base" @click="${t(this,vx,"m",Cx)}"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" inward ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" ?disabled="${this.disabled}"></m3e-ripple><div class="icon" aria-hidden="true">${t(this,vx,"m",wx).call(this)}</div><div class="label"><slot name="label" @slotchange="${t(this,vx,"m",xx)}"></slot></div><slot name="badge"></slot><div aria-hidden="true" class="toggle"><slot name="toggle-icon"><svg class="toggle-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><m3e-collapsible class="group" role="group" aria-hidden="${To(this._hasChildItems?void 0:"true")}" ?open="${this._hasChildItems&&this.open}" @opening="${t(this,vx,"m",Sx)}" @opened="${t(this,vx,"m",Sx)}" @closing="${t(this,vx,"m",Sx)}" @closed="${t(this,vx,"m",Sx)}"><slot @slotchange="${t(this,vx,"m",kx)}"></slot></m3e-collapsible>`}};var Lx,Px,Mx,Tx,zx,Ax,Ix,Dx,Wx,Hx,Ox,Bx,Rx,Fx,Vx;fx=new WeakMap,bx=new WeakMap,gx=new WeakMap,yx=new WeakMap,vx=new WeakSet,wx=function(){const e=Y`<slot name="icon" @slotchange="${t(this,vx,"m",$x)}"></slot>`;return this.selected&&!this.hasChildItems?Y`<slot name="selected-icon" @slotchange="${t(this,vx,"m",$x)}">${e}</slot>`:e},$x=function(e){fi(this,"--with-icon",et(e.target))},xx=function(e){a(this,yx,e.target.assignedElements({flatten:!0}).find(e=>e instanceof HTMLAnchorElement)??null,"f"),t(this,yx,"f")?.setAttribute("tabindex","-1")},kx=function(e){a(this,fx,e.target.assignedElements({flatten:!0}).filter(e=>e instanceof _x),"f");const i=this._hasChildItems;this._hasChildItems=t(this,fx,"f").length>0,fi(this,"--with-items",this._hasChildItems),(i||this._hasChildItems)&&(this.selected=t(this,fx,"f").some(e=>e.selected))},Cx=function(){if(!this.disabled)if(t(this,bx,"f")?.[An].setActiveItem(this),this._hasChildItems)this.toggle();else{t(this,bx,"f")?.[An].select(this),t(this,gx,"f").forEach(e=>e.selected=this.selected),t(this,yx,"f")?.click();const e=this.closest("m3e-drawer-container");if(e){const t=this.closest("[slot='start']")??this.closest("[slot='end']");t&&(ui(e,`--${t.slot}-push`)||ui(e,`--${t.slot}-over`))&&setTimeout(()=>{e.removeAttribute(t.slot),e.dispatchEvent(new Event("change",{bubbles:!0}))},300)}}},Sx=function(e){e.stopPropagation(),this.dispatchEvent(new Event(e.type,{bubbles:!0}))},it(c`m3e-nav-menu-item > m3e-divider { margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem); flex: none; } m3e-nav-menu-item > m3e-nav-menu-item:first-of-type { margin-block-start: var(--m3e-nav-menu-item-vertical-inset, 0.25rem); } m3e-nav-menu-item > m3e-nav-menu-item:last-of-type { margin-block-end: var(--m3e-nav-menu-item-vertical-inset, 0.25rem); }`),Ex.styles=c`:host { display: block; flex: none; outline: none; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .base { contain: layout style; display: flex; align-items: center; position: relative; padding-inline: var(--m3e-nav-menu-item-padding, 1.5rem); height: calc(var(--m3e-nav-menu-item-height, 3.5rem) + ${Xi.density.calc(-3)}); column-gap: var(--m3e-nav-menu-item-spacing, 0.75rem); font-size: var(--m3e-nav-menu-item-font-size, ${Xi.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-font-weight, ${Xi.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-line-height, ${Xi.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-tracking, ${Xi.typescale.standard.label.large.tracking}); transition: ${l(`color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard},\n background-color ${Xi.motion.duration.short4} ${Xi.motion.easing.standard}`)}; } .base, .focus-ring { border-radius: var(--m3e-nav-menu-item-shape, ${Xi.shape.corner.full}); } .label { flex: 1 1 auto; display: flex; align-items: center; position: relative; overflow: hidden; vertical-align: middle; } .icon, .toggle { flex: none; display: flex; align-items: center; justify-content: center; position: relative; vertical-align: middle; } ::slotted([slot="badge"]) { flex: none; position: relative; font-size: var(--m3e-nav-menu-item-badge-font-size, ${Xi.typescale.standard.label.large.fontSize}); font-weight: var(--m3e-nav-menu-item-badge-font-weight, ${Xi.typescale.standard.label.large.fontWeight}); line-height: var(--m3e-nav-menu-item-badge-line-height, ${Xi.typescale.standard.label.large.lineHeight}); letter-spacing: var(--m3e-nav-menu-item-badge-tracking, ${Xi.typescale.standard.label.large.tracking}); } .toggle { transition: ${l(`transform var(--m3e-collapsible-animation-duration, ${Xi.motion.duration.medium1})\n ${Xi.motion.easing.standard}`)}; } :host(:not(:is(:state(--with-icon), :--with-icon))) .icon { display: none; } .icon { margin-inline-start: -0.5rem; } .toggle { margin-inline-end: -0.5rem; } .group { padding-inline-start: var(--m3e-nav-menu-item-inset, 1rem); } :host([open]) .toggle { transform: rotate(180deg); } :host(:not(:is(:state(--with-items), :--with-items))) .toggle, :host(:not(:is(:state(--with-items), :--with-items))) .group { display: none; } ::slotted([slot="selected-icon"]), ::slotted([slot="icon"]), ::slotted([slot="toggle-icon"]), .toggle-icon { vertical-align: middle; width: 1em; height: 1em; font-size: var(--m3e-nav-menu-item-icon-size, 1.5rem); } :host(:not(:disabled)) .base { cursor: pointer; } :host(:not(:disabled)) .base { color: var(--m3e-nav-menu-item-label-color, ${Xi.color.onSurfaceVariant}); } :host(:disabled) .base { color: color-mix( in srgb, var(--m3e-nav-menu-item-disabled-color, ${Xi.color.onSurface}) var(--m3e-nav-menu-item-disabled-color-opacity, 38%), transparent ); } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base { color: var(--m3e-nav-menu-item-selected-label-color, ${Xi.color.onSecondaryContainer}); background-color: var(--m3e-nav-menu-item-selected-container-color, ${Xi.color.secondaryContainer}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-selected-container-focus-color, ${Xi.color.onSecondaryContainer} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-selected-container-hover-color, ${Xi.color.onSecondaryContainer} ); --m3e-ripple-color: var(--m3e-nav-menu-item-selected-ripple-color, ${Xi.color.onSecondaryContainer}); } :host(:not([selected]):not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base { --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-unselected-container-focus-color, ${Xi.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-unselected-container-hover-color, ${Xi.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-unselected-ripple-color, ${Xi.color.onSurface}); } .state-layer { margin-inline: auto; } :host([selected]:is(:state(--with-items), :--with-items):not(:disabled)) .base { background-color: var(--m3e-nav-menu-item-open-container-color, ${Xi.color.surfaceContainerHighest}); --m3e-state-layer-focus-color: var( --m3e-nav-menu-item-open-container-focus-color, ${Xi.color.onSurface} ); --m3e-state-layer-hover-color: var( --m3e-nav-menu-item-open-container-hover-color, ${Xi.color.onSurface} ); --m3e-ripple-color: var(--m3e-nav-menu-item-open-ripple-color, ${Xi.color.onSurface}); } ::slotted(a[slot="label"]) { all: unset; } @media (prefers-reduced-motion) { .base, .toggle, .state-layer { transition: none !important; } } @media (forced-colors: active) { .base, .state-layer { transition: none !important; } :host(:disabled) .base { color: GrayText; } :host(:not(:disabled)) .base { color: LinkText; } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base, :host([selected]:is(:state(--with-items), :--with-items):not(:disabled)) .base { forced-color-adjust: none; background-color: unset; color: Highlight; } :host([selected]:not(:is(:state(--with-items), :--with-items)):not(:disabled)) .base::after { content: ""; position: absolute; inset-inline-start: calc(calc(var(--m3e-nav-menu-item-padding, 1.5rem) / 2) - calc(0.375rem / 2)); inset-block-start: 50%; width: 0.375rem; height: 0.375rem; border-radius: 50%; transform: translateY(-50%); background-color: currentColor; } }`,e([ye(".state-layer")],Ex.prototype,"stateLayer",void 0),e([ye(".focus-ring")],Ex.prototype,"focusRing",void 0),e([ye(".ripple")],Ex.prototype,"ripple",void 0),e([ye(".base")],Ex.prototype,"_base",void 0),e([be()],Ex.prototype,"_hasChildItems",void 0),e([fe({type:Boolean,reflect:!0})],Ex.prototype,"open",void 0),Ex=_x=e([Aa("m3e-nav-menu-item")],Ex);let Nx=Vx=class extends(qo(me,"tree")){constructor(){super(),Lx.add(this),Px.set(this,!1),Mx.set(this,!1),this[Fx]=(new In).withVerticalOrientation().withHomeAndEnd().withTypeahead().withSkipPredicate(e=>e.disabled||!e.visible).disableRovingTabIndex().onActiveItemChange(()=>{this[An].activeItem&&t(this,Lx,"m",Ox).call(this,this[An].activeItem)}).onSelectedItemsChange(()=>{const e=this.selected;for(const a of this.items)a!==e&&t(this,Lx,"m",Rx).call(this,a,!1,!1);e?.label&&st(e.label,this,{block:"start",behavior:"smooth"})}),Tx.set(this,e=>t(this,Lx,"m",Dx).call(this,e)),zx.set(this,e=>t(this,Lx,"m",Wx).call(this,e)),Ax.set(this,e=>t(this,Lx,"m",Hx).call(this,e)),new Ta(this,{callback:e=>a(this,Mx,e,"f")}),new Sa(this,{callback:()=>{t(this,Mx,"f")||t(this,Lx,"m",Bx).call(this)}})}get selected(){return this[An].selectedItems[0]??null}get items(){return this[An].items}expand(e,t=!1){const a=Array.isArray(e)?e:this[An].items,i="boolean"==typeof e?e:t;a.forEach(e=>e.expand(i))}collapse(e,t=!1){const a=Array.isArray(e)?e:this[An].items,i="boolean"==typeof e?e:t;a.forEach(e=>e.collapse(i));const o=this[An].activeItem;if(o&&!o.visible)for(let e=o.parentItem;e;e=e.parentItem)if(e.visible){this[An].setActiveItem(e);break}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.addEventListener("keydown",t(this,Tx,"f")),this.addEventListener("keyup",t(this,zx,"f")),this.addEventListener("pointerdown",t(this,Ax,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,Tx,"f")),this.removeEventListener("keyup",t(this,zx,"f")),this.removeEventListener("pointerdown",t(this,Ax,"f"))}render(){return Y`<div class="base"><slot @slotchange="${t(this,Lx,"m",Ix)}"></slot></div>`}};var qx,Ux,jx,Yx,Kx;Px=new WeakMap,Mx=new WeakMap,Tx=new WeakMap,zx=new WeakMap,Ax=new WeakMap,Lx=new WeakSet,Fx=An,Ix=function(){for(const e of this.querySelectorAll("m3e-divider"))e.ariaHidden="true";const{added:e}=this[An].setItems([...this.querySelectorAll("m3e-nav-menu-item")]);for(const t of e)t.id=t.id||"m3e-nav-menu-item-"+Vx.__nextId++;this[An].activeItem?(this.setAttribute("aria-activedescendant",this[An].activeItem.id),t(this,Lx,"m",Bx).call(this)):this.removeAttribute("aria-activedescendant")},Dx=function(e){a(this,Px,!1,"f"),t(this,Lx,"m",Bx).call(this);const i=this[An].activeItem;if(!e.defaultPrevented&&i&&!i.disabled)switch(e.key){case"Enter":case" ":e.preventDefault()," "===e.key&&i.ripple&&!i.ripple.visible&&(i.ripple.centered=!0,i.ripple.show(0,0,!0),i.ripple.centered=!1),i.hasChildItems?requestAnimationFrame(()=>i.toggle()):i.selected||(this[An].select(i),i.link?.click());break;case"*":e.preventDefault(),i.expand(!0);break;case"Left":case"ArrowLeft":if(e.preventDefault(),"ltr"===El.current)if(i.hasChildItems&&i.open)requestAnimationFrame(()=>i.collapse());else{const e=i.parentItem;e&&this[An].setActiveItem(e)}else i.hasChildItems&&!i.open&&i.expand();break;case"Right":case"ArrowRight":if(e.preventDefault(),"rtl"===El.current)if(i.hasChildItems&&i.open)requestAnimationFrame(()=>i.collapse());else{const e=i.parentItem;e&&this[An].setActiveItem(e)}else i.hasChildItems&&!i.open&&i.expand();break;default:this[An].onKeyDown(e)}},Wx=function(e){const t=this[An].activeItem;e.defaultPrevented||!t||t.disabled||" "!==e.key||t.ripple?.hide()},Hx=function(e){if(!e.defaultPrevented&&!t(this,Px,"f")&&!Be()){a(this,Px,!0,"f");const i=e.composedPath().reverse().find(e=>e instanceof Ex);i&&!i.disabled&&t(this,Lx,"m",Rx).call(this,i,!0,!1)}},Ox=function(e){this.setAttribute("aria-activedescendant",e.id),e.label&&st(e.label,this,{block:"nearest",behavior:"smooth"}),t(this,Lx,"m",Bx).call(this)},Bx=function(){const e=this.matches(":focus-within"),a=e||this.matches(":focus"),i=a&&!t(this,Px,"f")&&(Be()||this.matches(":focus-visible")||e&&null!==this.querySelector("a:focus-visible"));this[An].items.forEach(e=>{const o=e===this[An].activeItem;t(this,Lx,"m",Rx).call(this,e,o&&a,o&&i)})},Rx=function(e,t,a){t&&a?e.stateLayer?.show("focused"):e.stateLayer?.hide("focused"),a?e.focusRing?.show():e.focusRing?.hide()},it(c`m3e-nav-menu > m3e-divider { margin-block: var(--m3e-nav-menu-divider-margin, 0.25rem); flex: none; }`),Nx.styles=c`:host { display: block; outline: none; overflow-y: auto; overflow-x: hidden; min-height: 0; scrollbar-width: ${Xi.scrollbar.width}; scrollbar-color: ${Xi.scrollbar.color}; } .base { contain: layout style; width: 100%; display: flex; flex-direction: column; position: relative; min-height: inherit; box-sizing: border-box; padding-block-start: var(--m3e-nav-menu-padding-top, 0.5rem); padding-block-end: var(--m3e-nav-menu-padding-bottom, 0.5rem); padding-inline-start: var(--m3e-nav-menu-padding-left, 0.75rem); padding-inline-end: var(--m3e-nav-menu-padding-right, 0.75rem); }`,Nx.__nextId=0,Nx=Vx=e([Aa("m3e-nav-menu")],Nx);let Zx=Kx=class extends(mi(qo(me,"group"))){constructor(){super(...arguments),qx.add(this),Ux.set(this,"m3e-nav-menu-item-group-label-"+Kx.__nextId++),jx.set(this,void 0)}connectedCallback(){super.connectedCallback(),fi(this,"--divided","M3E-DIVIDER"===this.previousElementSibling?.tagName)}disconnectedCallback(){super.disconnectedCallback(),vi(this,"--divided")}render(){return Y`<div class="label"><slot name="label" @slotchange="${t(this,qx,"m",Yx)}"></slot></div><slot></slot>`}};var Xx,Gx,Qx,Jx;Ux=new WeakMap,jx=new WeakMap,qx=new WeakSet,Yx=function(e){const i=e.target.assignedElements({flatten:!0})[0];i!==t(this,jx,"f")&&(t(this,jx,"f")?.id===t(this,Ux,"f")&&(t(this,jx,"f").id=""),a(this,jx,i,"f"),t(this,jx,"f")?(t(this,jx,"f").id=t(this,jx,"f").id||t(this,Ux,"f"),this.setAttribute("aria-labelledby",t(this,jx,"f").id)):this.removeAttribute("aria-labelledby")),fi(this,"--with-label",void 0!==t(this,jx,"f"))},Zx.styles=c`:host { display: contents; } :host(:not(:is(:state(--with-label), :--with-label))) .label { display: none; } .label { margin-inline-start: var(--m3e-nav-menu-item-group-label-inset, 1rem); margin-block-end: var(--m3e-nav-menu-item-group-label-space, 1rem); flex: none; } :host(:is(:state(--divided), :--divided)) .label { margin-block-start: calc( var(--m3e-nav-menu-item-group-label-space, 1rem) - var(--m3e-nav-menu-divider-margin, 0.25rem) ); } :host(:not(:is(:state(--divided), :--divided))) .label { margin-block-start: var(--m3e-nav-menu-item-group-label-space, 1rem); }`,Zx.__nextId=0,Zx=Kx=e([Aa("m3e-nav-menu-item-group")],Zx);let ek=class extends(jo(rx)){constructor(){super(),Xx.add(this),Gx.set(this,(new Tn).withHomeAndEnd().withWrap()),Qx.set(this,e=>t(this,Xx,"m",Jx).call(this,e)),this[An].onSelectedItemsChange(()=>{t(this,Gx,"f").updateActiveItem(this[An].activeItem)})}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",t(this,Qx,"f"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",t(this,Qx,"f"))}_updateItems(){const e=el.findInteractiveElements(this,!0),{added:a}=t(this,Gx,"f").setItems(e);if(!t(this,Gx,"f").activeItem){const e=a.find(e=>!e.hasAttribute("disabled"));e&&t(this,Gx,"f").updateActiveItem(e)}this.items.forEach((e,t)=>fi(e,"--first",0===t)),super._updateItems()}_updateOrientation(e){super._updateOrientation(e),this.querySelectorAll("m3e-fab").forEach(t=>t.toggleAttribute("extended","horizontal"===e))}};var tk,ak,ik;Gx=new WeakMap,Qx=new WeakMap,Xx=new WeakSet,Jx=function(e){t(this,Gx,"f").onKeyDown(e)},it(c`m3e-nav-rail > m3e-icon-button, m3e-nav-rail > m3e-fab { margin-block-end: var(--m3e-nav-rail-button-item-space, 1rem); } m3e-nav-rail > m3e-icon-button { margin-inline-start: var(--m3e-nav-rail-icon-button-inset, 0.5rem); }`),ek.styles=c`:host { display: block; overflow-x: hidden; overflow-y: auto; scrollbar-width: ${Xi.scrollbar.thinWidth}; scrollbar-color: ${Xi.scrollbar.color}; } :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: ${l(`width ${Xi.motion.duration.medium2} ${Xi.motion.easing.standard}`)}; } .base { contain: layout style; display: flex; width: inherit; flex-direction: column; align-items: flex-start; box-sizing: border-box; padding-block-start: var(--m3e-nav-rail-top-space, 2.75rem); padding-block-end: var(--m3e-nav-rail-bottom-space, 0.5rem); padding-inline: var(--m3e-nav-rail-inline-padding, 1.25rem); } :host(:is(:state(--compact), :--compact)) { width: var(--m3e-nav-rail-compact-width, 6rem); } :host(:is(:state(--compact), :--compact)) .base { --_vertical-nav-item-width: var(--m3e-nav-rail-compact-width, 6rem); --_vertical-nav-item-margin-inline: calc(0px - var(--m3e-nav-rail-inline-padding, 1.25rem)); --_vertical-nav-item-inset-start: calc( 50% - calc(var(--m3e-vertical-nav-item-active-indicator-width, 3.5rem)) / 2 ); } :host(:not(:is(:state(--compact), :--compact))) { width: var(--m3e-nav-rail-expanded-width, 13.75rem); } :host(:not(:is(:state(--compact), :--compact))) { --m3e-horizontal-nav-item-active-indicator-height: var(--m3e-nav-rail-expanded-item-height, 3.5rem); --_nav-item-align-self: stretch; --_nav-item-justify-content: flex-start; } ::slotted(*) { flex: none; } ::slotted(m3e-fab) { --m3e-fab-container-elevation: ${Xi.elevation.level0}; --m3e-fab-disabled-container-elevation: ${Xi.elevation.level0}; --m3e-fab-focus-container-elevation: ${Xi.elevation.level0}; --m3e-fab-pressed-container-elevation: ${Xi.elevation.level0}; --m3e-fab-hover-container-elevation: ${Xi.elevation.level1}; --m3e-fab-lowered-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-disabled-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-focus-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-pressed-container-elevation: ${Xi.elevation.level0}; --m3e-fab-lowered-hover-container-elevation: ${Xi.elevation.level1}; } @media (prefers-reduced-motion) { :host(:not(:is(:state(--no-animate), :--no-animate))) { transition: none; } }`,ek=e([Aa("m3e-nav-rail")],ek);let ok=class extends(Po(ir)){constructor(){super(...arguments),tk.add(this),ak.set(this,new Ma(this,{target:null,config:{attributeFilter:["class"]},callback:()=>t(this,tk,"m",ik).call(this)}))}attach(e){e instanceof ek&&t(this,ak,"f").observe(e),this.htmlFor&&this.parentElement&&Wn(this.parentElement,"aria-controls",this.htmlFor),super.attach(e),t(this,tk,"m",ik).call(this)}detach(){for(const e of t(this,ak,"f").targets)t(this,ak,"f").unobserve(e);this.parentElement&&(this.htmlFor&&Hn(this.parentElement,"aria-controls",this.htmlFor),this.parentElement.ariaExpanded=null),super.detach()}_onClick(){this.control instanceof ek&&(this.control.currentMode="compact"===this.control.currentMode?"expanded":"compact")}};var rk,sk,nk,lk,ck,dk,hk,mk,uk,pk,vk,fk,bk,gk,yk,wk,$k,xk,kk,Ck,Sk,_k,Ek,Lk,Pk,Mk,Tk,zk,Ak,Ik,Dk,Wk,Hk;ak=new WeakMap,tk=new WeakSet,ik=async function(){if(!this.parentElement)return;const e=this.control instanceof ek&&"expanded"===this.control.currentMode;this.parentElement.ariaExpanded=`${e}`,this.parentElement.hasAttribute("toggle")&&this.parentElement.toggleAttribute("selected",e),this.parentElement instanceof me&&(await this.parentElement.updateComplete,this.parentElement.ariaPressed=null)},ok=e([Aa("m3e-nav-rail-toggle")],ok);let Ok=Hk=class extends(xo(no(No(Li(Ti(Fo(wo(vo(Qi(mi(qo(me,"combobox")))))))))))){constructor(){super(),rk.add(this),this._options=new Array,sk.set(this,void 0),nk.set(this,void 0),lk.set(this,!1),ck.set(this,!1),dk.set(this,"m3e-select-"+Hk.__nextId++),hk.set(this,`${t(this,dk,"f")}-list`),mk.set(this,e=>t(this,rk,"m",Ck).call(this,e)),uk.set(this,e=>t(this,rk,"m",Sk).call(this,e)),pk.set(this,e=>t(this,rk,"m",_k).call(this,e)),vk.set(this,e=>t(this,rk,"m",Pk).call(this,e)),fk.set(this,e=>t(this,rk,"m",Ek).call(this,e)),bk.set(this,e=>t(this,rk,"m",Lk).call(this,e)),gk.set(this,void 0),this._listKeyManager=(new Pn).withWrap().withHomeAndEnd().withPageUpAndDown().withVerticalOrientation().withTypeahead().onActiveItemChange(()=>{this._listKeyManager.activeItem&&t(this,rk,"m",Ik).call(this,this._listKeyManager.activeItem)}),this.hideSelectionIndicator=!1,this.multi=!1,this.panelClass="",new Ma(this,{config:{childList:!0,subtree:!0},callback:()=>t(this,rk,"m",kk).call(this)})}get options(){return this._options??[]}get selected(){return this.options.filter(e=>e.selected)}get value(){const e=this.selected.filter(e=>!e.disabled).map(e=>e.value);switch(e.length){case 0:return null;case 1:return e[0];default:return e}}get[(sk=new WeakMap,nk=new WeakMap,lk=new WeakMap,ck=new WeakMap,dk=new WeakMap,hk=new WeakMap,mk=new WeakMap,uk=new WeakMap,pk=new WeakMap,vk=new WeakMap,fk=new WeakMap,bk=new WeakMap,gk=new WeakMap,rk=new WeakSet,yk=function(){return this._listKeyManager?.items??[]},wk=function(){return t(this,rk,"a",yk).filter(e=>e.selected)},lo)](){const e=this.value;if(Array.isArray(e)){const t=new FormData;for(const a of e)t.append(this.name,a);return t}return e}get shouldLabelFloat(){return this.selected.filter(e=>!e.isEmpty).length>0}onContainerClick(){a(this,ck,!0,"f"),t(this,rk,"m",Tk).call(this),this.focus({preventScroll:!0})}clear(e=!1){const a=t(this,rk,"a",wk),i=a.length>0;i&&(a.forEach(e=>{e.selected=!1,t(this,rk,"m",Dk).call(this,e)}),this.requestUpdate()),t(this,rk,"m",Ak).call(this),i&&this.dispatchEvent(new Event("change",{bubbles:!0})),e&&this.focus()}connectedCallback(){super.connectedCallback(),this.ariaHasPopup="listbox",this.ariaExpanded="false",this.addEventListener("click",t(this,mk,"f")),this.addEventListener("keydown",t(this,uk,"f")),this.addEventListener("keyup",t(this,pk,"f")),t(this,rk,"m",kk).call(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",t(this,mk,"f")),this.removeEventListener("keydown",t(this,uk,"f")),this.removeEventListener("keyup",t(this,pk,"f"))}update(e){super.update(e),e.has("hideSelectionIndicator")&&t(this,rk,"a",yk).forEach(e=>fi(e,"--hide-selection-indicator",this.hideSelectionIndicator))}firstUpdated(e){super.firstUpdated(e),this._focusRing?.attach(this),t(this,rk,"a",$k)&&this._focusRing&&(this._focusRing.style.display="none")}render(){return Y`<m3e-focus-ring class="focus-ring"></m3e-focus-ring><div class="base"><m3e-text-overflow><slot name="value">${this.selected.filter(e=>!e.isEmpty).map((e,t)=>t>0?Y`<span>, </span>${e.label}`:e.label)}</slot></m3e-text-overflow><div class="arrow-wrapper" aria-hidden="true"><slot name="arrow"><svg class="arrow" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></slot></div></div><div class="options" aria-hidden="true" @state-change="${t(this,rk,"m",xk)}"><slot></slot></div>`}};
172
172
  /**
173
173
  * Adapted from Angular Material Paginator
174
174
  * Source: https://github.com/angular/components/blob/main/src/material/paginator/paginator.ts