@tylertech/forge 3.10.2 → 3.10.3
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/lib.js +2 -2
- package/dist/lib.js.map +2 -2
- package/esm/date-picker/base/base-date-picker-core.d.ts +1 -0
- package/esm/date-picker/base/base-date-picker-core.js +6 -3
- package/esm/date-range-picker/date-range-picker-core.d.ts +1 -0
- package/esm/date-range-picker/date-range-picker-core.js +5 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/package.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -21,7 +21,7 @@ var V3=Object.defineProperty,Am=Object.defineProperties,Tm=Object.getOwnProperty
|
|
|
21
21
|
style=${this._image?bn({backgroundImage:`url(${this._image.src})`}):y2}>
|
|
22
22
|
<slot>${this._image?y2:Ng(this.text,this.letterCount)}</slot>
|
|
23
23
|
</div>
|
|
24
|
-
`}async _tryLoadImage(){if(this.imageUrl){let e=new Image;e.onload=()=>this._image=e,e.onerror=()=>this._image=void 0,e.src=this.imageUrl}else this._image=void 0}};ve.styles=dt(Pg),ve[Lv]=Iv,i([u1()],ve.prototype,"text",2),i([u1({type:Number,attribute:"letter-count"})],ve.prototype,"letterCount",2),i([u1({type:String,attribute:"image-url"})],ve.prototype,"imageUrl",2),i([ie()],ve.prototype,"_image",2),ve=i([kt(Iv)],ve);var Rg=`${b}avatar`,Fg={IMAGE_URL:"image-url",TEXT:"text",LETTER_COUNT:"letter-count"},Ug={DEFAULT_LETTER_COUNT:2},Dr={elementName:Rg,attributes:Fg,numbers:Ug};function _a(){f(ve)}var Wg=`${b}toolbar`,Cv={INVERTED:"inverted"},Gg=d({},Cv),Ev={TOOLBAR:"forge-toolbar"},qg={TOOLBAR:`.${Ev.TOOLBAR}`,BEFORE_START:"slot[name=before-start]",START_SLOT:"slot[name=start]",CENTER_SLOT:"slot[name=center]",END_SLOT:"slot[name=end]",AFTER_END:"slot[name=after-end]"},yn={elementName:Wg,observedAttributes:Cv,attributes:Gg,classes:Ev,selectors:qg};var Yg='<template><div class="forge-toolbar" part="root"><div class="section" part="before-section-start"><slot name="before-start"></slot></div><div class="inner center" part="inner"><div class="section" part="section-start"><slot name="start"></slot><slot></slot></div><div class="section center" part="section-center"><slot name="center"></slot></div><div class="section end" part="section-end"><slot name="end"></slot></div></div><div class="section end" part="after-section-end"><slot name="after-end"></slot></div></div></template>',Kg=":host{display:block}:host([hidden]){display:none}.forge-toolbar{--_toolbar-background:var(--forge-toolbar-background, var(--forge-theme-surface, #ffffff));--_toolbar-height:var(--forge-toolbar-height, 56px);--_toolbar-min-height:var(--forge-toolbar-min-height, var(--_toolbar-height));--_toolbar-divider-width:var(--forge-toolbar-divider-width, var(--forge-border-thin, 1px));--_toolbar-divider-style:var(--forge-toolbar-divider-style, solid);--_toolbar-divider-color:var(--forge-toolbar-divider-color, var(--forge-theme-outline, #e0e0e0));--_toolbar-shape:var(--forge-toolbar-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, var(--_toolbar-shape));--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, var(--_toolbar-shape));--_toolbar-end-start-shape:var(--forge-toolbar-end-start-shape, 0);--_toolbar-end-end-shape:var(--forge-toolbar-end-end-shape, 0);--_toolbar-padding:var(--forge-toolbar-padding, var(--forge-spacing-medium, 16px));--_toolbar-padding-block:var(--forge-toolbar-padding-block, 0);--_toolbar-padding-inline:var(--forge-toolbar-padding-inline, var(--_toolbar-padding));--_toolbar-columns:var(--forge-toolbar-columns, auto 1fr auto)}.forge-toolbar{display:grid;grid-template-columns:var(--_toolbar-columns);height:var(--_toolbar-height);min-height:var(--_toolbar-min-height);box-sizing:border-box;padding-inline:0;border-block-end-width:var(--_toolbar-divider-width);border-block-end-style:var(--_toolbar-divider-style);border-block-end-color:var(--_toolbar-divider-color);border-start-start-radius:var(--_toolbar-start-start-shape);border-start-end-radius:var(--_toolbar-start-end-shape);border-end-start-radius:var(--_toolbar-end-start-shape);border-end-end-radius:var(--_toolbar-end-end-shape);background:var(--_toolbar-background)}.inner{display:grid;grid-template-columns:var(--_toolbar-columns);padding-inline:var(--_toolbar-padding-inline);padding-block:var(--_toolbar-padding-block);box-sizing:border-box}.inner.center{min-width:0}.section{display:flex;align-items:center;width:100%;box-sizing:border-box}.section.center{justify-content:center;min-width:0}.section.end{justify-content:end}:host([inverted]) .forge-toolbar{--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, 0);--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, 0);--_toolbar-end-start-shape:var(--_toolbar-shape);--_toolbar-end-end-shape:var(--_toolbar-shape);border-block-end:none;border-block-start-width:var(--_toolbar-divider-width);border-block-start-style:var(--_toolbar-divider-style);border-block-start-color:var(--_toolbar-divider-color)}:host(:is([no-divider],[no-border])) .forge-toolbar{border:none}:host([no-padding]) .forge-toolbar{--_toolbar-padding:var(--forge-toolbar-padding, 0)}:host([auto-height]) .forge-toolbar{--_toolbar-height:var(--forge-toolbar-height, auto)}::slotted(:is(h1,h2,h3,h4,h5,h6,p)){margin:0}",pe=class extends M{constructor(){super();this._inverted=!1;H(this,Yg,Kg)}static get observedAttributes(){return Object.values(yn.observedAttributes)}attributeChangedCallback(e,o,a){switch(e){case yn.observedAttributes.INVERTED:this.inverted=p(a);break}}get inverted(){return this._inverted}set inverted(e){this._inverted!==e&&(this._inverted=e,this.toggleAttribute(yn.attributes.INVERTED,this._inverted))}};pe=i([y({name:yn.elementName})],pe);function Bv(){f(pe)}var $g='<template><div class="forge-profile-card" part="root"><div class="info-container"><div class="avatar"><forge-avatar part="avatar"></forge-avatar></div><div class="info-text"><div class="full-name" part="name"></div><div class="email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar"><forge-button variant="outlined" slot="end" style="display: none" part="profile-button" id="profile-button">Profile</forge-button><forge-button slot="end" part="sign-out-button" id="sign-out-button">Sign out</forge-button></forge-toolbar></div></template>',Xg=':host{display:block}:host([hidden]){display:none}.forge-profile-card{--_profile-card-min-width:var(--forge-profile-card-min-width, 360px);--_profile-card-shape:var(--forge-profile-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_profile-card-avatar-size:var(--forge-profile-card-avatar-size, 56px)}.forge-profile-card{min-width:var(--_profile-card-min-width);border-radius:var(--_profile-card-shape)}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card .info-container{display:flex;align-items:center;padding-block:var(--forge-spacing-xsmall,8px);padding-inline:var(--forge-spacing-medium,16px)}.forge-profile-card .avatar{display:flex;align-items:center;padding:var(--forge-spacing-xsmall,8px);margin-inline-end:var(--forge-spacing-medium,16px);--forge-avatar-size:var(--_profile-card-avatar-size)}.forge-profile-card .text{display:flex;flex-direction:column}.forge-profile-card .full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-font-size-scale, 1)));font-weight:var(--forge-typography-heading2-font-weight,500);line-height:var(--forge-typography-heading2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-heading2-letter-spacing, .0125em);text-transform:var(--forge-typography-heading2-text-transform,inherit);text-decoration:var(--forge-typography-heading2-text-decoration,inherit)}.forge-profile-card .email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-subheading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-subheading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-font-size-scale, .875)));font-weight:var(--forge-typography-subheading1-font-weight,400);line-height:var(--forge-typography-subheading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-subheading1-letter-spacing, normal);text-transform:var(--forge-typography-subheading1-text-transform,inherit);text-decoration:var(--forge-typography-subheading1-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}#action-toolbar{--forge-toolbar-padding:8px}#action-toolbar forge-button:not(:last-of-type){margin-inline-end:8px}',Y2=class extends M{static get observedAttributes(){return[$.attributes.FULL_NAME,$.attributes.EMAIL,$.attributes.SIGN_OUT,$.attributes.PROFILE,$.attributes.SIGN_OUT_TEXT,$.attributes.PROFILE_TEXT,$.attributes.AVATAR_TEXT,$.attributes.AVATAR_ICON,$.attributes.AVATAR_IMAGE_URL,$.attributes.AVATAR_LETTER_COUNT]}constructor(){super(),H(this,$g,Xg),this._core=new Br(new Er(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case $.attributes.FULL_NAME:this.fullName=o;break;case $.attributes.EMAIL:this.email=o;break;case $.attributes.SIGN_OUT:this.signOut=p(o);break;case $.attributes.PROFILE:this.profile=p(o);break;case $.attributes.SIGN_OUT_TEXT:this.signOutText=o;break;case $.attributes.PROFILE_TEXT:this.profileText=o;break;case $.attributes.AVATAR_TEXT:this.avatarText=o;break;case $.attributes.AVATAR_ICON:this.avatarIcon=o;break;case $.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=o;break;case $.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=K(o);break}}focus(t){this._core.focus(t)}};_a(),i([c()],Y2.prototype,"fullName",2),i([c()],Y2.prototype,"email",2),i([c()],Y2.prototype,"signOut",2),i([c()],Y2.prototype,"profile",2),i([c()],Y2.prototype,"signOutText",2),i([c()],Y2.prototype,"profileText",2),i([c()],Y2.prototype,"avatarText",2),i([c()],Y2.prototype,"avatarIcon",2),i([c()],Y2.prototype,"avatarImageUrl",2),i([c()],Y2.prototype,"avatarLetterCount",2),Y2=i([y({name:$.elementName,dependencies:[pe,T2,j]})],Y2);function Av(){f(Y2)}var Zg=`${b}app-bar-profile-button`,jg={FULL_NAME:"full-name",EMAIL:"email",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",SIGN_OUT_BUTTON:"sign-out-button",PROFILE_BUTTON:"profile-button",SIGN_OUT_BUTTON_TEXT:"sign-out-button-text",PROFILE_BUTTON_TEXT:"profile-button-text",OPEN:"open"},Qg=["aria-label","aria-labelledby"],f1={elementName:Zg,attributes:jg,forwardedAttributes:Qg};var Pr=class extends I{constructor(t){super(t)}get popupElement(){return this._popupElement}initialize(){this._avatarElement=qt(this._component,Dr.elementName),this._iconButtonElement=qt(this._component,t1.elementName);let t=this._iconButtonElement.getAttribute("aria-labelledby");this._forwardObserver=D0(this._component,f1.forwardedAttributes,(e,o)=>{e==="aria-labelledby"&&!o&&(o=t),G(this._iconButtonElement,!!o,e,o!=null?o:void 0)})}destroy(){var t;(t=this._forwardObserver)==null||t.disconnect(),this._forwardObserver=void 0,this._popupElement&&(this._popupElement.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}openPopup(t,e,o,a,s){var r;return(r=this._popupElement)!=null&&r.isConnected&&this._popupElement.remove(),this._profileCardElement=document.createElement($.elementName),this._profileCardElement.fullName=t.fullName,this._profileCardElement.email=t.email,this._profileCardElement.signOut=t.signOut,this._profileCardElement.profile=t.profile,this._profileCardElement.signOutText=t.signOutButtonText,this._profileCardElement.profileText=t.profileButtonText,this._profileCardElement.avatarText=t.avatarText,this._profileCardElement.avatarIcon=t.avatarIcon,this._profileCardElement.avatarImageUrl=t.avatarImageUrl,this._profileCardElement.avatarLetterCount=t.avatarLetterCount,this._profileCardElement.addEventListener($.events.PROFILE,()=>o()),this._profileCardElement.addEventListener($.events.SIGN_OUT,()=>a()),s&&this._profileCardElement.appendChild(s),this._popupElement=document.createElement("forge-popover"),this._popupElement.anchorElement=this._iconButtonElement,this._popupElement.placement="bottom-end",this._popupElement.arrow=!0,this._popupElement.persistent=!0,this._popupElement.appendChild(this._profileCardElement),this._component.ownerDocument.body.appendChild(this._popupElement),this._popupElement.open=!0,this._profileCardElement.tabIndex=-1,this._profileCardElement.focus(),S3(this._popupElement,()=>{if(!this._popupElement){e();return}!this._popupElement.matches(":focus-within")&&!this._component.matches(":focus-within")&&e()},!0)}async closePopup(){var t;this._popupElement&&(await this._popupElement.hideAsync(),(t=this._popupElement)==null||t.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}focusButtonElement(){this._iconButtonElement.focus()}setAvatarText(t){this._avatarElement.text=t,n2(this._avatarElement)}setAvatarIcon(t){if(t){let e=new U0({props:{name:t}});this._avatarElement.replaceChildren(e.element)}else n2(this._avatarElement)}setAvatarLetterCount(t){this._avatarElement.letterCount=t}setAvatarImageUrl(t){this._avatarElement.imageUrl=t}setSignOutButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.signOutText=t,(e=this._popupElement)==null||e.position())}setProfileButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.profileText=t,(e=this._popupElement)==null||e.position())}};var Nr=class{constructor(t){this._adapter=t;this._avatarLetterCount=Dr.numbers.DEFAULT_LETTER_COUNT;this._showSignOutButton=$.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=$.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=$.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=$.defaults.PROFILE_BUTTON_TEXT;this._open=!1;this._isInitialized=!1;this._clickListener=this._onClick.bind(this);this._dismissListener=this._onDismiss.bind(this);this._keydownListener=this._onKeydown.bind(this);this._profileButtonListener=this._onProfileButtonClick.bind(this);this._signOutButtonListener=this._onSignOutButtonClick.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setClickListener(this._clickListener),this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setAvatarText(this._avatarText),this._adapter.setAvatarIcon(this._avatarIcon),this._isInitialized=!0}destroy(){this._adapter.removeDocumentListener("keydown",this._keydownListener),this._adapter.removeClickListener(this._clickListener),this._adapter.destroy(),this._isInitialized=!1}_onClick(t){this._open?this._closeDropdown():this._openDropdown()}_onKeydown(t){t.key==="Escape"&&(this._closeDropdown(),this._adapter.focusButtonElement())}_onDismiss(){this._closeDropdown()}_onProfileButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent($.events.PROFILE,{bubbles:!0,composed:!0})),this._closeDropdown()}_onSignOutButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent($.events.SIGN_OUT,{bubbles:!0,composed:!0})),this._closeDropdown()}_openDropdown(){if(this._open)return;let t={fullName:this._fullName,email:this._email,signOut:this._showSignOutButton,profile:this._showProfileButton,signOutButtonText:this._signOutButtonText,profileButtonText:this._profileButtonText,avatarText:this._avatarText,avatarIcon:this._avatarIcon,avatarImageUrl:this._avatarImageUrl,avatarLetterCount:this._avatarLetterCount},e=this._profileCardBuilder?this._profileCardBuilder():void 0;this._cancelDismissListener=this._adapter.openPopup(t,this._dismissListener,this._profileButtonListener,this._signOutButtonListener,e),this._adapter.addDocumentListener("keydown",this._keydownListener),this._open=!0,this._adapter.toggleHostAttribute(f1.attributes.OPEN,this._open)}_closeDropdown(){this._open&&(this._cancelDismissListener&&n0(this._cancelDismissListener)&&(this._cancelDismissListener(),this._cancelDismissListener=void 0),this._open=!1,this._adapter.closePopup(),this._adapter.toggleHostAttribute(f1.attributes.OPEN,this._open))}get fullName(){return this._fullName}set fullName(t){this._fullName!==t&&(this._fullName=t,this.avatarText=this._fullName,this._adapter.setHostAttribute(f1.attributes.FULL_NAME,this._fullName))}get email(){return this._email}set email(t){this._email!==t&&(this._email=t,this._adapter.setHostAttribute(f1.attributes.EMAIL,this._email))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(t){this._avatarImageUrl!==t&&(this._avatarImageUrl=t,this._isInitialized&&(this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setHostAttribute(f1.attributes.AVATAR_IMAGE_URL,this._avatarImageUrl)))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(t){this._avatarLetterCount!==t&&(this._avatarLetterCount=t,this._isInitialized&&(this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setHostAttribute(f1.attributes.AVATAR_LETTER_COUNT,String(this._avatarLetterCount))))}get avatarText(){return this._avatarText}set avatarText(t){this._avatarText!==t&&(this._avatarText=t,this._isInitialized&&(this._adapter.setAvatarText(this._avatarText),this._adapter.toggleHostAttribute(f1.attributes.AVATAR_TEXT,!!this._avatarText,this._avatarText)))}get avatarIcon(){return this._avatarIcon}set avatarIcon(t){this._avatarIcon!==t&&(this._avatarIcon=t,this._isInitialized&&(this._adapter.setAvatarIcon(this._avatarIcon),this._adapter.toggleHostAttribute(f1.attributes.AVATAR_ICON,!!this._avatarIcon,this._avatarIcon)))}get signOutButton(){return this._showSignOutButton}set signOutButton(t){t=!!t,this._showSignOutButton!==t&&(this._showSignOutButton=t,this._adapter.toggleHostAttribute(f1.attributes.SIGN_OUT_BUTTON,this._showSignOutButton))}get profileButton(){return this._showProfileButton}set profileButton(t){t=!!t,this._showProfileButton!==t&&(this._showProfileButton=t,this._adapter.toggleHostAttribute(f1.attributes.PROFILE_BUTTON,this._showProfileButton))}get signOutButtonText(){return this._signOutButtonText}set signOutButtonText(t){this._signOutButtonText!==t&&(this._signOutButtonText=t,this._adapter.setSignOutButtonText(t))}get profileButtonText(){return this._profileButtonText}set profileButtonText(t){this._profileButtonText!==t&&(this._profileButtonText=t,this._adapter.setProfileButtonText(t))}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(t?this._openDropdown():this._closeDropdown())}get popupElement(){return this._adapter.popupElement}get profileCardBuilder(){return this._profileCardBuilder}set profileCardBuilder(t){this._profileCardBuilder=t}};var Jg='<template><forge-icon-button theme="app-bar"><forge-avatar aria-hidden="true"></forge-avatar></forge-icon-button><forge-tooltip type="label" placement="bottom-end">View profile</forge-tooltip></template>',K2=class extends M{static get observedAttributes(){return[f1.attributes.FULL_NAME,f1.attributes.EMAIL,f1.attributes.AVATAR_IMAGE_URL,f1.attributes.AVATAR_LETTER_COUNT,f1.attributes.AVATAR_TEXT,f1.attributes.AVATAR_ICON,f1.attributes.SIGN_OUT_BUTTON,f1.attributes.PROFILE_BUTTON,f1.attributes.SIGN_OUT_BUTTON_TEXT,f1.attributes.PROFILE_BUTTON_TEXT,f1.attributes.OPEN]}constructor(){super(),this._core=new Nr(new Pr(this))}initializedCallback(){E0(this,Jg)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case f1.attributes.FULL_NAME:this.fullName=o;break;case f1.attributes.EMAIL:this.email=o;break;case f1.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=o;break;case f1.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=K(o);break;case f1.attributes.AVATAR_TEXT:this.avatarText=o;break;case f1.attributes.AVATAR_ICON:this.avatarIcon=o;break;case f1.attributes.SIGN_OUT_BUTTON:this.signOutButton=p(o);break;case f1.attributes.PROFILE_BUTTON:this.profileButton=p(o);break;case f1.attributes.SIGN_OUT_BUTTON_TEXT:this.signOutButtonText=o;break;case f1.attributes.PROFILE_BUTTON_TEXT:this.profileButtonText=o;break;case f1.attributes.OPEN:this.open=p(o);break}}get popupElement(){return this._core.popupElement}};_a(),i([c()],K2.prototype,"fullName",2),i([c()],K2.prototype,"email",2),i([c()],K2.prototype,"avatarImageUrl",2),i([c()],K2.prototype,"avatarLetterCount",2),i([c()],K2.prototype,"avatarText",2),i([c()],K2.prototype,"avatarIcon",2),i([c()],K2.prototype,"signOutButton",2),i([c()],K2.prototype,"profileButton",2),i([c()],K2.prototype,"signOutButtonText",2),i([c()],K2.prototype,"profileButtonText",2),i([c()],K2.prototype,"open",2),i([c()],K2.prototype,"profileCardBuilder",2),K2=i([y({name:f1.elementName,dependencies:[R1,Y2,i1,m1]})],K2);function Tv(){f(K2)}var tw=`${b}divider`,ew={VERTICAL:"vertical"},xa={elementName:tw,attributes:ew};var ow='<template><div class="forge-divider" part="root"></div></template>',aw=":host{--_divider-margin:var(--forge-divider-margin, 0)}:host{display:block;margin:var(--_divider-margin)}:host([hidden]){display:none}.forge-divider{--_divider-color:var(--forge-divider-color, var(--forge-theme-outline, #e0e0e0));--_divider-width:var(--forge-divider-width, var(--forge-border-thin, 1px));--_divider-border-style:var(--forge-divider-border-style, solid)}.forge-divider{border:none;border-bottom-color:var(--_divider-color);border-bottom-width:var(--_divider-width);border-bottom-style:var(--_divider-border-style);height:0}:host([vertical]){display:inline-block;height:100%}:host([vertical]) .forge-divider{border:none;border-right-color:var(--_divider-color);border-right-width:var(--_divider-width);border-right-style:var(--_divider-border-style);height:100%;width:0}",eo=class extends M{static get observedAttributes(){return[xa.attributes.VERTICAL]}constructor(){super(),H(this,ow,aw)}attributeChangedCallback(t,e,o){switch(t){case xa.attributes.VERTICAL:this.vertical=p(o);break}}get vertical(){return this.hasAttribute(xa.attributes.VERTICAL)}set vertical(t){this.toggleAttribute(xa.attributes.VERTICAL,t)}};eo=i([y({name:xa.elementName})],eo);function Sv(){f(eo)}var kv=n=>typeof n.labelChangedCallback=="function";var Y5=Symbol("privateIsFocusable"),Rr=Symbol("externalTabIndex"),Fr=Symbol("isUpdatingTabIndex"),K5=Symbol("updateTabIndex");function Ke(n){var e,o,a;class t extends n{constructor(){super(...arguments);this[a]=!1;this[o]=null;this[e]=!1}get[s2](){return this[Y5]}set[s2](l){this[s2]!==l&&(this[Y5]=l,this[K5]())}connectedCallback(){var l;this[s2]=!0,(l=super.connectedCallback)==null||l.call(this)}attributeChangedCallback(l,h,v){var m;if((m=super.attributeChangedCallback)==null||m.call(this,l,h,v),!(l!=="tabindex"||this[Fr])){if(!this.hasAttribute("tabindex")){this[Rr]=null,this[K5]();return}this[Rr]=this.tabIndex}}[(a=Y5,o=Rr,e=Fr,K5)](){var v;let l=this[s2]?0:-1,h=(v=this[Rr])!=null?v:l;this[Fr]=!0,this.tabIndex=h,this[Fr]=!1}}return t}var Ur=class extends I{constructor(t){super(t),this._focusIndicatorElement=w(t,w1.elementName),this._stateLayerElement=w(t,I1.elementName)}initialize(){this._component[N]({role:"button"},{setAttribute:!this._component.hasAttribute("role")}),this._component[N]({ariaPressed:`${!!this._component.selected}`,ariaDisabled:`${!!this._component.disabled}`}),this._component[s2]=!this._component.disabled}setSelected(t){this._component[N]({ariaPressed:`${!!t}`})}setDisabled(t){this._component[N]({ariaDisabled:`${!!t}`}),this._component[s2]=!t,this._stateLayerElement.disabled=t}forceFocusVisible(){this._focusIndicatorElement.active=!0}};var Ov=`${b}button-toggle`,Dv={SELECTED:"selected",VALUE:"value",DISABLED:"disabled",READONLY:"readonly",TABINDEX:"tabindex"},nw=d({},Dv),sw={SELECT:`${Ov}-select`},et={elementName:Ov,observedAttributes:Dv,attributes:nw,events:sw};var Wr=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._readonly=!1;this._clickListener=t=>this._onClick(t);this._keydownListener=t=>this._onKeyDown(t)}initialize(){this._adapter.initialize(),!this._disabled&&!this._readonly&&this._applyListeners()}destroy(){this._removeListeners()}focus(t={focusVisible:!0}){this._adapter.focusHost(t),t.focusVisible&&this._adapter.forceFocusVisible()}click(){this._adapter.clickHost()}_applyListeners(){this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener)}_removeListeners(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keydownListener)}async _onClick(t){let e=this._selected;this._selected=!this._selected;let o={value:this._value,selected:this._selected},a=new CustomEvent(et.events.SELECT,{detail:o,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(a),await ae(),this._selected=e,!a.defaultPrevented&&(this.selected=!e)}_onKeyDown(t){t.key===" "&&(t.preventDefault(),this.click())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.toggleHostAttribute(et.attributes.SELECTED,this._selected))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._disabled?this._removeListeners():this._applyListeners(),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(et.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._readonly?this._removeListeners():this._applyListeners(),this._adapter.toggleHostAttribute(et.attributes.READONLY,this._readonly))}};var rw='<template><div class="forge-button-toggle" part="root"><slot name="start"></slot><slot></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',iw=':host{--_button-toggle-display:var(--forge-button-toggle-display, inline-flex)}:host{display:var(--_button-toggle-display);position:relative;outline:0;height:100%;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-button-toggle{--_button-toggle-min-width:var(--forge-button-toggle-min-width, auto);--_button-toggle-spacing:var(--forge-button-toggle-spacing, var(--forge-spacing-xsmall, 8px));--_button-toggle-padding-block:var(--forge-button-toggle-padding-block, 2px);--_button-toggle-padding-inline:var(--forge-button-toggle-padding-inline, 8px);--_button-toggle-icon-size:var(--forge-button-toggle-icon-size, var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125)));--_button-toggle-color:var(--forge-button-toggle-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_button-toggle-background:var(--forge-button-toggle-background, transparent);--_button-toggle-hover-background:var(--forge-button-toggle-hover-background, var(--_button-toggle-background));--_button-toggle-active-background:var(--forge-button-toggle-active-background, var(--_button-toggle-background));--_button-toggle-cursor:var(--forge-button-toggle-cursor, pointer);--_button-toggle-border-width:var(--forge-button-toggle-border-width, medium);--_button-toggle-border-style:var(--forge-button-toggle-border-style, none);--_button-toggle-border-color:var(--forge-button-toggle-border-color, var(--forge-theme-outline-medium, #757575));--_button-toggle-shape:var(--forge-button-toggle-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_button-toggle-shape-start-start:var(--forge-button-toggle-shape-start-start, var(--_button-toggle-shape));--_button-toggle-shape-start-end:var(--forge-button-toggle-shape-start-end, var(--_button-toggle-shape));--_button-toggle-shape-end-start:var(--forge-button-toggle-shape-end-start, var(--_button-toggle-shape));--_button-toggle-shape-end-end:var(--forge-button-toggle-shape-end-end, var(--_button-toggle-shape));--_button-toggle-selected-background:var(--forge-button-toggle-selected-background, var(--forge-theme-tertiary-container, #d0d7ff));--_button-toggle-selected-color:var(--forge-button-toggle-selected-color, var(--forge-theme-on-tertiary-container, #213189));--_button-toggle-selected-disabled-background:var(--forge-button-toggle-selected-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_button-toggle-disabled-opacity:var(--forge-button-toggle-disabled-opacity, 0.38);--_button-toggle-disabled-cursor:var(--forge-button-toggle-disabled-cursor, not-allowed);--_button-toggle-disabled-color:var(--forge-button-toggle-disabled-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-toggle-disabled-background:var(--forge-button-toggle-disabled-background, transparent);--_button-toggle-transition-duration:var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-toggle-transition-timing:var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-toggle-focus-indicator-color:var(--forge-button-toggle-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-toggle-focus-indicator-offset:var(--forge-button-toggle-focus-indicator-offset, 0px)}.forge-button-toggle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-toggle-display);align-items:center;justify-content:center;gap:var(--_button-toggle-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-toggle-min-width);inline-size:100%;border-width:var(--_button-toggle-border-width);border-style:var(--_button-toggle-border-style);border-color:var(--_button-toggle-border-color);border-start-start-radius:var(--_button-toggle-shape-start-start);border-start-end-radius:var(--_button-toggle-shape-start-end);border-end-start-radius:var(--_button-toggle-shape-end-start);border-end-end-radius:var(--_button-toggle-shape-end-end);padding-block:var(--_button-toggle-padding-block);padding-inline:var(--_button-toggle-padding-inline);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-toggle-background);color:var(--_button-toggle-color);cursor:var(--_button-toggle-cursor);transition-property:color,background-color,border-color;transition-duration:var(--_button-toggle-transition-duration);transition-timing-function:var(--_button-toggle-transition-timing)}.forge-button-toggle forge-state-layer{--forge-state-layer-color:var(--_button-toggle-color)}.forge-button-toggle forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_button-toggle-focus-indicator-offset);--forge-focus-indicator-color:var(--_button-toggle-focus-indicator-color);--forge-focus-indicator-shape:var(--_button-toggle-shape);--forge-focus-indicator-shape-start-start:var(--_button-toggle-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_button-toggle-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_button-toggle-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_button-toggle-shape-end-end)}::slotted(:is([slot=start],[slot=end])){font-size:var(--_button-toggle-icon-size)}:host([selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-background);--_button-toggle-color:var(--_button-toggle-selected-color);--_button-toggle-border-color:var(--_button-toggle-background)}:host([disabled]){--_button-toggle-cursor:var(--_button-toggle-disabled-cursor);cursor:not-allowed}:host([disabled]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-disabled-background);--_button-toggle-color:var(--_button-toggle-disabled-color);opacity:var(--_button-toggle-disabled-opacity);pointer-events:none}:host([disabled][selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-disabled-background)}',me=class extends V1(L1(Ke(M))){static get observedAttributes(){return Object.values(et.observedAttributes)}constructor(){super(),H(this,rw,iw),this._core=new Wr(new Ur(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case et.attributes.VALUE:this.value=o;return;case et.attributes.SELECTED:this.selected=p(o);return;case et.attributes.DISABLED:this.disabled=p(o);return;case et.attributes.READONLY:this.readonly=p(o);return}super.attributeChangedCallback(t,e,o)}focus(t){this._core.focus(t)}click(){this._core.click()}};i([c()],me.prototype,"value",2),i([c()],me.prototype,"selected",2),i([c()],me.prototype,"disabled",2),i([c()],me.prototype,"readonly",2),me=i([y({name:et.elementName,dependencies:[J,r1]})],me);function Pv(){f(me)}function $e(n){class t extends n{get form(){return this[s1].form}get labels(){return this[s1].labels}get name(){var o;return(o=this.getAttribute("name"))!=null?o:""}set name(o){G(this,!!o,"name",o)}[te](){return this[Bt]()}formDisabledCallback(o){this.disabled=o}set[oe](o){let a=o==="select"?document.createElement("select"):document.createElement("input");a.setAttribute("type",o),a.name="internal",this._inputElement=a}[ee](o){if(this._inputElement){if(this[s1].validity.customError)return this[s1].validationMessage;if(this._inputElement){let a=Object.entries(o);for(let[s,r]of a)this._inputElement[s]=r}return this._inputElement.validationMessage}}}return t.formAssociated=!0,t}function Nv(n){class t extends n{constructor(){super(...arguments);this._hasCustomValidityError=!1}get validity(){return this[s1].validity}get validationMessage(){return this[s1].validationMessage}get willValidate(){return this[s1].willValidate}checkValidity(){return this[s1].checkValidity()}reportValidity(){return this[s1].reportValidity()}setCustomValidity(a){this._hasCustomValidityError=a!=="",this[s1].setCustomValidity({customError:this._hasCustomValidityError},a)}}return t}var Rv=`${b}button-toggle-group`,Fv={VALUE:"value",MULTIPLE:"multiple",MANDATORY:"mandatory",VERTICAL:"vertical",STRETCH:"stretch",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",DENSE:"dense",NO_OUTLINE:"no-outline",THEME:"theme"},lw=d({},Fv),cw={VERTICAL:"forge-button-toggle-group--vertical",STRETCH:"forge-button-toggle-group--stretch"},hw={ROOT:".forge-button-toggle-group"},vw={CHANGE:`${Rv}-change`},q1={elementName:Rv,observedAttributes:Fv,attributes:lw,classes:cw,selectors:hw,events:vw};var Gr=class extends I{constructor(t){super(t),this._rootElement=w(t,q1.selectors.ROOT),this._defaultSlotElement=this._rootElement.querySelector("slot")}addListener(t,e){this._rootElement.addEventListener(t,e)}removeListener(t,e){this._rootElement.removeEventListener(t,e)}addSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}deselect(t){this._getButtonToggleElements().filter(o=>o!==t).forEach(o=>o.selected=!1)}setDisabled(t){this._getButtonToggleElements().forEach(o=>o.disabled=t)}setReadonly(t){this._getButtonToggleElements().forEach(o=>o.readonly=t)}getSelectedValues(){return this._getButtonToggleElements().filter(e=>e.selected).map(e=>e.value)}applyValues(t){this._getButtonToggleElements().forEach(o=>o.selected=t.indexOf(o.value)>=0)}setFormValue(){if(!this._component.form)return;let t=this._component[Bt](),e=this._component[te]();this._component[s1].setFormValue(t,e)}setFormValidity(){if(!this._component.form||!this._component.required)return;let t=this._component.multiple?!this._component.value.length:!this._component.value;if(t){let e=this._component[ee]({required:t});this._component[s1].setValidity({valueMissing:t},e,this._getButtonToggleElements()[0])}else this._component[s1].setValidity({})}_getButtonToggleElements(){return Array.from(this._component.querySelectorAll(et.elementName))}};var qr=class{constructor(t){this._adapter=t;this._values=[];this._outlined=!0;this._multiple=!1;this._mandatory=!1;this._vertical=!1;this._stretch=!1;this._dense=!1;this._disabled=!1;this._readonly=!1;this._required=!1;this._theme="tertiary";this._selectListener=e=>this._onSelect(e),this._slotListener=()=>this._synchronize()}initialize(){this._adapter.setFormValue(),this._adapter.setFormValidity(),this._adapter.addListener(et.events.SELECT,this._selectListener),this._adapter.addSlotChangeListener(this._slotListener)}destroy(){this._adapter.removeListener(et.events.SELECT,this._selectListener),this._adapter.removeSlotChangeListener(this._slotListener)}_synchronize(){if(this._disabled&&this._adapter.setDisabled(this._disabled),this._readonly&&this._adapter.setReadonly(this._readonly),this._multiple){let t=new Set(this._adapter.getSelectedValues().concat(this._values));this.value=Array.from(t)}else{let t=this._adapter.getSelectedValues().concat(this._values);this.value=t.length?t[t.length-1]:null}}_onSelect(t){if(this._mandatory&&!this._adapter.getSelectedValues().length){t.preventDefault();return}let e;t.detail.selected?e=this._multiple?[...this._values,t.detail.value]:[t.detail.value]:e=this._multiple?this._values.filter(s=>s!==t.detail.value):[];let o=this._multiple?e:e.length?e[0]:null,a=new CustomEvent(q1.events.CHANGE,{detail:o,bubbles:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(a),a.defaultPrevented){t.preventDefault();return}this._values=e,this._adapter.applyValues(this._values),this._adapter.setFormValue(),this._adapter.setFormValidity()}_applyValue(t){let e=Array.isArray(t)?t:t!=null?[t]:[];this._values=e,!this._multiple&&e.length>1&&(e=[e[0]]),this._adapter.applyValues(e),this._adapter.setFormValue(),this._adapter.setFormValidity()}get value(){var e;let t=Array.from(new Set(this._adapter.getSelectedValues().concat(this._values)));return this._multiple?Array.from(t):(e=t[0])!=null?e:null}set value(t){this._applyValue(t)}get multiple(){return this._multiple}set multiple(t){t=!!t,this._multiple!==t&&(this._multiple=t,this._applyValue(this._values),this._adapter.toggleHostAttribute(q1.attributes.MULTIPLE,this._multiple))}get mandatory(){return this._mandatory}set mandatory(t){t=!!t,this._mandatory!==t&&(this._mandatory=t,this._adapter.toggleHostAttribute(q1.attributes.MANDATORY,this._mandatory))}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(q1.attributes.VERTICAL,this._vertical))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(q1.attributes.STRETCH,this._stretch))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(q1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(q1.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(q1.attributes.READONLY,this._readonly))}get required(){return this._required}set required(t){t=!!t,this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(q1.attributes.REQUIRED,this._required))}get outlined(){return this._outlined}set outlined(t){t=!!t,this._outlined!==t&&(this._outlined=t,this._adapter.toggleHostAttribute(q1.attributes.NO_OUTLINE,!this._outlined))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(q1.attributes.THEME,this._theme!=="tertiary",this._theme))}};var pw='<template><div class="forge-button-toggle-group" part="root"><slot></slot></div></template>',mw=":host{--_button-toggle-group-display:var(--forge-button-toggle-group-display, inline-flex)}:host{display:var(--_button-toggle-group-display)}:host([hidden]){display:none}.forge-button-toggle-group{--_button-toggle-group-gap:var(--forge-button-toggle-group-gap, 4px);--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 4px);--_button-toggle-group-padding-block:var(--forge-button-toggle-group-padding-block, var(--_button-toggle-group-padding));--_button-toggle-group-padding-inline:var(--forge-button-toggle-group-padding-inline, var(--_button-toggle-group-padding));--_button-toggle-group-height:var(--forge-button-toggle-group-height, var(--forge-button-height, 36px));--_button-toggle-group-dense-height:var(--forge-button-toggle-group-dense-height, var(--forge-button-dense-height, 24px));--_button-toggle-group-outline-width:var(--forge-button-toggle-group-outline-width, var(--forge-border-thin, 1px));--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, solid);--_button-toggle-group-outline-color:var(--forge-button-toggle-group-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_button-toggle-group-outline-color-active:var(--forge-button-toggle-group-outline-color-active, var(--forge-theme-outline-medium, #757575));--_button-toggle-group-shape:var(--forge-button-toggle-group-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-toggle-group-shape-start-start:var(--forge-button-toggle-group-shape-start-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-start-end:var(--forge-button-toggle-group-shape-start-end, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-start:var(--forge-button-toggle-group-shape-end-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-end:var(--forge-button-toggle-group-shape-end-end, var(--_button-toggle-group-shape));--_button-toggle-group-transition-duration:var(--forge-button-toggle-group-transition-duration, var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms)));--_button-toggle-group-transition-timing:var(--forge-button-toggle-group-transition-timing, var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1))))}.forge-button-toggle-group{display:flex;align-items:center;gap:var(--_button-toggle-group-gap);height:var(--_button-toggle-group-height);border-width:var(--_button-toggle-group-outline-width);border-style:var(--_button-toggle-group-outline-style);border-color:var(--_button-toggle-group-outline-color);border-start-start-radius:var(--_button-toggle-group-shape-start-start);border-start-end-radius:var(--_button-toggle-group-shape-start-end);border-end-start-radius:var(--_button-toggle-group-shape-end-start);border-end-end-radius:var(--_button-toggle-group-shape-end-end);padding-block:var(--_button-toggle-group-padding-block);padding-inline:var(--_button-toggle-group-padding-inline);transition-property:border-color;transition-duration:var(--_button-toggle-group-transition-duration);transition-timing-function:var(--_button-toggle-group-transition-timing)}:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:focus-within,:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:hover{--_button-toggle-group-outline-color:var(--_button-toggle-group-outline-color-active)}:host([no-outline]) .forge-button-toggle-group{--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 0);--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, none)}:host(:is([dense],[density=dense])) .forge-button-toggle-group{--_button-toggle-group-height:var(--_button-toggle-group-dense-height)}:host([vertical]) .forge-button-toggle-group{height:auto;flex-direction:column}:host([vertical]) ::slotted(forge-button-toggle){height:var(--_button-toggle-group-height);width:100%}:host([vertical]) ::slotted(forge-divider:not([vertical])){margin-inline:4px;width:100%}::slotted(forge-divider[vertical]){margin-block:4px}:host([stretch]){display:block}:host([stretch]) .forge-button-toggle-group{width:100%}:host(:not([vertical])[stretch]) ::slotted(forge-button-toggle){flex:1}:host([theme=primary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-primary-container, #d1d5ed);--forge-button-toggle-selected-color:var(--forge-theme-on-primary-container, #222c62);--forge-button-toggle-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-secondary-container, #fff0c3);--forge-button-toggle-selected-color:var(--forge-theme-on-secondary-container, #8a6804);--forge-button-toggle-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=success]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-success-container, #cde0ce);--forge-button-toggle-selected-color:var(--forge-theme-on-success-container, #19441b);--forge-button-toggle-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=error]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-error-container, #ecc2c9);--forge-button-toggle-selected-color:var(--forge-theme-on-error-container, #5f0011);--forge-button-toggle-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=warning]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-warning-container, #f4d3c2);--forge-button-toggle-selected-color:var(--forge-theme-on-warning-container, #712700);--forge-button-toggle-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=info]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-info-container, #c7daf0);--forge-button-toggle-selected-color:var(--forge-theme-on-info-container, #0b3768);--forge-button-toggle-focus-indicator-color:var(--forge-theme-info, #1565c0)}",ot=class extends mt($e(Nv(V1(L1(M))))){static get observedAttributes(){return Object.values(q1.observedAttributes)}constructor(){super(),H(this,pw,mw),this._core=new qr(new Gr(this)),this[oe]="radio"}connectedCallback(){super.connectedCallback(),this[N]({role:"group"},{setAttribute:!this.hasAttribute("role")}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case q1.observedAttributes.VALUE:this.value=o;break;case q1.observedAttributes.NO_OUTLINE:this.outlined=!p(o);break;case q1.observedAttributes.MULTIPLE:this.multiple=p(o);break;case q1.observedAttributes.MANDATORY:this.mandatory=p(o);break;case q1.observedAttributes.VERTICAL:this.vertical=p(o);break;case q1.observedAttributes.STRETCH:this.stretch=p(o);break;case q1.observedAttributes.DENSE:this.dense=p(o);break;case q1.observedAttributes.DISABLED:this.disabled=p(o);break;case q1.observedAttributes.REQUIRED:this.required=p(o);break;case q1.observedAttributes.READONLY:this.readonly=p(o);break;case q1.observedAttributes.THEME:this.theme=o;break}}[Bt](){let t=Array.isArray(this.value)?this.value.length>0:!!this.value,e=null;if(t){let o=Array.isArray(this.value)?this.value:[this.value];o.length&&(e=new FormData,o.forEach(a=>e==null?void 0:e.append(this.name,a)))}return e}[te](){let t=new FormData,e=Array.isArray(this.value)?this.value:this.value!=null?[this.value]:[];return t.append("multiple",String(this.multiple)),e.forEach(o=>t.append("value",o)),t}formStateRestoreCallback(t,e){var o;if(e==="restore"&&t instanceof FormData){let a=t.get("multiple")==="true",s=t.getAll("value");if(a){this.multiple=a,this.value=s;return}this.value=(o=s[0])!=null?o:null}}formResetCallback(){this.value=this.getAttribute("value")}labelChangedCallback(t){this[N]({ariaLabel:t!=null?t:void 0})}};i([c()],ot.prototype,"value",2),i([c()],ot.prototype,"outlined",2),i([c()],ot.prototype,"multiple",2),i([c()],ot.prototype,"mandatory",2),i([c()],ot.prototype,"vertical",2),i([c()],ot.prototype,"stretch",2),i([c()],ot.prototype,"dense",2),i([c()],ot.prototype,"disabled",2),i([c()],ot.prototype,"required",2),i([c()],ot.prototype,"readonly",2),i([c()],ot.prototype,"theme",2),ot=i([y({name:q1.elementName,dependencies:[me]})],ot);function Uv(){f(ot)}var dw=`${b}checkbox`,Wv={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",INDETERMINATE:"indeterminate",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},gw=d({},Wv),ww={ROOT:".forge-checkbox",LABEL:"#label",STATE_LAYER:"forge-state-layer"},T1={elementName:dw,selectors:ww,observedAttributes:Wv,attributes:gw};var Yr=class extends I{constructor(t){super(t),this._rootElement=w(t,T1.selectors.ROOT),this._labelElement=w(t,T1.selectors.LABEL),this._stateLayerElement=w(t,T1.selectors.STATE_LAYER)}setChecked(t){this._component[Mt](),this._component[N]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[s2]=!t,this._component[N]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[Mt](),this._component[N]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[N]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t,e){let o=t?new FormData:null;o&&t&&o.append(this._component.name,t),this._component.setFormValue(o,e)}};var Kr=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._indeterminate=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._labelPosition="end";this._clickListener=t=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}get _formState(){return this._checked?this._indeterminate?"checked-indeterminate":"checked":this._indeterminate?"unchecked-indeterminate":"unchecked"}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.syncValue(this._submittedValue,this._formState)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let o=new Event("change",{cancelable:!0,bubbles:!0});this._adapter.dispatchHostEvent(o),this._checked=t,!o.defaultPrevented&&(this.checked=e,this._indeterminate=!1,this._adapter.toggleHostAttribute(T1.attributes.INDETERMINATE,this._indeterminate))}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(T1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(T1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get indeterminate(){return this._indeterminate}set indeterminate(t){this._indeterminate!==t&&(this._indeterminate=t,this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(T1.attributes.INDETERMINATE,this._indeterminate))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue,this._formState),(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(T1.attributes.VALUE,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(T1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this.disabled),this._adapter.toggleHostAttribute(T1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(T1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(T1.attributes.READONLY,this._readonly))}get labelPosition(){return this._labelPosition}set labelPosition(t){this.labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(T1.attributes.LABEL_POSITION,this._labelPosition))}};var uw='<template><div class="forge-checkbox" part="root"><div id="container" class="container"><div class="background" part="background"><svg class="icon icon--checked" aria-hidden="true" viewBox="0 0 24 24" part="checkmark"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"></path></svg> <svg class="icon icon--indeterminate" aria-hidden="true" viewBox="0 0 24 24" part="mixedmark"><line x1="2" y1="12" x2="22" y2="12"></line></svg><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><div id="label" class="label" part="label"><slot></slot></div></div></template>',_w=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-checkbox{--_checkbox-primary-color:var(--forge-checkbox-primary-color, var(--forge-theme-tertiary, #3d5afe));--_checkbox-size:var(--forge-checkbox-size, 16px);--_checkbox-border-width:var(--forge-checkbox-border-width, var(--forge-border-medium, 2px));--_checkbox-icon-color:var(--forge-checkbox-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_checkbox-state-layer-size:var(--forge-checkbox-state-layer-size, 40px);--_checkbox-state-layer-dense-size:var(--forge-checkbox-state-layer-dense-size, 24px);--_checkbox-background:var(--forge-checkbox-background, var(--forge-theme-surface, #ffffff));--_checkbox-width:var(--forge-checkbox-width, var(--_checkbox-size));--_checkbox-height:var(--forge-checkbox-height, var(--_checkbox-size));--_checkbox-unchecked-border-width:var(--forge-checkbox-unchecked-border-width, var(--_checkbox-border-width));--_checkbox-unchecked-border-color:var(--forge-checkbox-unchecked-border-color, var(--forge-theme-surface-container-high, #9e9e9e));--_checkbox-shape:var(--forge-checkbox-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_checkbox-elevation:var(--forge-checkbox-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));--_checkbox-checked-background:var(--forge-checkbox-checked-background, var(--_checkbox-primary-color));--_checkbox-checked-border-width:var(--forge-checkbox-checked-border-width, var(--_checkbox-border-width));--_checkbox-checked-border-color:var(--forge-checkbox-checked-border-color, var(--_checkbox-checked-background));--_checkbox-icon-checked-color:var(--forge-checkbox-icon-checked-color, var(--_checkbox-icon-color));--_checkbox-icon-indeterminate-color:var(--forge-checkbox-icon-indeterminate-color, var(--_checkbox-icon-color));--_checkbox-icon-stroke-width:var(--forge-checkbox-icon-stroke-width, 4px);--_checkbox-gap:var(--forge-checkbox-gap, 0);--_checkbox-justify:var(--forge-checkbox-justify, start);--_checkbox-align:var(--forge-checkbox-align, center);--_checkbox-direction:var(--forge-checkbox-direction, initial);--_checkbox-state-layer-width:var(--forge-checkbox-state-layer-width, var(--_checkbox-state-layer-size));--_checkbox-state-layer-height:var(--forge-checkbox-state-layer-height, var(--_checkbox-state-layer-size));--_checkbox-state-layer-checked-color:var(--forge-checkbox-state-layer-checked-color, var(--_checkbox-primary-color));--_checkbox-state-layer-unchecked-color:var(--forge-checkbox-state-layer-unchecked-color, var(--_checkbox-color));--_checkbox-state-layer-shape:var(--forge-checkbox-state-layer-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_checkbox-dense-gap:var(--forge-checkbox-dense-gap, 8px);--_checkbox-state-layer-dense-width:var(--forge-checkbox-state-layer-dense-width, var(--_checkbox-state-layer-dense-size));--_checkbox-state-layer-dense-height:var(--forge-checkbox-state-layer-dense-height, var(--_checkbox-state-layer-dense-size));--_checkbox-disabled-opacity:var(--forge-checkbox-disabled-opacity, 0.38);--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, var(--forge-animation-duration-short2, 100ms));--_checkbox-background-animation-timing:var(--forge-checkbox-background-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_checkbox-icon-animation-timing:var(--forge-checkbox-icon-animation-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-checkbox{position:relative;flex-direction:var(--_checkbox-direction);align-items:var(--_checkbox-align);justify-content:var(--_checkbox-justify);gap:var(--_checkbox-gap);display:flex}.forge-checkbox .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_checkbox-state-layer-shape);inline-size:var(--_checkbox-state-layer-width);block-size:var(--_checkbox-state-layer-height);cursor:pointer}.forge-checkbox .background{position:relative;align-items:center;justify-content:center;display:flex;transition-property:background,border-width,border-color;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-background-animation-timing);box-shadow:var(--_checkbox-elevation);border-style:solid;border-width:var(--_checkbox-unchecked-border-width);border-color:var(--_checkbox-unchecked-border-color);border-radius:var(--_checkbox-shape);box-sizing:border-box;block-size:var(--_checkbox-height);inline-size:var(--_checkbox-width);background:var(--_checkbox-background)}.forge-checkbox .icon{position:absolute;transition-property:stroke-dashoffset;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-icon-animation-timing);fill:none;stroke-width:var(--_checkbox-icon-stroke-width)}.forge-checkbox .icon--checked{stroke:var(--_checkbox-icon-checked-color);stroke-dasharray:30;transition-delay:0s;stroke-dashoffset:30}.forge-checkbox .icon--indeterminate{stroke:var(--_checkbox-icon-indeterminate-color);stroke-dasharray:20;transition-delay:0s;stroke-dashoffset:20}.forge-checkbox .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}:host([checked]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([checked]) .icon--checked{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([checked]) .icon--checked:dir(rtl){stroke-dashoffset:60}:host([checked]) .icon--indeterminate{transition-delay:0s;stroke-dashoffset:20}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([indeterminate]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([indeterminate]) .icon--checked{transition-delay:0s;stroke-dashoffset:30}:host([indeterminate]) .icon--indeterminate{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([indeterminate]) .icon--indeterminate:dir(rtl){stroke-dashoffset:40}:host([indeterminate]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([dense]) .forge-checkbox{--_checkbox-gap:var(--_checkbox-dense-gap)}:host([dense]) .forge-checkbox .container{inline-size:var(--_checkbox-state-layer-dense-width);block-size:var(--_checkbox-state-layer-dense-height)}:host([disabled]) .forge-checkbox .container{opacity:var(--_checkbox-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-checkbox .container{cursor:not-allowed}@media (prefers-reduced-motion){.forge-checkbox{--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-unchecked-color)}forge-focus-indicator{--forge-focus-indicator-shape:0px;--forge-focus-indicator-outward-offset:8px}',at=class extends $e(mt(Ke(V1(L1(M))))){static get observedAttributes(){return Object.values(T1.observedAttributes)}constructor(){super(),H(this,uw,_w),this[oe]="checkbox",this._core=new Kr(new Yr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"checkbox",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case T1.observedAttributes.CHECKED:this.checked=p(o);break;case T1.observedAttributes.DEFAULT_CHECKED:this.defaultChecked=p(o);break;case T1.observedAttributes.INDETERMINATE:this.indeterminate=p(o);break;case T1.observedAttributes.VALUE:this.value=o;break;case T1.observedAttributes.DENSE:this.dense=p(o);break;case T1.observedAttributes.DISABLED:this.disabled=p(o);break;case T1.observedAttributes.REQUIRED:this.required=p(o);break;case T1.observedAttributes.READONLY:this.readonly=p(o);break;case T1.observedAttributes.LABEL_POSITION:this.labelPosition=o;break}super.attributeChangedCallback(t,e,o)}[Bt](){return this.checked?this.value:null}[te](){return this.checked?this.indeterminate?"checked-indeterminate":"checked":this.indeterminate?"unchecked-indeterminate":"unchecked"}[Mt](){this[s1].setValidity({valueMissing:this.required&&!this.checked},this[ee]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t==="checked"||t==="checked-indeterminate",this.indeterminate=t==="unchecked-indeterminate"||t==="checked-indeterminate"}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[N]({ariaLabel:t})}setFormValue(t,e){if(this[s1].setFormValue(t,e),e){let o=Ut(e)?e:e[this.name];this.checked=o==="checked"||o==="checked-indeterminate",this.indeterminate=o==="unchecked-indeterminate"||o==="checked-indeterminate";return}Ut(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){O(t)?this._core.checked=t:this._core.checked=!this._core.checked}};i([c()],at.prototype,"checked",2),i([c()],at.prototype,"defaultChecked",2),i([c()],at.prototype,"indeterminate",2),i([c()],at.prototype,"value",2),i([c()],at.prototype,"dense",2),i([c()],at.prototype,"disabled",2),i([c()],at.prototype,"required",2),i([c()],at.prototype,"readonly",2),i([c()],at.prototype,"labelPosition",2),at=i([y({name:T1.elementName,dependencies:[J,r1]})],at);var Gv=class extends o2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get indeterminate(){return this._element.indeterminate}set indeterminate(t){this._element.indeterminate=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener("change",e=>t(e.target.checked))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(T1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function qv(){f(at)}var Ot=class Ot{static getRadioGroup(t,{rootNode:e,form:o}={}){var s;if(!t.name)return[t];if(!t.form&&!o){let l=(e!=null?e:t.getRootNode()).querySelectorAll(`${b1.elementName}[name=${t.name}]`);return Array.from(l).filter(h=>!h.form)}let a=((s=t.form)!=null?s:o).elements.namedItem(t.name);return a&&Object.prototype.isPrototypeOf.call(RadioNodeList.prototype,a)?Array.from(a).filter(r=>r.matches(b1.elementName)):[t]}static setRadioGroupValidity(t){let e=Ot.getRadioGroup(t),o=Ot._selectionIsRequired(e);e.forEach(a=>{if(!a.shadowRoot)return;let s=a[ee]({required:o,checked:a.checked});a[s1].setValidity({valueMissing:o},s)})}static setRadioGroupRequired(t){let e=Ot.getRadioGroupElement(t);if(!e)return;let o=Ot.getRadioGroup(t),a=Array.from(o).some(s=>s.required);(e==null?void 0:e.tagName)==="forge-radio-group"?e[N]({ariaRequired:a?"true":"false"}):e.setAttribute("aria-required",a?"true":"false")}static getRadioGroupElement(t){return t.closest(":is(fieldset, [role=radiogroup], forge-radio-group)")}static setSelectedRadioInGroup(t){Ot.getRadioGroup(t).forEach(o=>o.checked=o===t)}static syncRadioFocusableState(t,{ignoreSelf:e,rootNode:o,form:a}={ignoreSelf:!1}){let s=Ot.getRadioGroup(t,{rootNode:o,form:a});if(s=s.filter(r=>e&&r!==t||r.shadowRoot),!s.some(r=>r.checked)){s.forEach(r=>r[s2]=!r.disabled);return}s.forEach(r=>r[s2]=r.checked&&!r.disabled)}static focusNextRadioInGroup(t){Ot._updateRadioGroupFocus(t,1)}static focusPreviousRadioInGroup(t){Ot._updateRadioGroupFocus(t,-1)}static setUncheckedRadioGroupFocus(t,e){let o=Ot.getRadioGroup(t);if(e==="focus"){o.forEach(a=>a[s2]=a===t);return}(!t.checked||o[0]===t||o[o.length-1]===t)&&o.forEach(a=>a[s2]=!0)}static async requestRadioGroupReset(t){if(this._radiosRequestingReset.add(t),await ae(),!this._radiosRequestingReset.has(t))return;let e=Ot.getRadioGroup(t),o=null;e.forEach(a=>{this._radiosRequestingReset.delete(a),a.defaultChecked&&(o=a)}),e.forEach(a=>{a.checked=a===o,a[s2]=!o||a.checked})}static _updateRadioGroupFocus(t,e){let o=Ot.getRadioGroup(t),a=o.indexOf(t),s=o[a];do if(a+=e,a<0?a=o.length-1:a>=o.length&&(a=0),s=o[a],s===t)return;while(s.disabled||s.readonly);s[$r]()&&(s[s2]=!0,s.focus(),o.forEach(r=>{r!==s&&(r[s2]=!1,r.checked=!1)}))}static _selectionIsRequired(t){let e=!1,o=!1;return t.forEach(a=>{a.required&&(e=!0),a.checked&&(o=!0)}),e&&!o}};Ot._radiosRequestingReset=new WeakSet;var ut=Ot;var xw=`${b}radio`,Yv={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},fw=d({},Yv),bw={ROOT:".forge-radio",LABEL:"#label",STATE_LAYER:"forge-state-layer"},yw={CHANGE:"change",INPUT:"input"},b1={elementName:xw,observedAttributes:Yv,attributes:fw,selectors:bw,events:yw},$r=Symbol("tryCheck");var Xr=class extends I{constructor(t){super(t),this._rootElement=w(t,b1.selectors.ROOT),this._labelElement=w(t,b1.selectors.LABEL),this._stateLayerElement=w(t,b1.selectors.STATE_LAYER)}setChecked(t,e){this._component[N]({ariaChecked:t?"true":"false"}),t&&ut.setSelectedRadioInGroup(this._component),ut.syncRadioFocusableState(this._component);let o=t?e:null,a=t?"checked":"unchecked";this._component[s1].setFormValue(o,a),ut.setRadioGroupValidity(this._component)}trySetDisabled(t){let e=this._component.closest("forge-radio-group");return!t&&e&&e.disabled?!1:(this._component[N]({ariaDisabled:`${!!t}`}),ut.syncRadioFocusableState(this._component),!0)}setRequired(){ut.setRadioGroupValidity(this._component),ut.setRadioGroupRequired(this._component)}setReadonly(t){this._component[N]({ariaDisabled:`${!!t}`})}disableStateLayer(t){this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}setUncheckedRadioGroupFocus(t){ut.setUncheckedRadioGroupFocus(this._component,t)}focusNext(){ut.focusNextRadioInGroup(this._component)}focusPrevious(){ut.focusPreviousRadioInGroup(this._component)}};var Zr=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._disabled=!1;this._required=!1;this._readonly=!1;this._dense=!1;this._labelPosition="end";this._focusListener=()=>this._handleFocus(),this._blurListener=()=>this._handleBlur(),this._clickListener=e=>this._handleClick(e),this._keydownListener=e=>this._handleKeydown(e),this._keyupListener=e=>this._handleKeyup(e)}initialize(){this._adapter.addHostListener("focus",this._focusListener),this._adapter.addHostListener("blur",this._blurListener),this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setChecked(this._checked,this._value)}tryCheck(){return this._checked=!0,this._dispatchEvents()?(this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(b1.attributes.CHECKED,this._checked),!0):(this._checked=!1,!1)}_handleFocus(){this._checked||this._adapter.setUncheckedRadioGroupFocus("focus")}_handleBlur(){this._checked||this._adapter.setUncheckedRadioGroupFocus("blur")}_handleClick(t){this._activate(t)}_handleKeydown(t){switch(t.key){case"ArrowRight":case"ArrowDown":t.preventDefault(),this._adapter.focusNext();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this._adapter.focusPrevious();break;case" ":t.preventDefault();break}}_handleKeyup(t){t.key===" "&&this._activate(t)}async _activate(t){if(!(this._checked||this._disabled||this._readonly)&&(await ae(),!t.defaultPrevented)){if(this._checked=!0,!this._dispatchEvents()){this._checked=!1;return}this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(b1.attributes.CHECKED,this._checked)}}_dispatchEvents(){let t=new Event(b1.events.CHANGE,{bubbles:!0,cancelable:!0}),e=new Event(b1.events.INPUT,{bubbles:!0,cancelable:!0,composed:!0});return this._adapter.dispatchHostEvent(t),this._adapter.dispatchHostEvent(e),!(t.defaultPrevented||e.defaultPrevented)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(b1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(b1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(b1.attributes.VALUE,this._value))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.trySetDisabled(this._disabled)?(this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(b1.attributes.DISABLED,this._disabled)):this._disabled=!this._disabled)}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(b1.attributes.REQUIRED,this._required),this._adapter.setRequired(this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(b1.attributes.READONLY,this._readonly))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(b1.attributes.DENSE,this._dense))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(b1.attributes.LABEL_POSITION,this._labelPosition))}};var Mw='<template><div id="radio" class="forge-radio" part="root"><div id="container" class="container" aria-hidden="true"><div id="background" class="background" part="background"></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></div><span id="label" class="label" for="input" part="label"><slot></slot></span></div></template>',zw=':host{display:inline-block;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host(:focus){outline:0}.forge-radio{--_radio-primary-color:var(--forge-radio-primary-color, var(--forge-theme-tertiary, #3d5afe));--_radio-inactive-color:var(--forge-radio-inactive-color, var(--forge-theme-surface-container-high, #9e9e9e));--_radio-size:var(--forge-radio-size, 20px);--_radio-mark-size:var(--forge-radio-mark-size, 75%);--_radio-state-layer-size:var(--forge-radio-state-layer-size, 40px);--_radio-state-layer-dense-size:var(--forge-radio-state-layer-dense-size, 24px);--_radio-width:var(--forge-radio-width, var(--_radio-size));--_radio-height:var(--forge-radio-height, var(--_radio-size));--_radio-border-width:var(--forge-radio-border-width, var(--forge-border-medium, 2px));--_radio-unchecked-border-color:var(--forge-radio-unchecked-border-color, var(--_radio-inactive-color));--_radio-checked-border-color:var(--forge-radio-checked-border-color, var(--_radio-primary-color));--_radio-background:var(--forge-radio-background, transparent);--_radio-shape:var(--forge-radio-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_radio-mark-width:var(--forge-radio-mark-width, var(--_radio-mark-size));--_radio-mark-height:var(--forge-radio-mark-height, var(--_radio-mark-size));--_radio-mark-color:var(--forge-radio-mark-color, var(--_radio-primary-color));--_radio-gap:var(--forge-radio-gap, 0);--_radio-justify:var(--forge-radio-justify, start);--_radio-align:var(--forge-radio-align, center);--_radio-direction:var(--forge-radio-direction, initial);--_radio-state-layer-width:var(--forge-radio-state-layer-width, var(--_radio-state-layer-size));--_radio-state-layer-height:var(--forge-radio-state-layer-height, var(--_radio-state-layer-size));--_radio-state-layer-unchecked-color:var(--forge-radio-state-layer-unchecked-color, var(--_radio-color));--_radio-state-layer-checked-color:var(--forge-radio-state-layer-checked-color, var(--_radio-primary-color));--_radio-state-layer-shape:var(--forge-radio-state-layer-shape, var(--_radio-shape));--_radio-state-layer-dense-width:var(--forge-radio-state-layer-dense-width, var(--_radio-state-layer-dense-size));--_radio-state-layer-dense-height:var(--forge-radio-state-layer-dense-height, var(--_radio-state-layer-dense-size));--_radio-disabled-opacity:var(--forge-radio-disabled-opacity, 0.38);--_radio-animation-duration:var(--forge-radio-animation-duration, var(--forge-animation-duration-short4, 200ms));--_radio-animation-timing-function:var(--forge-radio-animation-timing-function, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_radio-animation-delay:var(--forge-radio-animation-delay, 0ms)}.forge-radio{position:relative;flex-direction:var(--_radio-direction);align-items:var(--_radio-align);justify-content:var(--_radio-justify);gap:var(--_radio-gap);display:flex}.forge-radio .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_radio-shape);inline-size:var(--_radio-state-layer-width);block-size:var(--_radio-state-layer-height);cursor:pointer}.forge-radio .background{position:relative;display:inline block;overflow:hidden;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:border-color;box-sizing:border-box;border-radius:var(--_radio-shape);border-width:var(--_radio-border-width);border-style:solid;border-color:var(--_radio-unchecked-border-color);inline-size:var(--_radio-width);block-size:var(--_radio-height);background:var(--_radio-background)}.forge-radio .background::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:top left;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:opacity,scale;border-radius:var(--_radio-shape);inline-size:var(--_radio-mark-width);block-size:var(--_radio-mark-height);background:var(--_radio-mark-color);scale:0.5;opacity:0}.forge-radio .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}.forge-radio .label:empty{display:none}:host([checked]) .forge-radio .background{border-color:var(--_radio-checked-border-color)}:host([checked]) .forge-radio .background::after{scale:1;opacity:1}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-checked-color)}:host([dense]) .forge-radio .container{inline-size:var(--_radio-state-layer-dense-width);block-size:var(--_radio-state-layer-dense-height)}:host([disabled]) .forge-radio .container{opacity:var(--_radio-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-radio .container{cursor:not-allowed}forge-focus-indicator{--forge-focus-indicator-color:var(--_radio-primary-color);--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-shape:var(--_radio-state-layer-shape)}forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-unchecked-color)}',_t=class extends $e(mt(Ke(V1(L1(M))))){static get observedAttributes(){return Object.values(b1.observedAttributes)}constructor(){super(),H(this,Mw,zw),this[oe]="radio",this._core=new Zr(new Xr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"radio",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false"}),ut.syncRadioFocusableState(this),this._core.initialize(),this._rootNode=this.getRootNode()}disconnectedCallback(){ut.syncRadioFocusableState(this,{ignoreSelf:!0,rootNode:this._rootNode,form:this._latestAssociatedForm})}attributeChangedCallback(t,e,o){switch(t){case b1.attributes.CHECKED:this._core.checked=p(o);break;case b1.attributes.DEFAULT_CHECKED:this._core.defaultChecked=p(o);break;case b1.attributes.VALUE:this.value=o;break;case b1.attributes.DENSE:this.dense=p(o);break;case b1.attributes.DISABLED:this.disabled=p(o);break;case b1.attributes.REQUIRED:this.required=p(o);break;case b1.attributes.READONLY:this.readonly=p(o);break;case b1.attributes.LABEL_POSITION:this.labelPosition=o;break}super.attributeChangedCallback(t,e,o)}[Bt](){return this.checked?this.value:null}[te](){return this.checked?"checked":"unchecked"}formAssociatedCallback(t){t&&(this._latestAssociatedForm=t)}formResetCallback(){ut.requestRadioGroupReset(this)}formStateRestoreCallback(t){this.checked=t==="checked"}labelClickedCallback(){this.click()}labelChangedCallback(t){this[N]({ariaLabel:t})}[$r](){return this._core.tryCheck()}};i([c()],_t.prototype,"checked",2),i([c()],_t.prototype,"defaultChecked",2),i([c()],_t.prototype,"value",2),i([c()],_t.prototype,"dense",2),i([c()],_t.prototype,"disabled",2),i([c()],_t.prototype,"required",2),i([c()],_t.prototype,"readonly",2),i([c()],_t.prototype,"labelPosition",2),_t=i([y({name:b1.elementName,dependencies:[J,r1]})],_t);function Kv(){f(_t)}var jr=class extends I{constructor(t){super(t)}attachLabel(t){t.nonInteractive=!0,t.forElement=this._component}setDisabled(t){this._component[N]({ariaDisabled:t?"true":null}),this._disableRadios(t)}trySetRequired(){let t=Array.from(this._component.querySelectorAll(b1.elementName)).some(e=>e.required);this._component[N]({ariaRequired:t?"true":null})}_disableRadios(t){this._component.querySelectorAll(b1.elementName).forEach(e=>{e.disabled=t})}};var Hw=`${b}radio-group`,$v={DISABLED:"disabled"},Iw=d({},$v),fa={elementName:Hw,observedAttributes:$v,attributes:Iw};var Qr=class{constructor(t){this._adapter=t;this._disabled=!1;this._labelConnectedListener=e=>this._handleLabelConnected(e)}initialize(){this._adapter.addHostListener(a2.events.CONNECTED,this._labelConnectedListener),this._adapter.trySetRequired()}_handleLabelConnected(t){t.stopPropagation(),this._adapter.attachLabel(t.target)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(fa.attributes.DISABLED,t))}};var Lw="<template><slot></slot></template>",oo=class extends mt(V1(L1(M))){get form(){return this[s1].form}get labels(){return this[s1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){G(this,!!t,"name",t)}static get observedAttributes(){return Object.values(fa.observedAttributes)}constructor(){super(),H(this,Lw),this._core=new Qr(new jr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"radiogroup",ariaDisabled:this.disabled?"true":null}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case fa.attributes.DISABLED:this.disabled=p(o);break}}formDisabledCallback(t){this.disabled=t}labelChangedCallback(t){this[N]({ariaLabel:t!=null?t:null})}};oo.formAssociated=!0,i([c()],oo.prototype,"disabled",2),oo=i([y({name:fa.elementName,dependencies:[_t]})],oo);function Xv(){f(oo)}var Zv=`${b}switch`,jv={CHECKED:"checked",ON:"on",SELECTED:"selected",DEFAULT_CHECKED:"default-checked",DEFAULT_ON:"default-on",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",ICON:"icon",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},Vw=d({},jv),Cw={HIDDEN:"hidden"},Ew={ROOT:".forge-switch",LABEL:"#label",ICON_ON:"#icon-on",ICON_OFF:"#icon-off",STATE_LAYER:"forge-state-layer"},Bw={CHANGE:`${Zv}-change`},Aw={ON:"on",OFF:"off"},l1={attributes:Vw,observedAttributes:jv,classes:Cw,selectors:Ew,elementName:Zv,events:Bw,state:Aw};var Jr=class extends I{constructor(t){super(t),this._rootElement=w(t,l1.selectors.ROOT),this._labelElement=w(t,l1.selectors.LABEL),this._iconCheckedElement=w(t,l1.selectors.ICON_ON),this._iconUncheckedElement=w(t,l1.selectors.ICON_OFF),this._stateLayerElement=w(t,l1.selectors.STATE_LAYER)}setChecked(t){this._component[Mt](),this._component[N]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[s2]=!t,this._component[N]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[Mt](),this._component[N]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[N]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setIconVisibility(t){let e=t==="none"||t==="off",o=t==="none"||t==="on";f2(this._iconCheckedElement,e,l1.classes.HIDDEN),f2(this._iconUncheckedElement,o,l1.classes.HIDDEN)}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t){let e=t?new FormData:null,o=t?l1.state.ON:l1.state.OFF;e&&t&&e.append(this._component.name,t),this._component.setFormValue(e,o)}};var ti=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._icon="both";this._labelPosition="end";this._clickListener=()=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setIconVisibility(this._icon),this._adapter.syncValue(this._submittedValue)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let o=new Event("change",{cancelable:!0,bubbles:!0}),a=new CustomEvent(l1.events.CHANGE,{detail:e,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(o),this._adapter.dispatchHostEvent(a),this._checked=t,!(o.defaultPrevented||a.defaultPrevented)&&(this.checked=e)}_setCheckedAttribute(){this._adapter.toggleHostAttribute(l1.attributes.CHECKED,this._checked),this._adapter.toggleHostAttribute(l1.attributes.ON,this._checked),this._adapter.toggleHostAttribute(l1.attributes.SELECTED,this._checked)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue),this._setCheckedAttribute())}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(l1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue),(typeof this._value=="string"||this._value==null)&&this._adapter.toggleHostAttribute(l1.attributes.VALUE,!0,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(l1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(l1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(l1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(l1.attributes.READONLY,this._readonly))}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this._adapter.setIconVisibility(this._icon),this._adapter.setHostAttribute(l1.attributes.ICON,this._icon))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(l1.attributes.LABEL_POSITION,this._labelPosition))}};var Tw='<template><div class="forge-switch" part="switch"><div id="container" class="container"><div class="track" part="track"></div><div class="handle" part="handle"><div id="icon-off" class="icon icon__off" part="icon-off"><slot name="icon-off"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 13H4v-2h16v2z"/></svg></slot></div><div id="icon-on" class="icon icon__on" part="icon-on"><slot name="icon-on"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"/></svg></slot></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><label id="label" class="label" part="label"><slot></slot></label></div></template>',Sw=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-state-layer-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, start);--_switch-align:var(--forge-switch-align, center);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-switch-state-layer-off-color, var(--_switch-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.54);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-off-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{display:flex;position:relative;flex-direction:var(--_switch-direction);align-items:var(--_switch-align);justify-content:var(--_switch-justify);gap:var(--_switch-gap);--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;align-items:center;display:flex;flex-shrink:0;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{transition-property:background-color,border-color,border-width;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;justify-content:center;align-items:center;display:flex;transition-property:translate;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:"";position:relative;display:block;scale:var(--_switch-handle-off-scale);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;align-items:center;justify-content:center;display:flex;transition-property:opacity,scale;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([checked]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([checked]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([checked]) .handle::before{scale:var(--_switch-handle-on-scale);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([checked]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([checked]) .handle .icon__off{opacity:0;scale:0.4}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch .container{opacity:var(--_switch-disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}',$2=class extends $e(mt(Ke(V1(L1(M))))){static get observedAttributes(){return Object.values(l1.observedAttributes)}constructor(){super(),H(this,Tw,Sw),this[oe]="checkbox",this._core=new ti(new Jr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"switch",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case l1.observedAttributes.CHECKED:case l1.observedAttributes.ON:case l1.observedAttributes.SELECTED:this.checked=p(o);break;case l1.observedAttributes.DEFAULT_CHECKED:case l1.observedAttributes.DEFAULT_ON:this.defaultChecked=p(o);break;case l1.observedAttributes.VALUE:this.value=o;break;case l1.observedAttributes.DENSE:this.dense=p(o);break;case l1.observedAttributes.DISABLED:this.disabled=p(o);break;case l1.observedAttributes.REQUIRED:this.required=p(o);break;case l1.observedAttributes.READONLY:this.readonly=p(o);break;case l1.observedAttributes.ICON:this.icon=o;break;case l1.observedAttributes.LABEL_POSITION:this.labelPosition=o;break}super.attributeChangedCallback(t,e,o)}[Bt](){return this.checked?this.value:null}[te](){return this.checked?l1.state.ON:l1.state.OFF}[Mt](){this[s1].setValidity({valueMissing:this.required&&!this.checked},this[ee]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t===l1.state.ON}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[N]({ariaLabel:t})}setFormValue(t,e){if(this[s1].setFormValue(t,e),e){let o=Ut(e)?e:e[this.name];this.checked=o===l1.state.ON;return}Ut(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){O(t)?this._core.checked=t:this._core.checked=!this._core.checked}};i([c()],$2.prototype,"checked",2),i([c({name:"checked"})],$2.prototype,"on",2),i([c({name:"checked"})],$2.prototype,"selected",2),i([c()],$2.prototype,"defaultChecked",2),i([c({name:"defaultChecked"})],$2.prototype,"defaultOn",2),i([c()],$2.prototype,"value",2),i([c()],$2.prototype,"dense",2),i([c()],$2.prototype,"disabled",2),i([c()],$2.prototype,"required",2),i([c()],$2.prototype,"readonly",2),i([c()],$2.prototype,"icon",2),i([c()],$2.prototype,"labelPosition",2),$2=i([y({name:l1.elementName,dependencies:[J,r1]})],$2);var Qv=class extends o2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get on(){return this._element.on}set on(t){this._element.on=t}get selected(){return this._element.selected}set selected(t){this._element.selected=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get defaultOn(){return this._element.defaultOn}set defaultOn(t){this._element.defaultOn=t}get icon(){return this._element.icon}set icon(t){this._element.icon=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener(l1.events.CHANGE,({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(l1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function Jv(){f($2)}var t6=`${b}label`,e6={FOR:"for",DYNAMIC:"dynamic",NON_INTERACTIVE:"non-interactive",LEGEND:"legend"},kw=d({},e6),Ow={SLOT:"slot"},Dw={CONNECTED:`${t6}-connected`},Pw=[A2.elementName,q1.elementName,T1.elementName,t1.elementName,b1.elementName,"forge-select",l1.elementName],a2={elementName:t6,observedAttributes:e6,attributes:kw,selectors:Ow,events:Dw,labelableChildSelectors:Pw};var ei=class extends I{constructor(e){super(e);this._targetElement=null;this._slotElement=w(e,a2.selectors.SLOT)}destroy(){var e;(e=this._targetElement)==null||e.labelChangedCallback(null),this._targetElement=null}hasTargetElement(){return!!this._targetElement}getTargetElement(){return this._targetElement}setTargetElement(e){if(e&&this._checkLabelAwareness(e)){this._targetElement=e;return}this._targetElement=null}trySetTarget(e){this._targetElement=this._locateTargetElement(e)}clickTarget(){var e,o;(o=(e=this._targetElement)==null?void 0:e.labelClickedCallback)==null||o.call(e)}updateTargetLabel(){var a,s;if(!this._targetElement)return;let e=(a=this._component.textContent)!=null?a:"";if(this._component.contains(this._targetElement)){let r=(s=this._targetElement.textContent)!=null?s:"";e=e.replace(r,"")}let o=e.trim();this._targetElement.labelChangedCallback(o)}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._slotElement.removeEventListener("slotchange",e)}addMutationObserver(e){this._mutationObserver=new MutationObserver(e),this._mutationObserver.observe(this._component,{subtree:!0,characterData:!0,childList:!0}),e([],this._mutationObserver)}removeMutationObserver(){var e;(e=this._mutationObserver)==null||e.disconnect(),this._mutationObserver=void 0}_checkLabelAwareness(e){return kv(e)?!0:(console.warn("Label target element is not label aware.",e),!1)}_locateTargetElement(e){let o;if(e)o=this._component.getRootNode().querySelector(`#${e}`);else{let a=a2.labelableChildSelectors.join(",");o=this._component.querySelector(a)}return o&&!o.shadowRoot?(o.setAttribute(ja,""),o[Zo]=this._component,null):o&&!this._checkLabelAwareness(o)?null:o}};var oi=class{constructor(t){this._adapter=t;this._dynamic=!1;this._nonInteractive=!1;this._legend=!1;this._isConnected=!1;this._clickListener=e=>this._handleClick(e),this._slotChangeListener=()=>this._handleSlotChange(),this._mutationCallback=()=>this._handleMutation()}initialize(){this._legend?this._initializeAsLegend():this._initializeAsLabel()}destroy(){this._disconnect(),this._adapter.destroy()}update(){this._adapter.updateTargetLabel()}updateTarget(t){return this._adapter.setTargetElement(t),this._adapter.hasTargetElement()?(this._connect(),!0):!1}async _initializeAsLegend(){await ae(),this._adapter.dispatchHostEvent(new CustomEvent(a2.events.CONNECTED,{bubbles:!0}))}async _initializeAsLabel(){var t;this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((t=this._for)!=null?t:null),this._adapter.hasTargetElement()&&this._connect()}_handleClick(t){var o;let e=(o=this._clickTarget)!=null?o:this._adapter.getTargetElement();t.target===e||e!=null&&e.contains(t.target)||this._adapter.clickTarget()}_handleSlotChange(){!this._for&&!this._forElement&&(this._adapter.trySetTarget(null),this._tryConnect())}_handleMutation(){this._adapter.updateTargetLabel()}_connect(){this._nonInteractive||this._adapter.addHostListener("click",this._clickListener),this._adapter.updateTargetLabel(),this._dynamic&&this._adapter.addMutationObserver(this._mutationCallback),this._isConnected=!0}_disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeMutationObserver(),this._isConnected=!1}_tryConnect(){this._adapter.hasTargetElement()?this._isConnected||this._connect():this._disconnect()}get for(){return this._for}set for(t){var e,o;this._for!==t&&(this._for=t,this._adapter.toggleHostAttribute(a2.attributes.FOR,!!this.for,(e=this.for)!=null?e:void 0),this._adapter.trySetTarget((o=this._for)!=null?o:null),this._tryConnect())}get forElement(){return this._forElement}set forElement(t){var e;this._forElement!==t&&(this._forElement=t,this._adapter.setTargetElement((e=this._forElement)!=null?e:null),this._tryConnect())}get clickTarget(){return this._clickTarget}set clickTarget(t){this._clickTarget!==t&&(this._clickTarget=t)}get dynamic(){return this._dynamic}set dynamic(t){this._dynamic!==t&&(this._dynamic=t,this._adapter.toggleHostAttribute(a2.attributes.DYNAMIC,this._dynamic),this._dynamic?this._adapter.hasTargetElement()&&this._adapter.addMutationObserver(this._mutationCallback):this._adapter.removeMutationObserver())}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){if(this._nonInteractive!==t){if(this._nonInteractive=t,this._adapter.toggleHostAttribute(a2.attributes.NON_INTERACTIVE,this._nonInteractive),!this._isConnected)return;this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener)}}get legend(){return this._legend}set legend(t){var e;if(this._legend!==t){if(this._legend=t,this._adapter.toggleHostAttribute(a2.attributes.LEGEND,this._legend),this._legend){this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.dispatchHostEvent(new CustomEvent(a2.events.CONNECTED,{bubbles:!0}));return}this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((e=this._for)!=null?e:null),this._adapter.hasTargetElement()&&this._connect()}}};var Nw="<template><slot></slot></template>",Rw=':host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);display:inline-block;cursor:default}:host([hidden]){display:none}',de=class extends M{static get observedAttributes(){return Object.values(a2.observedAttributes)}constructor(){super(),H(this,Nw,Rw),this._core=new oi(new ei(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case a2.attributes.FOR:this.for=o;break;case a2.attributes.DYNAMIC:this.dynamic=p(o);break;case a2.attributes.NON_INTERACTIVE:this.nonInteractive=p(o);break;case a2.attributes.LEGEND:this.legend=p(o);break}}update(){this._core.update()}[rs](t){return this._core.updateTarget(t)}};i([c()],de.prototype,"for",2),i([c()],de.prototype,"forElement",2),i([c()],de.prototype,"clickTarget",2),i([c()],de.prototype,"dynamic",2),i([c()],de.prototype,"nonInteractive",2),i([c()],de.prototype,"legend",2),de=i([y({name:a2.elementName})],de);function o6(){f(de)}var a6={LABEL_POSITION:"label-position",LABEL_ALIGNMENT:"label-alignment",INVALID:"invalid",REQUIRED:"required",OPTIONAL:"optional",DISABLED:"disabled",FLOAT_LABEL:"float-label",VARIANT:"variant",THEME:"theme",SHAPE:"shape",DENSITY:"density",DENSE:"dense",POPOVER_ICON:"popover-icon",POPOVER_EXPANDED:"popover-expanded",SUPPORT_TEXT_INSET:"support-text-inset"},Fw=d({},a6),Uw={DEFAULT_VARIANT:"outlined",DEFAULT_THEME:"default",DEFAULT_SHAPE:"default",DEFAULT_DENSITY:"default",DEFAULT_LABEL_POSITION:"inset",DEFAULT_LABEL_ALIGNMENT:"default",DEFAULT_SUPPORT_TEXT_INSET:"none"},Y={observedAttributes:a6,attributes:Fw,defaults:Uw};var $5=`${b}field`,n6=S(d({},Y.observedAttributes),{MULTILINE:"multiline",FOCUS_INDICATOR_ALLOW_FOCUS:"focus-indicator-allow-focus",FOCUS_INDICATOR_FOCUS_MODE:"focus-indicator-focus-mode"}),Ww=S(d({},n6),{MULTI_INPUT_SEPARATOR:"data-forge-multi-input-separator"}),Gw={FLOATING_IN:"floating-in",FLOATING_OUT:"floating-out",HAS_LABEL:"has-label",HAS_START:"has-start",HAS_END:"has-end",HAS_ACCESSORY:"has-accessory",HAS_SUPPORT_START:"has-support-text-start",HAS_SUPPORT_END:"has-support-text-end"},qw={ROOT:"#root",CONTAINER:"#container",INPUT_CONTAINER:"#input",LABEL:"#label",LABEL_SLOT:"slot[name=label]",POPOVER_ICON:"#popover-icon",LABEL_ELEMENTS:`:where(label, ${a2.elementName})`,POPOVER_TARGET:".popover-target"},Yw={ROOT:"root",LABEL:"label",SURFACE:"surface",START:"start",INPUT:"input",END:"end",POPOVER_ICON:"popover-icon",ACCESSORY:"accessory",SUPPORT_TEXT:"support-text",SUPPORT_TEXT_END:"support-text-end",OUTLINE:"outline",FOCUS_INDICATOR:"focus-indicator"},Kw={POPOVER_ICON_CLICK:`${$5}-popover-icon-click`,POPOVER_ICON_MOUSEDOWN:`${$5}-popover-icon-mousedown`},$w=d({},Y.defaults),Xw={FLOAT_IN_LABEL:"float-in-label-animation",FLOAT_OUT_LABEL:"float-out-label-animation"},L={elementName:$5,observedAttributes:n6,attributes:Ww,classes:Gw,selectors:qw,parts:Yw,events:Kw,defaults:$w,animations:Xw};var ai=class extends I{get focusIndicator(){return this._focusIndicatorElement}get hasSlottedLabel(){return!!this._labelSlotElement.assignedNodes({flatten:!0}).length}constructor(t){super(t),this._rootElement=w(t,L.selectors.ROOT),this._containerElement=w(t,L.selectors.CONTAINER),this._inputContainerElement=w(t,L.selectors.INPUT_CONTAINER),this._labelElement=w(t,L.selectors.LABEL),this._labelSlotElement=w(t,L.selectors.LABEL_SLOT),this._popoverIconElement=w(t,L.selectors.POPOVER_ICON),this._focusIndicatorElement=w(t,w1.elementName)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}addPopoverIconListener(t,e){this._popoverIconElement.addEventListener(t,e)}removePopoverIconListener(t,e){this._popoverIconElement.removeEventListener(t,e)}setLabelPosition(t){this._labelElement.remove(),t==="inset"?this._containerElement.prepend(this._labelElement):this._rootElement.prepend(this._labelElement)}setFloatingLabel(t){let e=t?L.classes.FLOATING_IN:L.classes.FLOATING_OUT,o=t?L.animations.FLOAT_IN_LABEL:L.animations.FLOAT_OUT_LABEL,a=s=>{s.animationName===o&&(ye(e,this._rootElement),this._rootElement.removeEventListener("animationend",a))};H1(e,this._rootElement),this._rootElement.addEventListener("animationend",a)}handleSlotChange(t){if(t.name===""){this._trySlotLabel(t);return}for(;t.assignedSlot;)t=t.assignedSlot;if(!t)return;let e={label:L.classes.HAS_LABEL,start:L.classes.HAS_START,end:L.classes.HAS_END,accessory:L.classes.HAS_ACCESSORY,"support-text":L.classes.HAS_SUPPORT_START,"support-text-end":L.classes.HAS_SUPPORT_END};t.name in e&&f2(this._rootElement,!!t.assignedNodes({flatten:!0}).length,e[t.name])}initializeSlots(){this._rootElement.querySelectorAll("slot").forEach(e=>this.handleSlotChange(e))}_trySlotLabel(t){t.assignedElements({flatten:!0}).filter(a=>a.matches(L.selectors.LABEL_ELEMENTS)).forEach(a=>{a.slot||(a.slot="label")})}};var ni=class{constructor(t){this._adapter=t;this._labelPosition=L.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=L.defaults.DEFAULT_LABEL_ALIGNMENT;this._floatLabel=!1;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=L.defaults.DEFAULT_VARIANT;this._theme=L.defaults.DEFAULT_THEME;this._shape=L.defaults.DEFAULT_SHAPE;this._density=L.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._multiline=!1;this._supportTextInset=L.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._slotChangeListener=this._onSlotChange.bind(this);this._popoverIconClickListener=this._onPopoverIconClick.bind(this);this._popoverIconMousedownListener=this._onPopoverIconMousedown.bind(this)}initialize(){this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.initializeSlots(),this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.setLabelPosition(this._labelPosition),this._popoverIcon&&(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener))}_onSlotChange(t){this._adapter.handleSlotChange(t.target)}_onPopoverIconClick(){this._adapter.dispatchHostEvent(new CustomEvent(L.events.POPOVER_ICON_CLICK,{bubbles:!0,composed:!0}))}_onPopoverIconMousedown(t){let e=new CustomEvent(L.events.POPOVER_ICON_MOUSEDOWN,{bubbles:!0,composed:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}floatLabelWithoutAnimation(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.toggleHostAttribute(L.attributes.FLOAT_LABEL,this._floatLabel))}get labelPosition(){return this._labelPosition}set labelPosition(t){if(this._labelPosition!==t){if(this._labelPosition=t,this._adapter.setHostAttribute(L.attributes.LABEL_POSITION,this._labelPosition),!this._adapter.isConnected)return;this._adapter.setLabelPosition(this._labelPosition)}}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setHostAttribute(L.attributes.LABEL_ALIGNMENT,this._labelAlignment))}get floatLabel(){return this._floatLabel}set floatLabel(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.hasSlottedLabel&&this._adapter.setFloatingLabel(this._floatLabel),this._adapter.toggleHostAttribute(L.attributes.FLOAT_LABEL,this._floatLabel))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(L.attributes.INVALID,this._invalid))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(L.attributes.REQUIRED,this._required))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.toggleHostAttribute(L.attributes.OPTIONAL,this._optional))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(L.attributes.DISABLED,this._disabled))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setHostAttribute(L.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(L.attributes.THEME,this._theme))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setHostAttribute(L.attributes.SHAPE,this._shape))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setHostAttribute(L.attributes.DENSITY,this._density))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(L.attributes.DENSE,this._dense))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){if(this._popoverIcon!==t){if(this._popoverIcon=t,this._adapter.toggleHostAttribute(L.attributes.POPOVER_ICON,this._popoverIcon),!this._adapter.isConnected)return;this._popoverIcon?(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener)):(this._adapter.removePopoverIconListener("click",this._popoverIconClickListener),this._adapter.removePopoverIconListener("mousedown",this._popoverIconMousedownListener))}}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.toggleHostAttribute(L.attributes.POPOVER_EXPANDED,this._popoverExpanded))}get multiline(){return this._multiline}set multiline(t){this._multiline!==t&&(this._multiline=t,this._adapter.toggleHostAttribute(L.attributes.MULTILINE,this._multiline))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setHostAttribute(L.attributes.SUPPORT_TEXT_INSET,this._supportTextInset))}get focusIndicatorTargetElement(){return this._adapter.focusIndicator.targetElement}set focusIndicatorTargetElement(t){this._adapter.focusIndicator.targetElement=t}get focusIndicatorFocusMode(){return this._adapter.focusIndicator.focusMode}set focusIndicatorFocusMode(t){this._adapter.focusIndicator.focusMode=t}get focusIndicatorAllowFocus(){return this._adapter.focusIndicator.allowFocus}set focusIndicatorAllowFocus(t){this._adapter.focusIndicator.allowFocus=t}};var Zw='<template><div id="root" class="forge-field" part="root"><div id="label" class="label" part="label"><slot name="label"></slot></div><div id="container" class="container"><div class="popover-target" aria-hidden="true"></div><div id="surface" class="surface" part="surface"></div><div id="start" class="start" part="start"><slot name="start"></slot></div><div id="input" class="input" part="input"><slot></slot></div><div id="end" class="end" part="end"><slot name="end"></slot></div><div id="popover-icon" class="popover-icon" part="popover-icon"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" aria-hidden="true"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 10l5 5 5-5z" id="popover-icon__arrow"/></svg></div><div id="accessory" class="accessory" part="accessory"><slot name="accessory"></slot></div></div><div class="support-text"><div class="support-text-start" part="support-text"><slot name="support-text"></slot></div><div class="support-text-end" part="support-text-end"><slot name="support-text-end"></slot></div></div><div class="outline" part="outline"><forge-focus-indicator target="input" part="focus-indicator"></forge-focus-indicator></div></div></template>',jw='@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}@layer base,theme,variant,shape,density; @layer base{:host{display:block}:host([hidden]){display:none}.forge-field{--_field-background:var(--forge-field-background, transparent);--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-surface-container-minimum, #f5f5f5));--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-surface-bright, #ffffff));--_field-outline-style:var(--forge-field-outline-style, solid);--_field-outline-width:var(--forge-field-outline-width, var(--forge-border-thin, 1px));--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_field-height:var(--forge-field-height, 40px);--_field-inset-height:var(--forge-field-inset-height, 48px);--_field-padding-inline:var(--forge-field-padding-inline, 12px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, var(--_field-padding-inline));--_field-padding-inline-end:var(--forge-field-padding-inline-end, var(--_field-padding-inline));--_field-inner-padding-inline:var(--forge-field-inner-padding-inline, 8px);--_field-rounded-container-padding-inline:var(--forge-field-rounded-container-padding-inline, calc(var(--_field-height) / 2));--_field-rounded-container-padding-inline-start:var(--forge-field-rounded-container-padding-inline-start, var(--_field-rounded-container-padding-inline));--_field-rounded-container-padding-inline-end:var(--forge-field-rounded-container-padding-inline-end, var(--_field-rounded-container-padding-inline));--_field-support-text-margin-block:var(--forge-field-support-text-margin-block, 4px);--_field-support-text-gap:var(--forge-field-support-text-gap, 8px);--_field-support-text-padding-inline:var(--forge-field-support-text-padding-inline, var(--_field-padding-inline));--_field-support-text-padding-inline-start:var(--forge-field-support-text-padding-inline-start, var(--_field-support-text-padding-inline));--_field-support-text-padding-inline-end:var(--forge-field-support-text-padding-inline-end, var(--_field-support-text-padding-inline));--_field-label-margin-inline:var(--forge-field-label-margin-inline, 8px);--_field-label-margin-block:var(--forge-field-label-margin-block, 4px);--_field-required-padding:var(--forge-field-required-padding, 0.35ch);--_field-required-content:var(--forge-field-required-content, "*");--_field-optional-padding:var(--forge-field-optional-padding, 0.5ch);--_field-optional-content:var(--forge-field-optional-content, "(optional)");--_field-multiline-resize:var(--forge-field-multiline-resize, block);--_field-multiline-min-inline-size:var(--forge-field-multiline-min-inline-size, initial);--_field-multiline-max-inline-size:var(--forge-field-multiline-max-inline-size, initial);--_field-multiline-min-block-size:var(--forge-field-multiline-min-block-size, var(--_field-height));--_field-multiline-max-block-size:var(--forge-field-multiline-max-block-size, initial);--_field-popover-icon-transition-duration:var(--forge-field-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_field-popover-icon-transition-timing:var(--forge-field-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-popover-icon-open-rotation:var(--forge-field-popover-icon-open-rotation, 180deg);--_field-surface-animation-duration:var(--forge-field-surface-animation-duration, var(--forge-animation-duration-short4, 200ms));--_field-surface-animation-timing:var(--forge-field-surface-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, var(--forge-animation-duration-short2, 100ms));--_field-floating-animation-timing:var(--forge-field-floating-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)));--_field-focus-indicator-width:var(--forge-field-focus-indicator-width, var(--forge-focus-indicator-width, var(--forge-border-medium, 2px)));--_field-disabled-opacity:var(--forge-field-disabled-opacity, 0.38);--_field-disabled-background:var(--forge-field-disabled-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-font-size:var(--forge-field-font-size, inherit);--_field-dense-font-size:var(--forge-field-dense-font-size, 0.875rem);--_field-placeholder-color:var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_field-overflow:var(--forge-field-overflow, hidden);--_field-isolation:var(--forge-field-isolation, isolate)}.forge-field{--_field-disableable-cursor:var(--forge-field-disableable-cursor, auto);--_field-disableable-opacity:var(--forge-field-disableable-opacity, 1);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, 100%);--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-outline-color));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--_field-outline-color-hover));--_field-inner-border-display:var(--forge-field-inner-border-display, block);--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-label-grid-area:var(--forge-field-label-grid-area, "label");--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--_field-multiline-inset-label-background));--_field-surface-display:var(--forge-field-surface-display, block);position:relative;display:grid}}@layer theme{:host(:where([theme=default],:not([theme]))) .forge-field{--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-outline-low, #9e9e9e));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-outline-high, #212121));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-filled-background));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-tonal-background));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--_field-tonal-background-hover));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-outline-high, #212121))}:host(:where([label-position=inset],:not([label-position])):where([theme=default],:not([theme]))) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host([theme=primary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-primary-container, #222c62));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-primary, #3f51b5));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-primary-container, #222c62));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-primary-container-low, #222c62));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-primary, #3f51b5));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-primary-container, #222c62))}:host(:where([label-position=inset],:not([label-position]))[theme=primary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-primary-container-low, #222c62))}:host([theme=secondary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-secondary, #ffc107));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-secondary-container, #8a6804));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-secondary-container-low, #8a6804));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-secondary-container, #8a6804))}:host(:where([label-position=inset],:not([label-position]))[theme=secondary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-tertiary-container, #213189));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-tertiary, #3d5afe));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-tertiary-container, #213189));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-tertiary-container-low, #213189));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-tertiary, #3d5afe));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-tertiary-container, #213189))}:host(:where([label-position=inset],:not([label-position]))[theme=tertiary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-success, #2e7d32));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-success-container, #19441b));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-success, #2e7d32));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-success-container, #19441b));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-success-container-low, #19441b));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-success, #2e7d32));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-success-container, #19441b))}:host(:where([label-position=inset],:not([label-position]))[theme=success]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=error]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011))}:host(:where([label-position=inset],:not([label-position]))[theme=error]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=warning]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-warning, #d14900));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-warning-container, #712700));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-warning, #d14900));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-warning-container, #712700));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-warning-container-low, #712700));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-warning, #d14900));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-warning-container, #712700))}:host(:where([label-position=inset],:not([label-position]))[theme=warning]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=info]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-info, #1565c0));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-info-container, #0b3768));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-info, #1565c0));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-info-container, #0b3768));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-info-container-low, #0b3768));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-info, #1565c0));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-info-container, #0b3768))}:host(:where([label-position=inset],:not([label-position]))[theme=info]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-info-container-low, #0b3768))}}@layer variant{:host([variant=plain]) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-display:var(--forge-field-inner-border-display, none);--_field-padding-inline:var(--forge-field-padding-inline, 0);--_field-surface-display:var(--forge-field-surface-display, none)}:host(:where([variant=outlined],:not([variant]))) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff))}:host([variant=tonal]) .forge-field{--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-tonal-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background));--_field-hover-background:var(--forge-field-hover-background, tonal-background-hover);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-multiline-inset-label-tonal-background))}:host([variant=filled]) .forge-field{--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}:host([variant=raised]) .forge-field{--_field-elevation:var(--forge-field-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_field-elevation-active:var(--forge-field-elevation-active, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}}@layer shape{:host([shape=squared]) .forge-field{--_field-shape:var(--forge-field-shape, 0)}:host([shape=rounded]) .forge-field{--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_field-padding-inline:var(--forge-field-padding-inline, var(--_field-rounded-container-padding-inline-start))}}@layer density{:host(:where([label-position=inset],:not([label-position])):not([dense]):where([density=default],:not([density]))) .forge-field{--_field-height:var(--forge-field-height, var(--_field-inset-height))}:host(:where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, 8px);--_field-padding-inline-end:var(--forge-field-padding-inline-end, 4px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label,:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label::before{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) ::slotted(:where(input,textarea,[data-forge-field-input])){--_field-font-size:var(--_field-dense-font-size)}:host(:not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 32px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 64px)}}:host([disabled]) .forge-field{--_field-background:var(--_field-disabled-background);--_field-disableable-cursor:var(--forge-field-disableable-cursor, not-allowed);--_field-disableable-opacity:var(--forge-field-disableable-opacity, var(--_field-disabled-opacity))}:host(:not([disabled])[invalid]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-label-color:var(--forge-field-label-color, var(--forge-theme-error, #b00020))}:host(:not([disabled])[invalid]) .forge-field .support-text{color:var(--forge-theme-error,#b00020)}:host(:not([disabled])) .forge-field:has(.container:hover){--_field-outline-color:var(--forge-field-outline-color, var(--_field-outline-color-hover));--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active));--_field-tonal-background:var(--_field-tonal-background-hover);--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-multiline-inset-label-tonal-background-hover));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-inner-border-color-hover))}:host(:not([disabled])) .forge-field:has(.input:focus-within){--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active))}.forge-field .outline{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:outline-color;transition-timing-function:var(--_field-surface-animation-timing);position:relative;grid-area:main;inline-size:100%;block-size:100%;box-shadow:var(--_field-elevation);border-radius:var(--_field-shape);outline-style:var(--_field-outline-style);outline-width:var(--_field-outline-width);outline-color:var(--_field-outline-color);outline-offset:calc(var(--_field-outline-width) * -1);pointer-events:none}.forge-field .container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:relative;display:grid;isolation:var(--_field-isolation);grid-area:main;grid-template-areas:"start center end popover-icon accessory";grid-template-columns:auto 1fr auto auto auto;align-items:center;border-radius:var(--_field-shape);inline-size:100%;block-size:var(--_field-height);overflow:var(--_field-overflow)}.forge-field .surface{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);display:var(--_field-surface-display);grid-column:1/-1;grid-row:1/-1;border-radius:var(--_field-shape);inline-size:100%;block-size:100%;background:var(--_field-background);pointer-events:none}.forge-field .input{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);display:flex;grid-area:center;block-size:100%;inline-size:100%;min-inline-size:0;color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-field .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);position:relative;display:inline-flex;grid-area:var(--_field-label-grid-area);pointer-events:var(--_field-label-pointer-events);margin-block-end:var(--_field-label-margin-block-end);margin-inline-start:var(--_field-label-margin-inline-start);margin-inline-end:var(--_field-label-margin-inline-end);block-size:fit-content;overflow:hidden;color:var(--_field-label-color);line-height:normal;white-space:var(--_field-label-white-space)}.forge-field .popover-target{position:absolute;inset:calc(var(--_field-focus-indicator-width) * -1);pointer-events:none}.forge-field .popover-icon{display:none}.forge-field .popover-icon__arrow{fill:inherit}.forge-field .accessory,.forge-field .end,.forge-field .start,.forge-field .support-text,.forge-field .support-text-end,.forge-field .support-text-start{display:none}:host([required]) .has-label .label::before{margin-inline-end:var(--_field-required-padding);color:var(--forge-theme-error,#b00020);content:var(--_field-required-content)}:host([optional]) .label::after{margin-inline-start:var(--_field-optional-padding);color:inherit;content:var(--_field-optional-content)}:host([popover-icon]) .popover-icon{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-inner-padding-inline);display:flex;align-items:center;grid-area:popover-icon;isolation:isolate;block-size:100%}:host([popover-icon]) .popover-icon>*{transition:rotate var(--_field-popover-icon-transition-duration) var(--_field-popover-icon-transition-timing);fill:var(--_field-content-color)}:host([popover-icon][popover-expanded]) .popover-icon>*{rotate:var(--_field-popover-icon-open-rotation)}.forge-field.has-start .start{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-start:var(--_field-padding-inline-start);display:flex;grid-area:start;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-end .end{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-padding-inline-end);display:flex;grid-area:end;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory{padding-inline-end:var(--_field-inner-padding-inline);position:relative;display:flex;grid-area:accessory;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory::before{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:border-color;transition-timing-function:var(--_field-surface-animation-timing);padding-inline-end:var(--_field-inner-padding-inline);display:var(--_field-inner-border-display);border-inline-start-style:solid;border-inline-start-width:var(--_field-outline-width);border-inline-start-color:var(--_field-inner-border-color);block-size:var(--_field-inner-border-block-size);content:""}.forge-field.has-accessory .forge-field:not(.has-accessory) .popover-icon{padding-inline-end:var(--_field-padding-inline-end)}.forge-field.has-support-text-end .support-text,.forge-field.has-support-text-start .support-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);justify-content:space-between;display:grid;grid-template-areas:"start end";grid-template-columns:1fr auto;grid-area:support-text;margin-block-start:var(--_field-support-text-margin-block);line-height:normal}.forge-field.has-support-text-start.has-support-text-end .support-text{gap:var(--_field-support-text-gap)}.forge-field.has-support-text-start .support-text-start{display:inline-block;grid-area:start}.forge-field.has-support-text-end .support-text-end{display:inline-block;grid-area:end}:host(:not([popover-icon])) .forge-field:not(.has-accessory) .end{padding-inline-end:var(--_field-padding-inline-end)}:host([label-position=block-start]) .forge-field{grid-template-areas:"label" "main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto auto}:host([label-position=block-start]) .label{--_field-label-margin-block-end:var(--forge-field-label-margin-block-end, var(--_field-label-margin-block))}:host([label-position=inline-start]) .forge-field{grid-template-areas:"label main" ". support-text";grid-template-columns:auto 1fr;grid-template-rows:auto auto}:host([label-position=inline-start]) .label{--_field-label-margin-inline-end:var(--forge-field-label-margin-inline-end, var(--_field-label-margin-inline))}:host([label-position=inline-end]) .forge-field{grid-template-areas:"main label" "support-text .";grid-template-columns:1fr auto;grid-template-rows:auto auto}:host([label-position=inline-end]) .label{--_field-label-margin-inline-start:var(--forge-field-label-margin-inline-start, var(--_field-label-margin-inline))}:host(:where([label-position=inset],:not([label-position]))) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto;--_field-label-grid-area:var(--forge-field-label-grid-area, center);--_field-label-pointer-events:var(--forge-field-label-pointer-events, none);--_field-label-white-space:var(--forge-field-label-white-space, nowrap)}:host(:where([label-position=inset],:not([label-position]))) .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end);z-index:999;--_field-floating-label-translation:var(--forge-field-floating-label-translation, 0 calc(calc(calc(max(var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375))), var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)))) / 2) + calc((var(--_field-height) - 56px) / 8)) * -1))}:host([label-position=none]) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto}:host([label-position=none]) .label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}:host([label-position=inline-end][label-alignment=start]) .label,:host([label-position=inline-start][label-alignment=start]) .label{align-self:start}:host([label-position=inline-end]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label,:host([label-position=inline-start]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label{align-self:center}:host([label-position=inline-end][label-alignment=end]) .label,:host([label-position=inline-start][label-alignment=end]) .label{align-self:end}:host([label-position=inline-end][label-alignment=baseline]) .label,:host([label-position=inline-start][label-alignment=baseline]) .label{align-self:center;padding-block-start:calc(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))) - var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))}:host([label-position=block-start]:where([label-alignment=start],[label-alignment=default],:not([label-alignment]))) .label{justify-self:start}:host([label-position=block-start][label-alignment=center]) .label{justify-self:center}:host([label-position=block-start][label-alignment=end]) .label{justify-self:end}:host([label-position=block-start][label-alignment=baseline]:not([variant=plain])) .label{justify-self:start;padding-inline-start:var(--_field-padding-inline-start)}:host([label-position=block-start][label-alignment=baseline][variant=plain]) .label{justify-self:start;padding-inline-start:0px}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);translate:var(--_field-floating-label-translation)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .input{box-sizing:border-box}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .label{animation-name:float-in-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label:not(.floating-in) .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position])):not([float-label])) .has-label.floating-out .label{animation-name:float-out-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label][multiline]) .has-label ::slotted(textarea){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important;padding-block-end:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important}:host([support-text-inset=both]) .support-text{padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end)}:host([support-text-inset=start]) .support-text{padding-inline-start:var(--_field-padding-inline-start)}:host([support-text-inset=end]) .support-text{padding-inline-end:var(--_field-padding-inline-end)}:host([multiline]) .container{align-items:start;block-size:fit-content;min-inline-size:var(--_field-multiline-min-inline-size);max-inline-size:var(--_field-multiline-max-inline-size);min-block-size:var(--_field-multiline-min-block-size);max-block-size:var(--_field-multiline-max-block-size);resize:var(--_field-multiline-resize)}:host([multiline]) .container .end,:host([multiline]) .container .label,:host([multiline]) .container .popover-icon,:host([multiline]) .container .start{align-items:center;block-size:var(--_field-height)}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label{pointer-events:none;inline-size:fit-content}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label slot{display:block}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label::after{animation-name:multiline-inset-label-background-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing);position:absolute;z-index:-1;inset-inline-start:var(--_field-outline-width);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);background:var(--_field-multiline-inset-label-background);inline-size:100%;block-size:3ex;filter:blur(2px);content:""}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .forge-field:not(.has-label) .label::after{display:none}.forge-field .input ::slotted(*){box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing);cursor:var(--_field-disableable-cursor)}.forge-field .input ::slotted(*)::placeholder{color:var(--_field-placeholder-color)}.forge-field .input ::slotted(textarea){resize:none}.forge-field .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-padding-inline-start)}.forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-padding-inline-end)}.forge-field .input ::slotted([data-forge-multi-input-separator]){align-self:center;padding-inline:4px;block-size:fit-content;inline-size:fit-content}.forge-field .label ::slotted(forge-label){font:inherit}.forge-field.has-start .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-inner-padding-inline)}.forge-field.has-end .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}.forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}.forge-field ::slotted(:where([slot=support-text],[slot=helper-text])){display:block;min-height:.875rem}:host([variant=plain]) .forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .forge-field.has-start .label{padding-inline-start:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .label ::slotted(*){max-inline-size:100%;overflow:hidden;text-overflow:ellipsis}:host([popover-icon]) .forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([popover-icon]) .forge-field .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:not(popover-icon)) .forge-field.has-accessory:not(:is(.has-end)) .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([multiline]) .input ::slotted(:is(input,textarea)){padding-block-start:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2);padding-block-end:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)}:host([multiline]) .accessory slot{align-items:center;block-size:var(--_field-height);display:flex;align-self:start}forge-focus-indicator{--forge-focus-indicator-color:var(--_field-focus-indicator-color);--forge-focus-indicator-outward-offset:calc(var(--_field-outline-width) * -1);--forge-focus-indicator-shape:var(--_field-shape);--forge-focus-indicator-width:var(--_field-focus-indicator-width)}:host([variant=plain]) forge-focus-indicator{--forge-focus-indicator-offset-inline:-4px}@media (prefers-reduced-motion:reduce){.forge-field{--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, 0s)}}',F1=class extends M{static get observedAttributes(){return Object.values(L.observedAttributes)}constructor(){super(),H(this,Zw,jw),this._core=new ni(new ai(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case L.attributes.LABEL_POSITION:this.labelPosition=o;break;case L.attributes.LABEL_ALIGNMENT:this.labelAlignment=o;break;case L.attributes.FLOAT_LABEL:this.floatLabel=p(o);break;case L.attributes.INVALID:this.invalid=p(o);break;case L.attributes.REQUIRED:this.required=p(o);break;case L.attributes.OPTIONAL:this.optional=p(o);break;case L.attributes.DISABLED:this.disabled=p(o);break;case L.attributes.VARIANT:this.variant=o;break;case L.attributes.THEME:this.theme=o;break;case L.attributes.SHAPE:this.shape=o;break;case L.attributes.DENSITY:this.density=o;break;case L.attributes.DENSE:this.dense=p(o);break;case L.attributes.POPOVER_ICON:this.popoverIcon=p(o);break;case L.attributes.POPOVER_EXPANDED:this.popoverExpanded=p(o);break;case L.attributes.MULTILINE:this.multiline=p(o);break;case L.attributes.SUPPORT_TEXT_INSET:this.supportTextInset=o;break;case L.attributes.FOCUS_INDICATOR_FOCUS_MODE:this.focusIndicatorFocusMode=o;break;case L.attributes.FOCUS_INDICATOR_ALLOW_FOCUS:this.focusIndicatorAllowFocus=p(o);break}}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};i([c()],F1.prototype,"labelPosition",2),i([c()],F1.prototype,"labelAlignment",2),i([c()],F1.prototype,"floatLabel",2),i([c()],F1.prototype,"invalid",2),i([c()],F1.prototype,"required",2),i([c()],F1.prototype,"optional",2),i([c()],F1.prototype,"disabled",2),i([c()],F1.prototype,"variant",2),i([c()],F1.prototype,"theme",2),i([c()],F1.prototype,"shape",2),i([c()],F1.prototype,"density",2),i([c()],F1.prototype,"dense",2),i([c()],F1.prototype,"popoverIcon",2),i([c()],F1.prototype,"popoverExpanded",2),i([c()],F1.prototype,"multiline",2),i([c()],F1.prototype,"supportTextInset",2),i([c()],F1.prototype,"focusIndicatorTargetElement",2),i([c()],F1.prototype,"focusIndicatorFocusMode",2),i([c()],F1.prototype,"focusIndicatorAllowFocus",2),F1=i([y({name:L.elementName,dependencies:[J]})],F1);var z2=class extends mt(M){static get observedAttributes(){return Object.values(Y.observedAttributes)}constructor(){super()}attributeChangedCallback(t,e,o){switch(t){case Y.observedAttributes.LABEL_POSITION:this.labelPosition=o;return;case Y.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=o;return;case Y.observedAttributes.INVALID:this.invalid=p(o);return;case Y.observedAttributes.REQUIRED:this.required=p(o);return;case Y.observedAttributes.OPTIONAL:this.optional=p(o);return;case Y.observedAttributes.DISABLED:this.disabled=p(o);return;case Y.observedAttributes.FLOAT_LABEL:this.floatLabel=p(o);return;case Y.observedAttributes.VARIANT:this.variant=o;return;case Y.observedAttributes.THEME:this.theme=o;return;case Y.observedAttributes.SHAPE:this.shape=o;return;case Y.observedAttributes.DENSITY:this.density=o;return;case Y.observedAttributes.DENSE:this.dense=p(o);return;case Y.observedAttributes.POPOVER_ICON:this.popoverIcon=p(o);return;case Y.observedAttributes.POPOVER_EXPANDED:this.popoverExpanded=p(o);return;case Y.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=o;return}}labelClickedCallback(){this._core.click()}labelChangedCallback(t){this._core.applyLabel(t)}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};i([c()],z2.prototype,"labelPosition",2),i([c()],z2.prototype,"labelAlignment",2),i([c()],z2.prototype,"invalid",2),i([c()],z2.prototype,"required",2),i([c()],z2.prototype,"optional",2),i([c()],z2.prototype,"disabled",2),i([c({name:"permanentlyFloatLabel"})],z2.prototype,"floatLabel",2),i([c()],z2.prototype,"variant",2),i([c()],z2.prototype,"theme",2),i([c()],z2.prototype,"shape",2),i([c()],z2.prototype,"density",2),i([c()],z2.prototype,"dense",2),i([c()],z2.prototype,"popoverIcon",2),i([c()],z2.prototype,"popoverExpanded",2),i([c()],z2.prototype,"supportTextInset",2);var ba=class extends I{setFieldProperty(t,e){this._fieldElement[t]=e}floatLabelWithoutAnimation(t){this._fieldElement.floatLabelWithoutAnimation(t)}};var ya=class{constructor(t){this._adapter=t;this._labelPosition=Y.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=Y.defaults.DEFAULT_LABEL_ALIGNMENT;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=Y.defaults.DEFAULT_VARIANT;this._theme=Y.defaults.DEFAULT_THEME;this._shape=Y.defaults.DEFAULT_SHAPE;this._density=Y.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._supportTextInset=Y.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._permanentlyFloatLabel=!1}get _hasValue(){return this._adapter.hasValue}get _hasPlaceholder(){return this._adapter.hasPlaceholder}click(){this._adapter.click()}applyLabel(t){this._adapter.applyLabel(t)}floatLabelWithoutAnimation(t){this._adapter.floatLabelWithoutAnimation(this._hasValue||this._hasPlaceholder||t)}_tryFloatLabel(t){if(!this._permanentlyFloatLabel){if(this._labelPosition!=="inset"){this._adapter.tryFloatLabel(!1);return}this._adapter.tryFloatLabel(t)}}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setFieldProperty("labelPosition",t),this._adapter.setHostAttribute(Y.attributes.LABEL_POSITION,t))}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setFieldProperty("labelAlignment",t),this._adapter.setHostAttribute(Y.attributes.LABEL_ALIGNMENT,t))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.setFieldProperty("invalid",t),this._adapter.toggleHostAttribute(Y.attributes.INVALID,t))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setFieldProperty("required",t),this._adapter.toggleHostAttribute(Y.attributes.REQUIRED,t))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.setFieldProperty("optional",t),this._adapter.toggleHostAttribute(Y.attributes.OPTIONAL,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setFieldProperty("disabled",t),this._adapter.toggleHostAttribute(Y.attributes.DISABLED,t))}get permanentlyFloatLabel(){return this._permanentlyFloatLabel}set permanentlyFloatLabel(t){this._permanentlyFloatLabel!==t&&(this._permanentlyFloatLabel=t,this._adapter.setFieldProperty("floatLabel",t||this._hasValue||this._hasPlaceholder),this._adapter.toggleHostAttribute(Y.attributes.FLOAT_LABEL,t))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setFieldProperty("variant",t),this._adapter.setHostAttribute(Y.attributes.VARIANT,t))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setFieldProperty("theme",t),this._adapter.setHostAttribute(Y.attributes.THEME,t))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setFieldProperty("shape",t),this._adapter.setHostAttribute(Y.attributes.SHAPE,t))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setFieldProperty("density",t),this._adapter.setHostAttribute(Y.attributes.DENSITY,t))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setFieldProperty("dense",t),this._adapter.toggleHostAttribute(Y.attributes.DENSE,t))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){this._popoverIcon!==t&&(this._popoverIcon=t,this._adapter.setFieldProperty("popoverIcon",t),this._adapter.toggleHostAttribute(Y.attributes.POPOVER_ICON,t))}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.setFieldProperty("popoverExpanded",t))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setFieldProperty("supportTextInset",t),this._adapter.setHostAttribute(Y.attributes.SUPPORT_TEXT_INSET,t))}};function s6(){f(F1)}var r6=`${b}text-field`,i6={SHOW_CLEAR:"show-clear"},Qw=d({},i6),Jw={FIELD:"#field",DEFAULT_SLOT:"slot:not([name])",LABEL_SLOT:"slot[name=label]",CLEAR_BUTTON_SLOT:"slot[name=clear-button]",FORGE_LABEL:a2.elementName,INPUT:":where(input:not([type=button], [type=checkbox], [type=color], [type=hidden], [type=image], [type=radio], [type=range], [type=reset], [type=submit]), textarea)"},tu=["disabled","placeholder"],eu={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},ou={CLEAR:`${r6}-clear`},E1={elementName:r6,observedAttributes:i6,attributes:Qw,selectors:Jw,observedInputAttributes:tu,tagNames:eu,events:ou};var si=class extends ba{constructor(e){super(e);this._inputElements=[];this._destroyValueChangerListeners=[];this._fieldElement=w(e,E1.selectors.FIELD),this._clearButtonSlotElement=w(e,E1.selectors.CLEAR_BUTTON_SLOT),this._defaultSlotElement=w(e,E1.selectors.DEFAULT_SLOT),this._labelSlotElement=w(e,E1.selectors.LABEL_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(L.parts).join(", ")),this._clearButtonSlotElement.remove()}get hasValue(){return this._inputElements.some(e=>!!e.value)}get hasPlaceholder(){return this._inputElements.some(e=>!!e.placeholder)}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=w(this._fieldElement,L.selectors.POPOVER_TARGET)),this._popoverTargetElement}addRootListener(e,o){this._fieldElement.addEventListener(e,o)}removeRootListener(e,o){this._fieldElement.removeEventListener(e,o)}disableInput(e){this._inputElements.forEach(o=>o.disabled=e)}inputIsDisabled(){return this._inputElements.some(e=>e.disabled)}click(){var e;(e=this._inputElements[0])==null||e.focus()}applyLabel(e){this._inputElements.forEach(o=>{G(o,!!e,"aria-label",e!=null?e:"")})}handleDefaultSlotChange(e){var a;(a=this._inputMutationObserver)==null||a.disconnect();let o=this._defaultSlotElement.assignedElements();o.length&&(this._inputElements=o.filter(s=>s.matches(E1.selectors.INPUT)),this._fieldElement.multiline=this._inputElements.some(s=>s.tagName===E1.tagNames.TEXTAREA),this._inputMutationObserver=new MutationObserver(s=>{s.forEach(r=>{if(r.attributeName){let h=r.target.getAttribute(r.attributeName),v=r.attributeName;e(v,h)}})}),this._inputElements.forEach(s=>{var r;(r=this._inputMutationObserver)==null||r.observe(s,{attributes:!0,attributeFilter:[...E1.observedInputAttributes]}),this._component.disabled&&(s.disabled=!0),Object.values(E1.observedInputAttributes).forEach(l=>{let h=l;e(h,s.getAttribute(h))})}))}tryAddValueChangeListener(e,o){this._destroyValueChangerListeners.forEach(a=>a()),this._destroyValueChangerListeners=this._inputElements.map(a=>r0(e,a,"value",o))}removeValueChangeListener(){this._destroyValueChangerListeners.forEach(e=>e())}tryFloatLabel(e){if(e!==void 0){this._fieldElement.floatLabel=e;return}this._fieldElement.floatLabel=this.hasValue||this.hasPlaceholder}tryConnectSlottedLabel(){var l;if(this._inputElements.length!==1||(l=this._inputElements[0].labels)!=null&&l.length)return;let e=this._inputElements[0],o=this._labelSlotElement.assignedElements({flatten:!0}),a=o.find(h=>h.matches(E1.selectors.FORGE_LABEL));if(a){a.forElement=this._component,a.clickTarget=e;return}let s=o.find(h=>h.tagName===E1.tagNames.LABEL);if(!s||s.control)return;let r=e.id||`forge-input-${V2()}`;e.id=r,s.htmlFor=r}connectClearButton(e){this._clearButtonSlotElement.addEventListener("click",e)}disconnectClearButton(e){this._clearButtonSlotElement.removeEventListener("click",e)}toggleClearButtonVisibility(e){e?this._fieldElement.append(this._clearButtonSlotElement):this._clearButtonSlotElement.remove()}clearInput(){this._inputElements.length&&(this._inputElements.forEach(e=>{e.value="",e.dispatchEvent(new Event("input"))}),this._inputElements[0].focus())}getAllSlotElements(){var e,o;return Array.from((o=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll("slot"))!=null?o:[])}};var ri=class extends ya{constructor(e){super(e);this._adapter=e;this._showClear=!1;this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onInputChange.bind(this);this._clearButtonClickListener=e=>this._onClearButtonClick(e)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._initializeSlots()}destroy(){this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeValueChangeListener()}get popoverTargetElement(){return this._adapter.popoverTargetElement}_initializeSlots(){this._adapter.getAllSlotElements().forEach(e=>this._handleSlotChange(e.name))}_onSlotChange(e){let o=e.target;this._handleSlotChange(o.name)}_handleSlotChange(e){switch(e){case"label":this._adapter.tryConnectSlottedLabel();break;case"":this._adapter.handleDefaultSlotChange(this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,o){switch(e){case"disabled":this.disabled=o!==null;break;case"placeholder":this._tryFloatLabel();break}}_onClearButtonClick(e){let o=new CustomEvent(E1.events.CLEAR,{bubbles:!0,cancelable:!0,composed:!0});this._adapter.dispatchHostEvent(o),o.defaultPrevented||this._adapter.clearInput()}_onInputChange(e){let o;Pl(e,InputEvent.name)&&e.target.type==="number"&&(e.data!=null||e.target.validity.badInput)&&(o=!0),this._syncValueChange({floatLabel:o})}_onValueChange(){this._syncValueChange()}_syncValueChange({floatLabel:e=void 0}={}){this._tryFloatLabel(e),this._toggleClearButtonVisibility()}_toggleClearButtonVisibility(){this._adapter.toggleClearButtonVisibility(this._showClear&&this._hasValue&&!this.disabled)}get showClear(){return this._showClear}set showClear(e){this._showClear!==e&&(this._showClear=e,this._adapter.toggleHostAttribute(E1.attributes.SHOW_CLEAR,e),e?this._adapter.connectClearButton(this._clearButtonClickListener):this._adapter.disconnectClearButton(this._clearButtonClickListener),this._toggleClearButtonVisibility())}get disabled(){return super.disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(L.attributes.DISABLED,e),this._adapter.setFieldProperty("disabled",e),this._adapter.disableInput(e),this._toggleClearButtonVisibility())}get labelPosition(){return super.labelPosition}set labelPosition(e){this._labelPosition!==e&&(this._labelPosition=e,this._adapter.toggleHostAttribute(L.attributes.LABEL_POSITION,!0,e),this._adapter.setFieldProperty("labelPosition",e),this._tryFloatLabel())}};var au='<template><forge-field id="field"><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><slot></slot><slot slot="end" name="end"></slot><slot slot="end" name="clear-button"><forge-icon-button tabindex="-1" dense><forge-icon name="clear"></forge-icon></forge-icon-button><forge-tooltip type="label"><slot name="clear-button-tooltip">Clear</slot></forge-tooltip></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',nu=":host{display:block}:host([hidden]){display:none}forge-field{display:contents}",x0=class extends z2{static get observedAttributes(){return[...Object.values(Y.observedAttributes),...Object.values(E1.observedAttributes)]}constructor(){super(),H(this,au,nu),this._core=new ri(new si(this)),X.define(pl)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case E1.attributes.SHOW_CLEAR:this.showClear=p(o);break}}get popoverTargetElement(){return this._core.popoverTargetElement}};i([c()],x0.prototype,"showClear",2),x0=i([y({name:E1.elementName,dependencies:[F1,i1,m1]})],x0);var ao=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(E1.elementName);return this._inputElement=this._buildInputElement(t),t.append(this._inputElement),t}_configure(){var t,e,o,a,s,r;(t=this._config.options)!=null&&t.label&&this._createLabel(this._config.options.label),(e=this._config.options)!=null&&e.startElement&&(this._config.options.startElement.slot="start",this._element.append(this._config.options.startElement)),(o=this._config.options)!=null&&o.leadingElement&&(this._config.options.leadingElement.slot="start",this._element.append(this._config.options.leadingElement)),(a=this._config.options)!=null&&a.endElement&&(this._config.options.endElement.slot="end",this._element.append(this._config.options.endElement)),(s=this._config.options)!=null&&s.trailingElement&&(this._config.options.trailingElement.slot="end",this._element.append(this._config.options.trailingElement)),(r=this._config.options)!=null&&r.accessoryElement&&(this._config.options.accessoryElement.slot="accessory",this._element.append(this._config.options.accessoryElement))}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){var e;if(t){this._labelElement?this._labelElement.textContent=t:this._createLabel(t);return}(e=this._labelElement)==null||e.remove(),this._labelElement=void 0}setSupportText(t){var e;if(t){this._supportTextElement||(this._supportTextElement=document.createElement("span"),this._supportTextElement.slot="support-text",this._element.append(this._supportTextElement)),this._supportTextElement.textContent=t;return}(e=this._supportTextElement)==null||e.remove(),this._supportTextElement=void 0}setHelperText(t){this.setSupportText(t)}setSupportTextEnd(t){var e;if(t){this._supportTextEndElement||(this._supportTextEndElement=document.createElement("span"),this._supportTextEndElement.slot="support-text-end",this._element.append(this._supportTextEndElement)),this._supportTextEndElement.textContent=t;return}(e=this._supportTextEndElement)==null||e.remove(),this._supportTextEndElement=void 0}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&(this._labelElement.htmlFor=this._config.options.id),this._element.append(this._labelElement)}_buildInputElement(t){var o,a,s,r,l;let e=document.createElement("input");return e.type=(a=(o=this._config.options)==null?void 0:o.type)!=null?a:"text",((s=this._config.options)==null?void 0:s.value)!==void 0&&(e.value=this._config.options.value),(r=this._config.options)!=null&&r.id&&(e.id=this._config.options.id),((l=this._config.options)==null?void 0:l.placeholder)!==void 0&&(e.placeholder=this._config.options.placeholder),t.append(e),e}};function l6(){f(x0)}var X5=`${b}chip-field`,c6={ADD_ON_BLUR:"add-on-blur"},su=d({},c6),ru={CONTAINER:".container",INPUT:"input",MEMBER_SLOT:"slot[name=member]",MEMBER:"[slot=member]"},iu={HAS_MEMBERS:"has-members"},lu={MEMBER_ADDED:`${X5}-member-added`,MEMBER_REMOVED:`${X5}-member-removed`},cu=["disabled","placeholder"],hu={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},u2={elementName:X5,observedAttributes:c6,attributes:su,selectors:ru,classes:iu,events:lu,observedInputAttributes:cu,tagNames:hu};var ii=class extends ba{get hasValue(){return!!this._component.querySelector(u2.selectors.MEMBER)||this.hasInputValue}get hasPlaceholder(){var t;return!!((t=this._inputElement)!=null&&t.placeholder)}get hasInputValue(){var t;return!!((t=this._inputElement)!=null&&t.value)}get inputHasFocus(){var t;return!!((t=this._inputElement)!=null&&t.matches(":focus"))}get inputElement(){return this._inputElement}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=w(this._fieldElement,L.selectors.POPOVER_TARGET)),this._popoverTargetElement}constructor(t){super(t),this._fieldElement=w(t,L.elementName),this._containerElement=w(t,u2.selectors.CONTAINER),this._memberSlot=w(t,u2.selectors.MEMBER_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(L.parts).join(", "))}initialize(){this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])")}addRootListener(t,e,o){this._fieldElement.addEventListener(t,e,o)}removeRootListener(t,e,o){this._fieldElement.removeEventListener(t,e,o)}addInputListener(t,e){var o;(o=this._inputElement)==null||o.addEventListener(t,e)}removeInputListener(t,e){var o;(o=this._inputElement)==null||o.removeEventListener(t,e)}clickInput(){var t;(t=this._inputElement)==null||t.click()}tryAddValueChangeListener(t,e){var o;(o=this._destroyValueChangerListener)==null||o.call(this),this._inputElement&&(this._destroyValueChangerListener=r0(t,this._inputElement,"value",e))}removeValueChangeListener(){var t;(t=this._destroyValueChangerListener)==null||t.call(this)}focusInput(){var t;(t=this._inputElement)==null||t.focus()}getSlottedMemberElements(){return this._memberSlot.assignedElements()}click(){this.focusInput()}applyLabel(t){this._inputElement&&G(this._inputElement,!!t,"aria-label",t!=null?t:"")}tryFloatLabel(t){if(t!==void 0){this._component.floatLabel=t;return}this._component.floatLabel=this.hasValue||this.hasPlaceholder}handleDefaultSlotChange(t,e){var a,s;(a=this._inputMutationObserver)==null||a.disconnect();let o=t.assignedElements();this._inputElement=o.find(r=>r.matches(u2.selectors.INPUT)),this._inputElement&&(this._component.disabled&&(this._inputElement.disabled=!0),this._inputMutationObserver=new MutationObserver(r=>{r.forEach(l=>{if(l.attributeName){let v=l.target.getAttribute(l.attributeName),m=l.attributeName;e(m,v)}})}),(s=this._inputMutationObserver)==null||s.observe(this._inputElement,{attributes:!0,attributeFilter:[...u2.observedInputAttributes]}),Object.values(u2.observedInputAttributes).forEach(r=>{let l=r;this._inputElement&&e(l,this._inputElement.getAttribute(l))}))}tryConnectSlottedLabel(t){if(!this._inputElement)return;let e=t.assignedElements({flatten:!0}),o=e.find(r=>r.matches(a2.elementName));if(o){o.forElement=this._component,o.clickTarget=this._inputElement;return}let a=e.find(r=>r.tagName===u2.tagNames.LABEL);if(!a||a.control)return;let s=this._inputElement.id||`forge-input-${V2()}`;this._inputElement.id=s,a.htmlFor=s}toggleContainerClass(t,e){this._containerElement.classList.toggle(t,e)}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t)}};var li=class extends ya{constructor(e){super(e);this._addOnBlur=!1;this._mouseDownListener=this._onMouseDown.bind(this);this._clickListener=this._onClick.bind(this);this._rootKeyDownListener=this._onRootKeyDown.bind(this);this._inputKeyDownListener=this._onKeyDown.bind(this);this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._blurListener=this._onBlur.bind(this)}initialize(){this._adapter.initialize(),this._adapter.addRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._rootKeyDownListener),this._adapter.addInputListener("keydown",this._inputKeyDownListener),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._addOnBlur&&this._adapter.addInputListener("blur",this._blurListener)}destroy(){this._adapter.removeRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._rootKeyDownListener),this._adapter.removeInputListener("keydown",this._inputKeyDownListener),this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeValueChangeListener()}_onBlur(e){let o=e.target;this._addOnBlur&&this._addMember(o),o.value=""}_onMouseDown(e){if(this._disabled||this._adapter.inputHasFocus){e.preventDefault(),e.stopPropagation();return}}_onClick(e){this._disabled||e.target!==this._adapter.inputElement&&(this._adapter.focusInput(),this._adapter.clickInput())}_onValueChange(){this._tryFloatLabel()}_onSlotChange(e){let o=e.target;switch(o.name){case"label":this._adapter.tryConnectSlottedLabel(o);break;case"member":this._adapter.toggleContainerClass(u2.classes.HAS_MEMBERS,o.assignedElements().length>0),this._adapter.tryFloatLabel(),this._adapter.getSlottedMemberElements().forEach(a=>a.tabIndex=-1);break;case"":this._adapter.handleDefaultSlotChange(o,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,o){switch(e){case"disabled":this.disabled=o!==null;break;case"placeholder":this._tryFloatLabel();break}}_onRootKeyDown({key:e}){if(!this._adapter.hasInputValue)switch(e){case"ArrowRight":this._focusNextMember();break;case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":this._removeMember();break}}_onKeyDown({target:e,key:o}){let a=e;switch(o){case"Enter":this._addMember(a);break;case"Escape":a.value="";break;case"Tab":this._addOnBlur||(a.value="");break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(!e.length||this._adapter.inputHasFocus))for(let o=0;o<e.length;o++){let a=e.at(o),s=e.at(o+1);if(a&&this._isMemberActive(a))if(s){s.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(e.length){if(this._adapter.inputHasFocus){e[e.length-1].focus();return}for(let o=0;o<e.length;o++){let a=e.at(o-1),s=e.at(o);if(s&&this._isMemberActive(s)&&a){a.focus();break}}}}_isMemberActive(e){return e.matches(":focus-within")}_getActiveMember(){var o;return(o=this._adapter.getSlottedMemberElements().find(a=>this._isMemberActive(a)))!=null?o:null}_addMember(e){let o=e.value.trim();o.length>0&&this._adapter.emitHostEvent(u2.events.MEMBER_ADDED,o),e.value=""}_removeMember(){let e=this._getActiveMember();e||(e=this._adapter.getSlottedMemberElements().at(-1)),e&&(this._focusNextMember(),this._adapter.emitHostEvent(u2.events.MEMBER_REMOVED,e))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){e=!!e,this._addOnBlur!==e&&(this._addOnBlur=e,this._adapter.isConnected&&(this._addOnBlur?this._adapter.addInputListener("blur",this._blurListener):this._adapter.removeInputListener("blur",this._blurListener)),this._adapter.toggleHostAttribute(u2.attributes.ADD_ON_BLUR,this._addOnBlur))}get popoverTargetElement(){return this._adapter.popoverTargetElement}get disabled(){return super.disabled}set disabled(e){this.disabled!==e&&(super.disabled=e,this._adapter.setDisabled(e))}};var vu=`${b}chip-set`,h6={VERTICAL:"vertical",TYPE:"type",DENSE:"dense",DISABLED:"disabled",INVALID:"invalid",THEME:"theme"},pu=d({},h6),mu={ROOT:".forge-chip-set"},nt={elementName:vu,observedAttributes:h6,attributes:pu,selectors:mu};var ci=`${b}chip`,v6={TYPE:"type",VALUE:"value",SELECTED:"selected",INVALID:"invalid",DISABLED:"disabled",DENSE:"dense",THEME:"theme",HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel"},du=d({},v6),gu={ROOT:".forge-chip",TRIGGER:"#trigger"},wu={DELETE:`${ci}-delete`,SELECT:`${ci}-select`,NAVIGATE:`${ci}-navigate`},uu={TYPE:"action",THEME:"primary"},g1={elementName:ci,observedAttributes:v6,attributes:du,selectors:gu,events:wu,defaults:uu};var _u='<div class="checkmark" aria-hidden="true"><svg viewBox="-2 -3 30 30"><path fill="none" stroke="black" d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></div>',hi=class extends I{constructor(e){super(e);this._component=e;this._rootElement=w(this._component,g1.selectors.ROOT),this._triggerElement=w(this._component,g1.selectors.TRIGGER),this._startSlotElement=w(this._component,"slot[name=start]"),this._focusIndicatorElement=w(this._component,w1.elementName),this._stateLayerElement=w(this._component,I1.elementName)}get removeButtonElement(){return this._removeButtonElement}get isAnchor(){return this._triggerElement.localName==="a"}clickTrigger(){this._triggerElement.click()}addRootListener(e,o){this._rootElement.addEventListener(e,o)}removeRootListener(e,o){this._rootElement.removeEventListener(e,o)}setAnchor(e){if(e){if(this._triggerElement.localName==="button"){let o=this._createAnchorElement();this._triggerElement=Qo(this._triggerElement,o)}}else if(this._triggerElement.localName==="a"){let o=this._createButtonElement();this._triggerElement=Qo(this._triggerElement,o)}this._stateLayerElement.targetElement!==this._triggerElement&&(this._stateLayerElement.targetElement=this._triggerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)}setAnchorProperty(e,o){this._triggerElement.localName==="a"&&this._triggerElement instanceof HTMLAnchorElement&&(this._triggerElement[e]=o)}setCheckmarkVisibility(e){e?(this._checkmarkElement||(this._checkmarkElement=D3(_u)),this._rootElement.insertBefore(this._checkmarkElement,this._rootElement.firstChild)):this._checkmarkElement&&this._checkmarkElement.isConnected&&this._checkmarkElement.remove()}setDisabled(e){if(this._triggerElement instanceof HTMLAnchorElement){this._focusIndicatorElement.isConnected||this._rootElement.append(this._focusIndicatorElement),this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement);return}this._removeButtonElement&&(this._removeButtonElement.disabled=e),this._triggerElement.disabled=e,this._triggerElement.tabIndex=e?-1:0,e?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setSelected(e){this._triggerElement instanceof HTMLAnchorElement||G(this._triggerElement,e,"aria-pressed",String(e))}toggleFieldVariant(e){e?(this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)):this._stateLayerElement.remove()}setDeleteButtonVisibility(e){var o;e?(this._removeButtonElement||(this._removeButtonElement=this._createRemoveButton()),this._rootElement.appendChild(this._removeButtonElement)):(o=this._removeButtonElement)==null||o.remove()}setStartSlotVisibility(e){this._startSlotElement.style.display=e?"":"none"}getChipSetState(){let e=null,o=Q4(this._component,a=>a&&a.nodeName===nt.elementName.toUpperCase());return o&&(e={type:o.type,disabled:o.disabled,dense:o.dense}),e}focusTrigger(e){this._triggerElement.focus(d({preventScroll:!0},e))}tryFocusRemoveButton(){this._removeButtonElement?this._removeButtonElement.focus({preventScroll:!0,focusVisible:!0}):this.focusTrigger()}clickRemoveButton(){var e;(e=this._removeButtonElement)==null||e.click()}animateStateLayer(){this._stateLayerElement.playAnimation()}_createRemoveButton(){let e=document.createElement("forge-icon-button");e.density="small",e.id="remove-button",e.classList.add("remove"),e.tabIndex=-1,e.setAttribute("aria-label",`Remove ${this._component.innerText}`),e.setAttribute("part","remove-button");let o=document.createElement("forge-icon");return o.name="close",e.appendChild(o),e}_createAnchorElement(){let e=document.createElement("a");return e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.href&&(e.href=this._component.href),this._component.target&&(e.target=this._component.target),this._component.download&&(e.download=this._component.download),this._component.rel&&(e.rel=this._component.rel),e}_createButtonElement(){let e=document.createElement("button");return e.type="button",e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.disabled&&(e.disabled=!0),this._component.selected&&e.setAttribute("aria-pressed","true"),e}};var vi=class{constructor(t){this._adapter=t;this._type=g1.defaults.TYPE;this._selected=!1;this._invalid=!1;this._disabled=!1;this._dense=!1;this._theme=g1.defaults.THEME;this._clickListener=this._onClick.bind(this);this._keydownListener=this._onKeydown.bind(this)}initialize(){this._attachListeners(),this._tryInheritChipSetState()}focus(t){this._adapter.focusTrigger(t)}focusRemoveButton(){var t;(t=this._adapter.removeButtonElement)==null||t.focus()}click(){this._adapter.clickTrigger()}_attachListeners(){this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._keydownListener)}_detachListeners(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._keydownListener)}_tryInheritChipSetState(){let t=this._adapter.getChipSetState();t&&(t.type!==void 0&&(this.type=t.type),t.disabled!==void 0&&(this.disabled=t.disabled),t.dense!==void 0&&(this.dense=t.dense))}_onClick(t){this._isRemoveButton(t)?(t.stopImmediatePropagation(),this._dispatchDeleteEvent()):this._handleSelectInteraction()}_onKeydown(t){switch(t.key){case"Delete":case"Backspace":this._type==="input"&&(t.preventDefault(),this._dispatchDeleteEvent());break;case"Enter":case" ":t.preventDefault(),this._isRemoveButton(t)?(t.stopImmediatePropagation(),t.key==="Enter"&&this._adapter.clickRemoveButton()):(this.click(),this._adapter.isAnchor&&this._adapter.animateStateLayer());break;case"ArrowLeft":case"ArrowRight":this._tryNavigate(t);break;case"Tab":this._type==="input"&&this._isRemoveButton(t)&&this._tryNavigate(t);break}}_tryNavigate(t){var o;if(this._type==="input"){if(!!((o=this._adapter.removeButtonElement)!=null&&o.matches(":focus"))){if(t.stopPropagation(),t.preventDefault(),t.key==="ArrowLeft"){this._adapter.focusTrigger();return}}else if(t.key==="ArrowRight"){this._adapter.tryFocusRemoveButton();return}}let e={direction:t.key==="ArrowRight"||t.key==="Tab"?"next":"previous"};this._adapter.dispatchHostEvent(new CustomEvent(g1.events.NAVIGATE,{bubbles:!0,detail:e}))}_isRemoveButton(t){return!!this._adapter.removeButtonElement&&t.composedPath().includes(this._adapter.removeButtonElement)}_handleSelectInteraction(){let t=this._selected;this._selected=!this._selected;let e=this._dispatchSelectEvent();this._selected=t;let o=["filter","choice","input"].includes(this._type);!e&&o&&(this._selected=!this._selected,this._applySelected())}_dispatchSelectEvent(){let t={selected:this._selected,value:this._value},e=new CustomEvent(g1.events.SELECT,{detail:t,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(e),e.defaultPrevented}_dispatchDeleteEvent(){let t={value:this._value};this._adapter.dispatchHostEvent(new CustomEvent(g1.events.DELETE,{detail:t,bubbles:!0}))}_applyType(){let t=this._type==="input"||this._type==="field";this._adapter.setDeleteButtonVisibility(t),this._adapter.setCheckmarkVisibility(this._type==="filter"),this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleFieldVariant(this._type!=="field"),this._applySelected(),this._adapter.setHostAttribute(g1.attributes.TYPE,this._type)}_applySelected(){this._adapter.setSelected(this._selected),this._type==="filter"&&this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleHostAttribute(g1.attributes.SELECTED,this._selected)}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,["action","choice","filter","input","field"].includes(this._type)||(this._type="action"),this._applyType())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._applySelected())}get invalid(){return this._invalid}set invalid(t){t=!!t,this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(g1.attributes.INVALID,t))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.isConnected&&(this._disabled?this._detachListeners():this._attachListeners()),this._adapter.toggleHostAttribute(g1.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(g1.attributes.DENSE,this._dense))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:g1.defaults.THEME,this._adapter.setHostAttribute(g1.attributes.THEME,this._theme))}get href(){return this._href}set href(t){var e;if(this._href!==t){this._href=t;let o=!!((e=this._href)!=null&&e.trim());this._adapter.setAnchor(o),o&&this._disabled&&this._adapter.setDisabled(!1),this._adapter.toggleHostAttribute(g1.attributes.HREF,o,this._href)}}get target(){return this._target}set target(t){var e;this._target!==t&&(this._target=t,this._adapter.setAnchorProperty("target",t),this._adapter.toggleHostAttribute(g1.attributes.TARGET,!!((e=this._target)!=null&&e.trim()),this._target))}get download(){return this._download}set download(t){var e;this._download!==t&&(this._download=t,this._adapter.setAnchorProperty("download",t),this._adapter.toggleHostAttribute(g1.attributes.DOWNLOAD,!!((e=this._download)!=null&&e.trim()),this._download))}get rel(){return this._rel}set rel(t){var e;this._rel!==t&&(this._rel=t,this._adapter.setAnchorProperty("rel",t),this._adapter.toggleHostAttribute(g1.attributes.REL,!!((e=this._rel)!=null&&e.trim()),this._rel))}};var xu='<template><div class="forge-chip" part="root"><button type="button" id="trigger" class="trigger" part="trigger"><slot name="start"><slot name="leading"></slot></slot><slot></slot><slot name="end"><slot name="trailing"></slot></slot></button><forge-focus-indicator target="trigger" part="focus-indicator"></forge-focus-indicator><forge-state-layer target="trigger" exportparts="surface:state-layer"></forge-state-layer></div></template>',fu=':host{display:inline-flex}:host([hidden]){display:none}.forge-chip{--_chip-background:var(--forge-chip-background, transparent);--_chip-color:var(--forge-chip-color, var(--forge-theme-primary, #3f51b5));--_chip-shape:var(--forge-chip-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_chip-spacing:var(--forge-chip-spacing, var(--forge-spacing-xsmall, 8px));--_chip-height:var(--forge-chip-height, 32px);--_chip-padding-inline:var(--forge-chip-padding-inline, var(--forge-spacing-small, 12px));--_chip-padding-block:var(--forge-chip-padding-block, 0);--_chip-cursor:var(--forge-chip-cursor, pointer);--_chip-icon-font-size:var(--forge-chip-icon-font-size, 1.5rem);--_chip-focus-indicator-color:var(--forge-chip-focus-indicator-color, var(--_chip-color));--_chip-disabled-opacity:var(--forge-chip-disabled-opacity, 0.38);--_chip-disabled-cursor:var(--forge-chip-disabled-cursor, not-allowed);--_chip-dense-height:var(--forge-chip-dense-height, 24px);--_chip-dense-padding-inline:var(--forge-chip-dense-padding-inline, var(--forge-spacing-xsmall, 8px));--_chip-dense-spacing:var(--forge-chip-dense-spacing, var(--forge-spacing-xxsmall, 4px));--_chip-dense-font-size:var(--forge-chip-dense-font-size, 0.75rem);--_chip-dense-font-weight:var(--forge-chip-dense-font-weight, normal);--_chip-dense-focus-indicator-offset:var(--forge-chip-dense-focus-indicator-offset, var(--forge-spacing-xxxsmall, 2px));--_chip-dense-icon-font-size:var(--forge-chip-dense-icon-font-size, 1.25rem);--_chip-remove-button-spacing:var(--forge-chip-remove-button-spacing, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-xxsmall, 4px));--_chip-remove-button-height-dense:var(--forge-chip-remove-button-height-dense, 18px);--_chip-remove-button-icon-size-dense:var(--forge-chip-remove-button-icon-size-dense, 16px);--_chip-remove-button-spacing-dense:var(--forge-chip-remove-button-spacing-dense, 0 var(--forge-spacing-xxxsmall, 2px));--_chip-selected-background:var(--forge-chip-selected-background, var(--forge-theme-primary, #3f51b5));--_chip-selected-color:var(--forge-chip-selected-color, var(--forge-theme-on-primary, #ffffff));--_chip-invalid-color:var(--forge-chip-invalid-color, var(--forge-theme-error, #b00020));--_chip-invalid-selected-background:var(--forge-chip-invalid-selected-background, var(--forge-theme-error, #b00020));--_chip-invalid-selected-color:var(--forge-chip-invalid-selected-color, var(--forge-theme-on-error, #ffffff));--_chip-border-width:var(--forge-chip-border-width, var(--forge-border-thin, 1px));--_chip-border-style:var(--forge-chip-border-style, solid);--_chip-border-color:var(--forge-chip-border-color, var(--_chip-color));--_chip-field-background:var(--forge-chip-field-background, var(--forge-theme-surface-container-low, #ebebeb));--_chip-field-color:var(--forge-chip-field-color, var(--forge-theme-on-surface-container-low, #000000));--_chip-field-shape:var(--forge-chip-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_chip-field-border-color:var(--forge-chip-field-border-color, transparent);--_chip-field-cursor:var(--forge-chip-field-cursor, default);--_chip-checkmark-size:var(--forge-chip-checkmark-size, 1.25em);--_chip-checkmark-color:var(--forge-chip-checkmark-color, var(--_chip-color));--_chip-checkmark-spacing:var(--forge-chip-checkmark-spacing, var(--forge-spacing-xsmall, 8px));--_chip-avatar-size:var(--forge-chip-avatar-size, 24px);--_chip-avatar-size-dense:var(--forge-chip-avatar-size-dense, 18px);--_chip-avatar-font-size:var(--forge-chip-avatar-font-size, 0.75rem);--_chip-avatar-font-size-dense:var(--forge-chip-avatar-font-size-dense, 0.5rem);--_chip-avatar-spacing:var(--forge-chip-avatar-spacing, calc(var(--forge-spacing-xsmall, 8px) * -1));--_chip-avatar-spacing-dense:var(--forge-chip-avatar-spacing-dense, calc(var(--forge-spacing-xxsmall, 4px) * -1));--_chip-transition-duration:var(--forge-chip-transition-duration, var(--forge-animation-duration-short3, 150ms));--_chip-transition-easing:var(--forge-chip-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_chip-checkmark-transition-delay:var(--forge-chip-checkmark-transition-delay, 50ms)}.forge-chip{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;height:var(--_chip-height);border-width:var(--_chip-border-width);border-style:var(--_chip-border-style);border-color:var(--_chip-border-color);border-radius:var(--_chip-shape);background:var(--_chip-background);color:var(--_chip-color);transition-property:background-color,color;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}.trigger{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;gap:var(--_chip-spacing);box-sizing:border-box;height:100%;padding-inline:var(--_chip-padding-inline);padding-block:var(--_chip-padding-block);cursor:var(--_chip-cursor);z-index:0;text-decoration:none;border:none;background:inherit;color:inherit;-webkit-tap-highlight-color:transparent;border-radius:var(--_chip-shape);outline:0}.remove{padding-inline:var(--_chip-remove-button-spacing);--forge-icon-button-focus-indicator-color:var(--_chip-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-focus-indicator-color);--forge-focus-indicator-shape:var(--_chip-shape)}forge-state-layer{--forge-state-layer-color:var(--_chip-color)}:host([dense]) .forge-chip{--_chip-height:var(--_chip-dense-height);--_chip-padding-inline:var(--_chip-dense-padding-inline);--_chip-spacing:var(--_chip-dense-spacing)}:host([dense]) .trigger{--forge-typography-button-font-size:var(--_chip-dense-font-size);--forge-typography-button-font-weight:var(--_chip-dense-font-weight)}:host([dense]) .remove{--_chip-remove-button-spacing:var(--_chip-remove-button-spacing-dense);--forge-icon-button-density-small-size:var(--_chip-remove-button-height-dense);--forge-icon-button-density-small-icon-size:var(--_chip-remove-button-icon-size-dense)}:host([dense]) forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_chip-dense-focus-indicator-offset)}:host([dense]) ::slotted(forge-avatar){--_chip-avatar-spacing:var(--_chip-avatar-spacing-dense);--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size-dense);--forge-avatar-size:var(--_chip-avatar-size-dense)}:host([dense]) ::slotted(:is([slot=start],[slot=leading],[slot=end],[slot=trailing])){--_chip-icon-font-size:var(--_chip-dense-icon-font-size)}:host(:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-selected-background);--_chip-color:var(--_chip-selected-color)}:host(:is([type=filter],[type=choice],[type=input])[selected]) forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-background)}:host([invalid]) .forge-chip{--_chip-color:var(--_chip-invalid-color)}:host([invalid]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-invalid-selected-background);--_chip-color:var(--_chip-invalid-selected-color)}:host([disabled]:not([href])) .forge-chip{opacity:var(--_chip-disabled-opacity)}:host([disabled]:not([href])) .trigger{cursor:var(--_chip-disabled-cursor)}::slotted(:not(forge-avatar):is([slot=start],[slot=leading],[slot=end],[slot=trailing])){font-size:var(--_chip-icon-font-size)}::slotted(forge-avatar:is([slot=start],[slot=leading])){margin-inline-start:var(--_chip-avatar-spacing)}::slotted(forge-avatar:is([slot=end],[slot=trailing])){margin-inline-end:var(--_chip-avatar-spacing)}::slotted(forge-avatar){--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size);--forge-avatar-size:var(--_chip-avatar-size)}:host([type=filter]) .checkmark{height:var(--_chip-checkmark-size)}:host([type=filter]) .checkmark svg{width:0;height:var(--_chip-checkmark-size);transition-property:width;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}:host([type=filter]) .checkmark svg path{stroke:var(--_chip-checkmark-color);transition-property:stroke-dashoffset;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing);stroke-width:2px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}:host([type=filter][selected]) .checkmark{padding-inline-start:var(--_chip-checkmark-spacing)}:host([type=filter][selected]) .checkmark svg{width:var(--_chip-checkmark-size)}:host([type=filter][selected]) .checkmark svg path{transition-delay:var(--_chip-checkmark-transition-delay);stroke-dashoffset:0}:host([type=input]) .trigger{padding-inline:var(--_chip-padding-inline) 0}:host([type=field]) .forge-chip{--_chip-background:var(--_chip-field-background);--_chip-color:var(--_chip-field-color);--_chip-border-color:var(--_chip-field-border-color);--_chip-shape:var(--_chip-field-shape);--_chip-cursor:var(--_chip-field-cursor)}:host([theme=secondary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_chip-border-color:var(--forge-chip-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary, #ffc107));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary-container-low, #fff8e1));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-tertiary, #3d5afe))}:host([theme=tertiary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary, #3d5afe));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success, #2e7d32));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success-container-low, #e6efe6));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=warning]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning, #d14900));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning-container-low, #f9e9e0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=error]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error, #b00020));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error-container-low, #f6e0e4));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=info]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info, #1565c0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info-container-low, #e3edf7));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info-container-low, #0b3768))}',H2=class extends M{static get observedAttributes(){return Object.values(g1.observedAttributes)}constructor(){super(),X.define(jo),H(this,xu,fu),this._core=new vi(new hi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case g1.attributes.TYPE:this.type=o;break;case g1.attributes.VALUE:this.value=o;break;case g1.attributes.SELECTED:this.selected=p(o);break;case g1.attributes.INVALID:this.invalid=p(o);break;case g1.attributes.DISABLED:this.disabled=p(o);break;case g1.attributes.DENSE:this.dense=p(o);break;case g1.attributes.THEME:this.theme=o;break;case g1.attributes.HREF:this.href=o;break;case g1.attributes.TARGET:this.target=o;break;case g1.attributes.DOWNLOAD:this.download=o;break;case g1.attributes.REL:this.rel=o;break}}focus(t){this._core.focus(t)}focusRemoveButton(){this._core.focusRemoveButton()}click(){this._core.click()}};i([c()],H2.prototype,"type",2),i([c()],H2.prototype,"value",2),i([c()],H2.prototype,"selected",2),i([c()],H2.prototype,"invalid",2),i([c()],H2.prototype,"disabled",2),i([c()],H2.prototype,"dense",2),i([c()],H2.prototype,"theme",2),i([c()],H2.prototype,"href",2),i([c()],H2.prototype,"target",2),i([c()],H2.prototype,"download",2),i([c()],H2.prototype,"rel",2),H2=i([y({name:g1.elementName,dependencies:[J,r1,i1,j]})],H2);function p6(){f(H2)}var bu='<template><div class="forge-chip-set" part="root"><slot></slot></div></template>',yu=":host{display:inline-block}:host([hidden]){display:none}.forge-chip-set{--_chip-set-spacing:var(--forge-chip-set-spacing, var(--forge-spacing-xsmall, 8px))}.forge-chip-set{display:flex;flex-wrap:wrap;gap:var(--_chip-set-spacing)}:host([vertical]) .forge-chip-set{flex-direction:column}",Ma=class extends M{constructor(){super();this._vertical=!1;this._type=g1.defaults.TYPE;this._dense=!1;this._disabled=!1;this._invalid=!1;this._theme=g1.defaults.THEME;H(this,bu,yu)}static get observedAttributes(){return Object.values(nt.observedAttributes)}connectedCallback(){this.addEventListener(g1.events.NAVIGATE,this._onChipNavigate.bind(this))}attributeChangedCallback(e,o,a){switch(e){case nt.observedAttributes.VERTICAL:this.vertical=p(a);break;case nt.observedAttributes.TYPE:this.type=a;break;case nt.observedAttributes.DENSE:this.dense=p(a);break;case nt.observedAttributes.DISABLED:this.disabled=p(a);break;case nt.observedAttributes.INVALID:this.invalid=p(a);break;case nt.observedAttributes.THEME:this.theme=a;break}}_onChipNavigate(e){let o=this._findChipDescendants().filter(l=>!l.disabled),a=o.findIndex(l=>l===e.target),s=e.detail.direction==="previous"?a-1:a+1;s>o.length-1&&(s=0);let r=o.at(s);(r==null?void 0:r.type)==="input"&&e.detail.direction==="previous"?r.focusRemoveButton():r==null||r.focus()}_findChipDescendants(){return Array.from(this.querySelectorAll(g1.elementName))}_syncChipsProperty(e,o){this._findChipDescendants().forEach(s=>s[e]=o)}get vertical(){return this._vertical}set vertical(e){e=!!e,this._vertical!==e&&(this._vertical=e,this.toggleAttribute(nt.attributes.VERTICAL,this._vertical))}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this._syncChipsProperty("type",this._type),this.setAttribute(nt.attributes.TYPE,this._type))}get dense(){return this._dense}set dense(e){e=!!e,this._dense!==e&&(this._dense=e,this._syncChipsProperty("dense",this._dense),this.toggleAttribute(nt.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(e){e=!!e,this._disabled!==e&&(this._disabled=e,this._syncChipsProperty("disabled",this._disabled),this.toggleAttribute(nt.attributes.DISABLED,this._disabled))}get invalid(){return this._invalid}set invalid(e){e=!!e,this._invalid!==e&&(this._invalid=e,this._syncChipsProperty("invalid",this._invalid),this.toggleAttribute(nt.attributes.INVALID,this._invalid))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._syncChipsProperty("theme",this._theme),this.setAttribute(nt.attributes.THEME,this._theme))}};Ma=i([y({name:nt.elementName,dependencies:[H2]})],Ma);function m6(){f(Ma)}var Mu='<template><forge-field id="field" multiline><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><div class="container" data-forge-field-input><slot name="member"></slot><slot></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',zu="@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){flex-grow:1;cursor:inherit;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing)}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000);--forge-chip-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-tertiary, #3d5afe)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-info, #1565c0)}",No=class extends z2{static get observedAttributes(){return[...Object.values(Y.observedAttributes),...Object.values(u2.observedAttributes)]}constructor(){super(),H(this,Mu,zu),this._core=new li(new ii(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case u2.attributes.ADD_ON_BLUR:this.addOnBlur=p(o);return}}get popoverTargetElement(){return this._core.popoverTargetElement}click(){this._core.click()}};i([c()],No.prototype,"addOnBlur",2),No=i([y({name:u2.elementName,dependencies:[F1,H2]})],No);var d6=class extends o2{constructor(t){super(t)}_build(){var e,o;let t=document.createElement(u2.elementName);return this._inputElement=this._buildInputElement(t),(e=this._config.options)!=null&&e.leadingElement&&(this._config.options.leadingElement.slot="leading",t.appendChild(this._config.options.leadingElement)),(o=this._config.options)!=null&&o.trailingElement&&(this._config.options.trailingElement.slot="trailing",t.appendChild(this._config.options.trailingElement)),t.appendChild(this._inputElement),t}_configure(){var t,e;(t=this._config.options)!=null&&t.helperText&&this.setHelperText(this._config.options.helperText),typeof((e=this._config.options)==null?void 0:e.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(t){var o,a,s,r,l;let e=document.createElement("input");return e.type=((o=this._config.options)==null?void 0:o.type)||"text",((a=this._config.options)==null?void 0:a.value)!==void 0&&(e.value=this._config.options.value),(s=this._config.options)!=null&&s.id&&(e.id=this._config.options.id),typeof((r=this._config.options)==null?void 0:r.placeholder)=="string"&&(e.placeholder=(l=this._config.options)==null?void 0:l.placeholder),t.appendChild(e),e}};function g6(){f(No)}var pi=`${b}autocomplete`,Hu={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},Iu={INPUT:"input",DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},Lu={DEFAULT_DEBOUNCE_TIME:sl,NUM_SKELETON_ITEMS:3},Vu={CHANGE:`${pi}-change`,SELECT:`${pi}-select`,SCROLLED_BOTTOM:`${pi}-scrolled-bottom`},c1={elementName:pi,attributes:Hu,selectors:Iu,numbers:Lu,events:Vu},w6=(e=>(e.Default="default",e.Stateless="stateless",e))(w6||{});var mi=class extends I{constructor(t){super(t),this.setInputElement()}get inputElement(){return this._inputElement}setInputElement(){let t=Re(this._component,c1.selectors.INPUT,!1);return t.length&&(this._inputElement=t[0]),this._inputElement}setInputAttribute(t,e){this._inputElement.setAttribute(t,e)}addInputListener(t,e){this._inputElement.addEventListener(t,e)}removeInputListener(t,e){this._inputElement.removeEventListener(t,e)}initializeInputAccessibility(t){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list"),Ge(),Yt(this._inputElement)}isWrappingChipField(){return!!this._component.querySelector(u2.elementName)}show(t,e){this._targetElement=this._getTargetElement(e),this._targetElement&&(this._listDropdown=new qe(this._targetElement,t),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._tryToggleDropdownIconRotation(!0))}async hide(t,{destroy:e=!1}={}){var a,s;if(this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),(a=this._inputElement)==null||a.removeAttribute("aria-activedescendant"),(s=this._inputElement)==null||s.setAttribute("aria-expanded","false"),Yt(this._inputElement),!this._listDropdown)return;let{anchorElement:o}=this._listDropdown.dropdownElement;o&&o instanceof HTMLElement&&(o==null||o.removeEventListener(Q.events.TOGGLE,t)),e?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(t){var e;(e=this._listDropdown)==null||e.setBusyVisibility(t)}setDismissListener(t){var e,o;(o=(e=this._listDropdown)==null?void 0:e.dropdownElement)==null||o.addEventListener(Q.events.TOGGLE,t)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}appendOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setSelectedText(t){this._inputElement.value=t}getInputValue(){return this._inputElement.value}setInputValue(t){this._inputElement.value=t}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}hasFocus(){let t=Ue(this._component.ownerDocument);return t===this._inputElement||this.isFocusWithinPopup(t)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(t,e){window.requestAnimationFrame(()=>{let o=this._component.querySelector(E1.elementName);if(o&&(o.popoverIcon||o.hasAttribute(L.attributes.POPOVER_ICON))){let s=t==="mousedown"?L.events.POPOVER_ICON_MOUSEDOWN:L.events.POPOVER_ICON_CLICK;this._component.addEventListener(s,e)}let a=this._component.querySelector(c1.selectors.DROPDOWN_ICON);a==null||a.addEventListener(t,e)})}removeDropdownIconListener(t,e){this._component.removeEventListener(L.events.POPOVER_ICON_CLICK,e);let o=this._component.querySelector(c1.selectors.DROPDOWN_ICON);o==null||o.removeEventListener(t,e)}setClearButtonListener(t,e){window.requestAnimationFrame(()=>{let o=this._component.querySelector(E1.elementName);o&&(o.showClear||o.hasAttribute(E1.attributes.SHOW_CLEAR))&&this._component.addEventListener(E1.events.CLEAR,e);let a=this._component.querySelector(c1.selectors.CLEAR_BUTTON);a&&a.addEventListener(t,e)})}removeClearButtonListener(t,e){this._component.removeEventListener(E1.events.CLEAR,e);let o=this._component.querySelector(c1.selectors.CLEAR_BUTTON);o==null||o.removeEventListener(t,e)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}updateActiveDescendant(t){this._targetElement&&G(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._targetElement||(this._targetElement=this._getTargetElement(t)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.dropdownElement)!=null?e:null}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:null}clearActiveOption(){var t;(t=this._listDropdown)==null||t.clearActiveOption()}setSelectedOptions(t){if(this._listDropdown){let e=t.map(o=>o.value);this._listDropdown.setSelectedValues(e)}}queueDropdownPositionUpdate(){this.getPopupElement()&&window.requestAnimationFrame(()=>{let t=this.getPopupElement();t==null||t.position()})}_getTargetElement(t){return t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let t=this._tryGetFieldLikeChild();return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(t){let e=this._tryGetFieldLikeChild();e!=null&&e.popoverIcon&&(e.popoverExpanded=t);let o=this._component.querySelector(c1.selectors.DROPDOWN_ICON);o&&(o.style.transition="transform 120ms linear",o.style.transform=t?"rotateZ(180deg)":"")}_tryGetFieldLikeChild(){let t=[E1.elementName,u2.elementName];return this._component.querySelector(`:is(${t.join(",")})`)}};var u6=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(u6||{});function Mn(n,t){let e=(s,r)=>Object.prototype.hasOwnProperty.call(s,r),o=n.some(s=>O(s)&&vt(s)&&e(s,"options")&&(e(s,"text")||e(s,"builder"))),a=n.some(s=>O(s)&&vt(s)&&e(s,"label")&&e(s,"value"));return o&&t===1||a&&t===0}function _6(n,t){return n.find(e=>e.value===t)}function zn(n,t,e=null){return e?!(e in n.value)||!(e in t)?!1:Wt(n.value[e],t[e]):Wt(n.value,t)}var di=class extends J0{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=c1.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=o=>this._onClick(o),this._focusListener=()=>this._onFocus(),this._blurListener=o=>this._onBlur(o),this._keydownListener=o=>this._onKeydown(o),this._dropdownIconClickListener=o=>this._onDropdownIconClick(o),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=o=>this._onDropdownIconMouseDown(o),this._clearButtonListener=o=>this._onClear(o),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=o=>this._adapter.updateActiveDescendant(o),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=V2()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}destroy(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._closeDropdown({destroy:!0})}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=O(this._debounce)&&this._debounce>0?Ne(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return Mn(this._options,1)?this._options.reduce((e,o)=>e.concat(o.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus?this._showDropdown():this._closeDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(c1.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!Q2.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let o=this._filterText,a=this._executeFilter();this._pendingFilterPromises.push(a),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await a}catch(s){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(o===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let s=this._pendingFilterPromises.indexOf(a);s!==-1&&this._pendingFilterPromises.splice(s,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":{let o=e.target,a=this._adapter.getInputValue(),s=o.value.substring(o.selectionStart,o.selectionEnd)===o.value,r=a.length===1&&o.selectionEnd===1,l=a.length===1&&o.selectionEnd===0,h=!a||s||r||l;!this._adapter.isWrappingChipField()&&h&&!this._multiple&&this._values.length&&this._clearValue();break}}}_executeFilter(e=!0,o=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let a=this._filter,s=e?this._filterText:"",r=o?this._getValue():null;return new Promise((l,h)=>Promise.resolve(a(s,r)).then(v=>{this._options=v,l(this._options)}).catch(v=>h(`An unexpected error occurred while filtering: ${v}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:o=!0,activateFirst:a=!1,activateSelected:s=!1}={}){if(!this._isInitialized||!this._adapter.hasInputElement())return;let r=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let l;if(this._optionBuilder){let v=this._optionBuilder;l=(m,u)=>v(m,this._filterText,u)}let h={options:this._options,referenceElement:this._adapter.inputElement,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:v=>{if(this._filterText){let m=Sl(v,this._filterText);if(m)return m}return v},allowBusy:!0,optionBuilder:l,optionLimit:this._optionLimit,popupClasses:this._popupClasses,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._popoverPlacement,popupOffset:this._popoverOffset,popupFlip:this._popoverFlip,popupShift:this._popoverShift,popupFallbackPlacements:this._popoverFallbackPlacements,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:v=>this._onSelect(v),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(h,this._popupTarget),this._adapter.toggleHostAttribute(c1.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(r)}catch(v){console.error(v)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:o,activateFirst:a,activateSelected:s})}_dropdownReady({userTriggered:e=!0,activateFirst:o=!1,activateSelected:a=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),a&&this._selectedOptions.length?this._adapter.activateSelectedOption():o&&this._adapter.activateFirstOption()}_closeDropdown({destroy:e=!1}={}){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener,{destroy:e}),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(c1.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&Mn(this._options,0)){let e=[],o=[];this._options.forEach(a=>{this._selectedOptions.find(s=>zn(s,a.value,this._matchKey))?e.push(a):o.push(a)}),this._options=[...e,...o]}}async _onSelect(e,o=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let s={value:e};this._adapter.emitHostEvent(c1.events.SELECT,s,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let a=()=>{let r=this._flatOptions.find(v=>zn(v,e,this._matchKey)),l=r?r.value:"",h=r?r.label:"";if(this._multiple){let v=_6(this._selectedOptions,l);if(v){let m=this._selectedOptions.indexOf(v);this._selectedOptions.splice(m,1)}else this._selectedOptions.push(r)}else O(l)?(this._selectedOptions[0]=r,this._filterText=h):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(v=>v.value),this._adapter.setSelectedText(this._getSelectedText()),!Q2.isMobile&&o&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?a():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):a()}_selectActiveOption(e=!0){let o=this._adapter.getActiveOptionIndex();if(typeof o=="number"&&o>=0){let a=this._flatOptions[o];a&&this._onSelect(a.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(c1.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,o;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(o=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?o:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(a=>a&&a.label).map(a=>a.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let o=[];this._selectedOptions=[],Array.isArray(e)?o=e:o=O(e)?[e]:[],!this._multiple&&o.length>1&&(o=[o[0]]),Mn(o,0)?(this._values=o.map(s=>s.value),this._selectedOptions=o):this._values=o;let a=this._flatOptions;if(o.length&&a.length&&this._updateSelectedOptions(o),this._values.length&&!this._selectedOptions.length&&this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(s){console.error(s)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let o=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),Mn(e,0))for(let a of e){let s=o.find(r=>zn(r,a.value,this._matchKey));s?this._selectedOptions.push(s):this._selectedOptions.push(a)}else for(let a of e){let s=o.find(r=>zn(r,a,this._matchKey));s?this._selectedOptions.push(s):this._allowUnmatched&&this._selectedOptions.push({label:a,value:a})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(c1.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(c1.attributes.MULTIPLE,O(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let o=[];e==null?o=[]:Array.isArray(e)?o=structuredClone(e):Ut(e)?o=[e]:o=[structuredClone(e)],(o.length!==this._values.length||o.some(s=>!this._values.includes(s)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(c1.attributes.FILTER_ON_FOCUS,O(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(c1.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,O(this._allowUnmatched)&&this._adapter.setHostAttribute(c1.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(c1.attributes.DEBOUNCE,O(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){this._isDropdownOpen&&(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var Cu="<template><slot></slot></template>",Eu=":host{display:block}:host([hidden]){display:none}",p2=class extends Q1{static get observedAttributes(){return[...Q1.observedAttributes,c1.attributes.MODE,c1.attributes.MULTIPLE,c1.attributes.DEBOUNCE,c1.attributes.FILTER_ON_FOCUS,c1.attributes.FILTER_FOCUS_FIRST,c1.attributes.ALLOW_UNMATCHED,c1.attributes.POPUP_TARGET,c1.attributes.OPEN,c1.attributes.MATCH_KEY,c1.attributes.FILTER_TEXT]}constructor(){super(),X.define([A0,S0,T0]),H(this,Cu,Eu),this._core=new di(new mi(this))}connectedCallback(){this.querySelector(c1.selectors.INPUT)?this._core.initialize():C0(this,c1.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case c1.attributes.MODE:this.mode=o;break;case c1.attributes.MULTIPLE:this.multiple=p(o);break;case c1.attributes.DEBOUNCE:this.debounce=K(o);break;case c1.attributes.FILTER_ON_FOCUS:this.filterOnFocus=p(o);break;case c1.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=p(o);break;case c1.attributes.ALLOW_UNMATCHED:this.allowUnmatched=p(o);break;case c1.attributes.POPUP_TARGET:this.popupTarget=o;break;case c1.attributes.OPEN:this.open=p(o);break;case c1.attributes.MATCH_KEY:this.matchKey=o;break;case c1.attributes.FILTER_TEXT:this.filterText=o;break}}appendOptions(t){this._core.appendOptions(t)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(t={preserveValue:!1}){this._core.forceFilter(t)}};i([c()],p2.prototype,"mode",2),i([c()],p2.prototype,"multiple",2),i([c()],p2.prototype,"value",2),i([c()],p2.prototype,"debounce",2),i([c()],p2.prototype,"filterOnFocus",2),i([c()],p2.prototype,"filterFocusFirst",2),i([c()],p2.prototype,"allowUnmatched",2),i([c()],p2.prototype,"popupTarget",2),i([c()],p2.prototype,"filterText",2),i([c()],p2.prototype,"optionBuilder",2),i([c()],p2.prototype,"filter",2),i([c()],p2.prototype,"selectedTextBuilder",2),i([c()],p2.prototype,"open",2),i([c()],p2.prototype,"matchKey",2),i([c({set:!1})],p2.prototype,"isInitialized",2),i([c({set:!1})],p2.prototype,"popupElement",2),i([c()],p2.prototype,"beforeValueChange",2),p2=i([y({name:c1.elementName,dependencies:[x0,R1,v2,j1,eo,Q0,ce,j]})],p2);var x6=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(c1.elementName);return this._attachTextField(t),t}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(c1.events.CHANGE,e=>t(e.detail))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var o,a,s,r,l,h;let e={props:d({},(a=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(r=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:r.options)};e.options||(e.options={}),((l=this._config.options)==null?void 0:l.useDropdownIcon)!==!1&&!((h=e.options)!=null&&h.trailingElement)&&(e.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new ao(e),t.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let t={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new U0(t).element}};function f6(){f(p2)}var Bu=`${b}backdrop`,b6={VISIBLE:"visible",FIXED:"fixed"},Au=d({},b6),Tu={ENTERING:"entering",EXITING:"exiting"},Su={ROOT:".forge-backdrop"},i2={elementName:Bu,observedAttributes:b6,attributes:Au,classes:Tu,selectors:Su};var ku='<template><div class="forge-backdrop" part="root"></div></template>',Ou="@keyframes enter{from{opacity:0}to{opacity:var(--_backdrop-opacity)}}@keyframes exit{from{opacity:var(--_backdrop-opacity)}to{opacity:0}}:host{display:contents}:host([hidden]){display:none}.forge-backdrop{--_backdrop-background:var(--forge-backdrop-background, #000);--_backdrop-opacity:var(--forge-backdrop-opacity, 0.54);--_backdrop-z-index:var(--forge-backdrop-z-index, var(--forge-z-index-backdrop, 7));--_backdrop-enter-animation-duration:var(--forge-backdrop-enter-animation-duration, var(--forge-animation-duration-short4, 200ms));--_backdrop-enter-animation-easing:var(--forge-backdrop-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_backdrop-exit-animation-duration:var(--forge-backdrop-exit-animation-duration, var(--forge-animation-duration-short1, 50ms));--_backdrop-exit-animation-easing:var(--forge-backdrop-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-backdrop{position:absolute;inset:0;z-index:var(--_backdrop-z-index);background:var(--_backdrop-background);opacity:0;animation-fill-mode:forwards}:host([fixed]) .forge-backdrop{position:fixed}:host([visible]) .forge-backdrop{opacity:var(--_backdrop-opacity)}:host([visible]) .forge-backdrop.entering{animation-name:enter;animation-duration:var(--_backdrop-enter-animation-duration);animation-timing-function:var(--_backdrop-enter-animation-easing)}:host([visible]) .forge-backdrop.exiting{animation-name:exit;animation-duration:var(--_backdrop-exit-animation-duration);animation-timing-function:var(--_backdrop-exit-animation-easing)}",Xe=class extends M{constructor(){super();this._visible=!1;this._fixed=!1;H(this,ku,Ou),this._rootElement=w(this,i2.selectors.ROOT)}static get observedAttributes(){return Object.values(i2.observedAttributes)}disconnectedCallback(){this._animationController&&(this._animationController.abort(),this._animationController=void 0),this.classList.remove(i2.classes.ENTERING,i2.classes.EXITING)}attributeChangedCallback(e,o,a){switch(e){case i2.attributes.VISIBLE:this.visible=p(a);break;case i2.attributes.FIXED:this.fixed=p(a);break}}async _applyVisibility(e,{animate:o}={animate:!0}){if(this._visible===e)return;if(this._visible=e,!this.isConnected)return this.toggleAttribute(i2.attributes.VISIBLE,this._visible),Promise.resolve();if(!o){this.toggleAttribute(i2.attributes.VISIBLE,this._visible);return}let a=this._visible,s=a?i2.classes.ENTERING:i2.classes.EXITING;this._animationController&&(this._animationController.abort(),this._rootElement.classList.remove(i2.classes.ENTERING,i2.classes.EXITING)),this._animationController=new AbortController;let r=new Promise(l=>{var h;this._rootElement.addEventListener("animationend",()=>{a||this.removeAttribute(i2.attributes.VISIBLE),this._rootElement.classList.remove(s),l()},{once:!0,signal:(h=this._animationController)==null?void 0:h.signal})});return a&&this.setAttribute(i2.attributes.VISIBLE,""),this._rootElement.classList.add(s),r}show(){this._applyVisibility(!0,{animate:!1})}hide(){this._applyVisibility(!1,{animate:!1})}fadeIn(){return this._applyVisibility(!0)}fadeOut(){return this._applyVisibility(!1)}get visible(){return this._visible}set visible(e){e=!!e,this._visible!==e&&this._applyVisibility(e)}get fixed(){return this._fixed}set fixed(e){e=!!e,this._fixed!==e&&(this._fixed=e,this.toggleAttribute(i2.attributes.FIXED,this._fixed))}};Xe=i([y({name:i2.elementName})],Xe);function y6(){f(Xe)}var Z5=`${b}banner`,M6={DISMISSED:"dismissed",PERSISTENT:"persistent",CAN_DISMISS:"can-dismiss",THEME:"theme"},Du=d({},M6),Pu={HAS_ICON:"has-icon",HAS_BUTTON:"has-button"},Nu={DISMISS_BUTTON:"[part=dismiss-button]",ICON_SLOT:"slot[name=icon]",BUTTON_SLOT:"slot[name=button]"},Ru={THEME:"info"},Fu={BEFORE_DISMISS:`${Z5}-before-dismiss`,DISMISSED:`${Z5}-dismissed`},I2={elementName:Z5,observedAttributes:M6,attributes:Du,classes:Pu,selectors:Nu,defaults:Ru,events:Fu};var gi=class extends I{constructor(e){super(e);this._rootElement=this._component;this._rootElement=w(e,".forge-banner"),this._dismissButtonElement=w(e,I2.selectors.DISMISS_BUTTON),this._iconSlotElement=w(e,I2.selectors.ICON_SLOT),this._buttonSlotElement=w(e,I2.selectors.BUTTON_SLOT)}initialize(){this._iconSlotElement.addEventListener("slotchange",this._onIconSlotChange.bind(this)),this._buttonSlotElement.addEventListener("slotchange",this._onButtonSlotChange.bind(this)),this._onIconSlotChange(),this._onButtonSlotChange()}setDismissButtonVisibility(e){this._dismissButtonElement.hidden=!e}addDismissListener(e){this._dismissButtonElement.addEventListener("click",e)}removeDismissListener(e){this._dismissButtonElement.removeEventListener("click",e)}setDismissed(e){this._rootElement.inert=e}async startDismissCompleteListener(){return new Promise(e=>{this._rootElement.addEventListener("transitionend",()=>e(),{once:!0})})}_onIconSlotChange(){this._rootElement.classList.toggle(I2.classes.HAS_ICON,this._iconSlotElement.assignedNodes().length>0)}_onButtonSlotChange(){this._rootElement.classList.toggle(I2.classes.HAS_BUTTON,this._buttonSlotElement.assignedNodes().length>0)}};var wi=class{constructor(t){this._adapter=t;this._dismissed=!1;this._persistent=!1;this._theme=I2.defaults.THEME;this._dismissListener=this._onDismiss.bind(this)}initialize(){this._adapter.initialize(),this._persistent||this._addDismissListener()}async _onDismiss(){if(this._dismissed||this._persistent)return;let t=this._dismissed;this._dismissed=!this._dismissed;let e=new CustomEvent(I2.events.BEFORE_DISMISS,{bubbles:!0,composed:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(e),this._dismissed=t,e.defaultPrevented)return;let o=this._adapter.startDismissCompleteListener();this.dismissed=!this._dismissed,await o,this._adapter.dispatchHostEvent(new CustomEvent(I2.events.DISMISSED,{bubbles:!0,composed:!0}))}_addDismissListener(){this._adapter.addDismissListener(this._dismissListener)}_removeDismissEventListener(){this._adapter.removeDismissListener(this._dismissListener)}_applyPersistent(){this._adapter.setDismissButtonVisibility(!this._persistent),this._persistent?this._removeDismissEventListener():this._addDismissListener()}get dismissed(){return this._dismissed}set dismissed(t){t=!!t,this.dismissed!==t&&(this._dismissed=t,this._adapter.setDismissed(this._dismissed),this._adapter.toggleHostAttribute(I2.attributes.DISMISSED,this.dismissed))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._applyPersistent(),this._adapter.toggleHostAttribute(I2.attributes.PERSISTENT,this._persistent))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:I2.defaults.THEME,this._adapter.setHostAttribute(I2.attributes.THEME,this._theme))}};var Uu='<template><div class="forge-banner" part="root"><div class="inner"><div class="container"><slot name="icon"></slot><slot></slot><div class="button-container"><slot name="button"></slot></div></div><div class="dismiss-button-container"><slot name="dismiss-button"><forge-icon-button part="dismiss-button"><forge-icon name="cancel"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="bottom"><slot name="dismiss-tooltip">Dismiss</slot></forge-tooltip></slot></div></div></div></template>',Wu=":host{display:block;container-type:inline-size}:host([hidden]){display:none}.forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-info-container, #c7daf0));--_banner-color:var(--forge-banner-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-info-container, #0b3768));--_banner-gap:var(--forge-banner-gap, var(--forge-spacing-small, 12px));--_banner-padding-inline:var(--forge-banner-padding-inline, var(--forge-spacing-large, 24px));--_banner-padding-block:var(--forge-banner-padding-block, var(--forge-spacing-small, 12px));--_banner-transition-duration:var(--forge-banner-transition-duration, var(--forge-animation-duration-short4, 200ms));--_banner-transition-easing:var(--forge-banner-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-banner{display:grid;grid-template-columns:1fr;grid-template-rows:1fr;overflow:hidden;box-sizing:border-box;transition-property:opacity,grid-template-rows,min-height;transition-duration:var(--_banner-transition-duration);transition-timing-function:var(--_banner-transition-easing);background:var(--_banner-background);color:var(--_banner-color);opacity:1}.forge-banner .inner{display:grid;grid-template-columns:1fr auto;place-items:center;gap:var(--_banner-gap);overflow:hidden;padding-inline:var(--_banner-padding-inline)}.forge-banner .container{display:flex;justify-content:center;align-items:center;gap:var(--_banner-gap);flex:1 1 auto;padding-block:var(--_banner-padding-block)}.forge-banner .dismiss-button-container{display:flex;align-items:center;gap:var(--_banner-gap)}.forge-banner ::slotted(forge-button[slot=dismiss-button]){--forge-button-primary-color:var(--_banner-color)}.forge-banner ::slotted(forge-icon-button[slot=dismiss-button]),.forge-banner forge-icon-button[part=dismiss-button]{color:var(--_banner-icon-color);--forge-icon-button-focus-indicator-color:var(--_banner-color)}::slotted(forge-button[slot=button]){--forge-button-primary-color:var(--_banner-color)}::slotted([slot=icon]){color:var(--_banner-icon-color)}:host([dismissed]) .forge-banner{grid-template-rows:0fr;opacity:0}:host([theme=primary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-primary-container, #d1d5ed));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-primary-container, #222c62))}:host([theme=secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-secondary-container, #fff0c3));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-secondary-container, #8a6804))}:host([theme=tertiary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-tertiary-container, #d0d7ff));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-tertiary-container, #213189))}:host([theme=success]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-success-container, #cde0ce));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-success-container, #19441b))}:host([theme=error]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=warning]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-warning-container, #f4d3c2));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-warning-container, #712700))}:host([theme=danger]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=info-secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-surface-container, #e0e0e0));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-surface-container, #000000))}@container (max-width:600px){.forge-banner.has-button .container{display:grid;grid-template-rows:[content] 1fr [button] auto;grid-template-columns:[content] 1fr;place-items:normal}.forge-banner.has-button.has-icon .container{grid-template-columns:[icon] auto [content] 1fr}.forge-banner.has-button .inner{place-items:normal}.forge-banner.has-button .button-container{grid-row:button;grid-column:content}.forge-banner.has-button .dismiss-button-container{align-items:flex-start}}",f0=class extends M{static get observedAttributes(){return Object.values(I2.observedAttributes)}constructor(){super(),X.define(hl),H(this,Uu,Wu),this._core=new wi(new gi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case I2.observedAttributes.DISMISSED:this.dismissed=p(o);break;case I2.observedAttributes.PERSISTENT:this.persistent=p(o);break;case I2.observedAttributes.CAN_DISMISS:this.persistent=p(o)===!1;break;case I2.observedAttributes.THEME:this.theme=o;break}}get canDismiss(){return!this.persistent}set canDismiss(t){this.persistent=!t}};i([c()],f0.prototype,"dismissed",2),i([c()],f0.prototype,"persistent",2),i([c()],f0.prototype,"theme",2),f0=i([y({name:I2.elementName,dependencies:[i1,m1]})],f0);function z6(){f(f0)}var no=`${b}dialog`,H6={OPEN:"open",VISIBLE:"visible",MODE:"mode",TYPE:"type",ANIMATION_TYPE:"animation-type",PRESET:"preset",PERSISTENT:"persistent",FULLSCREEN:"fullscreen",FULLSCREEN_THRESHOLD:"fullscreen-threshold",TRIGGER:"trigger",MOVEABLE:"moveable",MOVE_TARGET:"move-target",POSITION_STRATEGY:"position-strategy",PLACEMENT:"placement",SIZE_STRATEGY:"size-strategy",LABEL:"label",DESCRIPTION:"description"},Gu=d({},H6),qu={MOVED:"moved",MOVING:"moving"},Yu={DIALOG:".forge-dialog",SURFACE:".surface",MOVE_HANDLE:".move-handle",AUTOFOCUS:":is([autofocus],[forge-dialog-focus])",ACCESSIBLE_LABEL:"#forge-dialog-label",ACCESSIBLE_DESCRIPTION:"#forge-dialog-description"},Ku={BEFORE_CLOSE:`${no}-before-close`,OPEN:`${no}-open`,CLOSE:`${no}-close`,MOVE_START:`${no}-move-start`,MOVE:`${no}-move`,MOVE_END:`${no}-move-end`,FULLSCREEN_CHANGE:`${no}-fullscreen-change`},$u={MODE:"modal",TYPE:"dialog",ANIMATION_TYPE:"zoom",PRESET:"dialog",SIZE_STRATEGY:"content",POSITION_STRATEGY:"viewport",PLACEMENT:"center",FULLSCREEN_THRESHOLD:599},D={elementName:no,observedAttributes:H6,classes:qu,attributes:Gu,selectors:Yu,events:Ku,defaults:$u},ui=Symbol("hideBackdrop"),_i=Symbol("showBackdrop"),b0=Symbol("dialogStack");var xi=class extends I{get moveHandleElement(){return this._moveHandleElement}get surfaceElement(){return this._surfaceElement}constructor(t){super(t),this._dialogElement=w(t,D.selectors.DIALOG),this._accessibleLabelElement=w(t,D.selectors.ACCESSIBLE_LABEL),this._accessibleDescriptionElement=w(t,D.selectors.ACCESSIBLE_DESCRIPTION),this._surfaceElement=w(t,D.selectors.SURFACE),this._moveHandleElement=w(t,D.selectors.MOVE_HANDLE),this._backdropElement=w(t,i2.elementName),this._backdropElement.shadowRoot||window.customElements.upgrade(this._backdropElement)}destroy(){this._forceClose()}show(){if(this._dialogElement.open)return;this._component.type!=="dialog"&&this._dialogElement.setAttribute("role",this._component.type);let t=this._component.mode==="modal"||this._component.mode==="inline-modal";t||this._dialogElement.setAttribute("aria-modal","false"),t&&(this._component.animationType==="none"?this._backdropElement.show():this._backdropElement.fadeIn()),this._component.mode==="modal"?this._dialogElement.showModal():this._dialogElement.show(),t&&this._hideBackdrops(),B1[b0].add(this._component)}_hideBackdrops(){B1[b0].forEach(t=>t[ui]())}_showBackdropMostRecent(){var t;(t=Array.from(B1[b0]).filter(e=>e.mode==="modal"||e.mode==="inline-modal").at(-1))==null||t[_i]()}async hide(){if(this._component.animationType==="none")return this._forceClose(),Promise.resolve();this._backdropElement.fadeOut(),await Gt(this._surfaceElement,i2.classes.EXITING),this._forceClose()}addDialogFormSubmitListener(t){this._dialogElement.addEventListener("submit",t)}removeDialogFormSubmitListener(t){this._dialogElement.removeEventListener("submit",t)}addBackdropDismissListener(t){this._backdropElement.addEventListener("click",t)}removeBackdropDismissListener(t){this._backdropElement.removeEventListener("click",t)}tryAutofocus(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(!this._component.matches(":focus-within")&&(this._component.mode==="modal"&&this._dialogElement.focus(),this._component.open&&this._dialogElement.isConnected)){let e=this._component.querySelector(D.selectors.AUTOFOCUS);e==null||e.focus()}})})}tryLocateTriggerElement(t){if(!t){this.triggerElement=null;return}let e=this._component.getRootNode();this.triggerElement=e.querySelector(`#${t}`)}addTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.addEventListener("click",t)}removeTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.removeEventListener("click",t)}hideBackdrop(){this._backdropElement.fadeOut()}showBackdrop(){this._backdropElement.fadeIn()}addSurfaceClass(t){this._surfaceElement.classList.add(t)}removeSurfaceClass(t){this._surfaceElement.classList.remove(t)}addFullscreenListener(t,e){this._fullscreenMediaQuery=window.matchMedia(`(max-width: ${t}px)`),this._fullscreenMediaQuery.addEventListener("change",o=>e(o.matches)),!this._component.fullscreen&&this._fullscreenMediaQuery.matches&&e(!0)}removeFullscreenListener(t){var e;(e=this._fullscreenMediaQuery)==null||e.removeEventListener("change",o=>t(o.matches)),this._fullscreenMediaQuery=void 0}setAccessibleLabel(t){this._accessibleLabelElement.textContent=t}setAccessibleDescription(t){this._accessibleDescriptionElement.textContent=t}_forceClose(){this._surfaceElement.classList.remove(i2.classes.EXITING),this._dialogElement.close(),B1[b0].delete(this._component),this._showBackdropMostRecent()}};function I6(n=class{}){class t extends n{constructor(){super(...arguments);this._isMoving=!1;this._activeElement=void 0;this._movePointerDownListener=this._onMoveTargetPointerDown.bind(this);this._movePointerMoveListener=this._onMoveTargetPointerMove.bind(this);this._movePointerUpListener=this._onMoveTargetPointerUp.bind(this)}stopMoveListener(){this._updatePosition(null,null),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._isMoving=!1,this._moveContext=void 0,this._lastPosition=void 0,this._activeElement=void 0}_onMoveTargetPointerDown(a){a.preventDefault(),this._captureActiveElement();let s=this._getMoveableBounds();this._moveContext={top:a.pageY-s.top,left:a.pageX-s.left,height:s.height,width:s.width},document.addEventListener("pointermove",this._movePointerMoveListener),document.addEventListener("pointerup",this._movePointerUpListener)}_onMoveTargetPointerMove(a){a.preventDefault();let s=this._calculateOffsetPosition(a.pageX,a.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,this._onMoveStart()))return;let r=this._clampPosition(s,this._moveContext);if((!this._lastPosition||r.x!==this._lastPosition.x||r.y!==this._lastPosition.y)&&!this._onMove(r)){this._lastPosition=d({},r);let h=this._normalizePositionValue(r.x),v=this._normalizePositionValue(r.y);this._updatePosition(h,v)}}_onMoveTargetPointerUp(a){this._isMoving&&this._onMoveEnd(),this._moveComplete()}_moveComplete(){this._tryRestoreActiveElement(),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_captureActiveElement(){var a;this._activeElement=Ue(),(a=this._activeElement)==null||a.blur()}_tryRestoreActiveElement(){var a;(a=this._activeElement)!=null&&a.isConnected&&this._activeElement.focus(),this._activeElement=void 0}_normalizePositionValue(a){return O2(a)?`${a}px`:Ut(a)?a:null}_calculateOffsetPosition(a,s,r){var l,h;return{x:a-((l=r==null?void 0:r.left)!=null?l:0),y:s-((h=r==null?void 0:r.top)!=null?h:0)}}_clampPosition({x:a,y:s},r){let l=0,h=0;return r&&(l=r.width,h=r.height),a<=0?a=0:a+l>=window.innerWidth&&(a=window.innerWidth-l),s<=0?s=0:s+h>=window.innerHeight&&(s=window.innerHeight-h),{x:a,y:s}}}return t}var fi=class extends I6(Object){constructor(e){super();this._config=e;this._startMoveListener()}destroy(){this._stopMoveListener(),super.stopMoveListener()}_getMoveableBounds(){return this._config.surfaceElement.getBoundingClientRect()}_updatePosition(e,o){this._config.surfaceElement.style.top=o!=null?o:"",this._config.surfaceElement.style.left=e!=null?e:""}_onMoveStart(){return this._config.onMoveStart()}_onMove(e){return this._config.onMove(e)}_onMoveEnd(){this._config.onMoveEnd()}_startMoveListener(){this._config.handleElement.addEventListener("pointerdown",this._movePointerDownListener)}_stopMoveListener(){this._config.handleElement.removeEventListener("pointerdown",this._movePointerDownListener)}};var bi=class{constructor(t){this._adapter=t;this._open=!1;this._mode=D.defaults.MODE;this._type=D.defaults.TYPE;this._animationType=D.defaults.ANIMATION_TYPE;this._preset=D.defaults.PRESET;this._persistent=!1;this._fullscreen=!1;this._fullscreenThreshold=D.defaults.FULLSCREEN_THRESHOLD;this._trigger="";this._moveable=!1;this._label="";this._description="";this._sizeStrategy=D.defaults.SIZE_STRATEGY;this._placement=D.defaults.PLACEMENT;this._positionStrategy=D.defaults.POSITION_STRATEGY;this._escapeDismissListener=this._onEscapeDismiss.bind(this);this._backdropDismissListener=this._onBackdropDismiss.bind(this);this._dialogFormSubmitListener=this._onDialogFormSubmit.bind(this);this._triggerClickListener=this._onTriggerClick.bind(this);this._fullscreenListener=this._onFullscreenChange.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["mode","animationType","positionStrategy","sizeStrategy","persistent","moveable","fullscreenThreshold"]),this._trigger&&!this._adapter.triggerElement&&this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.triggerElement&&this._adapter.addTriggerInteractionListener(this._triggerClickListener),this._open&&this._applyOpen()}destroy(){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._moveController&&this._destroyMoveController(),this._release(),this._tryResetFullscreenValue(),this._adapter.destroy()}dispatchBeforeCloseEvent(t){let e=new CustomEvent(D.events.BEFORE_CLOSE,{cancelable:!0,bubbles:!0,composed:!0,detail:{reason:t}});return this._adapter.dispatchHostEvent(e),!e.defaultPrevented}hideBackdrop(){this._adapter.hideBackdrop()}showBackdrop(){this._adapter.showBackdrop()}_show(){this._adapter.show(),this._adapter.addDialogFormSubmitListener(this._dialogFormSubmitListener),zt.instance.add(this._adapter.hostElement),(this._mode==="modal"||this._mode==="inline-modal")&&this._adapter.addDocumentListener("keydown",this._escapeDismissListener,{capture:!0}),this._persistent||this._adapter.addBackdropDismissListener(this._backdropDismissListener),this._moveable&&!this._fullscreen&&this._initializeMoveController(),!this._fullscreen&&this._fullscreenThreshold>0&&(this._originalFullscreenValue=this._fullscreen,this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.dispatchHostEvent(new CustomEvent(D.events.OPEN,{bubbles:!0,composed:!0}))}async _hide(){this._release(),await this._adapter.hide(),this._tryResetFullscreenValue(),this._moveController&&this._destroyMoveController(),this._adapter.dispatchHostEvent(new CustomEvent(D.events.CLOSE,{bubbles:!0,composed:!0}))}_release(){this._adapter.removeDialogFormSubmitListener(this._dialogFormSubmitListener),this._adapter.removeDocumentListener("keydown",this._escapeDismissListener,{capture:!0}),this._adapter.removeBackdropDismissListener(this._backdropDismissListener),zt.instance.remove(this._adapter.hostElement)}_tryResetFullscreenValue(){typeof this._originalFullscreenValue=="boolean"&&(this.fullscreen=this._originalFullscreenValue),this._originalFullscreenValue=void 0}async _applyOpen(){this._open?(this._show(),this._adapter.tryAutofocus()):await this._hide(),this._adapter.toggleHostAttribute(D.attributes.VISIBLE,this._open),this._adapter.toggleHostAttribute(D.attributes.OPEN,this._open)}_onEscapeDismiss(t){t.key!=="Escape"||!zt.instance.isMostRecent(this._adapter.hostElement)||(t.preventDefault(),this._persistent||this._tryClose("escape"))}_onBackdropDismiss(){this._tryClose("backdrop")}_onDialogFormSubmit(t){var o,a;t.stopPropagation(),(((o=t.submitter)==null?void 0:o.getAttribute("formmethod"))==="dialog"||((a=t.target)==null?void 0:a.getAttribute("method"))==="dialog")&&this._tryClose("submit")}_onFullscreenChange(t){this.fullscreen=t;let e=new CustomEvent(D.events.FULLSCREEN_CHANGE,{bubbles:!0,composed:!0,detail:t});this._adapter.dispatchHostEvent(e)}_tryClose(t){this.dispatchBeforeCloseEvent(t)&&(this.open=!1)}_onTriggerClick(t){this.open=!this._open}_initializeMoveController(){if(this._moveController)return;let t=()=>{let r=new CustomEvent(D.events.MOVE_START,{cancelable:!0});return this._adapter.dispatchHostEvent(r),r.defaultPrevented},e=r=>{let l=new CustomEvent(D.events.MOVE,{detail:r,cancelable:!0});return this._adapter.dispatchHostEvent(l),l.defaultPrevented||(this._adapter.addSurfaceClass(D.classes.MOVED),this._adapter.addSurfaceClass(D.classes.MOVING)),l.defaultPrevented},o=()=>{let r=new CustomEvent(D.events.MOVE_END);this._adapter.removeSurfaceClass(D.classes.MOVING),this._adapter.dispatchHostEvent(r)},{moveHandleElement:a,surfaceElement:s}=this._adapter;this._moveController=new fi({handleElement:a,surfaceElement:s,onMoveStart:t,onMove:e,onMoveEnd:o})}_destroyMoveController(){var t;this._adapter.removeSurfaceClass(D.classes.MOVED),(t=this._moveController)==null||t.destroy(),this._moveController=void 0}_applyMoveable({enabled:t}={enabled:this._moveable}){t?this._initializeMoveController():this._destroyMoveController()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get mode(){return this._mode}set mode(t){this._mode!==t&&(this._mode=t,this._adapter.setHostAttribute(D.attributes.MODE,this._mode))}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,this._adapter.setHostAttribute(D.attributes.TYPE,this._type))}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._adapter.setHostAttribute(D.attributes.ANIMATION_TYPE,this._animationType))}get preset(){return this._preset}set preset(t){this._preset!==t&&(this._preset=t,this._adapter.setHostAttribute(D.attributes.PRESET,this._preset))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.isConnected&&this._open&&(this._persistent?this._adapter.removeBackdropDismissListener(this._backdropDismissListener):this._adapter.addBackdropDismissListener(this._backdropDismissListener)),this._adapter.toggleHostAttribute(D.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){t=!!t,this._fullscreen!==t&&(this._fullscreen=t,this._applyMoveable({enabled:!this._fullscreen}),this._adapter.toggleHostAttribute(D.attributes.FULLSCREEN,this._fullscreen))}get fullscreenThreshold(){return this._fullscreenThreshold}set fullscreenThreshold(t){this._fullscreenThreshold!==t&&(this._fullscreenThreshold=t,this._adapter.isConnected&&this._open&&!this._fullscreen&&this._fullscreenThreshold>0&&(this._adapter.removeFullscreenListener(this._fullscreenListener),this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.setHostAttribute(D.attributes.FULLSCREEN_THRESHOLD,this._fullscreenThreshold.toString()))}get trigger(){var t;return(t=this._trigger)!=null?t:""}set trigger(t){this._trigger!==t&&(this._trigger=t,this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._adapter.isConnected&&(this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.addTriggerInteractionListener(this._triggerClickListener)),this._adapter.setHostAttribute(D.attributes.TRIGGER,this._trigger))}get triggerElement(){return this._adapter.triggerElement}set triggerElement(t){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._trigger&&(this._trigger=""),this._adapter.triggerElement=t,this._adapter.isConnected&&this._adapter.addTriggerInteractionListener(this._triggerClickListener)}get moveable(){return this._moveable}set moveable(t){t=!!t,this._moveable!==t&&(this._moveable=t,this._adapter.isConnected&&this._open&&this._applyMoveable(),this._adapter.toggleHostAttribute(D.attributes.MOVEABLE,this._moveable))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setAccessibleLabel(this._label))}get description(){return this._description}set description(t){this._description!==t&&(this._description=t,this._adapter.setAccessibleDescription(this._description))}get positionStrategy(){return this._positionStrategy}set positionStrategy(t){this._positionStrategy!==t&&(this._positionStrategy=t,this._adapter.setHostAttribute(D.attributes.POSITION_STRATEGY,this._positionStrategy))}get sizeStrategy(){return this._sizeStrategy}set sizeStrategy(t){this._sizeStrategy!==t&&(this._sizeStrategy=t,this._adapter.setHostAttribute(D.attributes.SIZE_STRATEGY,this._sizeStrategy))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(D.attributes.PLACEMENT,this._placement))}};var Xu='<template><dialog class="forge-dialog" part="root" aria-labelledby="forge-dialog-label" aria-describedby="forge-dialog-description"><div id="forge-dialog-label" class="visually-hidden"></div><div id="forge-dialog-description" class="visually-hidden"></div><forge-backdrop exportparts="root:backdrop"></forge-backdrop><div class="surface" part="surface"><div class="move-handle-container" part="move-handle-container"><div class="move-handle" part="move-handle"><slot name="move-handle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" part="move-handle-icon"><path d="M3 15v-2h2v2H3m0-4V9h2v2H3m4 4v-2h2v2H7m0-4V9h2v2H7m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2z"/></svg></slot></div></div><slot></slot></div></dialog></template>',Zu="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}@layer base,nonmodal,animation,placement,size-strategy,preset,fullscreen,position-strategy,media; @layer base{:host{display:none;--forge-theme-surface:var(--forge-theme-surface-bright, #ffffff)}:host([hidden]){display:none}::slotted(forge-scaffold){height:auto}.forge-dialog{--_dialog-background:var(--forge-dialog-background, var(--forge-theme-surface-bright, #ffffff));--_dialog-shape:var(--forge-dialog-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_dialog-elevation:var(--forge-dialog-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));--_dialog-spacing:var(--forge-dialog-spacing, auto);--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, var(--_dialog-spacing));--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, var(--_dialog-spacing));--_dialog-inline-start-spacing:var(--forge-dialog-inline-start-spacing, var(--_dialog-spacing));--_dialog-inline-end-spacing:var(--forge-dialog-inline-end-spacing, var(--_dialog-spacing));--_dialog-padding:var(--forge-dialog-padding, 0);--_dialog-width:var(--forge-dialog-width, fit-content);--_dialog-height:var(--forge-dialog-height, fit-content);--_dialog-min-width:var(--forge-dialog-min-width, 0);--_dialog-max-width:var(--forge-dialog-max-width, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-min-height:var(--forge-dialog-min-height, 0);--_dialog-max-height:var(--forge-dialog-max-height, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-z-index:var(--forge-dialog-z-index, var(--forge-z-index-dialog, 8));--_dialog-move-handle-color:var(--forge-dialog-move-handle-color, currentColor);--_dialog-move-handle-size:var(--forge-dialog-move-handle-size, 24px);--_dialog-move-handle-hover-cursor:var(--forge-dialog-move-handle-hover-cursor, grab);--_dialog-move-handle-active-cursor:var(--forge-dialog-move-handle-active-cursor, grabbing);--_dialog-move-handle-spacing:var(--forge-dialog-move-handle-spacing, calc(var(--forge-spacing-xxsmall, 4px) * -1) 0 0);--_dialog-move-transition-duration:var(--forge-dialog-move-transition-duration, var(--forge-animation-duration-short4, 200ms));--_dialog-move-transition-easing:var(--forge-dialog-move-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-moving-opacity:var(--forge-dialog-moving-opacity, 0.54);--_dialog-enter-animation-duration:var(--forge-dialog-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-enter-animation-easing:var(--forge-dialog-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-exit-animation-duration:var(--forge-dialog-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-exit-animation-easing:var(--forge-dialog-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_dialog-zoom-opacity:var(--forge-dialog-zoom-opacity, 0);--_dialog-zoom-scale:var(--forge-dialog-zoom-scale, 0.8);--_dialog-fade-opacity:var(--forge-dialog-fade-opacity, 0);--_dialog-slide-opacity:var(--forge-dialog-slide-opacity, 0);--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -30%);--_dialog-backdrop-opacity:var(--forge-dialog-backdrop-opacity, var(--forge-backdrop-opacity, 0.54));--_dialog-nonmodal-elevation:var(--forge-dialog-nonmodal-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_dialog-fullscreen-enter-animation-duration:var(--forge-dialog-fullscreen-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-fullscreen-exit-animation-duration:var(--forge-dialog-fullscreen-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-position-x:var(--forge-dialog-position-x, 0);--_dialog-position-y:var(--forge-dialog-position-y, 0);--_dialog-preset-sheet-enter-animation-duration:var(--forge-dialog-preset-sheet-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-preset-sheet-exit-animation-duration:var(--forge-dialog-preset-sheet-exit-animation-duration, var(--forge-animation-duration-short3, 150ms))}.forge-dialog{position:fixed;inset:0;z-index:var(--_dialog-z-index);background-color:transparent;color:inherit;border:none;width:auto;height:auto;padding:0;margin:0;overflow:visible;max-width:100%;max-height:100%;box-sizing:border-box}.container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.surface{position:absolute;inset:0;display:flex;background:var(--_dialog-background);box-shadow:var(--_dialog-elevation);z-index:var(--_dialog-z-index);overflow:hidden;border-radius:var(--_dialog-shape);margin-block-start:var(--_dialog-block-start-spacing);margin-block-end:var(--_dialog-block-end-spacing);margin-inline-start:var(--_dialog-inline-start-spacing);margin-inline-end:var(--_dialog-inline-end-spacing);padding:var(--_dialog-padding);width:var(--_dialog-width);height:var(--_dialog-height);min-width:var(--_dialog-min-width);max-width:var(--_dialog-max-width);min-height:var(--_dialog-min-height);max-height:var(--_dialog-max-height);box-sizing:border-box}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}dialog.forge-dialog::backdrop{display:none}forge-backdrop{--forge-backdrop-opacity:var(--_dialog-backdrop-opacity);--forge-backdrop-enter-animation-duration:var(--_dialog-enter-animation-duration);--forge-backdrop-enter-animation-easing:var(--_dialog-enter-animation-easing);--forge-backdrop-exit-animation-duration:var(--_dialog-exit-animation-duration);--forge-backdrop-exit-animation-easing:var(--_dialog-exit-animation-easing)}:host(:not([moveable])) .move-handle{display:none}:host([moveable]:not([fullscreen])) .surface{user-select:none;transition-property:opacity;transition-duration:var(--_dialog-move-transition-duration);transition-timing-function:var(--_dialog-move-transition-easing)}:host([moveable]:not([fullscreen])) .surface:not(:hover) .move-handle-container{display:none}:host([moveable]:not([fullscreen])) .surface.moved{margin:0}:host([moveable]:not([fullscreen])) .surface.moving{opacity:var(--_dialog-moving-opacity)}:host([moveable]:not([fullscreen])) .move-handle-container{position:absolute;top:0;z-index:1;display:flex;justify-content:center;width:100%}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle{fill:var(--_dialog-move-handle-color);height:var(--_dialog-move-handle-size);width:var(--_dialog-move-handle-size);margin:var(--_dialog-move-handle-spacing);touch-action:none}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:hover{cursor:var(--_dialog-move-handle-hover-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:active{cursor:var(--_dialog-move-handle-active-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle svg{fill:currentColor}:host([visible]){display:contents}}@layer nonmodal{:host([mode=nonmodal]) .forge-dialog{pointer-events:none}:host([mode=nonmodal]) .container{display:contents}:host([mode=nonmodal]) .surface{--_dialog-elevation:var(--_dialog-nonmodal-elevation);pointer-events:all}:host([mode=nonmodal]) forge-backdrop{display:none}}@layer animation{:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface{animation-duration:var(--_dialog-enter-animation-duration);animation-timing-function:var(--_dialog-enter-animation-easing)}:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface.exiting{animation-duration:var(--_dialog-exit-animation-duration);animation-timing-function:var(--_dialog-exit-animation-easing)}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-zoom-in}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-zoom-out}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-fade-in}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-fade-out}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-slide-out}}@layer placement{:host([placement=custom]) .surface{margin:0;top:var(--_dialog-position-x);left:var(--_dialog-position-y)}:host([placement=top]) .surface{--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, 0);top:0;bottom:auto}:host([placement=top-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:auto;right:0;bottom:auto}:host([placement=top-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:0;right:auto;bottom:auto}:host([placement=bottom]) .surface{--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, 0);top:auto;bottom:0}:host([placement=bottom-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:auto;right:0;bottom:0}:host([placement=bottom-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:0;right:auto;bottom:0}}@layer size-strategy{:host([size-strategy=container-inline]) .surface{width:100%}:host([size-strategy=container-block]) .surface{height:100%}}@layer preset{:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-preset-sheet-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-preset-sheet-exit-animation-duration)}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface.exiting{animation-name:forge-dialog-slide-out}:host(:is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{--_dialog-max-width:var(--forge-dialog-max-width, none);--_dialog-max-height:var(--forge-dialog-max-height, none);inset:auto;display:inline-flex}:host([preset=left-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, -100% 0)}:host([preset=left-sheet]) .surface{left:0;bottom:0;top:0;height:100%;border-top-left-radius:0;border-bottom-left-radius:0}:host([preset=right-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 100% 0)}:host([preset=right-sheet]) .surface{right:0;bottom:0;top:0;height:100%;border-top-right-radius:0;border-bottom-right-radius:0}:host([preset=top-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -100%)}:host([preset=top-sheet]) .surface{top:0;left:0;right:0;border-top-left-radius:0;border-top-right-radius:0}:host([preset=bottom-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 100%)}:host([preset=bottom-sheet]) .surface{bottom:0;left:0;right:0;border-bottom-left-radius:0;border-bottom-right-radius:0}}@layer fullscreen{:host([fullscreen]) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-fullscreen-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-fullscreen-exit-animation-duration)}:host([fullscreen]) .surface{height:100%;width:100%;max-width:none;max-height:none;border-radius:0;box-shadow:none}:host([fullscreen]) forge-backdrop{display:none}}@layer position-strategy{:host([position-strategy=viewport]) .forge-dialog{position:fixed}:host([position-strategy=container]) .forge-dialog{position:absolute}:host([position-strategy=container][preset$=-sheet]) .forge-dialog{contain:content}}@layer media{@media (prefers-reduced-motion:reduce){.surface{animation-name:forge-dialog-fade-in}.surface.exiting{animation-name:forge-dialog-fade-out}}}",L6,B1=class extends V1(L1(M)){static get observedAttributes(){return Object.values(D.observedAttributes)}[(L6=b0,ui)](){this._core.hideBackdrop()}[_i](){this._core.showBackdrop()}[O0](t){return this._core.dispatchBeforeCloseEvent("dismiss")}constructor(){super(),H(this,Xu,Zu),this._core=new bi(new xi(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case D.observedAttributes.OPEN:this.open=p(o);break;case D.observedAttributes.MODE:this.mode=o!=null?o:D.defaults.MODE;break;case D.observedAttributes.TYPE:this.type=o!=null?o:D.defaults.TYPE;break;case D.observedAttributes.ANIMATION_TYPE:this.animationType=o!=null?o:D.defaults.ANIMATION_TYPE;break;case D.observedAttributes.PRESET:this.preset=o!=null?o:D.defaults.PRESET;break;case D.observedAttributes.PERSISTENT:this.persistent=p(o);break;case D.observedAttributes.FULLSCREEN:this.fullscreen=p(o);break;case D.observedAttributes.FULLSCREEN_THRESHOLD:this.fullscreenThreshold=o==null?D.defaults.FULLSCREEN_THRESHOLD:K(o);break;case D.observedAttributes.TRIGGER:this.trigger=o;break;case D.observedAttributes.MOVEABLE:this.moveable=p(o);break;case D.observedAttributes.POSITION_STRATEGY:this.positionStrategy=o!=null?o:D.defaults.POSITION_STRATEGY;break;case D.observedAttributes.SIZE_STRATEGY:this.sizeStrategy=o!=null?o:D.defaults.SIZE_STRATEGY;break;case D.observedAttributes.PLACEMENT:this.placement=o!=null?o:D.defaults.PLACEMENT;break;case D.observedAttributes.LABEL:this.label=o;break;case D.observedAttributes.DESCRIPTION:this.description=o;break}}show(){this.open=!0}hide(){this.open=!1}};B1[L6]=new Set,i([c()],B1.prototype,"open",2),i([c()],B1.prototype,"mode",2),i([c()],B1.prototype,"type",2),i([c()],B1.prototype,"animationType",2),i([c()],B1.prototype,"preset",2),i([c()],B1.prototype,"persistent",2),i([c()],B1.prototype,"fullscreen",2),i([c()],B1.prototype,"fullscreenThreshold",2),i([c()],B1.prototype,"trigger",2),i([c()],B1.prototype,"triggerElement",2),i([c()],B1.prototype,"moveable",2),i([c()],B1.prototype,"positionStrategy",2),i([c()],B1.prototype,"sizeStrategy",2),i([c()],B1.prototype,"placement",2),i([c()],B1.prototype,"label",2),i([c()],B1.prototype,"description",2),B1=i([y({name:D.elementName,dependencies:[Xe]})],B1);function V6(){f(B1)}var C6=`${b}bottom-sheet`,E6={PERSISTENT:"persistent",MODE:"mode",OPEN:"open",FULLSCREEN:"fullscreen"},ju=d({},E6),Qu={DRAGGING:"dragging",FULLSCREEN:"fullscreen"},Ju={DIALOG:D.elementName,SURFACE:".surface",CONTENT_BODY:"[forge-bottom-sheet-body]",INITIAL_FOCUS:`:is([autofocus], [${C6}-focus])`},t_={BEFORE_CLOSE:"forge-bottom-sheet-before-close",CLOSE:"forge-bottom-sheet-close",OPEN:"forge-bottom-sheet-open",READY:"forge-bottom-sheet-ready",DRAG_START:"forge-bottom-sheet-drag-start",DRAGGED:"forge-bottom-sheet-dragged",DRAG_END:"forge-bottom-sheet-drag-end",DRAG_CANCEL:"forge-bottom-sheet-drag-cancel",FULLSCREEN:"forge-bottom-sheet-fullscreen"},e_={mode:"nonmodal"},S1={elementName:C6,observedAttributes:E6,attributes:ju,classes:Qu,selectors:Ju,events:t_,defaults:e_};var yi=class extends I{constructor(t){super(t),this._dialogElement=w(t,S1.selectors.DIALOG),this._surfaceElement=w(t,S1.selectors.SURFACE)}setDialogProperty(t,e){this._dialogElement[t]=e}addDialogListener(t,e){this._dialogElement.addEventListener(t,e)}removeDialogListener(t,e){this._dialogElement.removeEventListener(t,e)}initialize(){this._component[N]({role:"dialog",ariaModal:this._component.mode==="modal"||this._component.mode==="inline-modal"?"true":"false"},{setAttribute:!0})}open(){this._dialogElement.mode=this._component.mode,this._dialogElement.open=!0}close(){this._dialogElement.open=!1}trySetInitialFocus(){window.requestAnimationFrame(()=>{if(this._component.open&&this._component.isConnected){let t=this._component.querySelector(S1.selectors.INITIAL_FOCUS);t==null||t.focus()}})}isScrollable(){let t=this._getContentElement();return t?t.scrollHeight>t.offsetHeight:!1}isContentChild(t){var o;let e=this._getContentElement();return(o=e==null?void 0:e.contains(t))!=null?o:!1}setDragging(t){this._dialogElement.classList.toggle(S1.classes.DRAGGING,t)}setFullscreen(t){this._dialogElement.classList.toggle(S1.classes.FULLSCREEN,t)}isFullscreen(){return this._dialogElement.classList.contains(S1.classes.FULLSCREEN)}setContainerHeight(t){if(t!=null){let e=Math.min(100,100*t/window.innerHeight);this._dialogElement.style.setProperty("--forge-dialog-max-height",`${e}%`)}else this._dialogElement.style.removeProperty("--forge-dialog-max-height")}getContainerBounds(){return this._surfaceElement.getBoundingClientRect()}setDragTargetHandler(t,e){this._surfaceElement.addEventListener(t,e)}removeDragTargetHandler(t,e){this._surfaceElement.removeEventListener(t,e)}setBodyScrollHandler(t){let e=this._getContentElement();e==null||e.addEventListener("scroll",t)}_getContentElement(){var e;return(e=Array.from(Re(this._component,S1.selectors.CONTENT_BODY,!1))[0])!=null?e:null}setBodyListener(t,e,o){document.body.addEventListener(t,e,o)}removeBodyListener(t,e){document.body.removeEventListener(t,e)}};var Mi=class{constructor(t){this._adapter=t;this._open=!1;this._mode=S1.defaults.mode;this._persistent=!1;this._fullscreen=!1;this._isDragging=!1;this._bodyScrollHandler=()=>this._onBodyScroll();this._dragStartHandler=this._onDragStart.bind(this);this._dragMoveHandler=this._onDragMove.bind(this);this._dragEndHandler=this._onDragEnd.bind(this);this._dragCancelHandler=this._onDragCancel.bind(this);this._dialogDismissListener=this._onDialogDismiss.bind(this);this._dialogBeforeCloseListener=this._onDialogBeforeClose.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.setDialogProperty("mode",this._mode),this._adapter.setDialogProperty("fullscreen",this._fullscreen),this._open&&this._openBottomSheet()}_openBottomSheet(){this._fullscreen&&this._adapter.setFullscreen(!0),this._adapter.addDialogListener(D.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.addDialogListener(D.events.CLOSE,this._dialogDismissListener),this._adapter.open(),this._adapter.isScrollable()&&this._initScrollableHandlers(),this._adapter.trySetInitialFocus(),this._adapter.setBodyAttribute(S1.attributes.OPEN,"true"),this._adapter.dispatchHostEvent(new CustomEvent(S1.events.OPEN,{bubbles:!0}))}_closeBottomSheet(){this._adapter.removeDialogListener(D.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.removeDialogListener(D.events.CLOSE,this._dialogDismissListener),this._adapter.close(),this._adapter.dispatchHostEvent(new CustomEvent(S1.events.CLOSE,{bubbles:!0})),this._open=!1,this._adapter.setFullscreen(!1)}_onDialogDismiss(){this._closeBottomSheet()}_onDialogBeforeClose(t){let e=new CustomEvent(S1.events.BEFORE_CLOSE,{bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}_initScrollableHandlers(){!this._adapter.isFullscreen()&&this._adapter.isScrollable()&&(this._adapter.setDragTargetHandler("mousedown",this._dragStartHandler),this._adapter.setDragTargetHandler("touchstart",this._dragStartHandler),this._adapter.setBodyScrollHandler(this._bodyScrollHandler))}_onBodyScroll(){!this._adapter.isFullscreen()&&!this._isDragging&&(this._adapter.setFullscreen(!0),this._adapter.dispatchHostEvent(new CustomEvent(S1.events.FULLSCREEN,{bubbles:!0,detail:!0})))}_onDragStart(t){if(this._adapter.isFullscreen()){let a=C2(t);if(this._adapter.isScrollable()&&this._adapter.isContentChild(a[0]))return}t.stopPropagation();let e=this._adapter.getContainerBounds(),o=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;this._dragContext={top:o-e.top,height:e.height},this._adapter.setBodyListener("mousemove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("touchmove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("mouseup",this._dragEndHandler),this._adapter.setBodyListener("touchend",this._dragEndHandler),this._adapter.setBodyListener("touchcancel",this._dragCancelHandler)}_onDragMove(t){if(t.stopPropagation(),t.preventDefault(),!this._dragContext)return;let e=t instanceof MouseEvent?t.clientY:t.touches[0].clientY,o={y:window.innerHeight-e+this._dragContext.top};if(!this._isDragging){this._isDragging=!0;let s=new CustomEvent(S1.events.DRAG_START,{bubbles:!0,detail:o,cancelable:!0});if(this._adapter.dispatchHostEvent(s),s.defaultPrevented)return;this._adapter.setDragging(!0)}let a=this._adapter.isFullscreen()?o:{y:Math.max(o.y,this._dragContext.height)};if(!this._lastPosition||a.y!==this._lastPosition.y){let s=new CustomEvent(S1.events.DRAGGED,{bubbles:!0,detail:a,cancelable:!0});if(this._adapter.dispatchHostEvent(s),s.defaultPrevented)return;this._lastPosition=S(d({},a),{clientY:e}),this._adapter.setContainerHeight(a.y)}}_onDragEnd(){if(this._lastPosition){let t=this._lastPosition.clientY,e=this._dragContext;if(e){let o=this._adapter.isFullscreen();o&&t>0?this._adapter.setFullscreen(!1):!o&&t<e.height+e.top&&this._adapter.setFullscreen(!0);let a=new CustomEvent(S1.events.FULLSCREEN,{bubbles:!0,detail:o});this._adapter.dispatchHostEvent(a)}}if(this._isDragging){let t=new CustomEvent(S1.events.DRAG_END,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_onDragCancel(){if(this._isDragging){let t=new CustomEvent(S1.events.DRAG_CANCEL,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_dragComplete(){this._adapter.setDragging(!1),this._adapter.removeBodyListener("mousemove",this._dragMoveHandler),this._adapter.removeBodyListener("touchmove",this._dragMoveHandler),this._adapter.removeBodyListener("mouseup",this._dragEndHandler),this._adapter.removeBodyListener("touchend",this._dragEndHandler),this._adapter.removeBodyListener("touchcancel",this._dragCancelHandler),this._adapter.setContainerHeight(null),this._lastPosition=void 0,this._dragContext=void 0,this._isDragging=!1}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&(this._open?this._openBottomSheet():this._closeBottomSheet()),this._adapter.toggleHostAttribute(S1.attributes.OPEN,t))}get mode(){return this._mode}set mode(t){if(t||(t=S1.defaults.mode),this._mode!==t){this._mode=t,this._adapter.setDialogProperty("mode",this._mode);let e=this._mode!==S1.defaults.mode;this._adapter.toggleHostAttribute(S1.attributes.MODE,e,this._mode)}}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.toggleHostAttribute(S1.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen),this._adapter.toggleHostAttribute(S1.attributes.FULLSCREEN,this._fullscreen))}};var o_='<template><forge-dialog class="dialog" preset="bottom-sheet" exportparts="surface" role="presentation"><div class="surface" part="root"><slot></slot></div></forge-dialog></template>',a_="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}:host{display:contents}:host([hidden]){display:none}.dialog{--_bottom-sheet-desktop-max-width:var(--forge-bottom-sheet-desktop-max-width, 50%);--_bottom-sheet-desktop-max-height:var(--forge-bottom-sheet-desktop-max-height, 50%);--_bottom-sheet-animation-duration:var(--forge-bottom-sheet-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_bottom-sheet-animation-timing:var(--forge-bottom-sheet-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.surface{width:100%;display:inline-flex;flex-direction:column}.dialog.dragging::part(surface){transition:none}:host([open]) forge-dialog.fullscreen{--forge-dialog-max-height:100%}:host([open]) forge-dialog.fullscreen::part(surface){transition:max-height var(--_bottom-sheet-animation-duration) var(--_bottom-sheet-animation-timing)}forge-dialog{--forge-dialog-width:var(--_bottom-sheet-desktop-max-width);--forge-dialog-max-height:var(--_bottom-sheet-desktop-max-height)}@media (max-width:600px){forge-dialog{--forge-dialog-shape:0;--forge-dialog-max-width:100vw;--forge-dialog-width:100vw}}",Ze=class extends L1(V1(M)){static get observedAttributes(){return Object.values(S1.observedAttributes)}constructor(){super(),H(this,o_,a_),this._core=new Mi(new yi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case S1.attributes.OPEN:this.open=p(o);break;case S1.attributes.MODE:this.mode=o;break;case S1.observedAttributes.PERSISTENT:this.persistent=p(o);break;case S1.attributes.FULLSCREEN:this.fullscreen=p(o);break}}};i([c()],Ze.prototype,"open",2),i([c()],Ze.prototype,"mode",2),i([c()],Ze.prototype,"persistent",2),i([c()],Ze.prototype,"fullscreen",2),Ze=i([y({name:S1.elementName,dependencies:[B1]})],Ze);function B6(){f(Ze)}var n_=`${b}button-area`,s_={DISABLED:"disabled",IGNORE:"data-forge-ignore",IGNORE_ALT:"forge-ignore"},j5={ROOT:"root",BUTTON_SLOT:"button",CONTENT_SLOT:"content"},r_={ROOT:"forge-button-area"},i_={ROOT:`#${j5.ROOT}`,BUTTON_SLOT:"slot[name=button]",CONTENT_SLOT:`#${j5.CONTENT_SLOT}`},Dt={elementName:n_,attributes:s_,ids:j5,classes:r_,selectors:i_};var zi=class extends I{constructor(t){super(t),this._rootElement=w(t,Dt.selectors.ROOT),this._buttonSlotElement=w(t,Dt.selectors.BUTTON_SLOT),this._contentSlotElement=w(t,Dt.selectors.CONTENT_SLOT),this._focusIndicatorElement=w(t,w1.elementName),this._stateLayerElement=w(t,I1.elementName)}setDisabled(t){var e;(e=this._buttonElement)==null||e.toggleAttribute(Dt.attributes.DISABLED,t),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}addListener(t,e,o){this._rootElement.addEventListener(t,e,{capture:o})}removeListener(t,e,o){this._rootElement.removeEventListener(t,e,{capture:o})}addButtonSlotListener(t,e){this._buttonSlotElement.addEventListener(t,e)}removeButtonSlotListener(t,e){this._buttonSlotElement.removeEventListener(t,e)}addContentSlotListener(t,e){this._contentSlotElement.addEventListener(t,e)}removeContentSlotListener(t,e){this._contentSlotElement.removeEventListener(t,e)}animateStateLayer(){this._stateLayerElement.playAnimation()}startButtonObserver(t){this._buttonElement&&(this._buttonObserver=new MutationObserver(t),this._buttonObserver.observe(this._buttonElement,{attributeFilter:[Dt.attributes.DISABLED]}))}stopButtonObserver(){this._buttonObserver&&(this._buttonObserver.disconnect(),this._buttonObserver=void 0)}detectSlottedButton(){this._buttonElement=this._buttonSlotElement.assignedElements()[0]}isButtonDisabled(){var t,e;return(e=(t=this._buttonElement)==null?void 0:t.disabled)!=null?e:!0}requestDisabledButtonFrame(){this._buttonElement&&(this._buttonElement.disabled=!0,requestAnimationFrame(()=>{this._buttonElement&&(this._buttonElement.disabled=!1)}))}};var Hi=class{constructor(t){this._adapter=t;this._disabled=!1;this._clickListener=this._handleClick.bind(this);this._keydownListener=this._handleKeydown.bind(this);this._pointerdownListener=this._handlePointerdown.bind(this);this._ignoreStateLayerListener=this._handleIgnoreStateLayer.bind(this);this._slotListener=this._handleSlotChange.bind(this)}initialize(){this._adapter.addListener("click",this._clickListener),this._adapter.addListener("keydown",this._keydownListener),this._adapter.addListener("pointerdown",this._pointerdownListener),this._adapter.addContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.addButtonSlotListener("slotchange",this._slotListener)}destroy(){this._adapter.removeListener("click",this._clickListener),this._adapter.removeListener("keydown",this._keydownListener),this._adapter.removeListener("pointerdown",this._pointerdownListener),this._adapter.removeContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.removeButtonSlotListener("slotchange",this._slotListener),this._adapter.stopButtonObserver()}_handleClick(t){this._disabled&&t.stopPropagation();let e=window.getSelection();(e==null?void 0:e.type)==="Range"&&(e==null?void 0:e.toString().trim())!==""&&t.stopPropagation(),this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleKeydown(t){t.key!==" "&&t.key!=="Enter"||(this._shouldIgnoreEvent(t)?t.stopPropagation():this._adapter.animateStateLayer())}_handlePointerdown(t){this._disabled||this._shouldIgnoreEvent(t)&&this._adapter.requestDisabledButtonFrame()}_handleIgnoreStateLayer(t){this._disabled||this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleSlotChange(){this._adapter.stopButtonObserver(),this._adapter.detectSlottedButton(),this._adapter.startButtonObserver(()=>this._handleButtonDisabled()),this._adapter.isButtonDisabled()?this.disabled=!0:this._disabled&&this._adapter.setDisabled(!0)}_handleButtonDisabled(){this.disabled=this._adapter.isButtonDisabled()}_shouldIgnoreEvent(t){return C2(t).some(o=>o.nodeType===1&&(o.hasAttribute(Dt.attributes.IGNORE)||o.hasAttribute(Dt.attributes.IGNORE_ALT)))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(Dt.attributes.DISABLED,this._disabled))}};var l_='<template><div class="forge-button-area" id="root" part="root"><div class="button" id="button" part="button"><slot name="button"></slot></div><slot id="content"></slot><forge-state-layer target="root" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator target="button" part="focus-indicator" inward></forge-focus-indicator></div></template>',c_=":host{display:block;position:relative}:host .forge-button-area{cursor:var(--_button-area-cursor)}:host([hidden]){display:none}:host([disabled]) .forge-button-area{cursor:var(--_button-area-disabled-cursor)}.forge-button-area{--_button-area-primary-color:var(--forge-button-area-primary-color, var(--forge-theme-primary, #3f51b5));--_button-area-cursor:var(--forge-button-area-cursor, pointer);--_button-area-disabled-cursor:var(--forge-button-area-disabled-cursor, not-allowed);--_button-area-focus-indicator-color:var(--forge-button-area-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-area-focus-indicator-offset:var(--forge-button-area-focus-indicator-offset, 4px)}.forge-button-area{position:relative;overflow:hidden;block-size:100%;inline-size:100%}.forge-button-area .button{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}forge-focus-indicator{z-index:1;--forge-focus-indicator-color:var(--_button-area-focus-indicator-color);--forge-focus-indicator-outward-offset:var(--_button-area-focus-indicator-offset)}forge-state-layer{--forge-state-layer-color:var(--_button-area-primary-color);border-radius:inherit}",Ro=class extends M{static get observedAttributes(){return[Dt.attributes.DISABLED]}constructor(){super(),H(this,l_,c_),this._core=new Hi(new zi(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case Dt.attributes.DISABLED:this.disabled=p(o);break}}};i([c()],Ro.prototype,"disabled",2),Ro=i([y({name:Dt.elementName,dependencies:[J,r1]})],Ro);function A6(){f(Ro)}var Q5=`${b}calendar-menu`,h_={ANIMATION_TYPE:"animation-type",DATA_ANIMATION:"data-animation",DATA_VALUE:"data-value",POPOVER_CONTEXT:"forge-popover-context",PREVENT_FOCUS:"prevent-focus"},so={BACKDROP:"forge-calendar-menu__backdrop",CLOSING:"forge-calendar-menu--closing",GRID:"forge-calendar-menu__grid",GRID_ITEM:"forge-calendar-menu__item--grid",GRID_FOUR_COL:"forge-calendar-menu__grid--four-col",GRID_THREE_COL:"forge-calendar-menu__grid--three-col",ITEM:"forge-calendar-menu__item",ITEM_FOCUSED:"forge-calendar-menu__item--focused",ITEM_SELECTED:"forge-calendar-menu__item--selected",LIST:"forge-calendar-menu__list",LIST_ITEM:"forge-calendar-menu__item--list",LIST_WRAPPER:"forge-calendar-menu__list__wrapper",OPEN:"forge-calendar-menu--open",REPLACING_VIEW:"forge-calendar-menu--replacing-view",SLIDE_LEFT:"forge-calendar-menu--slide-left",SLIDE_RIGHT:"forge-calendar-menu--slide-right",VIEW:"forge-calendar-menu__view"},J5={SCROLL_SPY_BOTTOM:"scroll-spy-bottom",SCROLL_SPY_TOP:"scroll-spy-top"},v_={ITEM:"menu-item",ITEM_BUTTON:"menu-item-button",ITEM_CONTENT:"menu-item-content",MENU:"menu"},p_={CONTAINER:".forge-calendar-menu",FOCUSED:`.${so.ITEM_FOCUSED}`,GRID:`.${so.GRID}`,ITEM:`.${so.ITEM}`,LIST:`.${so.LIST}`,LIST_WRAPPER:`.${so.LIST_WRAPPER}`,SCROLL_SPY_BOTTOM:`#${J5.SCROLL_SPY_BOTTOM}`,SCROLL_SPY_TOP:`#${J5.SCROLL_SPY_TOP}`,SELECTED:`.${so.ITEM_SELECTED}`,VIEW:`.${so.VIEW}`},m_={FOCUS_CHANGE:`${Q5}-focus-change`,SELECT:`${Q5}-select`},d_={FOUR_COL:4,LARGE_ITEM_SET:13,LIST_SLICE_SIZE:20,THREE_COL:3},T={elementName:Q5,attributes:h_,classes:so,ids:J5,parts:v_,selectors:p_,events:m_,numbers:d_};function Ii(n){let t=document.createElement("div");t.setAttribute("part",T.parts.MENU),t.classList.add(T.classes.VIEW,T.classes.GRID);let e;return n.length>12?(t.classList.add(T.classes.GRID_FOUR_COL),e=T6(n)):(t.classList.add(T.classes.GRID_THREE_COL),e=T6(n)),e.forEach(o=>t.appendChild(o)),t}function T6(n){return n.map(t=>{let e=document.createElement("div");e.classList.add(T.classes.ITEM,T.classes.GRID_ITEM),e.innerText=t.label,e.setAttribute("role","button"),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.add(T.classes.ITEM_SELECTED),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let o=document.createElement("forge-state-layer");e.appendChild(o);let a=document.createElement("forge-focus-indicator");return a.inward=!0,e.appendChild(a),e})}function k6(n){let t=document.createElement("div"),e=document.createElement("div");return t.classList.add(T.classes.VIEW,T.classes.LIST_WRAPPER),e.classList.add(T.classes.LIST),e.setAttribute("role","list"),e.appendChild(S6(T.ids.SCROLL_SPY_TOP)),Li(n).forEach(o=>e.appendChild(o)),e.appendChild(S6(T.ids.SCROLL_SPY_BOTTOM)),t.appendChild(e),t}function Li(n){return n.map(t=>{let e=document.createElement("div");e.innerText=t.label,e.classList.add(T.classes.ITEM,T.classes.LIST_ITEM),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute("role","listitem"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.toggle(T.classes.ITEM_SELECTED,!0),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let o=document.createElement("forge-state-layer");e.appendChild(o);let a=document.createElement("forge-focus-indicator");return a.inward=!0,e.appendChild(a),e})}function S6(n){let t=document.createElement("div");return t.id=n,t.setAttribute("aria-hidden","true"),t}function Hn(n){for(;n.childNodes.length>1;)n.firstChild&&n.removeChild(n.firstChild)}var Vi=class extends I{constructor(e){super(e);this.component=e;this._container=w(e,T.selectors.CONTAINER)}registerClickListener(e){this._container.addEventListener("click",e)}unregisterClickListener(e){this._container.removeEventListener("click",e)}registerIntersectionObserver(e){let o=this._container.querySelector(T.selectors.LIST_WRAPPER);if(!o)return;let a={root:o};this._intersectionObserver=new IntersectionObserver(e,a);let s=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM),r=this._container.querySelector(T.selectors.SCROLL_SPY_TOP);s&&this._intersectionObserver.observe(s),r&&this._intersectionObserver.observe(r)}unregisterIntersectionObserver(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0)}setAnimationType(e){this._container.setAttribute(T.attributes.DATA_ANIMATION,e)}setClosed(){this._container.classList.remove(T.classes.OPEN),this._container.classList.add(T.classes.CLOSING),Gt(this._container,T.classes.CLOSING,!0).then(()=>{n2(this._container),this.toggleHostAttribute("hidden",!0)})}setOpenAsGrid(e,o,a,s,r){let l=Ii(e);r&&Gt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{Hn(this._container),this.setFocusAtIndex(o,a,s)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),r||this.setFocusAtIndex(o,a,s)}setOpenAsList(e,o,a,s,r){let l=k6(e);r&&Gt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{Hn(this._container),this.setFocusAtIndex(o,a,s)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),this._scrollItemIntoView("selected"),r||this.setFocusAtIndex(o,a,s)}appendListItemsToStart(e){let o=this._container.querySelector(T.selectors.LIST_WRAPPER),a=this._container.querySelector(T.selectors.LIST),s=a==null?void 0:a.querySelector(T.selectors.ITEM);if(o&&a&&s){let r=o.scrollTop,l=o.scrollHeight-o.clientHeight;Li(e).forEach(v=>{a.insertBefore(v,s)});let h=o.scrollHeight-o.clientHeight;o.scrollTop=r+(h-l)}}appendListItemsToEnd(e){let o=this._container.querySelector(T.selectors.LIST),a=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM);o&&a&&Li(e).forEach(s=>{o.insertBefore(s,a)})}animateInFromLeft(e,o){Gt(this._container,T.classes.SLIDE_RIGHT,!0).then(()=>{Hn(this._container),o&&o()});let a=Ii(e);this._container.appendChild(a)}animateInFromRight(e,o){Gt(this._container,T.classes.SLIDE_LEFT,!0).then(()=>{Hn(this._container),o&&o()});let a=Ii(e);this._container.appendChild(a)}setFocusAtIndex(e,o,a){var h;let s=this._container.querySelector(T.selectors.FOCUSED);s==null||s.classList.remove(T.classes.ITEM_FOCUSED),s==null||s.setAttribute("tabindex","-1");let r=s==null?void 0:s.querySelector("forge-focus-indicator");r&&(r.active=!1);let l=(h=this._container.querySelectorAll(T.selectors.ITEM))==null?void 0:h[e];if(l){if(l.classList.add(T.classes.ITEM_FOCUSED),l.setAttribute("tabindex",a?"-1":"0"),o&&!a)l.focus();else if(a){let v=l.querySelector("forge-focus-indicator");v&&(v.active=!0)}this._scrollItemIntoView("focused")}}_scrollItemIntoView(e){let o=this._container.querySelector(T.selectors.LIST),a=o==null?void 0:o.querySelector(e==="selected"?T.selectors.SELECTED:T.selectors.FOCUSED);o&&a&&Kn(o.parentElement,a,e==="selected"?"auto":"smooth",e==="selected"?"center":"nearest")}};var Ci=class{constructor(t){this._adapter=t;this._animationType="scale";this._columnCount=3;this._focusedIndex=0;this._list=!1;this._open=!1;this._options=[];this._preventFocus=!1;this._sliceEnd=-1;this._sliceStart=-1;this._clickListener=e=>this._onClick(e),this._intersectionObserverCallback=e=>this._onIntersection(e)}initialize(){this._applyAnimationType(),this._applyPreventFocus(),this._adapter.setHostAttribute("exportparts",Object.values(T.parts).join(", ")),this._adapter.toggleHostAttribute("hidden",!0),this._adapter.registerClickListener(this._clickListener)}destroy(){this._adapter.unregisterClickListener(this._clickListener),this._adapter.unregisterIntersectionObserver()}openAsGrid(t,e){this._list=!1,this._options=t,this._focusedIndex=0,this._setColumnCount(),this._adapter.setOpenAsGrid(t,this._focusedIndex,e,this._preventFocus,this._open),this._setGridListeners(),this._open=!0,this._emitFocusChangeEvent()}openAsList(t,e){this._list=!0,this._options=t;let o=this._getOptionSliceIncludingSelected();this._focusedIndex=Math.max(t.findIndex(a=>a.selected),this._sliceStart),this._adapter.setOpenAsList(o,this._focusedIndex-this._sliceStart,e,this._preventFocus,this._open),this._setListListeners(),this._open=!0,this._emitFocusChangeEvent()}close(){this._open=!1,this._options=[],this._adapter.setClosed()}animateIn(t,e,o){let a=()=>{this._setFocusFromStoredIndex(o)};e==="left"?this._adapter.animateInFromLeft(t,a):this._adapter.animateInFromRight(t,a),this._options=t,this._setColumnCount()}selectFocusedItem(){var t;this._adapter.emitHostEvent(T.events.SELECT,(t=this._options[this._focusedIndex])==null?void 0:t.value)}moveFocusBackward(){if(this._list)return!0;let t=this._focusedIndex-1,e=t>=0&&t%this._columnCount!==this._columnCount-1;return this._focusedIndexAfterAnimation=e?void 0:t+this._columnCount,this._tryMoveFocus(t,e)}moveFocusDown(){if(this._list){let t=Math.min(this._focusedIndex+=1,this._options.length-1);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex+this._columnCount,e=t<this._options.length;this._focusedIndexAfterAnimation=e?void 0:t%this._columnCount,this._tryMoveFocus(t,e)}}moveFocusForward(){if(this._list)return!0;let t=this._focusedIndex+1,e=t<this._options.length&&t%this._columnCount!==0;return this._focusedIndexAfterAnimation=e?void 0:t-this._columnCount,this._tryMoveFocus(t,e)}moveFocusUp(){if(this._list){let t=Math.max(this._focusedIndex-=1,0);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex-this._columnCount,e=t>=0;this._focusedIndexAfterAnimation=e?void 0:this._options.length+t,this._tryMoveFocus(t,e)}}_tryMoveFocus(t,e){var o;return e&&!((o=this._options[t])!=null&&o.disabled)&&(this._focusedIndex=t,this._adapter.setFocusAtIndex(this._list?this._focusedIndex-this._sliceStart:this._focusedIndex,!0,this._preventFocus),this._emitFocusChangeEvent()),e}_setFocusFromStoredIndex(t){var e,o;this._focusedIndexAfterAnimation!==void 0&&(this._options[this._focusedIndexAfterAnimation]&&!((e=this._options[this._focusedIndexAfterAnimation])!=null&&e.disabled)?this._focusedIndex=this._focusedIndexAfterAnimation:(o=this._options[0])!=null&&o.disabled?this._focusedIndex=this._options.findIndex(a=>!a.disabled):this._focusedIndex=this._options.length-this._options.slice().reverse().findIndex(a=>!a.disabled)-1,this._focusedIndexAfterAnimation=void 0,this._adapter.setFocusAtIndex(this._focusedIndex,t,this._preventFocus),this._emitFocusChangeEvent())}_onClick(t){let e=C2(t).find(a=>a.classList&&a.classList.contains(T.classes.ITEM)),o=e==null?void 0:e.getAttribute(T.attributes.DATA_VALUE);O(o)&&this._adapter.emitHostEvent(T.events.SELECT,+o)}_onIntersection(t){this._sliceStart>0&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_TOP&&e.isIntersecting)&&this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice()),this._sliceEnd<this._options.length&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_BOTTOM&&e.isIntersecting)&&this._adapter.appendListItemsToEnd(this._getNextOptionsSlice())}_setColumnCount(){this._columnCount=this._options.length>=T.numbers.LARGE_ITEM_SET?T.numbers.FOUR_COL:T.numbers.THREE_COL}_emitFocusChangeEvent(){var t;this._adapter.emitHostEvent(T.events.FOCUS_CHANGE,(t=this._options[this._focusedIndex])==null?void 0:t.value)}_setGridListeners(){this._adapter.unregisterIntersectionObserver()}_setListListeners(){this._adapter.unregisterIntersectionObserver(),this._adapter.registerIntersectionObserver(this._intersectionObserverCallback)}_getOptionSliceIncludingSelected(){if(this._options.length<=T.numbers.LIST_SLICE_SIZE)return this._sliceStart=0,this._sliceEnd=this._options.length,this._options.slice();let t=Math.max(this._options.findIndex(a=>a.selected),0),e=Math.max(Math.floor(t-T.numbers.LIST_SLICE_SIZE/2),0),o=e+T.numbers.LIST_SLICE_SIZE;return o>this._options.length&&(e=this._options.length-1-T.numbers.LIST_SLICE_SIZE,o=this._options.length),this._sliceStart=e,this._sliceEnd=o,this._options.slice(this._sliceStart,this._sliceEnd)}_getNextOptionsSlice(){let t=Math.min(this._sliceEnd+T.numbers.LIST_SLICE_SIZE,this._options.length),e=this._options.slice(this._sliceEnd,t);return this._sliceEnd=t,e}_getPreviousOptionsSlice(){let t=Math.max(this._sliceStart-T.numbers.LIST_SLICE_SIZE,0),e=this._options.slice(t,this._sliceStart);return this._sliceStart=t,e}_applyAnimationType(){this._adapter.setHostAttribute(T.attributes.ANIMATION_TYPE,this._animationType),this._adapter.setAnimationType(this._animationType)}_applyPreventFocus(){this._adapter.toggleHostAttribute(T.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setFocusAtIndex(this._focusedIndex,!1,this._preventFocus)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._applyAnimationType())}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._applyPreventFocus())}};var g_='<template><div class="forge-calendar-menu" part="root"></div></template>',w_='.forge-calendar-menu{background-color:var(--forge-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;align-items:center;padding:8px;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){border:1px solid var(--forge-theme-outline,#e0e0e0);cursor:pointer}.forge-calendar-menu__item--grid[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container, #d1d5ed)}.forge-calendar-menu__item--list{display:flex;align-items:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer;position:relative}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{animation-duration:.2s;animation-name:scale-open;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{animation-name:fade-in}}.forge-calendar-menu--closing{animation-duration:.2s;animation-name:scale-closed;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@keyframes scale-open{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@keyframes scale-closed{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.4)}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes slide-in-from-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-from-right{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-to-left{from{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-out-to-right{from{transform:translateX(0)}to{transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popover-context=true]) .forge-calendar-menu{background-color:var(--forge-theme-surface-bright,#fff)}',je=class extends M{static get observedAttributes(){return[T.attributes.ANIMATION_TYPE,T.attributes.PREVENT_FOCUS]}constructor(){super(),H(this,g_,w_),this._core=new Ci(new Vi(this))}connectedCallback(){!this.hasAttribute(T.attributes.POPOVER_CONTEXT)&&Yo(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(T.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case T.attributes.ANIMATION_TYPE:this.animationType=o;break;case T.attributes.PREVENT_FOCUS:this.preventFocus=p(o);break}}animateIn(t,e,o=!1){this._core.animateIn(t,e,o)}close(){this._core.close()}moveFocusDown(){this._core.moveFocusDown()}moveFocusBackward(){return this._core.moveFocusBackward()}moveFocusForward(){return this._core.moveFocusForward()}moveFocusUp(){this._core.moveFocusUp()}openAsGrid(t,e=!1){this._core.openAsGrid(t,e)}openAsList(t,e=!1){this._core.openAsList(t,e)}selectFocusedItem(){this._core.selectFocusedItem()}};i([c()],je.prototype,"animationType",2),i([c()],je.prototype,"preventFocus",2),je=i([y({name:T.elementName,dependencies:[r1,J]})],je);function S51(){f(je)}var In=`${b}calendar`,u_={ALLOW_SINGLE_DATE_RANGE:"allow-single-date-range",CLEAR_BUTTON:"clear-button",CONSTRAIN_TO_ENABLED:"constrain-to-enabled",FIRST_DAY_OF_WEEK:"first-day-of-week",FIXED_HEIGHT:"static-height",LIST_YEARS:"list-years",LOCALE:"locale",MAX:"max",MENU_ANIMATION:"menu-animation",MIN:"min",MODE:"mode",MONTH:"month",PREVENT_FOCUS:"prevent-focus",READONLY:"readonly",SELECTION_FOLLOWS_MONTH:"selection-follows-month",SHOW_HEADER:"show-header",SHOW_OTHER_MONTHS:"show-other-months",SHOW_TODAY:"show-today",TODAY_BUTTON:"today-button",VIEW:"view",YEAR:"year",YEAR_RANGE:"year-range"},__=S(d({},u_),{DATA_DATE:"data-date",DATA_EVENT_THEME:"data-event-theme",POPOVER_CONTEXT:"forge-popover-context"}),ge={ALLOW_SINGLE_DATE_RANGE:"forge-calendar--allow-single-date-range",DATE:"forge-calendar__date",DATE_GRID:"forge-calendar__date-grid",DATE_INNER:"forge-calendar__date__inner",DATE_OTHER_MONTH:"forge-calendar__date--other-month",DATE_SPACER:"forge-calendar__date-spacer",DATE_SELECTED:"forge-calendar__date--selected",DATE_TODAY:"forge-calendar__date--today",DATE_VIEW:"forge-calendar__date-view",DATE_VIEW_ROW:"forge-calendar__date-view__row",DATE_WRAPPER:"forge-calendar__date-wrapper",DAY:"forge-calendar__day",EVENT:"forge-calendar__event",EVENT_OVERFLOW:"forge-calendar__event--overflow",EVENT_WRAPPER:"forge-calendar__event__wrapper",FIXED_HEIGHT:"forge-calendar--fixed-height",FOOTER:"forge-calendar__footer",HEADER:"forge-calendar__header",MONTH_MENU_OPEN:"forge-calendar--month-menu-open",PREVENT_FOCUS:"forge-calendar--prevent-focus",RANGE:"forge-calendar__range",RANGE_END:"forge-calendar__range--end",RANGE_START:"forge-calendar__range--start",RANGE_TARGET:"forge-calendar__range__target",READONLY:"forge-calendar--readonly",RTL:"forge-calendar--rtl",SHOW_OTHER_MONTHS:"forge-calendar--show-other-months",SHOW_TODAY:"forge-calendar--show-today",VIEW:"forge-calendar__view",YEAR_MENU_OPEN:"forge-calendar--year-menu-open"},st={ACCESSIBLE_HEADER:"accessible-header",ACCESSIBLE_MONTH:"accessible-month",ACCESSIBLE_YEAR:"accessible-year",CLEAR_BUTTON:"clear-button",DATE_GRID:"date-grid",DATE_VIEW:"date-view",DAY_ROW:"day-row",FOOTER:"footer",HEADER:"header",MENU:"menu",MONTH_BUTTON:"month-button",NEXT_BUTTON:"next-button",NEXT_BUTTON_TOOLTIP:"next-button-tooltip",PREVIOUS_BUTTON:"previous-button",PREVIOUS_BUTTON_TOOLTIP:"previous-button-tooltip",TODAY_BUTTON:"today-button",YEAR_BUTTON:"year-button"},x_={PREVIOUS_MONTH_BUTTON_TEXT:"previous-month-button-text",NEXT_MONTH_BUTTON_TEXT:"next-month-button-text",PREVIOUS_YEAR_BUTTON_TEXT:"previous-year-button-text",NEXT_YEAR_BUTTON_TEXT:"next-year-button-text",PREVIOUS_YEARS_BUTTON_TEXT:"previous-years-button-text",NEXT_YEARS_BUTTON_TEXT:"next-years-button-text",TODAY_BUTTON_TEXT:"today-button-text",CLEAR_BUTTON_TEXT:"clear-button-text"},f_={SUNDAY:"sunday",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday"},b_=S(d({},f_),{CLEAR_BUTTON:"clear-button",DATE:"date",DATE_OTHER_MONTH:"date-other-month",DATE_VIEW:"date-view",DATE_WRAPPER:"date-wrapper",DAY:"day",EVENT:"event",EVENT_WRAPPER:"event-wrapper",FOOTER:"footer",HEADER:"header",MONTH_BUTTON:"month-button",MONTH_BUTTON_ELEMENT:"month-button-element",NEXT_BUTTON:"next-button",PREVIOUS_BUTTON:"previous-button",RANGE:"range",RANGE_END:"range-end",RANGE_START:"range-start",TODAY:"today",TODAY_BUTTON:"today-button",WEEKEND:"weekend",YEAR_BUTTON:"year-button",YEAR_BUTTON_ELEMENT:"year-button-element"}),y_={ACCESSIBLE_HEADER:`#${st.ACCESSIBLE_HEADER}`,ACCESSIBLE_MONTH:`#${st.ACCESSIBLE_MONTH}`,ACCESSIBLE_YEAR:`#${st.ACCESSIBLE_YEAR}`,CALENDAR:".forge-calendar",CLEAR_BUTTON:`#${st.CLEAR_BUTTON}`,DATE:`.${ge.DATE}`,DATE_GRID:`#${st.DATE_GRID}`,DATE_INNER:`.${ge.DATE_INNER}`,DATE_OTHER_MONTH:`.${ge.DATE_OTHER_MONTH}`,DATE_SPACER:`.${ge.DATE_SPACER}`,DATE_SELECTED:`.${ge.DATE_SELECTED}`,DATE_TODAY:`.${ge.DATE_TODAY}`,DATE_VIEW:`#${st.DATE_VIEW}`,DATE_WRAPPER:`.${ge.DATE_WRAPPER}`,DAY_ROW:`#${st.DAY_ROW}`,EVENT_WRAPPER:`.${ge.EVENT_WRAPPER}`,FOOTER:`#${st.FOOTER}`,HEADER:`#${st.HEADER}`,MENU:T.elementName,MONTH_BUTTON:`#${st.MONTH_BUTTON}`,NEXT_BUTTON:`#${st.NEXT_BUTTON}`,NEXT_BUTTON_TOOLTIP:`#${st.NEXT_BUTTON_TOOLTIP}`,PREVIOUS_BUTTON:`#${st.PREVIOUS_BUTTON}`,PREVIOUS_BUTTON_TOOLTIP:`#${st.PREVIOUS_BUTTON_TOOLTIP}`,RANGE:`.${ge.RANGE}`,RANGE_END:`.${ge.RANGE_END}`,RANGE_START:`.${ge.RANGE_START}`,TODAY_BUTTON:`#${st.TODAY_BUTTON}`,TOOLTIP:a1.elementName,VIEW:"#view",YEAR_BUTTON:`#${st.YEAR_BUTTON}`},M_={DATE_SELECT:`${In}-date-select`,FOCUS_CHANGE:`${In}-focus-change`,MONTH_CHANGE:`${In}-month-change`,VIEW_CHANGE:`${In}-view-change`},z_={DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT:"Previous month",DEFAULT_NEXT_MONTH_BUTTON_TEXT:"Next month",DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT:"Previous year",DEFAULT_NEXT_YEAR_BUTTON_TEXT:"Next year",DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT:"Previous years",DEFAULT_NEXT_YEARS_BUTTON_TEXT:"Next years",DEFAULT_TODAY_BUTTON_TEXT:"Today",DEFAULT_CLEAR_BUTTON_TEXT:"Clear"},H_={DEFAULT_MAX_YEAR_OFFSET:50,DEFAULT_MIN_YEAR_OFFSET:50,FINAL_WEEK_BEGIN_INDEX:35,MONTH_LENGTH:42,PENULTIMATE_WEEK_BEGIN_INDEX:28,WEEK_LENGTH:7,YEARS_IN_VIEW:20},g={elementName:In,attributes:__,classes:ge,ids:st,slots:x_,parts:b_,selectors:y_,events:M_,strings:z_,numbers:H_},Ln=(l=>(l[l.Sunday=0]="Sunday",l[l.Monday=1]="Monday",l[l.Tuesday=2]="Tuesday",l[l.Wednesday=3]="Wednesday",l[l.Thursday=4]="Thursday",l[l.Friday=5]="Friday",l[l.Saturday=6]="Saturday",l))(Ln||{}),O6=(o=>(o[o.First=1]="First",o[o.Last=2]="Last",o[o.Current=3]="Current",o))(O6||{});function t3(n,t,e){return e||(e=navigator.language),new Date(2017,0,n+1).toLocaleString(e,{weekday:t})}function D6(n,t,e){return e||(e=navigator.language),new Date(1970,0,n).toLocaleDateString(e,{day:t})}function ro(n,t,e){return e||(e=navigator.language),new Date(1970,n,1).toLocaleString(e,{month:t})}function y0(n,t,e){return e||(e=navigator.language),new Date(n,0,1).toLocaleDateString(e,{year:t})}function P6(n){n||(n=navigator.language);let t=n.match(/^([a-z]{2,3})(?:-([a-z]{3})(?=$|-))?(?:-([a-z]{4})(?=$|-))?(?:-([a-z]{2}|\d{3})(?=$|-))?/i);if(!t||!t.length)return 1;let e=t[1],o=t[4],a="AEAFBHDJDZEGIQIRJOKWLYOMQASDSY".match(/../g),s="AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW".match(/../g),r=["ar","arq","arz","fa"],l="amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu".match(/../g);return o?s&&s.includes(o)?0:a&&a.includes(o)?6:1:l&&l.includes(e)?0:r&&r.includes(e)?6:1}function N6(n){switch(n||(n=navigator.language),n.split("-")[1]){case"DZ":case"BH":case"BD":case"EG":case"IQ":case"IL":case"JO":case"KW":case"LY":case"MV":case"MR":case"NP":case"OM":case"QA":case"SA":case"SD":case"SY":case"AE":case"YE":case"AF":case"IR":return[4,5];case"BN":return[0,5];default:return[0,6]}}function R6(n){return n||(n=navigator.language),["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz-AF","yi"].some(e=>n?n.startsWith(e):!1)}function I_(n){return`d${n}`}function rt(n){let t=String(n.getMonth()).padStart(2,"0"),e=String(n.getDate()).padStart(2,"0");return["d",n.getFullYear(),t,e].join("")}function e3(n){let t=String(n.getMonth()).padStart(2,"0"),e=String(n.getDate()).padStart(2,"0");return["e",n.getFullYear(),t,e].join("")}function F6(n,t){let e=document.createElement("div");return e.classList.add(g.classes.DAY),e.id=I_(n),e.setAttribute("role","columnheader"),e.setAttribute("aria-label",t3(n,"long",t)),e.setAttribute("part",g.parts.DAY),e.textContent=t3(n,"short",t),e}function U6(n,t,e){var a;let o=document.createElement("div");return o.classList.add(g.classes.DATE_VIEW_ROW),o.setAttribute("role","row"),t>0&&!((a=n[0])!=null&&a.thisMonth)?(n.forEach(s=>o.appendChild(Ei(s.date))),o.setAttribute("aria-hidden","true")):n.forEach(s=>{let r=s.thisMonth||e!=null&&e.showOtherMonths?o3(s,e==null?void 0:e.locale):Ei(s.date);(s.thisMonth||e!=null&&e.showOtherMonths)&&(e!=null&&e.builder)&&(r=e.builder(s,r)),o.appendChild(r)}),o}function o3(n,t){let e=document.createElement("div"),o=document.createElement("div"),a=document.createElement("div"),s=document.createElement("forge-state-layer");s.disabled=n.disabled;let r=document.createElement("forge-focus-indicator");r.inward=!0;let l=n.date.getDay();e.id=rt(n.date),e.tabIndex=-1,e.classList.add(g.classes.DATE),e.classList.toggle(g.classes.DATE_TODAY,n.today),e.classList.toggle(g.classes.DATE_SELECTED,n.selected),e.classList.toggle(g.classes.DATE_OTHER_MONTH,!n.thisMonth),e.setAttribute("role","gridcell"),e.setAttribute("aria-disabled",n.disabled.toString()),e.setAttribute("aria-label",`${n.today?"Today, ":""}${n.date.toLocaleDateString(t!=null?t:navigator.language,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}`),e.setAttribute("aria-selected",n.selected.toString()),e.setAttribute(g.attributes.DATA_DATE,n.date.toDateString()),e.toggleAttribute("disabled",n.disabled),e.setAttribute("part",g.parts.DATE_WRAPPER);let h="";switch(l){case 0:h=g.parts.SUNDAY;break;case 1:h=g.parts.MONDAY;break;case 2:h=g.parts.TUESDAY;break;case 3:h=g.parts.WEDNESDAY;break;case 4:h=g.parts.THURSDAY;break;case 5:h=g.parts.FRIDAY;break;case 6:h=g.parts.SATURDAY;break}return $o(a,"part",h),$o(a,"part",g.parts.DATE),Ka(a,"part",g.parts.TODAY,n.today),Ka(a,"part",g.parts.DATE_OTHER_MONTH,!n.thisMonth),o.classList.add(g.classes.RANGE_TARGET),e.appendChild(o),a.textContent=D6(n.date.getDate(),"numeric",t),a.classList.add(g.classes.DATE_INNER),e.appendChild(a),e.appendChild(s),e.appendChild(r),e}function Ei(n){let t=document.createElement("span");return t.classList.add(g.classes.DATE_SPACER),t.id=rt(n),t}function W6(n){let t=document.createElement("div");return t.classList.add(g.classes.EVENT_WRAPPER),t.id=e3(n),t.setAttribute("part",g.parts.EVENT_WRAPPER),t}function G6(n,t){let e=document.createElement("forge-icon");if(e.classList.add(g.classes.EVENT),e.setAttribute("part",g.parts.EVENT),t)e.classList.add(g.classes.EVENT_OVERFLOW),e.name="add";else{let o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" stroke="var(--forge-calendar-event-stroke-color)" stroke-width="4px" paint-order="stroke"></path></svg>';e.src=o,e.setAttribute(g.attributes.DATA_EVENT_THEME,n.color)}return e}function q6(n){let t=document.createElement("forge-tooltip");return t.textContent=n,t}function a3(){let n=document.createElement("div");n.classList.add(g.classes.HEADER),n.id=g.ids.HEADER,n.setAttribute("part",g.parts.HEADER);let t=document.createElement("forge-icon-button"),e=document.createElement("forge-icon"),o=document.createElement("forge-tooltip");t.setAttribute("part",g.parts.PREVIOUS_BUTTON),t.id=g.ids.PREVIOUS_BUTTON,t.type="button",e.setAttribute("name","keyboard_arrow_left"),o.id=g.ids.PREVIOUS_BUTTON_TOOLTIP,o.setAttribute("aria-hidden","true"),o.type="label",o.innerText="Previous",t.appendChild(o),t.appendChild(e);let a=document.createElement("forge-icon-button"),s=document.createElement("forge-icon"),r=document.createElement("forge-tooltip");a.setAttribute("part",g.parts.NEXT_BUTTON),a.id=g.ids.NEXT_BUTTON,a.type="button",s.setAttribute("name","keyboard_arrow_right"),r.id=g.ids.NEXT_BUTTON_TOOLTIP,r.setAttribute("aria-hidden","true"),r.type="label",r.innerText="Next",a.appendChild(r),a.appendChild(s);let l=document.createElement("forge-button");l.setAttribute("part",g.parts.MONTH_BUTTON),l.id=g.ids.MONTH_BUTTON,l.type="button",l.setAttribute("aria-pressed","false");let h=document.createElement("forge-button");h.setAttribute("part",g.parts.YEAR_BUTTON),h.id=g.ids.YEAR_BUTTON,h.type="button",h.setAttribute("aria-pressed","false");let v=document.createElement("div");return v.setAttribute("aria-live","polite"),v.appendChild(l),v.appendChild(h),n.appendChild(t),n.appendChild(v),n.appendChild(a),n}function Y6(n,t){let e=document.createElement("span"),o=document.createElement("forge-icon");return e.innerHTML=ro(n,"long",t),o.setAttribute("name","arrow_drop_down"),[e,o]}function K6(n,t){let e=document.createElement("span"),o=document.createElement("forge-icon");return e.innerHTML=y0(n,"numeric",t),o.setAttribute("name","arrow_drop_down"),[e,o]}function n3(){let n=document.createElement("div");n.id=g.ids.ACCESSIBLE_HEADER,n.setAttribute("aria-live","polite");let t=document.createElement("span");t.id=g.ids.ACCESSIBLE_MONTH;let e=document.createElement("span");return e.id=g.ids.ACCESSIBLE_YEAR,n.appendChild(t),n.appendChild(e),n}function $6(){let n=document.createElement("div");return n.id=g.ids.FOOTER,n.classList.add(g.classes.FOOTER),n.setAttribute("part",g.parts.FOOTER),n}function X6(){let n=document.createElement("forge-button");n.id=g.ids.CLEAR_BUTTON,n.setAttribute("part",g.parts.CLEAR_BUTTON),n.type="button";let t=document.createElement("slot");return t.name=g.slots.CLEAR_BUTTON_TEXT,t.innerText=g.strings.DEFAULT_CLEAR_BUTTON_TEXT,n.appendChild(t),n}function Z6(){let n=document.createElement("forge-button");n.id=g.ids.TODAY_BUTTON,n.setAttribute("part",g.parts.TODAY_BUTTON),n.type="button";let t=document.createElement("slot");return t.name=g.slots.TODAY_BUTTON_TEXT,t.innerText=g.strings.DEFAULT_TODAY_BUTTON_TEXT,n.appendChild(t),n}function Vn(n,t){let e=C2(n).find(o=>o.classList&&o.classList.contains(g.classes.DATE));return!e||!t&&e.hasAttribute("disabled")?null:e}function j6(n,t){let e=C2(n).find(o=>o.id===t);return e!=null?e:null}function s3(n,t,e,o){n.tabIndex=o?-1:t;let a=n.querySelector("forge-focus-indicator");a&&(a.active=!!o&&t>-1),t>-1&&e&&!o?n.focus():n.blur()}var l2=class n{constructor(t){t&&(this.from=t.from?new Date(t.from):void 0,this.to=t.to?new Date(t.to):void 0)}copy(){return new n(this)}};function r3(n,t,e=0){let o=[],a=Cn(new Date(t,n,1),e),s=new Date(a);s.setDate(a.getDate()+g.numbers.MONTH_LENGTH);for(let r=a;r<s;r.setDate(r.getDate()+1))o.push(new Date(r));return o}function g31(n,t=0){let e=[],o=Cn(n,t),a=new Date(o);a.setDate(o.getDate()+7);for(let s=o;s<a;s.setDate(s.getDate()+1))e.push(new Date(s));return e}function Cn(n,t=0){let e=n.getDay(),o=new Date(n),a=e>=t?e-t:7+(e-t);return o.setDate(n.getDate()-a),o.setHours(0,0,0,0),o}function Q6(n,t=0){let e=Cn(n,t);return e.setDate(e.getDate()+6),e}function w31(n,t){return new Date(t,n,1).getDay()}function Bi(n=0){let t=[],e=n;do t.push(e),e+=1,e%=7;while(e!==n);return t}function J6(n){return b2(new Date,n)}function xt(n,t,e){return n.getMonth()===t&&n.getFullYear()===e}function L_(n,t,e){return n>t&&n<e||b2(n,t)||b2(n,e)}function Ai(n){return n.sort((t,e)=>t.getTime()-e.getTime())}function tp(n){let t=[];for(let e=0;e<n.length;e+=7){let o=n.slice(e,e+7);t.push(o)}return t}function Fo(n){if(!n.length)return new l2;if(n.length===1)return new l2({from:new Date(n[0])});let t=Ti(n);return new l2({from:t[0],to:t[t.length-1]})}function ep(n){let t=[];return n.from&&t.push(new Date(n.from)),n.to&&t.push(new Date(n.to)),t}function Ti(n){if(!n.length)return[];if(n.length===1)return[new Date(n[0])];let t=Ai(n.slice().map(e=>new Date(e)));return[new Date(t[0]),new Date(t[t.length-1])]}function Si(n,t,e){return!t||!e?[]:n.filter(o=>L_(o,t,e))}function i3(n){let t=`${n.length} event${n.length===1?"":"s"}`,e=n.map(o=>o.label).join(", ");return e!=null&&e.length&&(t+=`: ${e}`),t}function V_(n){var o,a;let t=new Date;return((a=(o=n.match(/-?[0-9]*[a-zA-Z]/g))==null?void 0:o.map(s=>s.trim()))!=null?a:[]).forEach(s=>{let r=s.slice(-1),l=+s.slice(0,-1);switch(r){case"y":t.setFullYear(t.getFullYear()+l);break;case"m":t.setMonth(t.getMonth()+l);break;case"w":t.setDate(t.getDate()+l*7);break;case"d":t.setDate(t.getDate()+l);break}}),t.setHours(0,0,0,0),t}function op(n){let t=n.split(":");if((t==null?void 0:t.length)<2)return{min:1970,max:1970};let e=new Date().getFullYear(),o=t.slice(0,2).map(a=>a.startsWith("-")?e-+a.substring(1):a.startsWith("+")?e+ +a.substring(1):+a);return{min:o[0],max:o[1]}}function ap(n){var s,r,l,h,v,m,u,z;let t=(r=(s=n.min)==null?void 0:s.getFullYear())!=null?r:0,e=(h=(l=n.max)==null?void 0:l.getFullYear())!=null?h:0,o=(m=(v=n.min)==null?void 0:v.getMonth())!=null?m:-1,a=(z=(u=n.max)==null?void 0:u.getMonth())!=null?z:12;return[...Array(12).keys()].map(x=>{let C=n.min?n.selectedYear<t||n.selectedYear===t&&x<o:!1,E=n.max?n.selectedYear>e||n.selectedYear===e&&x>a:!1;return{value:x,label:ro(x,"long",n.locale),selected:x===n.selectedMonth,disabled:C||E}})}function np(n){let t=[],e=n.yearInView%g.numbers.YEARS_IN_VIEW,o=n.yearInView-e;for(let a=o;a<o+g.numbers.YEARS_IN_VIEW;a++)t.push({value:a,label:y0(a,"numeric",n.locale),selected:a===n.selectedYear,disabled:a<n.min||a>n.max});return t}function sp(n){let t=[];for(let e=n.min;e<=n.max;e++)t.push({value:e,label:y0(e,"numeric",n.locale),selected:e===n.selectedYear});return t}function za(n,t){return t.some(e=>b2(e,n))}function ft(n,t){return!!(t.minDate&&n<t.minDate||t.maxDate&&n>t.maxDate||t.otherMonth||t.disabledDates.some(e=>b2(e,n))||t.disabledDaysOfWeek.includes(n.getDay())||t.builder&&t.builder(n))}function En(n,t){return t.findIndex(e=>b2(e,n))}function ki(n,t,e){let o=t.filter(a=>b2(a.date,n));if(e){let a=e(n);a&&(ht(a)?o.push(...a):o.push(a))}return o}function rp(n,t){if(!n.length)return[];let e=new Date(n[0]),o=n[n.length-1],a=[];for(;e<=o;)(!t||!ft(e,t))&&a.push(new Date(e)),e.setDate(e.getDate()+1);return a}function l3(n){let t=null;return typeof n=="string"&&!n.length&&(n=null),n!=null&&(G2(new Date(n))?t=new Date(n):n.length&&(t=V_(n)),t==null||t.setHours(0,0,0,0)),t}function c3(n,t,e){return e||!C2(n).length||!!(t==="date"&&Vn(n))||!!(t!=="date"&&j6(n,g.ids.MENU))}var Oi=class extends I{constructor(t){super(t),this._container=w(t,g.selectors.CALENDAR),this._dateView=w(t,g.selectors.DATE_VIEW),this._dayRow=w(t,g.selectors.DAY_ROW),this._dateGrid=w(t,g.selectors.DATE_GRID),this._menu=w(t,g.selectors.MENU)}toggleContainerAttribute(t,e,o){G(this._container,t,e,o)}registerMonthButtonListener(t){let e=this._container.querySelector(g.selectors.MONTH_BUTTON);e==null||e.addEventListener("click",t)}unregisterMonthButtonListener(t){let e=this._container.querySelector(g.selectors.MONTH_BUTTON);e==null||e.removeEventListener("click",t)}registerYearButtonListener(t){let e=this._container.querySelector(g.selectors.YEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterYearButtonListener(t){let e=this._container.querySelector(g.selectors.YEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerMenuListener(t){this._menu.addEventListener(T.events.SELECT,t)}unregisterMenuListener(t){this._menu.removeEventListener(T.events.SELECT,t)}registerMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}unregisterMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}registerNextButtonListener(t){let e=this._container.querySelector(g.selectors.NEXT_BUTTON);e==null||e.addEventListener("click",t)}unregisterNextButtonListener(t){let e=this._container.querySelector(g.selectors.NEXT_BUTTON);e==null||e.removeEventListener("click",t)}registerPreviousButtonListener(t){let e=this._container.querySelector(g.selectors.PREVIOUS_BUTTON);e==null||e.addEventListener("click",t)}unregisterPreviousButtonListener(t){let e=this._container.querySelector(g.selectors.PREVIOUS_BUTTON);e==null||e.removeEventListener("click",t)}registerClearButtonListener(t){let e=this._container.querySelector(g.selectors.CLEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterClearButtonListener(t){let e=this._container.querySelector(g.selectors.CLEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerTodayButtonListener(t){let e=this._container.querySelector(g.selectors.TODAY_BUTTON);e==null||e.addEventListener("click",t)}unregisterTodayButtonListener(t){let e=this._container.querySelector(g.selectors.TODAY_BUTTON);e==null||e.removeEventListener("click",t)}registerDateClickListener(t){this._dateGrid.addEventListener("click",t)}unregisterDateClickListener(t){this._dateGrid.removeEventListener("click",t)}registerKeydownListener(t){this._container.addEventListener("keydown",t)}registerHoverListener(t){this._dateGrid.addEventListener("mouseover",t)}unregisterHoverListener(t){this._dateGrid.removeEventListener("mouseover",t)}registerPreventFocusListener(t){this._container.addEventListener("mousedown",t)}unregisterPreventFocusListener(t){this._container.removeEventListener("mousedown",t)}setContainerClass(t,e){this._container.classList.toggle(t,e)}setHeader(){let t=this._container.querySelector(g.selectors.ACCESSIBLE_HEADER);t==null||t.remove();let e=this._container.querySelector(g.selectors.HEADER);e?e.replaceWith(a3()):this._container.prepend(a3())}removeHeader(){let t=this._container.querySelector(g.selectors.HEADER);t==null||t.remove();let e=this._container.querySelector(g.selectors.ACCESSIBLE_HEADER);e?e.replaceWith(n3()):this._container.prepend(n3())}setNextButtonDisabled(t){let e=this._container.querySelector(g.selectors.NEXT_BUTTON);e==null||e.toggleAttribute("disabled",t)}setPreviousButtonDisabled(t){let e=this._container.querySelector(g.selectors.PREVIOUS_BUTTON);e==null||e.toggleAttribute("disabled",t)}setNextButtonLabel(t){let e="",o="";switch(t){case"date":e=g.strings.DEFAULT_NEXT_MONTH_BUTTON_TEXT,o=g.slots.NEXT_MONTH_BUTTON_TEXT;break;case"month":e=g.strings.DEFAULT_NEXT_YEAR_BUTTON_TEXT,o=g.slots.NEXT_YEAR_BUTTON_TEXT;break;case"year":e=g.strings.DEFAULT_NEXT_YEARS_BUTTON_TEXT,o=g.slots.NEXT_YEARS_BUTTON_TEXT;break}let a=this._container.querySelector(g.selectors.NEXT_BUTTON_TOOLTIP);if(a){let s=document.createElement("slot");s.name=o,s.innerText=e,a.innerHTML=s.outerHTML}}setPreviousButtonLabel(t){let e="",o="";switch(t){case"date":e=g.strings.DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT,o=g.slots.PREVIOUS_MONTH_BUTTON_TEXT;break;case"month":e=g.strings.DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT,o=g.slots.PREVIOUS_YEAR_BUTTON_TEXT;break;case"year":e=g.strings.DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT,o=g.slots.PREVIOUS_YEARS_BUTTON_TEXT;break}let a=this._container.querySelector(g.selectors.PREVIOUS_BUTTON_TOOLTIP);if(a){let s=document.createElement("slot");s.name=o,s.innerText=e,a.innerHTML=s.outerHTML}}setMonthButtonPressed(t){let e=this._container.querySelector(g.selectors.MONTH_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(g.classes.MONTH_MENU_OPEN,t))}setYearButtonPressed(t){let e=this._container.querySelector(g.selectors.YEAR_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(g.classes.YEAR_MENU_OPEN,t))}setMonth(t,e){let o=this._container.querySelector(g.selectors.MONTH_BUTTON);if(o){let s=Y6(t,e);o.replaceChildren(s[0],s[1]);return}let a=this._container.querySelector(g.selectors.ACCESSIBLE_MONTH);a&&(a.textContent=ro(t,"long",e))}setYear(t,e){let o=this._container.querySelector(g.selectors.YEAR_BUTTON);if(o){let s=K6(t,e);o.replaceChildren(s[0],s[1]);return}let a=this._container.querySelector(g.selectors.ACCESSIBLE_YEAR);a&&(a.textContent=y0(t,"numeric",e))}setFooter(){this._container.querySelector(g.selectors.FOOTER)||this._container.appendChild($6())}removeFooter(){var e;let t=this._container.querySelector(g.selectors.FOOTER);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setClearButton(){let t=this._container.querySelector(g.selectors.FOOTER);if(!t)return;t.querySelector(g.selectors.CLEAR_BUTTON)||t.prepend(X6())}removeClearButton(){var e;let t=this._container.querySelector(g.selectors.CLEAR_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setTodayButton(){let t=this._container.querySelector(g.selectors.FOOTER);if(!t)return;t.querySelector(g.selectors.TODAY_BUTTON)||t.appendChild(Z6())}removeTodayButton(){var e;let t=this._container.querySelector(g.selectors.TODAY_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setDays(t,e){n2(this._dayRow),t.forEach(o=>{let a=F6(o,e==null?void 0:e.locale);e!=null&&e.builder&&(a=e.builder(o,a)),this._dayRow.appendChild(a)})}setDates(t,e){n2(this._dateGrid),tp(t).forEach((o,a)=>{let s=U6(o,a,e);this._dateGrid.appendChild(s)})}replaceDate(t,e){let o=this._dateGrid.querySelector(`#${rt(t.date)}`);if(o){let a=o3(t,e==null?void 0:e.locale);e!=null&&e.builder?o.replaceWith(e.builder(t,a)):o.replaceWith(a)}}replaceDateWithSpacer(t){let e=this._dateGrid.querySelector(`#${rt(t)}`);e==null||e.replaceWith(Ei(t))}setDateDisabled(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);o&&(o.toggleAttribute("disabled",e),o.setAttribute("aria-disabled",e.toString()))}setDateSelected(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);o&&(o.classList.toggle(g.classes.DATE_SELECTED,e),o.setAttribute("aria-selected",e.toString()))}setWeekend(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`),a=o==null?void 0:o.querySelector(g.selectors.DATE_INNER);a&&Ka(a,"part",g.parts.WEEKEND,e)}appendDateAttribute(t,e,o){let a=this._dateGrid.querySelector(`#${rt(t)}`);a&&$o(a,e,o)}setMultiple(t){this._dateView.setAttribute("aria-multiselectable",t.toString())}setDateViewHidden(t){G(this._dateView,t,"aria-hidden",t.toString()),this.setAllDatesUnfocusable()}setRange(t){this._dateGrid.querySelectorAll(g.selectors.RANGE).forEach(o=>o.classList.remove(g.classes.RANGE)),t&&t.forEach(o=>{let a=this._dateGrid.querySelector(`#${rt(o)}`);a==null||a.classList.add(g.classes.RANGE)})}setRangeStart(t){let e=this._dateGrid.querySelector(g.selectors.RANGE_START);if(e==null||e.classList.remove(g.classes.RANGE_START),!t)return;let o=this._dateGrid.querySelector(`#${rt(t)}`);o==null||o.classList.add(g.classes.RANGE_START)}setRangeEnd(t){let e=this._dateGrid.querySelector(g.selectors.RANGE_END);if(e==null||e.classList.remove(g.classes.RANGE_END),!t)return;let o=this._dateGrid.querySelector(`#${rt(t)}`);o==null||o.classList.add(g.classes.RANGE_END)}setActiveDate(t,e,o){let a=t.toDateString();this._dateGrid.querySelectorAll(g.selectors.DATE).forEach(r=>{let l=r.getAttribute(g.attributes.DATA_DATE)===a;s3(r,l?0:-1,e,o)})}setAllDatesUnfocusable(){this._dateGrid.querySelectorAll(g.selectors.DATE).forEach(e=>s3(e,-1,!1,!0))}setDateDescription(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);o&&G(o,!!e,e)}setDateTooltip(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);if(!o)return;let a=o.querySelector(g.selectors.TOOLTIP);a?e!=null&&e.length?a.textContent=e:a.remove():e!=null&&e.length&&o.prepend(q6(e))}setEventWrapperOnDate(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);if(!o)return;let a=o.querySelector(g.selectors.EVENT_WRAPPER);a?e?n2(a):a.remove():e&&o.appendChild(W6(t))}setEvent(t,e){let o=this._dateGrid.querySelector(`#${e3(t.date)}`);o==null||o.appendChild(G6(t,e))}openMenuAsGrid(t,e){this._menu.isConnected&&this._menu.openAsGrid(t,e)}openMenuAsList(t,e){this._menu.openAsList(t,e)}closeMenu(){this._menu.close()}setMenuAnimation(t){this._menu.animationType=t}animateIntoSelectionMenu(t,e,o){this._menu.animateIn(t,e,o)}moveMenuFocusDown(){this._menu.moveFocusDown()}moveMenuFocusBackward(){return this._menu.moveFocusBackward()}moveMenuFocusForward(){return this._menu.moveFocusForward()}moveMenuFocusUp(){this._menu.moveFocusUp()}selectFocusedMenuItem(){this._menu.selectFocusedItem()}setPreventFocusOnMenu(t){this._menu.preventFocus=t}};var Di=class{constructor(t){this._adapter=t;this._dates=[];this._month=new Date().getMonth();this._year=new Date().getFullYear();this._showToday=!0;this._showOtherMonths=!1;this._fixedHeight=!1;this._events=[];this._value=[];this._mode="single";this._readonly=!1;this._selectionFollowsMonth=!1;this._rangeSelectionState="none";this._allowSingleDateRange=!0;this._min=null;this._max=null;this._minAttribute=null;this._maxAttribute=null;this._disabledDates=[];this._disabledDaysOfWeek=[];this._constrainToEnabled=!0;this._showHeader=!0;this._clearButton=!1;this._todayButton=!1;this._view="date";this._menuAnimation="scale";this._menuYear=null;this._listYears=!0;this._menuIncludedYear=new Date().getFullYear();this._menuYearsInView=null;this._yearRange=`-${g.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${g.numbers.DEFAULT_MAX_YEAR_OFFSET}`;this._weekendDays=null;this._localeFirstDayOfWeek=0;this._localeWeekendDays=[];this._rtl=!1;this._preventFocus=!1;this._isInitialized=!1;this._clearButtonListener=()=>this._onClearClicked(),this._dateClickListener=e=>this._onDateClick(e),this._keydownListener=e=>this._onKeydown(e),this._hoverListener=e=>this._onHover(e),this._menuFocusChangeListener=e=>this._onMenuFocusChange(e),this._menuListener=e=>this._onMenuSelect(e),this._monthButtonListener=()=>this._onMonthButtonClicked(),this._nextButtonListener=()=>this._onNextButtonClicked(),this._preventFocusListener=e=>e.preventDefault(),this._previousButtonListener=()=>this._onPreviousButtonClicked(),this._todayButtonListener=()=>this._onTodayClicked(),this._yearButtonListener=()=>this._onYearButtonClicked()}initialize(){this._adapter.registerMenuListener(this._menuListener),this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener),this._adapter.registerKeydownListener(this._keydownListener),this._applyMin(),this._applyMax(),this._applyFixedHeight(),this._applyReadOnly(),this._applyShowToday(),this._applyPreventFocus(),this._applyShowHeader(),this._applyMonth(),this._applyYear(),this._applyListYears(),this._applyMenuAnimation(),this._applyLocale(),this._applyClearButton(),this._applyTodayButton(),this._applyFirstDayOfWeek(),this._applyShowOtherMonths(),this._createDateView(),this._applyConstrainToEnabled(),this._applyAllowSingleDateRange(),this._applyMode(),this._applyYearRange(),this._applySelectionFollowsMonth(),this._isInitialized=!0}destroy(){this._isInitialized=!1}_onMonthButtonClicked(){this._toggleMonthMenu()}_toggleMonthMenu(t=!1){this._view!=="month"?this._openMonthMenu(t):this._closeMenu(!1,t)}_onYearButtonClicked(){this._toggleYearMenu()}_toggleYearMenu(t=!1){this._view!=="year"?this._openYearMenu(t):this._closeMenu(!1,t)}_onMenuFocusChange(t){this._emitFocusChangeEvent(t.detail)}_onMenuSelect(t){switch(this._view){case"month":this._onMonthSelected(t.detail);break;case"year":this._onYearSelected(t.detail);break}}_onNextButtonClicked(){this._view==="date"?(this._goToNextMonth(),this._setFocusInMonth(1,!1)):this._view==="month"?this._goToNextYear():this._goToNextSetOfYears()}_onPreviousButtonClicked(){this._view==="date"?(this._goToPreviousMonth(),this._setFocusInMonth(2,!1)):this._view==="month"?this._goToPreviousYear():this._goToPreviousSetOfYears()}_onHover(t){if(this._mode==="range"){let e=Vn(t,!1);if(!e)return;let o=new Date(Date.parse(e.getAttribute(g.attributes.DATA_DATE)));xt(o,this._month,this._year)&&this._setRangePreview(o)}}_onDateClick(t){let e=Vn(t,!1);if(!e)return;let o=e.getAttribute(g.attributes.DATA_DATE);if(!o)return;let a=new Date(o);xt(a,this._month,this._year)&&(this._focusedDate=a,this._beforeDateSelected(a)),this._resumeTabindexOnDate(!1)}_onKeydown(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this._handleArrowKey(t);break;case"Home":case"End":case"PageUp":case"PageDown":this._handleNavigationKey(t);break;case" ":case"Enter":this._handleEnterOrSpaceKey(t);break;case"m":case"M":t.preventDefault(),this._toggleMonthMenu(!0);break;case"y":case"Y":t.preventDefault(),this._toggleYearMenu(!0);break;case"t":case"T":case"n":case"N":t.preventDefault(),this.today();break;case"Delete":case"Backspace":t.preventDefault(),this._deselectAllDates();break;case"Escape":this._view!=="date"&&(t.preventDefault(),t.stopPropagation(),this._closeMenu(!1,!0));break}}_handleArrowKey(t){if(!c3(t,this._view,this._preventFocus))return;t.preventDefault();let e;switch(t.key){case"ArrowLeft":e=this._rtl?"next":"previous";break;case"ArrowRight":e=this._rtl?"previous":"next";break;case"ArrowUp":e="up";break;case"ArrowDown":e="down";break}switch(e){case"previous":this._view==="date"?this._moveFocusToPreviousDate(!0):!this._adapter.moveMenuFocusBackward()&&this._canGoBackward()&&(this._view==="month"?this._goToPreviousYear(!0):this._goToPreviousSetOfYears(!0));break;case"next":this._view==="date"?this._moveFocusToNextDate(!0):!this._adapter.moveMenuFocusForward()&&this._canGoForward()&&(this._view==="month"?this._goToNextYear(!0):this._goToNextSetOfYears(!0));break;case"up":this._view==="date"?this._moveFocusToPreviousWeek(!0):this._adapter.moveMenuFocusUp();break;case"down":this._view==="date"?this._moveFocusToNextWeek(!0):this._adapter.moveMenuFocusDown();break}this._mode==="range"&&this._setRangePreview(this._focusedDate)}_handleNavigationKey(t){switch(t.preventDefault(),t.key){case"Home":if(this._view!=="date")break;t.shiftKey?this._moveFocusToFirstOfMonth(!0):this._moveFocusToFirstOfWeek(!0);break;case"End":if(this._view!=="date")break;t.shiftKey?this._moveFocusToLastOfMonth(!0):this._moveFocusToLastOfWeek(!0);break;case"PageUp":this._view==="date"?t.shiftKey?this._moveFocusToPreviousYear(!0):this._moveFocusToPreviousMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoBackward()?this._goToPreviousYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoBackward()&&this._goToPreviousSetOfYears(!0);break;case"PageDown":this._view==="date"?t.shiftKey?this._moveFocusToNextYear(!0):this._moveFocusToNextMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoForward()?this._goToNextYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoForward()&&this._goToNextSetOfYears(!0);break}}_handleEnterOrSpaceKey(t){if(c3(t,this._view,this._preventFocus))switch(t.preventDefault(),this._view){case"date":if(this._readonly)break;this._setSelectOnFocusedDate();break;case"month":case"year":this._adapter.selectFocusedMenuItem();break}}_onMonthSelected(t){this._year!==this._menuYear&&this._menuYear!=null&&(this._year=this._menuYear,this._setYear()),this._month=t,this._setMonth(!0),this._trySetValueMonthAndYear(this._month,this._year,"month"),this._closeMenu(!0)}_onYearSelected(t){this._year=t,this._setYear(!0),this._trySetValueMonthAndYear(this._month,this._year,"year"),this._closeMenu(!0)}_onClearClicked(){this.clear()}_onTodayClicked(){this.today()}_trySetValueMonthAndYear(t,e,o="date"){var r;if(!this.selectionFollowsMonth||this._mode!=="single"||!((r=this._value)!=null&&r.length))return;let a=new Date(this._value[0]),s=Tl(t,e);a.setDate(Math.min(a.getDate(),s)),a.setFullYear(e),a.setMonth(t),!ft(a,this._getDisabledDateParams())&&this._beforeDateSelected(a,o)}_setInitialDateFocus(t=!1){let e=new Date;if(xt(e,this._month,this._year)&&!ft(e,this._getDisabledDateParams(!1))){this._setFocusedDate(e,t);return}let o=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(o,1,!1,!0,!0),t)}_resumeTabindexOnDate(t){return xt(this._focusedDate,this._month,this._year)?(this._adapter.setActiveDate(this._focusedDate,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate),!0):!1}_moveFocusToNextDate(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate),t)}_moveFocusToPreviousDate(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate),t)}_moveFocusToNextWeek(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToPreviousWeek(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToFirstOfWeek(t){this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToLastOfWeek(t){this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToFirstOfMonth(t){let e=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(e,1,!1,!0),t)}_moveFocusToLastOfMonth(t){let e=new Date(this._year,this._month+1,0);this._setFocusedDate(this._getPreviousEnabledDate(e,1,!1,!0),t)}_moveFocusToNextMonth(t){let e=En(this._focusedDate,this._dates),o=(this._month+1)%12,a=o===0?this._year+1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,o,a),t)}_moveFocusToPreviousMonth(t){let e=En(this._focusedDate,this._dates),o=this._month===0?11:this._month-1,a=o===11?this._year-1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,o,a),t)}_moveFocusToNextYear(t){let e=En(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year+1),t)}_moveFocusToPreviousYear(t){let e=En(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year-1),t)}_setFocusInMonth(t,e){switch(t){case 1:this._moveFocusToFirstOfMonth(e);break;case 2:this._moveFocusToLastOfMonth(e);break;default:this._resumeTabindexOnDate(e);break}}_setSelectOnFocusedDate(){xt(this._focusedDate,this._month,this._year)&&!ft(this._focusedDate,this._getDisabledDateParams(!1))&&this._beforeDateSelected(this._focusedDate)}_emitFocusChangeEvent(t){let e={type:this._view,value:t};switch(this._view){case"date":e.selected=za(t,this._value),e.text=t.toLocaleDateString(this.locale,{month:"long",day:"2-digit",year:"numeric"});break;case"month":e.selected=this._month===t,e.text=ro(t,"long");break;case"year":e.selected=this._year===t,e.text=y0(t,"numeric");break}this._adapter.emitHostEvent(g.events.FOCUS_CHANGE,e)}_getPreviousEnabledDate(t,e=1,o=!1,a=!1,s=!1){let r=this._getDisabledDateParams(),l=new Date(t);if(a&&!ft(l,r))return l;let h=t.getMonth(),v=!1;do l.setDate(l.getDate()-e),o&&(e=1),(s&&l.getMonth()!==h||this._min&&l<this._min)&&(v=!0);while(!v&&ft(l,r));return v?null:l}_getNextEnabledDate(t,e=1,o=!1,a=!1,s=!1){let r=this._getDisabledDateParams(),l=new Date(t);if(a&&!ft(l,r))return l;let h=t.getMonth(),v=!1;do l.setDate(l.getDate()+e),o&&(e=1),(s&&l.getMonth()!==h||this._max&&l>this._max)&&(v=!0);while(!v&&ft(l,r));return v?null:l}_getClosestEnabledDate(t,e=!1,o=!1){if(this._min&&t<this._min)return this._getFirstEnabledDate();if(this._max&&t>this._max)return this._getLastEnabledDate();let a=this._getDisabledDateParams();if(o&&!ft(t,a))return new Date(t);let s=t.getDate(),r,l=!1,h=!1,v=1;for(;!l||!h;){if(!l){if(r=new Date(t),r.setDate(s+v),l=!xt(r,t.getMonth(),t.getFullYear()),!l&&!ft(r,a))return r;this._max&&r>this._max&&(l=!0)}if(!h){if(r=new Date(t),r.setDate(s-v),h=!xt(r,t.getMonth(),t.getFullYear()),!h&&!ft(r,a))return r;this._min&&r<this._min&&(h=!0)}v+=1}return null}_getFirstEnabledDayOfWeek(t,e=!0){let o=Cn(t),a=this._getDisabledDateParams(e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0),s=0;for(;s<7&&ft(o,a);)o.setDate(o.getDate()+1),a.otherMonth=e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0,s+=1;return s<7?o:null}_getLastEnabledDayOfWeek(t,e=!0){let o=Q6(t),a=this._getDisabledDateParams(e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0),s=0;for(;s<7&&ft(o,a);)o.setDate(o.getDate()-1),a.otherMonth=e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0,s+=1;return s<7?o:null}_getDateAtIndexInMonth(t,e,o){var s;let a=r3(e,o,(s=this._firstDayOfWeek)!=null?s:this._localeFirstDayOfWeek);return this._min&&a[t]<this._min?this._getFirstEnabledDate():this._max&&a[t]>this._max?this._getLastEnabledDate():xt(a[t],e,o)?this._getClosestEnabledDate(a[t],!0):t<20?this._getNextEnabledDate(a[t],7,!0):this._getPreviousEnabledDate(a[t],7,!0)}_getFirstEnabledDate(){return this._min?this._getNextEnabledDate(this._min,1,!1,!0):null}_getLastEnabledDate(){return this._max?this._getPreviousEnabledDate(this._max,1,!1,!0):null}_setFocusedDate(t,e){if(!t)return;let o=this._month!==t.getMonth(),a=this._year!==t.getFullYear();(o||a)&&(o&&(this._month=t.getMonth(),this._setMonth()),a&&(this._year=t.getFullYear(),this._setYear()),this._resetDateGrid()),this._focusedDate=t,this._adapter.setActiveDate(this._focusedDate,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_getDisabledDateParams(t){return{builder:this._disabledDateBuilder,disabledDates:this._disabledDates,disabledDaysOfWeek:this._disabledDaysOfWeek,maxDate:this._max,minDate:this._min,otherMonth:t}}_createDateView(){this._resetDateGrid(),(!this._focusedDate||!this._resumeTabindexOnDate(!1))&&this._setInitialDateFocus()}_openMonthMenu(t=!1){this._view="month",this._menuYear==null&&(this._menuYear=this._year),this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!0),this._adapter.setYearButtonPressed(!1)),this._adapter.openMenuAsGrid(this._getMonthsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.VIEW_CHANGE,this._view)}_openYearMenu(t=!1){var e;this._view="year",this._menuIncludedYear=(e=this._menuYear)!=null?e:this._year,this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!0)),this._listYears?this._adapter.openMenuAsList(this._getYearsForMenu(),t):this._adapter.openMenuAsGrid(this._getYearsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.VIEW_CHANGE,this._view)}_getMonthsForMenu(){var e;let t={locale:this._locale,max:this._max,min:this._min,selectedMonth:this._year===this._menuYear?this._month:-1,selectedYear:(e=this._menuYear)!=null?e:this._year};return ap(t)}_getYearsForMenu(){let t=this._min?this._min.getFullYear():this._minYear,e=this._max?this._max.getFullYear():this._maxYear,o={locale:this._locale,max:e,min:t,selectedYear:this._year,yearInView:this._menuIncludedYear},a=this._listYears?sp(o):np(o);return this._menuYearsInView={min:a[0].value,max:a[a.length-1].value},a}_closeMenu(t,e=!1){this._view="date",this._menuYear=null,this._adapter.closeMenu(),this._adapter.setDateViewHidden(!1),this._adapter.setYear(this._year,this._locale),t&&this._resetDateGrid(),this._showHeader&&(this._setNavButtonLabels(),this._setNavigationButtonStates(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!1)),this._resumeTabindexOnDate(e)||this._setInitialDateFocus(e),this._adapter.emitHostEvent(g.events.VIEW_CHANGE,this._view)}_setNavButtonLabels(){this._adapter.setPreviousButtonLabel(this._view),this._adapter.setNextButtonLabel(this._view)}_resetDateGrid(){var e;this._dates=r3(this._month,this._year,(e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek);let t=this._dates.map(o=>this._getDateConfig(o));this._adapter.setDates(t,{builder:this._dateBuilder,locale:this._locale,showOtherMonths:this._showOtherMonths}),this._setNavigationButtonStates(),this._applyWeekendDays(),this._applyEvents(),this._mode==="range"&&(this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_getDateConfig(t){let e=xt(t,this._month,this._year);return{date:new Date(t),selected:za(t,this._value),today:J6(t),thisMonth:e,disabled:ft(t,this._getDisabledDateParams(!e))}}_getCalendarDate(t){return{date:new Date(t),selected:za(t,this._value),events:ki(t,this._events,this._eventBuilder)}}_setEventsOnDate(t){var a;if(!this._showOtherMonths&&!xt(t,this._month,this._year)){this._adapter.setEventWrapperOnDate(t,!1);return}let e=ki(t,this._events,this._eventBuilder);this._adapter.setEventWrapperOnDate(t,!!e.length),e.forEach((s,r)=>{r>2||this._adapter.setEvent(s,r===2&&e.length>3)});let o=e.length?i3(e):"";this._tooltipBuilder&&(o=(a=this._tooltipBuilder(this._getCalendarDate(t),o))!=null?a:""),this._adapter.setDateTooltip(t,o)}_beforeDateSelected(t,e="date"){this._dateSelectCallback?Promise.resolve(this._dateSelectCallback(this._getCalendarDate(t))).then(o=>{o&&this._onDateSelected(t,void 0,e)}):this._onDateSelected(t,void 0,e)}_onDateSelected(t,e,o="date"){if(this._mode==="range"&&this._emitRangeSelectionEvent(t)){this._applyRangeSelection(t),this._rangeSelectionStore=void 0;return}let a=za(t,this._value),s={date:new Date(t),selected:a,type:o};this._adapter.emitHostEvent(g.events.DATE_SELECT,s,!0,!0)&&(this._rangeSelectionStore=void 0,this._mode==="single"?a&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&(this._value.length&&this._deselectDate(this._value[0]),this._selectDate(t)):a&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&this._selectDate(t),Ai(this._value))}_emitRangeSelectionEvent(t){let e={date:new Date(t),selected:za(t,this._value),type:"date"};switch(this._rangeSelectionState){case"none":case"to":e.range=Fo([t]),e.rangeSelectionState="from";break;case"from":b2(t,this._value[0])?this._allowSingleDateRange?(e.range=Fo([this._value[0],t]),e.rangeSelectionState="to"):(e.range=Fo([]),e.rangeSelectionState="none"):t<this._value[0]?(e.range=Fo([t]),e.rangeSelectionState="from"):(e.range=Fo([this._value[0],t]),e.rangeSelectionState="to");break}return this._adapter.emitHostEvent(g.events.DATE_SELECT,e,!0,!0)}_applyRangeSelection(t){switch(this._rangeSelectionState){case"none":case"to":this._deselectAllDates(),this._selectDate(t),this._adapter.setRange(null),this._adapter.setRangeStart(t),this._rangeSelectionState="from";break;case"from":b2(t,this._value[0])?this._allowSingleDateRange?(this._value.push(t),this._rangeSelectionState="to"):(this._deselectDate(t),this._rangeSelectionState="none"):t<this._value[0]?(this._deselectDate(this._value[0]),this._selectDate(t),this._adapter.setRangeStart(t)):(this._selectDate(t),this._setRangePreview(t),this._rangeSelectionState="to");break}}_setRangePreview(t){switch(this._rangeSelectionState){case"from":if(!t)return;t<this._value[0]?this._adapter.setRange(null):(this._adapter.setRange(Si(this._dates,this._value[0],t)),this._adapter.setRangeEnd(t));break;case"to":this._adapter.setRange(Si(this._dates,this._value[0],this._value[1])),this._adapter.setRangeEnd(this._value[1]);break}}_clearRangePreview(){this._adapter.setRange(null),this._adapter.setRangeStart(null),this._adapter.setRangeEnd(null)}_selectDate(t){this._value.push(t),this._focusedDate=t,this._adapter.setDateSelected(t,!0)}_deselectDate(t){let e=this._value.findIndex(o=>b2(o,t));e>-1&&this._value.splice(e,1),this._adapter.setDateSelected(t,!1)}_deselectAllDates(){this._value.forEach(t=>this._adapter.setDateSelected(t,!1)),this._clearRangePreview(),this._value=[]}_goToDate(t,e){let o=t.getFullYear(),a=t.getMonth();this._focusedDate=t,this._month=a,this._setMonth(),this._year=o,this._setYear(),this._view!=="date"?this._closeMenu(!1,e):this._resetDateGrid(),this._adapter.setActiveDate(t,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_goToNextMonth(){this._month<11?this._month+=1:(this._month=0,this._year+=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToPreviousMonth(){this._month>0?this._month-=1:(this._month=11,this._year-=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToNextYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear+=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"left":"right",t)):(this._year+=1,this._setYear(),this._resetDateGrid())}_goToPreviousYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear-=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"right":"left",t)):(this._year-=1,this._setYear(),this._resetDateGrid())}_goToNextSetOfYears(t=!1){this._menuIncludedYear+=g.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"left":"right",t),this._setNavigationButtonStates()}_goToPreviousSetOfYears(t=!1){this._menuIncludedYear-=g.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"right":"left",t),this._setNavigationButtonStates()}_canGoBackward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._min||this._min<new Date(this._year,this._month,1);case"month":{let o=(e=this._min)==null?void 0:e.getFullYear();return this._menuYear!=null&&(o==null||o<this._menuYear)}case"year":return!!this._menuYearsInView&&this._minYear<this._menuYearsInView.min;default:return!1}}_canGoForward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._max||this._max>l5(this._month,this._year);case"month":{let o=(e=this._max)==null?void 0:e.getFullYear();return this._menuYear!=null&&(o==null||o>this._menuYear)}case"year":return!!this._menuYearsInView&&this._maxYear>this._menuYearsInView.max;default:return!1}}_setNavigationButtonStates(){if(this._showHeader){if(!this._constrainToEnabled){this._adapter.setPreviousButtonDisabled(!1),this._adapter.setNextButtonDisabled(!1);return}this._adapter.setPreviousButtonDisabled(!this._canGoBackward()),this._adapter.setNextButtonDisabled(!this._canGoForward())}}_setMonth(t){this._adapter.setMonth(this._month,this._locale),this._adapter.setHostAttribute(g.attributes.MONTH,this._month.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setYear(t){this._adapter.setYear(this._year,this._locale),this._adapter.setHostAttribute(g.attributes.YEAR,this._year.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setMenuYear(){this._menuYear!=null&&(this._setNavigationButtonStates(),this._adapter.setYear(this._menuYear,this._locale))}_applyAllowSingleDateRange(){this._adapter.toggleHostAttribute(g.attributes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange),this._adapter.setContainerClass(g.classes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange)}_applyClearButton(){this._adapter.toggleHostAttribute(g.attributes.CLEAR_BUTTON,!0,this._clearButton.toString()),this._clearButton?(this._adapter.setFooter(),this._adapter.setClearButton(),this._adapter.registerClearButtonListener(this._clearButtonListener)):(this._adapter.unregisterClearButtonListener(this._clearButtonListener),this._adapter.removeClearButton(),this._todayButton||this._adapter.removeFooter())}_applyConstrainToEnabled(){this._adapter.toggleHostAttribute(g.attributes.CONSTRAIN_TO_ENABLED,!0,this._constrainToEnabled.toString()),this._isInitialized&&this._setNavigationButtonStates()}_applyDateBuilder(){this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyDayBuilder(){var t;this._adapter.setDays(Bi((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale})}_applyDisabledDates(){switch(this._view){case"date":this._dates.forEach(t=>{let e=xt(t,this._month,this._year),o=this._getDisabledDateParams(!e);this._adapter.setDateDisabled(t,ft(t,o))});break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}this._setNavigationButtonStates()}_applyEvents(){this._view==="date"&&this._dates.forEach(t=>{this._setEventsOnDate(t)})}_applyFirstDayOfWeek(){var t,e;this._adapter.toggleHostAttribute(g.attributes.FIRST_DAY_OF_WEEK,O(this._firstDayOfWeek),((t=this._firstDayOfWeek)!=null?t:0).toString()),this._adapter.setDays(Bi((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyFixedHeight(){this._adapter.toggleHostAttribute(g.attributes.FIXED_HEIGHT,this._fixedHeight),this._adapter.setContainerClass(g.classes.FIXED_HEIGHT,this._fixedHeight)}_applyListYears(){this._adapter.toggleHostAttribute(g.attributes.LIST_YEARS,this._listYears),this._isInitialized&&this._view==="year"&&this._openYearMenu()}_applyLocale(){var t;if(this._adapter.toggleHostAttribute(g.attributes.LOCALE,!!this._locale,this._locale),this._adapter.toggleContainerAttribute(!!this._locale,"lang",this._locale),this._localeFirstDayOfWeek=P6(this._locale),this._localeWeekendDays=N6(this._locale),this._applyRtl(),this._isInitialized)switch(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._view){case"date":this._adapter.setDays(Bi((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._resetDateGrid(),this._resumeTabindexOnDate(!1);break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyMenuAnimation(){this._adapter.setHostAttribute(g.attributes.MENU_ANIMATION,this._menuAnimation),this._adapter.setMenuAnimation(this._menuAnimation)}_applyMin(){if(this._adapter.toggleHostAttribute(g.attributes.MIN,!!this._minAttribute,this._minAttribute),this._min){let t=new Date(this._min.getFullYear(),this._min.getMonth(),1),e=new Date(this._year,this._month,1);t>e&&(this._year=this._min.getFullYear(),this._month=this._min.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._min&&this._min>this._focusedDate)){let t=this._getFirstEnabledDate();t&&this._goToDate(t,!1)}}_applyMax(){if(this._adapter.toggleHostAttribute(g.attributes.MAX,!!this._maxAttribute,this._maxAttribute),this._max){let t=new Date(this._max.getFullYear(),this._max.getMonth(),1),e=new Date(this._year,this._month,1);t<e&&(this._year=this._max.getFullYear(),this._month=this._max.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._max&&this._max<this._focusedDate)){let t=this._getLastEnabledDate();t&&this._goToDate(t,!1)}}_applyMode(t){switch(this._mode){case"single":this._applySingleMode();break;case"multiple":this._applyMultipleMode(t==="range");break;case"range":this._applyRangeMode();break}this._mode!=="range"&&(this._rangeSelectionState="none",this._adapter.unregisterHoverListener(this._hoverListener),this._clearRangePreview())}_applySingleMode(){if(this._adapter.setHostAttribute(g.attributes.MODE,"single"),this._adapter.setMultiple(!1),this._value.length>1)for(let t=this._value.length-2;t>=0;t-=1)this._deselectDate(this._value[t])}_applyMultipleMode(t=!1){if(this._adapter.setHostAttribute(g.attributes.MODE,"multiple"),this._adapter.setMultiple(!0),t){let e=rp(this._value,this._getDisabledDateParams());this._deselectAllDates(),e.forEach(o=>{this._selectDate(o)})}}_applyRangeMode(){var e,o;this._adapter.setHostAttribute(g.attributes.MODE,"range"),this._adapter.setMultiple(!1);let t=Ti(this._value);this._deselectAllDates(),t.forEach(a=>{this._selectDate(a)}),this._rangeSelectionState=this._value[0]?this._value[1]?"to":"from":"none",this._adapter.registerHoverListener(this._hoverListener),this._adapter.setRange(Si(this._dates,this._value[0],this._value[1])),this._adapter.setRangeStart((e=this._value[0])!=null?e:null),this._adapter.setRangeEnd((o=this._value[1])!=null?o:null)}_applyMonth(){this._setMonth(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyPreventFocus(){this._adapter.toggleHostAttribute(g.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setContainerClass(g.classes.PREVENT_FOCUS,this._preventFocus),this._adapter.setPreventFocusOnMenu(this._preventFocus),this._preventFocus?this._adapter.registerPreventFocusListener(this._preventFocusListener):this._adapter.unregisterPreventFocusListener(this._preventFocusListener),this._isInitialized&&this._view==="date"&&this._resumeTabindexOnDate(!1)}_applyReadOnly(){this._adapter.toggleHostAttribute(g.attributes.READONLY,this._readonly),this._adapter.toggleHostAttribute("aria-readonly",this._readonly,"true"),this._adapter.setContainerClass(g.classes.READONLY,this._readonly),this._readonly?(this._adapter.unregisterDateClickListener(this._dateClickListener),this._adapter.unregisterHoverListener(this._hoverListener)):(this._adapter.registerDateClickListener(this._dateClickListener),this._mode==="range"&&this._adapter.registerHoverListener(this._hoverListener))}_applyRtl(){this._rtl=R6(this._locale),this._adapter.setContainerClass(g.classes.RTL,this._rtl),this._adapter.toggleContainerAttribute(this._rtl,"dir","rtl")}_applySelectionFollowsMonth(){this._adapter.setHostAttribute(g.attributes.SELECTION_FOLLOWS_MONTH,this._selectionFollowsMonth.toString())}_applyShowHeader(){this._adapter.toggleHostAttribute(g.attributes.SHOW_HEADER,this._showHeader,this._showHeader.toString()),this._showHeader?(this._adapter.setHeader(),this._adapter.registerMonthButtonListener(this._monthButtonListener),this._adapter.registerNextButtonListener(this._nextButtonListener),this._adapter.registerPreviousButtonListener(this._previousButtonListener),this._adapter.registerYearButtonListener(this._yearButtonListener),this._setNavButtonLabels()):(this._adapter.unregisterMonthButtonListener(this._monthButtonListener),this._adapter.unregisterNextButtonListener(this._nextButtonListener),this._adapter.unregisterPreviousButtonListener(this._previousButtonListener),this._adapter.unregisterYearButtonListener(this._yearButtonListener),this._adapter.removeHeader()),this._isInitialized&&(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._setNavigationButtonStates())}_applyShowOtherMonths(){if(this._adapter.toggleHostAttribute(g.attributes.SHOW_OTHER_MONTHS,this._showOtherMonths),this._isInitialized&&this._view==="date"){let t=!1;this._dates.forEach((e,o)=>{xt(e,this._month,this._year)||((o===g.numbers.PENULTIMATE_WEEK_BEGIN_INDEX||o===g.numbers.FINAL_WEEK_BEGIN_INDEX)&&(t=!0),this._showOtherMonths&&!t?this._adapter.replaceDate(this._getDateConfig(e),{builder:this._dateBuilder,locale:this._locale}):this._adapter.replaceDateWithSpacer(e),this._setEventsOnDate(e),this._applyWeekendDays())})}}_applyShowToday(){this._adapter.toggleHostAttribute(g.attributes.SHOW_TODAY,this._showToday),this._adapter.setContainerClass(g.classes.SHOW_TODAY,this._showToday)}_applyTodayButton(){this._adapter.toggleHostAttribute(g.attributes.TODAY_BUTTON,!0,this._todayButton.toString()),this._todayButton?(this._adapter.setFooter(),this._adapter.setTodayButton(),this._adapter.registerTodayButtonListener(this._todayButtonListener)):(this._adapter.unregisterTodayButtonListener(this._todayButtonListener),this._adapter.removeTodayButton(),this._clearButton||this._adapter.removeFooter())}_applyTooltipBuilder(){this._view==="date"&&this._dates.forEach(t=>{var a;if(!this._showOtherMonths&&!xt(t,this._month,this._year))return;let e=ki(t,this._events,this._eventBuilder),o=i3(e);this._tooltipBuilder&&(o=(a=this._tooltipBuilder(this._getCalendarDate(t),o))!=null?a:""),this._adapter.setDateTooltip(t,o)})}_applyWeekendDays(){var e;let t=(e=this._weekendDays)!=null?e:this._localeWeekendDays;this._view==="date"&&this._dates.forEach(o=>{let a=o.getDay();this._adapter.setWeekend(o,(this._showOtherMonths||xt(o,this._month,this._year))&&t.includes(a))})}_applyValue(t){t=t.map(e=>new Date(e)),Ai(t),this._deselectAllDates(),t.forEach(e=>this._selectDate(e)),this._mode==="range"&&(this._rangeSelectionState=this._value.length===2?"to":this._value.length===1?"from":"none",this._clearRangePreview(),this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_applyView(){switch(this._adapter.setHostAttribute(g.attributes.VIEW,this._view),this._view){case"date":this._closeMenu();break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyYear(){this._setYear(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyYearRange(){this._adapter.setHostAttribute(g.attributes.YEAR_RANGE,this._yearRange);let t=op(this._yearRange);this._minYear=t.min,this._maxYear=t.max,this._view==="year"&&(this._openYearMenu(),this._setNavigationButtonStates())}get activeDate(){return new Date(this._focusedDate)}get allowSingleDateRange(){return this._allowSingleDateRange}set allowSingleDateRange(t){this._allowSingleDateRange!==t&&(this._allowSingleDateRange=t,this._applyAllowSingleDateRange())}get clearButton(){return this._clearButton}set clearButton(t){this._clearButton!==t&&(this._clearButton=t,this._isInitialized&&this._applyClearButton())}get clearCallback(){return this._clearCallback}set clearCallback(t){this._clearCallback=t}get constrainToEnabled(){return this._constrainToEnabled}set constrainToEnabled(t){this._constrainToEnabled!==t&&(this._constrainToEnabled=t,this._isInitialized&&this._applyConstrainToEnabled())}get dateBuilder(){return this._dateBuilder}set dateBuilder(t){this._dateBuilder=t,this._isInitialized&&this._applyDateBuilder()}get dateSelectCallback(){return this._dateSelectCallback}set dateSelectCallback(t){this._dateSelectCallback=t}get dayBuilder(){return this.dayBuilder}set dayBuilder(t){this._dayBuilder=t,this._isInitialized&&this._applyDayBuilder()}get disabledDateBuilder(){return this._disabledDateBuilder}set disabledDateBuilder(t){this._disabledDateBuilder=t,this._isInitialized&&this._applyDisabledDates()}get disabledDates(){let t=this._disabledDates.map(e=>new Date(e));return t.length?t:null}set disabledDates(t){let e=t?ht(t)?t:[t]:[];this._disabledDates=e.map(o=>{let a=new Date(o);return a.setHours(0,0,0,0),a}),this._isInitialized&&this._applyDisabledDates()}get disabledDaysOfWeek(){return this._disabledDaysOfWeek.length?[...this._disabledDaysOfWeek]:null}set disabledDaysOfWeek(t){this._disabledDaysOfWeek=O(t)?ht(t)?t:[t]:[],this._isInitialized&&this._applyDisabledDates()}get eventBuilder(){return this._eventBuilder}set eventBuilder(t){this._eventBuilder=t,this._isInitialized&&this._applyEvents()}get events(){return this._events?[...this._events]:null}set events(t){this._events=t!=null&&t.length?[...t]:[],this._isInitialized&&this._applyEvents()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(t){this._firstDayOfWeek!==t&&(this._firstDayOfWeek=O(t)?+t:t,this._isInitialized&&this._applyFirstDayOfWeek())}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){this._fixedHeight!==t&&(this._fixedHeight=t,this._isInitialized&&this._applyFixedHeight())}get listYears(){return this._listYears}set listYears(t){this._listYears!==t&&(this._listYears=t,this._applyListYears())}get locale(){return this._locale}set locale(t){typeof t=="string"&&!t.length&&(t=void 0),this._locale!==t&&(this._locale=t,this._isInitialized&&this._applyLocale())}get max(){return this._max}set max(t){var e;this._maxAttribute!==t&&(this._maxAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._max=l3(t),this._applyMax())}get menuAnimation(){return this._menuAnimation}set menuAnimation(t){this._menuAnimation!==t&&(this._menuAnimation=t,this._isInitialized&&this._applyMenuAnimation())}get min(){return this._min}set min(t){var e;this._minAttribute!==t&&(this._minAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._min=l3(t),this._applyMin())}get mode(){return this._mode}set mode(t){if(this._mode!==t){let e=this._mode;this._mode=t,this._isInitialized&&this._applyMode(e)}}get month(){return this._month}set month(t){if(this._month!==t){let e=isNaN(+t)?this._month:+t;if(this._month===e)return;this._month=+t,this._isInitialized&&this._applyMonth()}}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._isInitialized&&this._applyPreventFocus())}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._isInitialized&&this._applyReadOnly())}get selectionFollowsMonth(){return this._selectionFollowsMonth}set selectionFollowsMonth(t){this._selectionFollowsMonth!==t&&(this._selectionFollowsMonth=t,this._isInitialized&&this._applySelectionFollowsMonth())}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader!==t&&(this._showHeader=t,this._isInitialized&&this._applyShowHeader())}get showOtherMonths(){return this._showOtherMonths}set showOtherMonths(t){this._showOtherMonths!==t&&(this._showOtherMonths=t,this._isInitialized&&this._applyShowOtherMonths())}get showToday(){return this._showToday}set showToday(t){this._showToday!==t&&(this._showToday=t,this._isInitialized&&this._applyShowToday())}get todayButton(){return this._todayButton}set todayButton(t){this._todayButton!==t&&(this._todayButton=t,this._isInitialized&&this._applyTodayButton())}get todayCallback(){return this._todayCallback}set todayCallback(t){this._todayCallback=t}get tooltipBuilder(){return this._tooltipBuilder}set tooltipBuilder(t){this._tooltipBuilder=t,this._isInitialized&&this._applyTooltipBuilder()}get value(){var e;if(this._mode==="range")return(e=this._rangeSelectionStore)!=null?e:Fo(this._value);let t=this._value.map(o=>new Date(o));return this._mode==="multiple"?t:t.length?t[0]:null}set value(t){let e=[];if(this._rangeSelectionStore=void 0,!t||Array.isArray(t)&&!t.length)this._value=[];else if(Array.isArray(t))switch(this._mode){case"single":e=[t[0]];break;case"multiple":e=t;break;case"range":{let o=Ti(t);e.push(o[0]),o.length>1&&e.push(o[1]);break}}else G2(new Date(t))?e=[t]:(this._rangeSelectionStore=new l2(t),e=ep(t));this._applyValue(e)}get view(){return this._view}set view(t){this._view!==t&&(this._view=t,this._applyView())}get weekendDays(){return this._weekendDays?[...this._weekendDays]:null}set weekendDays(t){var e;this._weekendDays=(e=t==null?void 0:t.map(o=>+o))!=null?e:null,this._isInitialized&&this._applyWeekendDays()}get year(){return this._year}set year(t){if(this._year!==t){let e=isNaN(+t)?this._year:+t;if(this._year===e)return;this._year=e,this._isInitialized&&this._applyYear()}}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._applyYearRange())}clear(){this._deselectAllDates(),this._clearCallback&&this._clearCallback()}deselectDate(t,e){this._onDateSelected(t,!1),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}goToDate(t,e){this._goToDate(t,e!=null?e:!1)}handleExternalKeyEvent(t){this._onKeydown(t)}layout(){this._applyFirstDayOfWeek(),this._createDateView(),this._applyShowHeader(),this._applyConstrainToEnabled()}selectDate(t,e){this._onDateSelected(t,!0),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}setActiveDate(t,e){return this._dates.some(o=>b2(o,t)&&(this._showOtherMonths||xt(o,this._month,this._year)))?(this._goToDate(t,e!=null?e:!1),!0):!1}today(){let t=new Date;t.setHours(0,0,0,0),this._goToDate(t,!0),this._todayCallback&&this._todayCallback()}toggleDate(t,e){this._onDateSelected(t)}};var C_='<template><div class="forge-calendar" part="root"><div id="view" class="forge-calendar__view" part="view"><div id="date-view" class="forge-calendar__date-view" role="grid" part="date-view"><div role="rowgroup" part="date-view-container"><div id="day-row" class="forge-calendar__date-view__row" role="row" part="date-view-row"></div></div><div id="date-grid" class="forge-calendar__date-grid" role="rowgroup" part="date-grid-container"></div></div><forge-calendar-menu id="menu" part="calendar-menu"></forge-calendar-menu></div></div></template>',E_='.forge-calendar{width:var(--forge-calendar-width,100%);height:fit-content;position:relative}.forge-calendar__header{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__footer{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);display:flex;justify-content:center;align-items:center;min-width:0;padding:0;font-weight:700;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:""}.forge-calendar__date{margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:""}.forge-calendar__date forge-focus-indicator{--forge-focus-indicator-shape:50%}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:flex;justify-content:center;align-items:center;border-radius:inherit;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:var(--forge-theme-primary,#3f51b5);border-color:var(--forge-theme-primary,#3f51b5)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:var(--forge-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){cursor:pointer}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:var(--forge-theme-primary-container-minimum,#f7f8fc);color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar__date[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:""}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:var(--forge-theme-primary,#3f51b5);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{transition:transform .2s;transform:scale(1.15);transform-origin:center}.forge-calendar__event{font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{background-color:var(--forge-theme-surface,#fff);color:var(--forge-theme-on-surface,#000);border-radius:50%}.forge-calendar__event__wrapper{display:flex;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{transform:rotate(180deg)}#accessible-header{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}#month-button forge-icon{transition:transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{transform:rotate(180deg)}#year-button forge-icon{transition:transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:var(--forge-theme-surface, #ffffff);display:inline-block}:host([hidden]){display:none}:host([forge-popover-context=true]){--forge-calendar-event-stroke-color:var(--forge-theme-surface-bright, #ffffff)}',v1=class extends M{static get observedAttributes(){return[g.attributes.ALLOW_SINGLE_DATE_RANGE,g.attributes.CLEAR_BUTTON,g.attributes.CONSTRAIN_TO_ENABLED,g.attributes.FIRST_DAY_OF_WEEK,g.attributes.FIXED_HEIGHT,g.attributes.LIST_YEARS,g.attributes.LOCALE,g.attributes.MAX,g.attributes.MENU_ANIMATION,g.attributes.MIN,g.attributes.MODE,g.attributes.MONTH,g.attributes.PREVENT_FOCUS,g.attributes.READONLY,g.attributes.SELECTION_FOLLOWS_MONTH,g.attributes.SHOW_HEADER,g.attributes.SHOW_OTHER_MONTHS,g.attributes.SHOW_TODAY,g.attributes.TODAY_BUTTON,g.attributes.VIEW,g.attributes.YEAR,g.attributes.YEAR_RANGE]}constructor(){super(),X.define([v0,ze,A0,bl,rl]),H(this,C_,E_),this._core=new Di(new Oi(this))}connectedCallback(){!this.hasAttribute(g.attributes.POPOVER_CONTEXT)&&Yo(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(g.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case g.attributes.ALLOW_SINGLE_DATE_RANGE:this.allowSingleDateRange=p(o);break;case g.attributes.CLEAR_BUTTON:this.clearButton=p(o);break;case g.attributes.CONSTRAIN_TO_ENABLED:this.constrainToEnabled=p(o);break;case g.attributes.FIRST_DAY_OF_WEEK:this.firstDayOfWeek=K(o);break;case g.attributes.FIXED_HEIGHT:this.fixedHeight=p(o);break;case g.attributes.LIST_YEARS:this.listYears=p(o);break;case g.attributes.LOCALE:this.locale=o;break;case g.attributes.MAX:this.max=o;break;case g.attributes.MENU_ANIMATION:this.menuAnimation=o;break;case g.attributes.MIN:this.min=o;break;case g.attributes.MODE:this.mode=o;break;case g.attributes.MONTH:this.month=K(o);break;case g.attributes.PREVENT_FOCUS:this.preventFocus=p(o);break;case g.attributes.READONLY:this.readonly=p(o);break;case g.attributes.SELECTION_FOLLOWS_MONTH:this.selectionFollowsMonth=p(o);break;case g.attributes.SHOW_HEADER:this.showHeader=p(o);break;case g.attributes.SHOW_OTHER_MONTHS:this.showOtherMonths=p(o);break;case g.attributes.SHOW_TODAY:this.showToday=p(o);break;case g.attributes.TODAY_BUTTON:this.todayButton=p(o);break;case g.attributes.VIEW:this.view=o;break;case g.attributes.YEAR:this.year=K(o);break;case g.attributes.YEAR_RANGE:this.yearRange=o;break}}clear(){this._core.clear()}deselectDate(t){this._core.deselectDate(new Date(t))}goToDate(t,e){this._core.goToDate(new Date(t),e)}handleKey(t){this._core.handleExternalKeyEvent(t)}layout(){this._core.layout()}selectDate(t){this._core.selectDate(new Date(t))}setActiveDate(t,e){return this._core.setActiveDate(new Date(t),e)}today(){this._core.today()}toggleDate(t,e){this._core.toggleDate(new Date(t),e)}};i([c({set:!1})],v1.prototype,"activeDate",2),i([c()],v1.prototype,"allowSingleDateRange",2),i([c()],v1.prototype,"clearButton",2),i([c()],v1.prototype,"clearCallback",2),i([c()],v1.prototype,"constrainToEnabled",2),i([c()],v1.prototype,"dateBuilder",2),i([c()],v1.prototype,"dateSelectCallback",2),i([c()],v1.prototype,"dayBuilder",2),i([c()],v1.prototype,"disabledDateBuilder",2),i([c()],v1.prototype,"disabledDates",2),i([c()],v1.prototype,"disabledDaysOfWeek",2),i([c()],v1.prototype,"eventBuilder",2),i([c()],v1.prototype,"events",2),i([c()],v1.prototype,"firstDayOfWeek",2),i([c()],v1.prototype,"fixedHeight",2),i([c()],v1.prototype,"listYears",2),i([c()],v1.prototype,"locale",2),i([c()],v1.prototype,"max",2),i([c()],v1.prototype,"menuAnimation",2),i([c()],v1.prototype,"min",2),i([c()],v1.prototype,"mode",2),i([c()],v1.prototype,"month",2),i([c()],v1.prototype,"preventFocus",2),i([c()],v1.prototype,"readonly",2),i([c()],v1.prototype,"selectionFollowsMonth",2),i([c()],v1.prototype,"showHeader",2),i([c()],v1.prototype,"showOtherMonths",2),i([c()],v1.prototype,"showToday",2),i([c()],v1.prototype,"todayButton",2),i([c()],v1.prototype,"todayCallback",2),i([c()],v1.prototype,"tooltipBuilder",2),i([c()],v1.prototype,"value",2),i([c()],v1.prototype,"view",2),i([c()],v1.prototype,"weekendDays",2),i([c()],v1.prototype,"year",2),i([c()],v1.prototype,"yearRange",2),v1=i([y({name:g.elementName,dependencies:[T2,je,i1,j,m1,r1,J]})],v1);var ip=class extends Z1{constructor(t){super(t)}_build(){return document.createElement(g.elementName)}onDateSelect(t){this._element.addEventListener(g.events.DATE_SELECT,t)}onFocusChange(t){this._element.addEventListener(g.events.FOCUS_CHANGE,t)}onMonthChange(t){this._element.addEventListener(g.events.MONTH_CHANGE,t)}onViewChange(t){this._element.addEventListener(g.events.VIEW_CHANGE,t)}};var B_={POPUP:"forge-calendar-dropdown__popup"},lp={classes:B_};var Ha=class{constructor(t,e){this._popupClasses=[];this.targetElement=t,this.id=e}get isOpen(){var t,e;return(e=(t=this.dropdownElement)==null?void 0:t.open)!=null?e:!1}get popupClasses(){return this._popupClasses}set popupClasses(t){this._popupClasses=t?ht(t)?[...t]:[t]:[]}get locale(){var t;return(t=this.calendar)==null?void 0:t.locale}set locale(t){this.calendar&&(this.calendar.locale=t)}async close({force:t=!1}={}){var e;this.dropdownElement&&(t?this.dropdownElement.open=!1:await this.dropdownElement.hideAsync(),(e=this.dropdownElement)==null||e.remove(),this.dropdownElement=void 0,this.calendar=void 0)}destroy(){this.close({force:!0})}open(t){var a,s;this.calendar=this._createCalendar(t),this._announcerElement=Fn(),this._announcerElement.id=`${this.id}-activedescendant`,this.dropdownElement=this._createDropdown(),this.dropdownElement.appendChild(this.calendar),this.dropdownElement.appendChild(this._announcerElement),this.calendar.addEventListener(g.events.FOCUS_CHANGE,r=>{var h;let l=`${this.id}-activedescendent-`;switch(r.detail.type){case"date":l+=rt(r.detail.value);break;case"month":l+=`month-${r.detail.value.toString()}`;break;case"year":l+=`year-${r.detail.value.toString()}`;break}(h=this.activeChangeCallback)==null||h.call(this,l),this._announcerElement&&(this._announcerElement.id=l,this._announcerElement.setAttribute("aria-selected",r.detail.selected.toString()),this._announcerElement.textContent=r.detail.text)});let e=(a=this.targetElement.ownerDocument)!=null?a:document;((s=Jn(Q.selectors.HOST,this.targetElement))!=null?s:e.body).appendChild(this.dropdownElement),this.dropdownElement.open=!0}propagateKeyboardEvent(t){var e;(e=this.calendar)==null||e.handleKey(t)}_createCalendar(t){let e=document.createElement(g.elementName);return Object.assign(e,t),e}_createDropdown(){let t=document.createElement("forge-popover");return t.anchorElement=this.targetElement,t.placement="bottom-start",t.persistent=!0,t.classList.add(lp.classes.POPUP),t.id=this.id,t.classList.add(...this._popupClasses),t.addEventListener(Q.events.TOGGLE,()=>{var e;return(e=this.closeCallback)==null?void 0:e.call(this)}),t}};function cp(){f(v1)}var A_=":host{display:block}:host([hidden]){display:none}.forge-card{--_card-background:var(--forge-card-background, var(--forge-theme-surface, #ffffff));--_card-height:var(--forge-card-height, 100%);--_card-width:var(--forge-card-width, 100%);--_card-outline-color:var(--forge-card-outline-color, var(--forge-theme-outline, #e0e0e0));--_card-outline-width:var(--forge-card-outline-width, var(--forge-border-thin, 1px));--_card-outline-style:var(--forge-card-outline-style, solid);--_card-elevation:var(--forge-card-elevation, none);--_card-padding:var(--forge-card-padding, var(--forge-spacing-medium, 16px));--_card-shape:var(--forge-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_card-overflow:var(--forge-card-overflow, initial);--_card-raised-elevation:var(--forge-card-raised-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_card-raised-outline-width:var(--forge-card-raised-outline-width, 0)}.forge-card{background:var(--_card-background);border-color:var(--_card-outline-color);border-width:var(--_card-outline-width);border-style:var(--_card-outline-style);border-radius:var(--_card-shape);box-shadow:var(--_card-elevation);box-sizing:border-box;padding:var(--_card-padding);overflow:var(--_card-overflow);height:var(--_card-height);width:var(--_card-width);-webkit-tap-highlight-color:transparent}:host(:where([raised],:state(raised))) .forge-card{--_card-elevation:var(--_card-raised-elevation);--_card-outline-width:var(--_card-raised-outline-width)}:host([no-padding]) .forge-card{--_card-padding:var(--forge-card-padding, 0)}",hp="forge-card",vp,pp,Bn,M0=class extends(pp=wt,vp=q2,pp){constructor(){super();Nn(this,Bn);this.raised=!1;Rn(this,Bn,this.attachInternals())}willUpdate(e){e.has("raised")&&He(Go(this,Bn),"raised",this.raised)}render(){return gt`<div class="forge-card" part="root"><slot></slot></div>`}};Bn=new WeakMap,M0.styles=dt(A_),M0[vp]=hp,i([u1({type:Boolean,reflect:!0})],M0.prototype,"raised",2),M0=i([kt(hp)],M0);var T_=`${b}card`,mp={RAISED:"raised"},S_=d({},mp),Bc1={elementName:T_,observedAttributes:mp,attributes:S_};function dp(){f(M0)}var k_=`${b}circular-progress`,O_={DETERMINATE:"determinate",PROGRESS:"progress",THEME:"theme",TRACK:"track"},D_={INDETERMINATE:"forge-circular-progress--indeterminate"},P_={ROOT:".forge-circular-progress",DETERMINATE_PROGRESS_CIRCLE:".progress",TEMPLATES:"svg, .spinner"},S2={elementName:k_,attributes:O_,classes:D_,selectors:P_};var N_='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle></svg><div class="spinner"><div class="left"><div class="circle"></div></div><div class="right"><div class="circle"></div></div></div>',R_='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle><circle class="track" pathLength="100"></circle><circle class="progress" pathLength="100" stroke-dashoffset="100"></circle></svg>',Pi=class extends I{constructor(t){super(t),this._rootElement=w(this._component,S2.selectors.ROOT)}initialize(){this._component[N]({role:"progressbar",ariaValueMin:"0",ariaValueMax:"1"})}setDeterminate(t){this._tryResetTemplate(),this._rootElement.classList.toggle(S2.classes.INDETERMINATE,!t),t?(this._rootElement.insertAdjacentHTML("beforeend",R_),this._determinateProgressCircleElement=w(this._component,S2.selectors.DETERMINATE_PROGRESS_CIRCLE)):(this._rootElement.insertAdjacentHTML("beforeend",N_),this._component[N]({ariaValueNow:null}),this._determinateProgressCircleElement=void 0)}setProgress(t){var e;this._component[N]({ariaValueNow:`${t}`}),(e=this._determinateProgressCircleElement)==null||e.setAttribute("stroke-dashoffset",`${(1-t)*100}`)}_tryResetTemplate(){var e;let t=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll(S2.selectors.TEMPLATES);t==null||t.forEach(o=>o.remove())}};var Ni=class{constructor(t){this._adapter=t;this._determinate=!1;this._progress=0;this._theme="primary";this._track=!1}initialize(){this._adapter.tryApplyGlobalConfiguration(["track"]),this._adapter.initialize(),this._applyDeterminate()}_applyDeterminate(){this._adapter.setDeterminate(this._determinate),this._determinate&&this._adapter.setProgress(this._progress)}get determinate(){return this._determinate}set determinate(t){t=!!t,this._determinate!==t&&(this._determinate=t,this._applyDeterminate(),this._adapter.toggleHostAttribute(S2.attributes.DETERMINATE,this._determinate))}get progress(){return this._progress}set progress(t){isNaN(t)&&(t=0),this._progress!==t&&(this._progress=t,this._determinate&&this._adapter.setProgress(this._progress),this._adapter.setHostAttribute(S2.attributes.PROGRESS,`${this._progress}`))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(S2.attributes.THEME,!!this._theme,this._theme))}get track(){return this._track}set track(t){t=!!t,this._track!==t&&(this._track=t,this._adapter.toggleHostAttribute(S2.attributes.TRACK,this._track))}};var F_='<template><div class="forge-circular-progress" part="progressbar"><slot class="center-content"></slot></div></template>',U_=":host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:inline-flex;vertical-align:middle;block-size:var(--_circular-progress-size);inline-size:var(--_circular-progress-size);position:relative;align-items:center;justify-content:center;transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;animation:linear infinite linear-rotate;animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;animation:infinite both rotate-arc;animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host(:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5))}:host([theme=primary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}",Pt=class extends V1(L1(M)){static get observedAttributes(){return[S2.attributes.DETERMINATE,S2.attributes.PROGRESS,S2.attributes.THEME,S2.attributes.TRACK]}constructor(){super(),H(this,F_,U_),this._core=new Ni(new Pi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case S2.attributes.DETERMINATE:this.determinate=p(o);break;case S2.attributes.PROGRESS:this.progress=K(o);break;case S2.attributes.THEME:this.theme=o;break;case S2.attributes.TRACK:this.track=p(o);break}}};i([c()],Pt.prototype,"determinate",2),i([c()],Pt.prototype,"progress",2),i([c()],Pt.prototype,"theme",2),i([c()],Pt.prototype,"track",2),Pt=i([y({name:S2.elementName})],Pt);function gp(){f(Pt)}var wp=`${b}color-picker`,W_={VALUE:"value",ALLOW_OPACITY:"allow-opacity",DEBOUNCE_CHANGE_EVENT:"debounce-change-event"},G_={SLIDER_THUMB_ACTIVE:"forge-color-picker__slider-thumb--active",GRADIENT_THUMB_ACTIVE:"forge-color-picker__gradient-thumb--active"},q_={GRADIENT:".forge-color-picker__gradient",GRADIENT_THUMB:".forge-color-picker__gradient-thumb",PREVIEW_COLOR:".forge-color-picker__color-preview",HEX_INPUT:"#forge-color-picker-hex-input",RGBA_INPUT:"#forge-color-picker-rgba-input",HSVA_INPUT:"#forge-color-picker-hsva-input",HUE_SLIDER:".forge-color-picker__hue-slider",HUE_SLIDER_THUMB:"#forge-color-picker-hue-thumb",OPACITY_SLIDER:".forge-color-picker__opacity-slider",OPACITY_SLIDER_THUMB:"#forge-color-picker-opacity-thumb",SLIDER:".forge-color-picker__slider",SLIDER_THUMB:".forge-color-picker__slider-thumb",COLOR_VALUE_HEX_CONTAINER:".forge-color-picker__color-hex",COLOR_VALUE_RGBA_CONTAINER:".forge-color-picker__color-rgba",COLOR_VALUE_HSVA_CONTAINER:".forge-color-picker__color-hsva",TYPE_BUTTON:"#forge-color-picker-type-button",COLOR_VALUE_RGBA_R:"#forge-color-picker-rgba-r-input",COLOR_VALUE_RGBA_G:"#forge-color-picker-rgba-g-input",COLOR_VALUE_RGBA_B:"#forge-color-picker-rgba-b-input",COLOR_VALUE_RGBA_A:"#forge-color-picker-rgba-a-input",COLOR_VALUE_HSVA_H:"#forge-color-picker-hsva-h-input",COLOR_VALUE_HSVA_S:"#forge-color-picker-hsva-s-input",COLOR_VALUE_HSVA_V:"#forge-color-picker-hsva-v-input",COLOR_VALUE_HSVA_A:"#forge-color-picker-hsva-a-input"},Y_={CHANGE:`${wp}-change`},K_={CHANGE_EVENT_DEBOUNCE_THRESHOLD:200},_1={elementName:wp,attributes:W_,events:Y_,classes:G_,selectors:q_,numbers:K_},h3="000000",v3=(s=>(s.HEX="hex",s.RGB="rgb",s.RGBA="rgba",s.HSV="hsv",s.HSVA="hsva",s))(v3||{});var Ri=class extends I{constructor(t){super(t),this._gradientElement=w(t,_1.selectors.GRADIENT),this._previewColorElement=w(t,_1.selectors.PREVIEW_COLOR),this._hexInputElement=w(t,_1.selectors.HEX_INPUT),this._rgbaInputRElement=w(t,_1.selectors.COLOR_VALUE_RGBA_R),this._rgbaInputGElement=w(t,_1.selectors.COLOR_VALUE_RGBA_G),this._rgbaInputBElement=w(t,_1.selectors.COLOR_VALUE_RGBA_B),this._rgbaInputAElement=w(t,_1.selectors.COLOR_VALUE_RGBA_A),this._hsvaInputHElement=w(t,_1.selectors.COLOR_VALUE_HSVA_H),this._hsvaInputSElement=w(t,_1.selectors.COLOR_VALUE_HSVA_S),this._hsvaInputVElement=w(t,_1.selectors.COLOR_VALUE_HSVA_V),this._hsvaInputAElement=w(t,_1.selectors.COLOR_VALUE_HSVA_A),this._hueSliderElement=w(t,_1.selectors.HUE_SLIDER),this._hueSliderThumbElement=w(t,_1.selectors.HUE_SLIDER_THUMB),this._opacitySliderElement=w(t,_1.selectors.OPACITY_SLIDER),this._opacitySliderThumbElement=w(t,_1.selectors.OPACITY_SLIDER_THUMB),this._hexValueContainerElement=w(t,_1.selectors.COLOR_VALUE_HEX_CONTAINER),this._rgbaValueContainerElement=w(t,_1.selectors.COLOR_VALUE_RGBA_CONTAINER),this._hsvaValueContainerElement=w(t,_1.selectors.COLOR_VALUE_HSVA_CONTAINER),this._typeButtonElement=w(t,_1.selectors.TYPE_BUTTON)}setPreviewColor(t){this._previewColorElement.style.backgroundColor=t}setHexInputValue(t){this._hexInputElement.value=t}setRgbaInputValue(t){this._rgbaInputRElement.value=t.r.toString(),this._rgbaInputGElement.value=t.g.toString(),this._rgbaInputBElement.value=t.b.toString(),this._rgbaInputAElement.value=t.a.toString()}setHsvaInputValue(t){this._hsvaInputHElement.value=t.h.toString(),this._hsvaInputSElement.value=t.s.toString(),this._hsvaInputVElement.value=t.v.toString(),this._hsvaInputAElement.value=t.a.toString()}updateA11y(t,e){this._hueSliderThumbElement.setAttribute("aria-valuenow",t.toString()),this._hueSliderThumbElement.setAttribute("aria-valuetext",t.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuenow",e.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuetext",e.toString())}setGradientColor(t){this._gradientElement.style.backgroundColor=t}getHueSliderElement(){return this._hueSliderElement}getOpacitySliderElement(){return this._opacitySliderElement}getGradientElement(){return this._gradientElement}setActiveValueType(t){switch(this._hexValueContainerElement.style.display="none",this._rgbaValueContainerElement.style.display="none",this._hsvaValueContainerElement.style.display="none",t){case"hex":this._hexValueContainerElement.style.removeProperty("display");break;case"rgba":this._rgbaValueContainerElement.style.removeProperty("display");break;case"hsva":this._hsvaValueContainerElement.style.removeProperty("display");break}}focusValueInput(t){switch(t){case"hex":this._hexInputElement.focus(),this._hexInputElement.select();break;case"rgba":this._rgbaInputRElement.focus(),this._rgbaInputRElement.select();break;case"hsva":this._hsvaInputHElement.focus(),this._hsvaInputHElement.select();break}}setTypeClickListener(t){this._typeButtonElement.addEventListener("click",t)}removeTypeClickListener(t){this._typeButtonElement.removeEventListener("click",t)}setHexInputListener(t,e){this._hexInputElement.addEventListener(t,e)}removeHexInputListener(t,e){this._hexInputElement.removeEventListener(t,e)}getHexInputValue(){return this._hexInputElement.value}setRgbaInputListener(t,e){this._rgbaInputRElement.addEventListener(t,e),this._rgbaInputGElement.addEventListener(t,e),this._rgbaInputBElement.addEventListener(t,e),this._rgbaInputAElement.addEventListener(t,e)}removeRgbaInputListener(t,e){this._rgbaInputRElement.removeEventListener(t,e),this._rgbaInputGElement.removeEventListener(t,e),this._rgbaInputBElement.removeEventListener(t,e),this._rgbaInputAElement.removeEventListener(t,e)}getRgbaInputValue(){return{r:parseInt(this._rgbaInputRElement.value,10),g:parseInt(this._rgbaInputGElement.value,10),b:parseInt(this._rgbaInputBElement.value,10),a:parseFloat(this._rgbaInputAElement.value)}}setHsvaInputListener(t,e){this._hsvaInputHElement.addEventListener(t,e),this._hsvaInputSElement.addEventListener(t,e),this._hsvaInputVElement.addEventListener(t,e),this._hsvaInputAElement.addEventListener(t,e)}removeHsvaInputListener(t,e){this._hsvaInputHElement.removeEventListener(t,e),this._hsvaInputSElement.removeEventListener(t,e),this._hsvaInputVElement.removeEventListener(t,e),this._hsvaInputAElement.removeEventListener(t,e)}getHsvaInputValue(){return{h:parseInt(this._hsvaInputHElement.value,10),s:parseInt(this._hsvaInputSElement.value,10),v:parseInt(this._hsvaInputVElement.value,10),a:parseFloat(this._hsvaInputAElement.value)}}toggleOpacityControls(t){t?(this._opacitySliderElement.style.removeProperty("display"),this._rgbaInputAElement.parentElement&&this._rgbaInputAElement.parentElement.style.removeProperty("display"),this._hsvaInputAElement.parentElement&&this._hsvaInputAElement.parentElement.style.removeProperty("display")):(this._opacitySliderElement.style.display="none",this._rgbaInputAElement.parentElement&&(this._rgbaInputAElement.parentElement.style.display="none"),this._hsvaInputAElement.parentElement&&(this._hsvaInputAElement.parentElement.style.display="none"))}};function Fi(n,t,e){let o=e.getBoundingClientRect(),a=n-o.left,s=t-o.top;return a>o.width?a=o.width:a<0&&(a=0),s>o.height?s=o.height:s<0&&(s=0),{x:a,y:s,height:o.height,width:o.width}}function An(n){let t,e,o,a=n.h/60,s=n.s/100,r=n.v/100;if(s===0)return t=e=o=r,{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(o*255),a:n.a};let l=Math.floor(a),h=a-l,v=r*(1-s),m=r*(1-s*h),u=r*(1-s*(1-h));switch(l){case 0:t=r,e=u,o=v;break;case 1:t=m,e=r,o=v;break;case 2:t=v,e=r,o=u;break;case 3:t=v,e=m,o=r;break;case 4:t=u,e=v,o=r;break;default:t=r,e=v,o=m}return{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(o*255),a:n.a}}function Ia(n){return p3(n.r)+p3(n.g)+p3(n.b)+(Math.round(n.a*255)+65536).toString(16).substr(-2)}function p3(n){return("0"+n.toString(16)).slice(-2)}function up(n){let t=n.length===3||n.length===4,e=t?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),o=t?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),a=t?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),s=(t?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{r:parseInt(e,16),g:parseInt(o,16),b:parseInt(a,16),a:parseFloat((parseInt(s,16)/255).toFixed(2))}}function _p(n){return`rgba(${n.r}, ${n.g}, ${n.b}, ${n.a})`}function Ui(n,t){let e=n.replace(/^#/,"");return t||(e.length===4?e=e.substring(0,3):e.length===8&&(e=e.substring(0,6))),`#${e}`}function xp(n){let t=n.r/255,e=n.g/255,o=n.b/255,a=Math.max(t,e,o),s=Math.min(t,e,o),r=a,l=a,h=a,v=a-s;if(l=a===0?0:v/a,a===s)r=0;else{switch(a){case t:r=(e-o)/v+(e<o?6:0);break;case e:r=(o-t)/v+2;break;case o:r=(t-e)/v+4;break}r/=6}return{h:Math.round(r*360),s:Math.round(l*100),v:Math.round(h*100),a:n.a}}function m3(n){if(!n||typeof n!="string")return!1;switch(n.substring(0,1)==="#"&&(n=n.substring(1)),n.length){case 3:return/^[0-9A-F]{3}$/i.test(n);case 4:return/^[0-9A-F]{4}$/i.test(n);case 6:return/^[0-9A-F]{6}$/i.test(n);case 8:return/^[0-9A-F]{8}$/i.test(n);default:return!1}}function d3(n){return O2(n.r)&&n.r>=0&&n.r<=255&&O2(n.g)&&n.g>=0&&n.g<=255&&O2(n.b)&&n.b>=0&&n.b<=255&&O2(n.a)&&n.a>=0&&n.a<=1}function g3(n){return O2(n.h)&&n.h>=0&&n.h<=360&&O2(n.s)&&n.s>=0&&n.s<=100&&O2(n.v)&&n.v>=0&&n.v<=100&&O2(n.a)&&n.a>=0&&n.a<=1}var Wi=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._xPercent=0;this._yPercent=0;this._keydownListener=o=>this._onKeydown(o),this._downListener=o=>this._onDown(o),this._moveListener=o=>this._onMove(o),this._upListener=o=>this._onUp(o),this._initialize()}destroy(){this._unlisten()}setValue(t,e){this._xPercent=Math.max(0,Math.min(100,t)),this._yPercent=Math.max(0,Math.min(100,100-e)),this._setThumbPosition(this._xPercent,this._yPercent)}_initialize(){this._thumbElement=this._rootElement.querySelector(_1.selectors.GRADIENT_THUMB),this._listen(),this._setThumbPosition(this._xPercent,this._yPercent)}_listen(){this._rootElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._rootElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="Enter"||t.keyCode===13,o=t.key==="ArrowLeft"||t.keyCode===37,a=t.key==="ArrowUp"||t.keyCode===38,s=t.key==="ArrowRight"||t.keyCode===39,r=t.key==="ArrowDown"||t.keyCode===40,l=1;if(r)t.preventDefault(),this._yPercent=Math.min(100,this._yPercent+l);else if(a)t.preventDefault(),this._yPercent=Math.max(0,this._yPercent-l);else if(o)t.preventDefault(),this._xPercent=Math.max(0,this._xPercent-l);else if(s)t.preventDefault(),this._xPercent=Math.min(100,this._xPercent+l);else if(e)t.preventDefault();else return;this._setThumbPosition(this._xPercent,this._yPercent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._updateThumbPosition(t)}_onUp(t){document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type),o=e?t.clientX:t.changedTouches[0].clientX,a=e?t.clientY:t.changedTouches[0].clientY,s=this._calculateSliderPercent(o,a);this._xPercent=Math.max(0,Math.min(100,s.x/s.width*100)),this._yPercent=Math.max(0,Math.min(100,s.y/s.height*100)),this._setThumbPosition(this._xPercent,this._yPercent),this._notify()}_calculateSliderPercent(t,e){return Fi(t,e,this._rootElement)}_setThumbPosition(t,e){this._thumbElement.style.left=`${t}%`,this._thumbElement.style.top=`${e}%`}_notify(){if(typeof this._changeListener=="function"){let t=this._xPercent,e=100-this._yPercent;this._changeListener(t,e)}}};var Tn=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._percent=1;this._min=0;this._max=1;this._step=.01;this._keydownListener=o=>this._onKeydown(o),this._downListener=o=>this._onDown(o),this._moveListener=o=>this._onMove(o),this._upListener=o=>this._onUp(o),this._initialize()}destroy(){this._unlisten()}setValue(t){this._percent=t,this._setThumbPosition(this._percent)}_initialize(){this._thumbElement=this._rootElement.querySelector(_1.selectors.SLIDER_THUMB),this._listen(),this._setThumbPosition(this._percent)}_listen(){this._thumbElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._thumbElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="ArrowLeft"||t.keyCode===37,o=t.key==="ArrowRight"||t.keyCode===39,a=t.key==="Home"||t.keyCode===36,s=t.key==="End"||t.keyCode===35;e?(t.preventDefault(),this._percent-=this._step):o?(t.preventDefault(),this._percent+=this._step):a?(t.preventDefault(),this._percent=this._min):s&&(t.preventDefault(),this._percent=this._max),this._percent<this._min?this._percent=this._min:this._percent>this._max&&(this._percent=this._max),this._setThumbPosition(this._percent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._thumbElement.classList.add(_1.classes.SLIDER_THUMB_ACTIVE),this._updateThumbPosition(t)}_onUp(t){this._thumbElement.classList.remove(_1.classes.SLIDER_THUMB_ACTIVE),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type)?t.clientX:t.changedTouches[0].clientX;this._percent=this._calculateSliderPercent(e),this._setThumbPosition(this._percent),this._notify()}_calculateSliderPercent(t){let e=Fi(t,0,this._rootElement);return parseFloat((e.x/e.width).toFixed(2))}_setThumbPosition(t){this._thumbElement.style.left=`${t*100}%`}_notify(){typeof this._changeListener=="function"&&this._changeListener(this._percent)}};var Gi=class{constructor(t){this._adapter=t;this._value=null;this._allowOpacity=!0;this._hex=h3;this._hsva={h:0,s:0,v:0,a:1};this._rgba={r:0,g:0,b:0,a:1};this._debounceChangeEvent=!1;this._valueType="hex";this._initialized=!1;this._gradientSliderChangedListener=(e,o)=>this._onGradientSliderChanged(e,o),this._hueSliderChangedListener=e=>this._onHueSliderChanged(e),this._opacitySliderChangedListener=e=>this._onOpacitySliderChanged(e),this._typeClickListener=e=>this._onTypeClicked(e),this._hexInputChangedListener=e=>this._onHexInputChanged(),this._rgbaInputChangedListener=e=>this._onRgbaInputChanged(),this._hsvaInputChangedListener=e=>this._onHsvaInputChanged()}initialize(){this._initialized=!0,this._applyChangeEventTrigger(),this._adapter.setTypeClickListener(this._typeClickListener),this._adapter.setHexInputListener("input",this._hexInputChangedListener),this._adapter.setRgbaInputListener("input",this._rgbaInputChangedListener),this._adapter.setHsvaInputListener("input",this._hsvaInputChangedListener),this._gradientSlider=new Wi(this._adapter.getGradientElement(),this._gradientSliderChangedListener),this._hueSlider=new Tn(this._adapter.getHueSliderElement(),this._hueSliderChangedListener),this._opacitySlider=new Tn(this._adapter.getOpacitySliderElement(),this._opacitySliderChangedListener),this._initializeOpacity(),this._setColorFromHex(),this._adapter.setActiveValueType(this._valueType)}destroy(){this._adapter.removeTypeClickListener(this._typeClickListener),this._adapter.removeHexInputListener("input",this._hexInputChangedListener),this._adapter.removeRgbaInputListener("input",this._hexInputChangedListener),this._adapter.removeHsvaInputListener("input",this._hexInputChangedListener),this._gradientSlider.destroy(),this._hueSlider.destroy(),this._opacitySlider.destroy(),this._initialized=!1}_applyChangeEventTrigger(){this._debounceChangeEvent?this._triggerChangeEvent=Ne((t,e)=>{this._emitChangeEvent(t,e)},_1.numbers.CHANGE_EVENT_DEBOUNCE_THRESHOLD,!1):this._triggerChangeEvent=(t,e)=>this._emitChangeEvent(t,e)}_initializeOpacity(){this._hsva.a=1,this._adapter.toggleOpacityControls(this._allowOpacity),this._render()}_onTypeClicked(t){this._valueType==="hex"?this._valueType="rgba":this._valueType==="rgba"?this._valueType="hsva":this._valueType==="hsva"&&(this._valueType="hex"),this._adapter.setActiveValueType(this._valueType),this._adapter.focusValueInput(this._valueType)}_onHexInputChanged(){let t=this._adapter.getHexInputValue();m3(t)&&(this.value=t,this._triggerChangeEvent("input","hex"))}_onRgbaInputChanged(){let t=this._adapter.getRgbaInputValue();d3(t)&&(this.value=Ia(t),this._triggerChangeEvent("input","rgba"))}_onHsvaInputChanged(){let t=this._adapter.getHsvaInputValue();g3(t)&&(this.value=Ia(An(t)),this._triggerChangeEvent("input","hsva"))}_setColorFromHex(){this._rgba=up(this._hex),this._hsva=xp(this._rgba),this._initialized&&(this._gradientSlider.setValue(this._hsva.s,this._hsva.v),this._hueSlider.setValue(parseFloat((this._hsva.h/360).toFixed(2))),this._opacitySlider.setValue(this._hsva.a),this._render())}_onGradientSliderChanged(t,e){this._hsva.s=t,this._hsva.v=e,this._syncColors(),this._render(),this._triggerChangeEvent("slider","gradient")}_onHueSliderChanged(t){this._hsva.h=parseInt((360*t).toString(),10),this._syncColors(),this._setGradientColor(),this._render(),this._triggerChangeEvent("slider","hue")}_onOpacitySliderChanged(t){this._hsva.a=t,this._syncColors(),this._render(),this._triggerChangeEvent("slider","opacity")}_setGradientColor(){let t=An({h:this._hsva.h,s:100,v:100,a:1});this._adapter.setGradientColor(`rgb(${t.r}, ${t.g}, ${t.b})`)}_syncColors(){this._rgba=An(this._hsva),this._hex=Ia(this._rgba),this._value=this._hex||null}_render(){this._setGradientColor(),this._adapter.setPreviewColor(_p(this._rgba)),this._adapter.setHexInputValue(Ui(this._hex,this._allowOpacity)),this._adapter.setRgbaInputValue(this._rgba),this._adapter.setHsvaInputValue(this._hsva),this._adapter.updateA11y(this._hsva.h,Math.round(this._hsva.a*100))}_emitChangeEvent(t,e){let o={type:t,source:e,hex:Ui(this._hex,!1).replace(/^#/,""),rgba:this._rgba,hsva:this._hsva};this._allowOpacity&&(o.alpha=this._hsva.a),this._adapter.emitHostEvent(_1.events.CHANGE,o)}get value(){return Ui(this._hex,!1)}set value(t){if(this._value!==t){if(this._value=t!=null?t:h3,!m3(this._value))throw new Error("Invalid hex value provided.");this._value=this._value.replace(/^#/,""),this._hex=this._value,this._setColorFromHex(),this._adapter.setHostAttribute(_1.attributes.VALUE,this._value)}}get rgba(){return this._rgba?d({},this._rgba):null}set rgba(t){t?d3(t)&&(this.value=Ia(t)):this.value=null}get hsva(){return this._hsva?d({},this._hsva):null}set hsva(t){t?g3(t)&&(this.value=Ia(An(t))):this.value=null}get opacity(){return this._hsva?this._hsva.a:null}set opacity(t){this._hsva.a!==t&&t!=null&&this._allowOpacity&&(t>=0&&t<=1?(this._hsva.a=t,this._syncColors(),this._initialized&&(this._opacitySlider.setValue(this._hsva.a),this._render())):console.warn(`The provided opacity value (${t}) must be between 0 and 1.`))}get allowOpacity(){return this._allowOpacity}set allowOpacity(t){this._allowOpacity=t,this._initialized&&this._initializeOpacity()}get debounceChangeEvent(){return this._debounceChangeEvent}set debounceChangeEvent(t){this._debounceChangeEvent!==t&&(this._debounceChangeEvent=t,this._initialized&&this._applyChangeEventTrigger())}};var $_='<template><div class="forge-color-picker" part="root"><input type="color" tabindex="-1" class="forge-color-picker__input" spellcheck="false" autocomplete="off" aria-label="Color picker value" part="input"><div class="forge-color-picker__container" part="container"><div class="forge-color-picker__gradient" tabindex="0" part="gradient"><div class="forge-color-picker__gradient-color" part="gradient-color"></div><div class="forge-color-picker__gradient-thumb" part="gradient-thumb"></div></div><div class="forge-color-picker__control-preview" part="controls-preview-container"><div class="forge-color-picker__controls" part="controls-container"><div class="forge-color-picker__slider-control" part="hue-control-container"><div class="forge-color-picker__slider forge-color-picker__hue-slider" part="hue-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-hue-thumb" part="hue-control-slider-thumb" tabindex="0" role="slider" aria-label="Change hue" aria-valuemin="0" aria-valuemax="360" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div><div class="forge-color-picker__slider-control" part="opacity-control-container"><div class="forge-color-picker__canvas" part="opacity-control-canvas"><div class="forge-color-picker__slider forge-color-picker__opacity-slider" part="opacity-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-opacity-thumb" part="opacity-control-slider-thumb" tabindex="0" role="slider" aria-label="Change opacity" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div></div></div><div class="forge-color-picker__color-preview-container forge-color-picker__canvas" part="color-preview-container"><div class="forge-color-picker__color-preview" part="color-preview"></div></div></div><div class="forge-color-picker__value" part="value-container"><div class="forge-color-picker__color-types" part="types-container"><div class="forge-color-picker__color-hex" part="hex-type-container"><div part="hex-type-label-wrapper"><label for="forge-color-picker-hex-input" part="hex-label">HEX</label></div><input type="text" id="forge-color-picker-hex-input" part="hex-input" style="width: 88px" maxlength="9" spellcheck="false" autocomplete="off" aria-label="HEX value"></div><div class="forge-color-picker__color-rgba" part="rgba-type-container"><div part="rgba-type-wrapper-r"><label for="forge-color-picker-rgba-r-input" part="rgba-type-label-r">R</label> <input type="number" id="forge-color-picker-rgba-r-input" part="rgba-type-input-r" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Red"></div><div part="rgba-type-wrapper-g"><label for="forge-color-picker-rgba-g-input" part="rgba-type-label-g">G</label> <input type="number" id="forge-color-picker-rgba-g-input" part="rgba-type-input-g" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Green"></div><div part="rgba-type-wrapper-b"><label for="forge-color-picker-rgba-b-input" part="rgba-type-label-b">B</label> <input type="number" id="forge-color-picker-rgba-b-input" part="rgba-type-input-b" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Blue"></div><div part="rgba-type-wrapper-a"><label for="forge-color-picker-rgba-a-input" part="rgba-type-label-a">A</label> <input type="number" id="forge-color-picker-rgba-a-input" part="rgba-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div><div class="forge-color-picker__color-hsva" part="hsva-type-container"><div part="hsva-type-wrapper-h"><label for="forge-color-picker-hsva-h-input" part="hsva-type-label-h">H</label> <input type="number" id="forge-color-picker-hsva-h-input" part="hsva-type-input-h" min="0" max="360" maxlength="3" autocomplete="off" aria-label="Hue"></div><div part="hsva-type-wrapper-s"><label for="forge-color-picker-hsva-s-input" part="hsva-type-label-s">S</label> <input type="number" id="forge-color-picker-hsva-s-input" part="hsva-type-input-s" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Saturation"></div><div part="hsva-type-wrapper-v"><label for="forge-color-picker-hsva-v-input" part="hsva-type-label-v">V</label> <input type="number" id="forge-color-picker-hsva-v-input" part="hsva-type-input-v" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Value"></div><div part="hsva-type-wrapper-a"><label for="forge-color-picker-hsva-a-input" part="hsva-type-label-a">A</label> <input type="number" id="forge-color-picker-hsva-a-input" part="hsva-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div></div><div class="forge-color-picker__type-button" part="type-container"><forge-icon-button part="type-button" id="forge-color-picker-type-button" aria-labelledby="type-button-tooltip" part="type-button-element"><forge-icon name="unfold_more" part="type-button-icon"></forge-icon></forge-icon-button><forge-tooltip placement="bottom" id="type-button-tooltip">Change color format</forge-tooltip></div></div></div></div></template>',X_='*{box-sizing:border-box}.forge-color-picker{width:var(--forge-color-picker-width,272px);position:relative;display:inline-block;overflow:hidden}.forge-color-picker__input{height:1px;opacity:0;position:absolute;width:1px}.forge-color-picker__gradient{position:relative;outline:0}.forge-color-picker__gradient-color{background:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);height:152px}.forge-color-picker__gradient-thumb{border:1px solid #fff;border-radius:50%;cursor:pointer;display:inline-block;height:10px;width:10px;margin-left:-5px;margin-top:-5px;position:absolute;touch-action:none;user-select:none;transition:left .2s cubic-bezier(.25, .8, .25, 1) 0s,top .2s cubic-bezier(.25, .8, .25, 1) 0s}.forge-color-picker__control-preview{display:flex;align-items:center;width:100%;padding:16px}.forge-color-picker__controls{flex:1;margin-right:16px}.forge-color-picker__slider{position:relative}.forge-color-picker__slider-thumb{outline:0;height:16px;width:16px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);position:absolute;border-radius:50%;top:calc(50% - 8px);margin-left:-8px;transition:left .4s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__slider-thumb--active{transition:none}.forge-color-picker__slider-thumb:hover{cursor:pointer}.forge-color-picker__color-preview-container{border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.54) inset,0 0 2px 0 rgba(0,0,0,.54);overflow:hidden}.forge-color-picker__color-preview{height:32px;width:32px;transition:background-color .2s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__value{display:flex;width:100%;align-items:center;padding:0 8px 16px 16px;font-size:12px}.forge-color-picker__color-types{flex:1}.forge-color-picker__color-types label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}.forge-color-picker__color-types input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-color-picker__color-types input[type=number],.forge-color-picker__color-types input[type=text]{border-color:var(--forge-theme-outline,#e0e0e0);color:var(--forge-theme-on-surface,#000);background-color:transparent;padding:4px 8px;border-width:1px;border-style:solid;border-radius:4px;box-sizing:border-box;outline:0;transition-property:box-shadow,border-colo;transition-duration:var(--forge-animation-duration-short4, 200ms);transition-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}.forge-color-picker__color-types input[type=number]:hover,.forge-color-picker__color-types input[type=text]:hover{border-color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-color-picker__color-types input[type=number]:focus,.forge-color-picker__color-types input[type=text]:focus{border-color:var(--forge-theme-primary,#3f51b5);box-shadow:0 0 0 1px inset var(--forge-theme-primary,#3f51b5)}.forge-color-picker__color-types input[type=number]{text-align:center;-moz-appearance:textfield}.forge-color-picker__color-types input[type=number]::-webkit-inner-spin-button,.forge-color-picker__color-types input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.forge-color-picker__color-hex{display:flex;flex-direction:column;justify-content:center;align-items:space-between}.forge-color-picker__canvas{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNnB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDYgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTAgKDU0OTgzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Hcm91cCA5PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Ikdyb3VwLTkiPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExIiBmaWxsPSIjRTBFMEUwIiB4PSIwIiB5PSIwIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weS0yIiBmaWxsPSIjRkZGRkZGIiB4PSIwIiB5PSIzIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weSIgZmlsbD0iI0ZGRkZGRiIgeD0iMyIgeT0iMCIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExLUNvcHktMyIgZmlsbD0iI0UwRTBFMCIgeD0iMyIgeT0iMyIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+")}.forge-color-picker__hue-slider{height:8px;background:linear-gradient(to right,red 0,#ff0 16%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 84%,#ff0004 100%)}.forge-color-picker__opacity-slider{height:8px;margin-top:16px;background:linear-gradient(to right,rgba(255,0,0,0) 0,red 100%)}.forge-color-picker__color-hsva,.forge-color-picker__color-rgba{display:flex}.forge-color-picker__color-hsva div,.forge-color-picker__color-rgba div{margin-right:4px}.forge-color-picker__color-hsva label,.forge-color-picker__color-rgba label{display:block;text-align:center}.forge-color-picker__color-hsva input,.forge-color-picker__color-rgba input{width:44px}:host{display:inline-block}:host([hidden]){display:none}',we=class extends M{static get observedAttributes(){return[_1.attributes.VALUE,_1.attributes.ALLOW_OPACITY,_1.attributes.DEBOUNCE_CHANGE_EVENT]}constructor(){super(),X.define(Hl),H(this,$_,X_),this._core=new Gi(new Ri(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case _1.attributes.VALUE:this.value=o;break;case _1.attributes.ALLOW_OPACITY:this.allowOpacity=p(o);break;case _1.attributes.DEBOUNCE_CHANGE_EVENT:this.debounceChangeEvent=p(o);break}}};i([c()],we.prototype,"value",2),i([c()],we.prototype,"rgba",2),i([c()],we.prototype,"hsva",2),i([c()],we.prototype,"opacity",2),i([c()],we.prototype,"allowOpacity",2),i([c()],we.prototype,"debounceChangeEvent",2),we=i([y({name:_1.elementName,dependencies:[i1,m1,j]})],we);function fp(){f(we)}var Z_={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",DATE_FORMAT:"date-format",VALUE_MODE:"value-mode",SHORTCUTS:"shortcuts",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale",CALENDAR_TEXT:"calendar-text"},j_={TOGGLE:"forge-date-picker-toggle"},Q_={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},J_={DATE_FORMAT:"MM/DD/YYYY"},tx=["MM/DD/YYYY","MM/DD/YY","DD/MMM/YYYY","MM-DD-YYYY","MM-DD-YY","DD-MMM-YYYY","YYYY-MM-DD","YYYY-MMM-DD","DD.MM.YYYY","DD.MM.YY"],y1={observedAttributes:Z_,attributes:j_,selectors:Q_,defaults:J_,supportedDateFormats:tx};var U1=class extends M{constructor(){super()}connectedCallback(){this.querySelector(y1.selectors.INPUT)?this._core.initialize():C0(this,y1.selectors.INPUT).then(()=>{this._core.initialize()})}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case y1.observedAttributes.MIN:this.min=o;break;case y1.observedAttributes.MAX:this.max=o;break;case y1.observedAttributes.OPEN:this.open=p(o);break;case y1.observedAttributes.POPUP_CLASSES:this.popupClasses=o;break;case y1.observedAttributes.DISABLED:this.disabled=p(o);break;case y1.observedAttributes.MASKED:this.masked=p(o);break;case y1.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(o);break;case y1.observedAttributes.DATE_FORMAT:this.dateFormat=o;break;case y1.observedAttributes.MASK_FORMAT:this.maskFormat=o;break;case y1.observedAttributes.VALUE_MODE:this.valueMode=o;break;case y1.observedAttributes.SHORTCUTS:this.shortcuts=o==="off"?{}:void 0;break;case y1.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=p(o);break;case y1.observedAttributes.SHOW_TODAY:this.showToday=p(o);break;case y1.observedAttributes.SHOW_CLEAR:this.showClear=p(o);break;case y1.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=Wn(o);break;case y1.observedAttributes.YEAR_RANGE:this.yearRange=o;break;case y1.observedAttributes.LOCALE:this.locale=o;break;case y1.observedAttributes.CALENDAR_TEXT:this.calendarText=JSON.parse(o);break}}};i([c()],U1.prototype,"value",2),i([c()],U1.prototype,"min",2),i([c()],U1.prototype,"max",2),i([c()],U1.prototype,"disabledDates",2),i([c()],U1.prototype,"open",2),i([c()],U1.prototype,"popupClasses",2),i([c()],U1.prototype,"disabled",2),i([c()],U1.prototype,"masked",2),i([c()],U1.prototype,"maskFormat",2),i([c()],U1.prototype,"showMaskFormat",2),i([c()],U1.prototype,"dateFormat",2),i([c()],U1.prototype,"valueMode",2),i([c()],U1.prototype,"shortcuts",2),i([c()],U1.prototype,"notifyInputValueChanges",2),i([c()],U1.prototype,"allowInvalidDate",2),i([c()],U1.prototype,"showToday",2),i([c()],U1.prototype,"showClear",2),i([c()],U1.prototype,"parseCallback",2),i([c()],U1.prototype,"formatCallback",2),i([c()],U1.prototype,"prepareMaskCallback",2),i([c()],U1.prototype,"disabledDaysOfWeek",2),i([c()],U1.prototype,"disableDayCallback",2),i([c()],U1.prototype,"yearRange",2),i([c()],U1.prototype,"locale",2),i([c()],U1.prototype,"calendarText",2);function qi(n){let t=document.createElement("forge-icon-button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),t.slot="end",t.density="medium";let e=document.createElement("forge-icon");return e.name=n,t.appendChild(e),t}var La=class extends I{constructor(e){super(e);this._valueChangeListeners=[];this._identifier=V2()}initialize(){this._initializeInput()}destroy(){var e;(e=this._calendarDropdown)==null||e.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}addToggleListener(e,o){var a;(a=this._toggleElement)==null||a.addEventListener(e,o)}removeToggleListener(e,o){var a;(a=this._toggleElement)==null||a.removeEventListener(e,o)}attachCalendar(e,o){var a,s,r;if((a=this._calendarDropdown)==null||a.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");o&&Object.assign(this._calendarDropdown,o),this._calendarDropdown.open(e),(s=this._calendarDropdown.dropdownElement)==null||s.style.setProperty("--forge-calendar-width","320px"),(r=this._calendarDropdown.calendar)==null||r.style.setProperty("margin","8px"),this.setCalendarText((o==null?void 0:o.calendarText)||{})}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||a.goToDate(e,!0)}addCalendarListener(e,o){var a,s;(s=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||s.addEventListener(e,o)}removeCalendarListener(e,o){var a,s;(s=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||s.removeEventListener(e,o)}setCalendarValue(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.value=e)}setCalendarMinDate(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.min=e)}setCalendarMaxDate(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.max=e)}setCalendarDisabledDates(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.disabledDates=e)}setCalendarDisabledDaysOfWeek(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=e)}setCalendarDisableDayCallback(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=e)}setCalendarActiveDate(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||a.setActiveDate(e)}getCalendarActiveDate(){var e,o;return(o=(e=this._calendarDropdown)==null?void 0:e.calendar)==null?void 0:o.activeDate}setCalendarYearRange(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)!=null&&a.yearRange&&(this._calendarDropdown.calendar.yearRange=e)}setCalendarLocale(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.locale=e)}setCalendarText(e){var a;let o=(a=this._calendarDropdown)==null?void 0:a.calendar;if(o){if(e.today){let s=document.createElement("span");s.slot=g.slots.TODAY_BUTTON_TEXT,s.textContent=e.today,o.append(s)}if(e.clear){let s=document.createElement("span");s.slot=g.slots.CLEAR_BUTTON_TEXT,s.textContent=e.clear,o.append(s)}if(e.nextMonth){let s=document.createElement("span");s.slot=g.slots.NEXT_MONTH_BUTTON_TEXT,s.textContent=e.nextMonth,o.append(s)}if(e.previousMonth){let s=document.createElement("span");s.slot=g.slots.PREVIOUS_MONTH_BUTTON_TEXT,s.textContent=e.previousMonth,o.append(s)}if(e.nextYear){let s=document.createElement("span");s.slot=g.slots.NEXT_YEAR_BUTTON_TEXT,s.textContent=e.nextYear,o.append(s)}if(e.previousYear){let s=document.createElement("span");s.slot=g.slots.PREVIOUS_YEAR_BUTTON_TEXT,s.textContent=e.previousYear,o.append(s)}if(e.nextYears){let s=document.createElement("span");s.slot=g.slots.NEXT_YEARS_BUTTON_TEXT,s.textContent=e.nextYears,o.append(s)}if(e.previousYears){let s=document.createElement("span");s.slot=g.slots.PREVIOUS_YEARS_BUTTON_TEXT,s.textContent=e.previousYears,o.append(s)}}}propagateCalendarKey(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||a.handleKey(e)}tryCreateToggle(){let e=this._component.querySelector("forge-text-field"),o=this._component.querySelector(y1.selectors.TOGGLE);if(e){let a=e.querySelector(`${t1.elementName}[slot=end]`);if(a||o){this._toggleElement=a||o;return}let s=this._createToggleElement();e.density==="extra-small"&&(s.density="small"),e.appendChild(s),this._toggleElement=s}else o&&(this._toggleElement=o)}_createToggleElement(){return qi("insert_invitation")}_getDefaultTargetElement(){let e=this._component.querySelector(E1.elementName);return e!=null&&e.popoverTargetElement?e.popoverTargetElement:this._component.querySelector("input")||this._component}};var Sn=`${b}date-picker`,ex={VALUE:"value"},ox={INPUT:"input,input[forge-date-picker-input]"},ax={CHANGE:`${Sn}-change`,OPEN:`${Sn}-open`,CLOSE:`${Sn}-close`,INPUT:`${Sn}-input`},Ht={elementName:Sn,selectors:ox,events:ax,observedAttributes:ex};var Yi=class extends La{constructor(t){super(t),this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(Ht.selectors.INPUT)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new Ha(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=new zo(this._inputElement,t)}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier),Ge(),Yt(this._inputElement)}addInputListener(t,e,o){var a;(a=this._inputElement)==null||a.addEventListener(t,e,{capture:o})}removeInputListener(t,e,o){var a;(a=this._inputElement)==null||a.removeEventListener(t,e,{capture:o})}setInputValueChangedListener(t,e){this.destroyValueChangeListener();let o=r0(t,this._inputElement,"value",e);this._valueChangeListeners.push(o)}hasInputElement(){return!!this._inputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._inputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._inputElement.value!==t&&(this._inputElement.value=t,this._inputMask&&this._inputMask.updateMask(),e&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return Ue(this._component.ownerDocument)===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(t){this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),Object.prototype.hasOwnProperty.call(this._toggleElement,"disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(t,e){i0(this._inputElement,t,e)}};var Va=class{constructor(t){this._adapter=t;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=nn;this._showMaskFormat=!1;this._dateFormat=y1.defaults.DATE_FORMAT;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._calendarText={};this._isInitialized=!1;this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputValueChangedListener=e=>this._onInputValueChanged(e),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._dateSelectListener=e=>this._onDateSelected(e.detail),this._monthChangeListener=e=>this._onMonthChanged(e),this._activeChangeListener=e=>this._onActiveDescendantChanged(e),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var t;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(t=this._initializeState)==null||t.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputFocus(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(t=!1){this._formatInputValue();let e={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},o={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener,calendarText:this._calendarText},a=new Date().getTime();this._min&&this._max&&this._max.getTime()<a&&(e.year=this._min.getFullYear(),e.month=this._min.getMonth()),this._adapter.attachCalendar(e,o),this._adapter.addCalendarListener(g.events.DATE_SELECT,this._dateSelectListener),this._adapter.addCalendarListener(g.events.MONTH_CHANGE,this._monthChangeListener),this._open=!0,this._adapter.setHostAttribute(y1.observedAttributes.OPEN),t&&this._emitOpenEvent()}_closeCalendar(t=!1){this._open=!1,this._adapter.removeHostAttribute(y1.observedAttributes.OPEN),this._adapter.removeCalendarListener(g.events.DATE_SELECT,this._dateSelectListener),this._adapter.removeCalendarListener(g.events.MONTH_CHANGE,this._monthChangeListener),this._adapter.detachCalendar(),t&&this._emitCloseEvent()}_getDefaultShortcuts(){let t=()=>{this._onToday(),this._open&&this._closeCalendar(!0)};return this._dateFormat.toUpperCase().includes("MMM")?{t}:{n:t,t}}_onInputKeydown(t){var o;if(t.shiftKey)switch(t.key){case"Delete":case"Backspace":t.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){t.preventDefault(),this._adapter.propagateCalendarKey(t);return}break}let e=Object.entries((o=this._shortcuts)!=null?o:this._getDefaultShortcuts());if(e.length&&!t.shiftKey&&t.key.length===1){let a=t.key.toLowerCase(),s=e.find(([r])=>r===a);if(s){t.preventDefault();let[r,l]=s;if(typeof l=="function"){let h=l({instance:this._adapter.hostElement});G2(h)&&this._onDateSelected({date:h,selected:!0,type:"date"})}return}}switch(t.key){case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":t.preventDefault(),this._open?this._adapter.propagateCalendarKey(t):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){t.key==="Enter"&&t.stopPropagation(),t.preventDefault();let a=["ArrowLeft","ArrowRight"].includes(t.key);this._masked&&a&&t.stopImmediatePropagation(),this._adapter.propagateCalendarKey(t)}break;case"PageUp":case"PageDown":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"Tab":if(this._open){let a=this._adapter.getCalendarActiveDate();a&&this._onDateSelected({date:a,selected:!0,type:"date"})}break}}_getSanitizedDateString(t){return t.replace(/_/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(t){this._disabled||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeCalendar(!0):(Q2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onMonthChanged(t){this._adapter.redispatchEvent(t)}_onActiveDescendantChanged(t){this._adapter.setActiveDescendant(t)}_formatInputValue(){let t=this._adapter.getInputValue();if(t){let e=this._parseDateString(t);if(G2(e)&&this._isDateValueAcceptable(e)){let o=this._formatDate(e);o&&o!==t&&this._adapter.setInputValue(o,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(t){return G2(t)?typeof this._formatCallback=="function"?this._formatCallback(t):Al(t,this._dateFormat):null}_parseDateString(t){if(t=t.replace(/_/g,""),!t||!t.length)return null;let e=typeof this._parseCallback=="function"?this._parseCallback(t):Bl(t,this._dateFormat);return G2(e)?e:null}_coerceDateValue(t){return typeof t=="string"?this._parseDateString(t):t}_getTypedValue(t){switch(this._valueMode){case"object":return t;case"string":return this._formatDate(t);case"iso-string":return t&&t.setHours(0,0,0,0),t?t.toISOString():null;default:return t}}_isDateValueAcceptable(t){if(!t||this._allowInvalidDate)return!0;let e=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=t.getTime():!0,o=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=t.getTime():!0,a=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],s=()=>!a().some(h=>h.getTime()===t.getTime()),r=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(t.getDay())),l=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(t);return e()&&o()&&s()&&r()&&l()}_initializeMask(){let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,o,a,s)=>this._prepareMaskCallback.call(null,e,o,a,s)),this._adapter.initializeMask(t)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(t){if(this._valueMode!==t){if(!["object","string","iso-string"].includes(t))return;this._valueMode=t,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(y1.observedAttributes.VALUE_MODE,this._valueMode)}}get shortcuts(){return this._shortcuts}set shortcuts(t){if(t==="off"){this._shortcuts={};return}this._shortcuts=Object.prototype.toString.call(t)==="[object Object]"?t:void 0}get min(){return this._min?new Date(this._min.getTime()):null}set min(t){if(this._min!==t){let e=this._coerceDateValue(t);this._min=e?new Date(e.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(t){this._max!==t&&(this._max=this._coerceDateValue(t),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(t=>new Date(t.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(t){t?Array.isArray(t)?this._disabledDates=t.map(e=>new Date(e.getTime())):this._disabledDates=new Date(t.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=t}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(t){this._maskFormat!==t&&(this._maskFormat=t,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get dateFormat(){return this._dateFormat}set dateFormat(t){(typeof t!="string"||!y1.supportedDateFormats.includes(t))&&(this._dateFormat=y1.defaults.DATE_FORMAT),this._dateFormat!==t&&(this._dateFormat=t,this._maskFormat=t===y1.defaults.DATE_FORMAT?nn:t,this._isInitialized&&this._applyMask())}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(t){this._notifyInputValueChanges=t}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(t){this._allowInvalidDate!==t&&(this._allowInvalidDate=t,this._adapter.toggleHostAttribute(y1.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(t){this._disabledDaysOfWeek!==t&&(this._disabledDaysOfWeek=t,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(t){t!==this._disableDayCallback&&(this._disableDayCallback=t,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(t){this._parseCallback=t,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(t){this._formatCallback=t,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(t){this._showToday=t}get showClear(){return this._showClear}set showClear(t){this._showClear=t}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(t){this._locale!==t&&(this._locale=t,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}get calendarText(){return d({},this._calendarText)}set calendarText(t){JSON.stringify(this._calendarText)!==JSON.stringify(t)&&(this._calendarText=d({},t),this._adapter.setCalendarText(this._calendarText))}};var Ki=class extends Va{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,o){let a=this._getTypedValue(e);return this._adapter.emitHostEvent(Ht.events.CHANGE,a,!0,!o)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(Ht.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(Ht.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._tryMergeCurrentTime(e),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let o=this._formatDate(this._value);o?this._adapter.setInputValue(o,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let o=e.date;if(e.type==="date"&&this._closeCalendar(!0),this._tryMergeCurrentTime(o),!this._emitChangeEvent(o))return;let a=this._formatDate(o);this._adapter.setInputValue(a!=null?a:"",this._notifyInputValueChanges),this._formatInputValue(),Q2.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let o=this._getCurrentValue();o&&this._adapter.goToCalendarDate(new Date(o))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);this._tryMergeCurrentTime(a),this._masked&&this._adapter.emitInputEvent(Ht.events.INPUT,o),!b2(a,this._value)&&this._isDateValueAcceptable(a)&&this._emitChangeEvent(a)}_onInputValueChanged(e){let o=this._getSanitizedDateString(e);if(this._masked&&o)return;let a=this._coerceDateValue(o);!b2(a,this._value)&&this._isDateValueAcceptable(a)&&(this.value=a,this._emitChangeEvent(this._value))}_tryMergeCurrentTime(e){!e||!this._value||e.setHours(this._value.getHours(),this._value.getMinutes(),this._value.getSeconds(),this._value.getMilliseconds())}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?qo(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var nx="<template><slot></slot></template>",sx=":host{display:block}:host([hidden]){display:none}",Ca=class extends U1{static get observedAttributes(){return[...Object.values(y1.observedAttributes),Ht.observedAttributes.VALUE]}constructor(){super(),X.define(xl),H(this,nx,sx),this._core=new Ki(new Yi(this))}attributeChangedCallback(t,e,o){switch(t){case Ht.observedAttributes.VALUE:this.value=o;return}super.attributeChangedCallback(t,e,o)}};Ca=i([y({name:Ht.elementName,dependencies:[R1,v1,i1,j]})],Ca);var bp=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(Ht.elementName);return this._attachTextField(t),t}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.masked?this._element.addEventListener(Ht.events.INPUT,e=>t(e.target.value)):this.getInputElement().addEventListener("input",e=>t(e.target.value))}onInput(t){this._element.masked?this._element.addEventListener(Ht.events.INPUT,e=>t(e.detail)):this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var o,a,s,r;let e={props:d({},(a=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(r=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:r.options)};this._textFieldDelegate=new ao(e),t.appendChild(this._textFieldDelegate.element)}};function yp(){f(Ca)}var kn=`${b}date-range-picker`,$i=class n{constructor(t){t&&(this.from=t.from,this.to=t.to)}copy(){return new n(this)}},rx={FROM:"from",TO:"to",END_VALUE:"end-value"},ix={INPUT:"input"},lx={CHANGE:`${kn}-change`,OPEN:`${kn}-open`,CLOSE:`${kn}-close`,INPUT:`${kn}-input`},U2={elementName:kn,selectors:ix,events:lx,observedAttributes:rx};var Xi=class extends La{constructor(t){super(t),this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(U2.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(U2.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${U2.elementName} requires two inputs`);if(!this._component.querySelector(`[${L.attributes.MULTI_INPUT_SEPARATOR}]`)){let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new Ha(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new zo(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new zo(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier)),this._toInputElement.hasAttribute("aria-label")||this._toInputElement.setAttribute("aria-label","To date"),Ge(),this._applyToInputs(t=>Yt(t))}addInputListener(t,e,o){var a;(a=this._fromInputElement)==null||a.addEventListener(t,e,{capture:o})}addToInputListener(t,e,o){var a;(a=this._toInputElement)==null||a.addEventListener(t,e,{capture:o})}removeInputListener(t,e){var o;(o=this._fromInputElement)==null||o.removeEventListener(t,e)}removeToInputListener(t,e){var o;(o=this._toInputElement)==null||o.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let o=r0(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(o)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=r0(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=Ue(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),Object.prototype.hasOwnProperty.call(this._toggleElement,"disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}emitInputEvent(t,e){i0(this._fromInputElement,t,e)}emitToInputEvent(t,e){i0(this._toInputElement,t,e)}_createToggleElement(){return qi("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return G(t,!0,L.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var Zi=class extends Va{constructor(e){super(e);this._mode="range";this._from=null;this._to=null;this._toInputListener=o=>this._onToInput(o),this._toInputValueChangedListener=o=>this._onToInputValueChanged(o),this._toInputKeydownListener=o=>this._onInputKeydown(o),this._toInputFocusListener=o=>this._onToInputFocus(),this._toInputBlurListener=o=>this._onToInputBlur(o)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(e){this._formatToInputValue(),super._openCalendar(e);let o=this._getCurrentValue();o!=null&&o.to?this._adapter.goToCalendarDate(new Date(o.to)):o!=null&&o.from&&this._adapter.goToCalendarDate(new Date(o.from))}_emitChangeEvent(e,o){let a=this._getTypedValue(e&&e.from||null),s=this._getTypedValue(e&&e.to||null),r=new $i({from:a,to:s});return this._adapter.emitHostEvent(U2.events.CHANGE,r,!0,!o)?(this._setValue(this._coerceDateValue(e&&e.from||null)),this._setToValue(this._coerceDateValue(e&&e.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(U2.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(U2.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._tryMergeCurrentTime({from:e});let o=this._open?new l2({from:this._from||e,to:this._to||void 0}):new l2({from:e});this._isDateRangeAcceptable(o)&&(this.value=o,this._onDateSelected({date:e,range:o,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(e))}_onClear(){this._onDateSelected({date:null,range:new l2,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let e=this._adapter.getToInputValue();if(e){let o=this._parseDateString(e);if(G2(o)&&this._isDateValueAcceptable(o)){let a=this._formatDate(o);a&&this._adapter.setToInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(e){var a;let o=(a=this._formatDate(this._from))!=null?a:"";!o&&!this._allowInvalidDate&&(o=""),this._adapter.setInputValue(o,e?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(e){var a;let o=(a=this._formatDate(this._to))!=null?a:"";!o&&!this._allowInvalidDate&&(o=""),this._adapter.setToInputValue(o,e?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(e){if(!(e!=null&&e.to))return!0;let o=()=>this._isDateValueAcceptable(e.from),a=()=>this._isDateValueAcceptable(e.to),s=()=>e!=null&&e.from&&(e!=null&&e.to)?e.from.getTime()<=e.to.getTime():!0;return o()&&a()&&s()}_setValue(e){this._isDateValueAcceptable(e)&&(this._from=e||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(e){this._isDateValueAcceptable(e)&&(this._to=e||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(e){let o=e.range;if(e.rangeSelectionState==="to"&&this._closeCalendar(!0),this._tryMergeCurrentTime(o),!this._emitChangeEvent(o!=null?o:null))return;let a=this._formatDate(o&&o.from||null),s=this._formatDate(o&&o.to||null);this._adapter.setInputValue(a!=null?a:"",this._notifyInputValueChanges),this._adapter.setToInputValue(s!=null?s:"",this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=o&&o.from||null,this._to=o&&o.to||null,Q2.isMobile||(s?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_applyMask(){super._applyMask(),this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_initializeToMask(){if(!this._masked)return;let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:o=>this._handleToInput(o)};this._prepareMaskCallback&&(e.prepareCallback=(o,a,s,r)=>this._prepareMaskCallback.call(null,o,a,s,r)),this._adapter.initializeToMask(e)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(e){this._handleInput(this._adapter.getInputValue())}_handleInput(e){let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);this._tryMergeCurrentTime({from:a}),this._masked&&this._adapter.emitInputEvent(U2.events.INPUT,o),!b2(a,this._from)&&this._isDateValueAcceptable(a)&&this._emitChangeEvent(new l2({from:a||void 0,to:this._to||void 0}))}_handleToInput(e){let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);this._tryMergeCurrentTime({to:a}),this._masked&&this._adapter.emitToInputEvent(U2.events.INPUT,o),!b2(a,this._to)&&this._isDateValueAcceptable(a)&&this._emitChangeEvent(new l2({from:this._from||void 0,to:a||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(e){this._masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(e){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(e.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(e){if(this._masked)return;let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);b2(a,this._from)||(this.from=a,this._emitChangeEvent(new l2({from:a||void 0,to:this._to||void 0})))}_onToInputValueChanged(e){if(this._masked)return;let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);b2(a,this._to)||(this.to=a,this._emitChangeEvent(new l2({from:this._from||void 0,to:a||void 0})))}_tryMergeCurrentTime(e){!e||!this._value||!this._value.from&&!this._value.to||(e.from&&this._value.from&&this._value.from instanceof Date&&e.from.setHours(this._value.from.getHours(),this._value.from.getMinutes(),this._value.from.getSeconds(),this._value.from.getMilliseconds()),e.to&&this._value.to&&this._value.to instanceof Date&&e.to.setHours(this._value.to.getHours(),this._value.to.getMinutes(),this._value.to.getSeconds(),this._value.to.getMilliseconds()))}get value(){return{from:this.from,to:this.to}}set value(e){e||(e={from:null,to:null}),e.from===void 0&&(e.from=null),e.to===void 0&&(e.to=null),this.from=e.from,this.to=e.to,this._value={from:this.from,to:this.to}}get from(){let e=this._getTypedValue(this._from);return e?qo(e)?new Date(e.getTime()):e:null}set from(e){this._from!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new l2({from:this._coerceDateValue(e)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let e=this._getTypedValue(this._to);return e?qo(e)?new Date(e.getTime()):e:null}set to(e){this._to!==e&&(this._setToValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new l2({to:this._coerceDateValue(e)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var cx="<template><slot></slot></template>",hx=":host{display:block}:host([hidden]){display:none}",io=class extends U1{static get observedAttributes(){return[...Object.values(y1.observedAttributes),U2.observedAttributes.FROM,U2.observedAttributes.TO]}constructor(){super(),X.define(dl),H(this,cx,hx),this._core=new Zi(new Xi(this))}attributeChangedCallback(t,e,o){switch(t){case U2.observedAttributes.FROM:this.from=o;return;case U2.observedAttributes.TO:this.to=o;return}super.attributeChangedCallback(t,e,o)}};i([c()],io.prototype,"from",2),i([c()],io.prototype,"to",2),io=i([y({name:U2.elementName,dependencies:[R1,v1,i1,j]})],io);var Mp=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(U2.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(U2.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var o,a,s,r,l;this._textField=document.createElement(E1.elementName),(o=this._config.options)!=null&&o.required&&(this._textField.required=!0),(a=this._config.options)!=null&&a.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((s=this._config.options)==null?void 0:s.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((r=this._config.options)==null?void 0:r.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((l=this._config.options)==null?void 0:l.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function zp(){f(io)}var Hp={OPEN:"open",DIRECTION:"direction"},vx=d({},Hp),Ip={DRAWER:"forge-drawer",LEFT:"left",RIGHT:"right",CLOSING:"closing",CLOSED:"closed",NO_TRANSITION:"no-transition"},px={DRAWER:`.${Ip.DRAWER}`},mx={AFTER_OPEN:"forge-drawer-after-open",AFTER_CLOSE:"forge-drawer-after-close"},J1={observedAttributes:Hp,attributes:vx,classes:Ip,selectors:px,events:mx};var lo=class extends I{constructor(e){super(e);this._component=e;this._drawerElement=w(this._component,J1.selectors.DRAWER)}proxyScrollEvent(){this.tryUnproxyScrollEvent(),this._unproxyScrollEventCb=Rl(this._component.shadowRoot,this._component)}tryUnproxyScrollEvent(){this._unproxyScrollEventCb&&this._unproxyScrollEventCb()}setDirection(e){switch(e){case"left":this._drawerElement.classList.remove(J1.classes.RIGHT),this._drawerElement.classList.add(J1.classes.LEFT);break;case"right":this._drawerElement.classList.remove(J1.classes.LEFT),this._drawerElement.classList.add(J1.classes.RIGHT);break}}removeDrawerClass(e){ye(e,this._drawerElement)}setDrawerClass(e){H1(e,this._drawerElement)}listenTransitionComplete(e){this._activeTransitionListener&&this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=o=>{o.propertyName==="transform"&&(this._activeTransitionListener&&(this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=void 0),e())},this._drawerElement.addEventListener("transitionend",this._activeTransitionListener)}};var co=class{constructor(t){this._adapter=t;this._open=!0;this._direction="left";this._openAnimationListener=()=>this._onOpenComplete(),this._closeAnimationListener=()=>this._onCloseComplete()}initialize(){this._open?this._setOpened():this._setClosed(),this._applyDirection(),this._adapter.proxyScrollEvent()}destroy(){this._adapter.tryUnproxyScrollEvent()}_applyDirection(){this._adapter.setDirection(this._direction),this._adapter.setHostAttribute(J1.attributes.DIRECTION,O(this._direction)?this._direction.toString():"")}_onOpenComplete(){if(!this._open)return;this._setOpened();let t=new CustomEvent(J1.events.AFTER_OPEN,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_onCloseComplete(){if(this._open)return;this._setClosed();let t=new CustomEvent(J1.events.AFTER_CLOSE,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_setOpened(){this._adapter.removeDrawerClass([J1.classes.CLOSED,J1.classes.CLOSING]),this._adapter.setHostAttribute(J1.attributes.OPEN)}_setClosed(){this._adapter.removeDrawerClass([J1.classes.CLOSING,J1.classes.NO_TRANSITION]),this._adapter.setDrawerClass(J1.classes.CLOSED),this._adapter.removeHostAttribute(J1.attributes.OPEN)}_applyOpen(){this._open?(this._triggerDrawerOpen(),this._adapter.setHostAttribute(J1.attributes.OPEN)):(this._triggerDrawerClose(),this._adapter.removeHostAttribute(J1.attributes.OPEN))}async _triggerDrawerOpen(){this._adapter.listenTransitionComplete(this._openAnimationListener),await Mo(),this._adapter.removeDrawerClass([J1.classes.CLOSED,J1.classes.CLOSING])}async _triggerDrawerClose(){this._adapter.listenTransitionComplete(this._closeAnimationListener),await Mo(),this._adapter.setDrawerClass(J1.classes.CLOSING)}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get direction(){return this._direction}set direction(t){this._direction!==t&&(this._direction=t,this._adapter.isConnected&&this._applyDirection())}};var Qe=class extends M{static get observedAttributes(){return Object.values(J1.observedAttributes)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case J1.observedAttributes.OPEN:this.open=p(o);break;case J1.observedAttributes.DIRECTION:this.direction=o;break}}};i([c()],Qe.prototype,"open",2),i([c()],Qe.prototype,"direction",2);var dx=`${b}drawer`,Lp={elementName:dx};var gx='<template><div class="forge-drawer" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',wx=':host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}:host([open]){transform:translateZ(0)}',Ea=class extends Qe{constructor(){super(),H(this,gx,wx),this._core=new co(new lo(this))}};Ea=i([y({name:Lp.elementName})],Ea);function Vp(){f(Ea)}var ji=class extends lo{constructor(e){super(e);this._component=e;this._backdropElement=w(this._component,i2.elementName)}setBackdropCloseListener(e){this._backdropElement.addEventListener("click",e)}setBackdropVisibility(e,{immediate:o}){return this._backdropElement.toggleAttribute("hidden",!e),!this._backdropElement.fadeIn||!this._backdropElement.fadeOut?(o&&this._backdropElement.toggleAttribute(i2.attributes.VISIBLE,e),Promise.resolve()):o?Promise.resolve(e?this._backdropElement.show():this._backdropElement.hide()):e?this._backdropElement.fadeIn():this._backdropElement.fadeOut()}toggleBackdropClass(e,o){f2(this._backdropElement,e,o)}};var Cp=`${b}modal-drawer`,ux={DISPLAY_NONE:"display-none",SCRIM_CLOSED:"closed"},_x={CLOSE:`${Cp}-close`},Ba={elementName:Cp,classes:ux,events:_x};var Qi=class extends co{constructor(e){super(e);this._adapter=e;this._open=!1;this._backdropClickListener=this._onBackdropClick.bind(this)}initialize(){super.initialize(),this._adapter.setBackdropCloseListener(this._backdropClickListener),this._setBackdrop(this._open,{immediate:!0})}async _triggerDrawerOpen(){super._triggerDrawerOpen(),this._setBackdrop(!0)}async _triggerDrawerClose(){super._triggerDrawerClose(),this._setBackdrop(!1)}_onBackdropClick(e){this._adapter.emitHostEvent(Ba.events.CLOSE,void 0,!0,!0)&&(this.open=!1)}async _setBackdrop(e,{immediate:o=!1}={}){e?(this._adapter.toggleBackdropClass(!1,Ba.classes.SCRIM_CLOSED),this._adapter.setBackdropVisibility(!0,{immediate:o})):this._adapter.isConnected&&(await this._adapter.setBackdropVisibility(!1,{immediate:o}),this._open||this._adapter.toggleBackdropClass(!0,Ba.classes.SCRIM_CLOSED))}};var xx='<template><forge-backdrop class="scrim" hidden exportparts="root:backdrop"></forge-backdrop><div class="forge-drawer modal" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',fx=':host{--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.forge-drawer.modal{position:absolute;top:0;z-index:var(--forge-z-index-dialog,8);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);max-width:80%}.forge-drawer.modal.closed,.forge-drawer.modal.closing{box-shadow:none}.forge-drawer.modal.closing.right{transform:translateX(100%)}.forge-drawer.right{right:0}.forge-drawer.display-none{display:none!important}.scrim{z-index:var(--forge-z-index-dialog,8)}.scrim.closed{display:none}',Aa=class extends Qe{constructor(){super(),H(this,xx,fx),this._core=new Qi(new ji(this))}};Aa=i([y({name:Ba.elementName,dependencies:[Xe]})],Aa);function Ep(){f(Aa)}var bx=`${b}mini-drawer`,yx={HOVER:"hover"},Bp={elementName:bx,attributes:yx};var Mx='<template><div class="root" part="root"><div class="forge-drawer mini" part="container"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></div></template>',zx=':host{--_mini-drawer-width:var(--forge-mini-drawer-width, 56px);--_mini-drawer-min-width:var(--forge-mini-drawer-min-width, var(--_mini-drawer-width));--_mini-drawer-hover-width:var(--forge-mini-drawer-hover-width, var(--forge-drawer-width, 256px));--_mini-drawer-transition-duration:var(--forge-mini-drawer-transition-duration, var(--forge-animation-duration-short4, 200ms));--_mini-drawer-transition-easing:var(--forge-mini-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_mini-drawer-transition-delay:var(--forge-mini-drawer-transition-delay, 300ms);--_mini-drawer-hover-transition-duration:var(--forge-mini-drawer-hover-transition-duration, var(--forge-animation-duration-medium2, 300ms));--_mini-drawer-hover-transition-easing:var(--forge-mini-drawer-hover-transition-easing, var(--_mini-drawer-transition-easing));--_mini-drawer-hover-transition-delay:var(--forge-mini-drawer-hover-transition-delay, var(--forge-animation-duration-medium2, 300ms))}:host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;width:var(--_mini-drawer-width);overflow:visible!important;--forge-divider-margin:4px 0}:host([direction=right]){min-width:var(--_mini-drawer-width);width:auto}:host([direction=right]) .root{position:relative}:host(:not([open])){display:none}:host([hover]) .right{position:absolute;right:0}:host([hover]) .forge-drawer:hover{width:var(--_mini-drawer-hover-width)!important;transition:width var(--_mini-drawer-hover-transition-duration) var(--_mini-drawer-hover-transition-easing) var(--_mini-drawer-hover-transition-delay)}:host([hover]) .forge-drawer:hover .content{overflow:auto}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.root{z-index:var(--forge-z-index-surface,1);height:100%;min-width:var(--_mini-drawer-min-width)}.forge-drawer.mini{width:var(--_mini-drawer-width);z-index:var(--forge-z-index-surface,1);transition:width var(--_mini-drawer-transition-duration) var(--_mini-drawer-transition-easing)}.forge-drawer.mini .content{overflow:hidden}.forge-drawer.closed{width:0}',Ta=class extends Qe{constructor(){super(),H(this,Mx,zx),this._core=new co(new lo(this))}get hover(){return this.hasAttribute("hover")}set hover(t){this.toggleAttribute("hover",t)}};Ta=i([y({name:Bp.elementName})],Ta);function Ap(){f(Ta)}var Tp=`${b}file-picker`,Hx={ACCEPT:"accept",MAX_SIZE:"max-size",CAPTURE:"capture",MULTIPLE:"multiple",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},Ix={HIGHLIGHT:"highlight",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},Lx={CONTAINER:"container",BUTTON:"button",INPUT:"input"},Vx={CONTAINER:"#container",BUTTON:"#button",INPUT:"#input",BUTTON_SLOT:"#button-slot"},Cx={FILES_CHANGED:`${Tp}-change`},x1={elementName:Tp,attributes:Hx,classes:Ix,ids:Lx,selectors:Vx,events:Cx};var Ji=class extends I{constructor(t){super(t),this._container=w(t,x1.selectors.CONTAINER),this._buttonSlot=w(t,x1.selectors.BUTTON_SLOT),this._input=w(t,x1.selectors.INPUT),this._inputEventListener=()=>{this._input.value="",this._input.click()},this._container.addEventListener("click",this._inputEventListener)}destroy(){this._inputEventListener&&(this._container.removeEventListener("click",this._inputEventListener),this._inputEventListener=void 0)}registerButtonSlotListener(t){this._buttonSlot.addEventListener("slotchange",t)}registerInputChangeListener(t){this._input.addEventListener("change",t)}registerDragEnterListener(t){this._container.addEventListener("dragenter",t)}registerDragLeaveListener(t){this._container.addEventListener("dragleave",t)}registerDragOverListener(t){this._container.addEventListener("dragover",t)}registerDropListener(t){this._container.addEventListener("drop",t)}removeDragEnterListener(t){this._container.removeEventListener("dragenter",t)}removeDragLeaveListener(t){this._container.removeEventListener("dragleave",t)}removeDragOverListener(t){this._container.removeEventListener("dragover",t)}removeDropListener(t){this._container.removeEventListener("drop",t)}initializeButton(){let t=this._component.querySelector("forge-button");this._button=t||void 0}setHighlightState(t){this._container.classList.contains(x1.classes.HIGHLIGHT)!==t&&this._container.classList.toggle(x1.classes.HIGHLIGHT)}setAccept(t){t?this._input.setAttribute("accept",t):this._input.removeAttribute("accept")}setCapture(t){t?this._input.setAttribute("capture",t):this._input.removeAttribute("capture")}setMultiple(t){t?this._input.setAttribute("multiple",""):this._input.removeAttribute("multiple")}setDisabled(t){var e,o;t?(this._container.removeEventListener("click",this._inputEventListener),(e=this._button)==null||e.setAttribute("disabled",""),this._container.setAttribute("disabled","")):(this._container.addEventListener("click",this._inputEventListener),(o=this._button)==null||o.removeAttribute("disabled"),this._container.removeAttribute("disabled"))}setCompact(t){this._container.classList.contains(x1.classes.COMPACT)!==t&&this._container.classList.toggle(x1.classes.COMPACT)}setBorderless(t){this._container.classList.contains(x1.classes.BORDERLESS)!==t&&this._container.classList.toggle(x1.classes.BORDERLESS)}};var t4=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._accept=null;this._maxSize=null;this._capture=null;this._multiple=!1;this._disabled=!1;this._compact=!1;this._borderless=!1;this._buttonSlotListener=e=>this._onButtonSlotChanged(e),this._inputChangeListener=e=>this._onInputChange(e),this._dragEnterListener=e=>this._onDragEnter(e),this._dragLeaveListener=e=>this._onDragLeave(e),this._dragOverListener=e=>this._onDragOver(e),this._dropListener=e=>this._onDrop(e),this._adapter.registerButtonSlotListener(this._buttonSlotListener),this._adapter.registerInputChangeListener(this._inputChangeListener),this._compact||this._registerDragListeners()}initialize(){this._adapter.initializeButton(),this._adapter.setDisabled(this._disabled),this._isInitialized=!0}destroy(){this._adapter.destroy(),this._isInitialized=!1}_onButtonSlotChanged(t){this._adapter.initializeButton()}_onInputChange(t){let e=t.target.files;e&&this._handleFiles(e)}_onDragEnter(t){this._handleDragEvent(t,!0)}_onDragLeave(t){this._handleDragEvent(t,!1)}_onDragOver(t){this._handleDragEvent(t,!0)}_onDrop(t){if(this._handleDragEvent(t,!1),!this._disabled){let e=t.dataTransfer;if(e){let o=e.files;this._handleFiles(o)}}}_registerDragListeners(){this._adapter.registerDragEnterListener(this._dragEnterListener),this._adapter.registerDragLeaveListener(this._dragLeaveListener),this._adapter.registerDragOverListener(this._dragOverListener),this._adapter.registerDropListener(this._dropListener)}_removeDragListeners(){this._adapter.removeDragEnterListener(this._dragEnterListener),this._adapter.removeDragLeaveListener(this._dragLeaveListener),this._adapter.removeDragOverListener(this._dragOverListener),this._adapter.removeDropListener(this._dropListener)}_handleFiles(t){let e={};if(t){let o=this._sortFiles(t),a=o.legalFiles||null;!this._multiple&&a&&a.length>1&&(a=a.splice(1)),e=o}this._adapter.emitHostEvent(x1.events.FILES_CHANGED,e)}_sortFiles(t){let e=[],o=[];if(!this._accept&&!this.maxSize)return e=Array.from(t),{legalFiles:e,illegalFiles:o};let a=this._accept?this._accept.split(",").map(s=>s.trim().toLowerCase()):[""];for(let s=0;s<t.length;s++)!a.some(r=>t[s].type.toLowerCase().match(r)||t[s].name.toLowerCase().match("\\"+r))||this._maxSize&&t[s].size>this._maxSize?o.push(t[s]):e.push(t[s]);return{legalFiles:e,illegalFiles:o}}_handleDragEvent(t,e){this._disabled||(t.preventDefault(),t.stopPropagation(),this._adapter.setHighlightState(e))}get accept(){return this._accept}set accept(t){this._accept!==t&&(this._accept=t,this._adapter.setAccept(t),this._adapter.toggleHostAttribute(x1.attributes.ACCEPT,!!t,String(t)))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize!==t&&(this._maxSize=t,this._adapter.toggleHostAttribute(x1.attributes.MAX_SIZE,!!t,String(t)))}get capture(){return this._capture}set capture(t){this._capture!==t&&(this._capture=t,this._adapter.setCapture(t),this._adapter.toggleHostAttribute(x1.attributes.CAPTURE,!!t,String(t)))}get multiple(){return this._multiple}set multiple(t){this._multiple!==t&&(this._multiple=t,this._adapter.setMultiple(t),this._adapter.toggleHostAttribute(x1.attributes.MULTIPLE,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(x1.attributes.DISABLED,t))}get compact(){return this._compact}set compact(t){this._compact!==t&&(this._compact=t,this._adapter.setCompact(t),t?this._removeDragListeners():this._registerDragListeners(),this._adapter.toggleHostAttribute(x1.attributes.COMPACT,t))}get borderless(){return this._borderless}set borderless(t){this._borderless!==t&&(this._borderless=t,this._adapter.setBorderless(t),this._adapter.toggleHostAttribute(x1.attributes.BORDERLESS,t))}};var Ex='<template><form class="forge-file-picker" id="container" part="form"><div class="primary" id="primary" part="primary"><slot name="primary"></slot></div><slot id="button-slot"></slot><div class="secondary" id="secondary" part="secondary"><slot name="secondary"></slot></div><input type="file" class="input" id="input" part="input"></form><div class="helper-text" part="helper-text-container"><slot name="helper-text"></slot></div></template>',Bx=':host{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}:host{display:block;height:100%;width:100%}:host([hidden]){display:none}:host([compact]){display:inline-block}.forge-file-picker{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}.forge-file-picker{display:grid;justify-content:center;align-content:center;gap:var(--_file-picker-gap);box-sizing:border-box;padding:var(--_file-picker-padding);height:var(--_file-picker-height);width:var(--_file-picker-width);max-width:var(--_file-picker-max-width);text-align:center;background:var(--_file-picker-background);cursor:pointer;border-width:var(--_file-picker-border-width);border-style:var(--_file-picker-border-style);border-color:var(--_file-picker-border-color)}.forge-file-picker[disabled]{opacity:var(--_file-picker-disabled-opacity);cursor:unset}.forge-file-picker:not(.compact).highlight{--_file-picker-border-color:var(--_file-picker-highlight-border-color);--_file-picker-background:var(--_file-picker-highlight-background)}.primary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.secondary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.input{display:none}.helper-text ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);text-align:start}.borderless{--_file-picker-width:var(--forge-file-picker-width, 100%);border:none}.borderless:not(.compact).highlight{border:none}.borderless+.helper-text{display:none}.compact{--_file-picker-height:var(--forge-file-picker-height, fit-content);--_file-picker-width:var(--forge-file-picker-width, fit-content);--_file-picker-background-color:var(--forge-file-picker-background-color, transparent);--_file-picker-padding:var(--forge-file-picker-padding, 0);border:none}.compact .primary,.compact .secondary{display:none}.compact .button{--_file-picker-width:var(--forge-file-picker-width, auto);background-color:transparent}',Qt=class extends M{static get observedAttributes(){return[x1.attributes.ACCEPT,x1.attributes.MAX_SIZE,x1.attributes.CAPTURE,x1.attributes.MULTIPLE,x1.attributes.DISABLED,x1.attributes.COMPACT,x1.attributes.BORDERLESS]}constructor(){super(),H(this,Ex,Bx),this._core=new t4(new Ji(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case x1.attributes.ACCEPT:this.accept=o;break;case x1.attributes.MAX_SIZE:this.maxSize=K(o);break;case x1.attributes.CAPTURE:this.capture=o;break;case x1.attributes.MULTIPLE:this.multiple=p(o);break;case x1.attributes.DISABLED:this.disabled=p(o);break;case x1.attributes.COMPACT:this.compact=p(o);break;case x1.attributes.BORDERLESS:this.borderless=p(o);break}}};i([c()],Qt.prototype,"accept",2),i([c()],Qt.prototype,"maxSize",2),i([c()],Qt.prototype,"capture",2),i([c()],Qt.prototype,"multiple",2),i([c()],Qt.prototype,"disabled",2),i([c()],Qt.prototype,"compact",2),i([c()],Qt.prototype,"borderless",2),Qt=i([y({name:x1.elementName,dependencies:[T2]})],Qt);var Sp=class extends Z1{constructor(t){super(t)}_build(){return document.createElement(x1.elementName)}_configure(){var t,e,o,a;if((t=this._config.options)!=null&&t.primaryText){let s=document.createElement("span");s.slot="primary",s.textContent=this._config.options.primaryText,this._element.appendChild(s)}if((e=this._config.options)!=null&&e.secondaryText){let s=document.createElement("span");s.slot="secondary",s.textContent=this._config.options.secondaryText,this._element.appendChild(s)}if((o=this._config.options)!=null&&o.buttonText&&new Sr({options:{parent:this._element,text:this._config.options.buttonText},props:{variant:"outlined"}}),(a=this._config.options)!=null&&a.helperText){let s=document.createElement("span");s.slot="helper-text",s.textContent=this._config.options.helperText,this._element.appendChild(s)}}onChange(t){this._element.addEventListener(x1.events.FILES_CHANGED,e=>t(e.detail))}};function kp(){f(Qt)}var Op=`${b}fab`,Dp={THEME:"theme",DENSITY:"density",ELEVATION:"elevation"},Ax=d({},Dp),Tx={LABEL_SLOT:"slot[name=label]"},Sx={EXTENDED:`${Op}--extended`},kx={DEFAULT_THEME:"secondary",DEFAULT_DENSITY:"medium",DEFAULT_ELEVATION:"raised"},c2={elementName:Op,observedAttributes:Dp,attributes:Ax,selectors:Tx,classes:Sx,defaults:kx};var e4=class extends G0{constructor(t){super(t),this._labelSlotElement=w(this._component,c2.selectors.LABEL_SLOT)}initialize(){super.initialize(),this._labelSlotElement.addEventListener("slotchange",()=>this._detectExtendedState()),this._detectExtendedState()}toggleDefaultPopoverIcon(t){super.toggleDefaultPopoverIcon(t),this._detectExtendedState()}_detectExtendedState(){let t=this._labelSlotElement.assignedNodes().length>0||this._component.popoverIcon;this._rootElement.classList.toggle(c2.classes.EXTENDED,t)}};var o4=class extends W0{constructor(e){super(e);this._theme=c2.defaults.DEFAULT_THEME;this._density=c2.defaults.DEFAULT_DENSITY;this._elevation=c2.defaults.DEFAULT_ELEVATION}get theme(){return this._theme}set theme(e){if(this._theme!==e){this._theme=e!=null?e:c2.defaults.DEFAULT_THEME;let o=this._theme!==c2.defaults.DEFAULT_THEME;this._adapter.toggleHostAttribute(c2.attributes.THEME,o,this._theme)}}get density(){return this._density}set density(e){if(this._density!==e){this._density=e!=null?e:c2.defaults.DEFAULT_DENSITY;let o=this._density!==c2.defaults.DEFAULT_DENSITY;this._adapter.toggleHostAttribute(c2.attributes.DENSITY,o,this._density)}}get elevation(){return this._elevation}set elevation(e){if(this._elevation!==e){this._elevation=e!=null?e:c2.defaults.DEFAULT_ELEVATION;let o=this._elevation!==c2.defaults.DEFAULT_ELEVATION;this._adapter.toggleHostAttribute(c2.attributes.ELEVATION,o,this._elevation)}}};var Ox='<template><div class="forge-fab" part="root"><slot name="start"></slot><slot></slot><slot name="label"></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',Dx=':host{--_fab-display:var(--forge-fab-display, inline-flex);--_fab-disabled-cursor:var(--forge-fab-disabled-cursor, not-allowed)}:host{display:var(--_fab-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-fab{--_fab-gap:var(--forge-fab-gap, var(--forge-spacing-xsmall, 8px));--_fab-background:var(--forge-fab-background, var(--forge-theme-secondary, #ffc107));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-secondary, #000000));--_fab-size:var(--forge-fab-size, 56px);--_fab-padding:var(--forge-fab-padding, var(--forge-spacing-xsmall, 8px));--_fab-shadow:var(--forge-fab-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-hover-shadow:var(--forge-fab-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_fab-active-shadow:var(--forge-fab-active-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-shadow:var(--forge-fab-lowered-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-hover-shadow:var(--forge-fab-lowered-hover-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-active-shadow:var(--forge-fab-lowered-active-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-transition-duration:var(--forge-fab-transition-duration, var(--forge-animation-duration-short3, 150ms));--_fab-transition-timing:var(--forge-fab-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_fab-shape-start-start:var(--forge-fab-shape-start-start, var(--_fab-shape));--_fab-shape-start-end:var(--forge-fab-shape-start-end, var(--_fab-shape));--_fab-shape-end-start:var(--forge-fab-shape-end-start, var(--_fab-shape));--_fab-shape-end-end:var(--forge-fab-shape-end-end, var(--_fab-shape));--_fab-extended-padding:var(--forge-fab-extended-padding, var(--forge-spacing-medium-large, 20px));--_fab-extended-min-width:var(--forge-fab-extended-min-width, 96px);--_fab-density-small-size:var(--forge-fab-density-small-size, 40px);--_fab-density-medium-size:var(--forge-fab-density-medium-size, var(--_fab-size));--_fab-density-large-size:var(--forge-fab-density-large-size, 96px);--_fab-disabled-background:var(--forge-fab-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_fab-disabled-color:var(--forge-fab-disabled-color, var(--forge-theme-on-surface-container, #000000));--_fab-disabled-opacity:var(--forge-fab-disabled-opacity, 0.38)}.forge-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:inline-flex;justify-content:center;align-items:center;gap:var(--_fab-gap);z-index:0;background:var(--_fab-background);color:var(--_fab-color);cursor:pointer;box-shadow:var(--_fab-shadow);box-sizing:border-box;height:var(--_fab-density-medium-size);min-width:var(--_fab-density-medium-size);padding-inline:var(--_fab-padding);border-width:medium;border-style:none;border-color:currentColor;border-top-left-radius:var(--_fab-shape-start-start);border-top-right-radius:var(--_fab-shape-start-end);border-bottom-left-radius:var(--_fab-shape-end-start);border-bottom-right-radius:var(--_fab-shape-end-end);user-select:none;white-space:nowrap;transition-property:box-shadow,background,color;transition-duration:var(--_fab-transition-duration);transition-timing-function:var(--_fab-transition-timing)}.forge-fab:hover{--_fab-shadow:var(--_fab-hover-shadow)}.forge-fab:active{--_fab-shadow:var(--_fab-active-shadow)}.forge-fab--extended{--_fab-padding:var(--_fab-extended-padding);min-width:var(--_fab-extended-min-width)}.with-anchor{padding-inline:0}::slotted(a){height:100%;width:100%;outline:0;border-radius:var(--_fab-shape);padding-inline:var(--_fab-padding);display:flex;align-items:center;justify-content:center;gap:var(--_fab-gap);color:var(--_fab-color);text-decoration:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_fab-background);--forge-focus-indicator-shape-start-start:var(--_fab-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_fab-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_fab-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_fab-shape-end-end)}forge-state-layer{--forge-state-layer-color:var(--_fab-color)}:host(:is([dense],[density=small])) .forge-fab{--_fab-size:var(--_fab-density-small-size)}:host([density=large]) .forge-fab{--_fab-size:var(--_fab-density-large-size);--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)))}:host([elevation=lowered]) .forge-fab{--_fab-shadow:var(--_fab-lowered-shadow)}:host([elevation=lowered]) .forge-fab:hover{--_fab-shadow:var(--_fab-lowered-hover-shadow)}:host([elevation=lowered]) .forge-fab:active{--_fab-shadow:var(--_fab-lowered-active-shadow)}:host([disabled]){cursor:var(--_fab-disabled-cursor)}:host([disabled]) .forge-fab{--_fab-background:var(--_fab-disabled-background);--_fab-color:var(--_fab-disabled-color);pointer-events:none;opacity:var(--_fab-disabled-opacity)}:host([theme=primary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-primary, #3f51b5));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=tertiary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-tertiary, #3d5afe));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=success]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-success, #2e7d32));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-success, #ffffff))}:host([theme=error]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-error, #b00020));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-error, #ffffff))}:host([theme=warning]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-warning, #d14900));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=info]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-info, #1565c0));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-info, #ffffff))}',z0=class extends jt{static get observedAttributes(){return[...Object.values(h2.observedAttributes),...Object.values(c2.observedAttributes)]}constructor(){super(),H(this,Ox,Dx),this._core=new o4(new e4(this))}attributeChangedCallback(t,e,o){switch(t){case c2.attributes.THEME:this.theme=o;return;case c2.attributes.DENSITY:this.density=o;return;case c2.attributes.ELEVATION:this.elevation=o;return}super.attributeChangedCallback(t,e,o)}};i([c()],z0.prototype,"theme",2),i([c()],z0.prototype,"density",2),i([c()],z0.prototype,"elevation",2),z0=i([y({name:c2.elementName,dependencies:[J,r1,j]})],z0);var Pp=class extends Z1{constructor(t){super(t)}_build(){var e,o,a,s,r;let t=document.createElement(c2.elementName);if((e=this._config.options)!=null&&e.theme&&(t.theme=this._config.options.theme),(o=this._config.options)!=null&&o.density&&(t.density=this._config.options.density),(a=this._config.options)!=null&&a.elevation&&(t.elevation=this._config.options.elevation),(r=(s=this._config.options)==null?void 0:s.label)!=null&&r.trim().length){let l=document.createElement("span");l.slot="label",t.textContent=this._config.options.label,t.appendChild(l)}return t}_configure(){this._configureIcon()}_configureIcon(){var e,o;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((o=this._config.options)==null?void 0:o.iconType)||"component"){case"font":{let a=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[We];H1(a,this._element),this._element.textContent=this._config.options.iconName;break}case"component":this._iconElement=document.createElement(p1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&H1(this._config.options.iconClass,this._iconElement),this._element.appendChild(this._iconElement);break}}get iconElement(){return this._iconElement}get disabled(){return!!this._element.disabled}set disabled(t){this._element.disabled=t}onClick(t){this._element.addEventListener("click",t)}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}};function Np(){f(z0)}var Px=`${b}inline-message`,Nx={THEME:"theme"},Rx={THEME:"info"},Sa={elementName:Px,attributes:Nx,defaults:Rx};var Fx='<template><div class="forge-inline-message" part="root"><slot name="icon"></slot><div class="container" part="container"><slot name="title"></slot><slot></slot></div></div></template>',Ux=':host{display:block}:host([hidden]){display:none}.forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-info-container-low, #e3edf7));--_inline-message-color:var(--forge-inline-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_inline-message-shape:var(--forge-inline-message-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_inline-message-padding:var(--forge-inline-message-padding, var(--forge-spacing-small, 12px));--_inline-message-padding-inline:var(--forge-inline-message-padding-inline, var(--_inline-message-padding));--_inline-message-padding-block:var(--forge-inline-message-padding-block, var(--_inline-message-padding));--_inline-message-border-width:var(--forge-inline-message-border-width, var(--forge-border-thin, 1px));--_inline-message-border-style:var(--forge-inline-message-border-style, none);--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-info-container, #c7daf0));--_inline-message-gap:var(--forge-inline-message-gap, var(--forge-spacing-small, 12px));--_inline-message-icon-gap:var(--forge-inline-message-icon-gap, var(--_inline-message-gap));--_inline-message-content-gap:var(--forge-inline-message-content-gap, var(--_inline-message-gap));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-info-container-low, #0b3768))}.forge-inline-message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);background:var(--_inline-message-background);color:var(--_inline-message-color);border-radius:var(--_inline-message-shape);border-width:var(--_inline-message-border-width);border-style:var(--_inline-message-border-style);border-color:var(--_inline-message-border-color);display:flex;align-items:center;gap:var(--_inline-message-icon-gap);box-sizing:border-box;padding-inline:var(--_inline-message-padding-inline);padding-block:var(--_inline-message-padding-block)}.forge-inline-message .container{display:flex;flex-direction:column;gap:var(--_inline-message-content-gap)}::slotted(*){margin:0}::slotted([slot=title]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-font-size-scale, .875)));font-weight:var(--forge-typography-heading1-font-weight,500);line-height:var(--forge-typography-heading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-heading1-letter-spacing, .0178571429em);text-transform:var(--forge-typography-heading1-text-transform,inherit);text-decoration:var(--forge-typography-heading1-text-decoration,inherit)}::slotted([slot=icon]){color:var(--_inline-message-icon-color);align-self:start}:host([theme=primary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-primary-container-low, #e8eaf6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-primary-container-low, #222c62));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-secondary-container, #fff0c3));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-secondary-container, #8a6804));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=tertiary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-tertiary-container-low, #213189));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-tertiary-container, #d0d7ff))}:host([theme=success]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-success-container-low, #e6efe6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-success-container-low, #19441b));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=warning]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-warning-container-low, #f9e9e0));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-warning-container-low, #712700));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-warning-container, #f4d3c2))}:host(:is([theme=error],[theme=danger])) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-error-container-low, #f6e0e4));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-error-container-low, #5f0011));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=info-secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-surface-container-low, #ebebeb));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-surface-container-low, #000000));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-surface-container, #e0e0e0))}',ka=class extends M{constructor(){super(),H(this,Fx,Ux)}get theme(){var t;return(t=this.getAttribute(Sa.attributes.THEME))!=null?t:Sa.defaults.THEME}set theme(t){G(this,t!==Sa.defaults.THEME,Sa.attributes.THEME,t)}};ka=i([y({name:Sa.elementName})],ka);function Rp(){f(ka)}var Wx=":host{display:block}.forge-key{--_key-gap:var(--forge-key-gap, var(--forge-spacing-medium, 16px));--_key-direction:var(--forge-key-direction, row)}.forge-key{box-sizing:border-box;display:flex;flex-direction:var(--_key-direction);gap:var(--_key-gap);flex-wrap:wrap}",Fp="forge-key",Up,Wp,ho=class extends(Wp=wt,Up=q2,Wp){constructor(){super(),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Zt(this,this._internals,{role:"list"})}render(){return gt`<div part="root" class="forge-key"><slot></slot></div>`}};ho.styles=dt(Wx),ho[Up]=Fp,ho=i([kt(Fp)],ho);function Gp(){f(ho)}var Gx=':host{display:inline}.forge-key-item{--_key-item-icon-color:var(--forge-key-item-icon-color, var(--forge-theme-tertiary, #3d5afe));--_key-item-label-color:var(--forge-key-item-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_key-item-value-color:var(--forge-key-item-value-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_key-item-gap:var(--forge-key-item-gap, var(--forge-spacing-xsmall, 8px));--_key-item-icon-size:var(--forge-key-item-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1))}.forge-key-item{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);box-sizing:border-box;display:grid;grid-template:"icon label" "icon value";column-gap:var(--_key-item-gap);inline-size:fit-content;line-height:normal}.forge-key-item.inline{grid-template:"icon label value";grid-template-columns:auto 1fr auto;align-items:center;inline-size:auto}.forge-key-item.no-value{grid-template:"icon label";align-items:center}.forge-key-item.no-value .value{display:none}.forge-key-item:not(.inline,.no-value) .label{padding-block-start:1px}.icon{--forge-icon-size:var(--_key-item-icon-size);grid-area:icon;color:var(--_key-item-icon-color)}.label{grid-area:label;color:var(--_key-item-label-color)}.value{grid-area:value;color:var(--_key-item-value-color)}.default-icon{block-size:calc(var(--_key-item-icon-size) - 1px);inline-size:calc(var(--_key-item-icon-size) - 1px);border-radius:50%;background:currentColor}',qp="forge-key-item",Yp,Kp,Be=class extends(Kp=wt,Yp=q2,Kp){constructor(){super();this.inline=!1;this._hasValue=!1;this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Zt(this,this._internals,{role:"listitem"}),this._handleSlotChange()}render(){return gt`
|
|
24
|
+
`}async _tryLoadImage(){if(this.imageUrl){let e=new Image;e.onload=()=>this._image=e,e.onerror=()=>this._image=void 0,e.src=this.imageUrl}else this._image=void 0}};ve.styles=dt(Pg),ve[Lv]=Iv,i([u1()],ve.prototype,"text",2),i([u1({type:Number,attribute:"letter-count"})],ve.prototype,"letterCount",2),i([u1({type:String,attribute:"image-url"})],ve.prototype,"imageUrl",2),i([ie()],ve.prototype,"_image",2),ve=i([kt(Iv)],ve);var Rg=`${b}avatar`,Fg={IMAGE_URL:"image-url",TEXT:"text",LETTER_COUNT:"letter-count"},Ug={DEFAULT_LETTER_COUNT:2},Dr={elementName:Rg,attributes:Fg,numbers:Ug};function _a(){f(ve)}var Wg=`${b}toolbar`,Cv={INVERTED:"inverted"},Gg=d({},Cv),Ev={TOOLBAR:"forge-toolbar"},qg={TOOLBAR:`.${Ev.TOOLBAR}`,BEFORE_START:"slot[name=before-start]",START_SLOT:"slot[name=start]",CENTER_SLOT:"slot[name=center]",END_SLOT:"slot[name=end]",AFTER_END:"slot[name=after-end]"},yn={elementName:Wg,observedAttributes:Cv,attributes:Gg,classes:Ev,selectors:qg};var Yg='<template><div class="forge-toolbar" part="root"><div class="section" part="before-section-start"><slot name="before-start"></slot></div><div class="inner center" part="inner"><div class="section" part="section-start"><slot name="start"></slot><slot></slot></div><div class="section center" part="section-center"><slot name="center"></slot></div><div class="section end" part="section-end"><slot name="end"></slot></div></div><div class="section end" part="after-section-end"><slot name="after-end"></slot></div></div></template>',Kg=":host{display:block}:host([hidden]){display:none}.forge-toolbar{--_toolbar-background:var(--forge-toolbar-background, var(--forge-theme-surface, #ffffff));--_toolbar-height:var(--forge-toolbar-height, 56px);--_toolbar-min-height:var(--forge-toolbar-min-height, var(--_toolbar-height));--_toolbar-divider-width:var(--forge-toolbar-divider-width, var(--forge-border-thin, 1px));--_toolbar-divider-style:var(--forge-toolbar-divider-style, solid);--_toolbar-divider-color:var(--forge-toolbar-divider-color, var(--forge-theme-outline, #e0e0e0));--_toolbar-shape:var(--forge-toolbar-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, var(--_toolbar-shape));--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, var(--_toolbar-shape));--_toolbar-end-start-shape:var(--forge-toolbar-end-start-shape, 0);--_toolbar-end-end-shape:var(--forge-toolbar-end-end-shape, 0);--_toolbar-padding:var(--forge-toolbar-padding, var(--forge-spacing-medium, 16px));--_toolbar-padding-block:var(--forge-toolbar-padding-block, 0);--_toolbar-padding-inline:var(--forge-toolbar-padding-inline, var(--_toolbar-padding));--_toolbar-columns:var(--forge-toolbar-columns, auto 1fr auto)}.forge-toolbar{display:grid;grid-template-columns:var(--_toolbar-columns);height:var(--_toolbar-height);min-height:var(--_toolbar-min-height);box-sizing:border-box;padding-inline:0;border-block-end-width:var(--_toolbar-divider-width);border-block-end-style:var(--_toolbar-divider-style);border-block-end-color:var(--_toolbar-divider-color);border-start-start-radius:var(--_toolbar-start-start-shape);border-start-end-radius:var(--_toolbar-start-end-shape);border-end-start-radius:var(--_toolbar-end-start-shape);border-end-end-radius:var(--_toolbar-end-end-shape);background:var(--_toolbar-background)}.inner{display:grid;grid-template-columns:var(--_toolbar-columns);padding-inline:var(--_toolbar-padding-inline);padding-block:var(--_toolbar-padding-block);box-sizing:border-box}.inner.center{min-width:0}.section{display:flex;align-items:center;width:100%;box-sizing:border-box}.section.center{justify-content:center;min-width:0}.section.end{justify-content:end}:host([inverted]) .forge-toolbar{--_toolbar-start-start-shape:var(--forge-toolbar-start-start-shape, 0);--_toolbar-start-end-shape:var(--forge-toolbar-start-end-shape, 0);--_toolbar-end-start-shape:var(--_toolbar-shape);--_toolbar-end-end-shape:var(--_toolbar-shape);border-block-end:none;border-block-start-width:var(--_toolbar-divider-width);border-block-start-style:var(--_toolbar-divider-style);border-block-start-color:var(--_toolbar-divider-color)}:host(:is([no-divider],[no-border])) .forge-toolbar{border:none}:host([no-padding]) .forge-toolbar{--_toolbar-padding:var(--forge-toolbar-padding, 0)}:host([auto-height]) .forge-toolbar{--_toolbar-height:var(--forge-toolbar-height, auto)}::slotted(:is(h1,h2,h3,h4,h5,h6,p)){margin:0}",pe=class extends M{constructor(){super();this._inverted=!1;H(this,Yg,Kg)}static get observedAttributes(){return Object.values(yn.observedAttributes)}attributeChangedCallback(e,o,a){switch(e){case yn.observedAttributes.INVERTED:this.inverted=p(a);break}}get inverted(){return this._inverted}set inverted(e){this._inverted!==e&&(this._inverted=e,this.toggleAttribute(yn.attributes.INVERTED,this._inverted))}};pe=i([y({name:yn.elementName})],pe);function Bv(){f(pe)}var $g='<template><div class="forge-profile-card" part="root"><div class="info-container"><div class="avatar"><forge-avatar part="avatar"></forge-avatar></div><div class="info-text"><div class="full-name" part="name"></div><div class="email" part="email"></div></div></div><slot></slot><forge-toolbar inverted id="action-toolbar"><forge-button variant="outlined" slot="end" style="display: none" part="profile-button" id="profile-button">Profile</forge-button><forge-button slot="end" part="sign-out-button" id="sign-out-button">Sign out</forge-button></forge-toolbar></div></template>',Xg=':host{display:block}:host([hidden]){display:none}.forge-profile-card{--_profile-card-min-width:var(--forge-profile-card-min-width, 360px);--_profile-card-shape:var(--forge-profile-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_profile-card-avatar-size:var(--forge-profile-card-avatar-size, 56px)}.forge-profile-card{min-width:var(--_profile-card-min-width);border-radius:var(--_profile-card-shape)}@media (max-width:399px){.forge-profile-card{width:100vw;min-width:unset;overflow:auto}}.forge-profile-card .info-container{display:flex;align-items:center;padding-block:var(--forge-spacing-xsmall,8px);padding-inline:var(--forge-spacing-medium,16px)}.forge-profile-card .avatar{display:flex;align-items:center;padding:var(--forge-spacing-xsmall,8px);margin-inline-end:var(--forge-spacing-medium,16px);--forge-avatar-size:var(--_profile-card-avatar-size)}.forge-profile-card .text{display:flex;flex-direction:column}.forge-profile-card .full-name{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-font-size-scale, 1)));font-weight:var(--forge-typography-heading2-font-weight,500);line-height:var(--forge-typography-heading2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading2-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-heading2-letter-spacing, .0125em);text-transform:var(--forge-typography-heading2-text-transform,inherit);text-decoration:var(--forge-typography-heading2-text-decoration,inherit)}.forge-profile-card .email{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-subheading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-subheading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-font-size-scale, .875)));font-weight:var(--forge-typography-subheading1-font-weight,400);line-height:var(--forge-typography-subheading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-subheading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-subheading1-letter-spacing, normal);text-transform:var(--forge-typography-subheading1-text-transform,inherit);text-decoration:var(--forge-typography-subheading1-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}#action-toolbar{--forge-toolbar-padding:8px}#action-toolbar forge-button:not(:last-of-type){margin-inline-end:8px}',Y2=class extends M{static get observedAttributes(){return[$.attributes.FULL_NAME,$.attributes.EMAIL,$.attributes.SIGN_OUT,$.attributes.PROFILE,$.attributes.SIGN_OUT_TEXT,$.attributes.PROFILE_TEXT,$.attributes.AVATAR_TEXT,$.attributes.AVATAR_ICON,$.attributes.AVATAR_IMAGE_URL,$.attributes.AVATAR_LETTER_COUNT]}constructor(){super(),H(this,$g,Xg),this._core=new Br(new Er(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case $.attributes.FULL_NAME:this.fullName=o;break;case $.attributes.EMAIL:this.email=o;break;case $.attributes.SIGN_OUT:this.signOut=p(o);break;case $.attributes.PROFILE:this.profile=p(o);break;case $.attributes.SIGN_OUT_TEXT:this.signOutText=o;break;case $.attributes.PROFILE_TEXT:this.profileText=o;break;case $.attributes.AVATAR_TEXT:this.avatarText=o;break;case $.attributes.AVATAR_ICON:this.avatarIcon=o;break;case $.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=o;break;case $.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=K(o);break}}focus(t){this._core.focus(t)}};_a(),i([c()],Y2.prototype,"fullName",2),i([c()],Y2.prototype,"email",2),i([c()],Y2.prototype,"signOut",2),i([c()],Y2.prototype,"profile",2),i([c()],Y2.prototype,"signOutText",2),i([c()],Y2.prototype,"profileText",2),i([c()],Y2.prototype,"avatarText",2),i([c()],Y2.prototype,"avatarIcon",2),i([c()],Y2.prototype,"avatarImageUrl",2),i([c()],Y2.prototype,"avatarLetterCount",2),Y2=i([y({name:$.elementName,dependencies:[pe,T2,j]})],Y2);function Av(){f(Y2)}var Zg=`${b}app-bar-profile-button`,jg={FULL_NAME:"full-name",EMAIL:"email",AVATAR_IMAGE_URL:"avatar-image-url",AVATAR_LETTER_COUNT:"avatar-letter-count",AVATAR_TEXT:"avatar-text",AVATAR_ICON:"avatar-icon",SIGN_OUT_BUTTON:"sign-out-button",PROFILE_BUTTON:"profile-button",SIGN_OUT_BUTTON_TEXT:"sign-out-button-text",PROFILE_BUTTON_TEXT:"profile-button-text",OPEN:"open"},Qg=["aria-label","aria-labelledby"],f1={elementName:Zg,attributes:jg,forwardedAttributes:Qg};var Pr=class extends I{constructor(t){super(t)}get popupElement(){return this._popupElement}initialize(){this._avatarElement=qt(this._component,Dr.elementName),this._iconButtonElement=qt(this._component,t1.elementName);let t=this._iconButtonElement.getAttribute("aria-labelledby");this._forwardObserver=D0(this._component,f1.forwardedAttributes,(e,o)=>{e==="aria-labelledby"&&!o&&(o=t),G(this._iconButtonElement,!!o,e,o!=null?o:void 0)})}destroy(){var t;(t=this._forwardObserver)==null||t.disconnect(),this._forwardObserver=void 0,this._popupElement&&(this._popupElement.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}openPopup(t,e,o,a,s){var r;return(r=this._popupElement)!=null&&r.isConnected&&this._popupElement.remove(),this._profileCardElement=document.createElement($.elementName),this._profileCardElement.fullName=t.fullName,this._profileCardElement.email=t.email,this._profileCardElement.signOut=t.signOut,this._profileCardElement.profile=t.profile,this._profileCardElement.signOutText=t.signOutButtonText,this._profileCardElement.profileText=t.profileButtonText,this._profileCardElement.avatarText=t.avatarText,this._profileCardElement.avatarIcon=t.avatarIcon,this._profileCardElement.avatarImageUrl=t.avatarImageUrl,this._profileCardElement.avatarLetterCount=t.avatarLetterCount,this._profileCardElement.addEventListener($.events.PROFILE,()=>o()),this._profileCardElement.addEventListener($.events.SIGN_OUT,()=>a()),s&&this._profileCardElement.appendChild(s),this._popupElement=document.createElement("forge-popover"),this._popupElement.anchorElement=this._iconButtonElement,this._popupElement.placement="bottom-end",this._popupElement.arrow=!0,this._popupElement.persistent=!0,this._popupElement.appendChild(this._profileCardElement),this._component.ownerDocument.body.appendChild(this._popupElement),this._popupElement.open=!0,this._profileCardElement.tabIndex=-1,this._profileCardElement.focus(),S3(this._popupElement,()=>{if(!this._popupElement){e();return}!this._popupElement.matches(":focus-within")&&!this._component.matches(":focus-within")&&e()},!0)}async closePopup(){var t;this._popupElement&&(await this._popupElement.hideAsync(),(t=this._popupElement)==null||t.remove(),this._popupElement=void 0,this._profileCardElement=void 0)}focusButtonElement(){this._iconButtonElement.focus()}setAvatarText(t){this._avatarElement.text=t,n2(this._avatarElement)}setAvatarIcon(t){if(t){let e=new U0({props:{name:t}});this._avatarElement.replaceChildren(e.element)}else n2(this._avatarElement)}setAvatarLetterCount(t){this._avatarElement.letterCount=t}setAvatarImageUrl(t){this._avatarElement.imageUrl=t}setSignOutButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.signOutText=t,(e=this._popupElement)==null||e.position())}setProfileButtonText(t){var e;this._profileCardElement&&(this._profileCardElement.profileText=t,(e=this._popupElement)==null||e.position())}};var Nr=class{constructor(t){this._adapter=t;this._avatarLetterCount=Dr.numbers.DEFAULT_LETTER_COUNT;this._showSignOutButton=$.defaults.SHOW_SIGN_OUT_BUTTON;this._showProfileButton=$.defaults.SHOW_PROFILE_BUTTON;this._signOutButtonText=$.defaults.SIGN_OUT_BUTTON_TEXT;this._profileButtonText=$.defaults.PROFILE_BUTTON_TEXT;this._open=!1;this._isInitialized=!1;this._clickListener=this._onClick.bind(this);this._dismissListener=this._onDismiss.bind(this);this._keydownListener=this._onKeydown.bind(this);this._profileButtonListener=this._onProfileButtonClick.bind(this);this._signOutButtonListener=this._onSignOutButtonClick.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setClickListener(this._clickListener),this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setAvatarText(this._avatarText),this._adapter.setAvatarIcon(this._avatarIcon),this._isInitialized=!0}destroy(){this._adapter.removeDocumentListener("keydown",this._keydownListener),this._adapter.removeClickListener(this._clickListener),this._adapter.destroy(),this._isInitialized=!1}_onClick(t){this._open?this._closeDropdown():this._openDropdown()}_onKeydown(t){t.key==="Escape"&&(this._closeDropdown(),this._adapter.focusButtonElement())}_onDismiss(){this._closeDropdown()}_onProfileButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent($.events.PROFILE,{bubbles:!0,composed:!0})),this._closeDropdown()}_onSignOutButtonClick(){this._adapter.dispatchHostEvent(new CustomEvent($.events.SIGN_OUT,{bubbles:!0,composed:!0})),this._closeDropdown()}_openDropdown(){if(this._open)return;let t={fullName:this._fullName,email:this._email,signOut:this._showSignOutButton,profile:this._showProfileButton,signOutButtonText:this._signOutButtonText,profileButtonText:this._profileButtonText,avatarText:this._avatarText,avatarIcon:this._avatarIcon,avatarImageUrl:this._avatarImageUrl,avatarLetterCount:this._avatarLetterCount},e=this._profileCardBuilder?this._profileCardBuilder():void 0;this._cancelDismissListener=this._adapter.openPopup(t,this._dismissListener,this._profileButtonListener,this._signOutButtonListener,e),this._adapter.addDocumentListener("keydown",this._keydownListener),this._open=!0,this._adapter.toggleHostAttribute(f1.attributes.OPEN,this._open)}_closeDropdown(){this._open&&(this._cancelDismissListener&&n0(this._cancelDismissListener)&&(this._cancelDismissListener(),this._cancelDismissListener=void 0),this._open=!1,this._adapter.closePopup(),this._adapter.toggleHostAttribute(f1.attributes.OPEN,this._open))}get fullName(){return this._fullName}set fullName(t){this._fullName!==t&&(this._fullName=t,this.avatarText=this._fullName,this._adapter.setHostAttribute(f1.attributes.FULL_NAME,this._fullName))}get email(){return this._email}set email(t){this._email!==t&&(this._email=t,this._adapter.setHostAttribute(f1.attributes.EMAIL,this._email))}get avatarImageUrl(){return this._avatarImageUrl}set avatarImageUrl(t){this._avatarImageUrl!==t&&(this._avatarImageUrl=t,this._isInitialized&&(this._adapter.setAvatarImageUrl(this._avatarImageUrl),this._adapter.setHostAttribute(f1.attributes.AVATAR_IMAGE_URL,this._avatarImageUrl)))}get avatarLetterCount(){return this._avatarLetterCount}set avatarLetterCount(t){this._avatarLetterCount!==t&&(this._avatarLetterCount=t,this._isInitialized&&(this._adapter.setAvatarLetterCount(this._avatarLetterCount),this._adapter.setHostAttribute(f1.attributes.AVATAR_LETTER_COUNT,String(this._avatarLetterCount))))}get avatarText(){return this._avatarText}set avatarText(t){this._avatarText!==t&&(this._avatarText=t,this._isInitialized&&(this._adapter.setAvatarText(this._avatarText),this._adapter.toggleHostAttribute(f1.attributes.AVATAR_TEXT,!!this._avatarText,this._avatarText)))}get avatarIcon(){return this._avatarIcon}set avatarIcon(t){this._avatarIcon!==t&&(this._avatarIcon=t,this._isInitialized&&(this._adapter.setAvatarIcon(this._avatarIcon),this._adapter.toggleHostAttribute(f1.attributes.AVATAR_ICON,!!this._avatarIcon,this._avatarIcon)))}get signOutButton(){return this._showSignOutButton}set signOutButton(t){t=!!t,this._showSignOutButton!==t&&(this._showSignOutButton=t,this._adapter.toggleHostAttribute(f1.attributes.SIGN_OUT_BUTTON,this._showSignOutButton))}get profileButton(){return this._showProfileButton}set profileButton(t){t=!!t,this._showProfileButton!==t&&(this._showProfileButton=t,this._adapter.toggleHostAttribute(f1.attributes.PROFILE_BUTTON,this._showProfileButton))}get signOutButtonText(){return this._signOutButtonText}set signOutButtonText(t){this._signOutButtonText!==t&&(this._signOutButtonText=t,this._adapter.setSignOutButtonText(t))}get profileButtonText(){return this._profileButtonText}set profileButtonText(t){this._profileButtonText!==t&&(this._profileButtonText=t,this._adapter.setProfileButtonText(t))}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(t?this._openDropdown():this._closeDropdown())}get popupElement(){return this._adapter.popupElement}get profileCardBuilder(){return this._profileCardBuilder}set profileCardBuilder(t){this._profileCardBuilder=t}};var Jg='<template><forge-icon-button theme="app-bar"><forge-avatar aria-hidden="true"></forge-avatar></forge-icon-button><forge-tooltip type="label" placement="bottom-end">View profile</forge-tooltip></template>',K2=class extends M{static get observedAttributes(){return[f1.attributes.FULL_NAME,f1.attributes.EMAIL,f1.attributes.AVATAR_IMAGE_URL,f1.attributes.AVATAR_LETTER_COUNT,f1.attributes.AVATAR_TEXT,f1.attributes.AVATAR_ICON,f1.attributes.SIGN_OUT_BUTTON,f1.attributes.PROFILE_BUTTON,f1.attributes.SIGN_OUT_BUTTON_TEXT,f1.attributes.PROFILE_BUTTON_TEXT,f1.attributes.OPEN]}constructor(){super(),this._core=new Nr(new Pr(this))}initializedCallback(){E0(this,Jg)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case f1.attributes.FULL_NAME:this.fullName=o;break;case f1.attributes.EMAIL:this.email=o;break;case f1.attributes.AVATAR_IMAGE_URL:this.avatarImageUrl=o;break;case f1.attributes.AVATAR_LETTER_COUNT:this.avatarLetterCount=K(o);break;case f1.attributes.AVATAR_TEXT:this.avatarText=o;break;case f1.attributes.AVATAR_ICON:this.avatarIcon=o;break;case f1.attributes.SIGN_OUT_BUTTON:this.signOutButton=p(o);break;case f1.attributes.PROFILE_BUTTON:this.profileButton=p(o);break;case f1.attributes.SIGN_OUT_BUTTON_TEXT:this.signOutButtonText=o;break;case f1.attributes.PROFILE_BUTTON_TEXT:this.profileButtonText=o;break;case f1.attributes.OPEN:this.open=p(o);break}}get popupElement(){return this._core.popupElement}};_a(),i([c()],K2.prototype,"fullName",2),i([c()],K2.prototype,"email",2),i([c()],K2.prototype,"avatarImageUrl",2),i([c()],K2.prototype,"avatarLetterCount",2),i([c()],K2.prototype,"avatarText",2),i([c()],K2.prototype,"avatarIcon",2),i([c()],K2.prototype,"signOutButton",2),i([c()],K2.prototype,"profileButton",2),i([c()],K2.prototype,"signOutButtonText",2),i([c()],K2.prototype,"profileButtonText",2),i([c()],K2.prototype,"open",2),i([c()],K2.prototype,"profileCardBuilder",2),K2=i([y({name:f1.elementName,dependencies:[R1,Y2,i1,m1]})],K2);function Tv(){f(K2)}var tw=`${b}divider`,ew={VERTICAL:"vertical"},xa={elementName:tw,attributes:ew};var ow='<template><div class="forge-divider" part="root"></div></template>',aw=":host{--_divider-margin:var(--forge-divider-margin, 0)}:host{display:block;margin:var(--_divider-margin)}:host([hidden]){display:none}.forge-divider{--_divider-color:var(--forge-divider-color, var(--forge-theme-outline, #e0e0e0));--_divider-width:var(--forge-divider-width, var(--forge-border-thin, 1px));--_divider-border-style:var(--forge-divider-border-style, solid)}.forge-divider{border:none;border-bottom-color:var(--_divider-color);border-bottom-width:var(--_divider-width);border-bottom-style:var(--_divider-border-style);height:0}:host([vertical]){display:inline-block;height:100%}:host([vertical]) .forge-divider{border:none;border-right-color:var(--_divider-color);border-right-width:var(--_divider-width);border-right-style:var(--_divider-border-style);height:100%;width:0}",eo=class extends M{static get observedAttributes(){return[xa.attributes.VERTICAL]}constructor(){super(),H(this,ow,aw)}attributeChangedCallback(t,e,o){switch(t){case xa.attributes.VERTICAL:this.vertical=p(o);break}}get vertical(){return this.hasAttribute(xa.attributes.VERTICAL)}set vertical(t){this.toggleAttribute(xa.attributes.VERTICAL,t)}};eo=i([y({name:xa.elementName})],eo);function Sv(){f(eo)}var kv=n=>typeof n.labelChangedCallback=="function";var Y5=Symbol("privateIsFocusable"),Rr=Symbol("externalTabIndex"),Fr=Symbol("isUpdatingTabIndex"),K5=Symbol("updateTabIndex");function Ke(n){var e,o,a;class t extends n{constructor(){super(...arguments);this[a]=!1;this[o]=null;this[e]=!1}get[s2](){return this[Y5]}set[s2](l){this[s2]!==l&&(this[Y5]=l,this[K5]())}connectedCallback(){var l;this[s2]=!0,(l=super.connectedCallback)==null||l.call(this)}attributeChangedCallback(l,h,v){var m;if((m=super.attributeChangedCallback)==null||m.call(this,l,h,v),!(l!=="tabindex"||this[Fr])){if(!this.hasAttribute("tabindex")){this[Rr]=null,this[K5]();return}this[Rr]=this.tabIndex}}[(a=Y5,o=Rr,e=Fr,K5)](){var v;let l=this[s2]?0:-1,h=(v=this[Rr])!=null?v:l;this[Fr]=!0,this.tabIndex=h,this[Fr]=!1}}return t}var Ur=class extends I{constructor(t){super(t),this._focusIndicatorElement=w(t,w1.elementName),this._stateLayerElement=w(t,I1.elementName)}initialize(){this._component[N]({role:"button"},{setAttribute:!this._component.hasAttribute("role")}),this._component[N]({ariaPressed:`${!!this._component.selected}`,ariaDisabled:`${!!this._component.disabled}`}),this._component[s2]=!this._component.disabled}setSelected(t){this._component[N]({ariaPressed:`${!!t}`})}setDisabled(t){this._component[N]({ariaDisabled:`${!!t}`}),this._component[s2]=!t,this._stateLayerElement.disabled=t}forceFocusVisible(){this._focusIndicatorElement.active=!0}};var Ov=`${b}button-toggle`,Dv={SELECTED:"selected",VALUE:"value",DISABLED:"disabled",READONLY:"readonly",TABINDEX:"tabindex"},nw=d({},Dv),sw={SELECT:`${Ov}-select`},et={elementName:Ov,observedAttributes:Dv,attributes:nw,events:sw};var Wr=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._readonly=!1;this._clickListener=t=>this._onClick(t);this._keydownListener=t=>this._onKeyDown(t)}initialize(){this._adapter.initialize(),!this._disabled&&!this._readonly&&this._applyListeners()}destroy(){this._removeListeners()}focus(t={focusVisible:!0}){this._adapter.focusHost(t),t.focusVisible&&this._adapter.forceFocusVisible()}click(){this._adapter.clickHost()}_applyListeners(){this._adapter.addHostListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keydownListener)}_removeListeners(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keydownListener)}async _onClick(t){let e=this._selected;this._selected=!this._selected;let o={value:this._value,selected:this._selected},a=new CustomEvent(et.events.SELECT,{detail:o,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(a),await ae(),this._selected=e,!a.defaultPrevented&&(this.selected=!e)}_onKeyDown(t){t.key===" "&&(t.preventDefault(),this.click())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.toggleHostAttribute(et.attributes.SELECTED,this._selected))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._disabled?this._removeListeners():this._applyListeners(),this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(et.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._readonly?this._removeListeners():this._applyListeners(),this._adapter.toggleHostAttribute(et.attributes.READONLY,this._readonly))}};var rw='<template><div class="forge-button-toggle" part="root"><slot name="start"></slot><slot></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',iw=':host{--_button-toggle-display:var(--forge-button-toggle-display, inline-flex)}:host{display:var(--_button-toggle-display);position:relative;outline:0;height:100%;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-button-toggle{--_button-toggle-min-width:var(--forge-button-toggle-min-width, auto);--_button-toggle-spacing:var(--forge-button-toggle-spacing, var(--forge-spacing-xsmall, 8px));--_button-toggle-padding-block:var(--forge-button-toggle-padding-block, 2px);--_button-toggle-padding-inline:var(--forge-button-toggle-padding-inline, 8px);--_button-toggle-icon-size:var(--forge-button-toggle-icon-size, var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125)));--_button-toggle-color:var(--forge-button-toggle-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_button-toggle-background:var(--forge-button-toggle-background, transparent);--_button-toggle-hover-background:var(--forge-button-toggle-hover-background, var(--_button-toggle-background));--_button-toggle-active-background:var(--forge-button-toggle-active-background, var(--_button-toggle-background));--_button-toggle-cursor:var(--forge-button-toggle-cursor, pointer);--_button-toggle-border-width:var(--forge-button-toggle-border-width, medium);--_button-toggle-border-style:var(--forge-button-toggle-border-style, none);--_button-toggle-border-color:var(--forge-button-toggle-border-color, var(--forge-theme-outline-medium, #757575));--_button-toggle-shape:var(--forge-button-toggle-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_button-toggle-shape-start-start:var(--forge-button-toggle-shape-start-start, var(--_button-toggle-shape));--_button-toggle-shape-start-end:var(--forge-button-toggle-shape-start-end, var(--_button-toggle-shape));--_button-toggle-shape-end-start:var(--forge-button-toggle-shape-end-start, var(--_button-toggle-shape));--_button-toggle-shape-end-end:var(--forge-button-toggle-shape-end-end, var(--_button-toggle-shape));--_button-toggle-selected-background:var(--forge-button-toggle-selected-background, var(--forge-theme-tertiary-container, #d0d7ff));--_button-toggle-selected-color:var(--forge-button-toggle-selected-color, var(--forge-theme-on-tertiary-container, #213189));--_button-toggle-selected-disabled-background:var(--forge-button-toggle-selected-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_button-toggle-disabled-opacity:var(--forge-button-toggle-disabled-opacity, 0.38);--_button-toggle-disabled-cursor:var(--forge-button-toggle-disabled-cursor, not-allowed);--_button-toggle-disabled-color:var(--forge-button-toggle-disabled-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-toggle-disabled-background:var(--forge-button-toggle-disabled-background, transparent);--_button-toggle-transition-duration:var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-toggle-transition-timing:var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-toggle-focus-indicator-color:var(--forge-button-toggle-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-toggle-focus-indicator-offset:var(--forge-button-toggle-focus-indicator-offset, 0px)}.forge-button-toggle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-toggle-display);align-items:center;justify-content:center;gap:var(--_button-toggle-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-toggle-min-width);inline-size:100%;border-width:var(--_button-toggle-border-width);border-style:var(--_button-toggle-border-style);border-color:var(--_button-toggle-border-color);border-start-start-radius:var(--_button-toggle-shape-start-start);border-start-end-radius:var(--_button-toggle-shape-start-end);border-end-start-radius:var(--_button-toggle-shape-end-start);border-end-end-radius:var(--_button-toggle-shape-end-end);padding-block:var(--_button-toggle-padding-block);padding-inline:var(--_button-toggle-padding-inline);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-toggle-background);color:var(--_button-toggle-color);cursor:var(--_button-toggle-cursor);transition-property:color,background-color,border-color;transition-duration:var(--_button-toggle-transition-duration);transition-timing-function:var(--_button-toggle-transition-timing)}.forge-button-toggle forge-state-layer{--forge-state-layer-color:var(--_button-toggle-color)}.forge-button-toggle forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_button-toggle-focus-indicator-offset);--forge-focus-indicator-color:var(--_button-toggle-focus-indicator-color);--forge-focus-indicator-shape:var(--_button-toggle-shape);--forge-focus-indicator-shape-start-start:var(--_button-toggle-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_button-toggle-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_button-toggle-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_button-toggle-shape-end-end)}::slotted(:is([slot=start],[slot=end])){font-size:var(--_button-toggle-icon-size)}:host([selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-background);--_button-toggle-color:var(--_button-toggle-selected-color);--_button-toggle-border-color:var(--_button-toggle-background)}:host([disabled]){--_button-toggle-cursor:var(--_button-toggle-disabled-cursor);cursor:not-allowed}:host([disabled]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-disabled-background);--_button-toggle-color:var(--_button-toggle-disabled-color);opacity:var(--_button-toggle-disabled-opacity);pointer-events:none}:host([disabled][selected]) .forge-button-toggle{--_button-toggle-background:var(--_button-toggle-selected-disabled-background)}',me=class extends V1(L1(Ke(M))){static get observedAttributes(){return Object.values(et.observedAttributes)}constructor(){super(),H(this,rw,iw),this._core=new Wr(new Ur(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case et.attributes.VALUE:this.value=o;return;case et.attributes.SELECTED:this.selected=p(o);return;case et.attributes.DISABLED:this.disabled=p(o);return;case et.attributes.READONLY:this.readonly=p(o);return}super.attributeChangedCallback(t,e,o)}focus(t){this._core.focus(t)}click(){this._core.click()}};i([c()],me.prototype,"value",2),i([c()],me.prototype,"selected",2),i([c()],me.prototype,"disabled",2),i([c()],me.prototype,"readonly",2),me=i([y({name:et.elementName,dependencies:[J,r1]})],me);function Pv(){f(me)}function $e(n){class t extends n{get form(){return this[s1].form}get labels(){return this[s1].labels}get name(){var o;return(o=this.getAttribute("name"))!=null?o:""}set name(o){G(this,!!o,"name",o)}[te](){return this[Bt]()}formDisabledCallback(o){this.disabled=o}set[oe](o){let a=o==="select"?document.createElement("select"):document.createElement("input");a.setAttribute("type",o),a.name="internal",this._inputElement=a}[ee](o){if(this._inputElement){if(this[s1].validity.customError)return this[s1].validationMessage;if(this._inputElement){let a=Object.entries(o);for(let[s,r]of a)this._inputElement[s]=r}return this._inputElement.validationMessage}}}return t.formAssociated=!0,t}function Nv(n){class t extends n{constructor(){super(...arguments);this._hasCustomValidityError=!1}get validity(){return this[s1].validity}get validationMessage(){return this[s1].validationMessage}get willValidate(){return this[s1].willValidate}checkValidity(){return this[s1].checkValidity()}reportValidity(){return this[s1].reportValidity()}setCustomValidity(a){this._hasCustomValidityError=a!=="",this[s1].setCustomValidity({customError:this._hasCustomValidityError},a)}}return t}var Rv=`${b}button-toggle-group`,Fv={VALUE:"value",MULTIPLE:"multiple",MANDATORY:"mandatory",VERTICAL:"vertical",STRETCH:"stretch",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",DENSE:"dense",NO_OUTLINE:"no-outline",THEME:"theme"},lw=d({},Fv),cw={VERTICAL:"forge-button-toggle-group--vertical",STRETCH:"forge-button-toggle-group--stretch"},hw={ROOT:".forge-button-toggle-group"},vw={CHANGE:`${Rv}-change`},q1={elementName:Rv,observedAttributes:Fv,attributes:lw,classes:cw,selectors:hw,events:vw};var Gr=class extends I{constructor(t){super(t),this._rootElement=w(t,q1.selectors.ROOT),this._defaultSlotElement=this._rootElement.querySelector("slot")}addListener(t,e){this._rootElement.addEventListener(t,e)}removeListener(t,e){this._rootElement.removeEventListener(t,e)}addSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}deselect(t){this._getButtonToggleElements().filter(o=>o!==t).forEach(o=>o.selected=!1)}setDisabled(t){this._getButtonToggleElements().forEach(o=>o.disabled=t)}setReadonly(t){this._getButtonToggleElements().forEach(o=>o.readonly=t)}getSelectedValues(){return this._getButtonToggleElements().filter(e=>e.selected).map(e=>e.value)}applyValues(t){this._getButtonToggleElements().forEach(o=>o.selected=t.indexOf(o.value)>=0)}setFormValue(){if(!this._component.form)return;let t=this._component[Bt](),e=this._component[te]();this._component[s1].setFormValue(t,e)}setFormValidity(){if(!this._component.form||!this._component.required)return;let t=this._component.multiple?!this._component.value.length:!this._component.value;if(t){let e=this._component[ee]({required:t});this._component[s1].setValidity({valueMissing:t},e,this._getButtonToggleElements()[0])}else this._component[s1].setValidity({})}_getButtonToggleElements(){return Array.from(this._component.querySelectorAll(et.elementName))}};var qr=class{constructor(t){this._adapter=t;this._values=[];this._outlined=!0;this._multiple=!1;this._mandatory=!1;this._vertical=!1;this._stretch=!1;this._dense=!1;this._disabled=!1;this._readonly=!1;this._required=!1;this._theme="tertiary";this._selectListener=e=>this._onSelect(e),this._slotListener=()=>this._synchronize()}initialize(){this._adapter.setFormValue(),this._adapter.setFormValidity(),this._adapter.addListener(et.events.SELECT,this._selectListener),this._adapter.addSlotChangeListener(this._slotListener)}destroy(){this._adapter.removeListener(et.events.SELECT,this._selectListener),this._adapter.removeSlotChangeListener(this._slotListener)}_synchronize(){if(this._disabled&&this._adapter.setDisabled(this._disabled),this._readonly&&this._adapter.setReadonly(this._readonly),this._multiple){let t=new Set(this._adapter.getSelectedValues().concat(this._values));this.value=Array.from(t)}else{let t=this._adapter.getSelectedValues().concat(this._values);this.value=t.length?t[t.length-1]:null}}_onSelect(t){if(this._mandatory&&!this._adapter.getSelectedValues().length){t.preventDefault();return}let e;t.detail.selected?e=this._multiple?[...this._values,t.detail.value]:[t.detail.value]:e=this._multiple?this._values.filter(s=>s!==t.detail.value):[];let o=this._multiple?e:e.length?e[0]:null,a=new CustomEvent(q1.events.CHANGE,{detail:o,bubbles:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(a),a.defaultPrevented){t.preventDefault();return}this._values=e,this._adapter.applyValues(this._values),this._adapter.setFormValue(),this._adapter.setFormValidity()}_applyValue(t){let e=Array.isArray(t)?t:t!=null?[t]:[];this._values=e,!this._multiple&&e.length>1&&(e=[e[0]]),this._adapter.applyValues(e),this._adapter.setFormValue(),this._adapter.setFormValidity()}get value(){var e;let t=Array.from(new Set(this._adapter.getSelectedValues().concat(this._values)));return this._multiple?Array.from(t):(e=t[0])!=null?e:null}set value(t){this._applyValue(t)}get multiple(){return this._multiple}set multiple(t){t=!!t,this._multiple!==t&&(this._multiple=t,this._applyValue(this._values),this._adapter.toggleHostAttribute(q1.attributes.MULTIPLE,this._multiple))}get mandatory(){return this._mandatory}set mandatory(t){t=!!t,this._mandatory!==t&&(this._mandatory=t,this._adapter.toggleHostAttribute(q1.attributes.MANDATORY,this._mandatory))}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(q1.attributes.VERTICAL,this._vertical))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(q1.attributes.STRETCH,this._stretch))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(q1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(q1.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){t=!!t,this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(q1.attributes.READONLY,this._readonly))}get required(){return this._required}set required(t){t=!!t,this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(q1.attributes.REQUIRED,this._required))}get outlined(){return this._outlined}set outlined(t){t=!!t,this._outlined!==t&&(this._outlined=t,this._adapter.toggleHostAttribute(q1.attributes.NO_OUTLINE,!this._outlined))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(q1.attributes.THEME,this._theme!=="tertiary",this._theme))}};var pw='<template><div class="forge-button-toggle-group" part="root"><slot></slot></div></template>',mw=":host{--_button-toggle-group-display:var(--forge-button-toggle-group-display, inline-flex)}:host{display:var(--_button-toggle-group-display)}:host([hidden]){display:none}.forge-button-toggle-group{--_button-toggle-group-gap:var(--forge-button-toggle-group-gap, 4px);--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 4px);--_button-toggle-group-padding-block:var(--forge-button-toggle-group-padding-block, var(--_button-toggle-group-padding));--_button-toggle-group-padding-inline:var(--forge-button-toggle-group-padding-inline, var(--_button-toggle-group-padding));--_button-toggle-group-height:var(--forge-button-toggle-group-height, var(--forge-button-height, 36px));--_button-toggle-group-dense-height:var(--forge-button-toggle-group-dense-height, var(--forge-button-dense-height, 24px));--_button-toggle-group-outline-width:var(--forge-button-toggle-group-outline-width, var(--forge-border-thin, 1px));--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, solid);--_button-toggle-group-outline-color:var(--forge-button-toggle-group-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_button-toggle-group-outline-color-active:var(--forge-button-toggle-group-outline-color-active, var(--forge-theme-outline-medium, #757575));--_button-toggle-group-shape:var(--forge-button-toggle-group-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-toggle-group-shape-start-start:var(--forge-button-toggle-group-shape-start-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-start-end:var(--forge-button-toggle-group-shape-start-end, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-start:var(--forge-button-toggle-group-shape-end-start, var(--_button-toggle-group-shape));--_button-toggle-group-shape-end-end:var(--forge-button-toggle-group-shape-end-end, var(--_button-toggle-group-shape));--_button-toggle-group-transition-duration:var(--forge-button-toggle-group-transition-duration, var(--forge-button-toggle-transition-duration, var(--forge-animation-duration-short3, 150ms)));--_button-toggle-group-transition-timing:var(--forge-button-toggle-group-transition-timing, var(--forge-button-toggle-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1))))}.forge-button-toggle-group{display:flex;align-items:center;gap:var(--_button-toggle-group-gap);height:var(--_button-toggle-group-height);border-width:var(--_button-toggle-group-outline-width);border-style:var(--_button-toggle-group-outline-style);border-color:var(--_button-toggle-group-outline-color);border-start-start-radius:var(--_button-toggle-group-shape-start-start);border-start-end-radius:var(--_button-toggle-group-shape-start-end);border-end-start-radius:var(--_button-toggle-group-shape-end-start);border-end-end-radius:var(--_button-toggle-group-shape-end-end);padding-block:var(--_button-toggle-group-padding-block);padding-inline:var(--_button-toggle-group-padding-inline);transition-property:border-color;transition-duration:var(--_button-toggle-group-transition-duration);transition-timing-function:var(--_button-toggle-group-transition-timing)}:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:focus-within,:host(:not([disabled]):not([no-outline])) .forge-button-toggle-group:hover{--_button-toggle-group-outline-color:var(--_button-toggle-group-outline-color-active)}:host([no-outline]) .forge-button-toggle-group{--_button-toggle-group-padding:var(--forge-button-toggle-group-padding, 0);--_button-toggle-group-outline-style:var(--forge-button-toggle-group-outline-style, none)}:host(:is([dense],[density=dense])) .forge-button-toggle-group{--_button-toggle-group-height:var(--_button-toggle-group-dense-height)}:host([vertical]) .forge-button-toggle-group{height:auto;flex-direction:column}:host([vertical]) ::slotted(forge-button-toggle){height:var(--_button-toggle-group-height);width:100%}:host([vertical]) ::slotted(forge-divider:not([vertical])){margin-inline:4px;width:100%}::slotted(forge-divider[vertical]){margin-block:4px}:host([stretch]){display:block}:host([stretch]) .forge-button-toggle-group{width:100%}:host(:not([vertical])[stretch]) ::slotted(forge-button-toggle){flex:1}:host([theme=primary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-primary-container, #d1d5ed);--forge-button-toggle-selected-color:var(--forge-theme-on-primary-container, #222c62);--forge-button-toggle-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-secondary-container, #fff0c3);--forge-button-toggle-selected-color:var(--forge-theme-on-secondary-container, #8a6804);--forge-button-toggle-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=success]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-success-container, #cde0ce);--forge-button-toggle-selected-color:var(--forge-theme-on-success-container, #19441b);--forge-button-toggle-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=error]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-error-container, #ecc2c9);--forge-button-toggle-selected-color:var(--forge-theme-on-error-container, #5f0011);--forge-button-toggle-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=warning]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-warning-container, #f4d3c2);--forge-button-toggle-selected-color:var(--forge-theme-on-warning-container, #712700);--forge-button-toggle-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=info]) ::slotted(forge-button-toggle){--forge-button-toggle-selected-background:var(--forge-theme-info-container, #c7daf0);--forge-button-toggle-selected-color:var(--forge-theme-on-info-container, #0b3768);--forge-button-toggle-focus-indicator-color:var(--forge-theme-info, #1565c0)}",ot=class extends mt($e(Nv(V1(L1(M))))){static get observedAttributes(){return Object.values(q1.observedAttributes)}constructor(){super(),H(this,pw,mw),this._core=new qr(new Gr(this)),this[oe]="radio"}connectedCallback(){super.connectedCallback(),this[N]({role:"group"},{setAttribute:!this.hasAttribute("role")}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case q1.observedAttributes.VALUE:this.value=o;break;case q1.observedAttributes.NO_OUTLINE:this.outlined=!p(o);break;case q1.observedAttributes.MULTIPLE:this.multiple=p(o);break;case q1.observedAttributes.MANDATORY:this.mandatory=p(o);break;case q1.observedAttributes.VERTICAL:this.vertical=p(o);break;case q1.observedAttributes.STRETCH:this.stretch=p(o);break;case q1.observedAttributes.DENSE:this.dense=p(o);break;case q1.observedAttributes.DISABLED:this.disabled=p(o);break;case q1.observedAttributes.REQUIRED:this.required=p(o);break;case q1.observedAttributes.READONLY:this.readonly=p(o);break;case q1.observedAttributes.THEME:this.theme=o;break}}[Bt](){let t=Array.isArray(this.value)?this.value.length>0:!!this.value,e=null;if(t){let o=Array.isArray(this.value)?this.value:[this.value];o.length&&(e=new FormData,o.forEach(a=>e==null?void 0:e.append(this.name,a)))}return e}[te](){let t=new FormData,e=Array.isArray(this.value)?this.value:this.value!=null?[this.value]:[];return t.append("multiple",String(this.multiple)),e.forEach(o=>t.append("value",o)),t}formStateRestoreCallback(t,e){var o;if(e==="restore"&&t instanceof FormData){let a=t.get("multiple")==="true",s=t.getAll("value");if(a){this.multiple=a,this.value=s;return}this.value=(o=s[0])!=null?o:null}}formResetCallback(){this.value=this.getAttribute("value")}labelChangedCallback(t){this[N]({ariaLabel:t!=null?t:void 0})}};i([c()],ot.prototype,"value",2),i([c()],ot.prototype,"outlined",2),i([c()],ot.prototype,"multiple",2),i([c()],ot.prototype,"mandatory",2),i([c()],ot.prototype,"vertical",2),i([c()],ot.prototype,"stretch",2),i([c()],ot.prototype,"dense",2),i([c()],ot.prototype,"disabled",2),i([c()],ot.prototype,"required",2),i([c()],ot.prototype,"readonly",2),i([c()],ot.prototype,"theme",2),ot=i([y({name:q1.elementName,dependencies:[me]})],ot);function Uv(){f(ot)}var dw=`${b}checkbox`,Wv={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",INDETERMINATE:"indeterminate",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},gw=d({},Wv),ww={ROOT:".forge-checkbox",LABEL:"#label",STATE_LAYER:"forge-state-layer"},T1={elementName:dw,selectors:ww,observedAttributes:Wv,attributes:gw};var Yr=class extends I{constructor(t){super(t),this._rootElement=w(t,T1.selectors.ROOT),this._labelElement=w(t,T1.selectors.LABEL),this._stateLayerElement=w(t,T1.selectors.STATE_LAYER)}setChecked(t){this._component[Mt](),this._component[N]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[s2]=!t,this._component[N]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[Mt](),this._component[N]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[N]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t,e){let o=t?new FormData:null;o&&t&&o.append(this._component.name,t),this._component.setFormValue(o,e)}};var Kr=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._indeterminate=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._labelPosition="end";this._clickListener=t=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}get _formState(){return this._checked?this._indeterminate?"checked-indeterminate":"checked":this._indeterminate?"unchecked-indeterminate":"unchecked"}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.syncValue(this._submittedValue,this._formState)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let o=new Event("change",{cancelable:!0,bubbles:!0});this._adapter.dispatchHostEvent(o),this._checked=t,!o.defaultPrevented&&(this.checked=e,this._indeterminate=!1,this._adapter.toggleHostAttribute(T1.attributes.INDETERMINATE,this._indeterminate))}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(T1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(T1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get indeterminate(){return this._indeterminate}set indeterminate(t){this._indeterminate!==t&&(this._indeterminate=t,this._adapter.syncValue(this._submittedValue,this._formState),this._adapter.toggleHostAttribute(T1.attributes.INDETERMINATE,this._indeterminate))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue,this._formState),(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(T1.attributes.VALUE,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(T1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this.disabled),this._adapter.toggleHostAttribute(T1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(T1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(T1.attributes.READONLY,this._readonly))}get labelPosition(){return this._labelPosition}set labelPosition(t){this.labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(T1.attributes.LABEL_POSITION,this._labelPosition))}};var uw='<template><div class="forge-checkbox" part="root"><div id="container" class="container"><div class="background" part="background"><svg class="icon icon--checked" aria-hidden="true" viewBox="0 0 24 24" part="checkmark"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"></path></svg> <svg class="icon icon--indeterminate" aria-hidden="true" viewBox="0 0 24 24" part="mixedmark"><line x1="2" y1="12" x2="22" y2="12"></line></svg><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><div id="label" class="label" part="label"><slot></slot></div></div></template>',_w=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-checkbox{--_checkbox-primary-color:var(--forge-checkbox-primary-color, var(--forge-theme-tertiary, #3d5afe));--_checkbox-size:var(--forge-checkbox-size, 16px);--_checkbox-border-width:var(--forge-checkbox-border-width, var(--forge-border-medium, 2px));--_checkbox-icon-color:var(--forge-checkbox-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_checkbox-state-layer-size:var(--forge-checkbox-state-layer-size, 40px);--_checkbox-state-layer-dense-size:var(--forge-checkbox-state-layer-dense-size, 24px);--_checkbox-background:var(--forge-checkbox-background, var(--forge-theme-surface, #ffffff));--_checkbox-width:var(--forge-checkbox-width, var(--_checkbox-size));--_checkbox-height:var(--forge-checkbox-height, var(--_checkbox-size));--_checkbox-unchecked-border-width:var(--forge-checkbox-unchecked-border-width, var(--_checkbox-border-width));--_checkbox-unchecked-border-color:var(--forge-checkbox-unchecked-border-color, var(--forge-theme-surface-container-high, #9e9e9e));--_checkbox-shape:var(--forge-checkbox-shape, calc(var(--forge-shape-small, 2px) * var(--forge-shape-factor, 1)));--_checkbox-elevation:var(--forge-checkbox-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12));--_checkbox-checked-background:var(--forge-checkbox-checked-background, var(--_checkbox-primary-color));--_checkbox-checked-border-width:var(--forge-checkbox-checked-border-width, var(--_checkbox-border-width));--_checkbox-checked-border-color:var(--forge-checkbox-checked-border-color, var(--_checkbox-checked-background));--_checkbox-icon-checked-color:var(--forge-checkbox-icon-checked-color, var(--_checkbox-icon-color));--_checkbox-icon-indeterminate-color:var(--forge-checkbox-icon-indeterminate-color, var(--_checkbox-icon-color));--_checkbox-icon-stroke-width:var(--forge-checkbox-icon-stroke-width, 4px);--_checkbox-gap:var(--forge-checkbox-gap, 0);--_checkbox-justify:var(--forge-checkbox-justify, start);--_checkbox-align:var(--forge-checkbox-align, center);--_checkbox-direction:var(--forge-checkbox-direction, initial);--_checkbox-state-layer-width:var(--forge-checkbox-state-layer-width, var(--_checkbox-state-layer-size));--_checkbox-state-layer-height:var(--forge-checkbox-state-layer-height, var(--_checkbox-state-layer-size));--_checkbox-state-layer-checked-color:var(--forge-checkbox-state-layer-checked-color, var(--_checkbox-primary-color));--_checkbox-state-layer-unchecked-color:var(--forge-checkbox-state-layer-unchecked-color, var(--_checkbox-color));--_checkbox-state-layer-shape:var(--forge-checkbox-state-layer-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_checkbox-dense-gap:var(--forge-checkbox-dense-gap, 8px);--_checkbox-state-layer-dense-width:var(--forge-checkbox-state-layer-dense-width, var(--_checkbox-state-layer-dense-size));--_checkbox-state-layer-dense-height:var(--forge-checkbox-state-layer-dense-height, var(--_checkbox-state-layer-dense-size));--_checkbox-disabled-opacity:var(--forge-checkbox-disabled-opacity, 0.38);--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, var(--forge-animation-duration-short2, 100ms));--_checkbox-background-animation-timing:var(--forge-checkbox-background-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_checkbox-icon-animation-timing:var(--forge-checkbox-icon-animation-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-checkbox{position:relative;flex-direction:var(--_checkbox-direction);align-items:var(--_checkbox-align);justify-content:var(--_checkbox-justify);gap:var(--_checkbox-gap);display:flex}.forge-checkbox .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_checkbox-state-layer-shape);inline-size:var(--_checkbox-state-layer-width);block-size:var(--_checkbox-state-layer-height);cursor:pointer}.forge-checkbox .background{position:relative;align-items:center;justify-content:center;display:flex;transition-property:background,border-width,border-color;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-background-animation-timing);box-shadow:var(--_checkbox-elevation);border-style:solid;border-width:var(--_checkbox-unchecked-border-width);border-color:var(--_checkbox-unchecked-border-color);border-radius:var(--_checkbox-shape);box-sizing:border-box;block-size:var(--_checkbox-height);inline-size:var(--_checkbox-width);background:var(--_checkbox-background)}.forge-checkbox .icon{position:absolute;transition-property:stroke-dashoffset;transition-duration:var(--_checkbox-animation-duration);transition-timing-function:var(--_checkbox-icon-animation-timing);fill:none;stroke-width:var(--_checkbox-icon-stroke-width)}.forge-checkbox .icon--checked{stroke:var(--_checkbox-icon-checked-color);stroke-dasharray:30;transition-delay:0s;stroke-dashoffset:30}.forge-checkbox .icon--indeterminate{stroke:var(--_checkbox-icon-indeterminate-color);stroke-dasharray:20;transition-delay:0s;stroke-dashoffset:20}.forge-checkbox .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}:host([checked]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([checked]) .icon--checked{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([checked]) .icon--checked:dir(rtl){stroke-dashoffset:60}:host([checked]) .icon--indeterminate{transition-delay:0s;stroke-dashoffset:20}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([indeterminate]) .background{border-style:solid;border-width:var(--_checkbox-checked-border-width);border-color:var(--_checkbox-checked-border-color);background:var(--_checkbox-checked-background)}:host([indeterminate]) .icon--checked{transition-delay:0s;stroke-dashoffset:30}:host([indeterminate]) .icon--indeterminate{transition-delay:var(--_checkbox-animation-duration);stroke-dashoffset:0}:host([indeterminate]) .icon--indeterminate:dir(rtl){stroke-dashoffset:40}:host([indeterminate]) forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-checked-color)}:host([dense]) .forge-checkbox{--_checkbox-gap:var(--_checkbox-dense-gap)}:host([dense]) .forge-checkbox .container{inline-size:var(--_checkbox-state-layer-dense-width);block-size:var(--_checkbox-state-layer-dense-height)}:host([disabled]) .forge-checkbox .container{opacity:var(--_checkbox-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-checkbox .container{cursor:not-allowed}@media (prefers-reduced-motion){.forge-checkbox{--_checkbox-animation-duration:var(--forge-checkbox-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_checkbox-state-layer-unchecked-color)}forge-focus-indicator{--forge-focus-indicator-shape:0px;--forge-focus-indicator-outward-offset:8px}',at=class extends $e(mt(Ke(V1(L1(M))))){static get observedAttributes(){return Object.values(T1.observedAttributes)}constructor(){super(),H(this,uw,_w),this[oe]="checkbox",this._core=new Kr(new Yr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"checkbox",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case T1.observedAttributes.CHECKED:this.checked=p(o);break;case T1.observedAttributes.DEFAULT_CHECKED:this.defaultChecked=p(o);break;case T1.observedAttributes.INDETERMINATE:this.indeterminate=p(o);break;case T1.observedAttributes.VALUE:this.value=o;break;case T1.observedAttributes.DENSE:this.dense=p(o);break;case T1.observedAttributes.DISABLED:this.disabled=p(o);break;case T1.observedAttributes.REQUIRED:this.required=p(o);break;case T1.observedAttributes.READONLY:this.readonly=p(o);break;case T1.observedAttributes.LABEL_POSITION:this.labelPosition=o;break}super.attributeChangedCallback(t,e,o)}[Bt](){return this.checked?this.value:null}[te](){return this.checked?this.indeterminate?"checked-indeterminate":"checked":this.indeterminate?"unchecked-indeterminate":"unchecked"}[Mt](){this[s1].setValidity({valueMissing:this.required&&!this.checked},this[ee]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t==="checked"||t==="checked-indeterminate",this.indeterminate=t==="unchecked-indeterminate"||t==="checked-indeterminate"}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[N]({ariaLabel:t})}setFormValue(t,e){if(this[s1].setFormValue(t,e),e){let o=Ut(e)?e:e[this.name];this.checked=o==="checked"||o==="checked-indeterminate",this.indeterminate=o==="unchecked-indeterminate"||o==="checked-indeterminate";return}Ut(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){O(t)?this._core.checked=t:this._core.checked=!this._core.checked}};i([c()],at.prototype,"checked",2),i([c()],at.prototype,"defaultChecked",2),i([c()],at.prototype,"indeterminate",2),i([c()],at.prototype,"value",2),i([c()],at.prototype,"dense",2),i([c()],at.prototype,"disabled",2),i([c()],at.prototype,"required",2),i([c()],at.prototype,"readonly",2),i([c()],at.prototype,"labelPosition",2),at=i([y({name:T1.elementName,dependencies:[J,r1]})],at);var Gv=class extends o2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get indeterminate(){return this._element.indeterminate}set indeterminate(t){this._element.indeterminate=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener("change",e=>t(e.target.checked))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(T1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function qv(){f(at)}var Ot=class Ot{static getRadioGroup(t,{rootNode:e,form:o}={}){var s;if(!t.name)return[t];if(!t.form&&!o){let l=(e!=null?e:t.getRootNode()).querySelectorAll(`${b1.elementName}[name=${t.name}]`);return Array.from(l).filter(h=>!h.form)}let a=((s=t.form)!=null?s:o).elements.namedItem(t.name);return a&&Object.prototype.isPrototypeOf.call(RadioNodeList.prototype,a)?Array.from(a).filter(r=>r.matches(b1.elementName)):[t]}static setRadioGroupValidity(t){let e=Ot.getRadioGroup(t),o=Ot._selectionIsRequired(e);e.forEach(a=>{if(!a.shadowRoot)return;let s=a[ee]({required:o,checked:a.checked});a[s1].setValidity({valueMissing:o},s)})}static setRadioGroupRequired(t){let e=Ot.getRadioGroupElement(t);if(!e)return;let o=Ot.getRadioGroup(t),a=Array.from(o).some(s=>s.required);(e==null?void 0:e.tagName)==="forge-radio-group"?e[N]({ariaRequired:a?"true":"false"}):e.setAttribute("aria-required",a?"true":"false")}static getRadioGroupElement(t){return t.closest(":is(fieldset, [role=radiogroup], forge-radio-group)")}static setSelectedRadioInGroup(t){Ot.getRadioGroup(t).forEach(o=>o.checked=o===t)}static syncRadioFocusableState(t,{ignoreSelf:e,rootNode:o,form:a}={ignoreSelf:!1}){let s=Ot.getRadioGroup(t,{rootNode:o,form:a});if(s=s.filter(r=>e&&r!==t||r.shadowRoot),!s.some(r=>r.checked)){s.forEach(r=>r[s2]=!r.disabled);return}s.forEach(r=>r[s2]=r.checked&&!r.disabled)}static focusNextRadioInGroup(t){Ot._updateRadioGroupFocus(t,1)}static focusPreviousRadioInGroup(t){Ot._updateRadioGroupFocus(t,-1)}static setUncheckedRadioGroupFocus(t,e){let o=Ot.getRadioGroup(t);if(e==="focus"){o.forEach(a=>a[s2]=a===t);return}(!t.checked||o[0]===t||o[o.length-1]===t)&&o.forEach(a=>a[s2]=!0)}static async requestRadioGroupReset(t){if(this._radiosRequestingReset.add(t),await ae(),!this._radiosRequestingReset.has(t))return;let e=Ot.getRadioGroup(t),o=null;e.forEach(a=>{this._radiosRequestingReset.delete(a),a.defaultChecked&&(o=a)}),e.forEach(a=>{a.checked=a===o,a[s2]=!o||a.checked})}static _updateRadioGroupFocus(t,e){let o=Ot.getRadioGroup(t),a=o.indexOf(t),s=o[a];do if(a+=e,a<0?a=o.length-1:a>=o.length&&(a=0),s=o[a],s===t)return;while(s.disabled||s.readonly);s[$r]()&&(s[s2]=!0,s.focus(),o.forEach(r=>{r!==s&&(r[s2]=!1,r.checked=!1)}))}static _selectionIsRequired(t){let e=!1,o=!1;return t.forEach(a=>{a.required&&(e=!0),a.checked&&(o=!0)}),e&&!o}};Ot._radiosRequestingReset=new WeakSet;var ut=Ot;var xw=`${b}radio`,Yv={CHECKED:"checked",DEFAULT_CHECKED:"default-checked",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},fw=d({},Yv),bw={ROOT:".forge-radio",LABEL:"#label",STATE_LAYER:"forge-state-layer"},yw={CHANGE:"change",INPUT:"input"},b1={elementName:xw,observedAttributes:Yv,attributes:fw,selectors:bw,events:yw},$r=Symbol("tryCheck");var Xr=class extends I{constructor(t){super(t),this._rootElement=w(t,b1.selectors.ROOT),this._labelElement=w(t,b1.selectors.LABEL),this._stateLayerElement=w(t,b1.selectors.STATE_LAYER)}setChecked(t,e){this._component[N]({ariaChecked:t?"true":"false"}),t&&ut.setSelectedRadioInGroup(this._component),ut.syncRadioFocusableState(this._component);let o=t?e:null,a=t?"checked":"unchecked";this._component[s1].setFormValue(o,a),ut.setRadioGroupValidity(this._component)}trySetDisabled(t){let e=this._component.closest("forge-radio-group");return!t&&e&&e.disabled?!1:(this._component[N]({ariaDisabled:`${!!t}`}),ut.syncRadioFocusableState(this._component),!0)}setRequired(){ut.setRadioGroupValidity(this._component),ut.setRadioGroupRequired(this._component)}setReadonly(t){this._component[N]({ariaDisabled:`${!!t}`})}disableStateLayer(t){this._stateLayerElement.disabled=t}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}setUncheckedRadioGroupFocus(t){ut.setUncheckedRadioGroupFocus(this._component,t)}focusNext(){ut.focusNextRadioInGroup(this._component)}focusPrevious(){ut.focusPreviousRadioInGroup(this._component)}};var Zr=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._disabled=!1;this._required=!1;this._readonly=!1;this._dense=!1;this._labelPosition="end";this._focusListener=()=>this._handleFocus(),this._blurListener=()=>this._handleBlur(),this._clickListener=e=>this._handleClick(e),this._keydownListener=e=>this._handleKeydown(e),this._keyupListener=e=>this._handleKeyup(e)}initialize(){this._adapter.addHostListener("focus",this._focusListener),this._adapter.addHostListener("blur",this._blurListener),this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setChecked(this._checked,this._value)}tryCheck(){return this._checked=!0,this._dispatchEvents()?(this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(b1.attributes.CHECKED,this._checked),!0):(this._checked=!1,!1)}_handleFocus(){this._checked||this._adapter.setUncheckedRadioGroupFocus("focus")}_handleBlur(){this._checked||this._adapter.setUncheckedRadioGroupFocus("blur")}_handleClick(t){this._activate(t)}_handleKeydown(t){switch(t.key){case"ArrowRight":case"ArrowDown":t.preventDefault(),this._adapter.focusNext();break;case"ArrowLeft":case"ArrowUp":t.preventDefault(),this._adapter.focusPrevious();break;case" ":t.preventDefault();break}}_handleKeyup(t){t.key===" "&&this._activate(t)}async _activate(t){if(!(this._checked||this._disabled||this._readonly)&&(await ae(),!t.defaultPrevented)){if(this._checked=!0,!this._dispatchEvents()){this._checked=!1;return}this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(b1.attributes.CHECKED,this._checked)}}_dispatchEvents(){let t=new Event(b1.events.CHANGE,{bubbles:!0,cancelable:!0}),e=new Event(b1.events.INPUT,{bubbles:!0,cancelable:!0,composed:!0});return this._adapter.dispatchHostEvent(t),this._adapter.dispatchHostEvent(e),!(t.defaultPrevented||e.defaultPrevented)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked,this._value),this._adapter.toggleHostAttribute(b1.attributes.CHECKED,this._checked))}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(b1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,(typeof this._value=="string"||this._value==null)&&this._adapter.setHostAttribute(b1.attributes.VALUE,this._value))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.trySetDisabled(this._disabled)?(this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(b1.attributes.DISABLED,this._disabled)):this._disabled=!this._disabled)}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(b1.attributes.REQUIRED,this._required),this._adapter.setRequired(this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.disableStateLayer(this._disabled||this._readonly),this._adapter.toggleHostAttribute(b1.attributes.READONLY,this._readonly))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(b1.attributes.DENSE,this._dense))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(b1.attributes.LABEL_POSITION,this._labelPosition))}};var Mw='<template><div id="radio" class="forge-radio" part="root"><div id="container" class="container" aria-hidden="true"><div id="background" class="background" part="background"></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></div><span id="label" class="label" for="input" part="label"><slot></slot></span></div></template>',zw=':host{display:inline-block;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host(:focus){outline:0}.forge-radio{--_radio-primary-color:var(--forge-radio-primary-color, var(--forge-theme-tertiary, #3d5afe));--_radio-inactive-color:var(--forge-radio-inactive-color, var(--forge-theme-surface-container-high, #9e9e9e));--_radio-size:var(--forge-radio-size, 20px);--_radio-mark-size:var(--forge-radio-mark-size, 75%);--_radio-state-layer-size:var(--forge-radio-state-layer-size, 40px);--_radio-state-layer-dense-size:var(--forge-radio-state-layer-dense-size, 24px);--_radio-width:var(--forge-radio-width, var(--_radio-size));--_radio-height:var(--forge-radio-height, var(--_radio-size));--_radio-border-width:var(--forge-radio-border-width, var(--forge-border-medium, 2px));--_radio-unchecked-border-color:var(--forge-radio-unchecked-border-color, var(--_radio-inactive-color));--_radio-checked-border-color:var(--forge-radio-checked-border-color, var(--_radio-primary-color));--_radio-background:var(--forge-radio-background, transparent);--_radio-shape:var(--forge-radio-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_radio-mark-width:var(--forge-radio-mark-width, var(--_radio-mark-size));--_radio-mark-height:var(--forge-radio-mark-height, var(--_radio-mark-size));--_radio-mark-color:var(--forge-radio-mark-color, var(--_radio-primary-color));--_radio-gap:var(--forge-radio-gap, 0);--_radio-justify:var(--forge-radio-justify, start);--_radio-align:var(--forge-radio-align, center);--_radio-direction:var(--forge-radio-direction, initial);--_radio-state-layer-width:var(--forge-radio-state-layer-width, var(--_radio-state-layer-size));--_radio-state-layer-height:var(--forge-radio-state-layer-height, var(--_radio-state-layer-size));--_radio-state-layer-unchecked-color:var(--forge-radio-state-layer-unchecked-color, var(--_radio-color));--_radio-state-layer-checked-color:var(--forge-radio-state-layer-checked-color, var(--_radio-primary-color));--_radio-state-layer-shape:var(--forge-radio-state-layer-shape, var(--_radio-shape));--_radio-state-layer-dense-width:var(--forge-radio-state-layer-dense-width, var(--_radio-state-layer-dense-size));--_radio-state-layer-dense-height:var(--forge-radio-state-layer-dense-height, var(--_radio-state-layer-dense-size));--_radio-disabled-opacity:var(--forge-radio-disabled-opacity, 0.38);--_radio-animation-duration:var(--forge-radio-animation-duration, var(--forge-animation-duration-short4, 200ms));--_radio-animation-timing-function:var(--forge-radio-animation-timing-function, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_radio-animation-delay:var(--forge-radio-animation-delay, 0ms)}.forge-radio{position:relative;flex-direction:var(--_radio-direction);align-items:var(--_radio-align);justify-content:var(--_radio-justify);gap:var(--_radio-gap);display:flex}.forge-radio .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_radio-shape);inline-size:var(--_radio-state-layer-width);block-size:var(--_radio-state-layer-height);cursor:pointer}.forge-radio .background{position:relative;display:inline block;overflow:hidden;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:border-color;box-sizing:border-box;border-radius:var(--_radio-shape);border-width:var(--_radio-border-width);border-style:solid;border-color:var(--_radio-unchecked-border-color);inline-size:var(--_radio-width);block-size:var(--_radio-height);background:var(--_radio-background)}.forge-radio .background::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:top left;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:opacity,scale;border-radius:var(--_radio-shape);inline-size:var(--_radio-mark-width);block-size:var(--_radio-mark-height);background:var(--_radio-mark-color);scale:0.5;opacity:0}.forge-radio .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}.forge-radio .label:empty{display:none}:host([checked]) .forge-radio .background{border-color:var(--_radio-checked-border-color)}:host([checked]) .forge-radio .background::after{scale:1;opacity:1}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-checked-color)}:host([dense]) .forge-radio .container{inline-size:var(--_radio-state-layer-dense-width);block-size:var(--_radio-state-layer-dense-height)}:host([disabled]) .forge-radio .container{opacity:var(--_radio-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-radio .container{cursor:not-allowed}forge-focus-indicator{--forge-focus-indicator-color:var(--_radio-primary-color);--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-shape:var(--_radio-state-layer-shape)}forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-unchecked-color)}',_t=class extends $e(mt(Ke(V1(L1(M))))){static get observedAttributes(){return Object.values(b1.observedAttributes)}constructor(){super(),H(this,Mw,zw),this[oe]="radio",this._core=new Zr(new Xr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"radio",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false"}),ut.syncRadioFocusableState(this),this._core.initialize(),this._rootNode=this.getRootNode()}disconnectedCallback(){ut.syncRadioFocusableState(this,{ignoreSelf:!0,rootNode:this._rootNode,form:this._latestAssociatedForm})}attributeChangedCallback(t,e,o){switch(t){case b1.attributes.CHECKED:this._core.checked=p(o);break;case b1.attributes.DEFAULT_CHECKED:this._core.defaultChecked=p(o);break;case b1.attributes.VALUE:this.value=o;break;case b1.attributes.DENSE:this.dense=p(o);break;case b1.attributes.DISABLED:this.disabled=p(o);break;case b1.attributes.REQUIRED:this.required=p(o);break;case b1.attributes.READONLY:this.readonly=p(o);break;case b1.attributes.LABEL_POSITION:this.labelPosition=o;break}super.attributeChangedCallback(t,e,o)}[Bt](){return this.checked?this.value:null}[te](){return this.checked?"checked":"unchecked"}formAssociatedCallback(t){t&&(this._latestAssociatedForm=t)}formResetCallback(){ut.requestRadioGroupReset(this)}formStateRestoreCallback(t){this.checked=t==="checked"}labelClickedCallback(){this.click()}labelChangedCallback(t){this[N]({ariaLabel:t})}[$r](){return this._core.tryCheck()}};i([c()],_t.prototype,"checked",2),i([c()],_t.prototype,"defaultChecked",2),i([c()],_t.prototype,"value",2),i([c()],_t.prototype,"dense",2),i([c()],_t.prototype,"disabled",2),i([c()],_t.prototype,"required",2),i([c()],_t.prototype,"readonly",2),i([c()],_t.prototype,"labelPosition",2),_t=i([y({name:b1.elementName,dependencies:[J,r1]})],_t);function Kv(){f(_t)}var jr=class extends I{constructor(t){super(t)}attachLabel(t){t.nonInteractive=!0,t.forElement=this._component}setDisabled(t){this._component[N]({ariaDisabled:t?"true":null}),this._disableRadios(t)}trySetRequired(){let t=Array.from(this._component.querySelectorAll(b1.elementName)).some(e=>e.required);this._component[N]({ariaRequired:t?"true":null})}_disableRadios(t){this._component.querySelectorAll(b1.elementName).forEach(e=>{e.disabled=t})}};var Hw=`${b}radio-group`,$v={DISABLED:"disabled"},Iw=d({},$v),fa={elementName:Hw,observedAttributes:$v,attributes:Iw};var Qr=class{constructor(t){this._adapter=t;this._disabled=!1;this._labelConnectedListener=e=>this._handleLabelConnected(e)}initialize(){this._adapter.addHostListener(a2.events.CONNECTED,this._labelConnectedListener),this._adapter.trySetRequired()}_handleLabelConnected(t){t.stopPropagation(),this._adapter.attachLabel(t.target)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(fa.attributes.DISABLED,t))}};var Lw="<template><slot></slot></template>",oo=class extends mt(V1(L1(M))){get form(){return this[s1].form}get labels(){return this[s1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){G(this,!!t,"name",t)}static get observedAttributes(){return Object.values(fa.observedAttributes)}constructor(){super(),H(this,Lw),this._core=new Qr(new jr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"radiogroup",ariaDisabled:this.disabled?"true":null}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case fa.attributes.DISABLED:this.disabled=p(o);break}}formDisabledCallback(t){this.disabled=t}labelChangedCallback(t){this[N]({ariaLabel:t!=null?t:null})}};oo.formAssociated=!0,i([c()],oo.prototype,"disabled",2),oo=i([y({name:fa.elementName,dependencies:[_t]})],oo);function Xv(){f(oo)}var Zv=`${b}switch`,jv={CHECKED:"checked",ON:"on",SELECTED:"selected",DEFAULT_CHECKED:"default-checked",DEFAULT_ON:"default-on",VALUE:"value",DENSE:"dense",DISABLED:"disabled",REQUIRED:"required",READONLY:"readonly",ICON:"icon",LABEL_POSITION:"label-position",TABINDEX:"tabindex"},Vw=d({},jv),Cw={HIDDEN:"hidden"},Ew={ROOT:".forge-switch",LABEL:"#label",ICON_ON:"#icon-on",ICON_OFF:"#icon-off",STATE_LAYER:"forge-state-layer"},Bw={CHANGE:`${Zv}-change`},Aw={ON:"on",OFF:"off"},l1={attributes:Vw,observedAttributes:jv,classes:Cw,selectors:Ew,elementName:Zv,events:Bw,state:Aw};var Jr=class extends I{constructor(t){super(t),this._rootElement=w(t,l1.selectors.ROOT),this._labelElement=w(t,l1.selectors.LABEL),this._iconCheckedElement=w(t,l1.selectors.ICON_ON),this._iconUncheckedElement=w(t,l1.selectors.ICON_OFF),this._stateLayerElement=w(t,l1.selectors.STATE_LAYER)}setChecked(t){this._component[Mt](),this._component[N]({ariaChecked:t?"true":"false"})}setDisabled(t){this._component[s2]=!t,this._component[N]({ariaDisabled:t?"true":"false"}),this._stateLayerElement.disabled=t}setRequired(t){this._component[Mt](),this._component[N]({ariaRequired:t?"true":"false"})}setReadonly(t){this._component[N]({ariaReadOnly:t?"true":"false"}),this._stateLayerElement.disabled=t}setIconVisibility(t){let e=t==="none"||t==="off",o=t==="none"||t==="on";f2(this._iconCheckedElement,e,l1.classes.HIDDEN),f2(this._iconUncheckedElement,o,l1.classes.HIDDEN)}setLabelPosition(t){this._labelElement.remove(),t==="start"?this._rootElement.prepend(this._labelElement):this._rootElement.append(this._labelElement)}syncValue(t){let e=t?new FormData:null,o=t?l1.state.ON:l1.state.OFF;e&&t&&e.append(this._component.name,t),this._component.setFormValue(e,o)}};var ti=class{constructor(t){this._adapter=t;this._checked=!1;this._defaultChecked=!1;this._value="on";this._dense=!1;this._disabled=!1;this._required=!1;this._readonly=!1;this._icon="both";this._labelPosition="end";this._clickListener=()=>this._handleChange();this._keydownListener=t=>this._handleKeydown(t);this._keyupListener=t=>this._handleKeyup(t)}get _submittedValue(){return this._checked?this._value:null}initialize(){this._adapter.addHostListener("click",this._clickListener,{capture:!0}),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.addHostListener("keyup",this._keyupListener,{capture:!0}),this._adapter.setIconVisibility(this._icon),this._adapter.syncValue(this._submittedValue)}_handleKeydown(t){t.key===" "&&t.preventDefault()}_handleKeyup(t){t.key===" "&&this._handleChange()}_handleChange(){if(this._readonly)return;let t=this._checked,e=!this._checked;this._checked=e;let o=new Event("change",{cancelable:!0,bubbles:!0}),a=new CustomEvent(l1.events.CHANGE,{detail:e,bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(o),this._adapter.dispatchHostEvent(a),this._checked=t,!(o.defaultPrevented||a.defaultPrevented)&&(this.checked=e)}_setCheckedAttribute(){this._adapter.toggleHostAttribute(l1.attributes.CHECKED,this._checked),this._adapter.toggleHostAttribute(l1.attributes.ON,this._checked),this._adapter.toggleHostAttribute(l1.attributes.SELECTED,this._checked)}get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,this._adapter.setChecked(this._checked),this._adapter.syncValue(this._submittedValue),this._setCheckedAttribute())}get defaultChecked(){return this._defaultChecked}set defaultChecked(t){this._defaultChecked!==t&&(this._defaultChecked=t,this._adapter.toggleHostAttribute(l1.attributes.DEFAULT_CHECKED,this._defaultChecked))}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.syncValue(this._submittedValue),(typeof this._value=="string"||this._value==null)&&this._adapter.toggleHostAttribute(l1.attributes.VALUE,!0,this._value))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(l1.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(l1.attributes.DISABLED,this._disabled))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setRequired(this._required),this._adapter.toggleHostAttribute(l1.attributes.REQUIRED,this._required))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(this._readonly),this._adapter.toggleHostAttribute(l1.attributes.READONLY,this._readonly))}get icon(){return this._icon}set icon(t){this._icon!==t&&(this._icon=t,this._adapter.setIconVisibility(this._icon),this._adapter.setHostAttribute(l1.attributes.ICON,this._icon))}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setLabelPosition(this._labelPosition),this._adapter.setHostAttribute(l1.attributes.LABEL_POSITION,this._labelPosition))}};var Tw='<template><div class="forge-switch" part="switch"><div id="container" class="container"><div class="track" part="track"></div><div class="handle" part="handle"><div id="icon-off" class="icon icon__off" part="icon-off"><slot name="icon-off"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M20 13H4v-2h16v2z"/></svg></slot></div><div id="icon-on" class="icon icon__on" part="icon-on"><slot name="icon-on"><svg aria-hidden="true" viewBox="0 0 24 24"><path d="M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"/></svg></slot></div><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator></div><label id="label" class="label" part="label"><slot></slot></label></div></template>',Sw=':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-state-layer-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, start);--_switch-align:var(--forge-switch-align, center);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-switch-state-layer-off-color, var(--_switch-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.54);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-off-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{display:flex;position:relative;flex-direction:var(--_switch-direction);align-items:var(--_switch-align);justify-content:var(--_switch-justify);gap:var(--_switch-gap);--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;align-items:center;display:flex;flex-shrink:0;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{transition-property:background-color,border-color,border-width;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;justify-content:center;align-items:center;display:flex;transition-property:translate;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:"";position:relative;display:block;scale:var(--_switch-handle-off-scale);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;align-items:center;justify-content:center;display:flex;transition-property:opacity,scale;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([checked]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([checked]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([checked]) .handle::before{scale:var(--_switch-handle-on-scale);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([checked]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([checked]) .handle .icon__off{opacity:0;scale:0.4}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[checked]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch .container{opacity:var(--_switch-disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}',$2=class extends $e(mt(Ke(V1(L1(M))))){static get observedAttributes(){return Object.values(l1.observedAttributes)}constructor(){super(),H(this,Tw,Sw),this[oe]="checkbox",this._core=new ti(new Jr(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"switch",ariaChecked:this.checked?"true":"false",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case l1.observedAttributes.CHECKED:case l1.observedAttributes.ON:case l1.observedAttributes.SELECTED:this.checked=p(o);break;case l1.observedAttributes.DEFAULT_CHECKED:case l1.observedAttributes.DEFAULT_ON:this.defaultChecked=p(o);break;case l1.observedAttributes.VALUE:this.value=o;break;case l1.observedAttributes.DENSE:this.dense=p(o);break;case l1.observedAttributes.DISABLED:this.disabled=p(o);break;case l1.observedAttributes.REQUIRED:this.required=p(o);break;case l1.observedAttributes.READONLY:this.readonly=p(o);break;case l1.observedAttributes.ICON:this.icon=o;break;case l1.observedAttributes.LABEL_POSITION:this.labelPosition=o;break}super.attributeChangedCallback(t,e,o)}[Bt](){return this.checked?this.value:null}[te](){return this.checked?l1.state.ON:l1.state.OFF}[Mt](){this[s1].setValidity({valueMissing:this.required&&!this.checked},this[ee]({checked:this.checked,required:this.required}))}formResetCallback(){this.checked=this.defaultChecked}formStateRestoreCallback(t){this.checked=t===l1.state.ON}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[N]({ariaLabel:t})}setFormValue(t,e){if(this[s1].setFormValue(t,e),e){let o=Ut(e)?e:e[this.name];this.checked=o===l1.state.ON;return}Ut(t)?this.checked=!!t:t!=null&&t[this.name]?this.checked=!!t[this.name]:this.checked=!1}toggle(t){O(t)?this._core.checked=t:this._core.checked=!this._core.checked}};i([c()],$2.prototype,"checked",2),i([c({name:"checked"})],$2.prototype,"on",2),i([c({name:"checked"})],$2.prototype,"selected",2),i([c()],$2.prototype,"defaultChecked",2),i([c({name:"defaultChecked"})],$2.prototype,"defaultOn",2),i([c()],$2.prototype,"value",2),i([c()],$2.prototype,"dense",2),i([c()],$2.prototype,"disabled",2),i([c()],$2.prototype,"required",2),i([c()],$2.prototype,"readonly",2),i([c()],$2.prototype,"icon",2),i([c()],$2.prototype,"labelPosition",2),$2=i([y({name:l1.elementName,dependencies:[J,r1]})],$2);var Qv=class extends o2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get checked(){return this._element.checked}set checked(t){this._element.checked=t}get on(){return this._element.on}set on(t){this._element.on=t}get selected(){return this._element.selected}set selected(t){this._element.selected=t}get defaultChecked(){return this._element.defaultChecked}set defaultChecked(t){this._element.defaultChecked=t}get defaultOn(){return this._element.defaultOn}set defaultOn(t){this._element.defaultOn=t}get icon(){return this._element.icon}set icon(t){this._element.icon=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get dense(){return this._element.dense}set dense(t){this._element.dense=t}get required(){return this._element.required}set required(t){this._element.required=t}get readonly(){return this._element.readonly}set readonly(t){this._element.readonly=t}get name(){return this._element.name}set name(t){this._element.name=t}get labelPosition(){return this._element.labelPosition}set labelPosition(t){this._element.labelPosition=t}onChange(t){this._element.addEventListener(l1.events.CHANGE,({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setLabel(t){this._element.innerText=t!=null?t:""}toggle(t){this._element.toggle(t)}_build(){return document.createElement(l1.elementName)}_configure(){var t,e;(t=this._config.options)!=null&&t.id&&(this._element.id=this._config.options.id),(e=this._config.options)!=null&&e.label&&(this._element.innerText=this._config.options.label)}};function Jv(){f($2)}var t6=`${b}label`,e6={FOR:"for",DYNAMIC:"dynamic",NON_INTERACTIVE:"non-interactive",LEGEND:"legend"},kw=d({},e6),Ow={SLOT:"slot"},Dw={CONNECTED:`${t6}-connected`},Pw=[A2.elementName,q1.elementName,T1.elementName,t1.elementName,b1.elementName,"forge-select",l1.elementName],a2={elementName:t6,observedAttributes:e6,attributes:kw,selectors:Ow,events:Dw,labelableChildSelectors:Pw};var ei=class extends I{constructor(e){super(e);this._targetElement=null;this._slotElement=w(e,a2.selectors.SLOT)}destroy(){var e;(e=this._targetElement)==null||e.labelChangedCallback(null),this._targetElement=null}hasTargetElement(){return!!this._targetElement}getTargetElement(){return this._targetElement}setTargetElement(e){if(e&&this._checkLabelAwareness(e)){this._targetElement=e;return}this._targetElement=null}trySetTarget(e){this._targetElement=this._locateTargetElement(e)}clickTarget(){var e,o;(o=(e=this._targetElement)==null?void 0:e.labelClickedCallback)==null||o.call(e)}updateTargetLabel(){var a,s;if(!this._targetElement)return;let e=(a=this._component.textContent)!=null?a:"";if(this._component.contains(this._targetElement)){let r=(s=this._targetElement.textContent)!=null?s:"";e=e.replace(r,"")}let o=e.trim();this._targetElement.labelChangedCallback(o)}addSlotChangeListener(e){this._slotElement.addEventListener("slotchange",e)}removeSlotChangeListener(e){this._slotElement.removeEventListener("slotchange",e)}addMutationObserver(e){this._mutationObserver=new MutationObserver(e),this._mutationObserver.observe(this._component,{subtree:!0,characterData:!0,childList:!0}),e([],this._mutationObserver)}removeMutationObserver(){var e;(e=this._mutationObserver)==null||e.disconnect(),this._mutationObserver=void 0}_checkLabelAwareness(e){return kv(e)?!0:(console.warn("Label target element is not label aware.",e),!1)}_locateTargetElement(e){let o;if(e)o=this._component.getRootNode().querySelector(`#${e}`);else{let a=a2.labelableChildSelectors.join(",");o=this._component.querySelector(a)}return o&&!o.shadowRoot?(o.setAttribute(ja,""),o[Zo]=this._component,null):o&&!this._checkLabelAwareness(o)?null:o}};var oi=class{constructor(t){this._adapter=t;this._dynamic=!1;this._nonInteractive=!1;this._legend=!1;this._isConnected=!1;this._clickListener=e=>this._handleClick(e),this._slotChangeListener=()=>this._handleSlotChange(),this._mutationCallback=()=>this._handleMutation()}initialize(){this._legend?this._initializeAsLegend():this._initializeAsLabel()}destroy(){this._disconnect(),this._adapter.destroy()}update(){this._adapter.updateTargetLabel()}updateTarget(t){return this._adapter.setTargetElement(t),this._adapter.hasTargetElement()?(this._connect(),!0):!1}async _initializeAsLegend(){await ae(),this._adapter.dispatchHostEvent(new CustomEvent(a2.events.CONNECTED,{bubbles:!0}))}async _initializeAsLabel(){var t;this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((t=this._for)!=null?t:null),this._adapter.hasTargetElement()&&this._connect()}_handleClick(t){var o;let e=(o=this._clickTarget)!=null?o:this._adapter.getTargetElement();t.target===e||e!=null&&e.contains(t.target)||this._adapter.clickTarget()}_handleSlotChange(){!this._for&&!this._forElement&&(this._adapter.trySetTarget(null),this._tryConnect())}_handleMutation(){this._adapter.updateTargetLabel()}_connect(){this._nonInteractive||this._adapter.addHostListener("click",this._clickListener),this._adapter.updateTargetLabel(),this._dynamic&&this._adapter.addMutationObserver(this._mutationCallback),this._isConnected=!0}_disconnect(){this._adapter.removeHostListener("click",this._clickListener),this._adapter.removeMutationObserver(),this._isConnected=!1}_tryConnect(){this._adapter.hasTargetElement()?this._isConnected||this._connect():this._disconnect()}get for(){return this._for}set for(t){var e,o;this._for!==t&&(this._for=t,this._adapter.toggleHostAttribute(a2.attributes.FOR,!!this.for,(e=this.for)!=null?e:void 0),this._adapter.trySetTarget((o=this._for)!=null?o:null),this._tryConnect())}get forElement(){return this._forElement}set forElement(t){var e;this._forElement!==t&&(this._forElement=t,this._adapter.setTargetElement((e=this._forElement)!=null?e:null),this._tryConnect())}get clickTarget(){return this._clickTarget}set clickTarget(t){this._clickTarget!==t&&(this._clickTarget=t)}get dynamic(){return this._dynamic}set dynamic(t){this._dynamic!==t&&(this._dynamic=t,this._adapter.toggleHostAttribute(a2.attributes.DYNAMIC,this._dynamic),this._dynamic?this._adapter.hasTargetElement()&&this._adapter.addMutationObserver(this._mutationCallback):this._adapter.removeMutationObserver())}get nonInteractive(){return this._nonInteractive}set nonInteractive(t){if(this._nonInteractive!==t){if(this._nonInteractive=t,this._adapter.toggleHostAttribute(a2.attributes.NON_INTERACTIVE,this._nonInteractive),!this._isConnected)return;this._nonInteractive?this._adapter.removeHostListener("click",this._clickListener):this._adapter.addHostListener("click",this._clickListener)}}get legend(){return this._legend}set legend(t){var e;if(this._legend!==t){if(this._legend=t,this._adapter.toggleHostAttribute(a2.attributes.LEGEND,this._legend),this._legend){this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.dispatchHostEvent(new CustomEvent(a2.events.CONNECTED,{bubbles:!0}));return}this._adapter.addSlotChangeListener(this._slotChangeListener),this._adapter.trySetTarget((e=this._for)!=null?e:null),this._adapter.hasTargetElement()&&this._connect()}}};var Nw="<template><slot></slot></template>",Rw=':host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);display:inline-block;cursor:default}:host([hidden]){display:none}',de=class extends M{static get observedAttributes(){return Object.values(a2.observedAttributes)}constructor(){super(),H(this,Nw,Rw),this._core=new oi(new ei(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case a2.attributes.FOR:this.for=o;break;case a2.attributes.DYNAMIC:this.dynamic=p(o);break;case a2.attributes.NON_INTERACTIVE:this.nonInteractive=p(o);break;case a2.attributes.LEGEND:this.legend=p(o);break}}update(){this._core.update()}[rs](t){return this._core.updateTarget(t)}};i([c()],de.prototype,"for",2),i([c()],de.prototype,"forElement",2),i([c()],de.prototype,"clickTarget",2),i([c()],de.prototype,"dynamic",2),i([c()],de.prototype,"nonInteractive",2),i([c()],de.prototype,"legend",2),de=i([y({name:a2.elementName})],de);function o6(){f(de)}var a6={LABEL_POSITION:"label-position",LABEL_ALIGNMENT:"label-alignment",INVALID:"invalid",REQUIRED:"required",OPTIONAL:"optional",DISABLED:"disabled",FLOAT_LABEL:"float-label",VARIANT:"variant",THEME:"theme",SHAPE:"shape",DENSITY:"density",DENSE:"dense",POPOVER_ICON:"popover-icon",POPOVER_EXPANDED:"popover-expanded",SUPPORT_TEXT_INSET:"support-text-inset"},Fw=d({},a6),Uw={DEFAULT_VARIANT:"outlined",DEFAULT_THEME:"default",DEFAULT_SHAPE:"default",DEFAULT_DENSITY:"default",DEFAULT_LABEL_POSITION:"inset",DEFAULT_LABEL_ALIGNMENT:"default",DEFAULT_SUPPORT_TEXT_INSET:"none"},Y={observedAttributes:a6,attributes:Fw,defaults:Uw};var $5=`${b}field`,n6=S(d({},Y.observedAttributes),{MULTILINE:"multiline",FOCUS_INDICATOR_ALLOW_FOCUS:"focus-indicator-allow-focus",FOCUS_INDICATOR_FOCUS_MODE:"focus-indicator-focus-mode"}),Ww=S(d({},n6),{MULTI_INPUT_SEPARATOR:"data-forge-multi-input-separator"}),Gw={FLOATING_IN:"floating-in",FLOATING_OUT:"floating-out",HAS_LABEL:"has-label",HAS_START:"has-start",HAS_END:"has-end",HAS_ACCESSORY:"has-accessory",HAS_SUPPORT_START:"has-support-text-start",HAS_SUPPORT_END:"has-support-text-end"},qw={ROOT:"#root",CONTAINER:"#container",INPUT_CONTAINER:"#input",LABEL:"#label",LABEL_SLOT:"slot[name=label]",POPOVER_ICON:"#popover-icon",LABEL_ELEMENTS:`:where(label, ${a2.elementName})`,POPOVER_TARGET:".popover-target"},Yw={ROOT:"root",LABEL:"label",SURFACE:"surface",START:"start",INPUT:"input",END:"end",POPOVER_ICON:"popover-icon",ACCESSORY:"accessory",SUPPORT_TEXT:"support-text",SUPPORT_TEXT_END:"support-text-end",OUTLINE:"outline",FOCUS_INDICATOR:"focus-indicator"},Kw={POPOVER_ICON_CLICK:`${$5}-popover-icon-click`,POPOVER_ICON_MOUSEDOWN:`${$5}-popover-icon-mousedown`},$w=d({},Y.defaults),Xw={FLOAT_IN_LABEL:"float-in-label-animation",FLOAT_OUT_LABEL:"float-out-label-animation"},L={elementName:$5,observedAttributes:n6,attributes:Ww,classes:Gw,selectors:qw,parts:Yw,events:Kw,defaults:$w,animations:Xw};var ai=class extends I{get focusIndicator(){return this._focusIndicatorElement}get hasSlottedLabel(){return!!this._labelSlotElement.assignedNodes({flatten:!0}).length}constructor(t){super(t),this._rootElement=w(t,L.selectors.ROOT),this._containerElement=w(t,L.selectors.CONTAINER),this._inputContainerElement=w(t,L.selectors.INPUT_CONTAINER),this._labelElement=w(t,L.selectors.LABEL),this._labelSlotElement=w(t,L.selectors.LABEL_SLOT),this._popoverIconElement=w(t,L.selectors.POPOVER_ICON),this._focusIndicatorElement=w(t,w1.elementName)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}addPopoverIconListener(t,e){this._popoverIconElement.addEventListener(t,e)}removePopoverIconListener(t,e){this._popoverIconElement.removeEventListener(t,e)}setLabelPosition(t){this._labelElement.remove(),t==="inset"?this._containerElement.prepend(this._labelElement):this._rootElement.prepend(this._labelElement)}setFloatingLabel(t){let e=t?L.classes.FLOATING_IN:L.classes.FLOATING_OUT,o=t?L.animations.FLOAT_IN_LABEL:L.animations.FLOAT_OUT_LABEL,a=s=>{s.animationName===o&&(ye(e,this._rootElement),this._rootElement.removeEventListener("animationend",a))};H1(e,this._rootElement),this._rootElement.addEventListener("animationend",a)}handleSlotChange(t){if(t.name===""){this._trySlotLabel(t);return}for(;t.assignedSlot;)t=t.assignedSlot;if(!t)return;let e={label:L.classes.HAS_LABEL,start:L.classes.HAS_START,end:L.classes.HAS_END,accessory:L.classes.HAS_ACCESSORY,"support-text":L.classes.HAS_SUPPORT_START,"support-text-end":L.classes.HAS_SUPPORT_END};t.name in e&&f2(this._rootElement,!!t.assignedNodes({flatten:!0}).length,e[t.name])}initializeSlots(){this._rootElement.querySelectorAll("slot").forEach(e=>this.handleSlotChange(e))}_trySlotLabel(t){t.assignedElements({flatten:!0}).filter(a=>a.matches(L.selectors.LABEL_ELEMENTS)).forEach(a=>{a.slot||(a.slot="label")})}};var ni=class{constructor(t){this._adapter=t;this._labelPosition=L.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=L.defaults.DEFAULT_LABEL_ALIGNMENT;this._floatLabel=!1;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=L.defaults.DEFAULT_VARIANT;this._theme=L.defaults.DEFAULT_THEME;this._shape=L.defaults.DEFAULT_SHAPE;this._density=L.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._multiline=!1;this._supportTextInset=L.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._slotChangeListener=this._onSlotChange.bind(this);this._popoverIconClickListener=this._onPopoverIconClick.bind(this);this._popoverIconMousedownListener=this._onPopoverIconMousedown.bind(this)}initialize(){this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.initializeSlots(),this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.setLabelPosition(this._labelPosition),this._popoverIcon&&(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener))}_onSlotChange(t){this._adapter.handleSlotChange(t.target)}_onPopoverIconClick(){this._adapter.dispatchHostEvent(new CustomEvent(L.events.POPOVER_ICON_CLICK,{bubbles:!0,composed:!0}))}_onPopoverIconMousedown(t){let e=new CustomEvent(L.events.POPOVER_ICON_MOUSEDOWN,{bubbles:!0,composed:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}floatLabelWithoutAnimation(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.toggleHostAttribute(L.attributes.FLOAT_LABEL,this._floatLabel))}get labelPosition(){return this._labelPosition}set labelPosition(t){if(this._labelPosition!==t){if(this._labelPosition=t,this._adapter.setHostAttribute(L.attributes.LABEL_POSITION,this._labelPosition),!this._adapter.isConnected)return;this._adapter.setLabelPosition(this._labelPosition)}}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setHostAttribute(L.attributes.LABEL_ALIGNMENT,this._labelAlignment))}get floatLabel(){return this._floatLabel}set floatLabel(t){this._floatLabel!==t&&(this._floatLabel=t,this._adapter.hasSlottedLabel&&this._adapter.setFloatingLabel(this._floatLabel),this._adapter.toggleHostAttribute(L.attributes.FLOAT_LABEL,this._floatLabel))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(L.attributes.INVALID,this._invalid))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.toggleHostAttribute(L.attributes.REQUIRED,this._required))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.toggleHostAttribute(L.attributes.OPTIONAL,this._optional))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(L.attributes.DISABLED,this._disabled))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setHostAttribute(L.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(L.attributes.THEME,this._theme))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setHostAttribute(L.attributes.SHAPE,this._shape))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setHostAttribute(L.attributes.DENSITY,this._density))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(L.attributes.DENSE,this._dense))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){if(this._popoverIcon!==t){if(this._popoverIcon=t,this._adapter.toggleHostAttribute(L.attributes.POPOVER_ICON,this._popoverIcon),!this._adapter.isConnected)return;this._popoverIcon?(this._adapter.addPopoverIconListener("click",this._popoverIconClickListener),this._adapter.addPopoverIconListener("mousedown",this._popoverIconMousedownListener)):(this._adapter.removePopoverIconListener("click",this._popoverIconClickListener),this._adapter.removePopoverIconListener("mousedown",this._popoverIconMousedownListener))}}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.toggleHostAttribute(L.attributes.POPOVER_EXPANDED,this._popoverExpanded))}get multiline(){return this._multiline}set multiline(t){this._multiline!==t&&(this._multiline=t,this._adapter.toggleHostAttribute(L.attributes.MULTILINE,this._multiline))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setHostAttribute(L.attributes.SUPPORT_TEXT_INSET,this._supportTextInset))}get focusIndicatorTargetElement(){return this._adapter.focusIndicator.targetElement}set focusIndicatorTargetElement(t){this._adapter.focusIndicator.targetElement=t}get focusIndicatorFocusMode(){return this._adapter.focusIndicator.focusMode}set focusIndicatorFocusMode(t){this._adapter.focusIndicator.focusMode=t}get focusIndicatorAllowFocus(){return this._adapter.focusIndicator.allowFocus}set focusIndicatorAllowFocus(t){this._adapter.focusIndicator.allowFocus=t}};var Zw='<template><div id="root" class="forge-field" part="root"><div id="label" class="label" part="label"><slot name="label"></slot></div><div id="container" class="container"><div class="popover-target" aria-hidden="true"></div><div id="surface" class="surface" part="surface"></div><div id="start" class="start" part="start"><slot name="start"></slot></div><div id="input" class="input" part="input"><slot></slot></div><div id="end" class="end" part="end"><slot name="end"></slot></div><div id="popover-icon" class="popover-icon" part="popover-icon"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" aria-hidden="true"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 10l5 5 5-5z" id="popover-icon__arrow"/></svg></div><div id="accessory" class="accessory" part="accessory"><slot name="accessory"></slot></div></div><div class="support-text"><div class="support-text-start" part="support-text"><slot name="support-text"></slot></div><div class="support-text-end" part="support-text-end"><slot name="support-text-end"></slot></div></div><div class="outline" part="outline"><forge-focus-indicator target="input" part="focus-indicator"></forge-focus-indicator></div></div></template>',jw='@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}@layer base,theme,variant,shape,density; @layer base{:host{display:block}:host([hidden]){display:none}.forge-field{--_field-background:var(--forge-field-background, transparent);--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-surface-container-minimum, #f5f5f5));--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-surface-bright, #ffffff));--_field-outline-style:var(--forge-field-outline-style, solid);--_field-outline-width:var(--forge-field-outline-width, var(--forge-border-thin, 1px));--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_field-height:var(--forge-field-height, 40px);--_field-inset-height:var(--forge-field-inset-height, 48px);--_field-padding-inline:var(--forge-field-padding-inline, 12px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, var(--_field-padding-inline));--_field-padding-inline-end:var(--forge-field-padding-inline-end, var(--_field-padding-inline));--_field-inner-padding-inline:var(--forge-field-inner-padding-inline, 8px);--_field-rounded-container-padding-inline:var(--forge-field-rounded-container-padding-inline, calc(var(--_field-height) / 2));--_field-rounded-container-padding-inline-start:var(--forge-field-rounded-container-padding-inline-start, var(--_field-rounded-container-padding-inline));--_field-rounded-container-padding-inline-end:var(--forge-field-rounded-container-padding-inline-end, var(--_field-rounded-container-padding-inline));--_field-support-text-margin-block:var(--forge-field-support-text-margin-block, 4px);--_field-support-text-gap:var(--forge-field-support-text-gap, 8px);--_field-support-text-padding-inline:var(--forge-field-support-text-padding-inline, var(--_field-padding-inline));--_field-support-text-padding-inline-start:var(--forge-field-support-text-padding-inline-start, var(--_field-support-text-padding-inline));--_field-support-text-padding-inline-end:var(--forge-field-support-text-padding-inline-end, var(--_field-support-text-padding-inline));--_field-label-margin-inline:var(--forge-field-label-margin-inline, 8px);--_field-label-margin-block:var(--forge-field-label-margin-block, 4px);--_field-required-padding:var(--forge-field-required-padding, 0.35ch);--_field-required-content:var(--forge-field-required-content, "*");--_field-optional-padding:var(--forge-field-optional-padding, 0.5ch);--_field-optional-content:var(--forge-field-optional-content, "(optional)");--_field-multiline-resize:var(--forge-field-multiline-resize, block);--_field-multiline-min-inline-size:var(--forge-field-multiline-min-inline-size, initial);--_field-multiline-max-inline-size:var(--forge-field-multiline-max-inline-size, initial);--_field-multiline-min-block-size:var(--forge-field-multiline-min-block-size, var(--_field-height));--_field-multiline-max-block-size:var(--forge-field-multiline-max-block-size, initial);--_field-popover-icon-transition-duration:var(--forge-field-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_field-popover-icon-transition-timing:var(--forge-field-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-popover-icon-open-rotation:var(--forge-field-popover-icon-open-rotation, 180deg);--_field-surface-animation-duration:var(--forge-field-surface-animation-duration, var(--forge-animation-duration-short4, 200ms));--_field-surface-animation-timing:var(--forge-field-surface-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, var(--forge-animation-duration-short2, 100ms));--_field-floating-animation-timing:var(--forge-field-floating-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)));--_field-focus-indicator-width:var(--forge-field-focus-indicator-width, var(--forge-focus-indicator-width, var(--forge-border-medium, 2px)));--_field-disabled-opacity:var(--forge-field-disabled-opacity, 0.38);--_field-disabled-background:var(--forge-field-disabled-background, var(--forge-theme-surface-container-low, #ebebeb));--_field-font-size:var(--forge-field-font-size, inherit);--_field-dense-font-size:var(--forge-field-dense-font-size, 0.875rem);--_field-placeholder-color:var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_field-overflow:var(--forge-field-overflow, hidden);--_field-isolation:var(--forge-field-isolation, isolate)}.forge-field{--_field-disableable-cursor:var(--forge-field-disableable-cursor, auto);--_field-disableable-opacity:var(--forge-field-disableable-opacity, 1);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, 100%);--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-outline-color));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--_field-outline-color-hover));--_field-inner-border-display:var(--forge-field-inner-border-display, block);--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-label-grid-area:var(--forge-field-label-grid-area, "label");--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--_field-multiline-inset-label-background));--_field-surface-display:var(--forge-field-surface-display, block);position:relative;display:grid}}@layer theme{:host(:where([theme=default],:not([theme]))) .forge-field{--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-outline-low, #9e9e9e));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-outline-high, #212121));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-filled-background));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-tonal-background));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--_field-tonal-background-hover));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-outline-low, #9e9e9e));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-outline-high, #212121))}:host(:where([label-position=inset],:not([label-position])):where([theme=default],:not([theme]))) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host([theme=primary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-primary-container, #222c62));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-primary, #3f51b5));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-primary-container, #222c62));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-primary-container-low, #222c62));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-primary-container-low, #e8eaf6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-primary-container-minimum, #f7f8fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-primary, #3f51b5));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-primary-container, #222c62))}:host(:where([label-position=inset],:not([label-position]))[theme=primary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-primary-container-low, #222c62))}:host([theme=secondary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-secondary, #ffc107));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-secondary-container, #8a6804));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-secondary-container-low, #8a6804));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-secondary-container-low, #fff8e1));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-secondary-container-minimum, #fffdf5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-on-secondary-container, #8a6804));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-secondary-container, #8a6804))}:host(:where([label-position=inset],:not([label-position]))[theme=secondary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-tertiary-container, #213189));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-tertiary, #3d5afe));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-tertiary-container, #213189));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-tertiary-container-low, #213189));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-tertiary-container-minimum, #f7f8ff));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-tertiary, #3d5afe));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-tertiary-container, #213189))}:host(:where([label-position=inset],:not([label-position]))[theme=tertiary]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-success, #2e7d32));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-success-container, #19441b));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-success, #2e7d32));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-success-container, #19441b));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-success-container-low, #19441b));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-success-container-minimum, #f7faf7));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-success-container-low, #e6efe6));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-success-container-minimum, #f7faf7));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-success, #2e7d32));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-success-container, #19441b))}:host(:where([label-position=inset],:not([label-position]))[theme=success]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=error]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011))}:host(:where([label-position=inset],:not([label-position]))[theme=error]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=warning]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-warning, #d14900));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-warning-container, #712700));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-warning, #d14900));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-warning-container, #712700));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-warning-container-low, #712700));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-warning-container-low, #f9e9e0));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-warning-container-minimum, #fdf8f5));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-warning, #d14900));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-warning-container, #712700))}:host(:where([label-position=inset],:not([label-position]))[theme=warning]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=info]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-info, #1565c0));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-info-container, #0b3768));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-info, #1565c0));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-info-container, #0b3768));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-info-container-low, #0b3768));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-info-container-low, #e3edf7));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-info-container-minimum, #f6f9fc));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-info, #1565c0));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-info-container, #0b3768))}:host(:where([label-position=inset],:not([label-position]))[theme=info]) .forge-field{--_field-label-color:var(--forge-field-label-color, var(--forge-theme-on-info-container-low, #0b3768))}}@layer variant{:host([variant=plain]) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-display:var(--forge-field-inner-border-display, none);--_field-padding-inline:var(--forge-field-padding-inline, 0);--_field-surface-display:var(--forge-field-surface-display, none)}:host(:where([variant=outlined],:not([variant]))) .forge-field{--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-surface, #ffffff));--_field-multiline-inset-label-background-hover:var(--forge-field-multiline-inset-label-background-hover, var(--forge-theme-surface, #ffffff))}:host([variant=tonal]) .forge-field{--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-tonal-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background));--_field-hover-background:var(--forge-field-hover-background, tonal-background-hover);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-multiline-inset-label-tonal-background))}:host([variant=filled]) .forge-field{--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}:host([variant=raised]) .forge-field{--_field-elevation:var(--forge-field-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_field-elevation-active:var(--forge-field-elevation-active, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_field-outline-color:var(--forge-field-outline-color, transparent);--_field-outline-color-hover:var(--forge-field-outline-color-hover, transparent);--_field-inner-border-block-size:var(--forge-field-inner-border-block-size, calc(100% - 8px));--_field-background:var(--_field-filled-background);--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--_field-background))}}@layer shape{:host([shape=squared]) .forge-field{--_field-shape:var(--forge-field-shape, 0)}:host([shape=rounded]) .forge-field{--_field-shape:var(--forge-field-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_field-padding-inline:var(--forge-field-padding-inline, var(--_field-rounded-container-padding-inline-start))}}@layer density{:host(:where([label-position=inset],:not([label-position])):not([dense]):where([density=default],:not([density]))) .forge-field{--_field-height:var(--forge-field-height, var(--_field-inset-height))}:host(:where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px);--_field-padding-inline-start:var(--forge-field-padding-inline-start, 8px);--_field-padding-inline-end:var(--forge-field-padding-inline-end, 4px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .forge-field{--_field-height:var(--forge-field-height, 24px)}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label,:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) .label::before{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}:host(:where([label-position=inset],:not([label-position])):where([density=extra-small],[dense])) ::slotted(:where(input,textarea,[data-forge-field-input])){--_field-font-size:var(--_field-dense-font-size)}:host(:not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 32px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=small]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 40px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=medium]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 48px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 56px)}:host(:where([label-position=inset],:not([label-position])):not([dense])[density=extra-large]) .forge-field{--_field-height:var(--forge-field-height, 64px)}}:host([disabled]) .forge-field{--_field-background:var(--_field-disabled-background);--_field-disableable-cursor:var(--forge-field-disableable-cursor, not-allowed);--_field-disableable-opacity:var(--forge-field-disableable-opacity, var(--_field-disabled-opacity))}:host(:not([disabled])[invalid]) .forge-field{--_field-filled-background:var(--forge-field-filled-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-focus-indicator-color:var(--forge-field-focus-indicator-color, var(--forge-theme-error, #b00020));--_field-tonal-background:var(--forge-field-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-tonal-background-hover:var(--forge-field-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-content-color:var(--forge-field-content-color, var(--forge-theme-on-error-container, #5f0011));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--forge-theme-error, #b00020));--_field-inner-border-color-hover:var(--forge-field-inner-border-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-inset-label-color:var(--forge-field-inset-label-color, var(--forge-theme-on-error-container-low, #5f0011));--_field-multiline-inset-label-background:var(--forge-field-multiline-inset-label-background, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--forge-theme-error-container-low, #f6e0e4));--_field-multiline-inset-label-tonal-background-hover:var(--forge-field-multiline-inset-label-tonal-background-hover, var(--forge-theme-error-container-minimum, #fcf5f6));--_field-outline-color:var(--forge-field-outline-color, var(--forge-theme-error, #b00020));--_field-outline-color-hover:var(--forge-field-outline-color-hover, var(--forge-theme-on-error-container, #5f0011));--_field-label-color:var(--forge-field-label-color, var(--forge-theme-error, #b00020))}:host(:not([disabled])[invalid]) .forge-field .support-text{color:var(--forge-theme-error,#b00020)}:host(:not([disabled])) .forge-field:has(.container:hover){--_field-outline-color:var(--forge-field-outline-color, var(--_field-outline-color-hover));--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active));--_field-tonal-background:var(--_field-tonal-background-hover);--_field-multiline-inset-label-tonal-background:var(--forge-field-multiline-inset-label-tonal-background, var(--_field-multiline-inset-label-tonal-background-hover));--_field-inner-border-color:var(--forge-field-inner-border-color, var(--_field-inner-border-color-hover))}:host(:not([disabled])) .forge-field:has(.input:focus-within){--_field-elevation:var(--forge-field-elevation, var(--_field-elevation-active))}.forge-field .outline{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:outline-color;transition-timing-function:var(--_field-surface-animation-timing);position:relative;grid-area:main;inline-size:100%;block-size:100%;box-shadow:var(--_field-elevation);border-radius:var(--_field-shape);outline-style:var(--_field-outline-style);outline-width:var(--_field-outline-width);outline-color:var(--_field-outline-color);outline-offset:calc(var(--_field-outline-width) * -1);pointer-events:none}.forge-field .container{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:relative;display:grid;isolation:var(--_field-isolation);grid-area:main;grid-template-areas:"start center end popover-icon accessory";grid-template-columns:auto 1fr auto auto auto;align-items:center;border-radius:var(--_field-shape);inline-size:100%;block-size:var(--_field-height);overflow:var(--_field-overflow)}.forge-field .surface{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);display:var(--_field-surface-display);grid-column:1/-1;grid-row:1/-1;border-radius:var(--_field-shape);inline-size:100%;block-size:100%;background:var(--_field-background);pointer-events:none}.forge-field .input{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);display:flex;grid-area:center;block-size:100%;inline-size:100%;min-inline-size:0;color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-field .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);position:relative;display:inline-flex;grid-area:var(--_field-label-grid-area);pointer-events:var(--_field-label-pointer-events);margin-block-end:var(--_field-label-margin-block-end);margin-inline-start:var(--_field-label-margin-inline-start);margin-inline-end:var(--_field-label-margin-inline-end);block-size:fit-content;overflow:hidden;color:var(--_field-label-color);line-height:normal;white-space:var(--_field-label-white-space)}.forge-field .popover-target{position:absolute;inset:calc(var(--_field-focus-indicator-width) * -1);pointer-events:none}.forge-field .popover-icon{display:none}.forge-field .popover-icon__arrow{fill:inherit}.forge-field .accessory,.forge-field .end,.forge-field .start,.forge-field .support-text,.forge-field .support-text-end,.forge-field .support-text-start{display:none}:host([required]) .has-label .label::before{margin-inline-end:var(--_field-required-padding);color:var(--forge-theme-error,#b00020);content:var(--_field-required-content)}:host([optional]) .label::after{margin-inline-start:var(--_field-optional-padding);color:inherit;content:var(--_field-optional-content)}:host([popover-icon]) .popover-icon{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-inner-padding-inline);display:flex;align-items:center;grid-area:popover-icon;isolation:isolate;block-size:100%}:host([popover-icon]) .popover-icon>*{transition:rotate var(--_field-popover-icon-transition-duration) var(--_field-popover-icon-transition-timing);fill:var(--_field-content-color)}:host([popover-icon][popover-expanded]) .popover-icon>*{rotate:var(--_field-popover-icon-open-rotation)}.forge-field.has-start .start{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-start:var(--_field-padding-inline-start);display:flex;grid-area:start;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-end .end{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);padding-inline-end:var(--_field-padding-inline-end);display:flex;grid-area:end;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory{padding-inline-end:var(--_field-inner-padding-inline);position:relative;display:flex;grid-area:accessory;align-items:center;block-size:100%;max-block-size:100%;min-block-size:0;color:var(--_field-content-color)}.forge-field.has-accessory .accessory::before{opacity:var(--_field-disableable-opacity);cursor:var(--_field-disableable-cursor);transition-duration:var(--_field-surface-animation-duration);transition-property:border-color;transition-timing-function:var(--_field-surface-animation-timing);padding-inline-end:var(--_field-inner-padding-inline);display:var(--_field-inner-border-display);border-inline-start-style:solid;border-inline-start-width:var(--_field-outline-width);border-inline-start-color:var(--_field-inner-border-color);block-size:var(--_field-inner-border-block-size);content:""}.forge-field.has-accessory .forge-field:not(.has-accessory) .popover-icon{padding-inline-end:var(--_field-padding-inline-end)}.forge-field.has-support-text-end .support-text,.forge-field.has-support-text-start .support-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);justify-content:space-between;display:grid;grid-template-areas:"start end";grid-template-columns:1fr auto;grid-area:support-text;margin-block-start:var(--_field-support-text-margin-block);line-height:normal}.forge-field.has-support-text-start.has-support-text-end .support-text{gap:var(--_field-support-text-gap)}.forge-field.has-support-text-start .support-text-start{display:inline-block;grid-area:start}.forge-field.has-support-text-end .support-text-end{display:inline-block;grid-area:end}:host(:not([popover-icon])) .forge-field:not(.has-accessory) .end{padding-inline-end:var(--_field-padding-inline-end)}:host([label-position=block-start]) .forge-field{grid-template-areas:"label" "main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto auto}:host([label-position=block-start]) .label{--_field-label-margin-block-end:var(--forge-field-label-margin-block-end, var(--_field-label-margin-block))}:host([label-position=inline-start]) .forge-field{grid-template-areas:"label main" ". support-text";grid-template-columns:auto 1fr;grid-template-rows:auto auto}:host([label-position=inline-start]) .label{--_field-label-margin-inline-end:var(--forge-field-label-margin-inline-end, var(--_field-label-margin-inline))}:host([label-position=inline-end]) .forge-field{grid-template-areas:"main label" "support-text .";grid-template-columns:1fr auto;grid-template-rows:auto auto}:host([label-position=inline-end]) .label{--_field-label-margin-inline-start:var(--forge-field-label-margin-inline-start, var(--_field-label-margin-inline))}:host(:where([label-position=inset],:not([label-position]))) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto;--_field-label-grid-area:var(--forge-field-label-grid-area, center);--_field-label-pointer-events:var(--forge-field-label-pointer-events, none);--_field-label-white-space:var(--forge-field-label-white-space, nowrap)}:host(:where([label-position=inset],:not([label-position]))) .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end);z-index:999;--_field-floating-label-translation:var(--forge-field-floating-label-translation, 0 calc(calc(calc(max(var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375))), var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)))) / 2) + calc((var(--_field-height) - 56px) / 8)) * -1))}:host([label-position=none]) .forge-field{grid-template-areas:"main" "support-text";grid-template-columns:1fr;grid-template-rows:auto auto}:host([label-position=none]) .label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}:host([label-position=inline-end][label-alignment=start]) .label,:host([label-position=inline-start][label-alignment=start]) .label{align-self:start}:host([label-position=inline-end]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label,:host([label-position=inline-start]:where([label-alignment=center],[label-alignment=default],:not([label-alignment]))) .label{align-self:center}:host([label-position=inline-end][label-alignment=end]) .label,:host([label-position=inline-start][label-alignment=end]) .label{align-self:end}:host([label-position=inline-end][label-alignment=baseline]) .label,:host([label-position=inline-start][label-alignment=baseline]) .label{align-self:center;padding-block-start:calc(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))) - var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))}:host([label-position=block-start]:where([label-alignment=start],[label-alignment=default],:not([label-alignment]))) .label{justify-self:start}:host([label-position=block-start][label-alignment=center]) .label{justify-self:center}:host([label-position=block-start][label-alignment=end]) .label{justify-self:end}:host([label-position=block-start][label-alignment=baseline]:not([variant=plain])) .label{justify-self:start;padding-inline-start:var(--_field-padding-inline-start)}:host([label-position=block-start][label-alignment=baseline][variant=plain]) .label{justify-self:start;padding-inline-start:0px}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);translate:var(--_field-floating-label-translation)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label .input{box-sizing:border-box}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .label{animation-name:float-in-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label.floating-in .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .has-label:not(.floating-in) .input ::slotted(:is(input,[data-forge-field-input],[data-forge-multi-input-separator])){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) * 2)!important}:host(:where([label-position=inset],:not([label-position])):not([float-label])) .has-label.floating-out .label{animation-name:float-out-label-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing)}:host(:where([label-position=inset],:not([label-position]))[float-label][multiline]) .has-label ::slotted(textarea){padding-block-start:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important;padding-block-end:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)!important}:host([support-text-inset=both]) .support-text{padding-inline-start:var(--_field-padding-inline-start);padding-inline-end:var(--_field-padding-inline-end)}:host([support-text-inset=start]) .support-text{padding-inline-start:var(--_field-padding-inline-start)}:host([support-text-inset=end]) .support-text{padding-inline-end:var(--_field-padding-inline-end)}:host([multiline]) .container{align-items:start;block-size:fit-content;min-inline-size:var(--_field-multiline-min-inline-size);max-inline-size:var(--_field-multiline-max-inline-size);min-block-size:var(--_field-multiline-min-block-size);max-block-size:var(--_field-multiline-max-block-size);resize:var(--_field-multiline-resize)}:host([multiline]) .container .end,:host([multiline]) .container .label,:host([multiline]) .container .popover-icon,:host([multiline]) .container .start{align-items:center;block-size:var(--_field-height)}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label{pointer-events:none;inline-size:fit-content}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label slot{display:block}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .label::after{animation-name:multiline-inset-label-background-animation;animation-duration:var(--_field-floating-animation-duration);animation-timing-function:var(--_field-floating-animation-timing);position:absolute;z-index:-1;inset-inline-start:var(--_field-outline-width);transition-duration:var(--_field-surface-animation-duration);transition-property:background;transition-timing-function:var(--_field-surface-animation-timing);background:var(--_field-multiline-inset-label-background);inline-size:100%;block-size:3ex;filter:blur(2px);content:""}:host([multiline]:where([label-position=inset],:not([label-position]))[float-label]:not(:where([density=extra-small],[dense]))) .forge-field:not(.has-label) .label::after{display:none}.forge-field .input ::slotted(*){box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing);cursor:var(--_field-disableable-cursor)}.forge-field .input ::slotted(*)::placeholder{color:var(--_field-placeholder-color)}.forge-field .input ::slotted(textarea){resize:none}.forge-field .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-padding-inline-start)}.forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-padding-inline-end)}.forge-field .input ::slotted([data-forge-multi-input-separator]){align-self:center;padding-inline:4px;block-size:fit-content;inline-size:fit-content}.forge-field .label ::slotted(forge-label){font:inherit}.forge-field.has-start .input ::slotted(:is([data-forge-field-input],:first-of-type:is(input,textarea))){padding-inline-start:var(--_field-inner-padding-inline)}.forge-field.has-end .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}.forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}.forge-field ::slotted(:where([slot=support-text],[slot=helper-text])){display:block;min-height:.875rem}:host([variant=plain]) .forge-field.has-accessory .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .forge-field.has-start .label{padding-inline-start:var(--_field-inner-padding-inline)}:host(:where([label-position=inset],:not([label-position]))) .label ::slotted(*){max-inline-size:100%;overflow:hidden;text-overflow:ellipsis}:host([popover-icon]) .forge-field .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([popover-icon]) .forge-field .end{padding-inline-end:var(--_field-inner-padding-inline)}:host(:not(popover-icon)) .forge-field.has-accessory:not(:is(.has-end)) .input ::slotted(:is([data-forge-field-input],:last-of-type:is(input,textarea))){padding-inline-end:var(--_field-inner-padding-inline)}:host([multiline]) .input ::slotted(:is(input,textarea)){padding-block-start:calc((var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2);padding-block-end:calc(calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8)) + (var(--_field-height) - var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))))/ 2)}:host([multiline]) .accessory slot{align-items:center;block-size:var(--_field-height);display:flex;align-self:start}forge-focus-indicator{--forge-focus-indicator-color:var(--_field-focus-indicator-color);--forge-focus-indicator-outward-offset:calc(var(--_field-outline-width) * -1);--forge-focus-indicator-shape:var(--_field-shape);--forge-focus-indicator-width:var(--_field-focus-indicator-width)}:host([variant=plain]) forge-focus-indicator{--forge-focus-indicator-offset-inline:-4px}@media (prefers-reduced-motion:reduce){.forge-field{--_field-floating-animation-duration:var(--forge-field-floating-animation-duration, 0s)}}',F1=class extends M{static get observedAttributes(){return Object.values(L.observedAttributes)}constructor(){super(),H(this,Zw,jw),this._core=new ni(new ai(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case L.attributes.LABEL_POSITION:this.labelPosition=o;break;case L.attributes.LABEL_ALIGNMENT:this.labelAlignment=o;break;case L.attributes.FLOAT_LABEL:this.floatLabel=p(o);break;case L.attributes.INVALID:this.invalid=p(o);break;case L.attributes.REQUIRED:this.required=p(o);break;case L.attributes.OPTIONAL:this.optional=p(o);break;case L.attributes.DISABLED:this.disabled=p(o);break;case L.attributes.VARIANT:this.variant=o;break;case L.attributes.THEME:this.theme=o;break;case L.attributes.SHAPE:this.shape=o;break;case L.attributes.DENSITY:this.density=o;break;case L.attributes.DENSE:this.dense=p(o);break;case L.attributes.POPOVER_ICON:this.popoverIcon=p(o);break;case L.attributes.POPOVER_EXPANDED:this.popoverExpanded=p(o);break;case L.attributes.MULTILINE:this.multiline=p(o);break;case L.attributes.SUPPORT_TEXT_INSET:this.supportTextInset=o;break;case L.attributes.FOCUS_INDICATOR_FOCUS_MODE:this.focusIndicatorFocusMode=o;break;case L.attributes.FOCUS_INDICATOR_ALLOW_FOCUS:this.focusIndicatorAllowFocus=p(o);break}}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};i([c()],F1.prototype,"labelPosition",2),i([c()],F1.prototype,"labelAlignment",2),i([c()],F1.prototype,"floatLabel",2),i([c()],F1.prototype,"invalid",2),i([c()],F1.prototype,"required",2),i([c()],F1.prototype,"optional",2),i([c()],F1.prototype,"disabled",2),i([c()],F1.prototype,"variant",2),i([c()],F1.prototype,"theme",2),i([c()],F1.prototype,"shape",2),i([c()],F1.prototype,"density",2),i([c()],F1.prototype,"dense",2),i([c()],F1.prototype,"popoverIcon",2),i([c()],F1.prototype,"popoverExpanded",2),i([c()],F1.prototype,"multiline",2),i([c()],F1.prototype,"supportTextInset",2),i([c()],F1.prototype,"focusIndicatorTargetElement",2),i([c()],F1.prototype,"focusIndicatorFocusMode",2),i([c()],F1.prototype,"focusIndicatorAllowFocus",2),F1=i([y({name:L.elementName,dependencies:[J]})],F1);var z2=class extends mt(M){static get observedAttributes(){return Object.values(Y.observedAttributes)}constructor(){super()}attributeChangedCallback(t,e,o){switch(t){case Y.observedAttributes.LABEL_POSITION:this.labelPosition=o;return;case Y.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=o;return;case Y.observedAttributes.INVALID:this.invalid=p(o);return;case Y.observedAttributes.REQUIRED:this.required=p(o);return;case Y.observedAttributes.OPTIONAL:this.optional=p(o);return;case Y.observedAttributes.DISABLED:this.disabled=p(o);return;case Y.observedAttributes.FLOAT_LABEL:this.floatLabel=p(o);return;case Y.observedAttributes.VARIANT:this.variant=o;return;case Y.observedAttributes.THEME:this.theme=o;return;case Y.observedAttributes.SHAPE:this.shape=o;return;case Y.observedAttributes.DENSITY:this.density=o;return;case Y.observedAttributes.DENSE:this.dense=p(o);return;case Y.observedAttributes.POPOVER_ICON:this.popoverIcon=p(o);return;case Y.observedAttributes.POPOVER_EXPANDED:this.popoverExpanded=p(o);return;case Y.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=o;return}}labelClickedCallback(){this._core.click()}labelChangedCallback(t){this._core.applyLabel(t)}floatLabelWithoutAnimation(t){this._core.floatLabelWithoutAnimation(t)}};i([c()],z2.prototype,"labelPosition",2),i([c()],z2.prototype,"labelAlignment",2),i([c()],z2.prototype,"invalid",2),i([c()],z2.prototype,"required",2),i([c()],z2.prototype,"optional",2),i([c()],z2.prototype,"disabled",2),i([c({name:"permanentlyFloatLabel"})],z2.prototype,"floatLabel",2),i([c()],z2.prototype,"variant",2),i([c()],z2.prototype,"theme",2),i([c()],z2.prototype,"shape",2),i([c()],z2.prototype,"density",2),i([c()],z2.prototype,"dense",2),i([c()],z2.prototype,"popoverIcon",2),i([c()],z2.prototype,"popoverExpanded",2),i([c()],z2.prototype,"supportTextInset",2);var ba=class extends I{setFieldProperty(t,e){this._fieldElement[t]=e}floatLabelWithoutAnimation(t){this._fieldElement.floatLabelWithoutAnimation(t)}};var ya=class{constructor(t){this._adapter=t;this._labelPosition=Y.defaults.DEFAULT_LABEL_POSITION;this._labelAlignment=Y.defaults.DEFAULT_LABEL_ALIGNMENT;this._invalid=!1;this._required=!1;this._optional=!1;this._disabled=!1;this._variant=Y.defaults.DEFAULT_VARIANT;this._theme=Y.defaults.DEFAULT_THEME;this._shape=Y.defaults.DEFAULT_SHAPE;this._density=Y.defaults.DEFAULT_DENSITY;this._dense=!1;this._popoverIcon=!1;this._popoverExpanded=!1;this._supportTextInset=Y.defaults.DEFAULT_SUPPORT_TEXT_INSET;this._permanentlyFloatLabel=!1}get _hasValue(){return this._adapter.hasValue}get _hasPlaceholder(){return this._adapter.hasPlaceholder}click(){this._adapter.click()}applyLabel(t){this._adapter.applyLabel(t)}floatLabelWithoutAnimation(t){this._adapter.floatLabelWithoutAnimation(this._hasValue||this._hasPlaceholder||t)}_tryFloatLabel(t){if(!this._permanentlyFloatLabel){if(this._labelPosition!=="inset"){this._adapter.tryFloatLabel(!1);return}this._adapter.tryFloatLabel(t)}}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition!==t&&(this._labelPosition=t,this._adapter.setFieldProperty("labelPosition",t),this._adapter.setHostAttribute(Y.attributes.LABEL_POSITION,t))}get labelAlignment(){return this._labelAlignment}set labelAlignment(t){this._labelAlignment!==t&&(this._labelAlignment=t,this._adapter.setFieldProperty("labelAlignment",t),this._adapter.setHostAttribute(Y.attributes.LABEL_ALIGNMENT,t))}get invalid(){return this._invalid}set invalid(t){this._invalid!==t&&(this._invalid=t,this._adapter.setFieldProperty("invalid",t),this._adapter.toggleHostAttribute(Y.attributes.INVALID,t))}get required(){return this._required}set required(t){this._required!==t&&(this._required=t,this._adapter.setFieldProperty("required",t),this._adapter.toggleHostAttribute(Y.attributes.REQUIRED,t))}get optional(){return this._optional}set optional(t){this._optional!==t&&(this._optional=t,this._adapter.setFieldProperty("optional",t),this._adapter.toggleHostAttribute(Y.attributes.OPTIONAL,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setFieldProperty("disabled",t),this._adapter.toggleHostAttribute(Y.attributes.DISABLED,t))}get permanentlyFloatLabel(){return this._permanentlyFloatLabel}set permanentlyFloatLabel(t){this._permanentlyFloatLabel!==t&&(this._permanentlyFloatLabel=t,this._adapter.setFieldProperty("floatLabel",t||this._hasValue||this._hasPlaceholder),this._adapter.toggleHostAttribute(Y.attributes.FLOAT_LABEL,t))}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t,this._adapter.setFieldProperty("variant",t),this._adapter.setHostAttribute(Y.attributes.VARIANT,t))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.setFieldProperty("theme",t),this._adapter.setHostAttribute(Y.attributes.THEME,t))}get shape(){return this._shape}set shape(t){this._shape!==t&&(this._shape=t,this._adapter.setFieldProperty("shape",t),this._adapter.setHostAttribute(Y.attributes.SHAPE,t))}get density(){return this._density}set density(t){this._density!==t&&(this._density=t,this._adapter.setFieldProperty("density",t),this._adapter.setHostAttribute(Y.attributes.DENSITY,t))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setFieldProperty("dense",t),this._adapter.toggleHostAttribute(Y.attributes.DENSE,t))}get popoverIcon(){return this._popoverIcon}set popoverIcon(t){this._popoverIcon!==t&&(this._popoverIcon=t,this._adapter.setFieldProperty("popoverIcon",t),this._adapter.toggleHostAttribute(Y.attributes.POPOVER_ICON,t))}get popoverExpanded(){return this._popoverExpanded}set popoverExpanded(t){this._popoverExpanded!==t&&(this._popoverExpanded=t,this._adapter.setFieldProperty("popoverExpanded",t))}get supportTextInset(){return this._supportTextInset}set supportTextInset(t){this._supportTextInset!==t&&(this._supportTextInset=t,this._adapter.setFieldProperty("supportTextInset",t),this._adapter.setHostAttribute(Y.attributes.SUPPORT_TEXT_INSET,t))}};function s6(){f(F1)}var r6=`${b}text-field`,i6={SHOW_CLEAR:"show-clear"},Qw=d({},i6),Jw={FIELD:"#field",DEFAULT_SLOT:"slot:not([name])",LABEL_SLOT:"slot[name=label]",CLEAR_BUTTON_SLOT:"slot[name=clear-button]",FORGE_LABEL:a2.elementName,INPUT:":where(input:not([type=button], [type=checkbox], [type=color], [type=hidden], [type=image], [type=radio], [type=range], [type=reset], [type=submit]), textarea)"},tu=["disabled","placeholder"],eu={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},ou={CLEAR:`${r6}-clear`},E1={elementName:r6,observedAttributes:i6,attributes:Qw,selectors:Jw,observedInputAttributes:tu,tagNames:eu,events:ou};var si=class extends ba{constructor(e){super(e);this._inputElements=[];this._destroyValueChangerListeners=[];this._fieldElement=w(e,E1.selectors.FIELD),this._clearButtonSlotElement=w(e,E1.selectors.CLEAR_BUTTON_SLOT),this._defaultSlotElement=w(e,E1.selectors.DEFAULT_SLOT),this._labelSlotElement=w(e,E1.selectors.LABEL_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(L.parts).join(", ")),this._clearButtonSlotElement.remove()}get hasValue(){return this._inputElements.some(e=>!!e.value)}get hasPlaceholder(){return this._inputElements.some(e=>!!e.placeholder)}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=w(this._fieldElement,L.selectors.POPOVER_TARGET)),this._popoverTargetElement}addRootListener(e,o){this._fieldElement.addEventListener(e,o)}removeRootListener(e,o){this._fieldElement.removeEventListener(e,o)}disableInput(e){this._inputElements.forEach(o=>o.disabled=e)}inputIsDisabled(){return this._inputElements.some(e=>e.disabled)}click(){var e;(e=this._inputElements[0])==null||e.focus()}applyLabel(e){this._inputElements.forEach(o=>{G(o,!!e,"aria-label",e!=null?e:"")})}handleDefaultSlotChange(e){var a;(a=this._inputMutationObserver)==null||a.disconnect();let o=this._defaultSlotElement.assignedElements();o.length&&(this._inputElements=o.filter(s=>s.matches(E1.selectors.INPUT)),this._fieldElement.multiline=this._inputElements.some(s=>s.tagName===E1.tagNames.TEXTAREA),this._inputMutationObserver=new MutationObserver(s=>{s.forEach(r=>{if(r.attributeName){let h=r.target.getAttribute(r.attributeName),v=r.attributeName;e(v,h)}})}),this._inputElements.forEach(s=>{var r;(r=this._inputMutationObserver)==null||r.observe(s,{attributes:!0,attributeFilter:[...E1.observedInputAttributes]}),this._component.disabled&&(s.disabled=!0),Object.values(E1.observedInputAttributes).forEach(l=>{let h=l;e(h,s.getAttribute(h))})}))}tryAddValueChangeListener(e,o){this._destroyValueChangerListeners.forEach(a=>a()),this._destroyValueChangerListeners=this._inputElements.map(a=>r0(e,a,"value",o))}removeValueChangeListener(){this._destroyValueChangerListeners.forEach(e=>e())}tryFloatLabel(e){if(e!==void 0){this._fieldElement.floatLabel=e;return}this._fieldElement.floatLabel=this.hasValue||this.hasPlaceholder}tryConnectSlottedLabel(){var l;if(this._inputElements.length!==1||(l=this._inputElements[0].labels)!=null&&l.length)return;let e=this._inputElements[0],o=this._labelSlotElement.assignedElements({flatten:!0}),a=o.find(h=>h.matches(E1.selectors.FORGE_LABEL));if(a){a.forElement=this._component,a.clickTarget=e;return}let s=o.find(h=>h.tagName===E1.tagNames.LABEL);if(!s||s.control)return;let r=e.id||`forge-input-${V2()}`;e.id=r,s.htmlFor=r}connectClearButton(e){this._clearButtonSlotElement.addEventListener("click",e)}disconnectClearButton(e){this._clearButtonSlotElement.removeEventListener("click",e)}toggleClearButtonVisibility(e){e?this._fieldElement.append(this._clearButtonSlotElement):this._clearButtonSlotElement.remove()}clearInput(){this._inputElements.length&&(this._inputElements.forEach(e=>{e.value="",e.dispatchEvent(new Event("input"))}),this._inputElements[0].focus())}getAllSlotElements(){var e,o;return Array.from((o=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll("slot"))!=null?o:[])}};var ri=class extends ya{constructor(e){super(e);this._adapter=e;this._showClear=!1;this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onInputChange.bind(this);this._clearButtonClickListener=e=>this._onClearButtonClick(e)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._initializeSlots()}destroy(){this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeValueChangeListener()}get popoverTargetElement(){return this._adapter.popoverTargetElement}_initializeSlots(){this._adapter.getAllSlotElements().forEach(e=>this._handleSlotChange(e.name))}_onSlotChange(e){let o=e.target;this._handleSlotChange(o.name)}_handleSlotChange(e){switch(e){case"label":this._adapter.tryConnectSlottedLabel();break;case"":this._adapter.handleDefaultSlotChange(this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,o){switch(e){case"disabled":this.disabled=o!==null;break;case"placeholder":this._tryFloatLabel();break}}_onClearButtonClick(e){let o=new CustomEvent(E1.events.CLEAR,{bubbles:!0,cancelable:!0,composed:!0});this._adapter.dispatchHostEvent(o),o.defaultPrevented||this._adapter.clearInput()}_onInputChange(e){let o;Pl(e,InputEvent.name)&&e.target.type==="number"&&(e.data!=null||e.target.validity.badInput)&&(o=!0),this._syncValueChange({floatLabel:o})}_onValueChange(){this._syncValueChange()}_syncValueChange({floatLabel:e=void 0}={}){this._tryFloatLabel(e),this._toggleClearButtonVisibility()}_toggleClearButtonVisibility(){this._adapter.toggleClearButtonVisibility(this._showClear&&this._hasValue&&!this.disabled)}get showClear(){return this._showClear}set showClear(e){this._showClear!==e&&(this._showClear=e,this._adapter.toggleHostAttribute(E1.attributes.SHOW_CLEAR,e),e?this._adapter.connectClearButton(this._clearButtonClickListener):this._adapter.disconnectClearButton(this._clearButtonClickListener),this._toggleClearButtonVisibility())}get disabled(){return super.disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._adapter.toggleHostAttribute(L.attributes.DISABLED,e),this._adapter.setFieldProperty("disabled",e),this._adapter.disableInput(e),this._toggleClearButtonVisibility())}get labelPosition(){return super.labelPosition}set labelPosition(e){this._labelPosition!==e&&(this._labelPosition=e,this._adapter.toggleHostAttribute(L.attributes.LABEL_POSITION,!0,e),this._adapter.setFieldProperty("labelPosition",e),this._tryFloatLabel())}};var au='<template><forge-field id="field"><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><slot></slot><slot slot="end" name="end"></slot><slot slot="end" name="clear-button"><forge-icon-button tabindex="-1" dense><forge-icon name="clear"></forge-icon></forge-icon-button><forge-tooltip type="label"><slot name="clear-button-tooltip">Clear</slot></forge-tooltip></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',nu=":host{display:block}:host([hidden]){display:none}forge-field{display:contents}",x0=class extends z2{static get observedAttributes(){return[...Object.values(Y.observedAttributes),...Object.values(E1.observedAttributes)]}constructor(){super(),H(this,au,nu),this._core=new ri(new si(this)),X.define(pl)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case E1.attributes.SHOW_CLEAR:this.showClear=p(o);break}}get popoverTargetElement(){return this._core.popoverTargetElement}};i([c()],x0.prototype,"showClear",2),x0=i([y({name:E1.elementName,dependencies:[F1,i1,m1]})],x0);var ao=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(E1.elementName);return this._inputElement=this._buildInputElement(t),t.append(this._inputElement),t}_configure(){var t,e,o,a,s,r;(t=this._config.options)!=null&&t.label&&this._createLabel(this._config.options.label),(e=this._config.options)!=null&&e.startElement&&(this._config.options.startElement.slot="start",this._element.append(this._config.options.startElement)),(o=this._config.options)!=null&&o.leadingElement&&(this._config.options.leadingElement.slot="start",this._element.append(this._config.options.leadingElement)),(a=this._config.options)!=null&&a.endElement&&(this._config.options.endElement.slot="end",this._element.append(this._config.options.endElement)),(s=this._config.options)!=null&&s.trailingElement&&(this._config.options.trailingElement.slot="end",this._element.append(this._config.options.trailingElement)),(r=this._config.options)!=null&&r.accessoryElement&&(this._config.options.accessoryElement.slot="accessory",this._element.append(this._config.options.accessoryElement))}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){var e;if(t){this._labelElement?this._labelElement.textContent=t:this._createLabel(t);return}(e=this._labelElement)==null||e.remove(),this._labelElement=void 0}setSupportText(t){var e;if(t){this._supportTextElement||(this._supportTextElement=document.createElement("span"),this._supportTextElement.slot="support-text",this._element.append(this._supportTextElement)),this._supportTextElement.textContent=t;return}(e=this._supportTextElement)==null||e.remove(),this._supportTextElement=void 0}setHelperText(t){this.setSupportText(t)}setSupportTextEnd(t){var e;if(t){this._supportTextEndElement||(this._supportTextEndElement=document.createElement("span"),this._supportTextEndElement.slot="support-text-end",this._element.append(this._supportTextEndElement)),this._supportTextEndElement.textContent=t;return}(e=this._supportTextEndElement)==null||e.remove(),this._supportTextEndElement=void 0}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,this._labelElement.slot="label",(e=this._config.options)!=null&&e.id&&(this._labelElement.htmlFor=this._config.options.id),this._element.append(this._labelElement)}_buildInputElement(t){var o,a,s,r,l;let e=document.createElement("input");return e.type=(a=(o=this._config.options)==null?void 0:o.type)!=null?a:"text",((s=this._config.options)==null?void 0:s.value)!==void 0&&(e.value=this._config.options.value),(r=this._config.options)!=null&&r.id&&(e.id=this._config.options.id),((l=this._config.options)==null?void 0:l.placeholder)!==void 0&&(e.placeholder=this._config.options.placeholder),t.append(e),e}};function l6(){f(x0)}var X5=`${b}chip-field`,c6={ADD_ON_BLUR:"add-on-blur"},su=d({},c6),ru={CONTAINER:".container",INPUT:"input",MEMBER_SLOT:"slot[name=member]",MEMBER:"[slot=member]"},iu={HAS_MEMBERS:"has-members"},lu={MEMBER_ADDED:`${X5}-member-added`,MEMBER_REMOVED:`${X5}-member-removed`},cu=["disabled","placeholder"],hu={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},u2={elementName:X5,observedAttributes:c6,attributes:su,selectors:ru,classes:iu,events:lu,observedInputAttributes:cu,tagNames:hu};var ii=class extends ba{get hasValue(){return!!this._component.querySelector(u2.selectors.MEMBER)||this.hasInputValue}get hasPlaceholder(){var t;return!!((t=this._inputElement)!=null&&t.placeholder)}get hasInputValue(){var t;return!!((t=this._inputElement)!=null&&t.value)}get inputHasFocus(){var t;return!!((t=this._inputElement)!=null&&t.matches(":focus"))}get inputElement(){return this._inputElement}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=w(this._fieldElement,L.selectors.POPOVER_TARGET)),this._popoverTargetElement}constructor(t){super(t),this._fieldElement=w(t,L.elementName),this._containerElement=w(t,u2.selectors.CONTAINER),this._memberSlot=w(t,u2.selectors.MEMBER_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(L.parts).join(", "))}initialize(){this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])")}addRootListener(t,e,o){this._fieldElement.addEventListener(t,e,o)}removeRootListener(t,e,o){this._fieldElement.removeEventListener(t,e,o)}addInputListener(t,e){var o;(o=this._inputElement)==null||o.addEventListener(t,e)}removeInputListener(t,e){var o;(o=this._inputElement)==null||o.removeEventListener(t,e)}clickInput(){var t;(t=this._inputElement)==null||t.click()}tryAddValueChangeListener(t,e){var o;(o=this._destroyValueChangerListener)==null||o.call(this),this._inputElement&&(this._destroyValueChangerListener=r0(t,this._inputElement,"value",e))}removeValueChangeListener(){var t;(t=this._destroyValueChangerListener)==null||t.call(this)}focusInput(){var t;(t=this._inputElement)==null||t.focus()}getSlottedMemberElements(){return this._memberSlot.assignedElements()}click(){this.focusInput()}applyLabel(t){this._inputElement&&G(this._inputElement,!!t,"aria-label",t!=null?t:"")}tryFloatLabel(t){if(t!==void 0){this._component.floatLabel=t;return}this._component.floatLabel=this.hasValue||this.hasPlaceholder}handleDefaultSlotChange(t,e){var a,s;(a=this._inputMutationObserver)==null||a.disconnect();let o=t.assignedElements();this._inputElement=o.find(r=>r.matches(u2.selectors.INPUT)),this._inputElement&&(this._component.disabled&&(this._inputElement.disabled=!0),this._inputMutationObserver=new MutationObserver(r=>{r.forEach(l=>{if(l.attributeName){let v=l.target.getAttribute(l.attributeName),m=l.attributeName;e(m,v)}})}),(s=this._inputMutationObserver)==null||s.observe(this._inputElement,{attributes:!0,attributeFilter:[...u2.observedInputAttributes]}),Object.values(u2.observedInputAttributes).forEach(r=>{let l=r;this._inputElement&&e(l,this._inputElement.getAttribute(l))}))}tryConnectSlottedLabel(t){if(!this._inputElement)return;let e=t.assignedElements({flatten:!0}),o=e.find(r=>r.matches(a2.elementName));if(o){o.forElement=this._component,o.clickTarget=this._inputElement;return}let a=e.find(r=>r.tagName===u2.tagNames.LABEL);if(!a||a.control)return;let s=this._inputElement.id||`forge-input-${V2()}`;this._inputElement.id=s,a.htmlFor=s}toggleContainerClass(t,e){this._containerElement.classList.toggle(t,e)}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t)}};var li=class extends ya{constructor(e){super(e);this._addOnBlur=!1;this._mouseDownListener=this._onMouseDown.bind(this);this._clickListener=this._onClick.bind(this);this._rootKeyDownListener=this._onRootKeyDown.bind(this);this._inputKeyDownListener=this._onKeyDown.bind(this);this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._blurListener=this._onBlur.bind(this)}initialize(){this._adapter.initialize(),this._adapter.addRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._rootKeyDownListener),this._adapter.addInputListener("keydown",this._inputKeyDownListener),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._addOnBlur&&this._adapter.addInputListener("blur",this._blurListener)}destroy(){this._adapter.removeRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._rootKeyDownListener),this._adapter.removeInputListener("keydown",this._inputKeyDownListener),this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeValueChangeListener()}_onBlur(e){let o=e.target;this._addOnBlur&&this._addMember(o),o.value=""}_onMouseDown(e){if(this._disabled||this._adapter.inputHasFocus){e.preventDefault(),e.stopPropagation();return}}_onClick(e){this._disabled||e.target!==this._adapter.inputElement&&(this._adapter.focusInput(),this._adapter.clickInput())}_onValueChange(){this._tryFloatLabel()}_onSlotChange(e){let o=e.target;switch(o.name){case"label":this._adapter.tryConnectSlottedLabel(o);break;case"member":this._adapter.toggleContainerClass(u2.classes.HAS_MEMBERS,o.assignedElements().length>0),this._adapter.tryFloatLabel(),this._adapter.getSlottedMemberElements().forEach(a=>a.tabIndex=-1);break;case"":this._adapter.handleDefaultSlotChange(o,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,o){switch(e){case"disabled":this.disabled=o!==null;break;case"placeholder":this._tryFloatLabel();break}}_onRootKeyDown({key:e}){if(!this._adapter.hasInputValue)switch(e){case"ArrowRight":this._focusNextMember();break;case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":this._removeMember();break}}_onKeyDown({target:e,key:o}){let a=e;switch(o){case"Enter":this._addMember(a);break;case"Escape":a.value="";break;case"Tab":this._addOnBlur||(a.value="");break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(!e.length||this._adapter.inputHasFocus))for(let o=0;o<e.length;o++){let a=e.at(o),s=e.at(o+1);if(a&&this._isMemberActive(a))if(s){s.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(e.length){if(this._adapter.inputHasFocus){e[e.length-1].focus();return}for(let o=0;o<e.length;o++){let a=e.at(o-1),s=e.at(o);if(s&&this._isMemberActive(s)&&a){a.focus();break}}}}_isMemberActive(e){return e.matches(":focus-within")}_getActiveMember(){var o;return(o=this._adapter.getSlottedMemberElements().find(a=>this._isMemberActive(a)))!=null?o:null}_addMember(e){let o=e.value.trim();o.length>0&&this._adapter.emitHostEvent(u2.events.MEMBER_ADDED,o),e.value=""}_removeMember(){let e=this._getActiveMember();e||(e=this._adapter.getSlottedMemberElements().at(-1)),e&&(this._focusNextMember(),this._adapter.emitHostEvent(u2.events.MEMBER_REMOVED,e))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){e=!!e,this._addOnBlur!==e&&(this._addOnBlur=e,this._adapter.isConnected&&(this._addOnBlur?this._adapter.addInputListener("blur",this._blurListener):this._adapter.removeInputListener("blur",this._blurListener)),this._adapter.toggleHostAttribute(u2.attributes.ADD_ON_BLUR,this._addOnBlur))}get popoverTargetElement(){return this._adapter.popoverTargetElement}get disabled(){return super.disabled}set disabled(e){this.disabled!==e&&(super.disabled=e,this._adapter.setDisabled(e))}};var vu=`${b}chip-set`,h6={VERTICAL:"vertical",TYPE:"type",DENSE:"dense",DISABLED:"disabled",INVALID:"invalid",THEME:"theme"},pu=d({},h6),mu={ROOT:".forge-chip-set"},nt={elementName:vu,observedAttributes:h6,attributes:pu,selectors:mu};var ci=`${b}chip`,v6={TYPE:"type",VALUE:"value",SELECTED:"selected",INVALID:"invalid",DISABLED:"disabled",DENSE:"dense",THEME:"theme",HREF:"href",TARGET:"target",DOWNLOAD:"download",REL:"rel"},du=d({},v6),gu={ROOT:".forge-chip",TRIGGER:"#trigger"},wu={DELETE:`${ci}-delete`,SELECT:`${ci}-select`,NAVIGATE:`${ci}-navigate`},uu={TYPE:"action",THEME:"primary"},g1={elementName:ci,observedAttributes:v6,attributes:du,selectors:gu,events:wu,defaults:uu};var _u='<div class="checkmark" aria-hidden="true"><svg viewBox="-2 -3 30 30"><path fill="none" stroke="black" d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></div>',hi=class extends I{constructor(e){super(e);this._component=e;this._rootElement=w(this._component,g1.selectors.ROOT),this._triggerElement=w(this._component,g1.selectors.TRIGGER),this._startSlotElement=w(this._component,"slot[name=start]"),this._focusIndicatorElement=w(this._component,w1.elementName),this._stateLayerElement=w(this._component,I1.elementName)}get removeButtonElement(){return this._removeButtonElement}get isAnchor(){return this._triggerElement.localName==="a"}clickTrigger(){this._triggerElement.click()}addRootListener(e,o){this._rootElement.addEventListener(e,o)}removeRootListener(e,o){this._rootElement.removeEventListener(e,o)}setAnchor(e){if(e){if(this._triggerElement.localName==="button"){let o=this._createAnchorElement();this._triggerElement=Qo(this._triggerElement,o)}}else if(this._triggerElement.localName==="a"){let o=this._createButtonElement();this._triggerElement=Qo(this._triggerElement,o)}this._stateLayerElement.targetElement!==this._triggerElement&&(this._stateLayerElement.targetElement=this._triggerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)}setAnchorProperty(e,o){this._triggerElement.localName==="a"&&this._triggerElement instanceof HTMLAnchorElement&&(this._triggerElement[e]=o)}setCheckmarkVisibility(e){e?(this._checkmarkElement||(this._checkmarkElement=D3(_u)),this._rootElement.insertBefore(this._checkmarkElement,this._rootElement.firstChild)):this._checkmarkElement&&this._checkmarkElement.isConnected&&this._checkmarkElement.remove()}setDisabled(e){if(this._triggerElement instanceof HTMLAnchorElement){this._focusIndicatorElement.isConnected||this._rootElement.append(this._focusIndicatorElement),this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement);return}this._removeButtonElement&&(this._removeButtonElement.disabled=e),this._triggerElement.disabled=e,this._triggerElement.tabIndex=e?-1:0,e?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}setSelected(e){this._triggerElement instanceof HTMLAnchorElement||G(this._triggerElement,e,"aria-pressed",String(e))}toggleFieldVariant(e){e?(this._stateLayerElement.isConnected||this._rootElement.append(this._stateLayerElement),this._focusIndicatorElement.targetElement!==this._triggerElement&&(this._focusIndicatorElement.targetElement=this._triggerElement)):this._stateLayerElement.remove()}setDeleteButtonVisibility(e){var o;e?(this._removeButtonElement||(this._removeButtonElement=this._createRemoveButton()),this._rootElement.appendChild(this._removeButtonElement)):(o=this._removeButtonElement)==null||o.remove()}setStartSlotVisibility(e){this._startSlotElement.style.display=e?"":"none"}getChipSetState(){let e=null,o=Q4(this._component,a=>a&&a.nodeName===nt.elementName.toUpperCase());return o&&(e={type:o.type,disabled:o.disabled,dense:o.dense}),e}focusTrigger(e){this._triggerElement.focus(d({preventScroll:!0},e))}tryFocusRemoveButton(){this._removeButtonElement?this._removeButtonElement.focus({preventScroll:!0,focusVisible:!0}):this.focusTrigger()}clickRemoveButton(){var e;(e=this._removeButtonElement)==null||e.click()}animateStateLayer(){this._stateLayerElement.playAnimation()}_createRemoveButton(){let e=document.createElement("forge-icon-button");e.density="small",e.id="remove-button",e.classList.add("remove"),e.tabIndex=-1,e.setAttribute("aria-label",`Remove ${this._component.innerText}`),e.setAttribute("part","remove-button");let o=document.createElement("forge-icon");return o.name="close",e.appendChild(o),e}_createAnchorElement(){let e=document.createElement("a");return e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.href&&(e.href=this._component.href),this._component.target&&(e.target=this._component.target),this._component.download&&(e.download=this._component.download),this._component.rel&&(e.rel=this._component.rel),e}_createButtonElement(){let e=document.createElement("button");return e.type="button",e.id="trigger",e.setAttribute("part","trigger"),e.classList.add("trigger"),this._component.disabled&&(e.disabled=!0),this._component.selected&&e.setAttribute("aria-pressed","true"),e}};var vi=class{constructor(t){this._adapter=t;this._type=g1.defaults.TYPE;this._selected=!1;this._invalid=!1;this._disabled=!1;this._dense=!1;this._theme=g1.defaults.THEME;this._clickListener=this._onClick.bind(this);this._keydownListener=this._onKeydown.bind(this)}initialize(){this._attachListeners(),this._tryInheritChipSetState()}focus(t){this._adapter.focusTrigger(t)}focusRemoveButton(){var t;(t=this._adapter.removeButtonElement)==null||t.focus()}click(){this._adapter.clickTrigger()}_attachListeners(){this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._keydownListener)}_detachListeners(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._keydownListener)}_tryInheritChipSetState(){let t=this._adapter.getChipSetState();t&&(t.type!==void 0&&(this.type=t.type),t.disabled!==void 0&&(this.disabled=t.disabled),t.dense!==void 0&&(this.dense=t.dense))}_onClick(t){this._isRemoveButton(t)?(t.stopImmediatePropagation(),this._dispatchDeleteEvent()):this._handleSelectInteraction()}_onKeydown(t){switch(t.key){case"Delete":case"Backspace":this._type==="input"&&(t.preventDefault(),this._dispatchDeleteEvent());break;case"Enter":case" ":t.preventDefault(),this._isRemoveButton(t)?(t.stopImmediatePropagation(),t.key==="Enter"&&this._adapter.clickRemoveButton()):(this.click(),this._adapter.isAnchor&&this._adapter.animateStateLayer());break;case"ArrowLeft":case"ArrowRight":this._tryNavigate(t);break;case"Tab":this._type==="input"&&this._isRemoveButton(t)&&this._tryNavigate(t);break}}_tryNavigate(t){var o;if(this._type==="input"){if(!!((o=this._adapter.removeButtonElement)!=null&&o.matches(":focus"))){if(t.stopPropagation(),t.preventDefault(),t.key==="ArrowLeft"){this._adapter.focusTrigger();return}}else if(t.key==="ArrowRight"){this._adapter.tryFocusRemoveButton();return}}let e={direction:t.key==="ArrowRight"||t.key==="Tab"?"next":"previous"};this._adapter.dispatchHostEvent(new CustomEvent(g1.events.NAVIGATE,{bubbles:!0,detail:e}))}_isRemoveButton(t){return!!this._adapter.removeButtonElement&&t.composedPath().includes(this._adapter.removeButtonElement)}_handleSelectInteraction(){let t=this._selected;this._selected=!this._selected;let e=this._dispatchSelectEvent();this._selected=t;let o=["filter","choice","input"].includes(this._type);!e&&o&&(this._selected=!this._selected,this._applySelected())}_dispatchSelectEvent(){let t={selected:this._selected,value:this._value},e=new CustomEvent(g1.events.SELECT,{detail:t,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(e),e.defaultPrevented}_dispatchDeleteEvent(){let t={value:this._value};this._adapter.dispatchHostEvent(new CustomEvent(g1.events.DELETE,{detail:t,bubbles:!0}))}_applyType(){let t=this._type==="input"||this._type==="field";this._adapter.setDeleteButtonVisibility(t),this._adapter.setCheckmarkVisibility(this._type==="filter"),this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleFieldVariant(this._type!=="field"),this._applySelected(),this._adapter.setHostAttribute(g1.attributes.TYPE,this._type)}_applySelected(){this._adapter.setSelected(this._selected),this._type==="filter"&&this._adapter.setStartSlotVisibility(!this._selected),this._adapter.toggleHostAttribute(g1.attributes.SELECTED,this._selected)}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,["action","choice","filter","input","field"].includes(this._type)||(this._type="action"),this._applyType())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t)}get selected(){return this._selected}set selected(t){t=!!t,this._selected!==t&&(this._selected=t,this._applySelected())}get invalid(){return this._invalid}set invalid(t){t=!!t,this._invalid!==t&&(this._invalid=t,this._adapter.toggleHostAttribute(g1.attributes.INVALID,t))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.isConnected&&(this._disabled?this._detachListeners():this._attachListeners()),this._adapter.toggleHostAttribute(g1.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){t=!!t,this._dense!==t&&(this._dense=t,this._adapter.toggleHostAttribute(g1.attributes.DENSE,this._dense))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:g1.defaults.THEME,this._adapter.setHostAttribute(g1.attributes.THEME,this._theme))}get href(){return this._href}set href(t){var e;if(this._href!==t){this._href=t;let o=!!((e=this._href)!=null&&e.trim());this._adapter.setAnchor(o),o&&this._disabled&&this._adapter.setDisabled(!1),this._adapter.toggleHostAttribute(g1.attributes.HREF,o,this._href)}}get target(){return this._target}set target(t){var e;this._target!==t&&(this._target=t,this._adapter.setAnchorProperty("target",t),this._adapter.toggleHostAttribute(g1.attributes.TARGET,!!((e=this._target)!=null&&e.trim()),this._target))}get download(){return this._download}set download(t){var e;this._download!==t&&(this._download=t,this._adapter.setAnchorProperty("download",t),this._adapter.toggleHostAttribute(g1.attributes.DOWNLOAD,!!((e=this._download)!=null&&e.trim()),this._download))}get rel(){return this._rel}set rel(t){var e;this._rel!==t&&(this._rel=t,this._adapter.setAnchorProperty("rel",t),this._adapter.toggleHostAttribute(g1.attributes.REL,!!((e=this._rel)!=null&&e.trim()),this._rel))}};var xu='<template><div class="forge-chip" part="root"><button type="button" id="trigger" class="trigger" part="trigger"><slot name="start"><slot name="leading"></slot></slot><slot></slot><slot name="end"><slot name="trailing"></slot></slot></button><forge-focus-indicator target="trigger" part="focus-indicator"></forge-focus-indicator><forge-state-layer target="trigger" exportparts="surface:state-layer"></forge-state-layer></div></template>',fu=':host{display:inline-flex}:host([hidden]){display:none}.forge-chip{--_chip-background:var(--forge-chip-background, transparent);--_chip-color:var(--forge-chip-color, var(--forge-theme-primary, #3f51b5));--_chip-shape:var(--forge-chip-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_chip-spacing:var(--forge-chip-spacing, var(--forge-spacing-xsmall, 8px));--_chip-height:var(--forge-chip-height, 32px);--_chip-padding-inline:var(--forge-chip-padding-inline, var(--forge-spacing-small, 12px));--_chip-padding-block:var(--forge-chip-padding-block, 0);--_chip-cursor:var(--forge-chip-cursor, pointer);--_chip-icon-font-size:var(--forge-chip-icon-font-size, 1.5rem);--_chip-focus-indicator-color:var(--forge-chip-focus-indicator-color, var(--_chip-color));--_chip-disabled-opacity:var(--forge-chip-disabled-opacity, 0.38);--_chip-disabled-cursor:var(--forge-chip-disabled-cursor, not-allowed);--_chip-dense-height:var(--forge-chip-dense-height, 24px);--_chip-dense-padding-inline:var(--forge-chip-dense-padding-inline, var(--forge-spacing-xsmall, 8px));--_chip-dense-spacing:var(--forge-chip-dense-spacing, var(--forge-spacing-xxsmall, 4px));--_chip-dense-font-size:var(--forge-chip-dense-font-size, 0.75rem);--_chip-dense-font-weight:var(--forge-chip-dense-font-weight, normal);--_chip-dense-focus-indicator-offset:var(--forge-chip-dense-focus-indicator-offset, var(--forge-spacing-xxxsmall, 2px));--_chip-dense-icon-font-size:var(--forge-chip-dense-icon-font-size, 1.25rem);--_chip-remove-button-spacing:var(--forge-chip-remove-button-spacing, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-xxsmall, 4px));--_chip-remove-button-height-dense:var(--forge-chip-remove-button-height-dense, 18px);--_chip-remove-button-icon-size-dense:var(--forge-chip-remove-button-icon-size-dense, 16px);--_chip-remove-button-spacing-dense:var(--forge-chip-remove-button-spacing-dense, 0 var(--forge-spacing-xxxsmall, 2px));--_chip-selected-background:var(--forge-chip-selected-background, var(--forge-theme-primary, #3f51b5));--_chip-selected-color:var(--forge-chip-selected-color, var(--forge-theme-on-primary, #ffffff));--_chip-invalid-color:var(--forge-chip-invalid-color, var(--forge-theme-error, #b00020));--_chip-invalid-selected-background:var(--forge-chip-invalid-selected-background, var(--forge-theme-error, #b00020));--_chip-invalid-selected-color:var(--forge-chip-invalid-selected-color, var(--forge-theme-on-error, #ffffff));--_chip-border-width:var(--forge-chip-border-width, var(--forge-border-thin, 1px));--_chip-border-style:var(--forge-chip-border-style, solid);--_chip-border-color:var(--forge-chip-border-color, var(--_chip-color));--_chip-field-background:var(--forge-chip-field-background, var(--forge-theme-surface-container-low, #ebebeb));--_chip-field-color:var(--forge-chip-field-color, var(--forge-theme-on-surface-container-low, #000000));--_chip-field-shape:var(--forge-chip-field-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_chip-field-border-color:var(--forge-chip-field-border-color, transparent);--_chip-field-cursor:var(--forge-chip-field-cursor, default);--_chip-checkmark-size:var(--forge-chip-checkmark-size, 1.25em);--_chip-checkmark-color:var(--forge-chip-checkmark-color, var(--_chip-color));--_chip-checkmark-spacing:var(--forge-chip-checkmark-spacing, var(--forge-spacing-xsmall, 8px));--_chip-avatar-size:var(--forge-chip-avatar-size, 24px);--_chip-avatar-size-dense:var(--forge-chip-avatar-size-dense, 18px);--_chip-avatar-font-size:var(--forge-chip-avatar-font-size, 0.75rem);--_chip-avatar-font-size-dense:var(--forge-chip-avatar-font-size-dense, 0.5rem);--_chip-avatar-spacing:var(--forge-chip-avatar-spacing, calc(var(--forge-spacing-xsmall, 8px) * -1));--_chip-avatar-spacing-dense:var(--forge-chip-avatar-spacing-dense, calc(var(--forge-spacing-xxsmall, 4px) * -1));--_chip-transition-duration:var(--forge-chip-transition-duration, var(--forge-animation-duration-short3, 150ms));--_chip-transition-easing:var(--forge-chip-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_chip-checkmark-transition-delay:var(--forge-chip-checkmark-transition-delay, 50ms)}.forge-chip{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;height:var(--_chip-height);border-width:var(--_chip-border-width);border-style:var(--_chip-border-style);border-color:var(--_chip-border-color);border-radius:var(--_chip-shape);background:var(--_chip-background);color:var(--_chip-color);transition-property:background-color,color;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}.trigger{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;gap:var(--_chip-spacing);box-sizing:border-box;height:100%;padding-inline:var(--_chip-padding-inline);padding-block:var(--_chip-padding-block);cursor:var(--_chip-cursor);z-index:0;text-decoration:none;border:none;background:inherit;color:inherit;-webkit-tap-highlight-color:transparent;border-radius:var(--_chip-shape);outline:0}.remove{padding-inline:var(--_chip-remove-button-spacing);--forge-icon-button-focus-indicator-color:var(--_chip-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-focus-indicator-color);--forge-focus-indicator-shape:var(--_chip-shape)}forge-state-layer{--forge-state-layer-color:var(--_chip-color)}:host([dense]) .forge-chip{--_chip-height:var(--_chip-dense-height);--_chip-padding-inline:var(--_chip-dense-padding-inline);--_chip-spacing:var(--_chip-dense-spacing)}:host([dense]) .trigger{--forge-typography-button-font-size:var(--_chip-dense-font-size);--forge-typography-button-font-weight:var(--_chip-dense-font-weight)}:host([dense]) .remove{--_chip-remove-button-spacing:var(--_chip-remove-button-spacing-dense);--forge-icon-button-density-small-size:var(--_chip-remove-button-height-dense);--forge-icon-button-density-small-icon-size:var(--_chip-remove-button-icon-size-dense)}:host([dense]) forge-focus-indicator{--forge-focus-indicator-outward-offset:var(--_chip-dense-focus-indicator-offset)}:host([dense]) ::slotted(forge-avatar){--_chip-avatar-spacing:var(--_chip-avatar-spacing-dense);--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size-dense);--forge-avatar-size:var(--_chip-avatar-size-dense)}:host([dense]) ::slotted(:is([slot=start],[slot=leading],[slot=end],[slot=trailing])){--_chip-icon-font-size:var(--_chip-dense-icon-font-size)}:host(:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-selected-background);--_chip-color:var(--_chip-selected-color)}:host(:is([type=filter],[type=choice],[type=input])[selected]) forge-focus-indicator{--forge-focus-indicator-color:var(--_chip-background)}:host([invalid]) .forge-chip{--_chip-color:var(--_chip-invalid-color)}:host([invalid]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--_chip-invalid-selected-background);--_chip-color:var(--_chip-invalid-selected-color)}:host([disabled]:not([href])) .forge-chip{opacity:var(--_chip-disabled-opacity)}:host([disabled]:not([href])) .trigger{cursor:var(--_chip-disabled-cursor)}::slotted(:not(forge-avatar):is([slot=start],[slot=leading],[slot=end],[slot=trailing])){font-size:var(--_chip-icon-font-size)}::slotted(forge-avatar:is([slot=start],[slot=leading])){margin-inline-start:var(--_chip-avatar-spacing)}::slotted(forge-avatar:is([slot=end],[slot=trailing])){margin-inline-end:var(--_chip-avatar-spacing)}::slotted(forge-avatar){--forge-typography-subheading2-font-size:var(--_chip-avatar-font-size);--forge-avatar-size:var(--_chip-avatar-size)}:host([type=filter]) .checkmark{height:var(--_chip-checkmark-size)}:host([type=filter]) .checkmark svg{width:0;height:var(--_chip-checkmark-size);transition-property:width;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing)}:host([type=filter]) .checkmark svg path{stroke:var(--_chip-checkmark-color);transition-property:stroke-dashoffset;transition-duration:var(--_chip-transition-duration);transition-timing-function:var(--_chip-transition-easing);stroke-width:2px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}:host([type=filter][selected]) .checkmark{padding-inline-start:var(--_chip-checkmark-spacing)}:host([type=filter][selected]) .checkmark svg{width:var(--_chip-checkmark-size)}:host([type=filter][selected]) .checkmark svg path{transition-delay:var(--_chip-checkmark-transition-delay);stroke-dashoffset:0}:host([type=input]) .trigger{padding-inline:var(--_chip-padding-inline) 0}:host([type=field]) .forge-chip{--_chip-background:var(--_chip-field-background);--_chip-color:var(--_chip-field-color);--_chip-border-color:var(--_chip-field-border-color);--_chip-shape:var(--_chip-field-shape);--_chip-cursor:var(--_chip-field-cursor)}:host([theme=secondary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_chip-border-color:var(--forge-chip-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary, #ffc107));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-secondary-container-low, #fff8e1));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-secondary-container-low, #8a6804))}:host([theme=tertiary]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-tertiary, #3d5afe))}:host([theme=tertiary]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary, #3d5afe));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-tertiary-container-low, #213189))}:host([theme=success]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success, #2e7d32));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-success-container-low, #e6efe6));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-success-container-low, #19441b))}:host([theme=warning]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning, #d14900));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-warning-container-low, #f9e9e0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-warning-container-low, #712700))}:host([theme=error]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error, #b00020));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-error-container-low, #f6e0e4));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-error-container-low, #5f0011))}:host([theme=info]) .forge-chip{--_chip-color:var(--forge-chip-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([type=filter],[type=choice],[type=input])[selected]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info, #1565c0));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][type=field]) .forge-chip{--_chip-background:var(--forge-chip-background, var(--forge-theme-info-container-low, #e3edf7));--_chip-color:var(--forge-chip-color, var(--forge-theme-on-info-container-low, #0b3768))}',H2=class extends M{static get observedAttributes(){return Object.values(g1.observedAttributes)}constructor(){super(),X.define(jo),H(this,xu,fu),this._core=new vi(new hi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case g1.attributes.TYPE:this.type=o;break;case g1.attributes.VALUE:this.value=o;break;case g1.attributes.SELECTED:this.selected=p(o);break;case g1.attributes.INVALID:this.invalid=p(o);break;case g1.attributes.DISABLED:this.disabled=p(o);break;case g1.attributes.DENSE:this.dense=p(o);break;case g1.attributes.THEME:this.theme=o;break;case g1.attributes.HREF:this.href=o;break;case g1.attributes.TARGET:this.target=o;break;case g1.attributes.DOWNLOAD:this.download=o;break;case g1.attributes.REL:this.rel=o;break}}focus(t){this._core.focus(t)}focusRemoveButton(){this._core.focusRemoveButton()}click(){this._core.click()}};i([c()],H2.prototype,"type",2),i([c()],H2.prototype,"value",2),i([c()],H2.prototype,"selected",2),i([c()],H2.prototype,"invalid",2),i([c()],H2.prototype,"disabled",2),i([c()],H2.prototype,"dense",2),i([c()],H2.prototype,"theme",2),i([c()],H2.prototype,"href",2),i([c()],H2.prototype,"target",2),i([c()],H2.prototype,"download",2),i([c()],H2.prototype,"rel",2),H2=i([y({name:g1.elementName,dependencies:[J,r1,i1,j]})],H2);function p6(){f(H2)}var bu='<template><div class="forge-chip-set" part="root"><slot></slot></div></template>',yu=":host{display:inline-block}:host([hidden]){display:none}.forge-chip-set{--_chip-set-spacing:var(--forge-chip-set-spacing, var(--forge-spacing-xsmall, 8px))}.forge-chip-set{display:flex;flex-wrap:wrap;gap:var(--_chip-set-spacing)}:host([vertical]) .forge-chip-set{flex-direction:column}",Ma=class extends M{constructor(){super();this._vertical=!1;this._type=g1.defaults.TYPE;this._dense=!1;this._disabled=!1;this._invalid=!1;this._theme=g1.defaults.THEME;H(this,bu,yu)}static get observedAttributes(){return Object.values(nt.observedAttributes)}connectedCallback(){this.addEventListener(g1.events.NAVIGATE,this._onChipNavigate.bind(this))}attributeChangedCallback(e,o,a){switch(e){case nt.observedAttributes.VERTICAL:this.vertical=p(a);break;case nt.observedAttributes.TYPE:this.type=a;break;case nt.observedAttributes.DENSE:this.dense=p(a);break;case nt.observedAttributes.DISABLED:this.disabled=p(a);break;case nt.observedAttributes.INVALID:this.invalid=p(a);break;case nt.observedAttributes.THEME:this.theme=a;break}}_onChipNavigate(e){let o=this._findChipDescendants().filter(l=>!l.disabled),a=o.findIndex(l=>l===e.target),s=e.detail.direction==="previous"?a-1:a+1;s>o.length-1&&(s=0);let r=o.at(s);(r==null?void 0:r.type)==="input"&&e.detail.direction==="previous"?r.focusRemoveButton():r==null||r.focus()}_findChipDescendants(){return Array.from(this.querySelectorAll(g1.elementName))}_syncChipsProperty(e,o){this._findChipDescendants().forEach(s=>s[e]=o)}get vertical(){return this._vertical}set vertical(e){e=!!e,this._vertical!==e&&(this._vertical=e,this.toggleAttribute(nt.attributes.VERTICAL,this._vertical))}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this._syncChipsProperty("type",this._type),this.setAttribute(nt.attributes.TYPE,this._type))}get dense(){return this._dense}set dense(e){e=!!e,this._dense!==e&&(this._dense=e,this._syncChipsProperty("dense",this._dense),this.toggleAttribute(nt.attributes.DENSE,this._dense))}get disabled(){return this._disabled}set disabled(e){e=!!e,this._disabled!==e&&(this._disabled=e,this._syncChipsProperty("disabled",this._disabled),this.toggleAttribute(nt.attributes.DISABLED,this._disabled))}get invalid(){return this._invalid}set invalid(e){e=!!e,this._invalid!==e&&(this._invalid=e,this._syncChipsProperty("invalid",this._invalid),this.toggleAttribute(nt.attributes.INVALID,this._invalid))}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this._syncChipsProperty("theme",this._theme),this.setAttribute(nt.attributes.THEME,this._theme))}};Ma=i([y({name:nt.elementName,dependencies:[H2]})],Ma);function m6(){f(Ma)}var Mu='<template><forge-field id="field" multiline><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><div class="container" data-forge-field-input><slot name="member"></slot><slot></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',zu="@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes multiline-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){flex-grow:1;cursor:inherit;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;font-size:var(--_field-font-size);text-overflow:ellipsis;padding-block-start:0;padding-block-end:0;transition:padding-block var(--_field-floating-animation-duration) var(--_field-floating-animation-timing)}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-primary, #3f51b5)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000);--forge-chip-focus-indicator-color:var(--forge-theme-secondary, #ffc107)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-tertiary, #3d5afe)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-success, #2e7d32)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-warning, #d14900)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-error, #b00020)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff);--forge-chip-focus-indicator-color:var(--forge-theme-info, #1565c0)}",No=class extends z2{static get observedAttributes(){return[...Object.values(Y.observedAttributes),...Object.values(u2.observedAttributes)]}constructor(){super(),H(this,Mu,zu),this._core=new li(new ii(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case u2.attributes.ADD_ON_BLUR:this.addOnBlur=p(o);return}}get popoverTargetElement(){return this._core.popoverTargetElement}click(){this._core.click()}};i([c()],No.prototype,"addOnBlur",2),No=i([y({name:u2.elementName,dependencies:[F1,H2]})],No);var d6=class extends o2{constructor(t){super(t)}_build(){var e,o;let t=document.createElement(u2.elementName);return this._inputElement=this._buildInputElement(t),(e=this._config.options)!=null&&e.leadingElement&&(this._config.options.leadingElement.slot="leading",t.appendChild(this._config.options.leadingElement)),(o=this._config.options)!=null&&o.trailingElement&&(this._config.options.trailingElement.slot="trailing",t.appendChild(this._config.options.trailingElement)),t.appendChild(this._inputElement),t}_configure(){var t,e;(t=this._config.options)!=null&&t.helperText&&this.setHelperText(this._config.options.helperText),typeof((e=this._config.options)==null?void 0:e.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}get disabled(){return this._inputElement.disabled}set disabled(t){this._inputElement.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(t){this._inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._inputElement.addEventListener("blur",e=>t(e))}setLabel(t){t?this._labelElement?this._labelElement.textContent=t:this._createLabel(t):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(t){this._element.floatLabel=t}_createLabel(t){var e;this._labelElement=document.createElement("label"),this._labelElement.textContent=t,(e=this._config.options)!=null&&e.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(t){var o,a,s,r,l;let e=document.createElement("input");return e.type=((o=this._config.options)==null?void 0:o.type)||"text",((a=this._config.options)==null?void 0:a.value)!==void 0&&(e.value=this._config.options.value),(s=this._config.options)!=null&&s.id&&(e.id=this._config.options.id),typeof((r=this._config.options)==null?void 0:r.placeholder)=="string"&&(e.placeholder=(l=this._config.options)==null?void 0:l.placeholder),t.appendChild(e),e}};function g6(){f(No)}var pi=`${b}autocomplete`,Hu={MODE:"mode",MULTIPLE:"multiple",DEBOUNCE:"debounce",FILTER_ON_FOCUS:"filter-on-focus",FILTER_FOCUS_FIRST:"filter-focus-first",ALLOW_UNMATCHED:"allow-unmatched",POPUP_TARGET:"popup-target",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",SYNC_POPUP_WIDTH:"sync-popup-width",OPEN:"open",MATCH_KEY:"match-key",FILTER_TEXT:"filter-text",DROPDOWN_ICON_OPEN:"data-forge-dropdown-icon-open"},Iu={INPUT:"input",DROPDOWN_ICON:"[data-forge-dropdown-icon],[data-forge-dropdown-icon],[forge-dropdown-icon],.forge-dropdown-icon",CLEAR_BUTTON:"[data-forge-autocomplete-clear],[forge-autocomplete-clear]"},Lu={DEFAULT_DEBOUNCE_TIME:sl,NUM_SKELETON_ITEMS:3},Vu={CHANGE:`${pi}-change`,SELECT:`${pi}-select`,SCROLLED_BOTTOM:`${pi}-scrolled-bottom`},c1={elementName:pi,attributes:Hu,selectors:Iu,numbers:Lu,events:Vu},w6=(e=>(e.Default="default",e.Stateless="stateless",e))(w6||{});var mi=class extends I{constructor(t){super(t),this.setInputElement()}get inputElement(){return this._inputElement}setInputElement(){let t=Re(this._component,c1.selectors.INPUT,!1);return t.length&&(this._inputElement=t[0]),this._inputElement}setInputAttribute(t,e){this._inputElement.setAttribute(t,e)}addInputListener(t,e){this._inputElement.addEventListener(t,e)}removeInputListener(t,e){this._inputElement.removeEventListener(t,e)}initializeInputAccessibility(t){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","polite"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-autocomplete","list"),Ge(),Yt(this._inputElement)}isWrappingChipField(){return!!this._component.querySelector(u2.elementName)}show(t,e){this._targetElement=this._getTargetElement(e),this._targetElement&&(this._listDropdown=new qe(this._targetElement,t),this._listDropdown.open(),this._inputElement.setAttribute("aria-expanded","true"),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._tryToggleDropdownIconRotation(!0))}async hide(t,{destroy:e=!1}={}){var a,s;if(this.setBusyVisibility(!1),this._tryToggleDropdownIconRotation(!1),(a=this._inputElement)==null||a.removeAttribute("aria-activedescendant"),(s=this._inputElement)==null||s.setAttribute("aria-expanded","false"),Yt(this._inputElement),!this._listDropdown)return;let{anchorElement:o}=this._listDropdown.dropdownElement;o&&o instanceof HTMLElement&&(o==null||o.removeEventListener(Q.events.TOGGLE,t)),e?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0}setBusyVisibility(t){var e;(e=this._listDropdown)==null||e.setBusyVisibility(t)}setDismissListener(t){var e,o;(o=(e=this._listDropdown)==null?void 0:e.dropdownElement)==null||o.addEventListener(Q.events.TOGGLE,t)}focus(){window.requestAnimationFrame(()=>this._inputElement.focus())}setOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}appendOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setSelectedText(t){this._inputElement.value=t}getInputValue(){return this._inputElement.value}setInputValue(t){this._inputElement.value=t}selectInputValue(){window.requestAnimationFrame(()=>this._inputElement.select())}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}hasFocus(){let t=Ue(this._component.ownerDocument);return t===this._inputElement||this.isFocusWithinPopup(t)}hasInputElement(){return!!this._inputElement}setDropdownIconListener(t,e){window.requestAnimationFrame(()=>{let o=this._component.querySelector(E1.elementName);if(o&&(o.popoverIcon||o.hasAttribute(L.attributes.POPOVER_ICON))){let s=t==="mousedown"?L.events.POPOVER_ICON_MOUSEDOWN:L.events.POPOVER_ICON_CLICK;this._component.addEventListener(s,e)}let a=this._component.querySelector(c1.selectors.DROPDOWN_ICON);a==null||a.addEventListener(t,e)})}removeDropdownIconListener(t,e){this._component.removeEventListener(L.events.POPOVER_ICON_CLICK,e);let o=this._component.querySelector(c1.selectors.DROPDOWN_ICON);o==null||o.removeEventListener(t,e)}setClearButtonListener(t,e){window.requestAnimationFrame(()=>{let o=this._component.querySelector(E1.elementName);o&&(o.showClear||o.hasAttribute(E1.attributes.SHOW_CLEAR))&&this._component.addEventListener(E1.events.CLEAR,e);let a=this._component.querySelector(c1.selectors.CLEAR_BUTTON);a&&a.addEventListener(t,e)})}removeClearButtonListener(t,e){this._component.removeEventListener(E1.events.CLEAR,e);let o=this._component.querySelector(c1.selectors.CLEAR_BUTTON);o==null||o.removeEventListener(t,e)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}updateActiveDescendant(t){this._targetElement&&G(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._targetElement||(this._targetElement=this._getTargetElement(t)),this._targetElement.getBoundingClientRect().width}getPopupElement(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.dropdownElement)!=null?e:null}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:null}clearActiveOption(){var t;(t=this._listDropdown)==null||t.clearActiveOption()}setSelectedOptions(t){if(this._listDropdown){let e=t.map(o=>o.value);this._listDropdown.setSelectedValues(e)}}queueDropdownPositionUpdate(){this.getPopupElement()&&window.requestAnimationFrame(()=>{let t=this.getPopupElement();t==null||t.position()})}_getTargetElement(t){return t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement()}_getDefaultTargetElement(){let t=this._tryGetFieldLikeChild();return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}_tryToggleDropdownIconRotation(t){let e=this._tryGetFieldLikeChild();e!=null&&e.popoverIcon&&(e.popoverExpanded=t);let o=this._component.querySelector(c1.selectors.DROPDOWN_ICON);o&&(o.style.transition="transform 120ms linear",o.style.transform=t?"rotateZ(180deg)":"")}_tryGetFieldLikeChild(){let t=[E1.elementName,u2.elementName];return this._component.querySelector(`:is(${t.join(",")})`)}};var u6=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(u6||{});function Mn(n,t){let e=(s,r)=>Object.prototype.hasOwnProperty.call(s,r),o=n.some(s=>O(s)&&vt(s)&&e(s,"options")&&(e(s,"text")||e(s,"builder"))),a=n.some(s=>O(s)&&vt(s)&&e(s,"label")&&e(s,"value"));return o&&t===1||a&&t===0}function _6(n,t){return n.find(e=>e.value===t)}function zn(n,t,e=null){return e?!(e in n.value)||!(e in t)?!1:Wt(n.value[e],t[e]):Wt(n.value,t)}var di=class extends J0{constructor(e){super();this._adapter=e;this._isInitialized=!1;this._isDropdownOpen=!1;this._mode="default";this._multiple=!1;this._debounce=c1.numbers.DEFAULT_DEBOUNCE_TIME;this._allowUnmatched=!1;this._filterOnFocus=!0;this._filterFocusFirst=!0;this._options=[];this._filterText="";this._selectedOptions=[];this._values=[];this._pendingFilterPromises=[];this._matchKey=null;this._clickListener=o=>this._onClick(o),this._focusListener=()=>this._onFocus(),this._blurListener=o=>this._onBlur(o),this._keydownListener=o=>this._onKeydown(o),this._dropdownIconClickListener=o=>this._onDropdownIconClick(o),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dropdownIconMouseDownListener=o=>this._onDropdownIconMouseDown(o),this._clearButtonListener=o=>this._onClear(o),this._dismissListener=()=>this._onDismiss(),this._activeChangeListener=o=>this._adapter.updateActiveDescendant(o),this._targetWidthCallback=()=>this._adapter.getTargetElementWidth(this._popupTarget),this._identifier=V2()}async initialize(){if(!this._adapter.hasInputElement()&&!this._adapter.setInputElement())throw new Error("An input element is required as a child of the autocomplete component.");if(this._setInputListener(),this._setFilterCallback(),this._attachListeners(),this._initializeAccessibility(),this._values.length){if(!this._selectedOptions.length){try{await this._executeFilter()}catch(e){console.error(e)}this._updateSelectedOptions(this._values)}this._adapter.setSelectedText(this._getSelectedText())}this._isInitialized=!0}destroy(){this._isInitialized&&(this._detachListeners(),this._isInitialized=!1),this._closeDropdown({destroy:!0})}async forceFilter({preserveValue:e}){this._options=[],await this._executeFilter(!0,!0),e&&this._options.push(...this._selectedOptions),this._applyValue(this._values)}_attachListeners(){this._adapter.addInputListener("click",this._clickListener),this._adapter.addInputListener("focus",this._focusListener),this._adapter.addInputListener("blur",this._blurListener),this._adapter.addInputListener("input",this._inputListener),this._adapter.addInputListener("keydown",this._keydownListener),this._adapter.setDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.setDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.setClearButtonListener("click",this._clearButtonListener)}_detachListeners(){this._adapter.removeInputListener("click",this._clickListener),this._adapter.removeInputListener("focus",this._focusListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("keydown",this._keydownListener),this._adapter.removeDropdownIconListener("click",this._dropdownIconClickListener),this._adapter.removeDropdownIconListener("mousedown",this._dropdownIconMouseDownListener),this._adapter.removeClearButtonListener("click",this._clearButtonListener)}_setInputListener(){this._inputListener=e=>this._onInput(e)}_setFilterCallback(){this._filterFn=O(this._debounce)&&this._debounce>0?Ne(this._debounceFilter,this._debounce,!1):this._debounceFilter}_initializeAccessibility(){this._adapter.initializeInputAccessibility(this._identifier)}get _flatOptions(){return Mn(this._options,1)?this._options.reduce((e,o)=>e.concat(o.options),[]):this._options}_onClick(e){!this._isDropdownOpen&&this._filterOnFocus?this._showDropdown():this._closeDropdown()}_onDropdownIconMouseDown(e){e.preventDefault()}_onDropdownIconClick(e){this._isDropdownOpen?this._closeDropdown():(this._adapter.focus(),window.requestAnimationFrame(()=>this._showDropdown()))}_onClear(e){this._filterText="",this._clearValue(),this._adapter.setSelectedText(this._getSelectedText())}_onDropdownScrollEnd(){this._adapter.emitHostEvent(c1.events.SCROLLED_BOTTOM)}_onFocus(){!this._isDropdownOpen&&this._adapter.getInputValue()&&!Q2.isMobile&&this._adapter.selectInputValue()}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._applyBlur()}_applyBlur(){this._isDropdownOpen&&this._closeDropdown(),this._mode!=="stateless"&&(this._selectedOptions.length?this._adapter.setSelectedText(this._getSelectedText()):this._allowUnmatched||(this._filterText="",this._adapter.setSelectedText("")))}_onInput(e){this._selectedOptions.length&&!this._multiple&&(!this._adapter.getInputValue()||this._allowUnmatched)&&!this._adapter.isWrappingChipField()&&(this._selectedOptions=[],this._values=[],this._emitChangeEvent()),this._filterText=this._adapter.getInputValue(),this._filterFn()}async _debounceFilter({checkFocus:e=!0}={}){if(!e&&!this._adapter.hasFocus()){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}let o=this._filterText,a=this._executeFilter();this._pendingFilterPromises.push(a),this._isDropdownOpen?this._adapter.setBusyVisibility(!0):this._showDropdown({filter:!1});try{await a}catch(s){this._pendingFilterPromises=[],this._isDropdownOpen&&this._closeDropdown();return}if(o===this._filterText)this._pendingFilterPromises=[],this._onFilterComplete();else{let s=this._pendingFilterPromises.indexOf(a);s!==-1&&this._pendingFilterPromises.splice(s,1)}}_onKeydown(e){switch(e.key){case"Tab":this._isDropdownOpen&&!this._multiple&&this._selectActiveOption(!1);break;case"Esc":case"Escape":this._isDropdownOpen&&(e.preventDefault(),e.stopPropagation(),this._closeDropdown());break;case"Down":case"ArrowDown":e.preventDefault(),this._isDropdownOpen?this._adapter.propagateKey(e.key):this._showDropdown({activateFirst:!0,activateSelected:!0});break;case"Up":case"ArrowUp":e.preventDefault(),this._isDropdownOpen&&this._adapter.propagateKey(e.key);break;case"Enter":case"Home":case"End":this._isDropdownOpen&&(e.key==="Enter"&&e.stopPropagation(),e.preventDefault(),this._adapter.propagateKey(e.key));break;case"Backspace":case"Delete":{let o=e.target,a=this._adapter.getInputValue(),s=o.value.substring(o.selectionStart,o.selectionEnd)===o.value,r=a.length===1&&o.selectionEnd===1,l=a.length===1&&o.selectionEnd===0,h=!a||s||r||l;!this._adapter.isWrappingChipField()&&h&&!this._multiple&&this._values.length&&this._clearValue();break}}}_executeFilter(e=!0,o=!1){if(!this._filter||typeof this._filter!="function")throw new Error('A filter callback must be provided. Did you set the "filter" property?');let a=this._filter,s=e?this._filterText:"",r=o?this._getValue():null;return new Promise((l,h)=>Promise.resolve(a(s,r)).then(v=>{this._options=v,l(this._options)}).catch(v=>h(`An unexpected error occurred while filtering: ${v}`)))}_onFilterComplete(){if(!this._adapter.hasFocus()){this._isDropdownOpen&&this._closeDropdown();return}if(this._options.length){let e=this._allowUnmatched&&!this._selectedOptions.length;this._dropdownReady({userTriggered:e}),this._filterFocusFirst&&this._filterText&&this._adapter.activateFirstOption()}else this._closeDropdown()}_clearValue(){this._selectedOptions=[],this._values=[],this._isDropdownOpen&&(this._adapter.setSelectedOptions([]),this._adapter.clearActiveOption()),this._emitChangeEvent()}async _showDropdown({filter:e=!0,userTriggered:o=!0,activateFirst:a=!1,activateSelected:s=!1}={}){if(!this._isInitialized||!this._adapter.hasInputElement())return;let r=this._allowUnmatched&&!this._selectedOptions.length;this._isDropdownOpen=!0;let l;if(this._optionBuilder){let v=this._optionBuilder;l=(m,u)=>v(m,this._filterText,u)}let h={options:this._options,referenceElement:this._adapter.inputElement,multiple:this._multiple,selectedValues:[...this._values],id:`forge-autocomplete-${this._identifier}`,asyncStyle:"skeleton",headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,transform:v=>{if(this._filterText){let m=Sl(v,this._filterText);if(m)return m}return v},allowBusy:!0,optionBuilder:l,optionLimit:this._optionLimit,popupClasses:this._popupClasses,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,popupPlacement:this._popoverPlacement,popupOffset:this._popoverOffset,popupFlip:this._popoverFlip,popupShift:this._popoverShift,popupFallbackPlacements:this._popoverFallbackPlacements,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,selectCallback:v=>this._onSelect(v),closeCallback:()=>this._closeDropdown()};if(this._adapter.show(h,this._popupTarget),this._adapter.toggleHostAttribute(c1.attributes.OPEN,this._isDropdownOpen),e){this._options.length&&this._adapter.setBusyVisibility(!0);try{await this._executeFilter(r)}catch(v){console.error(v)}this._updateSelectedOptions(this._values)}this._pendingFilterPromises.length||this._dropdownReady({userTriggered:o,activateFirst:a,activateSelected:s})}_dropdownReady({userTriggered:e=!0,activateFirst:o=!1,activateSelected:a=!1}={}){if(!this._isDropdownOpen||!this._options.length||e&&!this._adapter.hasFocus()){this._closeDropdown();return}this._sortSelectedOptions(),this._adapter.setBusyVisibility(!1),this._adapter.setOptions(this._options),this._adapter.setSelectedOptions(this._selectedOptions),this._adapter.setDismissListener(this._dismissListener),a&&this._selectedOptions.length?this._adapter.activateSelectedOption():o&&this._adapter.activateFirstOption()}_closeDropdown({destroy:e=!1}={}){this._multiple&&(this._filterText=""),this._isDropdownOpen=!1,this._adapter.hide(this._dismissListener,{destroy:e}),this._sortSelectedOptions(),this._adapter.toggleHostAttribute(c1.attributes.OPEN,this._isDropdownOpen)}_sortSelectedOptions(){if(this._multiple&&this._selectedOptions.length&&Mn(this._options,0)){let e=[],o=[];this._options.forEach(a=>{this._selectedOptions.find(s=>zn(s,a.value,this._matchKey))?e.push(a):o.push(a)}),this._options=[...e,...o]}}async _onSelect(e,o=!0){if(this._valueChanging)return;if(this._mode==="stateless"){let s={value:e};this._adapter.emitHostEvent(c1.events.SELECT,s,!0,!0)&&(this._filterText="",this._multiple||this._closeDropdown());return}let a=()=>{let r=this._flatOptions.find(v=>zn(v,e,this._matchKey)),l=r?r.value:"",h=r?r.label:"";if(this._multiple){let v=_6(this._selectedOptions,l);if(v){let m=this._selectedOptions.indexOf(v);this._selectedOptions.splice(m,1)}else this._selectedOptions.push(r)}else O(l)?(this._selectedOptions[0]=r,this._filterText=h):(this._selectedOptions=[],this._filterText="");this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions),this._values=this._selectedOptions.map(v=>v.value),this._adapter.setSelectedText(this._getSelectedText()),!Q2.isMobile&&o&&this._adapter.selectInputValue(),this._emitChangeEvent(),this._tryUpdateDropdownPosition()};this._isDropdownOpen&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"?(this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,e,this._matchKey)),await this._valueChanging?a():this._tryUpdateDropdownPosition(),this._valueChanging=void 0):a()}_selectActiveOption(e=!0){let o=this._adapter.getActiveOptionIndex();if(typeof o=="number"&&o>=0){let a=this._flatOptions[o];a&&this._onSelect(a.value,e)}}_emitChangeEvent(){this._adapter.emitHostEvent(c1.events.CHANGE,this._getValue(),!0)}_tryUpdateDropdownPosition(){this._isDropdownOpen&&this._adapter.queueDropdownPositionUpdate()}_getValue(){return this._values?this._values.length?this._multiple?[...this._values]:this._values[0]:this._multiple?[]:null:null}_getSelectedText(){var e,o;return this._adapter.isWrappingChipField()?"":this._selectedTextBuilder?this._selectedTextBuilder(this._selectedOptions):this._multiple?this._values.length?this._values.length===1?(o=(e=this._selectedOptions[0])==null?void 0:e.label)!=null?o:"":`${this._values.length} options selected`:"":this._selectedOptions.filter(a=>a&&a.label).map(a=>a.label).join(" ").trim()}_onDismiss(){this._closeDropdown()}async _applyValue(e){let o=[];this._selectedOptions=[],Array.isArray(e)?o=e:o=O(e)?[e]:[],!this._multiple&&o.length>1&&(o=[o[0]]),Mn(o,0)?(this._values=o.map(s=>s.value),this._selectedOptions=o):this._values=o;let a=this._flatOptions;if(o.length&&a.length&&this._updateSelectedOptions(o),this._values.length&&!this._selectedOptions.length&&this._filter&&this._isInitialized){try{await this._executeFilter(!1,!0)}catch(s){console.error(s)}this._updateSelectedOptions(this._values)}this._multiple?this._filterText="":this._filterText=this._selectedOptions.length?this._selectedOptions[0].label:"",this._isInitialized&&this._adapter.setSelectedText(this._getSelectedText()),this._isDropdownOpen&&this._adapter.setSelectedOptions(this._selectedOptions)}_updateSelectedOptions(e){let o=[...this._flatOptions,...this._selectedOptions];if(this._selectedOptions.length&&(this._selectedOptions=[]),Mn(e,0))for(let a of e){let s=o.find(r=>zn(r,a.value,this._matchKey));s?this._selectedOptions.push(s):this._selectedOptions.push(a)}else for(let a of e){let s=o.find(r=>zn(r,a,this._matchKey));s?this._selectedOptions.push(s):this._allowUnmatched&&this._selectedOptions.push({label:a,value:a})}}get mode(){return this._mode}set mode(e){this._mode!==e&&(this._mode=e,this._mode==="stateless"&&(this._selectedOptions=[],this._isDropdownOpen&&this._closeDropdown()),this._adapter.setHostAttribute(c1.attributes.MODE,this._mode))}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._adapter.setHostAttribute(c1.attributes.MULTIPLE,O(this._multiple)?this._multiple.toString():""))}get value(){return this._getValue()}set value(e){let o=[];e==null?o=[]:Array.isArray(e)?o=structuredClone(e):Ut(e)?o=[e]:o=[structuredClone(e)],(o.length!==this._values.length||o.some(s=>!this._values.includes(s)))&&this._applyValue(e)}get filterOnFocus(){return this._filterOnFocus}set filterOnFocus(e){this._filterOnFocus!==e&&(this._filterOnFocus=e,this._adapter.setHostAttribute(c1.attributes.FILTER_ON_FOCUS,O(this._filterOnFocus)?this._filterOnFocus.toString():""))}get filterFocusFirst(){return this._filterFocusFirst}set filterFocusFirst(e){this._filterFocusFirst!==e&&(this._filterFocusFirst=e,this._adapter.toggleHostAttribute(c1.attributes.FILTER_FOCUS_FIRST,this._filterFocusFirst))}get allowUnmatched(){return this._allowUnmatched}set allowUnmatched(e){this._allowUnmatched!==e&&(this._allowUnmatched=e,O(this._allowUnmatched)&&this._adapter.setHostAttribute(c1.attributes.ALLOW_UNMATCHED,this._allowUnmatched.toString()))}get matchKey(){return this._matchKey}set matchKey(e){this._matchKey!==e&&(this._matchKey=e)}get popupTarget(){return this._popupTarget}set popupTarget(e){this._popupTarget!==e&&(this._popupTarget=e)}get filterText(){return this._filterText}set filterText(e){this._filterText!==e&&(this._filterText=this._allowUnmatched?e:"",this._isInitialized&&this._allowUnmatched&&(this._adapter.setInputValue(this._filterText),this._isDropdownOpen&&this._debounceFilter({checkFocus:!1})))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:[this._popupClasses]}set popupClasses(e){this._popupClasses!==e&&(this._popupClasses=Array.isArray(e)?[...e]:[e])}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}set popupFooterBuilder(e){this._popupFooterBuilder=e}get syncPopupWidth(){return this._syncPopupWidth}set syncPopupWidth(e){this._syncPopupWidth!==e&&(this._syncPopupWidth=e)}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit!==e&&(this._optionLimit=e)}get debounce(){return this._debounce}set debounce(e){this._debounce!==e&&(this._debounce=e,this._isInitialized&&this._setFilterCallback(),this._adapter.setHostAttribute(c1.attributes.DEBOUNCE,O(this._debounce)?this._debounce.toString():""))}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get filter(){return this._filter}set filter(e){this._filter!==e&&(this._filter=e,this._isInitialized&&this._values.length&&!this._flatOptions.length&&this._filter&&this._executeFilter().then(()=>{this._updateSelectedOptions(this._values),this._adapter.setSelectedText(this._getSelectedText())}))}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e,this._selectedOptions.length&&this._adapter.setSelectedText(this._getSelectedText())}get observeScroll(){return this._observeScroll}set observeScroll(e){this._observeScroll=e}get observeScrollThreshold(){return this._observeScrollThreshold}set observeScrollThreshold(e){this._observeScrollThreshold=e}appendOptions(e){this._isDropdownOpen&&(this._options=[...this._options,...e],this._adapter.appendOptions(e))}get isInitialized(){return this._isInitialized}get open(){return this._isDropdownOpen}set open(e){this._isDropdownOpen!==e&&(e?this._showDropdown({userTriggered:!1}):this._closeDropdown())}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){e!==this._beforeValueChange&&(this._beforeValueChange=e)}get popupElement(){return this._adapter.getPopupElement()}};var Cu="<template><slot></slot></template>",Eu=":host{display:block}:host([hidden]){display:none}",p2=class extends Q1{static get observedAttributes(){return[...Q1.observedAttributes,c1.attributes.MODE,c1.attributes.MULTIPLE,c1.attributes.DEBOUNCE,c1.attributes.FILTER_ON_FOCUS,c1.attributes.FILTER_FOCUS_FIRST,c1.attributes.ALLOW_UNMATCHED,c1.attributes.POPUP_TARGET,c1.attributes.OPEN,c1.attributes.MATCH_KEY,c1.attributes.FILTER_TEXT]}constructor(){super(),X.define([A0,S0,T0]),H(this,Cu,Eu),this._core=new di(new mi(this))}connectedCallback(){this.querySelector(c1.selectors.INPUT)?this._core.initialize():C0(this,c1.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case c1.attributes.MODE:this.mode=o;break;case c1.attributes.MULTIPLE:this.multiple=p(o);break;case c1.attributes.DEBOUNCE:this.debounce=K(o);break;case c1.attributes.FILTER_ON_FOCUS:this.filterOnFocus=p(o);break;case c1.attributes.FILTER_FOCUS_FIRST:this.filterFocusFirst=p(o);break;case c1.attributes.ALLOW_UNMATCHED:this.allowUnmatched=p(o);break;case c1.attributes.POPUP_TARGET:this.popupTarget=o;break;case c1.attributes.OPEN:this.open=p(o);break;case c1.attributes.MATCH_KEY:this.matchKey=o;break;case c1.attributes.FILTER_TEXT:this.filterText=o;break}}appendOptions(t){this._core.appendOptions(t)}openDropdown(){this.open=!0}closeDropdown(){this.open=!1}forceFilter(t={preserveValue:!1}){this._core.forceFilter(t)}};i([c()],p2.prototype,"mode",2),i([c()],p2.prototype,"multiple",2),i([c()],p2.prototype,"value",2),i([c()],p2.prototype,"debounce",2),i([c()],p2.prototype,"filterOnFocus",2),i([c()],p2.prototype,"filterFocusFirst",2),i([c()],p2.prototype,"allowUnmatched",2),i([c()],p2.prototype,"popupTarget",2),i([c()],p2.prototype,"filterText",2),i([c()],p2.prototype,"optionBuilder",2),i([c()],p2.prototype,"filter",2),i([c()],p2.prototype,"selectedTextBuilder",2),i([c()],p2.prototype,"open",2),i([c()],p2.prototype,"matchKey",2),i([c({set:!1})],p2.prototype,"isInitialized",2),i([c({set:!1})],p2.prototype,"popupElement",2),i([c()],p2.prototype,"beforeValueChange",2),p2=i([y({name:c1.elementName,dependencies:[x0,R1,v2,j1,eo,Q0,ce,j]})],p2);var x6=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(c1.elementName);return this._attachTextField(t),t}get textFieldDelegate(){return this._textFieldDelegate}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._textFieldDelegate.inputElement.disabled}set disabled(t){this._textFieldDelegate.inputElement.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(c1.events.CHANGE,e=>t(e.detail))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var o,a,s,r,l,h;let e={props:d({},(a=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(r=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:r.options)};e.options||(e.options={}),((l=this._config.options)==null?void 0:l.useDropdownIcon)!==!1&&!((h=e.options)!=null&&h.trailingElement)&&(e.options.trailingElement=this._createDropdownIconElement()),this._textFieldDelegate=new ao(e),t.appendChild(this._textFieldDelegate.element)}_createDropdownIconElement(){let t={props:{slot:"trailing",name:"arrow_drop_down"},options:{attributes:{"forge-dropdown-icon":""}}};return new U0(t).element}};function f6(){f(p2)}var Bu=`${b}backdrop`,b6={VISIBLE:"visible",FIXED:"fixed"},Au=d({},b6),Tu={ENTERING:"entering",EXITING:"exiting"},Su={ROOT:".forge-backdrop"},i2={elementName:Bu,observedAttributes:b6,attributes:Au,classes:Tu,selectors:Su};var ku='<template><div class="forge-backdrop" part="root"></div></template>',Ou="@keyframes enter{from{opacity:0}to{opacity:var(--_backdrop-opacity)}}@keyframes exit{from{opacity:var(--_backdrop-opacity)}to{opacity:0}}:host{display:contents}:host([hidden]){display:none}.forge-backdrop{--_backdrop-background:var(--forge-backdrop-background, #000);--_backdrop-opacity:var(--forge-backdrop-opacity, 0.54);--_backdrop-z-index:var(--forge-backdrop-z-index, var(--forge-z-index-backdrop, 7));--_backdrop-enter-animation-duration:var(--forge-backdrop-enter-animation-duration, var(--forge-animation-duration-short4, 200ms));--_backdrop-enter-animation-easing:var(--forge-backdrop-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_backdrop-exit-animation-duration:var(--forge-backdrop-exit-animation-duration, var(--forge-animation-duration-short1, 50ms));--_backdrop-exit-animation-easing:var(--forge-backdrop-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)))}.forge-backdrop{position:absolute;inset:0;z-index:var(--_backdrop-z-index);background:var(--_backdrop-background);opacity:0;animation-fill-mode:forwards}:host([fixed]) .forge-backdrop{position:fixed}:host([visible]) .forge-backdrop{opacity:var(--_backdrop-opacity)}:host([visible]) .forge-backdrop.entering{animation-name:enter;animation-duration:var(--_backdrop-enter-animation-duration);animation-timing-function:var(--_backdrop-enter-animation-easing)}:host([visible]) .forge-backdrop.exiting{animation-name:exit;animation-duration:var(--_backdrop-exit-animation-duration);animation-timing-function:var(--_backdrop-exit-animation-easing)}",Xe=class extends M{constructor(){super();this._visible=!1;this._fixed=!1;H(this,ku,Ou),this._rootElement=w(this,i2.selectors.ROOT)}static get observedAttributes(){return Object.values(i2.observedAttributes)}disconnectedCallback(){this._animationController&&(this._animationController.abort(),this._animationController=void 0),this.classList.remove(i2.classes.ENTERING,i2.classes.EXITING)}attributeChangedCallback(e,o,a){switch(e){case i2.attributes.VISIBLE:this.visible=p(a);break;case i2.attributes.FIXED:this.fixed=p(a);break}}async _applyVisibility(e,{animate:o}={animate:!0}){if(this._visible===e)return;if(this._visible=e,!this.isConnected)return this.toggleAttribute(i2.attributes.VISIBLE,this._visible),Promise.resolve();if(!o){this.toggleAttribute(i2.attributes.VISIBLE,this._visible);return}let a=this._visible,s=a?i2.classes.ENTERING:i2.classes.EXITING;this._animationController&&(this._animationController.abort(),this._rootElement.classList.remove(i2.classes.ENTERING,i2.classes.EXITING)),this._animationController=new AbortController;let r=new Promise(l=>{var h;this._rootElement.addEventListener("animationend",()=>{a||this.removeAttribute(i2.attributes.VISIBLE),this._rootElement.classList.remove(s),l()},{once:!0,signal:(h=this._animationController)==null?void 0:h.signal})});return a&&this.setAttribute(i2.attributes.VISIBLE,""),this._rootElement.classList.add(s),r}show(){this._applyVisibility(!0,{animate:!1})}hide(){this._applyVisibility(!1,{animate:!1})}fadeIn(){return this._applyVisibility(!0)}fadeOut(){return this._applyVisibility(!1)}get visible(){return this._visible}set visible(e){e=!!e,this._visible!==e&&this._applyVisibility(e)}get fixed(){return this._fixed}set fixed(e){e=!!e,this._fixed!==e&&(this._fixed=e,this.toggleAttribute(i2.attributes.FIXED,this._fixed))}};Xe=i([y({name:i2.elementName})],Xe);function y6(){f(Xe)}var Z5=`${b}banner`,M6={DISMISSED:"dismissed",PERSISTENT:"persistent",CAN_DISMISS:"can-dismiss",THEME:"theme"},Du=d({},M6),Pu={HAS_ICON:"has-icon",HAS_BUTTON:"has-button"},Nu={DISMISS_BUTTON:"[part=dismiss-button]",ICON_SLOT:"slot[name=icon]",BUTTON_SLOT:"slot[name=button]"},Ru={THEME:"info"},Fu={BEFORE_DISMISS:`${Z5}-before-dismiss`,DISMISSED:`${Z5}-dismissed`},I2={elementName:Z5,observedAttributes:M6,attributes:Du,classes:Pu,selectors:Nu,defaults:Ru,events:Fu};var gi=class extends I{constructor(e){super(e);this._rootElement=this._component;this._rootElement=w(e,".forge-banner"),this._dismissButtonElement=w(e,I2.selectors.DISMISS_BUTTON),this._iconSlotElement=w(e,I2.selectors.ICON_SLOT),this._buttonSlotElement=w(e,I2.selectors.BUTTON_SLOT)}initialize(){this._iconSlotElement.addEventListener("slotchange",this._onIconSlotChange.bind(this)),this._buttonSlotElement.addEventListener("slotchange",this._onButtonSlotChange.bind(this)),this._onIconSlotChange(),this._onButtonSlotChange()}setDismissButtonVisibility(e){this._dismissButtonElement.hidden=!e}addDismissListener(e){this._dismissButtonElement.addEventListener("click",e)}removeDismissListener(e){this._dismissButtonElement.removeEventListener("click",e)}setDismissed(e){this._rootElement.inert=e}async startDismissCompleteListener(){return new Promise(e=>{this._rootElement.addEventListener("transitionend",()=>e(),{once:!0})})}_onIconSlotChange(){this._rootElement.classList.toggle(I2.classes.HAS_ICON,this._iconSlotElement.assignedNodes().length>0)}_onButtonSlotChange(){this._rootElement.classList.toggle(I2.classes.HAS_BUTTON,this._buttonSlotElement.assignedNodes().length>0)}};var wi=class{constructor(t){this._adapter=t;this._dismissed=!1;this._persistent=!1;this._theme=I2.defaults.THEME;this._dismissListener=this._onDismiss.bind(this)}initialize(){this._adapter.initialize(),this._persistent||this._addDismissListener()}async _onDismiss(){if(this._dismissed||this._persistent)return;let t=this._dismissed;this._dismissed=!this._dismissed;let e=new CustomEvent(I2.events.BEFORE_DISMISS,{bubbles:!0,composed:!0,cancelable:!0});if(this._adapter.dispatchHostEvent(e),this._dismissed=t,e.defaultPrevented)return;let o=this._adapter.startDismissCompleteListener();this.dismissed=!this._dismissed,await o,this._adapter.dispatchHostEvent(new CustomEvent(I2.events.DISMISSED,{bubbles:!0,composed:!0}))}_addDismissListener(){this._adapter.addDismissListener(this._dismissListener)}_removeDismissEventListener(){this._adapter.removeDismissListener(this._dismissListener)}_applyPersistent(){this._adapter.setDismissButtonVisibility(!this._persistent),this._persistent?this._removeDismissEventListener():this._addDismissListener()}get dismissed(){return this._dismissed}set dismissed(t){t=!!t,this.dismissed!==t&&(this._dismissed=t,this._adapter.setDismissed(this._dismissed),this._adapter.toggleHostAttribute(I2.attributes.DISMISSED,this.dismissed))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._applyPersistent(),this._adapter.toggleHostAttribute(I2.attributes.PERSISTENT,this._persistent))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:I2.defaults.THEME,this._adapter.setHostAttribute(I2.attributes.THEME,this._theme))}};var Uu='<template><div class="forge-banner" part="root"><div class="inner"><div class="container"><slot name="icon"></slot><slot></slot><div class="button-container"><slot name="button"></slot></div></div><div class="dismiss-button-container"><slot name="dismiss-button"><forge-icon-button part="dismiss-button"><forge-icon name="cancel"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="bottom"><slot name="dismiss-tooltip">Dismiss</slot></forge-tooltip></slot></div></div></div></template>',Wu=":host{display:block;container-type:inline-size}:host([hidden]){display:none}.forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-info-container, #c7daf0));--_banner-color:var(--forge-banner-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-info-container, #0b3768));--_banner-gap:var(--forge-banner-gap, var(--forge-spacing-small, 12px));--_banner-padding-inline:var(--forge-banner-padding-inline, var(--forge-spacing-large, 24px));--_banner-padding-block:var(--forge-banner-padding-block, var(--forge-spacing-small, 12px));--_banner-transition-duration:var(--forge-banner-transition-duration, var(--forge-animation-duration-short4, 200ms));--_banner-transition-easing:var(--forge-banner-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-banner{display:grid;grid-template-columns:1fr;grid-template-rows:1fr;overflow:hidden;box-sizing:border-box;transition-property:opacity,grid-template-rows,min-height;transition-duration:var(--_banner-transition-duration);transition-timing-function:var(--_banner-transition-easing);background:var(--_banner-background);color:var(--_banner-color);opacity:1}.forge-banner .inner{display:grid;grid-template-columns:1fr auto;place-items:center;gap:var(--_banner-gap);overflow:hidden;padding-inline:var(--_banner-padding-inline)}.forge-banner .container{display:flex;justify-content:center;align-items:center;gap:var(--_banner-gap);flex:1 1 auto;padding-block:var(--_banner-padding-block)}.forge-banner .dismiss-button-container{display:flex;align-items:center;gap:var(--_banner-gap)}.forge-banner ::slotted(forge-button[slot=dismiss-button]){--forge-button-primary-color:var(--_banner-color)}.forge-banner ::slotted(forge-icon-button[slot=dismiss-button]),.forge-banner forge-icon-button[part=dismiss-button]{color:var(--_banner-icon-color);--forge-icon-button-focus-indicator-color:var(--_banner-color)}::slotted(forge-button[slot=button]){--forge-button-primary-color:var(--_banner-color)}::slotted([slot=icon]){color:var(--_banner-icon-color)}:host([dismissed]) .forge-banner{grid-template-rows:0fr;opacity:0}:host([theme=primary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-primary-container, #d1d5ed));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-primary-container, #222c62))}:host([theme=secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-secondary-container, #fff0c3));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-secondary-container, #8a6804))}:host([theme=tertiary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-tertiary-container, #d0d7ff));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-tertiary-container, #213189))}:host([theme=success]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-success-container, #cde0ce));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-success-container, #19441b))}:host([theme=error]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=warning]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-warning-container, #f4d3c2));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-warning-container, #712700))}:host([theme=danger]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-error-container, #ecc2c9));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-error-container, #5f0011))}:host([theme=info-secondary]) .forge-banner{--_banner-background:var(--forge-banner-background, var(--forge-theme-surface-container, #e0e0e0));--_banner-icon-color:var(--forge-banner-icon-color, var(--forge-theme-on-surface-container, #000000))}@container (max-width:600px){.forge-banner.has-button .container{display:grid;grid-template-rows:[content] 1fr [button] auto;grid-template-columns:[content] 1fr;place-items:normal}.forge-banner.has-button.has-icon .container{grid-template-columns:[icon] auto [content] 1fr}.forge-banner.has-button .inner{place-items:normal}.forge-banner.has-button .button-container{grid-row:button;grid-column:content}.forge-banner.has-button .dismiss-button-container{align-items:flex-start}}",f0=class extends M{static get observedAttributes(){return Object.values(I2.observedAttributes)}constructor(){super(),X.define(hl),H(this,Uu,Wu),this._core=new wi(new gi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case I2.observedAttributes.DISMISSED:this.dismissed=p(o);break;case I2.observedAttributes.PERSISTENT:this.persistent=p(o);break;case I2.observedAttributes.CAN_DISMISS:this.persistent=p(o)===!1;break;case I2.observedAttributes.THEME:this.theme=o;break}}get canDismiss(){return!this.persistent}set canDismiss(t){this.persistent=!t}};i([c()],f0.prototype,"dismissed",2),i([c()],f0.prototype,"persistent",2),i([c()],f0.prototype,"theme",2),f0=i([y({name:I2.elementName,dependencies:[i1,m1]})],f0);function z6(){f(f0)}var no=`${b}dialog`,H6={OPEN:"open",VISIBLE:"visible",MODE:"mode",TYPE:"type",ANIMATION_TYPE:"animation-type",PRESET:"preset",PERSISTENT:"persistent",FULLSCREEN:"fullscreen",FULLSCREEN_THRESHOLD:"fullscreen-threshold",TRIGGER:"trigger",MOVEABLE:"moveable",MOVE_TARGET:"move-target",POSITION_STRATEGY:"position-strategy",PLACEMENT:"placement",SIZE_STRATEGY:"size-strategy",LABEL:"label",DESCRIPTION:"description"},Gu=d({},H6),qu={MOVED:"moved",MOVING:"moving"},Yu={DIALOG:".forge-dialog",SURFACE:".surface",MOVE_HANDLE:".move-handle",AUTOFOCUS:":is([autofocus],[forge-dialog-focus])",ACCESSIBLE_LABEL:"#forge-dialog-label",ACCESSIBLE_DESCRIPTION:"#forge-dialog-description"},Ku={BEFORE_CLOSE:`${no}-before-close`,OPEN:`${no}-open`,CLOSE:`${no}-close`,MOVE_START:`${no}-move-start`,MOVE:`${no}-move`,MOVE_END:`${no}-move-end`,FULLSCREEN_CHANGE:`${no}-fullscreen-change`},$u={MODE:"modal",TYPE:"dialog",ANIMATION_TYPE:"zoom",PRESET:"dialog",SIZE_STRATEGY:"content",POSITION_STRATEGY:"viewport",PLACEMENT:"center",FULLSCREEN_THRESHOLD:599},D={elementName:no,observedAttributes:H6,classes:qu,attributes:Gu,selectors:Yu,events:Ku,defaults:$u},ui=Symbol("hideBackdrop"),_i=Symbol("showBackdrop"),b0=Symbol("dialogStack");var xi=class extends I{get moveHandleElement(){return this._moveHandleElement}get surfaceElement(){return this._surfaceElement}constructor(t){super(t),this._dialogElement=w(t,D.selectors.DIALOG),this._accessibleLabelElement=w(t,D.selectors.ACCESSIBLE_LABEL),this._accessibleDescriptionElement=w(t,D.selectors.ACCESSIBLE_DESCRIPTION),this._surfaceElement=w(t,D.selectors.SURFACE),this._moveHandleElement=w(t,D.selectors.MOVE_HANDLE),this._backdropElement=w(t,i2.elementName),this._backdropElement.shadowRoot||window.customElements.upgrade(this._backdropElement)}destroy(){this._forceClose()}show(){if(this._dialogElement.open)return;this._component.type!=="dialog"&&this._dialogElement.setAttribute("role",this._component.type);let t=this._component.mode==="modal"||this._component.mode==="inline-modal";t||this._dialogElement.setAttribute("aria-modal","false"),t&&(this._component.animationType==="none"?this._backdropElement.show():this._backdropElement.fadeIn()),this._component.mode==="modal"?this._dialogElement.showModal():this._dialogElement.show(),t&&this._hideBackdrops(),B1[b0].add(this._component)}_hideBackdrops(){B1[b0].forEach(t=>t[ui]())}_showBackdropMostRecent(){var t;(t=Array.from(B1[b0]).filter(e=>e.mode==="modal"||e.mode==="inline-modal").at(-1))==null||t[_i]()}async hide(){if(this._component.animationType==="none")return this._forceClose(),Promise.resolve();this._backdropElement.fadeOut(),await Gt(this._surfaceElement,i2.classes.EXITING),this._forceClose()}addDialogFormSubmitListener(t){this._dialogElement.addEventListener("submit",t)}removeDialogFormSubmitListener(t){this._dialogElement.removeEventListener("submit",t)}addBackdropDismissListener(t){this._backdropElement.addEventListener("click",t)}removeBackdropDismissListener(t){this._backdropElement.removeEventListener("click",t)}tryAutofocus(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(!this._component.matches(":focus-within")&&(this._component.mode==="modal"&&this._dialogElement.focus(),this._component.open&&this._dialogElement.isConnected)){let e=this._component.querySelector(D.selectors.AUTOFOCUS);e==null||e.focus()}})})}tryLocateTriggerElement(t){if(!t){this.triggerElement=null;return}let e=this._component.getRootNode();this.triggerElement=e.querySelector(`#${t}`)}addTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.addEventListener("click",t)}removeTriggerInteractionListener(t){var e;(e=this.triggerElement)==null||e.removeEventListener("click",t)}hideBackdrop(){this._backdropElement.fadeOut()}showBackdrop(){this._backdropElement.fadeIn()}addSurfaceClass(t){this._surfaceElement.classList.add(t)}removeSurfaceClass(t){this._surfaceElement.classList.remove(t)}addFullscreenListener(t,e){this._fullscreenMediaQuery=window.matchMedia(`(max-width: ${t}px)`),this._fullscreenMediaQuery.addEventListener("change",o=>e(o.matches)),!this._component.fullscreen&&this._fullscreenMediaQuery.matches&&e(!0)}removeFullscreenListener(t){var e;(e=this._fullscreenMediaQuery)==null||e.removeEventListener("change",o=>t(o.matches)),this._fullscreenMediaQuery=void 0}setAccessibleLabel(t){this._accessibleLabelElement.textContent=t}setAccessibleDescription(t){this._accessibleDescriptionElement.textContent=t}_forceClose(){this._surfaceElement.classList.remove(i2.classes.EXITING),this._dialogElement.close(),B1[b0].delete(this._component),this._showBackdropMostRecent()}};function I6(n=class{}){class t extends n{constructor(){super(...arguments);this._isMoving=!1;this._activeElement=void 0;this._movePointerDownListener=this._onMoveTargetPointerDown.bind(this);this._movePointerMoveListener=this._onMoveTargetPointerMove.bind(this);this._movePointerUpListener=this._onMoveTargetPointerUp.bind(this)}stopMoveListener(){this._updatePosition(null,null),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._isMoving=!1,this._moveContext=void 0,this._lastPosition=void 0,this._activeElement=void 0}_onMoveTargetPointerDown(a){a.preventDefault(),this._captureActiveElement();let s=this._getMoveableBounds();this._moveContext={top:a.pageY-s.top,left:a.pageX-s.left,height:s.height,width:s.width},document.addEventListener("pointermove",this._movePointerMoveListener),document.addEventListener("pointerup",this._movePointerUpListener)}_onMoveTargetPointerMove(a){a.preventDefault();let s=this._calculateOffsetPosition(a.pageX,a.pageY,this._moveContext);if(!this._isMoving&&(this._isMoving=!0,this._onMoveStart()))return;let r=this._clampPosition(s,this._moveContext);if((!this._lastPosition||r.x!==this._lastPosition.x||r.y!==this._lastPosition.y)&&!this._onMove(r)){this._lastPosition=d({},r);let h=this._normalizePositionValue(r.x),v=this._normalizePositionValue(r.y);this._updatePosition(h,v)}}_onMoveTargetPointerUp(a){this._isMoving&&this._onMoveEnd(),this._moveComplete()}_moveComplete(){this._tryRestoreActiveElement(),document.removeEventListener("pointermove",this._movePointerMoveListener),document.removeEventListener("pointerup",this._movePointerUpListener),this._lastPosition=void 0,this._moveContext=void 0,this._isMoving=!1}_captureActiveElement(){var a;this._activeElement=Ue(),(a=this._activeElement)==null||a.blur()}_tryRestoreActiveElement(){var a;(a=this._activeElement)!=null&&a.isConnected&&this._activeElement.focus(),this._activeElement=void 0}_normalizePositionValue(a){return O2(a)?`${a}px`:Ut(a)?a:null}_calculateOffsetPosition(a,s,r){var l,h;return{x:a-((l=r==null?void 0:r.left)!=null?l:0),y:s-((h=r==null?void 0:r.top)!=null?h:0)}}_clampPosition({x:a,y:s},r){let l=0,h=0;return r&&(l=r.width,h=r.height),a<=0?a=0:a+l>=window.innerWidth&&(a=window.innerWidth-l),s<=0?s=0:s+h>=window.innerHeight&&(s=window.innerHeight-h),{x:a,y:s}}}return t}var fi=class extends I6(Object){constructor(e){super();this._config=e;this._startMoveListener()}destroy(){this._stopMoveListener(),super.stopMoveListener()}_getMoveableBounds(){return this._config.surfaceElement.getBoundingClientRect()}_updatePosition(e,o){this._config.surfaceElement.style.top=o!=null?o:"",this._config.surfaceElement.style.left=e!=null?e:""}_onMoveStart(){return this._config.onMoveStart()}_onMove(e){return this._config.onMove(e)}_onMoveEnd(){this._config.onMoveEnd()}_startMoveListener(){this._config.handleElement.addEventListener("pointerdown",this._movePointerDownListener)}_stopMoveListener(){this._config.handleElement.removeEventListener("pointerdown",this._movePointerDownListener)}};var bi=class{constructor(t){this._adapter=t;this._open=!1;this._mode=D.defaults.MODE;this._type=D.defaults.TYPE;this._animationType=D.defaults.ANIMATION_TYPE;this._preset=D.defaults.PRESET;this._persistent=!1;this._fullscreen=!1;this._fullscreenThreshold=D.defaults.FULLSCREEN_THRESHOLD;this._trigger="";this._moveable=!1;this._label="";this._description="";this._sizeStrategy=D.defaults.SIZE_STRATEGY;this._placement=D.defaults.PLACEMENT;this._positionStrategy=D.defaults.POSITION_STRATEGY;this._escapeDismissListener=this._onEscapeDismiss.bind(this);this._backdropDismissListener=this._onBackdropDismiss.bind(this);this._dialogFormSubmitListener=this._onDialogFormSubmit.bind(this);this._triggerClickListener=this._onTriggerClick.bind(this);this._fullscreenListener=this._onFullscreenChange.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["mode","animationType","positionStrategy","sizeStrategy","persistent","moveable","fullscreenThreshold"]),this._trigger&&!this._adapter.triggerElement&&this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.triggerElement&&this._adapter.addTriggerInteractionListener(this._triggerClickListener),this._open&&this._applyOpen()}destroy(){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._moveController&&this._destroyMoveController(),this._release(),this._tryResetFullscreenValue(),this._adapter.destroy()}dispatchBeforeCloseEvent(t){let e=new CustomEvent(D.events.BEFORE_CLOSE,{cancelable:!0,bubbles:!0,composed:!0,detail:{reason:t}});return this._adapter.dispatchHostEvent(e),!e.defaultPrevented}hideBackdrop(){this._adapter.hideBackdrop()}showBackdrop(){this._adapter.showBackdrop()}_show(){this._adapter.show(),this._adapter.addDialogFormSubmitListener(this._dialogFormSubmitListener),zt.instance.add(this._adapter.hostElement),(this._mode==="modal"||this._mode==="inline-modal")&&this._adapter.addDocumentListener("keydown",this._escapeDismissListener,{capture:!0}),this._persistent||this._adapter.addBackdropDismissListener(this._backdropDismissListener),this._moveable&&!this._fullscreen&&this._initializeMoveController(),!this._fullscreen&&this._fullscreenThreshold>0&&(this._originalFullscreenValue=this._fullscreen,this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.dispatchHostEvent(new CustomEvent(D.events.OPEN,{bubbles:!0,composed:!0}))}async _hide(){this._release(),await this._adapter.hide(),this._tryResetFullscreenValue(),this._moveController&&this._destroyMoveController(),this._adapter.dispatchHostEvent(new CustomEvent(D.events.CLOSE,{bubbles:!0,composed:!0}))}_release(){this._adapter.removeDialogFormSubmitListener(this._dialogFormSubmitListener),this._adapter.removeDocumentListener("keydown",this._escapeDismissListener,{capture:!0}),this._adapter.removeBackdropDismissListener(this._backdropDismissListener),zt.instance.remove(this._adapter.hostElement)}_tryResetFullscreenValue(){typeof this._originalFullscreenValue=="boolean"&&(this.fullscreen=this._originalFullscreenValue),this._originalFullscreenValue=void 0}async _applyOpen(){this._open?(this._show(),this._adapter.tryAutofocus()):await this._hide(),this._adapter.toggleHostAttribute(D.attributes.VISIBLE,this._open),this._adapter.toggleHostAttribute(D.attributes.OPEN,this._open)}_onEscapeDismiss(t){t.key!=="Escape"||!zt.instance.isMostRecent(this._adapter.hostElement)||(t.preventDefault(),this._persistent||this._tryClose("escape"))}_onBackdropDismiss(){this._tryClose("backdrop")}_onDialogFormSubmit(t){var o,a;t.stopPropagation(),(((o=t.submitter)==null?void 0:o.getAttribute("formmethod"))==="dialog"||((a=t.target)==null?void 0:a.getAttribute("method"))==="dialog")&&this._tryClose("submit")}_onFullscreenChange(t){this.fullscreen=t;let e=new CustomEvent(D.events.FULLSCREEN_CHANGE,{bubbles:!0,composed:!0,detail:t});this._adapter.dispatchHostEvent(e)}_tryClose(t){this.dispatchBeforeCloseEvent(t)&&(this.open=!1)}_onTriggerClick(t){this.open=!this._open}_initializeMoveController(){if(this._moveController)return;let t=()=>{let r=new CustomEvent(D.events.MOVE_START,{cancelable:!0});return this._adapter.dispatchHostEvent(r),r.defaultPrevented},e=r=>{let l=new CustomEvent(D.events.MOVE,{detail:r,cancelable:!0});return this._adapter.dispatchHostEvent(l),l.defaultPrevented||(this._adapter.addSurfaceClass(D.classes.MOVED),this._adapter.addSurfaceClass(D.classes.MOVING)),l.defaultPrevented},o=()=>{let r=new CustomEvent(D.events.MOVE_END);this._adapter.removeSurfaceClass(D.classes.MOVING),this._adapter.dispatchHostEvent(r)},{moveHandleElement:a,surfaceElement:s}=this._adapter;this._moveController=new fi({handleElement:a,surfaceElement:s,onMoveStart:t,onMove:e,onMoveEnd:o})}_destroyMoveController(){var t;this._adapter.removeSurfaceClass(D.classes.MOVED),(t=this._moveController)==null||t.destroy(),this._moveController=void 0}_applyMoveable({enabled:t}={enabled:this._moveable}){t?this._initializeMoveController():this._destroyMoveController()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get mode(){return this._mode}set mode(t){this._mode!==t&&(this._mode=t,this._adapter.setHostAttribute(D.attributes.MODE,this._mode))}get type(){return this._type}set type(t){this._type!==t&&(this._type=t,this._adapter.setHostAttribute(D.attributes.TYPE,this._type))}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._adapter.setHostAttribute(D.attributes.ANIMATION_TYPE,this._animationType))}get preset(){return this._preset}set preset(t){this._preset!==t&&(this._preset=t,this._adapter.setHostAttribute(D.attributes.PRESET,this._preset))}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.isConnected&&this._open&&(this._persistent?this._adapter.removeBackdropDismissListener(this._backdropDismissListener):this._adapter.addBackdropDismissListener(this._backdropDismissListener)),this._adapter.toggleHostAttribute(D.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){t=!!t,this._fullscreen!==t&&(this._fullscreen=t,this._applyMoveable({enabled:!this._fullscreen}),this._adapter.toggleHostAttribute(D.attributes.FULLSCREEN,this._fullscreen))}get fullscreenThreshold(){return this._fullscreenThreshold}set fullscreenThreshold(t){this._fullscreenThreshold!==t&&(this._fullscreenThreshold=t,this._adapter.isConnected&&this._open&&!this._fullscreen&&this._fullscreenThreshold>0&&(this._adapter.removeFullscreenListener(this._fullscreenListener),this._adapter.addFullscreenListener(this._fullscreenThreshold,this._fullscreenListener)),this._adapter.setHostAttribute(D.attributes.FULLSCREEN_THRESHOLD,this._fullscreenThreshold.toString()))}get trigger(){var t;return(t=this._trigger)!=null?t:""}set trigger(t){this._trigger!==t&&(this._trigger=t,this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._adapter.isConnected&&(this._adapter.tryLocateTriggerElement(this._trigger),this._adapter.addTriggerInteractionListener(this._triggerClickListener)),this._adapter.setHostAttribute(D.attributes.TRIGGER,this._trigger))}get triggerElement(){return this._adapter.triggerElement}set triggerElement(t){this._adapter.triggerElement&&this._adapter.removeTriggerInteractionListener(this._triggerClickListener),this._trigger&&(this._trigger=""),this._adapter.triggerElement=t,this._adapter.isConnected&&this._adapter.addTriggerInteractionListener(this._triggerClickListener)}get moveable(){return this._moveable}set moveable(t){t=!!t,this._moveable!==t&&(this._moveable=t,this._adapter.isConnected&&this._open&&this._applyMoveable(),this._adapter.toggleHostAttribute(D.attributes.MOVEABLE,this._moveable))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setAccessibleLabel(this._label))}get description(){return this._description}set description(t){this._description!==t&&(this._description=t,this._adapter.setAccessibleDescription(this._description))}get positionStrategy(){return this._positionStrategy}set positionStrategy(t){this._positionStrategy!==t&&(this._positionStrategy=t,this._adapter.setHostAttribute(D.attributes.POSITION_STRATEGY,this._positionStrategy))}get sizeStrategy(){return this._sizeStrategy}set sizeStrategy(t){this._sizeStrategy!==t&&(this._sizeStrategy=t,this._adapter.setHostAttribute(D.attributes.SIZE_STRATEGY,this._sizeStrategy))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(D.attributes.PLACEMENT,this._placement))}};var Xu='<template><dialog class="forge-dialog" part="root" aria-labelledby="forge-dialog-label" aria-describedby="forge-dialog-description"><div id="forge-dialog-label" class="visually-hidden"></div><div id="forge-dialog-description" class="visually-hidden"></div><forge-backdrop exportparts="root:backdrop"></forge-backdrop><div class="surface" part="surface"><div class="move-handle-container" part="move-handle-container"><div class="move-handle" part="move-handle"><slot name="move-handle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" part="move-handle-icon"><path d="M3 15v-2h2v2H3m0-4V9h2v2H3m4 4v-2h2v2H7m0-4V9h2v2H7m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2m4 4v-2h2v2h-2m0-4V9h2v2h-2z"/></svg></slot></div></div><slot></slot></div></dialog></template>',Zu="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}@layer base,nonmodal,animation,placement,size-strategy,preset,fullscreen,position-strategy,media; @layer base{:host{display:none;--forge-theme-surface:var(--forge-theme-surface-bright, #ffffff)}:host([hidden]){display:none}::slotted(forge-scaffold){height:auto}.forge-dialog{--_dialog-background:var(--forge-dialog-background, var(--forge-theme-surface-bright, #ffffff));--_dialog-shape:var(--forge-dialog-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_dialog-elevation:var(--forge-dialog-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));--_dialog-spacing:var(--forge-dialog-spacing, auto);--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, var(--_dialog-spacing));--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, var(--_dialog-spacing));--_dialog-inline-start-spacing:var(--forge-dialog-inline-start-spacing, var(--_dialog-spacing));--_dialog-inline-end-spacing:var(--forge-dialog-inline-end-spacing, var(--_dialog-spacing));--_dialog-padding:var(--forge-dialog-padding, 0);--_dialog-width:var(--forge-dialog-width, fit-content);--_dialog-height:var(--forge-dialog-height, fit-content);--_dialog-min-width:var(--forge-dialog-min-width, 0);--_dialog-max-width:var(--forge-dialog-max-width, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-min-height:var(--forge-dialog-min-height, 0);--_dialog-max-height:var(--forge-dialog-max-height, calc(100% - var(--forge-spacing-xxlarge, 48px)));--_dialog-z-index:var(--forge-dialog-z-index, var(--forge-z-index-dialog, 8));--_dialog-move-handle-color:var(--forge-dialog-move-handle-color, currentColor);--_dialog-move-handle-size:var(--forge-dialog-move-handle-size, 24px);--_dialog-move-handle-hover-cursor:var(--forge-dialog-move-handle-hover-cursor, grab);--_dialog-move-handle-active-cursor:var(--forge-dialog-move-handle-active-cursor, grabbing);--_dialog-move-handle-spacing:var(--forge-dialog-move-handle-spacing, calc(var(--forge-spacing-xxsmall, 4px) * -1) 0 0);--_dialog-move-transition-duration:var(--forge-dialog-move-transition-duration, var(--forge-animation-duration-short4, 200ms));--_dialog-move-transition-easing:var(--forge-dialog-move-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-moving-opacity:var(--forge-dialog-moving-opacity, 0.54);--_dialog-enter-animation-duration:var(--forge-dialog-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-enter-animation-easing:var(--forge-dialog-enter-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_dialog-exit-animation-duration:var(--forge-dialog-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-exit-animation-easing:var(--forge-dialog-exit-animation-easing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_dialog-zoom-opacity:var(--forge-dialog-zoom-opacity, 0);--_dialog-zoom-scale:var(--forge-dialog-zoom-scale, 0.8);--_dialog-fade-opacity:var(--forge-dialog-fade-opacity, 0);--_dialog-slide-opacity:var(--forge-dialog-slide-opacity, 0);--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -30%);--_dialog-backdrop-opacity:var(--forge-dialog-backdrop-opacity, var(--forge-backdrop-opacity, 0.54));--_dialog-nonmodal-elevation:var(--forge-dialog-nonmodal-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_dialog-fullscreen-enter-animation-duration:var(--forge-dialog-fullscreen-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-fullscreen-exit-animation-duration:var(--forge-dialog-fullscreen-exit-animation-duration, var(--forge-animation-duration-short2, 100ms));--_dialog-position-x:var(--forge-dialog-position-x, 0);--_dialog-position-y:var(--forge-dialog-position-y, 0);--_dialog-preset-sheet-enter-animation-duration:var(--forge-dialog-preset-sheet-enter-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_dialog-preset-sheet-exit-animation-duration:var(--forge-dialog-preset-sheet-exit-animation-duration, var(--forge-animation-duration-short3, 150ms))}.forge-dialog{position:fixed;inset:0;z-index:var(--_dialog-z-index);background-color:transparent;color:inherit;border:none;width:auto;height:auto;padding:0;margin:0;overflow:visible;max-width:100%;max-height:100%;box-sizing:border-box}.container{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.surface{position:absolute;inset:0;display:flex;background:var(--_dialog-background);box-shadow:var(--_dialog-elevation);z-index:var(--_dialog-z-index);overflow:hidden;border-radius:var(--_dialog-shape);margin-block-start:var(--_dialog-block-start-spacing);margin-block-end:var(--_dialog-block-end-spacing);margin-inline-start:var(--_dialog-inline-start-spacing);margin-inline-end:var(--_dialog-inline-end-spacing);padding:var(--_dialog-padding);width:var(--_dialog-width);height:var(--_dialog-height);min-width:var(--_dialog-min-width);max-width:var(--_dialog-max-width);min-height:var(--_dialog-min-height);max-height:var(--_dialog-max-height);box-sizing:border-box}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}dialog.forge-dialog::backdrop{display:none}forge-backdrop{--forge-backdrop-opacity:var(--_dialog-backdrop-opacity);--forge-backdrop-enter-animation-duration:var(--_dialog-enter-animation-duration);--forge-backdrop-enter-animation-easing:var(--_dialog-enter-animation-easing);--forge-backdrop-exit-animation-duration:var(--_dialog-exit-animation-duration);--forge-backdrop-exit-animation-easing:var(--_dialog-exit-animation-easing)}:host(:not([moveable])) .move-handle{display:none}:host([moveable]:not([fullscreen])) .surface{user-select:none;transition-property:opacity;transition-duration:var(--_dialog-move-transition-duration);transition-timing-function:var(--_dialog-move-transition-easing)}:host([moveable]:not([fullscreen])) .surface:not(:hover) .move-handle-container{display:none}:host([moveable]:not([fullscreen])) .surface.moved{margin:0}:host([moveable]:not([fullscreen])) .surface.moving{opacity:var(--_dialog-moving-opacity)}:host([moveable]:not([fullscreen])) .move-handle-container{position:absolute;top:0;z-index:1;display:flex;justify-content:center;width:100%}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle{fill:var(--_dialog-move-handle-color);height:var(--_dialog-move-handle-size);width:var(--_dialog-move-handle-size);margin:var(--_dialog-move-handle-spacing);touch-action:none}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:hover{cursor:var(--_dialog-move-handle-hover-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle:active{cursor:var(--_dialog-move-handle-active-cursor)}:host([moveable]:not([fullscreen])) .move-handle-container .move-handle svg{fill:currentColor}:host([visible]){display:contents}}@layer nonmodal{:host([mode=nonmodal]) .forge-dialog{pointer-events:none}:host([mode=nonmodal]) .container{display:contents}:host([mode=nonmodal]) .surface{--_dialog-elevation:var(--_dialog-nonmodal-elevation);pointer-events:all}:host([mode=nonmodal]) forge-backdrop{display:none}}@layer animation{:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface{animation-duration:var(--_dialog-enter-animation-duration);animation-timing-function:var(--_dialog-enter-animation-easing)}:host([visible]:not([animation-type=none])) dialog.forge-dialog[open] .surface.exiting{animation-duration:var(--_dialog-exit-animation-duration);animation-timing-function:var(--_dialog-exit-animation-easing)}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-zoom-in}:host([visible]:not([animation-type=none]):is(:not([animation-type]),[animation-type=zoom])) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-zoom-out}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-fade-in}:host([visible]:not([animation-type=none])[animation-type=fade]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-fade-out}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none])[animation-type=slide]) dialog.forge-dialog[open] .surface.exiting{animation-name:forge-dialog-slide-out}}@layer placement{:host([placement=custom]) .surface{margin:0;top:var(--_dialog-position-x);left:var(--_dialog-position-y)}:host([placement=top]) .surface{--_dialog-block-start-spacing:var(--forge-dialog-block-start-spacing, 0);top:0;bottom:auto}:host([placement=top-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:auto;right:0;bottom:auto}:host([placement=top-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:0;left:0;right:auto;bottom:auto}:host([placement=bottom]) .surface{--_dialog-block-end-spacing:var(--forge-dialog-block-end-spacing, 0);top:auto;bottom:0}:host([placement=bottom-right]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:auto;right:0;bottom:0}:host([placement=bottom-left]) .surface{--_dialog-spacing:var(--forge-dialog-spacing, 0);top:auto;left:0;right:auto;bottom:0}}@layer size-strategy{:host([size-strategy=container-inline]) .surface{width:100%}:host([size-strategy=container-block]) .surface{height:100%}}@layer preset{:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-preset-sheet-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-preset-sheet-exit-animation-duration)}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{animation-name:forge-dialog-slide-in}:host([visible]:not([animation-type=none]):is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface.exiting{animation-name:forge-dialog-slide-out}:host(:is([preset=left-sheet],[preset=right-sheet],[preset=top-sheet],[preset=bottom-sheet])) .surface{--_dialog-max-width:var(--forge-dialog-max-width, none);--_dialog-max-height:var(--forge-dialog-max-height, none);inset:auto;display:inline-flex}:host([preset=left-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, -100% 0)}:host([preset=left-sheet]) .surface{left:0;bottom:0;top:0;height:100%;border-top-left-radius:0;border-bottom-left-radius:0}:host([preset=right-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 100% 0)}:host([preset=right-sheet]) .surface{right:0;bottom:0;top:0;height:100%;border-top-right-radius:0;border-bottom-right-radius:0}:host([preset=top-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 -100%)}:host([preset=top-sheet]) .surface{top:0;left:0;right:0;border-top-left-radius:0;border-top-right-radius:0}:host([preset=bottom-sheet]) .forge-dialog{--_dialog-slide-translate:var(--forge-dialog-slide-translate, 0 100%)}:host([preset=bottom-sheet]) .surface{bottom:0;left:0;right:0;border-bottom-left-radius:0;border-bottom-right-radius:0}}@layer fullscreen{:host([fullscreen]) .forge-dialog{--_dialog-enter-animation-duration:var(--_dialog-fullscreen-enter-animation-duration);--_dialog-exit-animation-duration:var(--_dialog-fullscreen-exit-animation-duration)}:host([fullscreen]) .surface{height:100%;width:100%;max-width:none;max-height:none;border-radius:0;box-shadow:none}:host([fullscreen]) forge-backdrop{display:none}}@layer position-strategy{:host([position-strategy=viewport]) .forge-dialog{position:fixed}:host([position-strategy=container]) .forge-dialog{position:absolute}:host([position-strategy=container][preset$=-sheet]) .forge-dialog{contain:content}}@layer media{@media (prefers-reduced-motion:reduce){.surface{animation-name:forge-dialog-fade-in}.surface.exiting{animation-name:forge-dialog-fade-out}}}",L6,B1=class extends V1(L1(M)){static get observedAttributes(){return Object.values(D.observedAttributes)}[(L6=b0,ui)](){this._core.hideBackdrop()}[_i](){this._core.showBackdrop()}[O0](t){return this._core.dispatchBeforeCloseEvent("dismiss")}constructor(){super(),H(this,Xu,Zu),this._core=new bi(new xi(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case D.observedAttributes.OPEN:this.open=p(o);break;case D.observedAttributes.MODE:this.mode=o!=null?o:D.defaults.MODE;break;case D.observedAttributes.TYPE:this.type=o!=null?o:D.defaults.TYPE;break;case D.observedAttributes.ANIMATION_TYPE:this.animationType=o!=null?o:D.defaults.ANIMATION_TYPE;break;case D.observedAttributes.PRESET:this.preset=o!=null?o:D.defaults.PRESET;break;case D.observedAttributes.PERSISTENT:this.persistent=p(o);break;case D.observedAttributes.FULLSCREEN:this.fullscreen=p(o);break;case D.observedAttributes.FULLSCREEN_THRESHOLD:this.fullscreenThreshold=o==null?D.defaults.FULLSCREEN_THRESHOLD:K(o);break;case D.observedAttributes.TRIGGER:this.trigger=o;break;case D.observedAttributes.MOVEABLE:this.moveable=p(o);break;case D.observedAttributes.POSITION_STRATEGY:this.positionStrategy=o!=null?o:D.defaults.POSITION_STRATEGY;break;case D.observedAttributes.SIZE_STRATEGY:this.sizeStrategy=o!=null?o:D.defaults.SIZE_STRATEGY;break;case D.observedAttributes.PLACEMENT:this.placement=o!=null?o:D.defaults.PLACEMENT;break;case D.observedAttributes.LABEL:this.label=o;break;case D.observedAttributes.DESCRIPTION:this.description=o;break}}show(){this.open=!0}hide(){this.open=!1}};B1[L6]=new Set,i([c()],B1.prototype,"open",2),i([c()],B1.prototype,"mode",2),i([c()],B1.prototype,"type",2),i([c()],B1.prototype,"animationType",2),i([c()],B1.prototype,"preset",2),i([c()],B1.prototype,"persistent",2),i([c()],B1.prototype,"fullscreen",2),i([c()],B1.prototype,"fullscreenThreshold",2),i([c()],B1.prototype,"trigger",2),i([c()],B1.prototype,"triggerElement",2),i([c()],B1.prototype,"moveable",2),i([c()],B1.prototype,"positionStrategy",2),i([c()],B1.prototype,"sizeStrategy",2),i([c()],B1.prototype,"placement",2),i([c()],B1.prototype,"label",2),i([c()],B1.prototype,"description",2),B1=i([y({name:D.elementName,dependencies:[Xe]})],B1);function V6(){f(B1)}var C6=`${b}bottom-sheet`,E6={PERSISTENT:"persistent",MODE:"mode",OPEN:"open",FULLSCREEN:"fullscreen"},ju=d({},E6),Qu={DRAGGING:"dragging",FULLSCREEN:"fullscreen"},Ju={DIALOG:D.elementName,SURFACE:".surface",CONTENT_BODY:"[forge-bottom-sheet-body]",INITIAL_FOCUS:`:is([autofocus], [${C6}-focus])`},t_={BEFORE_CLOSE:"forge-bottom-sheet-before-close",CLOSE:"forge-bottom-sheet-close",OPEN:"forge-bottom-sheet-open",READY:"forge-bottom-sheet-ready",DRAG_START:"forge-bottom-sheet-drag-start",DRAGGED:"forge-bottom-sheet-dragged",DRAG_END:"forge-bottom-sheet-drag-end",DRAG_CANCEL:"forge-bottom-sheet-drag-cancel",FULLSCREEN:"forge-bottom-sheet-fullscreen"},e_={mode:"nonmodal"},S1={elementName:C6,observedAttributes:E6,attributes:ju,classes:Qu,selectors:Ju,events:t_,defaults:e_};var yi=class extends I{constructor(t){super(t),this._dialogElement=w(t,S1.selectors.DIALOG),this._surfaceElement=w(t,S1.selectors.SURFACE)}setDialogProperty(t,e){this._dialogElement[t]=e}addDialogListener(t,e){this._dialogElement.addEventListener(t,e)}removeDialogListener(t,e){this._dialogElement.removeEventListener(t,e)}initialize(){this._component[N]({role:"dialog",ariaModal:this._component.mode==="modal"||this._component.mode==="inline-modal"?"true":"false"},{setAttribute:!0})}open(){this._dialogElement.mode=this._component.mode,this._dialogElement.open=!0}close(){this._dialogElement.open=!1}trySetInitialFocus(){window.requestAnimationFrame(()=>{if(this._component.open&&this._component.isConnected){let t=this._component.querySelector(S1.selectors.INITIAL_FOCUS);t==null||t.focus()}})}isScrollable(){let t=this._getContentElement();return t?t.scrollHeight>t.offsetHeight:!1}isContentChild(t){var o;let e=this._getContentElement();return(o=e==null?void 0:e.contains(t))!=null?o:!1}setDragging(t){this._dialogElement.classList.toggle(S1.classes.DRAGGING,t)}setFullscreen(t){this._dialogElement.classList.toggle(S1.classes.FULLSCREEN,t)}isFullscreen(){return this._dialogElement.classList.contains(S1.classes.FULLSCREEN)}setContainerHeight(t){if(t!=null){let e=Math.min(100,100*t/window.innerHeight);this._dialogElement.style.setProperty("--forge-dialog-max-height",`${e}%`)}else this._dialogElement.style.removeProperty("--forge-dialog-max-height")}getContainerBounds(){return this._surfaceElement.getBoundingClientRect()}setDragTargetHandler(t,e){this._surfaceElement.addEventListener(t,e)}removeDragTargetHandler(t,e){this._surfaceElement.removeEventListener(t,e)}setBodyScrollHandler(t){let e=this._getContentElement();e==null||e.addEventListener("scroll",t)}_getContentElement(){var e;return(e=Array.from(Re(this._component,S1.selectors.CONTENT_BODY,!1))[0])!=null?e:null}setBodyListener(t,e,o){document.body.addEventListener(t,e,o)}removeBodyListener(t,e){document.body.removeEventListener(t,e)}};var Mi=class{constructor(t){this._adapter=t;this._open=!1;this._mode=S1.defaults.mode;this._persistent=!1;this._fullscreen=!1;this._isDragging=!1;this._bodyScrollHandler=()=>this._onBodyScroll();this._dragStartHandler=this._onDragStart.bind(this);this._dragMoveHandler=this._onDragMove.bind(this);this._dragEndHandler=this._onDragEnd.bind(this);this._dragCancelHandler=this._onDragCancel.bind(this);this._dialogDismissListener=this._onDialogDismiss.bind(this);this._dialogBeforeCloseListener=this._onDialogBeforeClose.bind(this)}initialize(){this._adapter.initialize(),this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.setDialogProperty("mode",this._mode),this._adapter.setDialogProperty("fullscreen",this._fullscreen),this._open&&this._openBottomSheet()}_openBottomSheet(){this._fullscreen&&this._adapter.setFullscreen(!0),this._adapter.addDialogListener(D.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.addDialogListener(D.events.CLOSE,this._dialogDismissListener),this._adapter.open(),this._adapter.isScrollable()&&this._initScrollableHandlers(),this._adapter.trySetInitialFocus(),this._adapter.setBodyAttribute(S1.attributes.OPEN,"true"),this._adapter.dispatchHostEvent(new CustomEvent(S1.events.OPEN,{bubbles:!0}))}_closeBottomSheet(){this._adapter.removeDialogListener(D.events.BEFORE_CLOSE,this._dialogBeforeCloseListener),this._adapter.removeDialogListener(D.events.CLOSE,this._dialogDismissListener),this._adapter.close(),this._adapter.dispatchHostEvent(new CustomEvent(S1.events.CLOSE,{bubbles:!0})),this._open=!1,this._adapter.setFullscreen(!1)}_onDialogDismiss(){this._closeBottomSheet()}_onDialogBeforeClose(t){let e=new CustomEvent(S1.events.BEFORE_CLOSE,{bubbles:!0,cancelable:!0});this._adapter.dispatchHostEvent(e),e.defaultPrevented&&t.preventDefault()}_initScrollableHandlers(){!this._adapter.isFullscreen()&&this._adapter.isScrollable()&&(this._adapter.setDragTargetHandler("mousedown",this._dragStartHandler),this._adapter.setDragTargetHandler("touchstart",this._dragStartHandler),this._adapter.setBodyScrollHandler(this._bodyScrollHandler))}_onBodyScroll(){!this._adapter.isFullscreen()&&!this._isDragging&&(this._adapter.setFullscreen(!0),this._adapter.dispatchHostEvent(new CustomEvent(S1.events.FULLSCREEN,{bubbles:!0,detail:!0})))}_onDragStart(t){if(this._adapter.isFullscreen()){let a=C2(t);if(this._adapter.isScrollable()&&this._adapter.isContentChild(a[0]))return}t.stopPropagation();let e=this._adapter.getContainerBounds(),o=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;this._dragContext={top:o-e.top,height:e.height},this._adapter.setBodyListener("mousemove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("touchmove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("mouseup",this._dragEndHandler),this._adapter.setBodyListener("touchend",this._dragEndHandler),this._adapter.setBodyListener("touchcancel",this._dragCancelHandler)}_onDragMove(t){if(t.stopPropagation(),t.preventDefault(),!this._dragContext)return;let e=t instanceof MouseEvent?t.clientY:t.touches[0].clientY,o={y:window.innerHeight-e+this._dragContext.top};if(!this._isDragging){this._isDragging=!0;let s=new CustomEvent(S1.events.DRAG_START,{bubbles:!0,detail:o,cancelable:!0});if(this._adapter.dispatchHostEvent(s),s.defaultPrevented)return;this._adapter.setDragging(!0)}let a=this._adapter.isFullscreen()?o:{y:Math.max(o.y,this._dragContext.height)};if(!this._lastPosition||a.y!==this._lastPosition.y){let s=new CustomEvent(S1.events.DRAGGED,{bubbles:!0,detail:a,cancelable:!0});if(this._adapter.dispatchHostEvent(s),s.defaultPrevented)return;this._lastPosition=S(d({},a),{clientY:e}),this._adapter.setContainerHeight(a.y)}}_onDragEnd(){if(this._lastPosition){let t=this._lastPosition.clientY,e=this._dragContext;if(e){let o=this._adapter.isFullscreen();o&&t>0?this._adapter.setFullscreen(!1):!o&&t<e.height+e.top&&this._adapter.setFullscreen(!0);let a=new CustomEvent(S1.events.FULLSCREEN,{bubbles:!0,detail:o});this._adapter.dispatchHostEvent(a)}}if(this._isDragging){let t=new CustomEvent(S1.events.DRAG_END,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_onDragCancel(){if(this._isDragging){let t=new CustomEvent(S1.events.DRAG_CANCEL,{bubbles:!0});this._adapter.dispatchHostEvent(t)}this._dragComplete()}_dragComplete(){this._adapter.setDragging(!1),this._adapter.removeBodyListener("mousemove",this._dragMoveHandler),this._adapter.removeBodyListener("touchmove",this._dragMoveHandler),this._adapter.removeBodyListener("mouseup",this._dragEndHandler),this._adapter.removeBodyListener("touchend",this._dragEndHandler),this._adapter.removeBodyListener("touchcancel",this._dragCancelHandler),this._adapter.setContainerHeight(null),this._lastPosition=void 0,this._dragContext=void 0,this._isDragging=!1}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&(this._open?this._openBottomSheet():this._closeBottomSheet()),this._adapter.toggleHostAttribute(S1.attributes.OPEN,t))}get mode(){return this._mode}set mode(t){if(t||(t=S1.defaults.mode),this._mode!==t){this._mode=t,this._adapter.setDialogProperty("mode",this._mode);let e=this._mode!==S1.defaults.mode;this._adapter.toggleHostAttribute(S1.attributes.MODE,e,this._mode)}}get persistent(){return this._persistent}set persistent(t){t=!!t,this._persistent!==t&&(this._persistent=t,this._adapter.setDialogProperty("persistent",this._persistent),this._adapter.toggleHostAttribute(S1.attributes.PERSISTENT,this._persistent))}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen),this._adapter.toggleHostAttribute(S1.attributes.FULLSCREEN,this._fullscreen))}};var o_='<template><forge-dialog class="dialog" preset="bottom-sheet" exportparts="surface" role="presentation"><div class="surface" part="root"><slot></slot></div></forge-dialog></template>',a_="@keyframes forge-dialog-zoom-in{from{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}to{opacity:1;scale:1}}@keyframes forge-dialog-zoom-out{from{opacity:1;scale:1}to{opacity:var(--_dialog-zoom-opacity);scale:var(--_dialog-zoom-scale)}}@keyframes forge-dialog-fade-in{from{opacity:var(--_dialog-fade-opacity)}to{opacity:1}}@keyframes forge-dialog-fade-out{from{opacity:1}to{opacity:var(--_dialog-fade-opacity)}}@keyframes forge-dialog-slide-in{from{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}to{opacity:1;translate:0 0}}@keyframes forge-dialog-slide-out{from{opacity:1;translate:0 0}to{opacity:var(--_dialog-slide-opacity);translate:var(--_dialog-slide-translate)}}:host{display:contents}:host([hidden]){display:none}.dialog{--_bottom-sheet-desktop-max-width:var(--forge-bottom-sheet-desktop-max-width, 50%);--_bottom-sheet-desktop-max-height:var(--forge-bottom-sheet-desktop-max-height, 50%);--_bottom-sheet-animation-duration:var(--forge-bottom-sheet-animation-duration, var(--forge-animation-duration-medium1, 250ms));--_bottom-sheet-animation-timing:var(--forge-bottom-sheet-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.surface{width:100%;display:inline-flex;flex-direction:column}.dialog.dragging::part(surface){transition:none}:host([open]) forge-dialog.fullscreen{--forge-dialog-max-height:100%}:host([open]) forge-dialog.fullscreen::part(surface){transition:max-height var(--_bottom-sheet-animation-duration) var(--_bottom-sheet-animation-timing)}forge-dialog{--forge-dialog-width:var(--_bottom-sheet-desktop-max-width);--forge-dialog-max-height:var(--_bottom-sheet-desktop-max-height)}@media (max-width:600px){forge-dialog{--forge-dialog-shape:0;--forge-dialog-max-width:100vw;--forge-dialog-width:100vw}}",Ze=class extends L1(V1(M)){static get observedAttributes(){return Object.values(S1.observedAttributes)}constructor(){super(),H(this,o_,a_),this._core=new Mi(new yi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case S1.attributes.OPEN:this.open=p(o);break;case S1.attributes.MODE:this.mode=o;break;case S1.observedAttributes.PERSISTENT:this.persistent=p(o);break;case S1.attributes.FULLSCREEN:this.fullscreen=p(o);break}}};i([c()],Ze.prototype,"open",2),i([c()],Ze.prototype,"mode",2),i([c()],Ze.prototype,"persistent",2),i([c()],Ze.prototype,"fullscreen",2),Ze=i([y({name:S1.elementName,dependencies:[B1]})],Ze);function B6(){f(Ze)}var n_=`${b}button-area`,s_={DISABLED:"disabled",IGNORE:"data-forge-ignore",IGNORE_ALT:"forge-ignore"},j5={ROOT:"root",BUTTON_SLOT:"button",CONTENT_SLOT:"content"},r_={ROOT:"forge-button-area"},i_={ROOT:`#${j5.ROOT}`,BUTTON_SLOT:"slot[name=button]",CONTENT_SLOT:`#${j5.CONTENT_SLOT}`},Dt={elementName:n_,attributes:s_,ids:j5,classes:r_,selectors:i_};var zi=class extends I{constructor(t){super(t),this._rootElement=w(t,Dt.selectors.ROOT),this._buttonSlotElement=w(t,Dt.selectors.BUTTON_SLOT),this._contentSlotElement=w(t,Dt.selectors.CONTENT_SLOT),this._focusIndicatorElement=w(t,w1.elementName),this._stateLayerElement=w(t,I1.elementName)}setDisabled(t){var e;(e=this._buttonElement)==null||e.toggleAttribute(Dt.attributes.DISABLED,t),t?(this._focusIndicatorElement.remove(),this._stateLayerElement.remove()):this._rootElement.append(this._focusIndicatorElement,this._stateLayerElement)}addListener(t,e,o){this._rootElement.addEventListener(t,e,{capture:o})}removeListener(t,e,o){this._rootElement.removeEventListener(t,e,{capture:o})}addButtonSlotListener(t,e){this._buttonSlotElement.addEventListener(t,e)}removeButtonSlotListener(t,e){this._buttonSlotElement.removeEventListener(t,e)}addContentSlotListener(t,e){this._contentSlotElement.addEventListener(t,e)}removeContentSlotListener(t,e){this._contentSlotElement.removeEventListener(t,e)}animateStateLayer(){this._stateLayerElement.playAnimation()}startButtonObserver(t){this._buttonElement&&(this._buttonObserver=new MutationObserver(t),this._buttonObserver.observe(this._buttonElement,{attributeFilter:[Dt.attributes.DISABLED]}))}stopButtonObserver(){this._buttonObserver&&(this._buttonObserver.disconnect(),this._buttonObserver=void 0)}detectSlottedButton(){this._buttonElement=this._buttonSlotElement.assignedElements()[0]}isButtonDisabled(){var t,e;return(e=(t=this._buttonElement)==null?void 0:t.disabled)!=null?e:!0}requestDisabledButtonFrame(){this._buttonElement&&(this._buttonElement.disabled=!0,requestAnimationFrame(()=>{this._buttonElement&&(this._buttonElement.disabled=!1)}))}};var Hi=class{constructor(t){this._adapter=t;this._disabled=!1;this._clickListener=this._handleClick.bind(this);this._keydownListener=this._handleKeydown.bind(this);this._pointerdownListener=this._handlePointerdown.bind(this);this._ignoreStateLayerListener=this._handleIgnoreStateLayer.bind(this);this._slotListener=this._handleSlotChange.bind(this)}initialize(){this._adapter.addListener("click",this._clickListener),this._adapter.addListener("keydown",this._keydownListener),this._adapter.addListener("pointerdown",this._pointerdownListener),this._adapter.addContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.addContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.addButtonSlotListener("slotchange",this._slotListener)}destroy(){this._adapter.removeListener("click",this._clickListener),this._adapter.removeListener("keydown",this._keydownListener),this._adapter.removeListener("pointerdown",this._pointerdownListener),this._adapter.removeContentSlotListener("click",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerdown",this._ignoreStateLayerListener.bind(this)),this._adapter.removeContentSlotListener("pointerup",this._ignoreStateLayerListener.bind(this)),this._adapter.removeButtonSlotListener("slotchange",this._slotListener),this._adapter.stopButtonObserver()}_handleClick(t){this._disabled&&t.stopPropagation();let e=window.getSelection();(e==null?void 0:e.type)==="Range"&&(e==null?void 0:e.toString().trim())!==""&&t.stopPropagation(),this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleKeydown(t){t.key!==" "&&t.key!=="Enter"||(this._shouldIgnoreEvent(t)?t.stopPropagation():this._adapter.animateStateLayer())}_handlePointerdown(t){this._disabled||this._shouldIgnoreEvent(t)&&this._adapter.requestDisabledButtonFrame()}_handleIgnoreStateLayer(t){this._disabled||this._shouldIgnoreEvent(t)&&t.stopPropagation()}_handleSlotChange(){this._adapter.stopButtonObserver(),this._adapter.detectSlottedButton(),this._adapter.startButtonObserver(()=>this._handleButtonDisabled()),this._adapter.isButtonDisabled()?this.disabled=!0:this._disabled&&this._adapter.setDisabled(!0)}_handleButtonDisabled(){this.disabled=this._adapter.isButtonDisabled()}_shouldIgnoreEvent(t){return C2(t).some(o=>o.nodeType===1&&(o.hasAttribute(Dt.attributes.IGNORE)||o.hasAttribute(Dt.attributes.IGNORE_ALT)))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(Dt.attributes.DISABLED,this._disabled))}};var l_='<template><div class="forge-button-area" id="root" part="root"><div class="button" id="button" part="button"><slot name="button"></slot></div><slot id="content"></slot><forge-state-layer target="root" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator target="button" part="focus-indicator" inward></forge-focus-indicator></div></template>',c_=":host{display:block;position:relative}:host .forge-button-area{cursor:var(--_button-area-cursor)}:host([hidden]){display:none}:host([disabled]) .forge-button-area{cursor:var(--_button-area-disabled-cursor)}.forge-button-area{--_button-area-primary-color:var(--forge-button-area-primary-color, var(--forge-theme-primary, #3f51b5));--_button-area-cursor:var(--forge-button-area-cursor, pointer);--_button-area-disabled-cursor:var(--forge-button-area-disabled-cursor, not-allowed);--_button-area-focus-indicator-color:var(--forge-button-area-focus-indicator-color, var(--forge-theme-primary, #3f51b5));--_button-area-focus-indicator-offset:var(--forge-button-area-focus-indicator-offset, 4px)}.forge-button-area{position:relative;overflow:hidden;block-size:100%;inline-size:100%}.forge-button-area .button{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}forge-focus-indicator{z-index:1;--forge-focus-indicator-color:var(--_button-area-focus-indicator-color);--forge-focus-indicator-outward-offset:var(--_button-area-focus-indicator-offset)}forge-state-layer{--forge-state-layer-color:var(--_button-area-primary-color);border-radius:inherit}",Ro=class extends M{static get observedAttributes(){return[Dt.attributes.DISABLED]}constructor(){super(),H(this,l_,c_),this._core=new Hi(new zi(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case Dt.attributes.DISABLED:this.disabled=p(o);break}}};i([c()],Ro.prototype,"disabled",2),Ro=i([y({name:Dt.elementName,dependencies:[J,r1]})],Ro);function A6(){f(Ro)}var Q5=`${b}calendar-menu`,h_={ANIMATION_TYPE:"animation-type",DATA_ANIMATION:"data-animation",DATA_VALUE:"data-value",POPOVER_CONTEXT:"forge-popover-context",PREVENT_FOCUS:"prevent-focus"},so={BACKDROP:"forge-calendar-menu__backdrop",CLOSING:"forge-calendar-menu--closing",GRID:"forge-calendar-menu__grid",GRID_ITEM:"forge-calendar-menu__item--grid",GRID_FOUR_COL:"forge-calendar-menu__grid--four-col",GRID_THREE_COL:"forge-calendar-menu__grid--three-col",ITEM:"forge-calendar-menu__item",ITEM_FOCUSED:"forge-calendar-menu__item--focused",ITEM_SELECTED:"forge-calendar-menu__item--selected",LIST:"forge-calendar-menu__list",LIST_ITEM:"forge-calendar-menu__item--list",LIST_WRAPPER:"forge-calendar-menu__list__wrapper",OPEN:"forge-calendar-menu--open",REPLACING_VIEW:"forge-calendar-menu--replacing-view",SLIDE_LEFT:"forge-calendar-menu--slide-left",SLIDE_RIGHT:"forge-calendar-menu--slide-right",VIEW:"forge-calendar-menu__view"},J5={SCROLL_SPY_BOTTOM:"scroll-spy-bottom",SCROLL_SPY_TOP:"scroll-spy-top"},v_={ITEM:"menu-item",ITEM_BUTTON:"menu-item-button",ITEM_CONTENT:"menu-item-content",MENU:"menu"},p_={CONTAINER:".forge-calendar-menu",FOCUSED:`.${so.ITEM_FOCUSED}`,GRID:`.${so.GRID}`,ITEM:`.${so.ITEM}`,LIST:`.${so.LIST}`,LIST_WRAPPER:`.${so.LIST_WRAPPER}`,SCROLL_SPY_BOTTOM:`#${J5.SCROLL_SPY_BOTTOM}`,SCROLL_SPY_TOP:`#${J5.SCROLL_SPY_TOP}`,SELECTED:`.${so.ITEM_SELECTED}`,VIEW:`.${so.VIEW}`},m_={FOCUS_CHANGE:`${Q5}-focus-change`,SELECT:`${Q5}-select`},d_={FOUR_COL:4,LARGE_ITEM_SET:13,LIST_SLICE_SIZE:20,THREE_COL:3},T={elementName:Q5,attributes:h_,classes:so,ids:J5,parts:v_,selectors:p_,events:m_,numbers:d_};function Ii(n){let t=document.createElement("div");t.setAttribute("part",T.parts.MENU),t.classList.add(T.classes.VIEW,T.classes.GRID);let e;return n.length>12?(t.classList.add(T.classes.GRID_FOUR_COL),e=T6(n)):(t.classList.add(T.classes.GRID_THREE_COL),e=T6(n)),e.forEach(o=>t.appendChild(o)),t}function T6(n){return n.map(t=>{let e=document.createElement("div");e.classList.add(T.classes.ITEM,T.classes.GRID_ITEM),e.innerText=t.label,e.setAttribute("role","button"),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.add(T.classes.ITEM_SELECTED),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let o=document.createElement("forge-state-layer");e.appendChild(o);let a=document.createElement("forge-focus-indicator");return a.inward=!0,e.appendChild(a),e})}function k6(n){let t=document.createElement("div"),e=document.createElement("div");return t.classList.add(T.classes.VIEW,T.classes.LIST_WRAPPER),e.classList.add(T.classes.LIST),e.setAttribute("role","list"),e.appendChild(S6(T.ids.SCROLL_SPY_TOP)),Li(n).forEach(o=>e.appendChild(o)),e.appendChild(S6(T.ids.SCROLL_SPY_BOTTOM)),t.appendChild(e),t}function Li(n){return n.map(t=>{let e=document.createElement("div");e.innerText=t.label,e.classList.add(T.classes.ITEM,T.classes.LIST_ITEM),e.setAttribute("part",T.parts.ITEM),e.setAttribute("tabindex","-1"),e.setAttribute("role","listitem"),e.setAttribute(T.attributes.DATA_VALUE,t.value.toString()),t.selected&&(e.classList.toggle(T.classes.ITEM_SELECTED,!0),e.setAttribute("aria-current","true")),t.disabled&&e.setAttribute("disabled","true");let o=document.createElement("forge-state-layer");e.appendChild(o);let a=document.createElement("forge-focus-indicator");return a.inward=!0,e.appendChild(a),e})}function S6(n){let t=document.createElement("div");return t.id=n,t.setAttribute("aria-hidden","true"),t}function Hn(n){for(;n.childNodes.length>1;)n.firstChild&&n.removeChild(n.firstChild)}var Vi=class extends I{constructor(e){super(e);this.component=e;this._container=w(e,T.selectors.CONTAINER)}registerClickListener(e){this._container.addEventListener("click",e)}unregisterClickListener(e){this._container.removeEventListener("click",e)}registerIntersectionObserver(e){let o=this._container.querySelector(T.selectors.LIST_WRAPPER);if(!o)return;let a={root:o};this._intersectionObserver=new IntersectionObserver(e,a);let s=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM),r=this._container.querySelector(T.selectors.SCROLL_SPY_TOP);s&&this._intersectionObserver.observe(s),r&&this._intersectionObserver.observe(r)}unregisterIntersectionObserver(){this._intersectionObserver&&(this._intersectionObserver.disconnect(),this._intersectionObserver=void 0)}setAnimationType(e){this._container.setAttribute(T.attributes.DATA_ANIMATION,e)}setClosed(){this._container.classList.remove(T.classes.OPEN),this._container.classList.add(T.classes.CLOSING),Gt(this._container,T.classes.CLOSING,!0).then(()=>{n2(this._container),this.toggleHostAttribute("hidden",!0)})}setOpenAsGrid(e,o,a,s,r){let l=Ii(e);r&&Gt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{Hn(this._container),this.setFocusAtIndex(o,a,s)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),r||this.setFocusAtIndex(o,a,s)}setOpenAsList(e,o,a,s,r){let l=k6(e);r&&Gt(this._container,T.classes.REPLACING_VIEW,!0).then(()=>{Hn(this._container),this.setFocusAtIndex(o,a,s)}),this._container.appendChild(l),this.toggleHostAttribute("hidden",!1),this._container.classList.add(T.classes.OPEN),this._scrollItemIntoView("selected"),r||this.setFocusAtIndex(o,a,s)}appendListItemsToStart(e){let o=this._container.querySelector(T.selectors.LIST_WRAPPER),a=this._container.querySelector(T.selectors.LIST),s=a==null?void 0:a.querySelector(T.selectors.ITEM);if(o&&a&&s){let r=o.scrollTop,l=o.scrollHeight-o.clientHeight;Li(e).forEach(v=>{a.insertBefore(v,s)});let h=o.scrollHeight-o.clientHeight;o.scrollTop=r+(h-l)}}appendListItemsToEnd(e){let o=this._container.querySelector(T.selectors.LIST),a=this._container.querySelector(T.selectors.SCROLL_SPY_BOTTOM);o&&a&&Li(e).forEach(s=>{o.insertBefore(s,a)})}animateInFromLeft(e,o){Gt(this._container,T.classes.SLIDE_RIGHT,!0).then(()=>{Hn(this._container),o&&o()});let a=Ii(e);this._container.appendChild(a)}animateInFromRight(e,o){Gt(this._container,T.classes.SLIDE_LEFT,!0).then(()=>{Hn(this._container),o&&o()});let a=Ii(e);this._container.appendChild(a)}setFocusAtIndex(e,o,a){var h;let s=this._container.querySelector(T.selectors.FOCUSED);s==null||s.classList.remove(T.classes.ITEM_FOCUSED),s==null||s.setAttribute("tabindex","-1");let r=s==null?void 0:s.querySelector("forge-focus-indicator");r&&(r.active=!1);let l=(h=this._container.querySelectorAll(T.selectors.ITEM))==null?void 0:h[e];if(l){if(l.classList.add(T.classes.ITEM_FOCUSED),l.setAttribute("tabindex",a?"-1":"0"),o&&!a)l.focus();else if(a){let v=l.querySelector("forge-focus-indicator");v&&(v.active=!0)}this._scrollItemIntoView("focused")}}_scrollItemIntoView(e){let o=this._container.querySelector(T.selectors.LIST),a=o==null?void 0:o.querySelector(e==="selected"?T.selectors.SELECTED:T.selectors.FOCUSED);o&&a&&Kn(o.parentElement,a,e==="selected"?"auto":"smooth",e==="selected"?"center":"nearest")}};var Ci=class{constructor(t){this._adapter=t;this._animationType="scale";this._columnCount=3;this._focusedIndex=0;this._list=!1;this._open=!1;this._options=[];this._preventFocus=!1;this._sliceEnd=-1;this._sliceStart=-1;this._clickListener=e=>this._onClick(e),this._intersectionObserverCallback=e=>this._onIntersection(e)}initialize(){this._applyAnimationType(),this._applyPreventFocus(),this._adapter.setHostAttribute("exportparts",Object.values(T.parts).join(", ")),this._adapter.toggleHostAttribute("hidden",!0),this._adapter.registerClickListener(this._clickListener)}destroy(){this._adapter.unregisterClickListener(this._clickListener),this._adapter.unregisterIntersectionObserver()}openAsGrid(t,e){this._list=!1,this._options=t,this._focusedIndex=0,this._setColumnCount(),this._adapter.setOpenAsGrid(t,this._focusedIndex,e,this._preventFocus,this._open),this._setGridListeners(),this._open=!0,this._emitFocusChangeEvent()}openAsList(t,e){this._list=!0,this._options=t;let o=this._getOptionSliceIncludingSelected();this._focusedIndex=Math.max(t.findIndex(a=>a.selected),this._sliceStart),this._adapter.setOpenAsList(o,this._focusedIndex-this._sliceStart,e,this._preventFocus,this._open),this._setListListeners(),this._open=!0,this._emitFocusChangeEvent()}close(){this._open=!1,this._options=[],this._adapter.setClosed()}animateIn(t,e,o){let a=()=>{this._setFocusFromStoredIndex(o)};e==="left"?this._adapter.animateInFromLeft(t,a):this._adapter.animateInFromRight(t,a),this._options=t,this._setColumnCount()}selectFocusedItem(){var t;this._adapter.emitHostEvent(T.events.SELECT,(t=this._options[this._focusedIndex])==null?void 0:t.value)}moveFocusBackward(){if(this._list)return!0;let t=this._focusedIndex-1,e=t>=0&&t%this._columnCount!==this._columnCount-1;return this._focusedIndexAfterAnimation=e?void 0:t+this._columnCount,this._tryMoveFocus(t,e)}moveFocusDown(){if(this._list){let t=Math.min(this._focusedIndex+=1,this._options.length-1);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex+this._columnCount,e=t<this._options.length;this._focusedIndexAfterAnimation=e?void 0:t%this._columnCount,this._tryMoveFocus(t,e)}}moveFocusForward(){if(this._list)return!0;let t=this._focusedIndex+1,e=t<this._options.length&&t%this._columnCount!==0;return this._focusedIndexAfterAnimation=e?void 0:t-this._columnCount,this._tryMoveFocus(t,e)}moveFocusUp(){if(this._list){let t=Math.max(this._focusedIndex-=1,0);this._tryMoveFocus(t,!0)}else{let t=this._focusedIndex-this._columnCount,e=t>=0;this._focusedIndexAfterAnimation=e?void 0:this._options.length+t,this._tryMoveFocus(t,e)}}_tryMoveFocus(t,e){var o;return e&&!((o=this._options[t])!=null&&o.disabled)&&(this._focusedIndex=t,this._adapter.setFocusAtIndex(this._list?this._focusedIndex-this._sliceStart:this._focusedIndex,!0,this._preventFocus),this._emitFocusChangeEvent()),e}_setFocusFromStoredIndex(t){var e,o;this._focusedIndexAfterAnimation!==void 0&&(this._options[this._focusedIndexAfterAnimation]&&!((e=this._options[this._focusedIndexAfterAnimation])!=null&&e.disabled)?this._focusedIndex=this._focusedIndexAfterAnimation:(o=this._options[0])!=null&&o.disabled?this._focusedIndex=this._options.findIndex(a=>!a.disabled):this._focusedIndex=this._options.length-this._options.slice().reverse().findIndex(a=>!a.disabled)-1,this._focusedIndexAfterAnimation=void 0,this._adapter.setFocusAtIndex(this._focusedIndex,t,this._preventFocus),this._emitFocusChangeEvent())}_onClick(t){let e=C2(t).find(a=>a.classList&&a.classList.contains(T.classes.ITEM)),o=e==null?void 0:e.getAttribute(T.attributes.DATA_VALUE);O(o)&&this._adapter.emitHostEvent(T.events.SELECT,+o)}_onIntersection(t){this._sliceStart>0&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_TOP&&e.isIntersecting)&&this._adapter.appendListItemsToStart(this._getPreviousOptionsSlice()),this._sliceEnd<this._options.length&&t.some(e=>e.target.id===T.ids.SCROLL_SPY_BOTTOM&&e.isIntersecting)&&this._adapter.appendListItemsToEnd(this._getNextOptionsSlice())}_setColumnCount(){this._columnCount=this._options.length>=T.numbers.LARGE_ITEM_SET?T.numbers.FOUR_COL:T.numbers.THREE_COL}_emitFocusChangeEvent(){var t;this._adapter.emitHostEvent(T.events.FOCUS_CHANGE,(t=this._options[this._focusedIndex])==null?void 0:t.value)}_setGridListeners(){this._adapter.unregisterIntersectionObserver()}_setListListeners(){this._adapter.unregisterIntersectionObserver(),this._adapter.registerIntersectionObserver(this._intersectionObserverCallback)}_getOptionSliceIncludingSelected(){if(this._options.length<=T.numbers.LIST_SLICE_SIZE)return this._sliceStart=0,this._sliceEnd=this._options.length,this._options.slice();let t=Math.max(this._options.findIndex(a=>a.selected),0),e=Math.max(Math.floor(t-T.numbers.LIST_SLICE_SIZE/2),0),o=e+T.numbers.LIST_SLICE_SIZE;return o>this._options.length&&(e=this._options.length-1-T.numbers.LIST_SLICE_SIZE,o=this._options.length),this._sliceStart=e,this._sliceEnd=o,this._options.slice(this._sliceStart,this._sliceEnd)}_getNextOptionsSlice(){let t=Math.min(this._sliceEnd+T.numbers.LIST_SLICE_SIZE,this._options.length),e=this._options.slice(this._sliceEnd,t);return this._sliceEnd=t,e}_getPreviousOptionsSlice(){let t=Math.max(this._sliceStart-T.numbers.LIST_SLICE_SIZE,0),e=this._options.slice(t,this._sliceStart);return this._sliceStart=t,e}_applyAnimationType(){this._adapter.setHostAttribute(T.attributes.ANIMATION_TYPE,this._animationType),this._adapter.setAnimationType(this._animationType)}_applyPreventFocus(){this._adapter.toggleHostAttribute(T.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setFocusAtIndex(this._focusedIndex,!1,this._preventFocus)}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._applyAnimationType())}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._applyPreventFocus())}};var g_='<template><div class="forge-calendar-menu" part="root"></div></template>',w_='.forge-calendar-menu{background-color:var(--forge-theme-surface,#fff);position:relative;height:100%;width:100%;overflow:hidden}.forge-calendar-menu__view{position:absolute;top:0;left:0;height:100%;width:100%;background-color:inherit}.forge-calendar-menu__grid{max-height:var(--forge-calendar-menu-max-height,320px);display:grid;gap:16px;justify-items:center;align-items:center;padding:8px;box-sizing:border-box}.forge-calendar-menu__grid--three-col{grid-template-columns:repeat(3,1fr)}.forge-calendar-menu__grid--four-col{grid-template-columns:repeat(4,1fr)}.forge-calendar-menu__list{position:relative;background-color:inherit}.forge-calendar-menu__list__wrapper{position:relative;height:100%;overflow:auto}.forge-calendar-menu__list__wrapper::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-calendar-menu__list__wrapper::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-calendar-menu__item--grid{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;border-radius:4px;overflow:hidden;font-weight:500;user-select:none}.forge-calendar-menu__item--grid:not([disabled]){border:1px solid var(--forge-theme-outline,#e0e0e0);cursor:pointer}.forge-calendar-menu__item--grid[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--grid.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container, #d1d5ed)}.forge-calendar-menu__item--list{display:flex;align-items:center;justify-content:center;margin:0 4px;width:calc(100% - 8px);height:48px;border-radius:4px;overflow:hidden;text-align:center;cursor:pointer;position:relative}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar-menu__item--list.forge-calendar-menu__item--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar-menu__item--focused,.forge-calendar-menu__item:focus{outline:0}.forge-calendar-menu--open{animation-duration:.2s;animation-name:scale-open;transform-origin:top center}.forge-calendar-menu--open[data-animation=fade]{animation-name:fade-in}.forge-calendar-menu--open[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--open{animation-name:fade-in}}.forge-calendar-menu--closing{animation-duration:.2s;animation-name:scale-closed;transform-origin:top center}.forge-calendar-menu--closing[data-animation=fade]{animation-name:fade-out}.forge-calendar-menu--closing[data-animation=none]{animation-duration:1ms}@media (prefers-reduced-motion){.forge-calendar-menu--closing{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-right .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:slide-out-to-left}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:first-child{animation-name:fade-out}}.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:slide-in-from-right}@media (prefers-reduced-motion){.forge-calendar-menu--slide-left .forge-calendar-menu__view:last-child{animation-name:fade-in}}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:first-child{animation-duration:.2s;animation-name:fade-out}.forge-calendar-menu--replacing-view .forge-calendar-menu__view:last-child{animation-duration:.2s;animation-name:fade-in}#scroll-spy-bottom{position:absolute;bottom:0;height:48px;pointer-events:none}#scroll-spy-top{position:absolute;top:0;height:48px;pointer-events:none}@keyframes scale-open{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@keyframes scale-closed{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.4)}}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0}}@keyframes slide-in-from-left{from{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-from-right{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-out-to-left{from{transform:translateX(0)}to{transform:translateX(-100%)}}@keyframes slide-out-to-right{from{transform:translateX(0)}to{transform:translateX(100%)}}:host{display:block;position:absolute;top:0;left:0;height:100%;width:100%}:host([hidden]){display:none}:host([forge-popover-context=true]) .forge-calendar-menu{background-color:var(--forge-theme-surface-bright,#fff)}',je=class extends M{static get observedAttributes(){return[T.attributes.ANIMATION_TYPE,T.attributes.PREVENT_FOCUS]}constructor(){super(),H(this,g_,w_),this._core=new Ci(new Vi(this))}connectedCallback(){!this.hasAttribute(T.attributes.POPOVER_CONTEXT)&&Yo(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(T.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case T.attributes.ANIMATION_TYPE:this.animationType=o;break;case T.attributes.PREVENT_FOCUS:this.preventFocus=p(o);break}}animateIn(t,e,o=!1){this._core.animateIn(t,e,o)}close(){this._core.close()}moveFocusDown(){this._core.moveFocusDown()}moveFocusBackward(){return this._core.moveFocusBackward()}moveFocusForward(){return this._core.moveFocusForward()}moveFocusUp(){this._core.moveFocusUp()}openAsGrid(t,e=!1){this._core.openAsGrid(t,e)}openAsList(t,e=!1){this._core.openAsList(t,e)}selectFocusedItem(){this._core.selectFocusedItem()}};i([c()],je.prototype,"animationType",2),i([c()],je.prototype,"preventFocus",2),je=i([y({name:T.elementName,dependencies:[r1,J]})],je);function S51(){f(je)}var In=`${b}calendar`,u_={ALLOW_SINGLE_DATE_RANGE:"allow-single-date-range",CLEAR_BUTTON:"clear-button",CONSTRAIN_TO_ENABLED:"constrain-to-enabled",FIRST_DAY_OF_WEEK:"first-day-of-week",FIXED_HEIGHT:"static-height",LIST_YEARS:"list-years",LOCALE:"locale",MAX:"max",MENU_ANIMATION:"menu-animation",MIN:"min",MODE:"mode",MONTH:"month",PREVENT_FOCUS:"prevent-focus",READONLY:"readonly",SELECTION_FOLLOWS_MONTH:"selection-follows-month",SHOW_HEADER:"show-header",SHOW_OTHER_MONTHS:"show-other-months",SHOW_TODAY:"show-today",TODAY_BUTTON:"today-button",VIEW:"view",YEAR:"year",YEAR_RANGE:"year-range"},__=S(d({},u_),{DATA_DATE:"data-date",DATA_EVENT_THEME:"data-event-theme",POPOVER_CONTEXT:"forge-popover-context"}),ge={ALLOW_SINGLE_DATE_RANGE:"forge-calendar--allow-single-date-range",DATE:"forge-calendar__date",DATE_GRID:"forge-calendar__date-grid",DATE_INNER:"forge-calendar__date__inner",DATE_OTHER_MONTH:"forge-calendar__date--other-month",DATE_SPACER:"forge-calendar__date-spacer",DATE_SELECTED:"forge-calendar__date--selected",DATE_TODAY:"forge-calendar__date--today",DATE_VIEW:"forge-calendar__date-view",DATE_VIEW_ROW:"forge-calendar__date-view__row",DATE_WRAPPER:"forge-calendar__date-wrapper",DAY:"forge-calendar__day",EVENT:"forge-calendar__event",EVENT_OVERFLOW:"forge-calendar__event--overflow",EVENT_WRAPPER:"forge-calendar__event__wrapper",FIXED_HEIGHT:"forge-calendar--fixed-height",FOOTER:"forge-calendar__footer",HEADER:"forge-calendar__header",MONTH_MENU_OPEN:"forge-calendar--month-menu-open",PREVENT_FOCUS:"forge-calendar--prevent-focus",RANGE:"forge-calendar__range",RANGE_END:"forge-calendar__range--end",RANGE_START:"forge-calendar__range--start",RANGE_TARGET:"forge-calendar__range__target",READONLY:"forge-calendar--readonly",RTL:"forge-calendar--rtl",SHOW_OTHER_MONTHS:"forge-calendar--show-other-months",SHOW_TODAY:"forge-calendar--show-today",VIEW:"forge-calendar__view",YEAR_MENU_OPEN:"forge-calendar--year-menu-open"},st={ACCESSIBLE_HEADER:"accessible-header",ACCESSIBLE_MONTH:"accessible-month",ACCESSIBLE_YEAR:"accessible-year",CLEAR_BUTTON:"clear-button",DATE_GRID:"date-grid",DATE_VIEW:"date-view",DAY_ROW:"day-row",FOOTER:"footer",HEADER:"header",MENU:"menu",MONTH_BUTTON:"month-button",NEXT_BUTTON:"next-button",NEXT_BUTTON_TOOLTIP:"next-button-tooltip",PREVIOUS_BUTTON:"previous-button",PREVIOUS_BUTTON_TOOLTIP:"previous-button-tooltip",TODAY_BUTTON:"today-button",YEAR_BUTTON:"year-button"},x_={PREVIOUS_MONTH_BUTTON_TEXT:"previous-month-button-text",NEXT_MONTH_BUTTON_TEXT:"next-month-button-text",PREVIOUS_YEAR_BUTTON_TEXT:"previous-year-button-text",NEXT_YEAR_BUTTON_TEXT:"next-year-button-text",PREVIOUS_YEARS_BUTTON_TEXT:"previous-years-button-text",NEXT_YEARS_BUTTON_TEXT:"next-years-button-text",TODAY_BUTTON_TEXT:"today-button-text",CLEAR_BUTTON_TEXT:"clear-button-text"},f_={SUNDAY:"sunday",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday"},b_=S(d({},f_),{CLEAR_BUTTON:"clear-button",DATE:"date",DATE_OTHER_MONTH:"date-other-month",DATE_VIEW:"date-view",DATE_WRAPPER:"date-wrapper",DAY:"day",EVENT:"event",EVENT_WRAPPER:"event-wrapper",FOOTER:"footer",HEADER:"header",MONTH_BUTTON:"month-button",MONTH_BUTTON_ELEMENT:"month-button-element",NEXT_BUTTON:"next-button",PREVIOUS_BUTTON:"previous-button",RANGE:"range",RANGE_END:"range-end",RANGE_START:"range-start",TODAY:"today",TODAY_BUTTON:"today-button",WEEKEND:"weekend",YEAR_BUTTON:"year-button",YEAR_BUTTON_ELEMENT:"year-button-element"}),y_={ACCESSIBLE_HEADER:`#${st.ACCESSIBLE_HEADER}`,ACCESSIBLE_MONTH:`#${st.ACCESSIBLE_MONTH}`,ACCESSIBLE_YEAR:`#${st.ACCESSIBLE_YEAR}`,CALENDAR:".forge-calendar",CLEAR_BUTTON:`#${st.CLEAR_BUTTON}`,DATE:`.${ge.DATE}`,DATE_GRID:`#${st.DATE_GRID}`,DATE_INNER:`.${ge.DATE_INNER}`,DATE_OTHER_MONTH:`.${ge.DATE_OTHER_MONTH}`,DATE_SPACER:`.${ge.DATE_SPACER}`,DATE_SELECTED:`.${ge.DATE_SELECTED}`,DATE_TODAY:`.${ge.DATE_TODAY}`,DATE_VIEW:`#${st.DATE_VIEW}`,DATE_WRAPPER:`.${ge.DATE_WRAPPER}`,DAY_ROW:`#${st.DAY_ROW}`,EVENT_WRAPPER:`.${ge.EVENT_WRAPPER}`,FOOTER:`#${st.FOOTER}`,HEADER:`#${st.HEADER}`,MENU:T.elementName,MONTH_BUTTON:`#${st.MONTH_BUTTON}`,NEXT_BUTTON:`#${st.NEXT_BUTTON}`,NEXT_BUTTON_TOOLTIP:`#${st.NEXT_BUTTON_TOOLTIP}`,PREVIOUS_BUTTON:`#${st.PREVIOUS_BUTTON}`,PREVIOUS_BUTTON_TOOLTIP:`#${st.PREVIOUS_BUTTON_TOOLTIP}`,RANGE:`.${ge.RANGE}`,RANGE_END:`.${ge.RANGE_END}`,RANGE_START:`.${ge.RANGE_START}`,TODAY_BUTTON:`#${st.TODAY_BUTTON}`,TOOLTIP:a1.elementName,VIEW:"#view",YEAR_BUTTON:`#${st.YEAR_BUTTON}`},M_={DATE_SELECT:`${In}-date-select`,FOCUS_CHANGE:`${In}-focus-change`,MONTH_CHANGE:`${In}-month-change`,VIEW_CHANGE:`${In}-view-change`},z_={DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT:"Previous month",DEFAULT_NEXT_MONTH_BUTTON_TEXT:"Next month",DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT:"Previous year",DEFAULT_NEXT_YEAR_BUTTON_TEXT:"Next year",DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT:"Previous years",DEFAULT_NEXT_YEARS_BUTTON_TEXT:"Next years",DEFAULT_TODAY_BUTTON_TEXT:"Today",DEFAULT_CLEAR_BUTTON_TEXT:"Clear"},H_={DEFAULT_MAX_YEAR_OFFSET:50,DEFAULT_MIN_YEAR_OFFSET:50,FINAL_WEEK_BEGIN_INDEX:35,MONTH_LENGTH:42,PENULTIMATE_WEEK_BEGIN_INDEX:28,WEEK_LENGTH:7,YEARS_IN_VIEW:20},g={elementName:In,attributes:__,classes:ge,ids:st,slots:x_,parts:b_,selectors:y_,events:M_,strings:z_,numbers:H_},Ln=(l=>(l[l.Sunday=0]="Sunday",l[l.Monday=1]="Monday",l[l.Tuesday=2]="Tuesday",l[l.Wednesday=3]="Wednesday",l[l.Thursday=4]="Thursday",l[l.Friday=5]="Friday",l[l.Saturday=6]="Saturday",l))(Ln||{}),O6=(o=>(o[o.First=1]="First",o[o.Last=2]="Last",o[o.Current=3]="Current",o))(O6||{});function t3(n,t,e){return e||(e=navigator.language),new Date(2017,0,n+1).toLocaleString(e,{weekday:t})}function D6(n,t,e){return e||(e=navigator.language),new Date(1970,0,n).toLocaleDateString(e,{day:t})}function ro(n,t,e){return e||(e=navigator.language),new Date(1970,n,1).toLocaleString(e,{month:t})}function y0(n,t,e){return e||(e=navigator.language),new Date(n,0,1).toLocaleDateString(e,{year:t})}function P6(n){n||(n=navigator.language);let t=n.match(/^([a-z]{2,3})(?:-([a-z]{3})(?=$|-))?(?:-([a-z]{4})(?=$|-))?(?:-([a-z]{2}|\d{3})(?=$|-))?/i);if(!t||!t.length)return 1;let e=t[1],o=t[4],a="AEAFBHDJDZEGIQIRJOKWLYOMQASDSY".match(/../g),s="AGARASAUBDBRBSBTBWBZCACNCODMDOETGTGUHKHNIDILINJMJPKEKHKRLAMHMMMOMTMXMZNINPPAPEPHPKPRPTPYSASGSVTHTTTWUMUSVEVIWSYEZAZW".match(/../g),r=["ar","arq","arz","fa"],l="amasbndzengnguhehiidjajvkmknkolomhmlmrmtmyneomorpapssdsmsnsutatethtnurzhzu".match(/../g);return o?s&&s.includes(o)?0:a&&a.includes(o)?6:1:l&&l.includes(e)?0:r&&r.includes(e)?6:1}function N6(n){switch(n||(n=navigator.language),n.split("-")[1]){case"DZ":case"BH":case"BD":case"EG":case"IQ":case"IL":case"JO":case"KW":case"LY":case"MV":case"MR":case"NP":case"OM":case"QA":case"SA":case"SD":case"SY":case"AE":case"YE":case"AF":case"IR":return[4,5];case"BN":return[0,5];default:return[0,6]}}function R6(n){return n||(n=navigator.language),["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","sd","ur","uz-AF","yi"].some(e=>n?n.startsWith(e):!1)}function I_(n){return`d${n}`}function rt(n){let t=String(n.getMonth()).padStart(2,"0"),e=String(n.getDate()).padStart(2,"0");return["d",n.getFullYear(),t,e].join("")}function e3(n){let t=String(n.getMonth()).padStart(2,"0"),e=String(n.getDate()).padStart(2,"0");return["e",n.getFullYear(),t,e].join("")}function F6(n,t){let e=document.createElement("div");return e.classList.add(g.classes.DAY),e.id=I_(n),e.setAttribute("role","columnheader"),e.setAttribute("aria-label",t3(n,"long",t)),e.setAttribute("part",g.parts.DAY),e.textContent=t3(n,"short",t),e}function U6(n,t,e){var a;let o=document.createElement("div");return o.classList.add(g.classes.DATE_VIEW_ROW),o.setAttribute("role","row"),t>0&&!((a=n[0])!=null&&a.thisMonth)?(n.forEach(s=>o.appendChild(Ei(s.date))),o.setAttribute("aria-hidden","true")):n.forEach(s=>{let r=s.thisMonth||e!=null&&e.showOtherMonths?o3(s,e==null?void 0:e.locale):Ei(s.date);(s.thisMonth||e!=null&&e.showOtherMonths)&&(e!=null&&e.builder)&&(r=e.builder(s,r)),o.appendChild(r)}),o}function o3(n,t){let e=document.createElement("div"),o=document.createElement("div"),a=document.createElement("div"),s=document.createElement("forge-state-layer");s.disabled=n.disabled;let r=document.createElement("forge-focus-indicator");r.inward=!0;let l=n.date.getDay();e.id=rt(n.date),e.tabIndex=-1,e.classList.add(g.classes.DATE),e.classList.toggle(g.classes.DATE_TODAY,n.today),e.classList.toggle(g.classes.DATE_SELECTED,n.selected),e.classList.toggle(g.classes.DATE_OTHER_MONTH,!n.thisMonth),e.setAttribute("role","gridcell"),e.setAttribute("aria-disabled",n.disabled.toString()),e.setAttribute("aria-label",`${n.today?"Today, ":""}${n.date.toLocaleDateString(t!=null?t:navigator.language,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}`),e.setAttribute("aria-selected",n.selected.toString()),e.setAttribute(g.attributes.DATA_DATE,n.date.toDateString()),e.toggleAttribute("disabled",n.disabled),e.setAttribute("part",g.parts.DATE_WRAPPER);let h="";switch(l){case 0:h=g.parts.SUNDAY;break;case 1:h=g.parts.MONDAY;break;case 2:h=g.parts.TUESDAY;break;case 3:h=g.parts.WEDNESDAY;break;case 4:h=g.parts.THURSDAY;break;case 5:h=g.parts.FRIDAY;break;case 6:h=g.parts.SATURDAY;break}return $o(a,"part",h),$o(a,"part",g.parts.DATE),Ka(a,"part",g.parts.TODAY,n.today),Ka(a,"part",g.parts.DATE_OTHER_MONTH,!n.thisMonth),o.classList.add(g.classes.RANGE_TARGET),e.appendChild(o),a.textContent=D6(n.date.getDate(),"numeric",t),a.classList.add(g.classes.DATE_INNER),e.appendChild(a),e.appendChild(s),e.appendChild(r),e}function Ei(n){let t=document.createElement("span");return t.classList.add(g.classes.DATE_SPACER),t.id=rt(n),t}function W6(n){let t=document.createElement("div");return t.classList.add(g.classes.EVENT_WRAPPER),t.id=e3(n),t.setAttribute("part",g.parts.EVENT_WRAPPER),t}function G6(n,t){let e=document.createElement("forge-icon");if(e.classList.add(g.classes.EVENT),e.setAttribute("part",g.parts.EVENT),t)e.classList.add(g.classes.EVENT_OVERFLOW),e.name="add";else{let o='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"></path><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" stroke="var(--forge-calendar-event-stroke-color)" stroke-width="4px" paint-order="stroke"></path></svg>';e.src=o,e.setAttribute(g.attributes.DATA_EVENT_THEME,n.color)}return e}function q6(n){let t=document.createElement("forge-tooltip");return t.textContent=n,t}function a3(){let n=document.createElement("div");n.classList.add(g.classes.HEADER),n.id=g.ids.HEADER,n.setAttribute("part",g.parts.HEADER);let t=document.createElement("forge-icon-button"),e=document.createElement("forge-icon"),o=document.createElement("forge-tooltip");t.setAttribute("part",g.parts.PREVIOUS_BUTTON),t.id=g.ids.PREVIOUS_BUTTON,t.type="button",e.setAttribute("name","keyboard_arrow_left"),o.id=g.ids.PREVIOUS_BUTTON_TOOLTIP,o.setAttribute("aria-hidden","true"),o.type="label",o.innerText="Previous",t.appendChild(o),t.appendChild(e);let a=document.createElement("forge-icon-button"),s=document.createElement("forge-icon"),r=document.createElement("forge-tooltip");a.setAttribute("part",g.parts.NEXT_BUTTON),a.id=g.ids.NEXT_BUTTON,a.type="button",s.setAttribute("name","keyboard_arrow_right"),r.id=g.ids.NEXT_BUTTON_TOOLTIP,r.setAttribute("aria-hidden","true"),r.type="label",r.innerText="Next",a.appendChild(r),a.appendChild(s);let l=document.createElement("forge-button");l.setAttribute("part",g.parts.MONTH_BUTTON),l.id=g.ids.MONTH_BUTTON,l.type="button",l.setAttribute("aria-pressed","false");let h=document.createElement("forge-button");h.setAttribute("part",g.parts.YEAR_BUTTON),h.id=g.ids.YEAR_BUTTON,h.type="button",h.setAttribute("aria-pressed","false");let v=document.createElement("div");return v.setAttribute("aria-live","polite"),v.appendChild(l),v.appendChild(h),n.appendChild(t),n.appendChild(v),n.appendChild(a),n}function Y6(n,t){let e=document.createElement("span"),o=document.createElement("forge-icon");return e.innerHTML=ro(n,"long",t),o.setAttribute("name","arrow_drop_down"),[e,o]}function K6(n,t){let e=document.createElement("span"),o=document.createElement("forge-icon");return e.innerHTML=y0(n,"numeric",t),o.setAttribute("name","arrow_drop_down"),[e,o]}function n3(){let n=document.createElement("div");n.id=g.ids.ACCESSIBLE_HEADER,n.setAttribute("aria-live","polite");let t=document.createElement("span");t.id=g.ids.ACCESSIBLE_MONTH;let e=document.createElement("span");return e.id=g.ids.ACCESSIBLE_YEAR,n.appendChild(t),n.appendChild(e),n}function $6(){let n=document.createElement("div");return n.id=g.ids.FOOTER,n.classList.add(g.classes.FOOTER),n.setAttribute("part",g.parts.FOOTER),n}function X6(){let n=document.createElement("forge-button");n.id=g.ids.CLEAR_BUTTON,n.setAttribute("part",g.parts.CLEAR_BUTTON),n.type="button";let t=document.createElement("slot");return t.name=g.slots.CLEAR_BUTTON_TEXT,t.innerText=g.strings.DEFAULT_CLEAR_BUTTON_TEXT,n.appendChild(t),n}function Z6(){let n=document.createElement("forge-button");n.id=g.ids.TODAY_BUTTON,n.setAttribute("part",g.parts.TODAY_BUTTON),n.type="button";let t=document.createElement("slot");return t.name=g.slots.TODAY_BUTTON_TEXT,t.innerText=g.strings.DEFAULT_TODAY_BUTTON_TEXT,n.appendChild(t),n}function Vn(n,t){let e=C2(n).find(o=>o.classList&&o.classList.contains(g.classes.DATE));return!e||!t&&e.hasAttribute("disabled")?null:e}function j6(n,t){let e=C2(n).find(o=>o.id===t);return e!=null?e:null}function s3(n,t,e,o){n.tabIndex=o?-1:t;let a=n.querySelector("forge-focus-indicator");a&&(a.active=!!o&&t>-1),t>-1&&e&&!o?n.focus():n.blur()}var l2=class n{constructor(t){t&&(this.from=t.from?new Date(t.from):void 0,this.to=t.to?new Date(t.to):void 0)}copy(){return new n(this)}};function r3(n,t,e=0){let o=[],a=Cn(new Date(t,n,1),e),s=new Date(a);s.setDate(a.getDate()+g.numbers.MONTH_LENGTH);for(let r=a;r<s;r.setDate(r.getDate()+1))o.push(new Date(r));return o}function g31(n,t=0){let e=[],o=Cn(n,t),a=new Date(o);a.setDate(o.getDate()+7);for(let s=o;s<a;s.setDate(s.getDate()+1))e.push(new Date(s));return e}function Cn(n,t=0){let e=n.getDay(),o=new Date(n),a=e>=t?e-t:7+(e-t);return o.setDate(n.getDate()-a),o.setHours(0,0,0,0),o}function Q6(n,t=0){let e=Cn(n,t);return e.setDate(e.getDate()+6),e}function w31(n,t){return new Date(t,n,1).getDay()}function Bi(n=0){let t=[],e=n;do t.push(e),e+=1,e%=7;while(e!==n);return t}function J6(n){return b2(new Date,n)}function xt(n,t,e){return n.getMonth()===t&&n.getFullYear()===e}function L_(n,t,e){return n>t&&n<e||b2(n,t)||b2(n,e)}function Ai(n){return n.sort((t,e)=>t.getTime()-e.getTime())}function tp(n){let t=[];for(let e=0;e<n.length;e+=7){let o=n.slice(e,e+7);t.push(o)}return t}function Fo(n){if(!n.length)return new l2;if(n.length===1)return new l2({from:new Date(n[0])});let t=Ti(n);return new l2({from:t[0],to:t[t.length-1]})}function ep(n){let t=[];return n.from&&t.push(new Date(n.from)),n.to&&t.push(new Date(n.to)),t}function Ti(n){if(!n.length)return[];if(n.length===1)return[new Date(n[0])];let t=Ai(n.slice().map(e=>new Date(e)));return[new Date(t[0]),new Date(t[t.length-1])]}function Si(n,t,e){return!t||!e?[]:n.filter(o=>L_(o,t,e))}function i3(n){let t=`${n.length} event${n.length===1?"":"s"}`,e=n.map(o=>o.label).join(", ");return e!=null&&e.length&&(t+=`: ${e}`),t}function V_(n){var o,a;let t=new Date;return((a=(o=n.match(/-?[0-9]*[a-zA-Z]/g))==null?void 0:o.map(s=>s.trim()))!=null?a:[]).forEach(s=>{let r=s.slice(-1),l=+s.slice(0,-1);switch(r){case"y":t.setFullYear(t.getFullYear()+l);break;case"m":t.setMonth(t.getMonth()+l);break;case"w":t.setDate(t.getDate()+l*7);break;case"d":t.setDate(t.getDate()+l);break}}),t.setHours(0,0,0,0),t}function op(n){let t=n.split(":");if((t==null?void 0:t.length)<2)return{min:1970,max:1970};let e=new Date().getFullYear(),o=t.slice(0,2).map(a=>a.startsWith("-")?e-+a.substring(1):a.startsWith("+")?e+ +a.substring(1):+a);return{min:o[0],max:o[1]}}function ap(n){var s,r,l,h,v,m,u,z;let t=(r=(s=n.min)==null?void 0:s.getFullYear())!=null?r:0,e=(h=(l=n.max)==null?void 0:l.getFullYear())!=null?h:0,o=(m=(v=n.min)==null?void 0:v.getMonth())!=null?m:-1,a=(z=(u=n.max)==null?void 0:u.getMonth())!=null?z:12;return[...Array(12).keys()].map(x=>{let C=n.min?n.selectedYear<t||n.selectedYear===t&&x<o:!1,E=n.max?n.selectedYear>e||n.selectedYear===e&&x>a:!1;return{value:x,label:ro(x,"long",n.locale),selected:x===n.selectedMonth,disabled:C||E}})}function np(n){let t=[],e=n.yearInView%g.numbers.YEARS_IN_VIEW,o=n.yearInView-e;for(let a=o;a<o+g.numbers.YEARS_IN_VIEW;a++)t.push({value:a,label:y0(a,"numeric",n.locale),selected:a===n.selectedYear,disabled:a<n.min||a>n.max});return t}function sp(n){let t=[];for(let e=n.min;e<=n.max;e++)t.push({value:e,label:y0(e,"numeric",n.locale),selected:e===n.selectedYear});return t}function za(n,t){return t.some(e=>b2(e,n))}function ft(n,t){return!!(t.minDate&&n<t.minDate||t.maxDate&&n>t.maxDate||t.otherMonth||t.disabledDates.some(e=>b2(e,n))||t.disabledDaysOfWeek.includes(n.getDay())||t.builder&&t.builder(n))}function En(n,t){return t.findIndex(e=>b2(e,n))}function ki(n,t,e){let o=t.filter(a=>b2(a.date,n));if(e){let a=e(n);a&&(ht(a)?o.push(...a):o.push(a))}return o}function rp(n,t){if(!n.length)return[];let e=new Date(n[0]),o=n[n.length-1],a=[];for(;e<=o;)(!t||!ft(e,t))&&a.push(new Date(e)),e.setDate(e.getDate()+1);return a}function l3(n){let t=null;return typeof n=="string"&&!n.length&&(n=null),n!=null&&(G2(new Date(n))?t=new Date(n):n.length&&(t=V_(n)),t==null||t.setHours(0,0,0,0)),t}function c3(n,t,e){return e||!C2(n).length||!!(t==="date"&&Vn(n))||!!(t!=="date"&&j6(n,g.ids.MENU))}var Oi=class extends I{constructor(t){super(t),this._container=w(t,g.selectors.CALENDAR),this._dateView=w(t,g.selectors.DATE_VIEW),this._dayRow=w(t,g.selectors.DAY_ROW),this._dateGrid=w(t,g.selectors.DATE_GRID),this._menu=w(t,g.selectors.MENU)}toggleContainerAttribute(t,e,o){G(this._container,t,e,o)}registerMonthButtonListener(t){let e=this._container.querySelector(g.selectors.MONTH_BUTTON);e==null||e.addEventListener("click",t)}unregisterMonthButtonListener(t){let e=this._container.querySelector(g.selectors.MONTH_BUTTON);e==null||e.removeEventListener("click",t)}registerYearButtonListener(t){let e=this._container.querySelector(g.selectors.YEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterYearButtonListener(t){let e=this._container.querySelector(g.selectors.YEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerMenuListener(t){this._menu.addEventListener(T.events.SELECT,t)}unregisterMenuListener(t){this._menu.removeEventListener(T.events.SELECT,t)}registerMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}unregisterMenuFocusChangeEventListener(t){this._menu.addEventListener(T.events.FOCUS_CHANGE,t)}registerNextButtonListener(t){let e=this._container.querySelector(g.selectors.NEXT_BUTTON);e==null||e.addEventListener("click",t)}unregisterNextButtonListener(t){let e=this._container.querySelector(g.selectors.NEXT_BUTTON);e==null||e.removeEventListener("click",t)}registerPreviousButtonListener(t){let e=this._container.querySelector(g.selectors.PREVIOUS_BUTTON);e==null||e.addEventListener("click",t)}unregisterPreviousButtonListener(t){let e=this._container.querySelector(g.selectors.PREVIOUS_BUTTON);e==null||e.removeEventListener("click",t)}registerClearButtonListener(t){let e=this._container.querySelector(g.selectors.CLEAR_BUTTON);e==null||e.addEventListener("click",t)}unregisterClearButtonListener(t){let e=this._container.querySelector(g.selectors.CLEAR_BUTTON);e==null||e.removeEventListener("click",t)}registerTodayButtonListener(t){let e=this._container.querySelector(g.selectors.TODAY_BUTTON);e==null||e.addEventListener("click",t)}unregisterTodayButtonListener(t){let e=this._container.querySelector(g.selectors.TODAY_BUTTON);e==null||e.removeEventListener("click",t)}registerDateClickListener(t){this._dateGrid.addEventListener("click",t)}unregisterDateClickListener(t){this._dateGrid.removeEventListener("click",t)}registerKeydownListener(t){this._container.addEventListener("keydown",t)}registerHoverListener(t){this._dateGrid.addEventListener("mouseover",t)}unregisterHoverListener(t){this._dateGrid.removeEventListener("mouseover",t)}registerPreventFocusListener(t){this._container.addEventListener("mousedown",t)}unregisterPreventFocusListener(t){this._container.removeEventListener("mousedown",t)}setContainerClass(t,e){this._container.classList.toggle(t,e)}setHeader(){let t=this._container.querySelector(g.selectors.ACCESSIBLE_HEADER);t==null||t.remove();let e=this._container.querySelector(g.selectors.HEADER);e?e.replaceWith(a3()):this._container.prepend(a3())}removeHeader(){let t=this._container.querySelector(g.selectors.HEADER);t==null||t.remove();let e=this._container.querySelector(g.selectors.ACCESSIBLE_HEADER);e?e.replaceWith(n3()):this._container.prepend(n3())}setNextButtonDisabled(t){let e=this._container.querySelector(g.selectors.NEXT_BUTTON);e==null||e.toggleAttribute("disabled",t)}setPreviousButtonDisabled(t){let e=this._container.querySelector(g.selectors.PREVIOUS_BUTTON);e==null||e.toggleAttribute("disabled",t)}setNextButtonLabel(t){let e="",o="";switch(t){case"date":e=g.strings.DEFAULT_NEXT_MONTH_BUTTON_TEXT,o=g.slots.NEXT_MONTH_BUTTON_TEXT;break;case"month":e=g.strings.DEFAULT_NEXT_YEAR_BUTTON_TEXT,o=g.slots.NEXT_YEAR_BUTTON_TEXT;break;case"year":e=g.strings.DEFAULT_NEXT_YEARS_BUTTON_TEXT,o=g.slots.NEXT_YEARS_BUTTON_TEXT;break}let a=this._container.querySelector(g.selectors.NEXT_BUTTON_TOOLTIP);if(a){let s=document.createElement("slot");s.name=o,s.innerText=e,a.innerHTML=s.outerHTML}}setPreviousButtonLabel(t){let e="",o="";switch(t){case"date":e=g.strings.DEFAULT_PREVIOUS_MONTH_BUTTON_TEXT,o=g.slots.PREVIOUS_MONTH_BUTTON_TEXT;break;case"month":e=g.strings.DEFAULT_PREVIOUS_YEAR_BUTTON_TEXT,o=g.slots.PREVIOUS_YEAR_BUTTON_TEXT;break;case"year":e=g.strings.DEFAULT_PREVIOUS_YEARS_BUTTON_TEXT,o=g.slots.PREVIOUS_YEARS_BUTTON_TEXT;break}let a=this._container.querySelector(g.selectors.PREVIOUS_BUTTON_TOOLTIP);if(a){let s=document.createElement("slot");s.name=o,s.innerText=e,a.innerHTML=s.outerHTML}}setMonthButtonPressed(t){let e=this._container.querySelector(g.selectors.MONTH_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(g.classes.MONTH_MENU_OPEN,t))}setYearButtonPressed(t){let e=this._container.querySelector(g.selectors.YEAR_BUTTON);e&&(e.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(g.classes.YEAR_MENU_OPEN,t))}setMonth(t,e){let o=this._container.querySelector(g.selectors.MONTH_BUTTON);if(o){let s=Y6(t,e);o.replaceChildren(s[0],s[1]);return}let a=this._container.querySelector(g.selectors.ACCESSIBLE_MONTH);a&&(a.textContent=ro(t,"long",e))}setYear(t,e){let o=this._container.querySelector(g.selectors.YEAR_BUTTON);if(o){let s=K6(t,e);o.replaceChildren(s[0],s[1]);return}let a=this._container.querySelector(g.selectors.ACCESSIBLE_YEAR);a&&(a.textContent=y0(t,"numeric",e))}setFooter(){this._container.querySelector(g.selectors.FOOTER)||this._container.appendChild($6())}removeFooter(){var e;let t=this._container.querySelector(g.selectors.FOOTER);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setClearButton(){let t=this._container.querySelector(g.selectors.FOOTER);if(!t)return;t.querySelector(g.selectors.CLEAR_BUTTON)||t.prepend(X6())}removeClearButton(){var e;let t=this._container.querySelector(g.selectors.CLEAR_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setTodayButton(){let t=this._container.querySelector(g.selectors.FOOTER);if(!t)return;t.querySelector(g.selectors.TODAY_BUTTON)||t.appendChild(Z6())}removeTodayButton(){var e;let t=this._container.querySelector(g.selectors.TODAY_BUTTON);(e=t==null?void 0:t.parentNode)==null||e.removeChild(t)}setDays(t,e){n2(this._dayRow),t.forEach(o=>{let a=F6(o,e==null?void 0:e.locale);e!=null&&e.builder&&(a=e.builder(o,a)),this._dayRow.appendChild(a)})}setDates(t,e){n2(this._dateGrid),tp(t).forEach((o,a)=>{let s=U6(o,a,e);this._dateGrid.appendChild(s)})}replaceDate(t,e){let o=this._dateGrid.querySelector(`#${rt(t.date)}`);if(o){let a=o3(t,e==null?void 0:e.locale);e!=null&&e.builder?o.replaceWith(e.builder(t,a)):o.replaceWith(a)}}replaceDateWithSpacer(t){let e=this._dateGrid.querySelector(`#${rt(t)}`);e==null||e.replaceWith(Ei(t))}setDateDisabled(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);o&&(o.toggleAttribute("disabled",e),o.setAttribute("aria-disabled",e.toString()))}setDateSelected(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);o&&(o.classList.toggle(g.classes.DATE_SELECTED,e),o.setAttribute("aria-selected",e.toString()))}setWeekend(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`),a=o==null?void 0:o.querySelector(g.selectors.DATE_INNER);a&&Ka(a,"part",g.parts.WEEKEND,e)}appendDateAttribute(t,e,o){let a=this._dateGrid.querySelector(`#${rt(t)}`);a&&$o(a,e,o)}setMultiple(t){this._dateView.setAttribute("aria-multiselectable",t.toString())}setDateViewHidden(t){G(this._dateView,t,"aria-hidden",t.toString()),this.setAllDatesUnfocusable()}setRange(t){this._dateGrid.querySelectorAll(g.selectors.RANGE).forEach(o=>o.classList.remove(g.classes.RANGE)),t&&t.forEach(o=>{let a=this._dateGrid.querySelector(`#${rt(o)}`);a==null||a.classList.add(g.classes.RANGE)})}setRangeStart(t){let e=this._dateGrid.querySelector(g.selectors.RANGE_START);if(e==null||e.classList.remove(g.classes.RANGE_START),!t)return;let o=this._dateGrid.querySelector(`#${rt(t)}`);o==null||o.classList.add(g.classes.RANGE_START)}setRangeEnd(t){let e=this._dateGrid.querySelector(g.selectors.RANGE_END);if(e==null||e.classList.remove(g.classes.RANGE_END),!t)return;let o=this._dateGrid.querySelector(`#${rt(t)}`);o==null||o.classList.add(g.classes.RANGE_END)}setActiveDate(t,e,o){let a=t.toDateString();this._dateGrid.querySelectorAll(g.selectors.DATE).forEach(r=>{let l=r.getAttribute(g.attributes.DATA_DATE)===a;s3(r,l?0:-1,e,o)})}setAllDatesUnfocusable(){this._dateGrid.querySelectorAll(g.selectors.DATE).forEach(e=>s3(e,-1,!1,!0))}setDateDescription(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);o&&G(o,!!e,e)}setDateTooltip(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);if(!o)return;let a=o.querySelector(g.selectors.TOOLTIP);a?e!=null&&e.length?a.textContent=e:a.remove():e!=null&&e.length&&o.prepend(q6(e))}setEventWrapperOnDate(t,e){let o=this._dateGrid.querySelector(`#${rt(t)}`);if(!o)return;let a=o.querySelector(g.selectors.EVENT_WRAPPER);a?e?n2(a):a.remove():e&&o.appendChild(W6(t))}setEvent(t,e){let o=this._dateGrid.querySelector(`#${e3(t.date)}`);o==null||o.appendChild(G6(t,e))}openMenuAsGrid(t,e){this._menu.isConnected&&this._menu.openAsGrid(t,e)}openMenuAsList(t,e){this._menu.openAsList(t,e)}closeMenu(){this._menu.close()}setMenuAnimation(t){this._menu.animationType=t}animateIntoSelectionMenu(t,e,o){this._menu.animateIn(t,e,o)}moveMenuFocusDown(){this._menu.moveFocusDown()}moveMenuFocusBackward(){return this._menu.moveFocusBackward()}moveMenuFocusForward(){return this._menu.moveFocusForward()}moveMenuFocusUp(){this._menu.moveFocusUp()}selectFocusedMenuItem(){this._menu.selectFocusedItem()}setPreventFocusOnMenu(t){this._menu.preventFocus=t}};var Di=class{constructor(t){this._adapter=t;this._dates=[];this._month=new Date().getMonth();this._year=new Date().getFullYear();this._showToday=!0;this._showOtherMonths=!1;this._fixedHeight=!1;this._events=[];this._value=[];this._mode="single";this._readonly=!1;this._selectionFollowsMonth=!1;this._rangeSelectionState="none";this._allowSingleDateRange=!0;this._min=null;this._max=null;this._minAttribute=null;this._maxAttribute=null;this._disabledDates=[];this._disabledDaysOfWeek=[];this._constrainToEnabled=!0;this._showHeader=!0;this._clearButton=!1;this._todayButton=!1;this._view="date";this._menuAnimation="scale";this._menuYear=null;this._listYears=!0;this._menuIncludedYear=new Date().getFullYear();this._menuYearsInView=null;this._yearRange=`-${g.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${g.numbers.DEFAULT_MAX_YEAR_OFFSET}`;this._weekendDays=null;this._localeFirstDayOfWeek=0;this._localeWeekendDays=[];this._rtl=!1;this._preventFocus=!1;this._isInitialized=!1;this._clearButtonListener=()=>this._onClearClicked(),this._dateClickListener=e=>this._onDateClick(e),this._keydownListener=e=>this._onKeydown(e),this._hoverListener=e=>this._onHover(e),this._menuFocusChangeListener=e=>this._onMenuFocusChange(e),this._menuListener=e=>this._onMenuSelect(e),this._monthButtonListener=()=>this._onMonthButtonClicked(),this._nextButtonListener=()=>this._onNextButtonClicked(),this._preventFocusListener=e=>e.preventDefault(),this._previousButtonListener=()=>this._onPreviousButtonClicked(),this._todayButtonListener=()=>this._onTodayClicked(),this._yearButtonListener=()=>this._onYearButtonClicked()}initialize(){this._adapter.registerMenuListener(this._menuListener),this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener),this._adapter.registerKeydownListener(this._keydownListener),this._applyMin(),this._applyMax(),this._applyFixedHeight(),this._applyReadOnly(),this._applyShowToday(),this._applyPreventFocus(),this._applyShowHeader(),this._applyMonth(),this._applyYear(),this._applyListYears(),this._applyMenuAnimation(),this._applyLocale(),this._applyClearButton(),this._applyTodayButton(),this._applyFirstDayOfWeek(),this._applyShowOtherMonths(),this._createDateView(),this._applyConstrainToEnabled(),this._applyAllowSingleDateRange(),this._applyMode(),this._applyYearRange(),this._applySelectionFollowsMonth(),this._isInitialized=!0}destroy(){this._isInitialized=!1}_onMonthButtonClicked(){this._toggleMonthMenu()}_toggleMonthMenu(t=!1){this._view!=="month"?this._openMonthMenu(t):this._closeMenu(!1,t)}_onYearButtonClicked(){this._toggleYearMenu()}_toggleYearMenu(t=!1){this._view!=="year"?this._openYearMenu(t):this._closeMenu(!1,t)}_onMenuFocusChange(t){this._emitFocusChangeEvent(t.detail)}_onMenuSelect(t){switch(this._view){case"month":this._onMonthSelected(t.detail);break;case"year":this._onYearSelected(t.detail);break}}_onNextButtonClicked(){this._view==="date"?(this._goToNextMonth(),this._setFocusInMonth(1,!1)):this._view==="month"?this._goToNextYear():this._goToNextSetOfYears()}_onPreviousButtonClicked(){this._view==="date"?(this._goToPreviousMonth(),this._setFocusInMonth(2,!1)):this._view==="month"?this._goToPreviousYear():this._goToPreviousSetOfYears()}_onHover(t){if(this._mode==="range"){let e=Vn(t,!1);if(!e)return;let o=new Date(Date.parse(e.getAttribute(g.attributes.DATA_DATE)));xt(o,this._month,this._year)&&this._setRangePreview(o)}}_onDateClick(t){let e=Vn(t,!1);if(!e)return;let o=e.getAttribute(g.attributes.DATA_DATE);if(!o)return;let a=new Date(o);xt(a,this._month,this._year)&&(this._focusedDate=a,this._beforeDateSelected(a)),this._resumeTabindexOnDate(!1)}_onKeydown(t){switch(t.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this._handleArrowKey(t);break;case"Home":case"End":case"PageUp":case"PageDown":this._handleNavigationKey(t);break;case" ":case"Enter":this._handleEnterOrSpaceKey(t);break;case"m":case"M":t.preventDefault(),this._toggleMonthMenu(!0);break;case"y":case"Y":t.preventDefault(),this._toggleYearMenu(!0);break;case"t":case"T":case"n":case"N":t.preventDefault(),this.today();break;case"Delete":case"Backspace":t.preventDefault(),this._deselectAllDates();break;case"Escape":this._view!=="date"&&(t.preventDefault(),t.stopPropagation(),this._closeMenu(!1,!0));break}}_handleArrowKey(t){if(!c3(t,this._view,this._preventFocus))return;t.preventDefault();let e;switch(t.key){case"ArrowLeft":e=this._rtl?"next":"previous";break;case"ArrowRight":e=this._rtl?"previous":"next";break;case"ArrowUp":e="up";break;case"ArrowDown":e="down";break}switch(e){case"previous":this._view==="date"?this._moveFocusToPreviousDate(!0):!this._adapter.moveMenuFocusBackward()&&this._canGoBackward()&&(this._view==="month"?this._goToPreviousYear(!0):this._goToPreviousSetOfYears(!0));break;case"next":this._view==="date"?this._moveFocusToNextDate(!0):!this._adapter.moveMenuFocusForward()&&this._canGoForward()&&(this._view==="month"?this._goToNextYear(!0):this._goToNextSetOfYears(!0));break;case"up":this._view==="date"?this._moveFocusToPreviousWeek(!0):this._adapter.moveMenuFocusUp();break;case"down":this._view==="date"?this._moveFocusToNextWeek(!0):this._adapter.moveMenuFocusDown();break}this._mode==="range"&&this._setRangePreview(this._focusedDate)}_handleNavigationKey(t){switch(t.preventDefault(),t.key){case"Home":if(this._view!=="date")break;t.shiftKey?this._moveFocusToFirstOfMonth(!0):this._moveFocusToFirstOfWeek(!0);break;case"End":if(this._view!=="date")break;t.shiftKey?this._moveFocusToLastOfMonth(!0):this._moveFocusToLastOfWeek(!0);break;case"PageUp":this._view==="date"?t.shiftKey?this._moveFocusToPreviousYear(!0):this._moveFocusToPreviousMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoBackward()?this._goToPreviousYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoBackward()&&this._goToPreviousSetOfYears(!0);break;case"PageDown":this._view==="date"?t.shiftKey?this._moveFocusToNextYear(!0):this._moveFocusToNextMonth(!0):this._view==="month"&&!t.shiftKey&&this._canGoForward()?this._goToNextYear(!0):this._view==="year"&&!t.shiftKey&&this._canGoForward()&&this._goToNextSetOfYears(!0);break}}_handleEnterOrSpaceKey(t){if(c3(t,this._view,this._preventFocus))switch(t.preventDefault(),this._view){case"date":if(this._readonly)break;this._setSelectOnFocusedDate();break;case"month":case"year":this._adapter.selectFocusedMenuItem();break}}_onMonthSelected(t){this._year!==this._menuYear&&this._menuYear!=null&&(this._year=this._menuYear,this._setYear()),this._month=t,this._setMonth(!0),this._trySetValueMonthAndYear(this._month,this._year,"month"),this._closeMenu(!0)}_onYearSelected(t){this._year=t,this._setYear(!0),this._trySetValueMonthAndYear(this._month,this._year,"year"),this._closeMenu(!0)}_onClearClicked(){this.clear()}_onTodayClicked(){this.today()}_trySetValueMonthAndYear(t,e,o="date"){var r;if(!this.selectionFollowsMonth||this._mode!=="single"||!((r=this._value)!=null&&r.length))return;let a=new Date(this._value[0]),s=Tl(t,e);a.setDate(Math.min(a.getDate(),s)),a.setFullYear(e),a.setMonth(t),!ft(a,this._getDisabledDateParams())&&this._beforeDateSelected(a,o)}_setInitialDateFocus(t=!1){let e=new Date;if(xt(e,this._month,this._year)&&!ft(e,this._getDisabledDateParams(!1))){this._setFocusedDate(e,t);return}let o=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(o,1,!1,!0,!0),t)}_resumeTabindexOnDate(t){return xt(this._focusedDate,this._month,this._year)?(this._adapter.setActiveDate(this._focusedDate,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate),!0):!1}_moveFocusToNextDate(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate),t)}_moveFocusToPreviousDate(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate),t)}_moveFocusToNextWeek(t){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToPreviousWeek(t){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate,7,!0),t)}_moveFocusToFirstOfWeek(t){this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToLastOfWeek(t){this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate,!0),t)}_moveFocusToFirstOfMonth(t){let e=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(e,1,!1,!0),t)}_moveFocusToLastOfMonth(t){let e=new Date(this._year,this._month+1,0);this._setFocusedDate(this._getPreviousEnabledDate(e,1,!1,!0),t)}_moveFocusToNextMonth(t){let e=En(this._focusedDate,this._dates),o=(this._month+1)%12,a=o===0?this._year+1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,o,a),t)}_moveFocusToPreviousMonth(t){let e=En(this._focusedDate,this._dates),o=this._month===0?11:this._month-1,a=o===11?this._year-1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(e,o,a),t)}_moveFocusToNextYear(t){let e=En(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year+1),t)}_moveFocusToPreviousYear(t){let e=En(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(e,this._month,this._year-1),t)}_setFocusInMonth(t,e){switch(t){case 1:this._moveFocusToFirstOfMonth(e);break;case 2:this._moveFocusToLastOfMonth(e);break;default:this._resumeTabindexOnDate(e);break}}_setSelectOnFocusedDate(){xt(this._focusedDate,this._month,this._year)&&!ft(this._focusedDate,this._getDisabledDateParams(!1))&&this._beforeDateSelected(this._focusedDate)}_emitFocusChangeEvent(t){let e={type:this._view,value:t};switch(this._view){case"date":e.selected=za(t,this._value),e.text=t.toLocaleDateString(this.locale,{month:"long",day:"2-digit",year:"numeric"});break;case"month":e.selected=this._month===t,e.text=ro(t,"long");break;case"year":e.selected=this._year===t,e.text=y0(t,"numeric");break}this._adapter.emitHostEvent(g.events.FOCUS_CHANGE,e)}_getPreviousEnabledDate(t,e=1,o=!1,a=!1,s=!1){let r=this._getDisabledDateParams(),l=new Date(t);if(a&&!ft(l,r))return l;let h=t.getMonth(),v=!1;do l.setDate(l.getDate()-e),o&&(e=1),(s&&l.getMonth()!==h||this._min&&l<this._min)&&(v=!0);while(!v&&ft(l,r));return v?null:l}_getNextEnabledDate(t,e=1,o=!1,a=!1,s=!1){let r=this._getDisabledDateParams(),l=new Date(t);if(a&&!ft(l,r))return l;let h=t.getMonth(),v=!1;do l.setDate(l.getDate()+e),o&&(e=1),(s&&l.getMonth()!==h||this._max&&l>this._max)&&(v=!0);while(!v&&ft(l,r));return v?null:l}_getClosestEnabledDate(t,e=!1,o=!1){if(this._min&&t<this._min)return this._getFirstEnabledDate();if(this._max&&t>this._max)return this._getLastEnabledDate();let a=this._getDisabledDateParams();if(o&&!ft(t,a))return new Date(t);let s=t.getDate(),r,l=!1,h=!1,v=1;for(;!l||!h;){if(!l){if(r=new Date(t),r.setDate(s+v),l=!xt(r,t.getMonth(),t.getFullYear()),!l&&!ft(r,a))return r;this._max&&r>this._max&&(l=!0)}if(!h){if(r=new Date(t),r.setDate(s-v),h=!xt(r,t.getMonth(),t.getFullYear()),!h&&!ft(r,a))return r;this._min&&r<this._min&&(h=!0)}v+=1}return null}_getFirstEnabledDayOfWeek(t,e=!0){let o=Cn(t),a=this._getDisabledDateParams(e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0),s=0;for(;s<7&&ft(o,a);)o.setDate(o.getDate()+1),a.otherMonth=e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0,s+=1;return s<7?o:null}_getLastEnabledDayOfWeek(t,e=!0){let o=Q6(t),a=this._getDisabledDateParams(e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0),s=0;for(;s<7&&ft(o,a);)o.setDate(o.getDate()-1),a.otherMonth=e?o.getMonth()!==t.getMonth()||o.getFullYear()!==t.getFullYear():void 0,s+=1;return s<7?o:null}_getDateAtIndexInMonth(t,e,o){var s;let a=r3(e,o,(s=this._firstDayOfWeek)!=null?s:this._localeFirstDayOfWeek);return this._min&&a[t]<this._min?this._getFirstEnabledDate():this._max&&a[t]>this._max?this._getLastEnabledDate():xt(a[t],e,o)?this._getClosestEnabledDate(a[t],!0):t<20?this._getNextEnabledDate(a[t],7,!0):this._getPreviousEnabledDate(a[t],7,!0)}_getFirstEnabledDate(){return this._min?this._getNextEnabledDate(this._min,1,!1,!0):null}_getLastEnabledDate(){return this._max?this._getPreviousEnabledDate(this._max,1,!1,!0):null}_setFocusedDate(t,e){if(!t)return;let o=this._month!==t.getMonth(),a=this._year!==t.getFullYear();(o||a)&&(o&&(this._month=t.getMonth(),this._setMonth()),a&&(this._year=t.getFullYear(),this._setYear()),this._resetDateGrid()),this._focusedDate=t,this._adapter.setActiveDate(this._focusedDate,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_getDisabledDateParams(t){return{builder:this._disabledDateBuilder,disabledDates:this._disabledDates,disabledDaysOfWeek:this._disabledDaysOfWeek,maxDate:this._max,minDate:this._min,otherMonth:t}}_createDateView(){this._resetDateGrid(),(!this._focusedDate||!this._resumeTabindexOnDate(!1))&&this._setInitialDateFocus()}_openMonthMenu(t=!1){this._view="month",this._menuYear==null&&(this._menuYear=this._year),this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!0),this._adapter.setYearButtonPressed(!1)),this._adapter.openMenuAsGrid(this._getMonthsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.VIEW_CHANGE,this._view)}_openYearMenu(t=!1){var e;this._view="year",this._menuIncludedYear=(e=this._menuYear)!=null?e:this._year,this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!0)),this._listYears?this._adapter.openMenuAsList(this._getYearsForMenu(),t):this._adapter.openMenuAsGrid(this._getYearsForMenu(),t),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.VIEW_CHANGE,this._view)}_getMonthsForMenu(){var e;let t={locale:this._locale,max:this._max,min:this._min,selectedMonth:this._year===this._menuYear?this._month:-1,selectedYear:(e=this._menuYear)!=null?e:this._year};return ap(t)}_getYearsForMenu(){let t=this._min?this._min.getFullYear():this._minYear,e=this._max?this._max.getFullYear():this._maxYear,o={locale:this._locale,max:e,min:t,selectedYear:this._year,yearInView:this._menuIncludedYear},a=this._listYears?sp(o):np(o);return this._menuYearsInView={min:a[0].value,max:a[a.length-1].value},a}_closeMenu(t,e=!1){this._view="date",this._menuYear=null,this._adapter.closeMenu(),this._adapter.setDateViewHidden(!1),this._adapter.setYear(this._year,this._locale),t&&this._resetDateGrid(),this._showHeader&&(this._setNavButtonLabels(),this._setNavigationButtonStates(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!1)),this._resumeTabindexOnDate(e)||this._setInitialDateFocus(e),this._adapter.emitHostEvent(g.events.VIEW_CHANGE,this._view)}_setNavButtonLabels(){this._adapter.setPreviousButtonLabel(this._view),this._adapter.setNextButtonLabel(this._view)}_resetDateGrid(){var e;this._dates=r3(this._month,this._year,(e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek);let t=this._dates.map(o=>this._getDateConfig(o));this._adapter.setDates(t,{builder:this._dateBuilder,locale:this._locale,showOtherMonths:this._showOtherMonths}),this._setNavigationButtonStates(),this._applyWeekendDays(),this._applyEvents(),this._mode==="range"&&(this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_getDateConfig(t){let e=xt(t,this._month,this._year);return{date:new Date(t),selected:za(t,this._value),today:J6(t),thisMonth:e,disabled:ft(t,this._getDisabledDateParams(!e))}}_getCalendarDate(t){return{date:new Date(t),selected:za(t,this._value),events:ki(t,this._events,this._eventBuilder)}}_setEventsOnDate(t){var a;if(!this._showOtherMonths&&!xt(t,this._month,this._year)){this._adapter.setEventWrapperOnDate(t,!1);return}let e=ki(t,this._events,this._eventBuilder);this._adapter.setEventWrapperOnDate(t,!!e.length),e.forEach((s,r)=>{r>2||this._adapter.setEvent(s,r===2&&e.length>3)});let o=e.length?i3(e):"";this._tooltipBuilder&&(o=(a=this._tooltipBuilder(this._getCalendarDate(t),o))!=null?a:""),this._adapter.setDateTooltip(t,o)}_beforeDateSelected(t,e="date"){this._dateSelectCallback?Promise.resolve(this._dateSelectCallback(this._getCalendarDate(t))).then(o=>{o&&this._onDateSelected(t,void 0,e)}):this._onDateSelected(t,void 0,e)}_onDateSelected(t,e,o="date"){if(this._mode==="range"&&this._emitRangeSelectionEvent(t)){this._applyRangeSelection(t),this._rangeSelectionStore=void 0;return}let a=za(t,this._value),s={date:new Date(t),selected:a,type:o};this._adapter.emitHostEvent(g.events.DATE_SELECT,s,!0,!0)&&(this._rangeSelectionStore=void 0,this._mode==="single"?a&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&(this._value.length&&this._deselectDate(this._value[0]),this._selectDate(t)):a&&!e||e===!1?this._deselectDate(t):(e===void 0||e===!0)&&this._selectDate(t),Ai(this._value))}_emitRangeSelectionEvent(t){let e={date:new Date(t),selected:za(t,this._value),type:"date"};switch(this._rangeSelectionState){case"none":case"to":e.range=Fo([t]),e.rangeSelectionState="from";break;case"from":b2(t,this._value[0])?this._allowSingleDateRange?(e.range=Fo([this._value[0],t]),e.rangeSelectionState="to"):(e.range=Fo([]),e.rangeSelectionState="none"):t<this._value[0]?(e.range=Fo([t]),e.rangeSelectionState="from"):(e.range=Fo([this._value[0],t]),e.rangeSelectionState="to");break}return this._adapter.emitHostEvent(g.events.DATE_SELECT,e,!0,!0)}_applyRangeSelection(t){switch(this._rangeSelectionState){case"none":case"to":this._deselectAllDates(),this._selectDate(t),this._adapter.setRange(null),this._adapter.setRangeStart(t),this._rangeSelectionState="from";break;case"from":b2(t,this._value[0])?this._allowSingleDateRange?(this._value.push(t),this._rangeSelectionState="to"):(this._deselectDate(t),this._rangeSelectionState="none"):t<this._value[0]?(this._deselectDate(this._value[0]),this._selectDate(t),this._adapter.setRangeStart(t)):(this._selectDate(t),this._setRangePreview(t),this._rangeSelectionState="to");break}}_setRangePreview(t){switch(this._rangeSelectionState){case"from":if(!t)return;t<this._value[0]?this._adapter.setRange(null):(this._adapter.setRange(Si(this._dates,this._value[0],t)),this._adapter.setRangeEnd(t));break;case"to":this._adapter.setRange(Si(this._dates,this._value[0],this._value[1])),this._adapter.setRangeEnd(this._value[1]);break}}_clearRangePreview(){this._adapter.setRange(null),this._adapter.setRangeStart(null),this._adapter.setRangeEnd(null)}_selectDate(t){this._value.push(t),this._focusedDate=t,this._adapter.setDateSelected(t,!0)}_deselectDate(t){let e=this._value.findIndex(o=>b2(o,t));e>-1&&this._value.splice(e,1),this._adapter.setDateSelected(t,!1)}_deselectAllDates(){this._value.forEach(t=>this._adapter.setDateSelected(t,!1)),this._clearRangePreview(),this._value=[]}_goToDate(t,e){let o=t.getFullYear(),a=t.getMonth();this._focusedDate=t,this._month=a,this._setMonth(),this._year=o,this._setYear(),this._view!=="date"?this._closeMenu(!1,e):this._resetDateGrid(),this._adapter.setActiveDate(t,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_goToNextMonth(){this._month<11?this._month+=1:(this._month=0,this._year+=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToPreviousMonth(){this._month>0?this._month-=1:(this._month=11,this._year-=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToNextYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear+=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"left":"right",t)):(this._year+=1,this._setYear(),this._resetDateGrid())}_goToPreviousYear(t=!1){this._view==="month"?(this._menuYear&&(this._menuYear-=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"right":"left",t)):(this._year-=1,this._setYear(),this._resetDateGrid())}_goToNextSetOfYears(t=!1){this._menuIncludedYear+=g.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"left":"right",t),this._setNavigationButtonStates()}_goToPreviousSetOfYears(t=!1){this._menuIncludedYear-=g.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"right":"left",t),this._setNavigationButtonStates()}_canGoBackward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._min||this._min<new Date(this._year,this._month,1);case"month":{let o=(e=this._min)==null?void 0:e.getFullYear();return this._menuYear!=null&&(o==null||o<this._menuYear)}case"year":return!!this._menuYearsInView&&this._minYear<this._menuYearsInView.min;default:return!1}}_canGoForward(t){var e;if(!t&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._max||this._max>l5(this._month,this._year);case"month":{let o=(e=this._max)==null?void 0:e.getFullYear();return this._menuYear!=null&&(o==null||o>this._menuYear)}case"year":return!!this._menuYearsInView&&this._maxYear>this._menuYearsInView.max;default:return!1}}_setNavigationButtonStates(){if(this._showHeader){if(!this._constrainToEnabled){this._adapter.setPreviousButtonDisabled(!1),this._adapter.setNextButtonDisabled(!1);return}this._adapter.setPreviousButtonDisabled(!this._canGoBackward()),this._adapter.setNextButtonDisabled(!this._canGoForward())}}_setMonth(t){this._adapter.setMonth(this._month,this._locale),this._adapter.setHostAttribute(g.attributes.MONTH,this._month.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setYear(t){this._adapter.setYear(this._year,this._locale),this._adapter.setHostAttribute(g.attributes.YEAR,this._year.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(g.events.MONTH_CHANGE,{month:this._month,userSelected:t!=null?t:!1,year:this._year}))}_setMenuYear(){this._menuYear!=null&&(this._setNavigationButtonStates(),this._adapter.setYear(this._menuYear,this._locale))}_applyAllowSingleDateRange(){this._adapter.toggleHostAttribute(g.attributes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange),this._adapter.setContainerClass(g.classes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange)}_applyClearButton(){this._adapter.toggleHostAttribute(g.attributes.CLEAR_BUTTON,!0,this._clearButton.toString()),this._clearButton?(this._adapter.setFooter(),this._adapter.setClearButton(),this._adapter.registerClearButtonListener(this._clearButtonListener)):(this._adapter.unregisterClearButtonListener(this._clearButtonListener),this._adapter.removeClearButton(),this._todayButton||this._adapter.removeFooter())}_applyConstrainToEnabled(){this._adapter.toggleHostAttribute(g.attributes.CONSTRAIN_TO_ENABLED,!0,this._constrainToEnabled.toString()),this._isInitialized&&this._setNavigationButtonStates()}_applyDateBuilder(){this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyDayBuilder(){var t;this._adapter.setDays(Bi((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale})}_applyDisabledDates(){switch(this._view){case"date":this._dates.forEach(t=>{let e=xt(t,this._month,this._year),o=this._getDisabledDateParams(!e);this._adapter.setDateDisabled(t,ft(t,o))});break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}this._setNavigationButtonStates()}_applyEvents(){this._view==="date"&&this._dates.forEach(t=>{this._setEventsOnDate(t)})}_applyFirstDayOfWeek(){var t,e;this._adapter.toggleHostAttribute(g.attributes.FIRST_DAY_OF_WEEK,O(this._firstDayOfWeek),((t=this._firstDayOfWeek)!=null?t:0).toString()),this._adapter.setDays(Bi((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyFixedHeight(){this._adapter.toggleHostAttribute(g.attributes.FIXED_HEIGHT,this._fixedHeight),this._adapter.setContainerClass(g.classes.FIXED_HEIGHT,this._fixedHeight)}_applyListYears(){this._adapter.toggleHostAttribute(g.attributes.LIST_YEARS,this._listYears),this._isInitialized&&this._view==="year"&&this._openYearMenu()}_applyLocale(){var t;if(this._adapter.toggleHostAttribute(g.attributes.LOCALE,!!this._locale,this._locale),this._adapter.toggleContainerAttribute(!!this._locale,"lang",this._locale),this._localeFirstDayOfWeek=P6(this._locale),this._localeWeekendDays=N6(this._locale),this._applyRtl(),this._isInitialized)switch(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._view){case"date":this._adapter.setDays(Bi((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._resetDateGrid(),this._resumeTabindexOnDate(!1);break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyMenuAnimation(){this._adapter.setHostAttribute(g.attributes.MENU_ANIMATION,this._menuAnimation),this._adapter.setMenuAnimation(this._menuAnimation)}_applyMin(){if(this._adapter.toggleHostAttribute(g.attributes.MIN,!!this._minAttribute,this._minAttribute),this._min){let t=new Date(this._min.getFullYear(),this._min.getMonth(),1),e=new Date(this._year,this._month,1);t>e&&(this._year=this._min.getFullYear(),this._month=this._min.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._min&&this._min>this._focusedDate)){let t=this._getFirstEnabledDate();t&&this._goToDate(t,!1)}}_applyMax(){if(this._adapter.toggleHostAttribute(g.attributes.MAX,!!this._maxAttribute,this._maxAttribute),this._max){let t=new Date(this._max.getFullYear(),this._max.getMonth(),1),e=new Date(this._year,this._month,1);t<e&&(this._year=this._max.getFullYear(),this._month=this._max.getMonth())}if(this._isInitialized&&(this._applyDisabledDates(),this._max&&this._max<this._focusedDate)){let t=this._getLastEnabledDate();t&&this._goToDate(t,!1)}}_applyMode(t){switch(this._mode){case"single":this._applySingleMode();break;case"multiple":this._applyMultipleMode(t==="range");break;case"range":this._applyRangeMode();break}this._mode!=="range"&&(this._rangeSelectionState="none",this._adapter.unregisterHoverListener(this._hoverListener),this._clearRangePreview())}_applySingleMode(){if(this._adapter.setHostAttribute(g.attributes.MODE,"single"),this._adapter.setMultiple(!1),this._value.length>1)for(let t=this._value.length-2;t>=0;t-=1)this._deselectDate(this._value[t])}_applyMultipleMode(t=!1){if(this._adapter.setHostAttribute(g.attributes.MODE,"multiple"),this._adapter.setMultiple(!0),t){let e=rp(this._value,this._getDisabledDateParams());this._deselectAllDates(),e.forEach(o=>{this._selectDate(o)})}}_applyRangeMode(){var e,o;this._adapter.setHostAttribute(g.attributes.MODE,"range"),this._adapter.setMultiple(!1);let t=Ti(this._value);this._deselectAllDates(),t.forEach(a=>{this._selectDate(a)}),this._rangeSelectionState=this._value[0]?this._value[1]?"to":"from":"none",this._adapter.registerHoverListener(this._hoverListener),this._adapter.setRange(Si(this._dates,this._value[0],this._value[1])),this._adapter.setRangeStart((e=this._value[0])!=null?e:null),this._adapter.setRangeEnd((o=this._value[1])!=null?o:null)}_applyMonth(){this._setMonth(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyPreventFocus(){this._adapter.toggleHostAttribute(g.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setContainerClass(g.classes.PREVENT_FOCUS,this._preventFocus),this._adapter.setPreventFocusOnMenu(this._preventFocus),this._preventFocus?this._adapter.registerPreventFocusListener(this._preventFocusListener):this._adapter.unregisterPreventFocusListener(this._preventFocusListener),this._isInitialized&&this._view==="date"&&this._resumeTabindexOnDate(!1)}_applyReadOnly(){this._adapter.toggleHostAttribute(g.attributes.READONLY,this._readonly),this._adapter.toggleHostAttribute("aria-readonly",this._readonly,"true"),this._adapter.setContainerClass(g.classes.READONLY,this._readonly),this._readonly?(this._adapter.unregisterDateClickListener(this._dateClickListener),this._adapter.unregisterHoverListener(this._hoverListener)):(this._adapter.registerDateClickListener(this._dateClickListener),this._mode==="range"&&this._adapter.registerHoverListener(this._hoverListener))}_applyRtl(){this._rtl=R6(this._locale),this._adapter.setContainerClass(g.classes.RTL,this._rtl),this._adapter.toggleContainerAttribute(this._rtl,"dir","rtl")}_applySelectionFollowsMonth(){this._adapter.setHostAttribute(g.attributes.SELECTION_FOLLOWS_MONTH,this._selectionFollowsMonth.toString())}_applyShowHeader(){this._adapter.toggleHostAttribute(g.attributes.SHOW_HEADER,this._showHeader,this._showHeader.toString()),this._showHeader?(this._adapter.setHeader(),this._adapter.registerMonthButtonListener(this._monthButtonListener),this._adapter.registerNextButtonListener(this._nextButtonListener),this._adapter.registerPreviousButtonListener(this._previousButtonListener),this._adapter.registerYearButtonListener(this._yearButtonListener),this._setNavButtonLabels()):(this._adapter.unregisterMonthButtonListener(this._monthButtonListener),this._adapter.unregisterNextButtonListener(this._nextButtonListener),this._adapter.unregisterPreviousButtonListener(this._previousButtonListener),this._adapter.unregisterYearButtonListener(this._yearButtonListener),this._adapter.removeHeader()),this._isInitialized&&(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._setNavigationButtonStates())}_applyShowOtherMonths(){if(this._adapter.toggleHostAttribute(g.attributes.SHOW_OTHER_MONTHS,this._showOtherMonths),this._isInitialized&&this._view==="date"){let t=!1;this._dates.forEach((e,o)=>{xt(e,this._month,this._year)||((o===g.numbers.PENULTIMATE_WEEK_BEGIN_INDEX||o===g.numbers.FINAL_WEEK_BEGIN_INDEX)&&(t=!0),this._showOtherMonths&&!t?this._adapter.replaceDate(this._getDateConfig(e),{builder:this._dateBuilder,locale:this._locale}):this._adapter.replaceDateWithSpacer(e),this._setEventsOnDate(e),this._applyWeekendDays())})}}_applyShowToday(){this._adapter.toggleHostAttribute(g.attributes.SHOW_TODAY,this._showToday),this._adapter.setContainerClass(g.classes.SHOW_TODAY,this._showToday)}_applyTodayButton(){this._adapter.toggleHostAttribute(g.attributes.TODAY_BUTTON,!0,this._todayButton.toString()),this._todayButton?(this._adapter.setFooter(),this._adapter.setTodayButton(),this._adapter.registerTodayButtonListener(this._todayButtonListener)):(this._adapter.unregisterTodayButtonListener(this._todayButtonListener),this._adapter.removeTodayButton(),this._clearButton||this._adapter.removeFooter())}_applyTooltipBuilder(){this._view==="date"&&this._dates.forEach(t=>{var a;if(!this._showOtherMonths&&!xt(t,this._month,this._year))return;let e=ki(t,this._events,this._eventBuilder),o=i3(e);this._tooltipBuilder&&(o=(a=this._tooltipBuilder(this._getCalendarDate(t),o))!=null?a:""),this._adapter.setDateTooltip(t,o)})}_applyWeekendDays(){var e;let t=(e=this._weekendDays)!=null?e:this._localeWeekendDays;this._view==="date"&&this._dates.forEach(o=>{let a=o.getDay();this._adapter.setWeekend(o,(this._showOtherMonths||xt(o,this._month,this._year))&&t.includes(a))})}_applyValue(t){t=t.map(e=>new Date(e)),Ai(t),this._deselectAllDates(),t.forEach(e=>this._selectDate(e)),this._mode==="range"&&(this._rangeSelectionState=this._value.length===2?"to":this._value.length===1?"from":"none",this._clearRangePreview(),this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_applyView(){switch(this._adapter.setHostAttribute(g.attributes.VIEW,this._view),this._view){case"date":this._closeMenu();break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyYear(){this._setYear(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyYearRange(){this._adapter.setHostAttribute(g.attributes.YEAR_RANGE,this._yearRange);let t=op(this._yearRange);this._minYear=t.min,this._maxYear=t.max,this._view==="year"&&(this._openYearMenu(),this._setNavigationButtonStates())}get activeDate(){return new Date(this._focusedDate)}get allowSingleDateRange(){return this._allowSingleDateRange}set allowSingleDateRange(t){this._allowSingleDateRange!==t&&(this._allowSingleDateRange=t,this._applyAllowSingleDateRange())}get clearButton(){return this._clearButton}set clearButton(t){this._clearButton!==t&&(this._clearButton=t,this._isInitialized&&this._applyClearButton())}get clearCallback(){return this._clearCallback}set clearCallback(t){this._clearCallback=t}get constrainToEnabled(){return this._constrainToEnabled}set constrainToEnabled(t){this._constrainToEnabled!==t&&(this._constrainToEnabled=t,this._isInitialized&&this._applyConstrainToEnabled())}get dateBuilder(){return this._dateBuilder}set dateBuilder(t){this._dateBuilder=t,this._isInitialized&&this._applyDateBuilder()}get dateSelectCallback(){return this._dateSelectCallback}set dateSelectCallback(t){this._dateSelectCallback=t}get dayBuilder(){return this.dayBuilder}set dayBuilder(t){this._dayBuilder=t,this._isInitialized&&this._applyDayBuilder()}get disabledDateBuilder(){return this._disabledDateBuilder}set disabledDateBuilder(t){this._disabledDateBuilder=t,this._isInitialized&&this._applyDisabledDates()}get disabledDates(){let t=this._disabledDates.map(e=>new Date(e));return t.length?t:null}set disabledDates(t){let e=t?ht(t)?t:[t]:[];this._disabledDates=e.map(o=>{let a=new Date(o);return a.setHours(0,0,0,0),a}),this._isInitialized&&this._applyDisabledDates()}get disabledDaysOfWeek(){return this._disabledDaysOfWeek.length?[...this._disabledDaysOfWeek]:null}set disabledDaysOfWeek(t){this._disabledDaysOfWeek=O(t)?ht(t)?t:[t]:[],this._isInitialized&&this._applyDisabledDates()}get eventBuilder(){return this._eventBuilder}set eventBuilder(t){this._eventBuilder=t,this._isInitialized&&this._applyEvents()}get events(){return this._events?[...this._events]:null}set events(t){this._events=t!=null&&t.length?[...t]:[],this._isInitialized&&this._applyEvents()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(t){this._firstDayOfWeek!==t&&(this._firstDayOfWeek=O(t)?+t:t,this._isInitialized&&this._applyFirstDayOfWeek())}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){this._fixedHeight!==t&&(this._fixedHeight=t,this._isInitialized&&this._applyFixedHeight())}get listYears(){return this._listYears}set listYears(t){this._listYears!==t&&(this._listYears=t,this._applyListYears())}get locale(){return this._locale}set locale(t){typeof t=="string"&&!t.length&&(t=void 0),this._locale!==t&&(this._locale=t,this._isInitialized&&this._applyLocale())}get max(){return this._max}set max(t){var e;this._maxAttribute!==t&&(this._maxAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._max=l3(t),this._applyMax())}get menuAnimation(){return this._menuAnimation}set menuAnimation(t){this._menuAnimation!==t&&(this._menuAnimation=t,this._isInitialized&&this._applyMenuAnimation())}get min(){return this._min}set min(t){var e;this._minAttribute!==t&&(this._minAttribute=(e=t==null?void 0:t.toString())!=null?e:null,this._min=l3(t),this._applyMin())}get mode(){return this._mode}set mode(t){if(this._mode!==t){let e=this._mode;this._mode=t,this._isInitialized&&this._applyMode(e)}}get month(){return this._month}set month(t){if(this._month!==t){let e=isNaN(+t)?this._month:+t;if(this._month===e)return;this._month=+t,this._isInitialized&&this._applyMonth()}}get preventFocus(){return this._preventFocus}set preventFocus(t){this._preventFocus!==t&&(this._preventFocus=t,this._isInitialized&&this._applyPreventFocus())}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._isInitialized&&this._applyReadOnly())}get selectionFollowsMonth(){return this._selectionFollowsMonth}set selectionFollowsMonth(t){this._selectionFollowsMonth!==t&&(this._selectionFollowsMonth=t,this._isInitialized&&this._applySelectionFollowsMonth())}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader!==t&&(this._showHeader=t,this._isInitialized&&this._applyShowHeader())}get showOtherMonths(){return this._showOtherMonths}set showOtherMonths(t){this._showOtherMonths!==t&&(this._showOtherMonths=t,this._isInitialized&&this._applyShowOtherMonths())}get showToday(){return this._showToday}set showToday(t){this._showToday!==t&&(this._showToday=t,this._isInitialized&&this._applyShowToday())}get todayButton(){return this._todayButton}set todayButton(t){this._todayButton!==t&&(this._todayButton=t,this._isInitialized&&this._applyTodayButton())}get todayCallback(){return this._todayCallback}set todayCallback(t){this._todayCallback=t}get tooltipBuilder(){return this._tooltipBuilder}set tooltipBuilder(t){this._tooltipBuilder=t,this._isInitialized&&this._applyTooltipBuilder()}get value(){var e;if(this._mode==="range")return(e=this._rangeSelectionStore)!=null?e:Fo(this._value);let t=this._value.map(o=>new Date(o));return this._mode==="multiple"?t:t.length?t[0]:null}set value(t){let e=[];if(this._rangeSelectionStore=void 0,!t||Array.isArray(t)&&!t.length)this._value=[];else if(Array.isArray(t))switch(this._mode){case"single":e=[t[0]];break;case"multiple":e=t;break;case"range":{let o=Ti(t);e.push(o[0]),o.length>1&&e.push(o[1]);break}}else G2(new Date(t))?e=[t]:(this._rangeSelectionStore=new l2(t),e=ep(t));this._applyValue(e)}get view(){return this._view}set view(t){this._view!==t&&(this._view=t,this._applyView())}get weekendDays(){return this._weekendDays?[...this._weekendDays]:null}set weekendDays(t){var e;this._weekendDays=(e=t==null?void 0:t.map(o=>+o))!=null?e:null,this._isInitialized&&this._applyWeekendDays()}get year(){return this._year}set year(t){if(this._year!==t){let e=isNaN(+t)?this._year:+t;if(this._year===e)return;this._year=e,this._isInitialized&&this._applyYear()}}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._applyYearRange())}clear(){this._deselectAllDates(),this._clearCallback&&this._clearCallback()}deselectDate(t,e){this._onDateSelected(t,!1),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}goToDate(t,e){this._goToDate(t,e!=null?e:!1)}handleExternalKeyEvent(t){this._onKeydown(t)}layout(){this._applyFirstDayOfWeek(),this._createDateView(),this._applyShowHeader(),this._applyConstrainToEnabled()}selectDate(t,e){this._onDateSelected(t,!0),e&&(this._focusedDate=t,this._resumeTabindexOnDate(!0))}setActiveDate(t,e){return this._dates.some(o=>b2(o,t)&&(this._showOtherMonths||xt(o,this._month,this._year)))?(this._goToDate(t,e!=null?e:!1),!0):!1}today(){let t=new Date;t.setHours(0,0,0,0),this._goToDate(t,!0),this._todayCallback&&this._todayCallback()}toggleDate(t,e){this._onDateSelected(t)}};var C_='<template><div class="forge-calendar" part="root"><div id="view" class="forge-calendar__view" part="view"><div id="date-view" class="forge-calendar__date-view" role="grid" part="date-view"><div role="rowgroup" part="date-view-container"><div id="day-row" class="forge-calendar__date-view__row" role="row" part="date-view-row"></div></div><div id="date-grid" class="forge-calendar__date-grid" role="rowgroup" part="date-grid-container"></div></div><forge-calendar-menu id="menu" part="calendar-menu"></forge-calendar-menu></div></div></template>',E_='.forge-calendar{width:var(--forge-calendar-width,100%);height:fit-content;position:relative}.forge-calendar__header{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__footer{padding:var(--forge-calendar-controls-padding,0);display:flex;align-items:center;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);display:flex;justify-content:center;align-items:center;min-width:0;padding:0;font-weight:700;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:""}.forge-calendar__date{margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:""}.forge-calendar__date forge-focus-indicator{--forge-focus-indicator-shape:50%}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:flex;justify-content:center;align-items:center;border-radius:inherit;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:var(--forge-theme-primary,#3f51b5);border-color:var(--forge-theme-primary,#3f51b5)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:var(--forge-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){cursor:pointer}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:var(--forge-theme-primary,#3f51b5);color:var(--forge-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:var(--forge-theme-primary-container-minimum,#f7f8fc);color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date--selected forge-focus-indicator{--forge-focus-indicator-color:var(--forge-theme-primary-container)}.forge-calendar__date[disabled]{color:var(--forge-theme-text-low,rgba(0,0,0,.38))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:""}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:var(--forge-theme-primary,#3f51b5);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{transition:transform .2s;transform:scale(1.15);transform-origin:center}.forge-calendar__event{font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{background-color:var(--forge-theme-surface,#fff);color:var(--forge-theme-on-surface,#000);border-radius:50%}.forge-calendar__event__wrapper{display:flex;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{transform:rotate(180deg)}#accessible-header{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}#month-button forge-icon{transition:transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{transform:rotate(180deg)}#year-button forge-icon{transition:transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:var(--forge-theme-surface, #ffffff);display:inline-block}:host([hidden]){display:none}:host([forge-popover-context=true]){--forge-calendar-event-stroke-color:var(--forge-theme-surface-bright, #ffffff)}',v1=class extends M{static get observedAttributes(){return[g.attributes.ALLOW_SINGLE_DATE_RANGE,g.attributes.CLEAR_BUTTON,g.attributes.CONSTRAIN_TO_ENABLED,g.attributes.FIRST_DAY_OF_WEEK,g.attributes.FIXED_HEIGHT,g.attributes.LIST_YEARS,g.attributes.LOCALE,g.attributes.MAX,g.attributes.MENU_ANIMATION,g.attributes.MIN,g.attributes.MODE,g.attributes.MONTH,g.attributes.PREVENT_FOCUS,g.attributes.READONLY,g.attributes.SELECTION_FOLLOWS_MONTH,g.attributes.SHOW_HEADER,g.attributes.SHOW_OTHER_MONTHS,g.attributes.SHOW_TODAY,g.attributes.TODAY_BUTTON,g.attributes.VIEW,g.attributes.YEAR,g.attributes.YEAR_RANGE]}constructor(){super(),X.define([v0,ze,A0,bl,rl]),H(this,C_,E_),this._core=new Di(new Oi(this))}connectedCallback(){!this.hasAttribute(g.attributes.POPOVER_CONTEXT)&&Yo(this).some(t=>t.tagName.toLowerCase()==="forge-popover")&&this.setAttribute(g.attributes.POPOVER_CONTEXT,"true"),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case g.attributes.ALLOW_SINGLE_DATE_RANGE:this.allowSingleDateRange=p(o);break;case g.attributes.CLEAR_BUTTON:this.clearButton=p(o);break;case g.attributes.CONSTRAIN_TO_ENABLED:this.constrainToEnabled=p(o);break;case g.attributes.FIRST_DAY_OF_WEEK:this.firstDayOfWeek=K(o);break;case g.attributes.FIXED_HEIGHT:this.fixedHeight=p(o);break;case g.attributes.LIST_YEARS:this.listYears=p(o);break;case g.attributes.LOCALE:this.locale=o;break;case g.attributes.MAX:this.max=o;break;case g.attributes.MENU_ANIMATION:this.menuAnimation=o;break;case g.attributes.MIN:this.min=o;break;case g.attributes.MODE:this.mode=o;break;case g.attributes.MONTH:this.month=K(o);break;case g.attributes.PREVENT_FOCUS:this.preventFocus=p(o);break;case g.attributes.READONLY:this.readonly=p(o);break;case g.attributes.SELECTION_FOLLOWS_MONTH:this.selectionFollowsMonth=p(o);break;case g.attributes.SHOW_HEADER:this.showHeader=p(o);break;case g.attributes.SHOW_OTHER_MONTHS:this.showOtherMonths=p(o);break;case g.attributes.SHOW_TODAY:this.showToday=p(o);break;case g.attributes.TODAY_BUTTON:this.todayButton=p(o);break;case g.attributes.VIEW:this.view=o;break;case g.attributes.YEAR:this.year=K(o);break;case g.attributes.YEAR_RANGE:this.yearRange=o;break}}clear(){this._core.clear()}deselectDate(t){this._core.deselectDate(new Date(t))}goToDate(t,e){this._core.goToDate(new Date(t),e)}handleKey(t){this._core.handleExternalKeyEvent(t)}layout(){this._core.layout()}selectDate(t){this._core.selectDate(new Date(t))}setActiveDate(t,e){return this._core.setActiveDate(new Date(t),e)}today(){this._core.today()}toggleDate(t,e){this._core.toggleDate(new Date(t),e)}};i([c({set:!1})],v1.prototype,"activeDate",2),i([c()],v1.prototype,"allowSingleDateRange",2),i([c()],v1.prototype,"clearButton",2),i([c()],v1.prototype,"clearCallback",2),i([c()],v1.prototype,"constrainToEnabled",2),i([c()],v1.prototype,"dateBuilder",2),i([c()],v1.prototype,"dateSelectCallback",2),i([c()],v1.prototype,"dayBuilder",2),i([c()],v1.prototype,"disabledDateBuilder",2),i([c()],v1.prototype,"disabledDates",2),i([c()],v1.prototype,"disabledDaysOfWeek",2),i([c()],v1.prototype,"eventBuilder",2),i([c()],v1.prototype,"events",2),i([c()],v1.prototype,"firstDayOfWeek",2),i([c()],v1.prototype,"fixedHeight",2),i([c()],v1.prototype,"listYears",2),i([c()],v1.prototype,"locale",2),i([c()],v1.prototype,"max",2),i([c()],v1.prototype,"menuAnimation",2),i([c()],v1.prototype,"min",2),i([c()],v1.prototype,"mode",2),i([c()],v1.prototype,"month",2),i([c()],v1.prototype,"preventFocus",2),i([c()],v1.prototype,"readonly",2),i([c()],v1.prototype,"selectionFollowsMonth",2),i([c()],v1.prototype,"showHeader",2),i([c()],v1.prototype,"showOtherMonths",2),i([c()],v1.prototype,"showToday",2),i([c()],v1.prototype,"todayButton",2),i([c()],v1.prototype,"todayCallback",2),i([c()],v1.prototype,"tooltipBuilder",2),i([c()],v1.prototype,"value",2),i([c()],v1.prototype,"view",2),i([c()],v1.prototype,"weekendDays",2),i([c()],v1.prototype,"year",2),i([c()],v1.prototype,"yearRange",2),v1=i([y({name:g.elementName,dependencies:[T2,je,i1,j,m1,r1,J]})],v1);var ip=class extends Z1{constructor(t){super(t)}_build(){return document.createElement(g.elementName)}onDateSelect(t){this._element.addEventListener(g.events.DATE_SELECT,t)}onFocusChange(t){this._element.addEventListener(g.events.FOCUS_CHANGE,t)}onMonthChange(t){this._element.addEventListener(g.events.MONTH_CHANGE,t)}onViewChange(t){this._element.addEventListener(g.events.VIEW_CHANGE,t)}};var B_={POPUP:"forge-calendar-dropdown__popup"},lp={classes:B_};var Ha=class{constructor(t,e){this._popupClasses=[];this.targetElement=t,this.id=e}get isOpen(){var t,e;return(e=(t=this.dropdownElement)==null?void 0:t.open)!=null?e:!1}get popupClasses(){return this._popupClasses}set popupClasses(t){this._popupClasses=t?ht(t)?[...t]:[t]:[]}get locale(){var t;return(t=this.calendar)==null?void 0:t.locale}set locale(t){this.calendar&&(this.calendar.locale=t)}async close({force:t=!1}={}){var e;this.dropdownElement&&(t?this.dropdownElement.open=!1:await this.dropdownElement.hideAsync(),(e=this.dropdownElement)==null||e.remove(),this.dropdownElement=void 0,this.calendar=void 0)}destroy(){this.close({force:!0})}open(t){var a,s;this.calendar=this._createCalendar(t),this._announcerElement=Fn(),this._announcerElement.id=`${this.id}-activedescendant`,this.dropdownElement=this._createDropdown(),this.dropdownElement.appendChild(this.calendar),this.dropdownElement.appendChild(this._announcerElement),this.calendar.addEventListener(g.events.FOCUS_CHANGE,r=>{var h;let l=`${this.id}-activedescendent-`;switch(r.detail.type){case"date":l+=rt(r.detail.value);break;case"month":l+=`month-${r.detail.value.toString()}`;break;case"year":l+=`year-${r.detail.value.toString()}`;break}(h=this.activeChangeCallback)==null||h.call(this,l),this._announcerElement&&(this._announcerElement.id=l,this._announcerElement.setAttribute("aria-selected",r.detail.selected.toString()),this._announcerElement.textContent=r.detail.text)});let e=(a=this.targetElement.ownerDocument)!=null?a:document;((s=Jn(Q.selectors.HOST,this.targetElement))!=null?s:e.body).appendChild(this.dropdownElement),this.dropdownElement.open=!0}propagateKeyboardEvent(t){var e;(e=this.calendar)==null||e.handleKey(t)}_createCalendar(t){let e=document.createElement(g.elementName);return Object.assign(e,t),e}_createDropdown(){let t=document.createElement("forge-popover");return t.anchorElement=this.targetElement,t.placement="bottom-start",t.persistent=!0,t.classList.add(lp.classes.POPUP),t.id=this.id,t.classList.add(...this._popupClasses),t.addEventListener(Q.events.TOGGLE,()=>{var e;return(e=this.closeCallback)==null?void 0:e.call(this)}),t}};function cp(){f(v1)}var A_=":host{display:block}:host([hidden]){display:none}.forge-card{--_card-background:var(--forge-card-background, var(--forge-theme-surface, #ffffff));--_card-height:var(--forge-card-height, 100%);--_card-width:var(--forge-card-width, 100%);--_card-outline-color:var(--forge-card-outline-color, var(--forge-theme-outline, #e0e0e0));--_card-outline-width:var(--forge-card-outline-width, var(--forge-border-thin, 1px));--_card-outline-style:var(--forge-card-outline-style, solid);--_card-elevation:var(--forge-card-elevation, none);--_card-padding:var(--forge-card-padding, var(--forge-spacing-medium, 16px));--_card-shape:var(--forge-card-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_card-overflow:var(--forge-card-overflow, initial);--_card-raised-elevation:var(--forge-card-raised-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_card-raised-outline-width:var(--forge-card-raised-outline-width, 0)}.forge-card{background:var(--_card-background);border-color:var(--_card-outline-color);border-width:var(--_card-outline-width);border-style:var(--_card-outline-style);border-radius:var(--_card-shape);box-shadow:var(--_card-elevation);box-sizing:border-box;padding:var(--_card-padding);overflow:var(--_card-overflow);height:var(--_card-height);width:var(--_card-width);-webkit-tap-highlight-color:transparent}:host(:where([raised],:state(raised))) .forge-card{--_card-elevation:var(--_card-raised-elevation);--_card-outline-width:var(--_card-raised-outline-width)}:host([no-padding]) .forge-card{--_card-padding:var(--forge-card-padding, 0)}",hp="forge-card",vp,pp,Bn,M0=class extends(pp=wt,vp=q2,pp){constructor(){super();Nn(this,Bn);this.raised=!1;Rn(this,Bn,this.attachInternals())}willUpdate(e){e.has("raised")&&He(Go(this,Bn),"raised",this.raised)}render(){return gt`<div class="forge-card" part="root"><slot></slot></div>`}};Bn=new WeakMap,M0.styles=dt(A_),M0[vp]=hp,i([u1({type:Boolean,reflect:!0})],M0.prototype,"raised",2),M0=i([kt(hp)],M0);var T_=`${b}card`,mp={RAISED:"raised"},S_=d({},mp),Bc1={elementName:T_,observedAttributes:mp,attributes:S_};function dp(){f(M0)}var k_=`${b}circular-progress`,O_={DETERMINATE:"determinate",PROGRESS:"progress",THEME:"theme",TRACK:"track"},D_={INDETERMINATE:"forge-circular-progress--indeterminate"},P_={ROOT:".forge-circular-progress",DETERMINATE_PROGRESS_CIRCLE:".progress",TEMPLATES:"svg, .spinner"},S2={elementName:k_,attributes:O_,classes:D_,selectors:P_};var N_='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle></svg><div class="spinner"><div class="left"><div class="circle"></div></div><div class="right"><div class="circle"></div></div></div>',R_='<svg viewBox="0 0 4800 4800"><circle class="track-background" pathLength="100"></circle><circle class="track" pathLength="100"></circle><circle class="progress" pathLength="100" stroke-dashoffset="100"></circle></svg>',Pi=class extends I{constructor(t){super(t),this._rootElement=w(this._component,S2.selectors.ROOT)}initialize(){this._component[N]({role:"progressbar",ariaValueMin:"0",ariaValueMax:"1"})}setDeterminate(t){this._tryResetTemplate(),this._rootElement.classList.toggle(S2.classes.INDETERMINATE,!t),t?(this._rootElement.insertAdjacentHTML("beforeend",R_),this._determinateProgressCircleElement=w(this._component,S2.selectors.DETERMINATE_PROGRESS_CIRCLE)):(this._rootElement.insertAdjacentHTML("beforeend",N_),this._component[N]({ariaValueNow:null}),this._determinateProgressCircleElement=void 0)}setProgress(t){var e;this._component[N]({ariaValueNow:`${t}`}),(e=this._determinateProgressCircleElement)==null||e.setAttribute("stroke-dashoffset",`${(1-t)*100}`)}_tryResetTemplate(){var e;let t=(e=this._component.shadowRoot)==null?void 0:e.querySelectorAll(S2.selectors.TEMPLATES);t==null||t.forEach(o=>o.remove())}};var Ni=class{constructor(t){this._adapter=t;this._determinate=!1;this._progress=0;this._theme="primary";this._track=!1}initialize(){this._adapter.tryApplyGlobalConfiguration(["track"]),this._adapter.initialize(),this._applyDeterminate()}_applyDeterminate(){this._adapter.setDeterminate(this._determinate),this._determinate&&this._adapter.setProgress(this._progress)}get determinate(){return this._determinate}set determinate(t){t=!!t,this._determinate!==t&&(this._determinate=t,this._applyDeterminate(),this._adapter.toggleHostAttribute(S2.attributes.DETERMINATE,this._determinate))}get progress(){return this._progress}set progress(t){isNaN(t)&&(t=0),this._progress!==t&&(this._progress=t,this._determinate&&this._adapter.setProgress(this._progress),this._adapter.setHostAttribute(S2.attributes.PROGRESS,`${this._progress}`))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t,this._adapter.toggleHostAttribute(S2.attributes.THEME,!!this._theme,this._theme))}get track(){return this._track}set track(t){t=!!t,this._track!==t&&(this._track=t,this._adapter.toggleHostAttribute(S2.attributes.TRACK,this._track))}};var F_='<template><div class="forge-circular-progress" part="progressbar"><slot class="center-content"></slot></div></template>',U_=":host{--_circular-progress-size:var(--forge-circular-progress-size, 48px)}:host{display:inline-flex;vertical-align:middle;block-size:var(--_circular-progress-size);inline-size:var(--_circular-progress-size);position:relative;align-items:center;justify-content:center;transition:background-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);contain:strict;content-visibility:auto}:host([hidden]){display:none}.forge-circular-progress{--_circular-progress-padding:var(--forge-circular-progress-padding, 0);--_circular-progress-track-width:var(--forge-circular-progress-track-width, 12);--_circular-progress-track-color:var(--forge-circular-progress-track-color, transparent);--_circular-progress-track-fill-color:var(--forge-circular-progress-track-fill-color, var(--forge-theme-tertiary-container, #d0d7ff));--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-tertiary, #3d5afe));--_circular-progress-arc-duration:var(--forge-circular-progress-arc-duration, 1333ms);--_circular-progress-theme-transition-duration:var(--forge-circular-progress-theme-transition-duration, var(--forge-animation-duration-short3, 150ms));--_circular-progress-theme-transition-timing:var(--forge-circular-progress-theme-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-circular-progress{flex:1;align-self:stretch;margin:var(--_circular-progress-padding)}.forge-circular-progress--indeterminate{will-change:transform;animation:linear infinite linear-rotate;animation-duration:calc(var(--_circular-progress-arc-duration) * 360 / 306)}.circle,.forge-circular-progress,.left,.right,.spinner,svg{position:absolute;inset:0}.center-content{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.left{overflow:hidden;inset:0 50% 0 0}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:calc(-.5 * var(--_circular-progress-arc-duration)),0s}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_circular-progress-size) * var(--_circular-progress-track-width)/ 100);border-color:var(--_circular-progress-indicator-color) var(--_circular-progress-indicator-color) transparent transparent;transition:border-color var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);will-change:transform;animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:var(--_circular-progress-arc-duration),calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}svg{transform:rotate(-90deg)}svg circle{cx:50%;cy:50%;r:calc(50% * (1 - var(--_circular-progress-track-width)/ 100));stroke-width:calc(var(--_circular-progress-track-width) * 1%);stroke-dasharray:100;fill:transparent}.progress{transition:stroke-dashoffset .5s cubic-bezier(0, 0, .2, 1),stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-indicator-color)}.track{stroke:transparent}.track-background{transition:stroke var(--_circular-progress-theme-transition-duration) var(--_circular-progress-theme-transition-timing);stroke:var(--_circular-progress-track-color)}.spinner{will-change:transform;animation:infinite both rotate-arc;animation-duration:calc(4 * var(--_circular-progress-arc-duration));animation-timing-function:cubic-bezier(0.4,0,0.2,1)}:host(:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--_circular-progress-track-fill-color)}:host([theme=primary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-primary, #3f51b5))}:host([theme=primary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-secondary, #ffc107))}:host([theme=secondary]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-secondary-container, #fff0c3))}:host([theme=success]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-success, #2e7d32))}:host([theme=success]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=error]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-error, #b00020))}:host([theme=error]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=warning]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-warning, #d14900))}:host([theme=warning]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-warning-container, #f4d3c2))}:host([theme=info]) .forge-circular-progress{--_circular-progress-indicator-color:var(--forge-circular-progress-indicator-color, var(--forge-theme-info, #1565c0))}:host([theme=info]:is([track],[determinate])) .forge-circular-progress{--_circular-progress-track-color:var(--forge-circular-progress-track-color, var(--forge-theme-info-container, #c7daf0))}@media screen and (forced-colors:active){.progress{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}",Pt=class extends V1(L1(M)){static get observedAttributes(){return[S2.attributes.DETERMINATE,S2.attributes.PROGRESS,S2.attributes.THEME,S2.attributes.TRACK]}constructor(){super(),H(this,F_,U_),this._core=new Ni(new Pi(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case S2.attributes.DETERMINATE:this.determinate=p(o);break;case S2.attributes.PROGRESS:this.progress=K(o);break;case S2.attributes.THEME:this.theme=o;break;case S2.attributes.TRACK:this.track=p(o);break}}};i([c()],Pt.prototype,"determinate",2),i([c()],Pt.prototype,"progress",2),i([c()],Pt.prototype,"theme",2),i([c()],Pt.prototype,"track",2),Pt=i([y({name:S2.elementName})],Pt);function gp(){f(Pt)}var wp=`${b}color-picker`,W_={VALUE:"value",ALLOW_OPACITY:"allow-opacity",DEBOUNCE_CHANGE_EVENT:"debounce-change-event"},G_={SLIDER_THUMB_ACTIVE:"forge-color-picker__slider-thumb--active",GRADIENT_THUMB_ACTIVE:"forge-color-picker__gradient-thumb--active"},q_={GRADIENT:".forge-color-picker__gradient",GRADIENT_THUMB:".forge-color-picker__gradient-thumb",PREVIEW_COLOR:".forge-color-picker__color-preview",HEX_INPUT:"#forge-color-picker-hex-input",RGBA_INPUT:"#forge-color-picker-rgba-input",HSVA_INPUT:"#forge-color-picker-hsva-input",HUE_SLIDER:".forge-color-picker__hue-slider",HUE_SLIDER_THUMB:"#forge-color-picker-hue-thumb",OPACITY_SLIDER:".forge-color-picker__opacity-slider",OPACITY_SLIDER_THUMB:"#forge-color-picker-opacity-thumb",SLIDER:".forge-color-picker__slider",SLIDER_THUMB:".forge-color-picker__slider-thumb",COLOR_VALUE_HEX_CONTAINER:".forge-color-picker__color-hex",COLOR_VALUE_RGBA_CONTAINER:".forge-color-picker__color-rgba",COLOR_VALUE_HSVA_CONTAINER:".forge-color-picker__color-hsva",TYPE_BUTTON:"#forge-color-picker-type-button",COLOR_VALUE_RGBA_R:"#forge-color-picker-rgba-r-input",COLOR_VALUE_RGBA_G:"#forge-color-picker-rgba-g-input",COLOR_VALUE_RGBA_B:"#forge-color-picker-rgba-b-input",COLOR_VALUE_RGBA_A:"#forge-color-picker-rgba-a-input",COLOR_VALUE_HSVA_H:"#forge-color-picker-hsva-h-input",COLOR_VALUE_HSVA_S:"#forge-color-picker-hsva-s-input",COLOR_VALUE_HSVA_V:"#forge-color-picker-hsva-v-input",COLOR_VALUE_HSVA_A:"#forge-color-picker-hsva-a-input"},Y_={CHANGE:`${wp}-change`},K_={CHANGE_EVENT_DEBOUNCE_THRESHOLD:200},_1={elementName:wp,attributes:W_,events:Y_,classes:G_,selectors:q_,numbers:K_},h3="000000",v3=(s=>(s.HEX="hex",s.RGB="rgb",s.RGBA="rgba",s.HSV="hsv",s.HSVA="hsva",s))(v3||{});var Ri=class extends I{constructor(t){super(t),this._gradientElement=w(t,_1.selectors.GRADIENT),this._previewColorElement=w(t,_1.selectors.PREVIEW_COLOR),this._hexInputElement=w(t,_1.selectors.HEX_INPUT),this._rgbaInputRElement=w(t,_1.selectors.COLOR_VALUE_RGBA_R),this._rgbaInputGElement=w(t,_1.selectors.COLOR_VALUE_RGBA_G),this._rgbaInputBElement=w(t,_1.selectors.COLOR_VALUE_RGBA_B),this._rgbaInputAElement=w(t,_1.selectors.COLOR_VALUE_RGBA_A),this._hsvaInputHElement=w(t,_1.selectors.COLOR_VALUE_HSVA_H),this._hsvaInputSElement=w(t,_1.selectors.COLOR_VALUE_HSVA_S),this._hsvaInputVElement=w(t,_1.selectors.COLOR_VALUE_HSVA_V),this._hsvaInputAElement=w(t,_1.selectors.COLOR_VALUE_HSVA_A),this._hueSliderElement=w(t,_1.selectors.HUE_SLIDER),this._hueSliderThumbElement=w(t,_1.selectors.HUE_SLIDER_THUMB),this._opacitySliderElement=w(t,_1.selectors.OPACITY_SLIDER),this._opacitySliderThumbElement=w(t,_1.selectors.OPACITY_SLIDER_THUMB),this._hexValueContainerElement=w(t,_1.selectors.COLOR_VALUE_HEX_CONTAINER),this._rgbaValueContainerElement=w(t,_1.selectors.COLOR_VALUE_RGBA_CONTAINER),this._hsvaValueContainerElement=w(t,_1.selectors.COLOR_VALUE_HSVA_CONTAINER),this._typeButtonElement=w(t,_1.selectors.TYPE_BUTTON)}setPreviewColor(t){this._previewColorElement.style.backgroundColor=t}setHexInputValue(t){this._hexInputElement.value=t}setRgbaInputValue(t){this._rgbaInputRElement.value=t.r.toString(),this._rgbaInputGElement.value=t.g.toString(),this._rgbaInputBElement.value=t.b.toString(),this._rgbaInputAElement.value=t.a.toString()}setHsvaInputValue(t){this._hsvaInputHElement.value=t.h.toString(),this._hsvaInputSElement.value=t.s.toString(),this._hsvaInputVElement.value=t.v.toString(),this._hsvaInputAElement.value=t.a.toString()}updateA11y(t,e){this._hueSliderThumbElement.setAttribute("aria-valuenow",t.toString()),this._hueSliderThumbElement.setAttribute("aria-valuetext",t.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuenow",e.toString()),this._opacitySliderThumbElement.setAttribute("aria-valuetext",e.toString())}setGradientColor(t){this._gradientElement.style.backgroundColor=t}getHueSliderElement(){return this._hueSliderElement}getOpacitySliderElement(){return this._opacitySliderElement}getGradientElement(){return this._gradientElement}setActiveValueType(t){switch(this._hexValueContainerElement.style.display="none",this._rgbaValueContainerElement.style.display="none",this._hsvaValueContainerElement.style.display="none",t){case"hex":this._hexValueContainerElement.style.removeProperty("display");break;case"rgba":this._rgbaValueContainerElement.style.removeProperty("display");break;case"hsva":this._hsvaValueContainerElement.style.removeProperty("display");break}}focusValueInput(t){switch(t){case"hex":this._hexInputElement.focus(),this._hexInputElement.select();break;case"rgba":this._rgbaInputRElement.focus(),this._rgbaInputRElement.select();break;case"hsva":this._hsvaInputHElement.focus(),this._hsvaInputHElement.select();break}}setTypeClickListener(t){this._typeButtonElement.addEventListener("click",t)}removeTypeClickListener(t){this._typeButtonElement.removeEventListener("click",t)}setHexInputListener(t,e){this._hexInputElement.addEventListener(t,e)}removeHexInputListener(t,e){this._hexInputElement.removeEventListener(t,e)}getHexInputValue(){return this._hexInputElement.value}setRgbaInputListener(t,e){this._rgbaInputRElement.addEventListener(t,e),this._rgbaInputGElement.addEventListener(t,e),this._rgbaInputBElement.addEventListener(t,e),this._rgbaInputAElement.addEventListener(t,e)}removeRgbaInputListener(t,e){this._rgbaInputRElement.removeEventListener(t,e),this._rgbaInputGElement.removeEventListener(t,e),this._rgbaInputBElement.removeEventListener(t,e),this._rgbaInputAElement.removeEventListener(t,e)}getRgbaInputValue(){return{r:parseInt(this._rgbaInputRElement.value,10),g:parseInt(this._rgbaInputGElement.value,10),b:parseInt(this._rgbaInputBElement.value,10),a:parseFloat(this._rgbaInputAElement.value)}}setHsvaInputListener(t,e){this._hsvaInputHElement.addEventListener(t,e),this._hsvaInputSElement.addEventListener(t,e),this._hsvaInputVElement.addEventListener(t,e),this._hsvaInputAElement.addEventListener(t,e)}removeHsvaInputListener(t,e){this._hsvaInputHElement.removeEventListener(t,e),this._hsvaInputSElement.removeEventListener(t,e),this._hsvaInputVElement.removeEventListener(t,e),this._hsvaInputAElement.removeEventListener(t,e)}getHsvaInputValue(){return{h:parseInt(this._hsvaInputHElement.value,10),s:parseInt(this._hsvaInputSElement.value,10),v:parseInt(this._hsvaInputVElement.value,10),a:parseFloat(this._hsvaInputAElement.value)}}toggleOpacityControls(t){t?(this._opacitySliderElement.style.removeProperty("display"),this._rgbaInputAElement.parentElement&&this._rgbaInputAElement.parentElement.style.removeProperty("display"),this._hsvaInputAElement.parentElement&&this._hsvaInputAElement.parentElement.style.removeProperty("display")):(this._opacitySliderElement.style.display="none",this._rgbaInputAElement.parentElement&&(this._rgbaInputAElement.parentElement.style.display="none"),this._hsvaInputAElement.parentElement&&(this._hsvaInputAElement.parentElement.style.display="none"))}};function Fi(n,t,e){let o=e.getBoundingClientRect(),a=n-o.left,s=t-o.top;return a>o.width?a=o.width:a<0&&(a=0),s>o.height?s=o.height:s<0&&(s=0),{x:a,y:s,height:o.height,width:o.width}}function An(n){let t,e,o,a=n.h/60,s=n.s/100,r=n.v/100;if(s===0)return t=e=o=r,{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(o*255),a:n.a};let l=Math.floor(a),h=a-l,v=r*(1-s),m=r*(1-s*h),u=r*(1-s*(1-h));switch(l){case 0:t=r,e=u,o=v;break;case 1:t=m,e=r,o=v;break;case 2:t=v,e=r,o=u;break;case 3:t=v,e=m,o=r;break;case 4:t=u,e=v,o=r;break;default:t=r,e=v,o=m}return{r:Math.round(t*255),g:Math.round(e*255),b:Math.round(o*255),a:n.a}}function Ia(n){return p3(n.r)+p3(n.g)+p3(n.b)+(Math.round(n.a*255)+65536).toString(16).substr(-2)}function p3(n){return("0"+n.toString(16)).slice(-2)}function up(n){let t=n.length===3||n.length===4,e=t?`${n.slice(0,1)}${n.slice(0,1)}`:n.slice(0,2),o=t?`${n.slice(1,2)}${n.slice(1,2)}`:n.slice(2,4),a=t?`${n.slice(2,3)}${n.slice(2,3)}`:n.slice(4,6),s=(t?`${n.slice(3,4)}${n.slice(3,4)}`:n.slice(6,8))||"ff";return{r:parseInt(e,16),g:parseInt(o,16),b:parseInt(a,16),a:parseFloat((parseInt(s,16)/255).toFixed(2))}}function _p(n){return`rgba(${n.r}, ${n.g}, ${n.b}, ${n.a})`}function Ui(n,t){let e=n.replace(/^#/,"");return t||(e.length===4?e=e.substring(0,3):e.length===8&&(e=e.substring(0,6))),`#${e}`}function xp(n){let t=n.r/255,e=n.g/255,o=n.b/255,a=Math.max(t,e,o),s=Math.min(t,e,o),r=a,l=a,h=a,v=a-s;if(l=a===0?0:v/a,a===s)r=0;else{switch(a){case t:r=(e-o)/v+(e<o?6:0);break;case e:r=(o-t)/v+2;break;case o:r=(t-e)/v+4;break}r/=6}return{h:Math.round(r*360),s:Math.round(l*100),v:Math.round(h*100),a:n.a}}function m3(n){if(!n||typeof n!="string")return!1;switch(n.substring(0,1)==="#"&&(n=n.substring(1)),n.length){case 3:return/^[0-9A-F]{3}$/i.test(n);case 4:return/^[0-9A-F]{4}$/i.test(n);case 6:return/^[0-9A-F]{6}$/i.test(n);case 8:return/^[0-9A-F]{8}$/i.test(n);default:return!1}}function d3(n){return O2(n.r)&&n.r>=0&&n.r<=255&&O2(n.g)&&n.g>=0&&n.g<=255&&O2(n.b)&&n.b>=0&&n.b<=255&&O2(n.a)&&n.a>=0&&n.a<=1}function g3(n){return O2(n.h)&&n.h>=0&&n.h<=360&&O2(n.s)&&n.s>=0&&n.s<=100&&O2(n.v)&&n.v>=0&&n.v<=100&&O2(n.a)&&n.a>=0&&n.a<=1}var Wi=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._xPercent=0;this._yPercent=0;this._keydownListener=o=>this._onKeydown(o),this._downListener=o=>this._onDown(o),this._moveListener=o=>this._onMove(o),this._upListener=o=>this._onUp(o),this._initialize()}destroy(){this._unlisten()}setValue(t,e){this._xPercent=Math.max(0,Math.min(100,t)),this._yPercent=Math.max(0,Math.min(100,100-e)),this._setThumbPosition(this._xPercent,this._yPercent)}_initialize(){this._thumbElement=this._rootElement.querySelector(_1.selectors.GRADIENT_THUMB),this._listen(),this._setThumbPosition(this._xPercent,this._yPercent)}_listen(){this._rootElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._rootElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="Enter"||t.keyCode===13,o=t.key==="ArrowLeft"||t.keyCode===37,a=t.key==="ArrowUp"||t.keyCode===38,s=t.key==="ArrowRight"||t.keyCode===39,r=t.key==="ArrowDown"||t.keyCode===40,l=1;if(r)t.preventDefault(),this._yPercent=Math.min(100,this._yPercent+l);else if(a)t.preventDefault(),this._yPercent=Math.max(0,this._yPercent-l);else if(o)t.preventDefault(),this._xPercent=Math.max(0,this._xPercent-l);else if(s)t.preventDefault(),this._xPercent=Math.min(100,this._xPercent+l);else if(e)t.preventDefault();else return;this._setThumbPosition(this._xPercent,this._yPercent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._updateThumbPosition(t)}_onUp(t){document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type),o=e?t.clientX:t.changedTouches[0].clientX,a=e?t.clientY:t.changedTouches[0].clientY,s=this._calculateSliderPercent(o,a);this._xPercent=Math.max(0,Math.min(100,s.x/s.width*100)),this._yPercent=Math.max(0,Math.min(100,s.y/s.height*100)),this._setThumbPosition(this._xPercent,this._yPercent),this._notify()}_calculateSliderPercent(t,e){return Fi(t,e,this._rootElement)}_setThumbPosition(t,e){this._thumbElement.style.left=`${t}%`,this._thumbElement.style.top=`${e}%`}_notify(){if(typeof this._changeListener=="function"){let t=this._xPercent,e=100-this._yPercent;this._changeListener(t,e)}}};var Tn=class{constructor(t,e){this._rootElement=t;this._changeListener=e;this._percent=1;this._min=0;this._max=1;this._step=.01;this._keydownListener=o=>this._onKeydown(o),this._downListener=o=>this._onDown(o),this._moveListener=o=>this._onMove(o),this._upListener=o=>this._onUp(o),this._initialize()}destroy(){this._unlisten()}setValue(t){this._percent=t,this._setThumbPosition(this._percent)}_initialize(){this._thumbElement=this._rootElement.querySelector(_1.selectors.SLIDER_THUMB),this._listen(),this._setThumbPosition(this._percent)}_listen(){this._thumbElement.addEventListener("keydown",this._keydownListener),this._rootElement.addEventListener("mousedown",this._downListener),this._rootElement.addEventListener("touchstart",this._downListener)}_unlisten(){this._thumbElement.removeEventListener("keydown",this._keydownListener),this._rootElement.removeEventListener("mousedown",this._downListener),this._rootElement.removeEventListener("touchstart",this._downListener),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener)}_onKeydown(t){let e=t.key==="ArrowLeft"||t.keyCode===37,o=t.key==="ArrowRight"||t.keyCode===39,a=t.key==="Home"||t.keyCode===36,s=t.key==="End"||t.keyCode===35;e?(t.preventDefault(),this._percent-=this._step):o?(t.preventDefault(),this._percent+=this._step):a?(t.preventDefault(),this._percent=this._min):s&&(t.preventDefault(),this._percent=this._max),this._percent<this._min?this._percent=this._min:this._percent>this._max&&(this._percent=this._max),this._setThumbPosition(this._percent),this._notify()}_onDown(t){t.preventDefault(),document.addEventListener("mousemove",this._moveListener),document.addEventListener("touchmove",this._moveListener),document.addEventListener("mouseup",this._upListener),document.addEventListener("touchend",this._upListener),this._updateThumbPosition(t)}_onMove(t){t.preventDefault(),this._thumbElement.classList.add(_1.classes.SLIDER_THUMB_ACTIVE),this._updateThumbPosition(t)}_onUp(t){this._thumbElement.classList.remove(_1.classes.SLIDER_THUMB_ACTIVE),document.removeEventListener("mousemove",this._moveListener),document.removeEventListener("touchmove",this._moveListener),document.removeEventListener("mouseup",this._upListener),document.removeEventListener("touchend",this._upListener),this._updateThumbPosition(t),this._thumbElement.focus()}_updateThumbPosition(t){let e=/^mouse/.test(t.type)?t.clientX:t.changedTouches[0].clientX;this._percent=this._calculateSliderPercent(e),this._setThumbPosition(this._percent),this._notify()}_calculateSliderPercent(t){let e=Fi(t,0,this._rootElement);return parseFloat((e.x/e.width).toFixed(2))}_setThumbPosition(t){this._thumbElement.style.left=`${t*100}%`}_notify(){typeof this._changeListener=="function"&&this._changeListener(this._percent)}};var Gi=class{constructor(t){this._adapter=t;this._value=null;this._allowOpacity=!0;this._hex=h3;this._hsva={h:0,s:0,v:0,a:1};this._rgba={r:0,g:0,b:0,a:1};this._debounceChangeEvent=!1;this._valueType="hex";this._initialized=!1;this._gradientSliderChangedListener=(e,o)=>this._onGradientSliderChanged(e,o),this._hueSliderChangedListener=e=>this._onHueSliderChanged(e),this._opacitySliderChangedListener=e=>this._onOpacitySliderChanged(e),this._typeClickListener=e=>this._onTypeClicked(e),this._hexInputChangedListener=e=>this._onHexInputChanged(),this._rgbaInputChangedListener=e=>this._onRgbaInputChanged(),this._hsvaInputChangedListener=e=>this._onHsvaInputChanged()}initialize(){this._initialized=!0,this._applyChangeEventTrigger(),this._adapter.setTypeClickListener(this._typeClickListener),this._adapter.setHexInputListener("input",this._hexInputChangedListener),this._adapter.setRgbaInputListener("input",this._rgbaInputChangedListener),this._adapter.setHsvaInputListener("input",this._hsvaInputChangedListener),this._gradientSlider=new Wi(this._adapter.getGradientElement(),this._gradientSliderChangedListener),this._hueSlider=new Tn(this._adapter.getHueSliderElement(),this._hueSliderChangedListener),this._opacitySlider=new Tn(this._adapter.getOpacitySliderElement(),this._opacitySliderChangedListener),this._initializeOpacity(),this._setColorFromHex(),this._adapter.setActiveValueType(this._valueType)}destroy(){this._adapter.removeTypeClickListener(this._typeClickListener),this._adapter.removeHexInputListener("input",this._hexInputChangedListener),this._adapter.removeRgbaInputListener("input",this._hexInputChangedListener),this._adapter.removeHsvaInputListener("input",this._hexInputChangedListener),this._gradientSlider.destroy(),this._hueSlider.destroy(),this._opacitySlider.destroy(),this._initialized=!1}_applyChangeEventTrigger(){this._debounceChangeEvent?this._triggerChangeEvent=Ne((t,e)=>{this._emitChangeEvent(t,e)},_1.numbers.CHANGE_EVENT_DEBOUNCE_THRESHOLD,!1):this._triggerChangeEvent=(t,e)=>this._emitChangeEvent(t,e)}_initializeOpacity(){this._hsva.a=1,this._adapter.toggleOpacityControls(this._allowOpacity),this._render()}_onTypeClicked(t){this._valueType==="hex"?this._valueType="rgba":this._valueType==="rgba"?this._valueType="hsva":this._valueType==="hsva"&&(this._valueType="hex"),this._adapter.setActiveValueType(this._valueType),this._adapter.focusValueInput(this._valueType)}_onHexInputChanged(){let t=this._adapter.getHexInputValue();m3(t)&&(this.value=t,this._triggerChangeEvent("input","hex"))}_onRgbaInputChanged(){let t=this._adapter.getRgbaInputValue();d3(t)&&(this.value=Ia(t),this._triggerChangeEvent("input","rgba"))}_onHsvaInputChanged(){let t=this._adapter.getHsvaInputValue();g3(t)&&(this.value=Ia(An(t)),this._triggerChangeEvent("input","hsva"))}_setColorFromHex(){this._rgba=up(this._hex),this._hsva=xp(this._rgba),this._initialized&&(this._gradientSlider.setValue(this._hsva.s,this._hsva.v),this._hueSlider.setValue(parseFloat((this._hsva.h/360).toFixed(2))),this._opacitySlider.setValue(this._hsva.a),this._render())}_onGradientSliderChanged(t,e){this._hsva.s=t,this._hsva.v=e,this._syncColors(),this._render(),this._triggerChangeEvent("slider","gradient")}_onHueSliderChanged(t){this._hsva.h=parseInt((360*t).toString(),10),this._syncColors(),this._setGradientColor(),this._render(),this._triggerChangeEvent("slider","hue")}_onOpacitySliderChanged(t){this._hsva.a=t,this._syncColors(),this._render(),this._triggerChangeEvent("slider","opacity")}_setGradientColor(){let t=An({h:this._hsva.h,s:100,v:100,a:1});this._adapter.setGradientColor(`rgb(${t.r}, ${t.g}, ${t.b})`)}_syncColors(){this._rgba=An(this._hsva),this._hex=Ia(this._rgba),this._value=this._hex||null}_render(){this._setGradientColor(),this._adapter.setPreviewColor(_p(this._rgba)),this._adapter.setHexInputValue(Ui(this._hex,this._allowOpacity)),this._adapter.setRgbaInputValue(this._rgba),this._adapter.setHsvaInputValue(this._hsva),this._adapter.updateA11y(this._hsva.h,Math.round(this._hsva.a*100))}_emitChangeEvent(t,e){let o={type:t,source:e,hex:Ui(this._hex,!1).replace(/^#/,""),rgba:this._rgba,hsva:this._hsva};this._allowOpacity&&(o.alpha=this._hsva.a),this._adapter.emitHostEvent(_1.events.CHANGE,o)}get value(){return Ui(this._hex,!1)}set value(t){if(this._value!==t){if(this._value=t!=null?t:h3,!m3(this._value))throw new Error("Invalid hex value provided.");this._value=this._value.replace(/^#/,""),this._hex=this._value,this._setColorFromHex(),this._adapter.setHostAttribute(_1.attributes.VALUE,this._value)}}get rgba(){return this._rgba?d({},this._rgba):null}set rgba(t){t?d3(t)&&(this.value=Ia(t)):this.value=null}get hsva(){return this._hsva?d({},this._hsva):null}set hsva(t){t?g3(t)&&(this.value=Ia(An(t))):this.value=null}get opacity(){return this._hsva?this._hsva.a:null}set opacity(t){this._hsva.a!==t&&t!=null&&this._allowOpacity&&(t>=0&&t<=1?(this._hsva.a=t,this._syncColors(),this._initialized&&(this._opacitySlider.setValue(this._hsva.a),this._render())):console.warn(`The provided opacity value (${t}) must be between 0 and 1.`))}get allowOpacity(){return this._allowOpacity}set allowOpacity(t){this._allowOpacity=t,this._initialized&&this._initializeOpacity()}get debounceChangeEvent(){return this._debounceChangeEvent}set debounceChangeEvent(t){this._debounceChangeEvent!==t&&(this._debounceChangeEvent=t,this._initialized&&this._applyChangeEventTrigger())}};var $_='<template><div class="forge-color-picker" part="root"><input type="color" tabindex="-1" class="forge-color-picker__input" spellcheck="false" autocomplete="off" aria-label="Color picker value" part="input"><div class="forge-color-picker__container" part="container"><div class="forge-color-picker__gradient" tabindex="0" part="gradient"><div class="forge-color-picker__gradient-color" part="gradient-color"></div><div class="forge-color-picker__gradient-thumb" part="gradient-thumb"></div></div><div class="forge-color-picker__control-preview" part="controls-preview-container"><div class="forge-color-picker__controls" part="controls-container"><div class="forge-color-picker__slider-control" part="hue-control-container"><div class="forge-color-picker__slider forge-color-picker__hue-slider" part="hue-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-hue-thumb" part="hue-control-slider-thumb" tabindex="0" role="slider" aria-label="Change hue" aria-valuemin="0" aria-valuemax="360" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div><div class="forge-color-picker__slider-control" part="opacity-control-container"><div class="forge-color-picker__canvas" part="opacity-control-canvas"><div class="forge-color-picker__slider forge-color-picker__opacity-slider" part="opacity-control-slider"><div class="forge-color-picker__slider-thumb" id="forge-color-picker-opacity-thumb" part="opacity-control-slider-thumb" tabindex="0" role="slider" aria-label="Change opacity" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-orientation="horizontal" aria-valuetext="0"></div></div></div></div></div><div class="forge-color-picker__color-preview-container forge-color-picker__canvas" part="color-preview-container"><div class="forge-color-picker__color-preview" part="color-preview"></div></div></div><div class="forge-color-picker__value" part="value-container"><div class="forge-color-picker__color-types" part="types-container"><div class="forge-color-picker__color-hex" part="hex-type-container"><div part="hex-type-label-wrapper"><label for="forge-color-picker-hex-input" part="hex-label">HEX</label></div><input type="text" id="forge-color-picker-hex-input" part="hex-input" style="width: 88px" maxlength="9" spellcheck="false" autocomplete="off" aria-label="HEX value"></div><div class="forge-color-picker__color-rgba" part="rgba-type-container"><div part="rgba-type-wrapper-r"><label for="forge-color-picker-rgba-r-input" part="rgba-type-label-r">R</label> <input type="number" id="forge-color-picker-rgba-r-input" part="rgba-type-input-r" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Red"></div><div part="rgba-type-wrapper-g"><label for="forge-color-picker-rgba-g-input" part="rgba-type-label-g">G</label> <input type="number" id="forge-color-picker-rgba-g-input" part="rgba-type-input-g" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Green"></div><div part="rgba-type-wrapper-b"><label for="forge-color-picker-rgba-b-input" part="rgba-type-label-b">B</label> <input type="number" id="forge-color-picker-rgba-b-input" part="rgba-type-input-b" min="0" max="255" maxlength="3" autocomplete="off" aria-label="Blue"></div><div part="rgba-type-wrapper-a"><label for="forge-color-picker-rgba-a-input" part="rgba-type-label-a">A</label> <input type="number" id="forge-color-picker-rgba-a-input" part="rgba-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div><div class="forge-color-picker__color-hsva" part="hsva-type-container"><div part="hsva-type-wrapper-h"><label for="forge-color-picker-hsva-h-input" part="hsva-type-label-h">H</label> <input type="number" id="forge-color-picker-hsva-h-input" part="hsva-type-input-h" min="0" max="360" maxlength="3" autocomplete="off" aria-label="Hue"></div><div part="hsva-type-wrapper-s"><label for="forge-color-picker-hsva-s-input" part="hsva-type-label-s">S</label> <input type="number" id="forge-color-picker-hsva-s-input" part="hsva-type-input-s" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Saturation"></div><div part="hsva-type-wrapper-v"><label for="forge-color-picker-hsva-v-input" part="hsva-type-label-v">V</label> <input type="number" id="forge-color-picker-hsva-v-input" part="hsva-type-input-v" min="0" max="100" maxlength="3" autocomplete="off" aria-label="Value"></div><div part="hsva-type-wrapper-a"><label for="forge-color-picker-hsva-a-input" part="hsva-type-label-a">A</label> <input type="number" id="forge-color-picker-hsva-a-input" part="hsva-type-input-a" min="0" max="1" step="0.1" maxlength="3" autocomplete="off" aria-label="Alpha"></div></div></div><div class="forge-color-picker__type-button" part="type-container"><forge-icon-button part="type-button" id="forge-color-picker-type-button" aria-labelledby="type-button-tooltip" part="type-button-element"><forge-icon name="unfold_more" part="type-button-icon"></forge-icon></forge-icon-button><forge-tooltip placement="bottom" id="type-button-tooltip">Change color format</forge-tooltip></div></div></div></div></template>',X_='*{box-sizing:border-box}.forge-color-picker{width:var(--forge-color-picker-width,272px);position:relative;display:inline-block;overflow:hidden}.forge-color-picker__input{height:1px;opacity:0;position:absolute;width:1px}.forge-color-picker__gradient{position:relative;outline:0}.forge-color-picker__gradient-color{background:linear-gradient(to bottom,rgba(0,0,0,0) 0,#000 100%),linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);height:152px}.forge-color-picker__gradient-thumb{border:1px solid #fff;border-radius:50%;cursor:pointer;display:inline-block;height:10px;width:10px;margin-left:-5px;margin-top:-5px;position:absolute;touch-action:none;user-select:none;transition:left .2s cubic-bezier(.25, .8, .25, 1) 0s,top .2s cubic-bezier(.25, .8, .25, 1) 0s}.forge-color-picker__control-preview{display:flex;align-items:center;width:100%;padding:16px}.forge-color-picker__controls{flex:1;margin-right:16px}.forge-color-picker__slider{position:relative}.forge-color-picker__slider-thumb{outline:0;height:16px;width:16px;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);position:absolute;border-radius:50%;top:calc(50% - 8px);margin-left:-8px;transition:left .4s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__slider-thumb--active{transition:none}.forge-color-picker__slider-thumb:hover{cursor:pointer}.forge-color-picker__color-preview-container{border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.54) inset,0 0 2px 0 rgba(0,0,0,.54);overflow:hidden}.forge-color-picker__color-preview{height:32px;width:32px;transition:background-color .2s cubic-bezier(.25, .8, .25, 1)}.forge-color-picker__value{display:flex;width:100%;align-items:center;padding:0 8px 16px 16px;font-size:12px}.forge-color-picker__color-types{flex:1}.forge-color-picker__color-types label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);color:var(--forge-theme-text-medium,rgba(0,0,0,.6))}.forge-color-picker__color-types input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-color-picker__color-types input[type=number],.forge-color-picker__color-types input[type=text]{border-color:var(--forge-theme-outline,#e0e0e0);color:var(--forge-theme-on-surface,#000);background-color:transparent;padding:4px 8px;border-width:1px;border-style:solid;border-radius:4px;box-sizing:border-box;outline:0;transition-property:box-shadow,border-colo;transition-duration:var(--forge-animation-duration-short4, 200ms);transition-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}.forge-color-picker__color-types input[type=number]:hover,.forge-color-picker__color-types input[type=text]:hover{border-color:var(--forge-theme-text-high,rgba(0,0,0,.87))}.forge-color-picker__color-types input[type=number]:focus,.forge-color-picker__color-types input[type=text]:focus{border-color:var(--forge-theme-primary,#3f51b5);box-shadow:0 0 0 1px inset var(--forge-theme-primary,#3f51b5)}.forge-color-picker__color-types input[type=number]{text-align:center;-moz-appearance:textfield}.forge-color-picker__color-types input[type=number]::-webkit-inner-spin-button,.forge-color-picker__color-types input[type=number]::-webkit-outer-spin-button{appearance:none;margin:0}.forge-color-picker__color-hex{display:flex;flex-direction:column;justify-content:center;align-items:space-between}.forge-color-picker__canvas{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNnB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDYgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDwhLS0gR2VuZXJhdG9yOiBTa2V0Y2ggNTAgKDU0OTgzKSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5Hcm91cCA5PC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Ikdyb3VwLTkiPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExIiBmaWxsPSIjRTBFMEUwIiB4PSIwIiB5PSIwIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weS0yIiBmaWxsPSIjRkZGRkZGIiB4PSIwIiB5PSIzIiB3aWR0aD0iMyIgaGVpZ2h0PSIzIj48L3JlY3Q+CiAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMTEtQ29weSIgZmlsbD0iI0ZGRkZGRiIgeD0iMyIgeT0iMCIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTExLUNvcHktMyIgZmlsbD0iI0UwRTBFMCIgeD0iMyIgeT0iMyIgd2lkdGg9IjMiIGhlaWdodD0iMyI+PC9yZWN0PgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+")}.forge-color-picker__hue-slider{height:8px;background:linear-gradient(to right,red 0,#ff0 16%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 84%,#ff0004 100%)}.forge-color-picker__opacity-slider{height:8px;margin-top:16px;background:linear-gradient(to right,rgba(255,0,0,0) 0,red 100%)}.forge-color-picker__color-hsva,.forge-color-picker__color-rgba{display:flex}.forge-color-picker__color-hsva div,.forge-color-picker__color-rgba div{margin-right:4px}.forge-color-picker__color-hsva label,.forge-color-picker__color-rgba label{display:block;text-align:center}.forge-color-picker__color-hsva input,.forge-color-picker__color-rgba input{width:44px}:host{display:inline-block}:host([hidden]){display:none}',we=class extends M{static get observedAttributes(){return[_1.attributes.VALUE,_1.attributes.ALLOW_OPACITY,_1.attributes.DEBOUNCE_CHANGE_EVENT]}constructor(){super(),X.define(Hl),H(this,$_,X_),this._core=new Gi(new Ri(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case _1.attributes.VALUE:this.value=o;break;case _1.attributes.ALLOW_OPACITY:this.allowOpacity=p(o);break;case _1.attributes.DEBOUNCE_CHANGE_EVENT:this.debounceChangeEvent=p(o);break}}};i([c()],we.prototype,"value",2),i([c()],we.prototype,"rgba",2),i([c()],we.prototype,"hsva",2),i([c()],we.prototype,"opacity",2),i([c()],we.prototype,"allowOpacity",2),i([c()],we.prototype,"debounceChangeEvent",2),we=i([y({name:_1.elementName,dependencies:[i1,m1,j]})],we);function fp(){f(we)}var Z_={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",DATE_FORMAT:"date-format",VALUE_MODE:"value-mode",SHORTCUTS:"shortcuts",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale",CALENDAR_TEXT:"calendar-text"},j_={TOGGLE:"forge-date-picker-toggle"},Q_={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},J_={DATE_FORMAT:"MM/DD/YYYY"},tx=["MM/DD/YYYY","MM/DD/YY","DD/MMM/YYYY","MM-DD-YYYY","MM-DD-YY","DD-MMM-YYYY","YYYY-MM-DD","YYYY-MMM-DD","DD.MM.YYYY","DD.MM.YY"],y1={observedAttributes:Z_,attributes:j_,selectors:Q_,defaults:J_,supportedDateFormats:tx};var U1=class extends M{constructor(){super()}connectedCallback(){this.querySelector(y1.selectors.INPUT)?this._core.initialize():C0(this,y1.selectors.INPUT).then(()=>{this._core.initialize()})}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case y1.observedAttributes.MIN:this.min=o;break;case y1.observedAttributes.MAX:this.max=o;break;case y1.observedAttributes.OPEN:this.open=p(o);break;case y1.observedAttributes.POPUP_CLASSES:this.popupClasses=o;break;case y1.observedAttributes.DISABLED:this.disabled=p(o);break;case y1.observedAttributes.MASKED:this.masked=p(o);break;case y1.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(o);break;case y1.observedAttributes.DATE_FORMAT:this.dateFormat=o;break;case y1.observedAttributes.MASK_FORMAT:this.maskFormat=o;break;case y1.observedAttributes.VALUE_MODE:this.valueMode=o;break;case y1.observedAttributes.SHORTCUTS:this.shortcuts=o==="off"?{}:void 0;break;case y1.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=p(o);break;case y1.observedAttributes.SHOW_TODAY:this.showToday=p(o);break;case y1.observedAttributes.SHOW_CLEAR:this.showClear=p(o);break;case y1.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=Wn(o);break;case y1.observedAttributes.YEAR_RANGE:this.yearRange=o;break;case y1.observedAttributes.LOCALE:this.locale=o;break;case y1.observedAttributes.CALENDAR_TEXT:this.calendarText=JSON.parse(o);break}}};i([c()],U1.prototype,"value",2),i([c()],U1.prototype,"min",2),i([c()],U1.prototype,"max",2),i([c()],U1.prototype,"disabledDates",2),i([c()],U1.prototype,"open",2),i([c()],U1.prototype,"popupClasses",2),i([c()],U1.prototype,"disabled",2),i([c()],U1.prototype,"masked",2),i([c()],U1.prototype,"maskFormat",2),i([c()],U1.prototype,"showMaskFormat",2),i([c()],U1.prototype,"dateFormat",2),i([c()],U1.prototype,"valueMode",2),i([c()],U1.prototype,"shortcuts",2),i([c()],U1.prototype,"notifyInputValueChanges",2),i([c()],U1.prototype,"allowInvalidDate",2),i([c()],U1.prototype,"showToday",2),i([c()],U1.prototype,"showClear",2),i([c()],U1.prototype,"parseCallback",2),i([c()],U1.prototype,"formatCallback",2),i([c()],U1.prototype,"prepareMaskCallback",2),i([c()],U1.prototype,"disabledDaysOfWeek",2),i([c()],U1.prototype,"disableDayCallback",2),i([c()],U1.prototype,"yearRange",2),i([c()],U1.prototype,"locale",2),i([c()],U1.prototype,"calendarText",2);function qi(n){let t=document.createElement("forge-icon-button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),t.slot="end",t.density="medium";let e=document.createElement("forge-icon");return e.name=n,t.appendChild(e),t}var La=class extends I{constructor(e){super(e);this._valueChangeListeners=[];this._identifier=V2()}initialize(){this._initializeInput()}destroy(){var e;(e=this._calendarDropdown)==null||e.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(e=>e())}addToggleListener(e,o){var a;(a=this._toggleElement)==null||a.addEventListener(e,o)}removeToggleListener(e,o){var a;(a=this._toggleElement)==null||a.removeEventListener(e,o)}attachCalendar(e,o){var a,s,r;if((a=this._calendarDropdown)==null||a.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");o&&Object.assign(this._calendarDropdown,o),this._calendarDropdown.open(e),(s=this._calendarDropdown.dropdownElement)==null||s.style.setProperty("--forge-calendar-width","320px"),(r=this._calendarDropdown.calendar)==null||r.style.setProperty("margin","8px"),this.setCalendarText((o==null?void 0:o.calendarText)||{})}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||a.goToDate(e,!0)}addCalendarListener(e,o){var a,s;(s=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||s.addEventListener(e,o)}removeCalendarListener(e,o){var a,s;(s=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||s.removeEventListener(e,o)}setCalendarValue(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.value=e)}setCalendarMinDate(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.min=e)}setCalendarMaxDate(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.max=e)}setCalendarDisabledDates(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.disabledDates=e)}setCalendarDisabledDaysOfWeek(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=e)}setCalendarDisableDayCallback(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=e)}setCalendarActiveDate(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||a.setActiveDate(e)}getCalendarActiveDate(){var e,o;return(o=(e=this._calendarDropdown)==null?void 0:e.calendar)==null?void 0:o.activeDate}setCalendarYearRange(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)!=null&&a.yearRange&&(this._calendarDropdown.calendar.yearRange=e)}setCalendarLocale(e){var o;(o=this._calendarDropdown)!=null&&o.calendar&&(this._calendarDropdown.locale=e)}setCalendarText(e){var a;let o=(a=this._calendarDropdown)==null?void 0:a.calendar;if(o){if(e.today){let s=document.createElement("span");s.slot=g.slots.TODAY_BUTTON_TEXT,s.textContent=e.today,o.append(s)}if(e.clear){let s=document.createElement("span");s.slot=g.slots.CLEAR_BUTTON_TEXT,s.textContent=e.clear,o.append(s)}if(e.nextMonth){let s=document.createElement("span");s.slot=g.slots.NEXT_MONTH_BUTTON_TEXT,s.textContent=e.nextMonth,o.append(s)}if(e.previousMonth){let s=document.createElement("span");s.slot=g.slots.PREVIOUS_MONTH_BUTTON_TEXT,s.textContent=e.previousMonth,o.append(s)}if(e.nextYear){let s=document.createElement("span");s.slot=g.slots.NEXT_YEAR_BUTTON_TEXT,s.textContent=e.nextYear,o.append(s)}if(e.previousYear){let s=document.createElement("span");s.slot=g.slots.PREVIOUS_YEAR_BUTTON_TEXT,s.textContent=e.previousYear,o.append(s)}if(e.nextYears){let s=document.createElement("span");s.slot=g.slots.NEXT_YEARS_BUTTON_TEXT,s.textContent=e.nextYears,o.append(s)}if(e.previousYears){let s=document.createElement("span");s.slot=g.slots.PREVIOUS_YEARS_BUTTON_TEXT,s.textContent=e.previousYears,o.append(s)}}}propagateCalendarKey(e){var o,a;(a=(o=this._calendarDropdown)==null?void 0:o.calendar)==null||a.handleKey(e)}tryCreateToggle(){let e=this._component.querySelector("forge-text-field"),o=this._component.querySelector(y1.selectors.TOGGLE);if(e){let a=e.querySelector(`${t1.elementName}[slot=end]`);if(a||o){this._toggleElement=a||o;return}let s=this._createToggleElement();e.density==="extra-small"&&(s.density="small"),e.appendChild(s),this._toggleElement=s}else o&&(this._toggleElement=o)}_createToggleElement(){return qi("insert_invitation")}_getDefaultTargetElement(){let e=this._component.querySelector(E1.elementName);return e!=null&&e.popoverTargetElement?e.popoverTargetElement:this._component.querySelector("input")||this._component}};var Sn=`${b}date-picker`,ex={VALUE:"value"},ox={INPUT:"input,input[forge-date-picker-input]"},ax={CHANGE:`${Sn}-change`,OPEN:`${Sn}-open`,CLOSE:`${Sn}-close`,INPUT:`${Sn}-input`},Ht={elementName:Sn,selectors:ox,events:ax,observedAttributes:ex};var Yi=class extends La{constructor(t){super(t),this._dropdownIdentifier=`forge-date-picker-${this._identifier}`}_initializeInput(){this._inputElement=this._component.querySelector(Ht.selectors.INPUT)}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new Ha(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=new zo(this._inputElement,t)}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.setAttribute("aria-owns",this._dropdownIdentifier),Ge(),Yt(this._inputElement)}addInputListener(t,e,o){var a;(a=this._inputElement)==null||a.addEventListener(t,e,{capture:o})}removeInputListener(t,e,o){var a;(a=this._inputElement)==null||a.removeEventListener(t,e,{capture:o})}setInputValueChangedListener(t,e){this.destroyValueChangeListener();let o=r0(t,this._inputElement,"value",e);this._valueChangeListeners.push(o)}hasInputElement(){return!!this._inputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._inputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._inputElement&&(this._inputElement.setAttribute("aria-expanded","false"),this._inputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._inputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._inputElement.value!==t&&(this._inputElement.value=t,this._inputMask&&this._inputMask.updateMask(),e&&(this._inputElement.dispatchEvent(new Event("change")),this._inputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return Ue(this._component.ownerDocument)===this._inputElement}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(t){this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),Object.prototype.hasOwnProperty.call(this._toggleElement,"disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}tryFocusInput(){this._inputElement.focus()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}emitInputEvent(t,e){i0(this._inputElement,t,e)}};var Va=class{constructor(t){this._adapter=t;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=nn;this._showMaskFormat=!1;this._dateFormat=y1.defaults.DATE_FORMAT;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._calendarText={};this._isInitialized=!1;this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputValueChangedListener=e=>this._onInputValueChanged(e),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._dateSelectListener=e=>this._onDateSelected(e.detail),this._monthChangeListener=e=>this._onMonthChanged(e),this._activeChangeListener=e=>this._onActiveDescendantChanged(e),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var t;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(t=this._initializeState)==null||t.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputFocus(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(t=!1){this._formatInputValue();let e={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},o={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener,calendarText:this._calendarText},a=new Date().getTime();this._min&&this._max&&this._max.getTime()<a&&(e.year=this._min.getFullYear(),e.month=this._min.getMonth()),this._adapter.attachCalendar(e,o),this._adapter.addCalendarListener(g.events.DATE_SELECT,this._dateSelectListener),this._adapter.addCalendarListener(g.events.MONTH_CHANGE,this._monthChangeListener),this._open=!0,this._adapter.setHostAttribute(y1.observedAttributes.OPEN),t&&this._emitOpenEvent()}_closeCalendar(t=!1){this._open=!1,this._adapter.removeHostAttribute(y1.observedAttributes.OPEN),this._adapter.removeCalendarListener(g.events.DATE_SELECT,this._dateSelectListener),this._adapter.removeCalendarListener(g.events.MONTH_CHANGE,this._monthChangeListener),this._adapter.detachCalendar(),t&&this._emitCloseEvent()}_getDefaultShortcuts(){let t=()=>{this._onToday(),this._open&&this._closeCalendar(!0)};return this._dateFormat.toUpperCase().includes("MMM")?{t}:{n:t,t}}_onInputKeydown(t){var o;if(t.shiftKey)switch(t.key){case"Delete":case"Backspace":t.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){t.preventDefault(),this._adapter.propagateCalendarKey(t);return}break}let e=Object.entries((o=this._shortcuts)!=null?o:this._getDefaultShortcuts());if(e.length&&!t.shiftKey&&t.key.length===1){let a=t.key.toLowerCase(),s=e.find(([r])=>r===a);if(s){t.preventDefault();let[r,l]=s;if(typeof l=="function"){let h=l({instance:this._adapter.hostElement});G2(h)&&this._onDateSelected({date:h,selected:!0,type:"date"})}return}}switch(t.key){case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":t.preventDefault(),this._open?this._adapter.propagateCalendarKey(t):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){t.key==="Enter"&&t.stopPropagation(),t.preventDefault();let a=["ArrowLeft","ArrowRight"].includes(t.key);this._masked&&a&&t.stopImmediatePropagation(),this._adapter.propagateCalendarKey(t)}break;case"PageUp":case"PageDown":this._open&&(t.preventDefault(),this._adapter.propagateCalendarKey(t));break;case"Tab":if(this._open){let a=this._adapter.getCalendarActiveDate();a&&this._onDateSelected({date:a,selected:!0,type:"date"})}break}}_getSanitizedDateString(t){return t.replace(/_/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(t){this._disabled||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeCalendar(!0):(Q2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onMonthChanged(t){this._adapter.redispatchEvent(t)}_onActiveDescendantChanged(t){this._adapter.setActiveDescendant(t)}_formatInputValue(){let t=this._adapter.getInputValue();if(t){let e=this._parseDateString(t);if(G2(e)&&this._isDateValueAcceptable(e)){let o=this._formatDate(e);o&&o!==t&&this._adapter.setInputValue(o,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(t){return G2(t)?typeof this._formatCallback=="function"?this._formatCallback(t):Al(t,this._dateFormat):null}_parseDateString(t){if(t=t.replace(/_/g,""),!t||!t.length)return null;let e=typeof this._parseCallback=="function"?this._parseCallback(t):Bl(t,this._dateFormat);return G2(e)?e:null}_coerceDateValue(t){return typeof t=="string"?this._parseDateString(t):t}_getTypedValue(t){switch(this._valueMode){case"object":return t;case"string":return this._formatDate(t);case"iso-string":return t&&t.setHours(0,0,0,0),t?t.toISOString():null;default:return t}}_isDateValueAcceptable(t){if(!t||this._allowInvalidDate)return!0;let e=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=t.getTime():!0,o=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=t.getTime():!0,a=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],s=()=>!a().some(h=>h.getTime()===t.getTime()),r=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(t.getDay())),l=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(t);return e()&&o()&&s()&&r()&&l()}_initializeMask(){let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:e=>this._handleInput(e)};this._prepareMaskCallback&&(t.prepareCallback=(e,o,a,s)=>this._prepareMaskCallback.call(null,e,o,a,s)),this._adapter.initializeMask(t)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_destroyMask(){this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue()}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(t){if(this._valueMode!==t){if(!["object","string","iso-string"].includes(t))return;this._valueMode=t,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(y1.observedAttributes.VALUE_MODE,this._valueMode)}}get shortcuts(){return this._shortcuts}set shortcuts(t){if(t==="off"){this._shortcuts={};return}this._shortcuts=Object.prototype.toString.call(t)==="[object Object]"?t:void 0}get min(){return this._min?new Date(this._min.getTime()):null}set min(t){if(this._min!==t){let e=this._coerceDateValue(t);this._min=e?new Date(e.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(t){this._max!==t&&(this._max=this._coerceDateValue(t),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(t=>new Date(t.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(t){t?Array.isArray(t)?this._disabledDates=t.map(e=>new Date(e.getTime())):this._disabledDates=new Date(t.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=t}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):this._destroyMask()))}get maskFormat(){return this._maskFormat}set maskFormat(t){this._maskFormat!==t&&(this._maskFormat=t,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get dateFormat(){return this._dateFormat}set dateFormat(t){(typeof t!="string"||!y1.supportedDateFormats.includes(t))&&(this._dateFormat=y1.defaults.DATE_FORMAT),this._dateFormat!==t&&(this._dateFormat=t,this._maskFormat=t===y1.defaults.DATE_FORMAT?nn:t,this._isInitialized&&this._applyMask())}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(t){this._notifyInputValueChanges=t}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(t){this._allowInvalidDate!==t&&(this._allowInvalidDate=t,this._adapter.toggleHostAttribute(y1.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(t){this._disabledDaysOfWeek!==t&&(this._disabledDaysOfWeek=t,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(t){t!==this._disableDayCallback&&(this._disableDayCallback=t,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(t){this._parseCallback=t,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(t){this._formatCallback=t,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(t){this._showToday=t}get showClear(){return this._showClear}set showClear(t){this._showClear=t}get yearRange(){return this._yearRange}set yearRange(t){this._yearRange!==t&&(this._yearRange=t,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(t){this._locale!==t&&(this._locale=t,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}get calendarText(){return d({},this._calendarText)}set calendarText(t){JSON.stringify(this._calendarText)!==JSON.stringify(t)&&(this._calendarText=d({},t),this._adapter.setCalendarText(this._calendarText))}};var Ki=class extends Va{constructor(e){super(e);this._mode="single"}_initializeState(){this._value||(this._value=this._coerceDateValue(this._adapter.getInputValue()))}_emitChangeEvent(e,o){let a=this._getTypedValue(e);return this._adapter.emitHostEvent(Ht.events.CHANGE,a,!0,!o)?(this._setValue(e),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(Ht.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(Ht.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._tryMergeCurrentTime(e),this._onDateSelected({date:e,selected:!0,type:"date"})}_onClear(){this._onDateSelected({date:null,selected:!1,type:"date"})}_getCurrentValue(){return this._value}_setFormattedInputValue(e){let o=this._formatDate(this._value);o?this._adapter.setInputValue(o,e?!1:this._notifyInputValueChanges):this._allowInvalidDate||this._adapter.setInputValue("",e?!1:this._notifyInputValueChanges)}_setValue(e){(!e||this._isDateValueAcceptable(e))&&(this._value=e)}_onDateSelected(e){let o=e.date;if(e.type==="date"&&this._closeCalendar(!0),this._tryMergeCurrentTime(o),!this._emitChangeEvent(o))return;let a=this._formatDate(o);this._adapter.setInputValue(a!=null?a:"",this._notifyInputValueChanges),this._formatInputValue(),Q2.isMobile||this._adapter.selectInputText()}_openCalendar(e){super._openCalendar(e);let o=this._getCurrentValue();o&&this._adapter.goToCalendarDate(new Date(o))}_applyMin(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMin()}_applyMax(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),super._applyMax()}_applyDisabledDates(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_applyDisabledDaysOfWeek(){this._value&&!this._isDateValueAcceptable(this._value)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue())}_handleInput(e){let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);this._tryMergeCurrentTime(a),this._masked&&this._adapter.emitInputEvent(Ht.events.INPUT,o),!b2(a,this._value)&&this._isDateValueAcceptable(a)&&this._emitChangeEvent(a)}_onInputValueChanged(e){let o=this._getSanitizedDateString(e);if(this._masked&&o)return;let a=this._coerceDateValue(o);!b2(a,this._value)&&this._isDateValueAcceptable(a)&&(this.value=a,this._emitChangeEvent(this._value))}_tryMergeCurrentTime(e){!e||!this._value||e.setHours(this._value.getHours(),this._value.getMinutes(),this._value.getSeconds(),this._value.getMilliseconds())}_applyValue(){this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(this._value)}get value(){let e=this._getTypedValue(this._value);return e?qo(e)?new Date(e.getTime()):e:null}set value(e){this._value!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&this._applyValue())}};var nx="<template><slot></slot></template>",sx=":host{display:block}:host([hidden]){display:none}",Ca=class extends U1{static get observedAttributes(){return[...Object.values(y1.observedAttributes),Ht.observedAttributes.VALUE]}constructor(){super(),X.define(xl),H(this,nx,sx),this._core=new Ki(new Yi(this))}attributeChangedCallback(t,e,o){switch(t){case Ht.observedAttributes.VALUE:this.value=o;return}super.attributeChangedCallback(t,e,o)}};Ca=i([y({name:Ht.elementName,dependencies:[R1,v1,i1,j]})],Ca);var bp=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(Ht.elementName);return this._attachTextField(t),t}getInputElement(){return this._textFieldDelegate.inputElement}getTextFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.masked?this._element.addEventListener(Ht.events.INPUT,e=>t(e.target.value)):this.getInputElement().addEventListener("input",e=>t(e.target.value))}onInput(t){this._element.masked?this._element.addEventListener(Ht.events.INPUT,e=>t(e.detail)):this._textFieldDelegate.inputElement.addEventListener("input",e=>t(e.target.value))}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var o,a,s,r;let e={props:d({},(a=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(r=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:r.options)};this._textFieldDelegate=new ao(e),t.appendChild(this._textFieldDelegate.element)}};function yp(){f(Ca)}var kn=`${b}date-range-picker`,$i=class n{constructor(t){t&&(this.from=t.from,this.to=t.to)}copy(){return new n(this)}},rx={FROM:"from",TO:"to",END_VALUE:"end-value"},ix={INPUT:"input"},lx={CHANGE:`${kn}-change`,OPEN:`${kn}-open`,CLOSE:`${kn}-close`,INPUT:`${kn}-input`},U2={elementName:kn,selectors:ix,events:lx,observedAttributes:rx};var Xi=class extends La{constructor(t){super(t),this._dropdownIdentifier=`forge-date-range-picker-${this._identifier}`}_initializeInput(){if(this._fromInputElement=this._component.querySelectorAll(U2.selectors.INPUT)[0],this._toInputElement=this._component.querySelectorAll(U2.selectors.INPUT)[1],!this._fromInputElement||!this._fromInputElement)throw new Error(`The ${U2.elementName} requires two inputs`);if(!this._component.querySelector(`[${L.attributes.MULTI_INPUT_SEPARATOR}]`)){let t=this._createInputSeparator();this._fromInputElement.insertAdjacentElement("afterend",t)}}_initializeCalendarDropdown(){let t=this._getDefaultTargetElement();this._calendarDropdown=new Ha(t,this._dropdownIdentifier)}initializeMask(t){var e;(e=this._fromInputMask)==null||e.destroy(),this._fromInputMask=new zo(this._fromInputElement,t)}destroyMask(){var t;(t=this._fromInputMask)==null||t.destroy(),this._fromInputMask=void 0}initializeToMask(t){var e;(e=this._toInputMask)==null||e.destroy(),this._toInputMask=new zo(this._toInputElement,t)}destroyToMask(){var t;(t=this._toInputMask)==null||t.destroy(),this._toInputMask=void 0}destroy(){super.destroy(),this._destroyToValueChangeListener()}_destroyToValueChangeListener(){typeof this._toValueChangeListener=="function"&&this._toValueChangeListener()}initializeAccessibility(){this._applyToInputs(t=>t.setAttribute("autocomplete","off")),this._applyToInputs(t=>t.setAttribute("autocorrect","off")),this._applyToInputs(t=>t.setAttribute("autocapitalize","off")),this._applyToInputs(t=>t.setAttribute("spellcheck","false")),this._applyToInputs(t=>t.setAttribute("role","combobox")),this._applyToInputs(t=>t.setAttribute("aria-live","assertive")),this._applyToInputs(t=>t.setAttribute("aria-atomic","true")),this._applyToInputs(t=>t.setAttribute("aria-haspopup","true")),this._applyToInputs(t=>t.setAttribute("aria-expanded","false")),this._applyToInputs(t=>t.setAttribute("aria-owns",this._dropdownIdentifier)),this._toInputElement.hasAttribute("aria-label")||this._toInputElement.setAttribute("aria-label","To date"),Ge(),this._applyToInputs(t=>Yt(t))}addInputListener(t,e,o){var a;(a=this._fromInputElement)==null||a.addEventListener(t,e,{capture:o})}addToInputListener(t,e,o){var a;(a=this._toInputElement)==null||a.addEventListener(t,e,{capture:o})}removeInputListener(t,e){var o;(o=this._fromInputElement)==null||o.removeEventListener(t,e)}removeToInputListener(t,e){var o;(o=this._toInputElement)==null||o.removeEventListener(t,e)}setInputValueChangedListener(t,e){this._valueChangeListeners.length&&this.destroyValueChangeListener();let o=r0(t,this._fromInputElement,"value",e);this._valueChangeListeners.push(o)}setToInputValueChangedListener(t,e){this._destroyToValueChangeListener(),this._toValueChangeListener=r0(t,this._toInputElement,"value",e)}hasInputElement(){return!!this._fromInputElement&&!!this._toInputElement}attachCalendar(t,e){super.attachCalendar(t,e),this._fromInputElement.setAttribute("aria-expanded","true")}detachCalendar(){super.detachCalendar(),this._fromInputElement&&(this._fromInputElement.setAttribute("aria-expanded","false"),this._fromInputElement.removeAttribute("aria-activedescendant"))}setActiveDescendant(t){this._fromInputElement.setAttribute("aria-activedescendant",t)}setInputValue(t,e){this._fromInputElement.value!==t&&(this._fromInputElement.value=t,this._fromInputMask&&this._fromInputMask.updateMask(),e&&(this._fromInputElement.dispatchEvent(new Event("change")),this._fromInputElement.dispatchEvent(new Event("input"))))}setToInputValue(t,e){this._toInputElement.value!==t&&(this._toInputElement.value=t,this._toInputMask&&this._toInputMask.updateMask(),e&&(this._toInputElement.dispatchEvent(new Event("change")),this._toInputElement.dispatchEvent(new Event("input"))))}isInputDisabled(){return this._fromInputElement.disabled}isInputFocused(t){if(t&&this._toInputElement===t||this._fromInputElement===t)return!0;let e=Ue(this._component.ownerDocument);return this._toInputElement===e||this._fromInputElement===e}getInputValue(){return this._fromInputElement.value}getToInputValue(){return this._toInputElement.value}setDisabled(t){this._fromInputElement.disabled=t,this._toInputElement.disabled=t,this._toInputElement.setAttribute("aria-disabled",t.toString()),this._fromInputElement.setAttribute("aria-disabled",t.toString()),this._toggleElement&&(this._toggleElement.setAttribute("aria-disabled",t.toString()),Object.prototype.hasOwnProperty.call(this._toggleElement,"disabled")&&(this._toggleElement.disabled=t,this._toggleElement.tabIndex=-1))}emitInputEvent(t,e){i0(this._fromInputElement,t,e)}emitToInputEvent(t,e){i0(this._toInputElement,t,e)}_createToggleElement(){return qi("date_range")}tryFocusInput(){this._fromInputElement.focus()}tryBlurInput(){this._fromInputElement.blur()}selectInputText(){this._fromInputElement.select()}selectToInputText(){this._toInputElement.select()}_applyToInputs(t){[this._fromInputElement,this._toInputElement].forEach(t)}_createInputSeparator(){let t=document.createElement("span");return G(t,!0,L.attributes.MULTI_INPUT_SEPARATOR),t.setAttribute("aria-hidden","true"),t.textContent="-",t}};var Zi=class extends Va{constructor(e){super(e);this._mode="range";this._from=null;this._to=null;this._toInputListener=o=>this._onToInput(o),this._toInputValueChangedListener=o=>this._onToInputValueChanged(o),this._toInputKeydownListener=o=>this._onInputKeydown(o),this._toInputFocusListener=o=>this._onToInputFocus(),this._toInputBlurListener=o=>this._onToInputBlur(o)}initialize(){super.initialize(),this._setFormattedToInputValue(!0)}_initializeState(){this._applyToMask(),this._from||(this._from=this._coerceDateValue(this._adapter.getInputValue())),this._to||(this._to=this._coerceDateValue(this._adapter.getToInputValue()))}_initializeListeners(){super._initializeListeners(),this._adapter.addToInputListener("keydown",this._toInputKeydownListener),this._adapter.addToInputListener("focus",this._toInputFocusListener),this._adapter.addToInputListener("blur",this._toInputBlurListener)}_initializeValueChangedListeners(){super._initializeValueChangedListeners(),this._adapter.setToInputValueChangedListener(this,this._toInputValueChangedListener)}_setInputChangeListeners(){super._setInputChangeListeners(),this._adapter.addToInputListener("input",this._toInputListener)}_removeInputChangeListeners(){super._removeInputChangeListeners(),this._adapter.removeToInputListener("input",this._toInputListener)}_openCalendar(e){this._formatToInputValue(),super._openCalendar(e);let o=this._getCurrentValue();o!=null&&o.to?this._adapter.goToCalendarDate(new Date(o.to)):o!=null&&o.from&&this._adapter.goToCalendarDate(new Date(o.from))}_emitChangeEvent(e,o){let a=this._getTypedValue(e&&e.from||null),s=this._getTypedValue(e&&e.to||null),r=new $i({from:a,to:s});return this._adapter.emitHostEvent(U2.events.CHANGE,r,!0,!o)?(this._setValue(this._coerceDateValue(e&&e.from||null)),this._setToValue(this._coerceDateValue(e&&e.to||null)),!0):!1}_emitOpenEvent(){this._adapter.emitHostEvent(U2.events.OPEN,void 0,!1)}_emitCloseEvent(){this._adapter.emitHostEvent(U2.events.CLOSE,void 0,!1)}_onToday(){let e=new Date;e.setHours(0,0,0,0),this._tryMergeCurrentTime({from:e});let o=this._open?new l2({from:this._from||e,to:this._to||void 0}):new l2({from:e});this._isDateRangeAcceptable(o)&&(this.value=o,this._onDateSelected({date:e,range:o,selected:!0,type:"date"}),this._adapter.setCalendarActiveDate(e))}_onClear(){this._onDateSelected({date:null,range:new l2,selected:!1,type:"date"}),this._closeCalendar(!0)}_getCurrentValue(){return this._value}_applyToMask(){this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_formatToInputValue(){let e=this._adapter.getToInputValue();if(e){let o=this._parseDateString(e);if(G2(o)&&this._isDateValueAcceptable(o)){let a=this._formatDate(o);a&&this._adapter.setToInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setToInputValue("",this._notifyInputValueChanges)}}_setFormattedInputValue(e){var a;let o=(a=this._formatDate(this._from))!=null?a:"";!o&&!this._allowInvalidDate&&(o=""),this._adapter.setInputValue(o,e?!1:this._notifyInputValueChanges)}_setFormattedToInputValue(e){var a;let o=(a=this._formatDate(this._to))!=null?a:"";!o&&!this._allowInvalidDate&&(o=""),this._adapter.setToInputValue(o,e?!1:this._notifyInputValueChanges)}_isDateRangeAcceptable(e){if(!(e!=null&&e.to))return!0;let o=()=>this._isDateValueAcceptable(e.from),a=()=>this._isDateValueAcceptable(e.to),s=()=>e!=null&&e.from&&(e!=null&&e.to)?e.from.getTime()<=e.to.getTime():!0;return o()&&a()&&s()}_setValue(e){this._isDateValueAcceptable(e)&&(this._from=e||null,this._value?this._value.from=this._from:this._value={from:this._from,to:this._to})}_setToValue(e){this._isDateValueAcceptable(e)&&(this._to=e||null,this._value?this._value.to=this._to:this._value={from:this._from,to:this._to})}_onDateSelected(e){let o=e.range;if(e.rangeSelectionState==="to"&&this._closeCalendar(!0),this._tryMergeCurrentTime(o),!this._emitChangeEvent(o!=null?o:null))return;let a=this._formatDate(o&&o.from||null),s=this._formatDate(o&&o.to||null);this._adapter.setInputValue(a!=null?a:"",this._notifyInputValueChanges),this._adapter.setToInputValue(s!=null?s:"",this._notifyInputValueChanges),this._formatInputValue(),this._formatToInputValue(),this._from=o&&o.from||null,this._to=o&&o.to||null,Q2.isMobile||(s?this._adapter.selectToInputText():this._adapter.selectInputText())}_applyMin(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMin()}_applyMax(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue()),super._applyMax()}_applyMask(){super._applyMask(),this._masked?this._initializeToMask():(this._adapter.destroyToMask(),this._formatToInputValue())}_destroyMask(){super._destroyMask(),this._adapter.destroyToMask(),this._formatToInputValue()}_initializeToMask(){if(!this._masked)return;let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:o=>this._handleToInput(o)};this._prepareMaskCallback&&(e.prepareCallback=(o,a,s,r)=>this._prepareMaskCallback.call(null,o,a,s,r)),this._adapter.initializeToMask(e)}_applyDisabledDates(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(new l2({to:this._to||void 0}),!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(new l2({from:this._from||void 0}),!0),this._setFormattedToInputValue())}_applyDisabledDaysOfWeek(){this._from&&!this._isDateValueAcceptable(this._from)&&(this._emitChangeEvent(null,!0),this._setFormattedInputValue()),this._to&&!this._isDateValueAcceptable(this._to)&&(this._emitChangeEvent(null,!0),this._setFormattedToInputValue())}_onToInput(e){this._handleInput(this._adapter.getInputValue())}_handleInput(e){let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);this._tryMergeCurrentTime({from:a}),this._masked&&this._adapter.emitInputEvent(U2.events.INPUT,o),!b2(a,this._from)&&this._isDateValueAcceptable(a)&&this._emitChangeEvent(new l2({from:a||void 0,to:this._to||void 0}))}_handleToInput(e){let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);this._tryMergeCurrentTime({to:a}),this._masked&&this._adapter.emitToInputEvent(U2.events.INPUT,o),!b2(a,this._to)&&this._isDateValueAcceptable(a)&&this._emitChangeEvent(new l2({from:this._from||void 0,to:a||void 0}))}_onToInputFocus(){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectToInputText()}_onToInputBlur(e){this._masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatToInputValue(),this._open&&this._closeCalendar(!0)}_onInputFocus(e){this.masked&&this._showMaskFormat&&(this._initializeMask(),this._initializeToMask()),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&!this._adapter.isInputFocused(e.relatedTarget)&&(this._initializeMask(),this._initializeToMask()),this._formatInputValue(),this._open&&!this._adapter.isInputFocused(e.relatedTarget)&&this._closeCalendar(!0)}_onInputValueChanged(e){if(this._masked)return;let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);b2(a,this._from)||(this.from=a,this._emitChangeEvent(new l2({from:a||void 0,to:this._to||void 0})))}_onToInputValueChanged(e){if(this._masked)return;let o=this._getSanitizedDateString(e),a=this._coerceDateValue(o);b2(a,this._to)||(this.to=a,this._emitChangeEvent(new l2({from:this._from||void 0,to:a||void 0})))}_tryMergeCurrentTime(e){!e||!this._value||!this._value.from&&!this._value.to||(e.from&&this._value.from&&this._value.from instanceof Date&&e.from.setHours(this._value.from.getHours(),this._value.from.getMinutes(),this._value.from.getSeconds(),this._value.from.getMilliseconds()),e.to&&this._value.to&&this._value.to instanceof Date&&e.to.setHours(this._value.to.getHours(),this._value.to.getMinutes(),this._value.to.getSeconds(),this._value.to.getMilliseconds()))}get value(){return{from:this.from,to:this.to}}set value(e){e||(e={from:null,to:null}),e.from===void 0&&(e.from=null),e.to===void 0&&(e.to=null),this.from=e.from,this.to=e.to,this._value={from:this.from,to:this.to}}get from(){let e=this._getTypedValue(this._from);return e?qo(e)?new Date(e.getTime()):e:null}set from(e){this._from!==e&&(this._setValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedInputValue(),this._open&&this._adapter.setCalendarValue(new l2({from:this._coerceDateValue(e)||void 0,to:this._coerceDateValue(this._to)||void 0}))))}get to(){let e=this._getTypedValue(this._to);return e?qo(e)?new Date(e.getTime()):e:null}set to(e){this._to!==e&&(this._setToValue(this._coerceDateValue(e)),this._isInitialized&&(this._setFormattedToInputValue(),this._open&&this._adapter.setCalendarValue(new l2({to:this._coerceDateValue(e)||void 0,from:this._coerceDateValue(this._from)||void 0}))))}};var cx="<template><slot></slot></template>",hx=":host{display:block}:host([hidden]){display:none}",io=class extends U1{static get observedAttributes(){return[...Object.values(y1.observedAttributes),U2.observedAttributes.FROM,U2.observedAttributes.TO]}constructor(){super(),X.define(dl),H(this,cx,hx),this._core=new Zi(new Xi(this))}attributeChangedCallback(t,e,o){switch(t){case U2.observedAttributes.FROM:this.from=o;return;case U2.observedAttributes.TO:this.to=o;return}super.attributeChangedCallback(t,e,o)}};i([c()],io.prototype,"from",2),i([c()],io.prototype,"to",2),io=i([y({name:U2.elementName,dependencies:[R1,v1,i1,j]})],io);var Mp=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(U2.elementName);return this._attachTextField(t),t}get fromInput(){return this._textField.querySelector("input:first-of-type")}get toInput(){return this._textField.querySelector("input:last-of-type")}get textField(){return this._textField}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textField.invalid||!1}set invalid(t){this._textField.invalid=t}onChange(t){this._element.addEventListener(U2.events.CHANGE,e=>t(e.detail))}onFocus(t){this._element.addEventListener("focusin",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}onBlur(t){this._element.addEventListener("focusout",e=>{!this._element.contains(e.relatedTarget)&&t(e)})}_attachTextField(t){var o,a,s,r,l;this._textField=document.createElement(E1.elementName),(o=this._config.options)!=null&&o.required&&(this._textField.required=!0),(a=this._config.options)!=null&&a.density&&(this._textField.density=this._config.options.density),this._fromInput=document.createElement("input"),this._fromInput.type="text",this._fromInput.placeholder=((s=this._config.options)==null?void 0:s.fromPlaceholder)||"From",this._textField.appendChild(this._fromInput),this._toInput=document.createElement("input"),this._toInput.type="text",this._toInput.placeholder=((r=this._config.options)==null?void 0:r.toPlaceholder)||"To",this._textField.appendChild(this._toInput);let e=document.createElement("label");e.textContent=((l=this._config.options)==null?void 0:l.label)||"Choose date range",this._textField.appendChild(e),t.appendChild(this._textField)}};function zp(){f(io)}var Hp={OPEN:"open",DIRECTION:"direction"},vx=d({},Hp),Ip={DRAWER:"forge-drawer",LEFT:"left",RIGHT:"right",CLOSING:"closing",CLOSED:"closed",NO_TRANSITION:"no-transition"},px={DRAWER:`.${Ip.DRAWER}`},mx={AFTER_OPEN:"forge-drawer-after-open",AFTER_CLOSE:"forge-drawer-after-close"},J1={observedAttributes:Hp,attributes:vx,classes:Ip,selectors:px,events:mx};var lo=class extends I{constructor(e){super(e);this._component=e;this._drawerElement=w(this._component,J1.selectors.DRAWER)}proxyScrollEvent(){this.tryUnproxyScrollEvent(),this._unproxyScrollEventCb=Rl(this._component.shadowRoot,this._component)}tryUnproxyScrollEvent(){this._unproxyScrollEventCb&&this._unproxyScrollEventCb()}setDirection(e){switch(e){case"left":this._drawerElement.classList.remove(J1.classes.RIGHT),this._drawerElement.classList.add(J1.classes.LEFT);break;case"right":this._drawerElement.classList.remove(J1.classes.LEFT),this._drawerElement.classList.add(J1.classes.RIGHT);break}}removeDrawerClass(e){ye(e,this._drawerElement)}setDrawerClass(e){H1(e,this._drawerElement)}listenTransitionComplete(e){this._activeTransitionListener&&this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=o=>{o.propertyName==="transform"&&(this._activeTransitionListener&&(this._drawerElement.removeEventListener("transitionend",this._activeTransitionListener),this._activeTransitionListener=void 0),e())},this._drawerElement.addEventListener("transitionend",this._activeTransitionListener)}};var co=class{constructor(t){this._adapter=t;this._open=!0;this._direction="left";this._openAnimationListener=()=>this._onOpenComplete(),this._closeAnimationListener=()=>this._onCloseComplete()}initialize(){this._open?this._setOpened():this._setClosed(),this._applyDirection(),this._adapter.proxyScrollEvent()}destroy(){this._adapter.tryUnproxyScrollEvent()}_applyDirection(){this._adapter.setDirection(this._direction),this._adapter.setHostAttribute(J1.attributes.DIRECTION,O(this._direction)?this._direction.toString():"")}_onOpenComplete(){if(!this._open)return;this._setOpened();let t=new CustomEvent(J1.events.AFTER_OPEN,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_onCloseComplete(){if(this._open)return;this._setClosed();let t=new CustomEvent(J1.events.AFTER_CLOSE,{bubbles:!0,composed:!0});this._adapter.dispatchHostEvent(t)}_setOpened(){this._adapter.removeDrawerClass([J1.classes.CLOSED,J1.classes.CLOSING]),this._adapter.setHostAttribute(J1.attributes.OPEN)}_setClosed(){this._adapter.removeDrawerClass([J1.classes.CLOSING,J1.classes.NO_TRANSITION]),this._adapter.setDrawerClass(J1.classes.CLOSED),this._adapter.removeHostAttribute(J1.attributes.OPEN)}_applyOpen(){this._open?(this._triggerDrawerOpen(),this._adapter.setHostAttribute(J1.attributes.OPEN)):(this._triggerDrawerClose(),this._adapter.removeHostAttribute(J1.attributes.OPEN))}async _triggerDrawerOpen(){this._adapter.listenTransitionComplete(this._openAnimationListener),await Mo(),this._adapter.removeDrawerClass([J1.classes.CLOSED,J1.classes.CLOSING])}async _triggerDrawerClose(){this._adapter.listenTransitionComplete(this._closeAnimationListener),await Mo(),this._adapter.setDrawerClass(J1.classes.CLOSING)}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._open=t,this._adapter.isConnected&&this._applyOpen())}get direction(){return this._direction}set direction(t){this._direction!==t&&(this._direction=t,this._adapter.isConnected&&this._applyDirection())}};var Qe=class extends M{static get observedAttributes(){return Object.values(J1.observedAttributes)}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case J1.observedAttributes.OPEN:this.open=p(o);break;case J1.observedAttributes.DIRECTION:this.direction=o;break}}};i([c()],Qe.prototype,"open",2),i([c()],Qe.prototype,"direction",2);var dx=`${b}drawer`,Lp={elementName:dx};var gx='<template><div class="forge-drawer" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',wx=':host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}:host([open]){transform:translateZ(0)}',Ea=class extends Qe{constructor(){super(),H(this,gx,wx),this._core=new co(new lo(this))}};Ea=i([y({name:Lp.elementName})],Ea);function Vp(){f(Ea)}var ji=class extends lo{constructor(e){super(e);this._component=e;this._backdropElement=w(this._component,i2.elementName)}setBackdropCloseListener(e){this._backdropElement.addEventListener("click",e)}setBackdropVisibility(e,{immediate:o}){return this._backdropElement.toggleAttribute("hidden",!e),!this._backdropElement.fadeIn||!this._backdropElement.fadeOut?(o&&this._backdropElement.toggleAttribute(i2.attributes.VISIBLE,e),Promise.resolve()):o?Promise.resolve(e?this._backdropElement.show():this._backdropElement.hide()):e?this._backdropElement.fadeIn():this._backdropElement.fadeOut()}toggleBackdropClass(e,o){f2(this._backdropElement,e,o)}};var Cp=`${b}modal-drawer`,ux={DISPLAY_NONE:"display-none",SCRIM_CLOSED:"closed"},_x={CLOSE:`${Cp}-close`},Ba={elementName:Cp,classes:ux,events:_x};var Qi=class extends co{constructor(e){super(e);this._adapter=e;this._open=!1;this._backdropClickListener=this._onBackdropClick.bind(this)}initialize(){super.initialize(),this._adapter.setBackdropCloseListener(this._backdropClickListener),this._setBackdrop(this._open,{immediate:!0})}async _triggerDrawerOpen(){super._triggerDrawerOpen(),this._setBackdrop(!0)}async _triggerDrawerClose(){super._triggerDrawerClose(),this._setBackdrop(!1)}_onBackdropClick(e){this._adapter.emitHostEvent(Ba.events.CLOSE,void 0,!0,!0)&&(this.open=!1)}async _setBackdrop(e,{immediate:o=!1}={}){e?(this._adapter.toggleBackdropClass(!1,Ba.classes.SCRIM_CLOSED),this._adapter.setBackdropVisibility(!0,{immediate:o})):this._adapter.isConnected&&(await this._adapter.setBackdropVisibility(!1,{immediate:o}),this._open||this._adapter.toggleBackdropClass(!0,Ba.classes.SCRIM_CLOSED))}};var xx='<template><forge-backdrop class="scrim" hidden exportparts="root:backdrop"></forge-backdrop><div class="forge-drawer modal" part="root"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></template>',fx=':host{--forge-divider-margin:4px 0}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.forge-drawer.modal{position:absolute;top:0;z-index:var(--forge-z-index-dialog,8);box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);max-width:80%}.forge-drawer.modal.closed,.forge-drawer.modal.closing{box-shadow:none}.forge-drawer.modal.closing.right{transform:translateX(100%)}.forge-drawer.right{right:0}.forge-drawer.display-none{display:none!important}.scrim{z-index:var(--forge-z-index-dialog,8)}.scrim.closed{display:none}',Aa=class extends Qe{constructor(){super(),H(this,xx,fx),this._core=new Qi(new ji(this))}};Aa=i([y({name:Ba.elementName,dependencies:[Xe]})],Aa);function Ep(){f(Aa)}var bx=`${b}mini-drawer`,yx={HOVER:"hover"},Bp={elementName:bx,attributes:yx};var Mx='<template><div class="root" part="root"><div class="forge-drawer mini" part="container"><slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot></div></div></template>',zx=':host{--_mini-drawer-width:var(--forge-mini-drawer-width, 56px);--_mini-drawer-min-width:var(--forge-mini-drawer-min-width, var(--_mini-drawer-width));--_mini-drawer-hover-width:var(--forge-mini-drawer-hover-width, var(--forge-drawer-width, 256px));--_mini-drawer-transition-duration:var(--forge-mini-drawer-transition-duration, var(--forge-animation-duration-short4, 200ms));--_mini-drawer-transition-easing:var(--forge-mini-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_mini-drawer-transition-delay:var(--forge-mini-drawer-transition-delay, 300ms);--_mini-drawer-hover-transition-duration:var(--forge-mini-drawer-hover-transition-duration, var(--forge-animation-duration-medium2, 300ms));--_mini-drawer-hover-transition-easing:var(--forge-mini-drawer-hover-transition-easing, var(--_mini-drawer-transition-easing));--_mini-drawer-hover-transition-delay:var(--forge-mini-drawer-hover-transition-delay, var(--forge-animation-duration-medium2, 300ms))}:host{display:grid;box-sizing:border-box;height:100%;overflow:hidden!important;width:var(--_mini-drawer-width);overflow:visible!important;--forge-divider-margin:4px 0}:host([direction=right]){min-width:var(--_mini-drawer-width);width:auto}:host([direction=right]) .root{position:relative}:host(:not([open])){display:none}:host([hover]) .right{position:absolute;right:0}:host([hover]) .forge-drawer:hover{width:var(--_mini-drawer-hover-width)!important;transition:width var(--_mini-drawer-hover-transition-duration) var(--_mini-drawer-hover-transition-easing) var(--_mini-drawer-hover-transition-delay)}:host([hover]) .forge-drawer:hover .content{overflow:auto}.forge-drawer{--_drawer-background:var(--forge-drawer-background, var(--forge-theme-surface, #ffffff));--_drawer-border-color:var(--forge-drawer-border-color, var(--forge-theme-outline, #e0e0e0));--_drawer-width:var(--forge-drawer-width, 256px);--_drawer-border-width:var(--forge-drawer-border-width, var(--forge-border-thin, 1px));--_drawer-transition-duration:var(--forge-drawer-transition-duration, var(--forge-animation-duration-medium1, 250ms));--_drawer-transition-easing:var(--forge-drawer-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_drawer-transition-duration-close:var(--forge-drawer-transition-duration-close, var(--forge-animation-duration-short4, 200ms))}.forge-drawer{width:var(--_drawer-width);height:100%;box-sizing:border-box;overflow:hidden;display:grid;grid-template-columns:1fr;grid-template-rows:auto 1fr auto;background-color:var(--_drawer-background);border-color:var(--_drawer-border-color);transition-property:transform;transition-duration:var(--_drawer-transition-duration);transition-timing-function:var(--_drawer-transition-easing)}.forge-drawer ::slotted([slot=header]){grid-row:1}.forge-drawer ::slotted([slot=footer]){grid-row:3}.forge-drawer .content{overflow-x:auto;-webkit-overflow-scrolling:"touch";display:flex;flex-direction:column;grid-row:2}.forge-drawer .content::-webkit-scrollbar{height:var(--forge-scrollbar-height,16px);width:var(--forge-scrollbar-width,16px)}.forge-drawer .content::-webkit-scrollbar-track{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-track:hover{background-color:var(--forge-scrollbar-track-container-hover,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-corner{background-color:var(--forge-scrollbar-track-container,var(--forge-theme-surface-container-low,#ebebeb))}.forge-drawer .content::-webkit-scrollbar-thumb{height:var(--forge-scrollbar-thumb-min-height,32px);width:var(--forge-scrollbar-thumb-min-width,32px);border-radius:var(--forge-scrollbar-border-radius,calc(var(--forge-shape-full,9999px) * var(--forge-shape-factor,1)));border-width:var(--forge-scrollbar-border-width,3px);border-style:solid;border-color:transparent;background-color:var(--forge-scrollbar-thumb-container,var(--forge-theme-surface-container-medium,#c2c2c2));background-clip:content-box}.forge-drawer .content::-webkit-scrollbar-thumb:hover{background-color:var(--forge-scrollbar-thumb-container-hover,var(--forge-theme-surface-container-high,#9e9e9e))}.forge-drawer.left{border-right-width:var(--_drawer-border-width);border-right-style:solid}.forge-drawer.right{border-left-width:var(--_drawer-border-width);border-left-style:solid}.forge-drawer.right.closing{transform:translateX(100%);right:0;left:auto;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.right.closed{transform:translateX(100%);right:0;left:auto;width:0;border:none}.forge-drawer.closing{transform:translateX(-100%);left:0;z-index:var(--forge-z-index-surface,1);position:absolute;top:0;right:0;transition-duration:var(--_drawer-transition-duration-close)}.forge-drawer.closed{transform:translateX(-100%);left:0;width:0;border:none}.forge-drawer.no-transition{transition:none!important}.root{z-index:var(--forge-z-index-surface,1);height:100%;min-width:var(--_mini-drawer-min-width)}.forge-drawer.mini{width:var(--_mini-drawer-width);z-index:var(--forge-z-index-surface,1);transition:width var(--_mini-drawer-transition-duration) var(--_mini-drawer-transition-easing)}.forge-drawer.mini .content{overflow:hidden}.forge-drawer.closed{width:0}',Ta=class extends Qe{constructor(){super(),H(this,Mx,zx),this._core=new co(new lo(this))}get hover(){return this.hasAttribute("hover")}set hover(t){this.toggleAttribute("hover",t)}};Ta=i([y({name:Bp.elementName})],Ta);function Ap(){f(Ta)}var Tp=`${b}file-picker`,Hx={ACCEPT:"accept",MAX_SIZE:"max-size",CAPTURE:"capture",MULTIPLE:"multiple",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},Ix={HIGHLIGHT:"highlight",DISABLED:"disabled",COMPACT:"compact",BORDERLESS:"borderless"},Lx={CONTAINER:"container",BUTTON:"button",INPUT:"input"},Vx={CONTAINER:"#container",BUTTON:"#button",INPUT:"#input",BUTTON_SLOT:"#button-slot"},Cx={FILES_CHANGED:`${Tp}-change`},x1={elementName:Tp,attributes:Hx,classes:Ix,ids:Lx,selectors:Vx,events:Cx};var Ji=class extends I{constructor(t){super(t),this._container=w(t,x1.selectors.CONTAINER),this._buttonSlot=w(t,x1.selectors.BUTTON_SLOT),this._input=w(t,x1.selectors.INPUT),this._inputEventListener=()=>{this._input.value="",this._input.click()},this._container.addEventListener("click",this._inputEventListener)}destroy(){this._inputEventListener&&(this._container.removeEventListener("click",this._inputEventListener),this._inputEventListener=void 0)}registerButtonSlotListener(t){this._buttonSlot.addEventListener("slotchange",t)}registerInputChangeListener(t){this._input.addEventListener("change",t)}registerDragEnterListener(t){this._container.addEventListener("dragenter",t)}registerDragLeaveListener(t){this._container.addEventListener("dragleave",t)}registerDragOverListener(t){this._container.addEventListener("dragover",t)}registerDropListener(t){this._container.addEventListener("drop",t)}removeDragEnterListener(t){this._container.removeEventListener("dragenter",t)}removeDragLeaveListener(t){this._container.removeEventListener("dragleave",t)}removeDragOverListener(t){this._container.removeEventListener("dragover",t)}removeDropListener(t){this._container.removeEventListener("drop",t)}initializeButton(){let t=this._component.querySelector("forge-button");this._button=t||void 0}setHighlightState(t){this._container.classList.contains(x1.classes.HIGHLIGHT)!==t&&this._container.classList.toggle(x1.classes.HIGHLIGHT)}setAccept(t){t?this._input.setAttribute("accept",t):this._input.removeAttribute("accept")}setCapture(t){t?this._input.setAttribute("capture",t):this._input.removeAttribute("capture")}setMultiple(t){t?this._input.setAttribute("multiple",""):this._input.removeAttribute("multiple")}setDisabled(t){var e,o;t?(this._container.removeEventListener("click",this._inputEventListener),(e=this._button)==null||e.setAttribute("disabled",""),this._container.setAttribute("disabled","")):(this._container.addEventListener("click",this._inputEventListener),(o=this._button)==null||o.removeAttribute("disabled"),this._container.removeAttribute("disabled"))}setCompact(t){this._container.classList.contains(x1.classes.COMPACT)!==t&&this._container.classList.toggle(x1.classes.COMPACT)}setBorderless(t){this._container.classList.contains(x1.classes.BORDERLESS)!==t&&this._container.classList.toggle(x1.classes.BORDERLESS)}};var t4=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._accept=null;this._maxSize=null;this._capture=null;this._multiple=!1;this._disabled=!1;this._compact=!1;this._borderless=!1;this._buttonSlotListener=e=>this._onButtonSlotChanged(e),this._inputChangeListener=e=>this._onInputChange(e),this._dragEnterListener=e=>this._onDragEnter(e),this._dragLeaveListener=e=>this._onDragLeave(e),this._dragOverListener=e=>this._onDragOver(e),this._dropListener=e=>this._onDrop(e),this._adapter.registerButtonSlotListener(this._buttonSlotListener),this._adapter.registerInputChangeListener(this._inputChangeListener),this._compact||this._registerDragListeners()}initialize(){this._adapter.initializeButton(),this._adapter.setDisabled(this._disabled),this._isInitialized=!0}destroy(){this._adapter.destroy(),this._isInitialized=!1}_onButtonSlotChanged(t){this._adapter.initializeButton()}_onInputChange(t){let e=t.target.files;e&&this._handleFiles(e)}_onDragEnter(t){this._handleDragEvent(t,!0)}_onDragLeave(t){this._handleDragEvent(t,!1)}_onDragOver(t){this._handleDragEvent(t,!0)}_onDrop(t){if(this._handleDragEvent(t,!1),!this._disabled){let e=t.dataTransfer;if(e){let o=e.files;this._handleFiles(o)}}}_registerDragListeners(){this._adapter.registerDragEnterListener(this._dragEnterListener),this._adapter.registerDragLeaveListener(this._dragLeaveListener),this._adapter.registerDragOverListener(this._dragOverListener),this._adapter.registerDropListener(this._dropListener)}_removeDragListeners(){this._adapter.removeDragEnterListener(this._dragEnterListener),this._adapter.removeDragLeaveListener(this._dragLeaveListener),this._adapter.removeDragOverListener(this._dragOverListener),this._adapter.removeDropListener(this._dropListener)}_handleFiles(t){let e={};if(t){let o=this._sortFiles(t),a=o.legalFiles||null;!this._multiple&&a&&a.length>1&&(a=a.splice(1)),e=o}this._adapter.emitHostEvent(x1.events.FILES_CHANGED,e)}_sortFiles(t){let e=[],o=[];if(!this._accept&&!this.maxSize)return e=Array.from(t),{legalFiles:e,illegalFiles:o};let a=this._accept?this._accept.split(",").map(s=>s.trim().toLowerCase()):[""];for(let s=0;s<t.length;s++)!a.some(r=>t[s].type.toLowerCase().match(r)||t[s].name.toLowerCase().match("\\"+r))||this._maxSize&&t[s].size>this._maxSize?o.push(t[s]):e.push(t[s]);return{legalFiles:e,illegalFiles:o}}_handleDragEvent(t,e){this._disabled||(t.preventDefault(),t.stopPropagation(),this._adapter.setHighlightState(e))}get accept(){return this._accept}set accept(t){this._accept!==t&&(this._accept=t,this._adapter.setAccept(t),this._adapter.toggleHostAttribute(x1.attributes.ACCEPT,!!t,String(t)))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize!==t&&(this._maxSize=t,this._adapter.toggleHostAttribute(x1.attributes.MAX_SIZE,!!t,String(t)))}get capture(){return this._capture}set capture(t){this._capture!==t&&(this._capture=t,this._adapter.setCapture(t),this._adapter.toggleHostAttribute(x1.attributes.CAPTURE,!!t,String(t)))}get multiple(){return this._multiple}set multiple(t){this._multiple!==t&&(this._multiple=t,this._adapter.setMultiple(t),this._adapter.toggleHostAttribute(x1.attributes.MULTIPLE,t))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._isInitialized&&this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(x1.attributes.DISABLED,t))}get compact(){return this._compact}set compact(t){this._compact!==t&&(this._compact=t,this._adapter.setCompact(t),t?this._removeDragListeners():this._registerDragListeners(),this._adapter.toggleHostAttribute(x1.attributes.COMPACT,t))}get borderless(){return this._borderless}set borderless(t){this._borderless!==t&&(this._borderless=t,this._adapter.setBorderless(t),this._adapter.toggleHostAttribute(x1.attributes.BORDERLESS,t))}};var Ex='<template><form class="forge-file-picker" id="container" part="form"><div class="primary" id="primary" part="primary"><slot name="primary"></slot></div><slot id="button-slot"></slot><div class="secondary" id="secondary" part="secondary"><slot name="secondary"></slot></div><input type="file" class="input" id="input" part="input"></form><div class="helper-text" part="helper-text-container"><slot name="helper-text"></slot></div></template>',Bx=':host{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}:host{display:block;height:100%;width:100%}:host([hidden]){display:none}:host([compact]){display:inline-block}.forge-file-picker{--_file-picker-background:var(--forge-file-picker-background, var(--forge-theme-surface-dim, #fafafa));--_file-picker-width:var(--forge-file-picker-width, auto);--_file-picker-height:var(--forge-file-picker-height, auto);--_file-picker-max-width:var(--forge-file-picker-max-width, auto);--_file-picker-border-width:var(--forge-file-picker-border-width, var(--forge-border-thin, 1px));--_file-picker-border-style:var(--forge-file-picker-border-style, dashed);--_file-picker-border-color:var(--forge-file-picker-border-color, var(--forge-theme-outline-low, #9e9e9e));--_file-picker-gap:var(--forge-file-picker-gap, var(--forge-spacing-medium, 16px));--_file-picker-padding:var(--forge-file-picker-padding, var(--forge-spacing-medium, 16px));--_file-picker-padding-block:var(--forge-file-picker-padding-block, 0);--_file-picker-padding-inline:var(--forge-file-picker-padding-inline, var(--_file-picker-padding));--_file-picker-disabled-opacity:var(--forge-file-picker-disabled-opacity, 0.38);--_file-picker-highlight-background:var(--forge-file-picker-highlight-background, var(--forge-theme-primary-container-minimum, #f7f8fc));--_file-picker-highlight-border-color:var(--forge-file-picker-highlight-border-color, var(--forge-theme-primary, #3f51b5))}.forge-file-picker{display:grid;justify-content:center;align-content:center;gap:var(--_file-picker-gap);box-sizing:border-box;padding:var(--_file-picker-padding);height:var(--_file-picker-height);width:var(--_file-picker-width);max-width:var(--_file-picker-max-width);text-align:center;background:var(--_file-picker-background);cursor:pointer;border-width:var(--_file-picker-border-width);border-style:var(--_file-picker-border-style);border-color:var(--_file-picker-border-color)}.forge-file-picker[disabled]{opacity:var(--_file-picker-disabled-opacity);cursor:unset}.forge-file-picker:not(.compact).highlight{--_file-picker-border-color:var(--_file-picker-highlight-border-color);--_file-picker-background:var(--_file-picker-highlight-background)}.primary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.secondary{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--forge-theme-text-high,rgba(0,0,0,.87));max-width:var(--_file-picker-max-width)}.input{display:none}.helper-text ::slotted([slot=helper-text]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);text-align:start}.borderless{--_file-picker-width:var(--forge-file-picker-width, 100%);border:none}.borderless:not(.compact).highlight{border:none}.borderless+.helper-text{display:none}.compact{--_file-picker-height:var(--forge-file-picker-height, fit-content);--_file-picker-width:var(--forge-file-picker-width, fit-content);--_file-picker-background-color:var(--forge-file-picker-background-color, transparent);--_file-picker-padding:var(--forge-file-picker-padding, 0);border:none}.compact .primary,.compact .secondary{display:none}.compact .button{--_file-picker-width:var(--forge-file-picker-width, auto);background-color:transparent}',Qt=class extends M{static get observedAttributes(){return[x1.attributes.ACCEPT,x1.attributes.MAX_SIZE,x1.attributes.CAPTURE,x1.attributes.MULTIPLE,x1.attributes.DISABLED,x1.attributes.COMPACT,x1.attributes.BORDERLESS]}constructor(){super(),H(this,Ex,Bx),this._core=new t4(new Ji(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case x1.attributes.ACCEPT:this.accept=o;break;case x1.attributes.MAX_SIZE:this.maxSize=K(o);break;case x1.attributes.CAPTURE:this.capture=o;break;case x1.attributes.MULTIPLE:this.multiple=p(o);break;case x1.attributes.DISABLED:this.disabled=p(o);break;case x1.attributes.COMPACT:this.compact=p(o);break;case x1.attributes.BORDERLESS:this.borderless=p(o);break}}};i([c()],Qt.prototype,"accept",2),i([c()],Qt.prototype,"maxSize",2),i([c()],Qt.prototype,"capture",2),i([c()],Qt.prototype,"multiple",2),i([c()],Qt.prototype,"disabled",2),i([c()],Qt.prototype,"compact",2),i([c()],Qt.prototype,"borderless",2),Qt=i([y({name:x1.elementName,dependencies:[T2]})],Qt);var Sp=class extends Z1{constructor(t){super(t)}_build(){return document.createElement(x1.elementName)}_configure(){var t,e,o,a;if((t=this._config.options)!=null&&t.primaryText){let s=document.createElement("span");s.slot="primary",s.textContent=this._config.options.primaryText,this._element.appendChild(s)}if((e=this._config.options)!=null&&e.secondaryText){let s=document.createElement("span");s.slot="secondary",s.textContent=this._config.options.secondaryText,this._element.appendChild(s)}if((o=this._config.options)!=null&&o.buttonText&&new Sr({options:{parent:this._element,text:this._config.options.buttonText},props:{variant:"outlined"}}),(a=this._config.options)!=null&&a.helperText){let s=document.createElement("span");s.slot="helper-text",s.textContent=this._config.options.helperText,this._element.appendChild(s)}}onChange(t){this._element.addEventListener(x1.events.FILES_CHANGED,e=>t(e.detail))}};function kp(){f(Qt)}var Op=`${b}fab`,Dp={THEME:"theme",DENSITY:"density",ELEVATION:"elevation"},Ax=d({},Dp),Tx={LABEL_SLOT:"slot[name=label]"},Sx={EXTENDED:`${Op}--extended`},kx={DEFAULT_THEME:"secondary",DEFAULT_DENSITY:"medium",DEFAULT_ELEVATION:"raised"},c2={elementName:Op,observedAttributes:Dp,attributes:Ax,selectors:Tx,classes:Sx,defaults:kx};var e4=class extends G0{constructor(t){super(t),this._labelSlotElement=w(this._component,c2.selectors.LABEL_SLOT)}initialize(){super.initialize(),this._labelSlotElement.addEventListener("slotchange",()=>this._detectExtendedState()),this._detectExtendedState()}toggleDefaultPopoverIcon(t){super.toggleDefaultPopoverIcon(t),this._detectExtendedState()}_detectExtendedState(){let t=this._labelSlotElement.assignedNodes().length>0||this._component.popoverIcon;this._rootElement.classList.toggle(c2.classes.EXTENDED,t)}};var o4=class extends W0{constructor(e){super(e);this._theme=c2.defaults.DEFAULT_THEME;this._density=c2.defaults.DEFAULT_DENSITY;this._elevation=c2.defaults.DEFAULT_ELEVATION}get theme(){return this._theme}set theme(e){if(this._theme!==e){this._theme=e!=null?e:c2.defaults.DEFAULT_THEME;let o=this._theme!==c2.defaults.DEFAULT_THEME;this._adapter.toggleHostAttribute(c2.attributes.THEME,o,this._theme)}}get density(){return this._density}set density(e){if(this._density!==e){this._density=e!=null?e:c2.defaults.DEFAULT_DENSITY;let o=this._density!==c2.defaults.DEFAULT_DENSITY;this._adapter.toggleHostAttribute(c2.attributes.DENSITY,o,this._density)}}get elevation(){return this._elevation}set elevation(e){if(this._elevation!==e){this._elevation=e!=null?e:c2.defaults.DEFAULT_ELEVATION;let o=this._elevation!==c2.defaults.DEFAULT_ELEVATION;this._adapter.toggleHostAttribute(c2.attributes.ELEVATION,o,this._elevation)}}};var Ox='<template><div class="forge-fab" part="root"><slot name="start"></slot><slot></slot><slot name="label"></slot><slot name="end"></slot><forge-focus-indicator target=":host" part="focus-indicator"></forge-focus-indicator><forge-state-layer target=":host" exportparts="surface:state-layer"></forge-state-layer></div></template>',Dx=':host{--_fab-display:var(--forge-fab-display, inline-flex);--_fab-disabled-cursor:var(--forge-fab-disabled-cursor, not-allowed)}:host{display:var(--_fab-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-fab{--_fab-gap:var(--forge-fab-gap, var(--forge-spacing-xsmall, 8px));--_fab-background:var(--forge-fab-background, var(--forge-theme-secondary, #ffc107));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-secondary, #000000));--_fab-size:var(--forge-fab-size, 56px);--_fab-padding:var(--forge-fab-padding, var(--forge-spacing-xsmall, 8px));--_fab-shadow:var(--forge-fab-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-hover-shadow:var(--forge-fab-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_fab-active-shadow:var(--forge-fab-active-shadow, 0px 3px 3px -2px rgba(0, 0, 0, 0.2), 0px 3px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 8px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-shadow:var(--forge-fab-lowered-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-hover-shadow:var(--forge-fab-lowered-hover-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_fab-lowered-active-shadow:var(--forge-fab-lowered-active-shadow, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_fab-transition-duration:var(--forge-fab-transition-duration, var(--forge-animation-duration-short3, 150ms));--_fab-transition-timing:var(--forge-fab-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_fab-shape-start-start:var(--forge-fab-shape-start-start, var(--_fab-shape));--_fab-shape-start-end:var(--forge-fab-shape-start-end, var(--_fab-shape));--_fab-shape-end-start:var(--forge-fab-shape-end-start, var(--_fab-shape));--_fab-shape-end-end:var(--forge-fab-shape-end-end, var(--_fab-shape));--_fab-extended-padding:var(--forge-fab-extended-padding, var(--forge-spacing-medium-large, 20px));--_fab-extended-min-width:var(--forge-fab-extended-min-width, 96px);--_fab-density-small-size:var(--forge-fab-density-small-size, 40px);--_fab-density-medium-size:var(--forge-fab-density-medium-size, var(--_fab-size));--_fab-density-large-size:var(--forge-fab-density-large-size, 96px);--_fab-disabled-background:var(--forge-fab-disabled-background, var(--forge-theme-surface-container, #e0e0e0));--_fab-disabled-color:var(--forge-fab-disabled-color, var(--forge-theme-on-surface-container, #000000));--_fab-disabled-opacity:var(--forge-fab-disabled-opacity, 0.38)}.forge-fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:inline-flex;justify-content:center;align-items:center;gap:var(--_fab-gap);z-index:0;background:var(--_fab-background);color:var(--_fab-color);cursor:pointer;box-shadow:var(--_fab-shadow);box-sizing:border-box;height:var(--_fab-density-medium-size);min-width:var(--_fab-density-medium-size);padding-inline:var(--_fab-padding);border-width:medium;border-style:none;border-color:currentColor;border-top-left-radius:var(--_fab-shape-start-start);border-top-right-radius:var(--_fab-shape-start-end);border-bottom-left-radius:var(--_fab-shape-end-start);border-bottom-right-radius:var(--_fab-shape-end-end);user-select:none;white-space:nowrap;transition-property:box-shadow,background,color;transition-duration:var(--_fab-transition-duration);transition-timing-function:var(--_fab-transition-timing)}.forge-fab:hover{--_fab-shadow:var(--_fab-hover-shadow)}.forge-fab:active{--_fab-shadow:var(--_fab-active-shadow)}.forge-fab--extended{--_fab-padding:var(--_fab-extended-padding);min-width:var(--_fab-extended-min-width)}.with-anchor{padding-inline:0}::slotted(a){height:100%;width:100%;outline:0;border-radius:var(--_fab-shape);padding-inline:var(--_fab-padding);display:flex;align-items:center;justify-content:center;gap:var(--_fab-gap);color:var(--_fab-color);text-decoration:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_fab-background);--forge-focus-indicator-shape-start-start:var(--_fab-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_fab-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_fab-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_fab-shape-end-end)}forge-state-layer{--forge-state-layer-color:var(--_fab-color)}:host(:is([dense],[density=small])) .forge-fab{--_fab-size:var(--_fab-density-small-size)}:host([density=large]) .forge-fab{--_fab-size:var(--_fab-density-large-size);--_fab-shape:var(--forge-fab-shape, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)))}:host([elevation=lowered]) .forge-fab{--_fab-shadow:var(--_fab-lowered-shadow)}:host([elevation=lowered]) .forge-fab:hover{--_fab-shadow:var(--_fab-lowered-hover-shadow)}:host([elevation=lowered]) .forge-fab:active{--_fab-shadow:var(--_fab-lowered-active-shadow)}:host([disabled]){cursor:var(--_fab-disabled-cursor)}:host([disabled]) .forge-fab{--_fab-background:var(--_fab-disabled-background);--_fab-color:var(--_fab-disabled-color);pointer-events:none;opacity:var(--_fab-disabled-opacity)}:host([theme=primary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-primary, #3f51b5));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=tertiary]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-tertiary, #3d5afe));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=success]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-success, #2e7d32));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-success, #ffffff))}:host([theme=error]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-error, #b00020));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-error, #ffffff))}:host([theme=warning]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-warning, #d14900));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=info]:not([disabled])) .forge-fab{--_fab-background:var(--forge-fab-background, var(--forge-theme-info, #1565c0));--_fab-color:var(--forge-fab-color, var(--forge-theme-on-info, #ffffff))}',z0=class extends jt{static get observedAttributes(){return[...Object.values(h2.observedAttributes),...Object.values(c2.observedAttributes)]}constructor(){super(),H(this,Ox,Dx),this._core=new o4(new e4(this))}attributeChangedCallback(t,e,o){switch(t){case c2.attributes.THEME:this.theme=o;return;case c2.attributes.DENSITY:this.density=o;return;case c2.attributes.ELEVATION:this.elevation=o;return}super.attributeChangedCallback(t,e,o)}};i([c()],z0.prototype,"theme",2),i([c()],z0.prototype,"density",2),i([c()],z0.prototype,"elevation",2),z0=i([y({name:c2.elementName,dependencies:[J,r1,j]})],z0);var Pp=class extends Z1{constructor(t){super(t)}_build(){var e,o,a,s,r;let t=document.createElement(c2.elementName);if((e=this._config.options)!=null&&e.theme&&(t.theme=this._config.options.theme),(o=this._config.options)!=null&&o.density&&(t.density=this._config.options.density),(a=this._config.options)!=null&&a.elevation&&(t.elevation=this._config.options.elevation),(r=(s=this._config.options)==null?void 0:s.label)!=null&&r.trim().length){let l=document.createElement("span");l.slot="label",t.textContent=this._config.options.label,t.appendChild(l)}return t}_configure(){this._configureIcon()}_configureIcon(){var e,o;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((o=this._config.options)==null?void 0:o.iconType)||"component"){case"font":{let a=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[We];H1(a,this._element),this._element.textContent=this._config.options.iconName;break}case"component":this._iconElement=document.createElement(p1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&H1(this._config.options.iconClass,this._iconElement),this._element.appendChild(this._iconElement);break}}get iconElement(){return this._iconElement}get disabled(){return!!this._element.disabled}set disabled(t){this._element.disabled=t}onClick(t){this._element.addEventListener("click",t)}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}};function Np(){f(z0)}var Px=`${b}inline-message`,Nx={THEME:"theme"},Rx={THEME:"info"},Sa={elementName:Px,attributes:Nx,defaults:Rx};var Fx='<template><div class="forge-inline-message" part="root"><slot name="icon"></slot><div class="container" part="container"><slot name="title"></slot><slot></slot></div></div></template>',Ux=':host{display:block}:host([hidden]){display:none}.forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-info-container-low, #e3edf7));--_inline-message-color:var(--forge-inline-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_inline-message-shape:var(--forge-inline-message-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_inline-message-padding:var(--forge-inline-message-padding, var(--forge-spacing-small, 12px));--_inline-message-padding-inline:var(--forge-inline-message-padding-inline, var(--_inline-message-padding));--_inline-message-padding-block:var(--forge-inline-message-padding-block, var(--_inline-message-padding));--_inline-message-border-width:var(--forge-inline-message-border-width, var(--forge-border-thin, 1px));--_inline-message-border-style:var(--forge-inline-message-border-style, none);--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-info-container, #c7daf0));--_inline-message-gap:var(--forge-inline-message-gap, var(--forge-spacing-small, 12px));--_inline-message-icon-gap:var(--forge-inline-message-icon-gap, var(--_inline-message-gap));--_inline-message-content-gap:var(--forge-inline-message-content-gap, var(--_inline-message-gap));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-info-container-low, #0b3768))}.forge-inline-message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);background:var(--_inline-message-background);color:var(--_inline-message-color);border-radius:var(--_inline-message-shape);border-width:var(--_inline-message-border-width);border-style:var(--_inline-message-border-style);border-color:var(--_inline-message-border-color);display:flex;align-items:center;gap:var(--_inline-message-icon-gap);box-sizing:border-box;padding-inline:var(--_inline-message-padding-inline);padding-block:var(--_inline-message-padding-block)}.forge-inline-message .container{display:flex;flex-direction:column;gap:var(--_inline-message-content-gap)}::slotted(*){margin:0}::slotted([slot=title]){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-font-size-scale, .875)));font-weight:var(--forge-typography-heading1-font-weight,500);line-height:var(--forge-typography-heading1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading1-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-heading1-letter-spacing, .0178571429em);text-transform:var(--forge-typography-heading1-text-transform,inherit);text-decoration:var(--forge-typography-heading1-text-decoration,inherit)}::slotted([slot=icon]){color:var(--_inline-message-icon-color);align-self:start}:host([theme=primary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-primary-container-low, #e8eaf6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-primary-container-low, #222c62));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-primary-container, #d1d5ed))}:host([theme=secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-secondary-container, #fff0c3));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-secondary-container, #8a6804));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-secondary, #ffc107))}:host([theme=tertiary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-tertiary-container-low, #e8ebff));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-tertiary-container-low, #213189));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-tertiary-container, #d0d7ff))}:host([theme=success]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-success-container-low, #e6efe6));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-success-container-low, #19441b));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-success-container, #cde0ce))}:host([theme=warning]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-warning-container-low, #f9e9e0));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-warning-container-low, #712700));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-warning-container, #f4d3c2))}:host(:is([theme=error],[theme=danger])) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-error-container-low, #f6e0e4));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-error-container-low, #5f0011));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-error-container, #ecc2c9))}:host([theme=info-secondary]) .forge-inline-message{--_inline-message-background:var(--forge-inline-message-background, var(--forge-theme-surface-container-low, #ebebeb));--_inline-message-icon-color:var(--forge-inline-message-icon-color, var(--forge-theme-on-surface-container-low, #000000));--_inline-message-border-color:var(--forge-inline-message-border-color, var(--forge-theme-surface-container, #e0e0e0))}',ka=class extends M{constructor(){super(),H(this,Fx,Ux)}get theme(){var t;return(t=this.getAttribute(Sa.attributes.THEME))!=null?t:Sa.defaults.THEME}set theme(t){G(this,t!==Sa.defaults.THEME,Sa.attributes.THEME,t)}};ka=i([y({name:Sa.elementName})],ka);function Rp(){f(ka)}var Wx=":host{display:block}.forge-key{--_key-gap:var(--forge-key-gap, var(--forge-spacing-medium, 16px));--_key-direction:var(--forge-key-direction, row)}.forge-key{box-sizing:border-box;display:flex;flex-direction:var(--_key-direction);gap:var(--_key-gap);flex-wrap:wrap}",Fp="forge-key",Up,Wp,ho=class extends(Wp=wt,Up=q2,Wp){constructor(){super(),this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Zt(this,this._internals,{role:"list"})}render(){return gt`<div part="root" class="forge-key"><slot></slot></div>`}};ho.styles=dt(Wx),ho[Up]=Fp,ho=i([kt(Fp)],ho);function Gp(){f(ho)}var Gx=':host{display:inline}.forge-key-item{--_key-item-icon-color:var(--forge-key-item-icon-color, var(--forge-theme-tertiary, #3d5afe));--_key-item-label-color:var(--forge-key-item-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_key-item-value-color:var(--forge-key-item-value-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_key-item-gap:var(--forge-key-item-gap, var(--forge-spacing-xsmall, 8px));--_key-item-icon-size:var(--forge-key-item-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1))}.forge-key-item{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);box-sizing:border-box;display:grid;grid-template:"icon label" "icon value";column-gap:var(--_key-item-gap);inline-size:fit-content;line-height:normal}.forge-key-item.inline{grid-template:"icon label value";grid-template-columns:auto 1fr auto;align-items:center;inline-size:auto}.forge-key-item.no-value{grid-template:"icon label";align-items:center}.forge-key-item.no-value .value{display:none}.forge-key-item:not(.inline,.no-value) .label{padding-block-start:1px}.icon{--forge-icon-size:var(--_key-item-icon-size);grid-area:icon;color:var(--_key-item-icon-color)}.label{grid-area:label;color:var(--_key-item-label-color)}.value{grid-area:value;color:var(--_key-item-value-color)}.default-icon{block-size:calc(var(--_key-item-icon-size) - 1px);inline-size:calc(var(--_key-item-icon-size) - 1px);border-radius:50%;background:currentColor}',qp="forge-key-item",Yp,Kp,Be=class extends(Kp=wt,Yp=q2,Kp){constructor(){super();this.inline=!1;this._hasValue=!1;this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),Zt(this,this._internals,{role:"listitem"}),this._handleSlotChange()}render(){return gt`
|
|
25
25
|
<div part="root" class=${he({"forge-key-item":!0,inline:this.inline,"no-value":!this._hasValue})}>
|
|
26
26
|
<div part="icon" class="icon">
|
|
27
27
|
<slot name="icon">
|
|
@@ -66,7 +66,7 @@ var V3=Object.defineProperty,Am=Object.defineProperties,Tm=Object.getOwnProperty
|
|
|
66
66
|
<slot @slotchange=${this._debounceMeterChange}></slot>
|
|
67
67
|
</div>
|
|
68
68
|
</div>
|
|
69
|
-
`}_syncMeters(){this._meters.forEach(e=>{e.direction=this.direction,e.min=this.min,e.max=this.max})}_handleMeterChange(e){e.stopPropagation(),this._meters.reduce((o,a,s,r)=>(a.style.setProperty("--_meter-z-index",`${r.length-s}`),a.style.setProperty("--_meter-inset",`${o}%`),o+a.percentage),0)}_handleHeadingSlotChange(){let e=[...this._labelNodes,...this._valueNodes].filter(o=>{var a;return!!((a=o.textContent)!=null&&a.trim())});this._hasSlottedHeadingContent=!!e.length}};k2.styles=dt(of),k2.formAssociated=!0,k2[h7]=c7,i([u1({type:Number})],k2.prototype,"min",2),i([u1({type:Number})],k2.prototype,"max",2),i([u1({type:Boolean})],k2.prototype,"tickmarks",2),i([u1()],k2.prototype,"direction",2),i([u1()],k2.prototype,"density",2),i([u1()],k2.prototype,"shape",2),i([u1({attribute:"inner-shape"})],k2.prototype,"innerShape",2),i([ie()],k2.prototype,"_hasSlottedHeadingContent",2),i([j0({slot:"label"})],k2.prototype,"_labelNodes",2),i([j0({slot:"value"})],k2.prototype,"_valueNodes",2),i([qh({selector:"forge-meter"})],k2.prototype,"_meters",2),k2=i([kt(c7)],k2);function p7(){f(k2)}var af=`${b}page-state`,m7={elementName:af};var nf='<template><div class="forge-page-state" part="root"><div class="graphic" part="graphic-container"><slot name="graphic"></slot></div><div class="title" part="title-container"><slot name="title"></slot></div><div class="message" part="message-container"><slot name="message"></slot></div><div class="actions" part="actions-container"><slot name="action"></slot></div></div></template>',sf=':host{--_page-state-width:var(--forge-page-state-width, 576px);--_page-state-height:var(--forge-page-state-height, auto);--_page-state-spacing:var(--forge-page-state-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-width:var(--forge-page-state-mobile-width, 70%);--_page-state-graphic-height:var(--forge-page-state-graphic-height, 296px);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-graphic-height:var(--forge-page-state-mobile-graphic-height, auto);--_page-state-title-color:var(--forge-page-state-title-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_page-state-title-spacing:var(--forge-page-state-title-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-title-spacing-mobile:var(--forge-page-state-title-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-message-color:var(--forge-page-state-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_page-state-message-spacing:var(--forge-page-state-message-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-message-spacing-mobile:var(--forge-page-state-message-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-actions-spacing:var(--forge-page-state-actions-spacing, 16px)}:host{display:flex;justify-content:center;align-items:center;width:100%;container-type:inline-size}:host([hidden]){display:none}.forge-page-state{width:var(--_page-state-width);margin-block:var(--_page-state-spacing);text-align:center}.forge-page-state .graphic{display:flex;justify-content:center;align-items:center;height:var(--_page-state-graphic-height);width:100%;margin-block-end:var(--_page-state-graphic-spacing)}.forge-page-state .graphic ::slotted([slot=graphic]){height:100%;width:100%}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading8-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading8-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-font-size-scale, 2.25)));font-weight:var(--forge-typography-heading8-font-weight,500);line-height:var(--forge-typography-heading8-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-line-height-scale, 2.625)));letter-spacing:var(--forge-typography-heading8-letter-spacing, -.0027777778em);text-transform:var(--forge-typography-heading8-text-transform,inherit);text-decoration:var(--forge-typography-heading8-text-decoration,inherit);--_page-state-title-spacing:var(--_page-state-title-spacing-mobile);color:var(--_page-state-title-color);margin-block:var(--_page-state-title-spacing)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body4-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body4-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1.25)));font-weight:var(--forge-typography-body4-font-weight,400);line-height:var(--forge-typography-body4-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-body4-letter-spacing, .005em);text-transform:var(--forge-typography-body4-text-transform,inherit);text-decoration:var(--forge-typography-body4-text-decoration,inherit);--_page-state-message-spacing:var(--_page-state-message-spacing-mobile);color:var(--_page-state-message-color);margin-block-end:var(--_page-state-message-spacing)}.forge-page-state .actions{display:grid;justify-content:center;grid-auto-flow:column;gap:var(--_page-state-actions-spacing)}@container (max-width:599px){.forge-page-state{--_page-state-width:var(--_page-state-mobile-width)}.forge-page-state .graphic{--_page-state-graphic-height:var(--_page-state-mobile-graphic-height);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, 0)}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading5-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading5-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-font-size-scale, 1.5)));font-weight:var(--forge-typography-heading5-font-weight,500);line-height:var(--forge-typography-heading5-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-heading5-letter-spacing, 0);text-transform:var(--forge-typography-heading5-text-transform,inherit);text-decoration:var(--forge-typography-heading5-text-decoration,inherit)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit)}.forge-page-state .actions{grid-auto-flow:row}}',Da=class extends M{constructor(){super(),H(this,nf,sf)}};Da=i([y({name:m7.elementName})],Da);function d7(){f(Da)}var g7=`${b}paginator`,w7={PAGE_INDEX:"page-index",PAGE_SIZE:"page-size",OFFSET:"offset",TOTAL:"total",PAGE_SIZE_OPTIONS:"page-size-options",LABEL:"label",FIRST_LAST:"first-last",FIRST:"first",DISABLED:"disabled",ALTERNATIVE:"alternative"},rf=d({},w7),lf={LABEL:".label > slot[name=label]",PAGE_SIZE_SELECT:".page-size-options",RANGE_LABEL:".range-label > slot[name=range-label]",FIRST_PAGE_BUTTON:".first-page",FIRST_PAGE_CONTAINER:"#first-page-container",PREVIOUS_PAGE_BUTTON:".previous-page",PREVIOUS_PAGE_CONTAINER:"#previous-page-container",NEXT_PAGE_BUTTON:".next-page",NEXT_PAGE_CONTAINER:"#next-page-container",LAST_PAGE_BUTTON:".last-page",LAST_PAGE_CONTAINER:"#last-page-container",RANGE_LABEL_ALTERNATIVE:".alternative-range-label > slot[name=alternative-range-label]"},cf={CHANGE:`${g7}-change`},hf={DEFAULT_PAGE_INDEX:0,DEFAULT_TOTAL:0,DEFAULT_PAGE_SIZE:25,DEFAULT_PAGE_SIZE_OPTIONS:[5,15,25,50,100]},vf={DEFAULT_LABEL:"Rows per page:",RANGE_SEPARATOR_LABEL:"of"},Z={elementName:g7,observedAttributes:w7,attributes:rf,selectors:lf,events:cf,numbers:hf,strings:vf};var s4=class{constructor(t){this._adapter=t;this._pageIndex=Z.numbers.DEFAULT_PAGE_INDEX;this._pageSize=Z.numbers.DEFAULT_PAGE_SIZE;this._offset=0;this._total=Z.numbers.DEFAULT_TOTAL;this._pageSizeOptions=Z.numbers.DEFAULT_PAGE_SIZE_OPTIONS.map(t=>({label:`${t}`,value:`${t}`}));this._label=Z.strings.DEFAULT_LABEL;this._firstLast=!1;this._first=!1;this._disabled=!1;this._alternative=!1;this._firstPageListener=this._onFirstPage.bind(this);this._previousPageListener=this._onPreviousPage.bind(this);this._nextPageListener=this._onNextPage.bind(this);this._lastPageListener=this._onLastPage.bind(this);this._pageSizeListener=this._onPageSizeChanged.bind(this)}initialize(){this._updateRangeLabel(),this._adapter.setLabel(this._label),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.setPageSize(this._pageSize),this._attachListeners(),this._toggleFirstLastButtons(),this._syncInteractionState()}focus(t){this._adapter.setFocus(t)}_attachListeners(){this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.attachFirstPageListener(this._firstPageListener),this._adapter.attachPreviousPageListener(this._previousPageListener),this._adapter.attachNextPageListener(this._nextPageListener),this._adapter.attachLastPageListener(this._lastPageListener)}_onFirstPage(t){if(t.stopPropagation(),!this._hasFirstPage())return;let e=0;this._dispatchChangeEvent("first-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPreviousPage(t){if(t.stopPropagation(),!this._hasPreviousPage())return;let e=this._pageIndex-1;this._dispatchChangeEvent("previous-page",{pageIndex:e})&&this._applyPageIndex(e)}_onNextPage(t){if(t.stopPropagation(),!this._hasNextPage())return;let e=this._pageIndex+1;this._dispatchChangeEvent("next-page",{pageIndex:e})&&this._applyPageIndex(e)}_onLastPage(t){if(t.stopPropagation(),!this._hasLastPage())return;let e=this._getMaxPages();this._dispatchChangeEvent("last-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPageSizeChanged(t){t.stopPropagation();let e=Number(t.detail);this._dispatchChangeEvent("page-size",{pageIndex:0,pageSize:e})?(this._applyPageIndex(0),this._applyPageSize(e)):t.preventDefault()}_dispatchChangeEvent(t,{pageSize:e=this._pageSize,pageIndex:o=this._pageIndex}={}){let a=o*e,s={type:t,pageSize:e,pageIndex:o,offset:a},r=new CustomEvent(Z.events.CHANGE,{detail:s,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(r),!r.defaultPrevented}_getMaxPages(){return Math.ceil(this._total/this._pageSize)-1}_updateRangeLabel(){let t;if(typeof this._rangeLabelCallback=="function"){let e={pageSize:this._pageSize,pageIndex:this._pageIndex,offset:this._offset,pageStart:this._pageIndex*this._pageSize+1,pageEnd:Math.min((this._pageIndex+1)*this._pageSize,this._total),total:this._total};t=this._rangeLabelCallback.call(null,e)}else if(this.pageSize>1){let e=this._pageIndex*this._pageSize,a=(Math.floor(e/this._pageSize)||0)*this._pageSize+1,s=e<this._total?Math.min(e+this._pageSize,this._total):e+this._pageSize;t=`${a}-${s} ${Z.strings.RANGE_SEPARATOR_LABEL} ${this._total}`}else t=`${this._pageIndex+1} ${Z.strings.RANGE_SEPARATOR_LABEL} ${this._total}`;this._adapter.setRangeLabel(t)}_syncInteractionState(){if(this._disabled)return;this._adapter.setFirstPageButtonEnabled(!0),this._adapter.setPreviousPageButtonEnabled(!0),this._adapter.setNextPageButtonEnabled(!0),this._adapter.setLastPageButtonEnabled(!0);let t=[];this._hasFirstPage()||t.push("first"),this._hasPreviousPage()||t.push("previous"),this._hasNextPage()||t.push("next"),this._hasLastPage()||t.push("last"),this._adapter.tryDisableFields(t)}_toggleFirstLastButtons(){this._toggleFirstButton(),this._firstLast?this._adapter.hasLastPageButton()||this._adapter.showLastPageButton():this._adapter.hasLastPageButton()&&this._adapter.hideLastPageButton()}_toggleFirstButton(){this._first||this._firstLast?this._adapter.hasFirstPageButton()||this._adapter.showFirstPageButton():this._adapter.hasFirstPageButton()&&this._adapter.hideFirstPageButton()}_hasFirstPage(){return this._hasPreviousPage()}_hasPreviousPage(){return this._pageIndex>0&&this._pageSize>0}_hasNextPage(){let t=this._getMaxPages();return this._pageIndex<t&&this._pageSize>0}_hasLastPage(){return this._hasNextPage()}_computePageIndexFromOffset(t){t>=this._total&&(this._total>=this._pageSize?t=this._total-this._pageSize:t=0);let e=Math.min(Math.max(t,0),this._total),o=Math.floor(e/this._pageSize);this._applyPageIndex(o)}_computeOffset(){this._total>0&&(this._offset=this._pageIndex*this._pageSize)}_applyPageIndex(t){this._pageIndex=t,this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState(),this._adapter.toggleHostAttribute(Z.attributes.PAGE_INDEX,this._pageIndex!=null,this._pageIndex.toString())}_applyPageSize(t){this._pageSize=t,this._adapter.setPageSize(this._pageSize),this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState()}_applyTotal(t){this._total=t,this._updateRangeLabel(),this._offset>0&&this._total>0&&this._computePageIndexFromOffset(this._offset),this._syncInteractionState()}_applyDisabled(t){this._disabled=t,t?(this._adapter.setPageSizeSelectEnabled(!1),this._adapter.setFirstPageButtonEnabled(!1),this._adapter.setPreviousPageButtonEnabled(!1),this._adapter.setNextPageButtonEnabled(!1),this._adapter.setLastPageButtonEnabled(!1)):(this._adapter.setPageSizeSelectEnabled(!0),this._syncInteractionState())}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex!==t&&(O(t)?this._applyPageIndex(t):this._adapter.removeHostAttribute(Z.attributes.PAGE_INDEX))}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize!==t&&(this._applyPageSize(t),this._adapter.setHostAttribute(Z.attributes.PAGE_SIZE,`${this._pageSize}`))}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this._computePageIndexFromOffset(t))}get total(){return this._total}set total(t){this._total!==t&&(this._applyTotal(t),this._adapter.setHostAttribute(Z.attributes.TOTAL,`${this._total}`))}get pageSizeOptions(){return this._pageSizeOptions.map(t=>Number(t.value))}set pageSizeOptions(t){if(ht(t)&&t.length){if(this._pageSizeOptions=t.map(e=>({label:e.toString(),value:e.toString()})).sort((e,o)=>K(e.value)-K(o.value)),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!0),O(this._pageSize)&&this._pageSizeOptions.length&&!this._pageSizeOptions.find(e=>K(e.value)===this._pageSize)){let e=K(this._pageSizeOptions[0].value);this._applyPageSize(e)}}else t!=null&&t.length||(this._adapter.detachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!1))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setLabel(this._label),O(this._label)&&this._label.length?this._adapter.setHostAttribute(Z.attributes.LABEL,String(this._label)):this._adapter.removeHostAttribute(Z.attributes.LABEL))}get firstLast(){return this._firstLast}set firstLast(t){t=!!t,this._firstLast!==t&&(this._firstLast=t,this._toggleFirstLastButtons(),this._adapter.toggleHostAttribute(Z.attributes.FIRST_LAST,this._firstLast))}get first(){return this._first}set first(t){t=!!t,this._first!==t&&(this._first=t,this._toggleFirstButton(),this._adapter.toggleHostAttribute(Z.attributes.FIRST,this._first))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._applyDisabled(t),this._adapter.toggleHostAttribute(Z.attributes.DISABLED,this._disabled))}get alternative(){return this._alternative}set alternative(t){t=!!t,t!==this._alternative&&(this._alternative=t,this._adapter.toggleHostAttribute(Z.attributes.ALTERNATIVE,this._alternative))}get rangeLabelCallback(){return this._rangeLabelCallback}set rangeLabelCallback(t){this._rangeLabelCallback=t,this._updateRangeLabel()}};var r4=class extends I{constructor(t){super(t),this._labelElement=w(t,Z.selectors.LABEL),this._pageSizeSelect=w(t,Z.selectors.PAGE_SIZE_SELECT),this._rangeLabel=w(t,Z.selectors.RANGE_LABEL),this._rangeLabelAlternative=w(t,Z.selectors.RANGE_LABEL_ALTERNATIVE),this._firstPageButton=w(t,Z.selectors.FIRST_PAGE_BUTTON),this._firstPageContainer=w(t,Z.selectors.FIRST_PAGE_CONTAINER),this._previousPageButton=w(t,Z.selectors.PREVIOUS_PAGE_BUTTON),this._previousPageContainer=w(t,Z.selectors.PREVIOUS_PAGE_CONTAINER),this._nextPageButton=w(t,Z.selectors.NEXT_PAGE_BUTTON),this._nextPageContainer=w(t,Z.selectors.NEXT_PAGE_CONTAINER),this._lastPageButton=w(t,Z.selectors.LAST_PAGE_BUTTON),this._lastPageContainer=w(t,Z.selectors.LAST_PAGE_CONTAINER)}setLabel(t){this._labelElement.textContent=t}setPageSizeOptions(t){n2(this._pageSizeSelect),this._pageSizeSelect.options=t}setPageSize(t){this._pageSizeSelect.value=t.toString()}setRangeLabel(t){this._rangeLabel.innerText=t,this._rangeLabelAlternative.innerText=t}hasFirstPageButton(){return!!w(this._component,Z.selectors.FIRST_PAGE_BUTTON)}showFirstPageButton(){this._firstPagePlaceholder=Za(this._component,!0,Z.elementName,Z.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hideFirstPageButton(){this._firstPagePlaceholder=Za(this._component,!1,Z.elementName,Z.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hasLastPageButton(){return!!w(this._component,Z.selectors.LAST_PAGE_BUTTON)}showLastPageButton(){this._lastPagePlaceholder=Za(this._component,!0,Z.elementName,Z.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}hideLastPageButton(){this._lastPagePlaceholder=Za(this._component,!1,Z.elementName,Z.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}attachPageSizeChangeListener(t){this._pageSizeSelect.addEventListener("change",t)}detachPageSizeChangeListener(t){this._pageSizeSelect.removeEventListener("change",t)}attachFirstPageListener(t){this._firstPageButton.addEventListener("click",t)}attachPreviousPageListener(t){this._previousPageButton.addEventListener("click",t)}attachNextPageListener(t){this._nextPageButton.addEventListener("click",t)}attachLastPageListener(t){this._lastPageButton.addEventListener("click",t)}setFirstPageButtonEnabled(t){this._firstPageButton.disabled=!t}setPreviousPageButtonEnabled(t){this._previousPageButton.disabled=!t}setNextPageButtonEnabled(t){this._nextPageButton.disabled=!t}setLastPageButtonEnabled(t){this._lastPageButton.disabled=!t}setPageSizeSelectEnabled(t){this._pageSizeSelect.disabled=!t}setPageSizeVisibility(t){this._pageSizeSelect.hidden=!t}setFocus(t){this._tryFocus([this._pageSizeSelect,this._firstPageButton,this._previousPageButton,this._nextPageButton,this._lastPageButton],t)}tryDisableFields(t){let e={first:()=>this.setFirstPageButtonEnabled(!1),last:()=>this.setLastPageButtonEnabled(!1),previous:()=>this.setPreviousPageButtonEnabled(!1),next:()=>this.setNextPageButtonEnabled(!1)};t.forEach(o=>{var a;return(a=e[o])==null?void 0:a.call(e)})}_tryFocus(t,e){let o=typeof(e==null?void 0:e.preventScroll)=="boolean"?e.preventScroll:!0;for(let a of t)if(a&&a.isConnected&&!a.disabled&&a.style.display!=="none"){a.focus(S(d({},e),{preventScroll:o}));return}}};function u7(n){class t extends n{constructor(...o){super(...o)}initializeFieldInstance(o){this._fieldElement=o,this._fieldElement.shadowRoot||window.customElements.upgrade(this._fieldElement)}attributeChangedCallback(o,a,s){var r;switch(o){case Y.observedAttributes.LABEL_POSITION:this.labelPosition=s;return;case Y.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=s;return;case Y.observedAttributes.INVALID:this.invalid=p(s);return;case Y.observedAttributes.REQUIRED:this.required=p(s);return;case Y.observedAttributes.OPTIONAL:this.optional=p(s);return;case Y.observedAttributes.DISABLED:this.disabled=p(s);return;case Y.observedAttributes.FLOAT_LABEL:this.floatLabel=p(s);return;case Y.observedAttributes.VARIANT:this.variant=s;return;case Y.observedAttributes.THEME:this.theme=s;return;case Y.observedAttributes.SHAPE:this.shape=s;return;case Y.observedAttributes.DENSITY:this.density=s;return;case Y.observedAttributes.DENSE:this.dense=p(s);return;case Y.observedAttributes.POPOVER_ICON:this.popoverIcon=p(s);return;case Y.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=s;return}(r=super.attributeChangedCallback)==null||r.call(this,o,a,s)}get labelPosition(){return this._fieldElement.labelPosition}set labelPosition(o){this._fieldElement.labelPosition!==o&&(this._fieldElement.labelPosition=o,this.setAttribute(L.attributes.LABEL_POSITION,o))}get labelAlignment(){return this._fieldElement.labelAlignment}set labelAlignment(o){this._fieldElement.labelAlignment!==o&&(this._fieldElement.labelAlignment=o,this.setAttribute(L.attributes.LABEL_ALIGNMENT,o))}get invalid(){return this._fieldElement.invalid}set invalid(o){this._fieldElement.invalid!==o&&(this._fieldElement.invalid=o,this.toggleAttribute(L.attributes.INVALID,o))}get required(){return this._fieldElement.required}set required(o){this._fieldElement.required!==o&&(this._fieldElement.required=o,this.toggleAttribute(L.attributes.REQUIRED,o))}get optional(){return this._fieldElement.optional}set optional(o){this._fieldElement.optional!==o&&(this._fieldElement.optional=o,this.toggleAttribute(L.attributes.OPTIONAL,o))}get disabled(){return this._fieldElement.disabled}set disabled(o){this._fieldElement.disabled!==o&&(this._fieldElement.disabled=o,this.toggleAttribute(L.attributes.DISABLED,o))}get floatLabel(){return this._fieldElement.floatLabel}set floatLabel(o){this._fieldElement.floatLabel!==o&&(this._fieldElement.floatLabel=o,this.toggleAttribute(L.attributes.FLOAT_LABEL,o))}get variant(){return this._fieldElement.variant}set variant(o){this._fieldElement.variant!==o&&(this._fieldElement.variant=o,this.setAttribute(L.attributes.VARIANT,o))}get theme(){return this._fieldElement.theme}set theme(o){this._fieldElement.theme!==o&&(this._fieldElement.theme=o,this.setAttribute(L.attributes.THEME,o))}get shape(){return this._fieldElement.shape}set shape(o){this._fieldElement.shape!==o&&(this._fieldElement.shape=o,this.setAttribute(L.attributes.SHAPE,o))}get density(){return this._fieldElement.density}set density(o){this._fieldElement.density!==o&&(this._fieldElement.density=o,this.setAttribute(L.attributes.DENSITY,o))}get dense(){return this._fieldElement.dense}set dense(o){this._fieldElement.dense!==o&&(this._fieldElement.dense=o,this.toggleAttribute(L.attributes.DENSE,o))}get popoverIcon(){return this._fieldElement.popoverIcon}set popoverIcon(o){this._fieldElement.popoverIcon!==o&&(this._fieldElement.popoverIcon=o,this.toggleAttribute(L.attributes.POPOVER_ICON,o))}get supportTextInset(){return this._fieldElement.supportTextInset}set supportTextInset(o){this._fieldElement.supportTextInset!==o&&(this._fieldElement.supportTextInset=o,this.setAttribute(L.attributes.SUPPORT_TEXT_INSET,o))}floatLabelWithoutAnimation(o){this._fieldElement.floatLabelWithoutAnimation(o)}}return t}var pf=`${b}scaffold`,_7={VIEWPORT:"viewport"},mf=d({},_7),Pa={elementName:pf,observedAttributes:_7,attributes:mf};var df='<template><div class="forge-scaffold" part="root"><slot name="left"></slot><div class="header" part="header"><slot name="header"></slot></div><div class="body" part="body"><slot name="body-left"></slot><slot name="body-header"></slot><slot name="body"></slot><slot name="body-footer"></slot><slot name="body-right"></slot></div><slot name="footer"></slot><slot name="right"></slot></div></template>',gf=':host{--_scaffold-height:var(--forge-scaffold-height, 100%);--_scaffold-width:var(--forge-scaffold-width, 100%)}:host{display:block;width:var(--_scaffold-width);height:var(--_scaffold-height)}:host([hidden]){display:none}.forge-scaffold{--_scaffold-overflow:var(--forge-scaffold-overflow, initial);--_scaffold-body-position:var(--forge-scaffold-body-position, relative)}.forge-scaffold{position:relative;display:grid;grid-template-areas:"left header right" "left body right" "left footer right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;height:var(--_scaffold-height);width:var(--_scaffold-width);overflow:var(--_scaffold-overflow)}.header{grid-area:header;min-width:0;min-height:0}.body{position:var(--_scaffold-body-position);display:grid;grid-area:body;grid-template-areas:"body-left body-header body-right" "body-left body-inner body-right" "body-left body-footer body-right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;width:var(--_scaffold-width);min-width:0;min-height:0;overflow:var(--_scaffold-overflow)}::slotted(*){min-width:0;min-height:0}::slotted([slot=left]){grid-area:left}::slotted([slot=right]){grid-area:right}::slotted([slot=body-left]){grid-area:body-left}::slotted([slot=body-right]){grid-area:body-right}::slotted([slot=body-header]){grid-area:body-header}::slotted([slot=body]){overflow:auto;grid-area:body-inner}::slotted([slot=body-footer]){grid-area:body-footer}::slotted([slot=footer]){grid-area:footer}::slotted([slot=body-left]),::slotted([slot=body-right]),::slotted([slot=body]),::slotted([slot=left]),::slotted([slot=right]){overflow:auto}:host([viewport]){--_scaffold-height:var(--forge-scaffold-height, 100dvh);--_scaffold-width:var(--forge-scaffold-width, 100dvw)}',Je=class extends M{static get observedAttributes(){return Object.values(Pa.observedAttributes)}constructor(){super(),H(this,df,gf)}attributeChangedCallback(t,e,o){switch(t){case Pa.observedAttributes.VIEWPORT:this.viewport=o!==null;break}}get viewport(){return this.hasAttribute(Pa.attributes.VIEWPORT)}set viewport(t){this.toggleAttribute(Pa.attributes.VIEWPORT,!!t)}};Je=i([y({name:Pa.elementName})],Je);function x7(){f(Je)}var i4=class extends I{constructor(t){super(t)}};var f7=`${b}option`,wf={DISABLED:"disabled",DIVIDER:"divider",LABEL:"label",SECONDARY_LABEL:"secondary-label",LEADING_ICON_CLASS:"leading-icon-class",LEADING_ICON_TYPE:"leading-icon-type",LEADING_ICON:"leading-icon",OPTION_CLASS:"option-class",TRAILING_ICON_CLASS:"trailing-icon-class",TRAILING_ICON_TYPE:"trailing-icon-type",TRAILING_ICON:"trailing-icon",TOOLTIP:"tooltip",VALUE:"value"},uf={VALUE_CHANGE:`${f7}-value-change`},R={elementName:f7,attributes:wf,events:uf};var l4=class{constructor(t){this._adapter=t;this._disabled=!1;this._divider=!1;this._optionClass=[]}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.emitHostEvent(R.events.VALUE_CHANGE,this._value))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.toggleHostAttribute(R.attributes.LABEL,!!this._label,this._label))}get secondaryLabel(){return this._secondaryLabel}set secondaryLabel(t){this._secondaryLabel!==t&&(this._secondaryLabel=t,this._adapter.toggleHostAttribute(R.attributes.SECONDARY_LABEL,!!this._secondaryLabel,this._secondaryLabel))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(R.attributes.DISABLED,this._disabled))}get divider(){return this._divider}set divider(t){this._divider!==t&&(this._divider=t,this._adapter.toggleHostAttribute(R.attributes.DIVIDER,this._divider))}get optionClass(){return this._optionClass}set optionClass(t){t?typeof t=="string"&&(t=t.split(" ")):t=[],t=t.filter(e=>e&&!/\s+/.test(e)),this._optionClass.toString()!==t.toString()&&(this._optionClass=t,this._adapter.toggleHostAttribute(R.attributes.OPTION_CLASS,this._optionClass&&!!this._optionClass.length,this._optionClass.join(" ")))}get leadingIcon(){return this._leadingIcon}set leadingIcon(t){this._leadingIcon!==t&&(this._leadingIcon=t,this._adapter.toggleHostAttribute(R.attributes.LEADING_ICON,!!this._leadingIcon,this._leadingIcon))}get leadingIconClass(){return this._leadingIconClass}set leadingIconClass(t){this._leadingIconClass!==t&&(this._leadingIconClass=t,this._adapter.toggleHostAttribute(R.attributes.LEADING_ICON_CLASS,!!this._leadingIconClass,this._leadingIconClass))}get leadingIconType(){return this._leadingIconType}set leadingIconType(t){this._leadingIconType!==t&&(this._leadingIconType=t,this._adapter.toggleHostAttribute(R.attributes.LEADING_ICON_TYPE,!!this._leadingIconType,this._leadingIconType))}get leadingIconComponentProps(){return this._leadingIconComponentProps}set leadingIconComponentProps(t){this._leadingIconComponentProps!==t&&(this._leadingIconComponentProps=t)}get trailingIcon(){return this._trailingIcon}set trailingIcon(t){this._trailingIcon!==t&&(this._trailingIcon=t,this._adapter.toggleHostAttribute(R.attributes.TRAILING_ICON,!!this._trailingIcon,this._trailingIcon))}get trailingIconClass(){return this._trailingIconClass}set trailingIconClass(t){this._trailingIconClass!==t&&(this._trailingIconClass=t,this._adapter.toggleHostAttribute(R.attributes.TRAILING_ICON_CLASS,!!this._trailingIconClass,this._trailingIconClass))}get trailingIconType(){return this._trailingIconType}set trailingIconType(t){this._trailingIconType!==t&&(this._trailingIconType=t,this._adapter.toggleHostAttribute(R.attributes.TRAILING_ICON_TYPE,!!this._trailingIconType,this._trailingIconType))}get trailingIconComponentProps(){return this._trailingIconComponentProps}set trailingIconComponentProps(t){this._trailingIconComponentProps!==t&&(this._trailingIconComponentProps=t)}get leadingBuilder(){return this._leadingBuilder}set leadingBuilder(t){this._leadingBuilder!==t&&(this._leadingBuilder=t)}get trailingBuilder(){return this._trailingBuilder}set trailingBuilder(t){this._trailingBuilder!==t&&(this._trailingBuilder=t)}get tooltip(){return this._tooltip}set tooltip(t){this._tooltip!==t&&(this._tooltip=t)}};var $1=class extends M{static get observedAttributes(){return[R.attributes.VALUE,R.attributes.LABEL,R.attributes.SECONDARY_LABEL,R.attributes.DISABLED,R.attributes.DIVIDER,R.attributes.OPTION_CLASS,R.attributes.LEADING_ICON,R.attributes.LEADING_ICON_CLASS,R.attributes.LEADING_ICON_TYPE,R.attributes.TRAILING_ICON,R.attributes.TRAILING_ICON_CLASS,R.attributes.TRAILING_ICON_TYPE,R.attributes.TOOLTIP]}constructor(){super(),this._core=new l4(new i4(this))}attributeChangedCallback(t,e,o){switch(t){case R.attributes.VALUE:this.value=o;break;case R.attributes.LABEL:this.label=o;break;case R.attributes.SECONDARY_LABEL:this.secondaryLabel=o;break;case R.attributes.DISABLED:this.disabled=p(o);break;case R.attributes.DIVIDER:this.divider=this.hasAttribute(R.attributes.DIVIDER);break;case R.attributes.OPTION_CLASS:this.optionClass=o;break;case R.attributes.LEADING_ICON:this.leadingIcon=o;break;case R.attributes.LEADING_ICON_CLASS:this.leadingIconClass=o;break;case R.attributes.LEADING_ICON_TYPE:this.leadingIconType=o;break;case R.attributes.TRAILING_ICON:this.trailingIcon=o;break;case R.attributes.TRAILING_ICON_CLASS:this.trailingIconClass=o;break;case R.attributes.TRAILING_ICON_TYPE:this.trailingIconType=o;break;case R.attributes.TOOLTIP:this.tooltip=o?{text:o}:void 0;break}}};i([c()],$1.prototype,"value",2),i([c()],$1.prototype,"label",2),i([c()],$1.prototype,"secondaryLabel",2),i([c()],$1.prototype,"disabled",2),i([c()],$1.prototype,"divider",2),i([c()],$1.prototype,"optionClass",2),i([c()],$1.prototype,"leadingIcon",2),i([c()],$1.prototype,"leadingIconClass",2),i([c()],$1.prototype,"leadingIconType",2),i([c()],$1.prototype,"leadingIconComponentProps",2),i([c()],$1.prototype,"trailingIcon",2),i([c()],$1.prototype,"trailingIconClass",2),i([c()],$1.prototype,"trailingIconType",2),i([c()],$1.prototype,"trailingIconComponentProps",2),i([c()],$1.prototype,"leadingBuilder",2),i([c()],$1.prototype,"trailingBuilder",2),i([c()],$1.prototype,"tooltip",2),$1=i([y({name:R.elementName})],$1);function b7(){f($1)}var _f=`${b}option-group`,xf={LABEL:"label"},vo={elementName:_f,attributes:xf};var t0=class extends M{static get observedAttributes(){return[vo.attributes.LABEL]}constructor(){super()}attributeChangedCallback(t,e,o){switch(t){case vo.attributes.LABEL:this.label=o;break}}get label(){return this._label}set label(t){this._label!==t&&(this._label=t||"",this.setAttribute(vo.attributes.LABEL,this._label))}get text(){return this._label}set text(t){this.label=t}};t0=i([y({name:vo.elementName})],t0);function y7(){f(t0)}var M7=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(M7||{});function w3(n,t){let e=n.some(a=>u3(a)),o=n.some(a=>ff(a));return e&&t===1||o&&t===0}function u3(n){return O(n)&&vt(n)&&Object.prototype.hasOwnProperty.call(n,"options")}function ff(n){return O(n)&&vt(n)&&Object.prototype.hasOwnProperty.call(n,"label")&&Object.prototype.hasOwnProperty.call(n,"value")}var Na=class extends I{constructor(t){super(t)}get popupElement(){var t;return(t=this._listDropdown)==null?void 0:t.dropdownElement}getOptions(){let t=Array.from(this._component.querySelectorAll(vo.elementName));if(t.length)return t.map(e=>{let o=Array.from(e.querySelectorAll(R.elementName)),a=this._createOptionsFromElements(o);return{text:e.label,builder:e.builder,value:e.value,options:a}});{let e=Array.from(this._component.querySelectorAll(R.elementName));return this._createOptionsFromElements(e)}}_createOptionsFromElements(t){return t.map(e=>{let o=e.hasAttribute(R.attributes.OPTION_CLASS)?e.getAttribute(R.attributes.OPTION_CLASS):e.optionClass;return typeof o=="string"&&(o=o.split(" ")),{label:e.hasAttribute(R.attributes.LABEL)?e.getAttribute(R.attributes.LABEL):O(e.label)?e.label:e.innerText,secondaryLabel:e.hasAttribute(R.attributes.SECONDARY_LABEL)?e.getAttribute(R.attributes.SECONDARY_LABEL):O(e.secondaryLabel)?e.secondaryLabel:void 0,value:e.hasAttribute(R.attributes.VALUE)?e.getAttribute(R.attributes.VALUE):e.value,disabled:e.hasAttribute(R.attributes.DISABLED),divider:e.hasAttribute(R.attributes.DIVIDER),optionClass:o,leadingIcon:e.hasAttribute(R.attributes.LEADING_ICON)?e.getAttribute(R.attributes.LEADING_ICON):e.leadingIcon,leadingIconClass:e.hasAttribute(R.attributes.LEADING_ICON_CLASS)?e.getAttribute(R.attributes.LEADING_ICON_CLASS):e.leadingIconClass,leadingIconType:e.hasAttribute(R.attributes.LEADING_ICON_TYPE)?e.getAttribute(R.attributes.LEADING_ICON_TYPE):e.leadingIconType,leadingIconComponentProps:e.leadingIconComponentProps,trailingIcon:e.hasAttribute(R.attributes.TRAILING_ICON)?e.getAttribute(R.attributes.TRAILING_ICON):e.trailingIcon,trailingIconClass:e.hasAttribute(R.attributes.TRAILING_ICON_CLASS)?e.getAttribute(R.attributes.TRAILING_ICON_CLASS):e.trailingIconClass,trailingIconType:e.hasAttribute(R.attributes.TRAILING_ICON_TYPE)?e.getAttribute(R.attributes.TRAILING_ICON_TYPE):e.trailingIconType,trailingIconComponentProps:e.trailingIconComponentProps,leadingBuilder:e.leadingBuilder,trailingBuilder:e.trailingBuilder,tooltip:e.tooltip}})}open(t){var e;if(this._listDropdown=new qe(this._targetElement,t),this._listDropdown.open(),this._component.id){let o=(e=this._listDropdown.dropdownElement)==null?void 0:e.querySelector("forge-list");o==null||o.setAttribute("aria-labelledby",this._component.id)}}async close(){this._listDropdown&&(await this._listDropdown.close(),this.destroyListDropdown())}destroyListDropdown(){var t;(t=this._listDropdown)==null||t.destroy(),this._listDropdown=void 0}setDismissListener(t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(Q.events.TOGGLE,t)}toggleOptionMultiple(t,e){var o;(o=this._listDropdown)==null||o.toggleOptionMultiple(t,e)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}highlightActiveOption(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}patchSelectedValues(t){var e;(e=this._listDropdown)==null||e.setSelectedValues(t)}setOptionsListener(t){let e=a=>{a.stopPropagation(),t(this.getOptions())};this._component.addEventListener(R.events.VALUE_CHANGE,e);let o=new MutationObserver(()=>t(this.getOptions()));return o.observe(this._component,{childList:!0,subtree:!0}),()=>{this._component.removeEventListener(R.events.VALUE_CHANGE,e),o.disconnect()}}setOptions(t,e=!0){e&&this._clearOptions();for(let o of t)if(u3(o)){let a=this._createOptionGroupElement(o);for(let s of o.options){let r=this._createOptionElement(s);a.appendChild(r)}this._component.appendChild(a)}else{let a=this._createOptionElement(o);this._component.appendChild(a)}}appendDropdownOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setDropdownOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}scrollSelectedOptionIntoView(){var t;(t=this._listDropdown)==null||t.scrollSelectedOptionIntoView()}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}queueDropdownPositionUpdate(){this.popupElement&&window.requestAnimationFrame(()=>{let t=this.popupElement;t==null||t.position()})}_clearOptions(){Array.from(this._component.querySelectorAll(vo.elementName)).forEach(o=>Fe(o)),Array.from(this._component.querySelectorAll(R.elementName)).forEach(o=>Fe(o))}_createOptionGroupElement(t){let e=document.createElement("forge-option-group");return Object.assign(e,t),e}_createOptionElement(t){let e=document.createElement("forge-option");return Object.assign(e,t),e.textContent=t.label,t.elementAttributes&&t.elementAttributes.forEach((o,a)=>{e.setAttribute(a,o)}),e}};var z7={VALUE:"value",MULTIPLE:"multiple",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",SYNC_POPUP_WIDTH:"sync-popup-width",CONSTRAIN_POPUP_WIDTH:"constrain-popup-width",WRAP_OPTION_TEXT:"wrap-option-text"},bf=d({},z7),yf={CHANGE:"change"},Lt={observedAttributes:z7,attributes:bf,events:yf};var Ra=class extends J0{constructor(e){super();this._adapter=e;this._options=[];this._value=[];this._multiple=!1;this._open=!1;this._selectedValues=[];this._selectedLabels=[];this._selectedIndexes=[];this._filterString="";this._focusListener=o=>this._onFocus(o),this._blurListener=o=>this._onBlur(o),this._clickListener=o=>this._onClick(o),this._keydownListener=o=>this._onKeydown(o),this._optionsChangedListener=o=>this._onOptionsChanged(o),this._activeChangeListener=o=>this._onActiveOptionChanged(o),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dismissListener=()=>this._onDismiss(),this._identifier=V2()}_onFocus(e){}initialize(){this._optionListenerDestructor&&this._optionListenerDestructor(),this._optionListenerDestructor=this._adapter.setOptionsListener(this._optionsChangedListener),this._initializeValue()}initializeTarget(){this._adapter.initializeAccessibility(),this._adapter.addClickListener(this._clickListener),this._adapter.addTargetListener("blur",this._blurListener),this._adapter.addTargetListener("focus",this._focusListener),this._adapter.addTargetListener("keydown",this._keydownListener)}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("focus",this._focusListener),this._adapter.removeTargetListener("keydown",this._keydownListener),this._optionListenerDestructor&&this._optionListenerDestructor(),this._open=!1,this._adapter.destroyListDropdown()}appendOptions(e){this._adapter.setOptions(e,!1),this._open&&this._adapter.appendDropdownOptions(e)}selectAll(){this._multiple&&(this.value=this._flatOptions.map(e=>e.value))}deselectAll(){this._multiple&&(this.value=[])}get _flatOptions(){return w3(this._options,1)?this._options.flatMap(e=>e.options):this._options}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}_initializeValue(){let e=this._options.length&&this._options||this._adapter.getOptions();O(this._value)&&e.length&&this._applyValue(this._value)}_onClick(e){e.button===0&&(this._open?this._closeDropdown():this._openDropdown())}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._open&&this._closeDropdown()}_openDropdown(){if(this._options=this._adapter.getOptions(),!this._flatOptions.length)return;this._open=!0;let e={options:this._options,referenceElement:this._adapter.hostElement,multiple:this._multiple,selectedValues:[...this._selectedValues],id:this._identifier,optionBuilder:this._optionBuilder,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,popupPlacement:this._popoverPlacement,popupOffset:this._popoverOffset,popupFlip:this._popoverFlip,popupShift:this._popoverShift,popupFallbackPlacements:this._popoverFallbackPlacements,popupClasses:this._popupClasses,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,closeCallback:()=>this._closeDropdown(),selectCallback:o=>{let a=this._flatOptions,s=a.find(r=>r.value===o);if(s){let r=a.indexOf(s);this._onSelect(s,r,!0)}}};this._adapter.open(e),this._adapter.setDismissListener(this._dismissListener)}_closeDropdown(){this._open=!1,this._adapter.close()}async _onSelect(e,o,a=!0){if(this._valueChanging)return!1;let s=e?e.value:"",r=e?e.label:"",l=[...this._value],h=[...this._selectedValues],v=[...this._selectedLabels],m=[...this._selectedIndexes];if(this._multiple)if(this._selectedValues.includes(s)){let E=this._selectedValues.indexOf(s);this._selectedValues.splice(E,1),this._selectedLabels.splice(E,1),this._selectedIndexes.splice(E,1)}else this._selectedValues.push(s),this._selectedLabels.push(r),this._selectedIndexes.push(o);else O(s)?(this._selectedValues[0]=s,this._selectedLabels[0]=r,this._selectedIndexes[0]=o):(this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]);this._value=[...this._selectedValues];let u=()=>{this._selectedValues=[...h],this._selectedLabels=[...v],this._selectedIndexes=[...m],this._value=[...l]},z=()=>{if(this._multiple){let E=this._selectedIndexes.includes(o);this._adapter.toggleOptionMultiple(o,E)}this._applySelection()},x=this.multiple?[...this._selectedValues]:this._selectedValues[0];if(this._open&&a&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"){this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,x));let E=await this._valueChanging;if(this._valueChanging=void 0,!E)return u(),this._tryUpdateDropdownPosition(),!1}let C=!this._adapter.emitHostEvent(Lt.events.CHANGE,x,!0,!0);return C?u():z(),this._tryUpdateDropdownPosition(),!C}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._onSelect(this._nonDividerOptions[e],e)}_tryUpdateDropdownPosition(){this._open&&this._adapter.queueDropdownPositionUpdate()}_reset(){this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]}_applyValue(e){this._selectedValues=[],this._selectedLabels=[],this._options=this._adapter.getOptions(),Array.isArray(e)||(e=[e]),this._value=[];for(let o of e){this._value.includes(o)||this._value.push(o);let a=this._flatOptions.find(s=>Wt(s.value,o));a&&(this._selectedValues.push(a.value),this._selectedLabels.push(a.label))}this._selectedIndexes=this._selectedValues.map(o=>this._flatOptions.findIndex(a=>a.value===o)),this._adapter.patchSelectedValues(this._selectedValues)}_onDismiss(){this._closeDropdown()}_getSelectedText(){if(typeof this._selectedTextBuilder=="function"){let e=this._flatOptions.filter(o=>this._selectedValues.includes(o.value));return this._selectedTextBuilder(e)}return this._multiple?this._selectedLabels.length?this._selectedLabels.length===1?this._selectedLabels[0]:`${this._selectedLabels.length} options selected`:"":this._selectedLabels.filter(e=>e&&e.length).join(" ").trim()}_onKeydown(e){let o=e.key==="Escape"||e.keyCode===27,a=e.key==="Enter"||e.keyCode===13,s=e.key==="Space"||e.keyCode===32,r=e.key==="ArrowDown"||e.keyCode===40,l=e.key==="ArrowUp"||e.keyCode===38,h=e.keyCode>=48&&e.keyCode<=90,v=e.key==="Home"||e.keyCode===36,m=e.key==="End"||e.keyCode===35;if(e.key==="Tab"&&this._open&&!this._multiple){this._selectActiveOption();return}if(!h&&this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterString="",this._filterTimeout=void 0),o&&(e.preventDefault(),e.stopPropagation(),this._open)){this._closeDropdown();return}if(s)e.preventDefault(),e.stopPropagation(),this._open?this._closeDropdown():this._openDropdown();else if(a)this._open&&(e.stopPropagation(),e.preventDefault(),this._options=this._adapter.getOptions(),this._selectActiveOption());else if(l||r){if(e.preventDefault(),!this._open){this._openDropdown(),this._adapter.activateFirstOption();return}if(this._flatOptions.length===0)return;let z=0;this._open?(z=this._adapter.getActiveOptionIndex(),z===-1&&(z=this._getFirstSelectedOptionIndex())):z=this._getFirstSelectedOptionIndex(),l?z=this._getPreviousHighlightableOptionIndex(z,this._nonDividerOptions):z=this._getNextHighlightableOptionIndex(z,this._nonDividerOptions),this._adapter.highlightActiveOption(z)}else if(v)this._open&&(e.preventDefault(),this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(z=>!z.disabled)));else if(m){if(this._open){e.preventDefault();let z=this._nonDividerOptions;for(let x=z.length-1;x>=0;x--)if(!z[x].disabled){this._adapter.highlightActiveOption(x);break}}}else h&&this._filter(e.key)}_getFirstSelectedOptionIndex(){return this._nonDividerOptions.findIndex(e=>this._selectedValues.includes(e.value))}_getPreviousHighlightableOptionIndex(e,o){let a=e;return a<=0?a=o.length-1:a--,o[a].disabled?this._getPreviousHighlightableOptionIndex(a,o):a}_getNextHighlightableOptionIndex(e,o){let a=e;return a===o.length-1?a=0:a++,o[a].disabled?this._getNextHighlightableOptionIndex(a,o):a}_filter(e){this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterTimeout=void 0),this._filterString+=e,this._filterTimeout=window.setTimeout(()=>{this._filterString="",this._filterTimeout=void 0},300),this._options=this._adapter.getOptions();let o=this._flatOptions.find(({disabled:a,label:s})=>!a&&s.trim().toLowerCase().startsWith(this._filterString.trim().toLowerCase()));if(o){let a=this._flatOptions.indexOf(o);this._open?this._adapter.highlightActiveOption(a):this._multiple||this._onSelect(o,a,!1)}}_onOptionsChanged(e){this._options=e,this._applyValue(this._value)}_onActiveOptionChanged(e){this._adapter.updateActiveDescendant(e)}get value(){return this._multiple?[...this._value]:this._value[0]}set value(e){let o;Array.isArray(e)?o=[...e]:o=e,this._applyValue(o)}get selectedIndex(){return this._multiple?[...this._selectedIndexes]:this._selectedIndexes[0]}set selectedIndex(e){this._options=this._adapter.getOptions();let o;if(Array.isArray(e)?o=[...e]:o=[e],o.sort(),this.multiple)this.value=o.map(a=>this._flatOptions[a]).filter(a=>a).map(a=>a.value);else{let a=this._flatOptions[o[o.length-1]];if(!a)return;this.value=a.value}}get options(){return this._adapter.getOptions()}set options(e){let o;w3(e,1)?o=e.map(a=>d({},a)):o=e.map(a=>d({},a)),this._options=o,this._adapter.setOptions(o),this._initializeValue(),this._open&&this._adapter.setDropdownOptions(o)}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._reset(),this._open&&this._closeDropdown())}get open(){return this._open}set open(e){this._open!==e&&(e?this._openDropdown():this._closeDropdown())}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupClasses(){return this._popupClasses}set popupClasses(e){this._popupClasses=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}get popupElement(){return this._adapter.popupElement}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){this._beforeValueChange=e}};var Vt=class extends Q1{constructor(){super()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case Lt.attributes.MULTIPLE:this.multiple=p(o);break;case Lt.attributes.VALUE:this.value=o;break}}appendOptions(t){this._core.appendOptions(t)}selectAll(){this._core.selectAll()}deselectAll(){this._core.deselectAll()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}};i([c()],Vt.prototype,"value",2),i([c()],Vt.prototype,"selectedIndex",2),i([c()],Vt.prototype,"options",2),i([c()],Vt.prototype,"multiple",2),i([c()],Vt.prototype,"open",2),i([c()],Vt.prototype,"optionBuilder",2),i([c()],Vt.prototype,"selectedTextBuilder",2),i([c()],Vt.prototype,"beforeValueChange",2),i([c({set:!1})],Vt.prototype,"popupElement",2);var H7=`${b}select`,Mf={FIELD:"#field",SELECTED_TEXT:"#selected-text",LABEL:"#select-label"},I7={OPEN:"open",TYPE:"type",VALUE:"value",LABEL:"label",MULTIPLE:"multiple",DISABLED:"disabled",PLACEHOLDER:"placeholder",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},zf=d({},I7),Hf={SCROLLED_BOTTOM:`${H7}-scrolled-bottom`},X2={elementName:H7,observedAttributes:I7,attributes:zf,selectors:Mf,events:Hf};var c4=class extends Na{constructor(t){super(t),this._fieldElement=w(t,X2.selectors.FIELD),this._labelElement=w(t,X2.selectors.LABEL),this._selectedTextElement=w(t,X2.selectors.SELECTED_TEXT),this._fieldElement.setAttribute("exportparts",Object.values(L.parts).join(", ")),this._fieldElement.focusIndicatorTargetElement=this._component}get fieldElement(){return this._fieldElement}initializeAccessibility(){this._component.setAttribute("role","combobox"),this._component.setAttribute("aria-haspopup","true"),this._component.setAttribute("aria-expanded","false"),Ge(),Yt(this._component),this.fieldElement.required&&this.setHostAttribute("aria-required","true"),this.fieldElement.disabled&&this.setHostAttribute("aria-disabled","true"),this.fieldElement.invalid&&this.setHostAttribute("aria-invalid","true"),this._component[s2]=!this._component.disabled}setLabel(t){let o=!(this._fieldElement.labelPosition==="inset"&&(this._fieldElement.density==="extra-small"||this._fieldElement.dense))&&!!(t!=null&&t.trim());(!this._component.hasAttribute("aria-label")||this._component.getAttribute("aria-label")===this._labelElement.textContent)&&this._component.setAttribute("aria-label",t),o?(this._labelElement.isConnected||this._fieldElement.insertAdjacentElement("afterbegin",this._labelElement),this._labelElement.textContent=t):this._labelElement.remove()}setPlaceholderText(t){G(this._selectedTextElement,!!(t!=null&&t.trim()),"placeholder",t)}open(t){this._targetElement||(this._targetElement=w(this._fieldElement,L.selectors.POPOVER_TARGET)),super.open(t),this._component.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._component.setAttribute("aria-expanded","true"),this._fieldElement.popoverExpanded=!0}close(){return this._component.setAttribute("aria-expanded","false"),this._component.removeAttribute("aria-activedescendant"),Yt(this._component),this._fieldElement.popoverExpanded=!1,super.close()}floatLabel(t){this._fieldElement.floatLabel=t}updateActiveDescendant(t){G(this._component,!!t,"aria-activedescendant",t)}setSelectedText(t){this._selectedTextElement.textContent=t}setDisabled(t){this._component[s2]=!t,G(this._component,t,"aria-disabled","true")}setRequired(){this._component[Mt]()}addClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}addTargetListener(t,e){this._component.addEventListener(t,e)}removeTargetListener(t,e){this._component.removeEventListener(t,e)}syncValue(t){let o=(Array.isArray(t)?!t.length||!t.some(s=>s!=null):t==null)?null:new FormData,a=JSON.stringify(t);o&&t&&o.append(this._component.name,a),this._component.setFormValue(o,a),this._component[Mt]()}};var h4=class extends Ra{constructor(e){super(e);this._label="";this._required=!1;this._permanentlyFloatLabel=!1;this._mousedownListener=this._onMouseDown.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),super.initialize(),super.initializeTarget(),this._initializeLabel(),this._initializeAccessibility(),this._adapter.addTargetListener("mousedown",this._mousedownListener)}destroy(){super.destroy(),this._adapter.removeTargetListener("mousedown",this._mousedownListener)}syncFloatingLabelState({force:e}={}){e!==void 0&&(this._permanentlyFloatLabel=e),this._updateLabel(),this._tryFloatLabel()}setDisabled(e){this._adapter.setDisabled(e)}_initializeLabel(){this._updateLabel(),this._tryFloatLabel()}_initializeValue(){super._initializeValue(),this._tryFloatLabel()}_initializeAccessibility(){this._adapter.initializeAccessibility()}_onMouseDown(e){e.preventDefault()}_onClick(e){this._adapter.fieldElement.disabled||e.composedPath().find(a=>{var s;return(s=a.matches)==null?void 0:s.call(a,"slot[name=accessory]")})||(this._adapter.focusHost(),super._onClick(e))}_openDropdown(){super._openDropdown(),this._open&&this._adapter.toggleHostAttribute(X2.attributes.OPEN,!0)}_closeDropdown(){super._closeDropdown(),this._open||this._adapter.toggleHostAttribute(X2.attributes.OPEN,!1)}_onDismiss(){super._onDismiss()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(X2.events.SCROLLED_BOTTOM)}async _onSelect(e,o,a=!0){let s=await super._onSelect(e,o,a);return s&&(this._adapter.setSelectedText(this._getSelectedText()),a&&!this._multiple&&this._adapter.focusHost()),this._tryFloatLabel(),this._adapter.syncValue(this._value),s}_reset(){super._reset(),this._adapter.setSelectedText(""),this._tryFloatLabel()}_tryFloatLabel(){if(this._permanentlyFloatLabel){this._adapter.floatLabel(!0);return}let e=!!this._getSelectedText()||!!this._selectedValues.length,o=!!this._placeholder;this._adapter.floatLabel(e||o)}_updateLabel(){this._adapter.setLabel(this._label)}_applyValue(e){super._applyValue(e),this._adapter.syncValue(this._value);let o=this._getSelectedText();this._adapter.setSelectedText(o),this._tryFloatLabel()}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._updateLabel(),this._label&&this._initializeLabel(),this._adapter.toggleHostAttribute(X2.attributes.LABEL,!!this._label,this._label))}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder!==e&&(this._placeholder=e,this._adapter.setPlaceholderText(this._placeholder),this._initializeLabel())}get multiple(){return super.multiple}set multiple(e){this._multiple!==e&&(super.multiple=e,this._adapter.toggleHostAttribute(X2.attributes.MULTIPLE,e))}set required(e){this._required!==e&&this._adapter.setRequired()}};var If='<template><forge-field id="field" popover-icon focus-indicator-allow-focus focus-indicator-focus-mode="focus"><span id="select-label" slot="label"></span><slot slot="start" name="start"></slot><div data-forge-field-input class="selected-text-container" part="text-container" aria-live="assertive" aria-atomic="true"><slot name="value"><span id="selected-text" class="selected-text" part="text"></span></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',Lf=":host{display:block;outline:0}:host([hidden]){display:none}forge-field{--_select-placeholder-color:var(--forge-select-placeholder-color, var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6))))}.selected-text-container{display:grid;align-items:center;cursor:pointer}.selected-text,::slotted([slot=value]){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.selected-text:empty::before{content:attr(placeholder);color:var(--_select-placeholder-color);font-size:inherit}:host([disabled]) .selected-text-container{cursor:not-allowed}forge-field{display:contents}",Ae=class extends $e(mt(Ke(V1(L1(u7(Vt)))))){static get observedAttributes(){return[...Q1.observedAttributes,...Object.values(Y.observedAttributes),...Object.values(X2.observedAttributes),...Object.values(Lt.observedAttributes)]}constructor(){var e;super(),X.define([S0,T0]),H(this,If,Lf);let t=(e=this.shadowRoot)==null?void 0:e.querySelector(L.elementName);this.initializeFieldInstance(t),this[oe]="select",this._core=new h4(new c4(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"combobox",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"})}attributeChangedCallback(t,e,o){switch(t){case X2.observedAttributes.OPEN:this.open=p(o);return;case X2.observedAttributes.LABEL:this.label=o;return;case X2.observedAttributes.PLACEHOLDER:this.placeholder=o;return}super.attributeChangedCallback(t,e,o)}[Bt](){return this.value}[Mt](){this[s1].setValidity({valueMissing:this.required&&!this.value},this[ee]({required:this.required,value:this.value}))}formResetCallback(){this.value=null}formStateRestoreCallback(t){this.value=JSON.parse(t)}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[N]({ariaLabel:t})}setFormValue(t,e){this[s1].setFormValue(t,e)}get floatLabel(){return super.floatLabel}set floatLabel(t){this._core.syncFloatingLabelState({force:t})}get density(){return super.density}set density(t){super.density=t,this._core.syncFloatingLabelState()}get dense(){return super.dense}set dense(t){super.dense=t,this._core.syncFloatingLabelState()}get disabled(){return super.disabled}set disabled(t){super.disabled=t,this._core.setDisabled(t)}get required(){return super.required}set required(t){super.required=t,this._core.required=t}get labelPosition(){return super.labelPosition}set labelPosition(t){super.labelPosition=t,this._core.syncFloatingLabelState()}};i([c()],Ae.prototype,"label",2),i([c()],Ae.prototype,"placeholder",2),i([c()],Ae.prototype,"readonly",2),Ae=i([y({name:X2.elementName,dependencies:[F1,$1,t0,R1,v2,j1,Pt,j,Je,pe,i1]})],Ae);function L7(){f(Ae)}var Vf='<template><div class="forge-paginator" part="root" forge-popover-host><div class="container" part="container"><div class="label" part="label" id="label"><slot name="label"></slot></div><forge-select class="page-size-options" aria-labelledby="label" label-position="none" density="extra-small" part="page-size-options"></forge-select><div class="range-label" part="range-label"><slot name="range-label"></slot></div></div><div class="actions" part="actions"><div id="first-page-container"><forge-icon-button class="first-page" part="first-page-button" part="first-page-button-element"><forge-icon name="first_page" part="first-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="first-page-tooltip">Go to the first page</slot></forge-tooltip></div><div id="previous-page-container"><forge-icon-button class="previous-page" part="previous-page-button" part="previous-page-button-element"><forge-icon name="keyboard_arrow_left" part="previous-page-button-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="previous-page-tooltip">Go to the previous page</slot></forge-tooltip></div><div class="alternative-range-label" part="alternative-range-label"><slot name="alternative-range-label"></slot></div><div id="next-page-container"><forge-icon-button class="next-page" part="next-page-button" part="next-page-button-element"><forge-icon name="keyboard_arrow_right" part="next-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="next-page-tooltip">Go to the next page</slot></forge-tooltip></div><div id="last-page-container"><forge-icon-button class="last-page" part="last-page-button" part="last-page-button-element"><forge-icon name="last_page" part="last-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="last-page-tooltip">Go to the last page</slot></forge-tooltip></div></div></div></template>',Cf=':host{display:block}:host([hidden]){display:none}.forge-paginator{display:flex;gap:var(--forge-spacing-xsmall,8px)}.container{display:flex;gap:var(--forge-spacing-medium,16px);align-items:center}.alternative-range-label,.label,.range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.actions{display:flex;align-items:center}.alternative-range-label{display:none}:host([alternative]) .alternative-range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:inline-block}:host([alternative]) .container{display:none}:host([alternative]) .actions{width:100%;justify-content:var(--forge-paginator-alternative-alignment,start)}',it=class extends M{static get observedAttributes(){return Object.values(Z.observedAttributes)}constructor(){super(),X.define([ul,v0,ze,fl]),H(this,Vf,Cf),this._core=new s4(new r4(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){var a,s,r,l;switch(t){case Z.observedAttributes.PAGE_INDEX:this.pageIndex=(a=K(o))!=null?a:Z.numbers.DEFAULT_PAGE_INDEX;break;case Z.observedAttributes.PAGE_SIZE:this.pageSize=(s=K(o))!=null?s:Z.numbers.DEFAULT_PAGE_SIZE;break;case Z.observedAttributes.OFFSET:this.offset=K(o);break;case Z.observedAttributes.TOTAL:this.total=(r=K(o))!=null?r:Z.numbers.DEFAULT_TOTAL;break;case Z.observedAttributes.PAGE_SIZE_OPTIONS:this.pageSizeOptions=(l=Wn(o))!=null?l:Z.numbers.DEFAULT_PAGE_SIZE_OPTIONS;break;case Z.observedAttributes.LABEL:this.label=o;break;case Z.observedAttributes.FIRST_LAST:this.firstLast=p(o);break;case Z.observedAttributes.FIRST:this.first=p(o);break;case Z.observedAttributes.DISABLED:this.disabled=p(o);break;case Z.observedAttributes.ALTERNATIVE:this.alternative=p(o);break}}focus(t){this._core.focus(t)}};i([c()],it.prototype,"pageIndex",2),i([c()],it.prototype,"pageSize",2),i([c()],it.prototype,"offset",2),i([c()],it.prototype,"total",2),i([c()],it.prototype,"pageSizeOptions",2),i([c()],it.prototype,"label",2),i([c()],it.prototype,"firstLast",2),i([c()],it.prototype,"first",2),i([c()],it.prototype,"disabled",2),i([c()],it.prototype,"alternative",2),i([c()],it.prototype,"rangeLabelCallback",2),it=i([y({name:Z.elementName,dependencies:[i1,Ae,m1]})],it);function V7(){f(it)}var C7=`${b}select-dropdown`,Ef={TARGET:"target",SELECTED_TEXT_TARGET:"selected-text-target",SYNC_SELECTED_TEXT:"sync-selected-text"},Bf=d({},Ef),Af={SCROLLED_BOTTOM:`${C7}-scrolled-bottom`},e0={elementName:C7,attributes:Bf,events:Af};var v4=class extends Ra{constructor(e){super(e);this._syncSelectedText=!1;this._originalTargetText="";this._targetDisconnectedListener=()=>this._onTargetDisconnected()}initialize(){this._tryAttach(),super.initialize()}destroy(){super.destroy(),this._adapter.isAttached()&&this._detach()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(e0.events.SCROLLED_BOTTOM)}_applyValue(e){super._applyValue(e),this._applySelection()}_applySelection(){if(super._applySelection(),this._syncSelectedText||typeof this._selectedTextBuilder=="function"){let e=this._getSelectedText();e||(e=this._originalTargetText),this._adapter.setTargetText(e||"",this._selectedTextTarget)}}_tryAttach(){this._adapter.attach(this._target),this._adapter.isAttached()&&(this._targetDisconnectedDestructor=this._adapter.setTargetDisconnectedListener(this._targetDisconnectedListener),this._originalTargetText=this._adapter.getTargetText(this._selectedTextTarget),this.initializeTarget())}_detach(){this._adapter.detach(),this._targetDisconnectedDestructor&&(this._targetDisconnectedDestructor(),this._targetDisconnectedDestructor=void 0)}_onTargetDisconnected(){this._adapter.detach()}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._adapter.isAttached()&&this._detach(),this._tryAttach())}get selectedTextTarget(){return this._selectedTextTarget}set selectedTextTarget(e){this._selectedTextTarget!==e&&(this._selectedTextTarget=e)}get syncSelectedText(){return this._syncSelectedText}set syncSelectedText(e){this._syncSelectedText!==e&&(this._syncSelectedText=e)}};var p4=class extends Na{constructor(t){super(t)}initializeAccessibility(){this._targetElement.setAttribute("role","combobox"),this._targetElement.setAttribute("aria-live","polite"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this.setAriaControls()}addClickListener(t){this._targetElement.addEventListener("click",t)}removeClickListener(t){this._targetElement&&this._targetElement.removeEventListener("click",t)}addTargetListener(t,e){let o,a;t==="keydown"&&(o=!1,a=!0),this._targetElement.addEventListener(t,e,{passive:o,capture:a})}removeTargetListener(t,e){this._targetElement&&this._targetElement.removeEventListener(t,e)}updateActiveDescendant(t){t?this._targetElement.setAttribute("aria-activedescendant",t):this._targetElement.removeAttribute("aria-activedescendant")}open(t){super.open(t),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._targetElement.setAttribute("aria-expanded","true")}close(){return this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.removeAttribute("aria-activedescendant"),this.setAriaControls(),super.close()}attach(t){let a=(this._component.getRootNode()||HTMLDocument||this._component.ownerDocument||document).querySelector(t);a&&(this._targetElement=a)}detach(){this._targetElement=void 0}setTargetDisconnectedListener(t){if(!this._targetElement||!this._targetElement.parentElement)return()=>{};let e=new MutationObserver(o=>{o.some(s=>Array.from(s.removedNodes).some(r=>r===this._targetElement))&&(e.disconnect(),t())});return e.observe(this._targetElement.parentElement,{childList:!0}),()=>e.disconnect()}isAttached(){return!!this._targetElement}setTargetText(t,e){let o=this._targetElement;if(e){let a=this._getElementBySelector(e);a&&(o=a)}o&&(o.textContent=t)}getTargetText(t){let e=t?this._getElementBySelector(t):this._targetElement;return e?e.innerText:""}_getElementBySelector(t){return this._targetElement.querySelector(t)||this._getRootNode().querySelector(t)}_getRootNode(){var t,e;return(e=(t=this._component.getRootNode())!=null?t:this._component.ownerDocument)!=null?e:document}setAriaControls(){let t=this._component.querySelector("[data-forge-aria-controls-placeholder]");if(t){this._targetElement.setAttribute("aria-controls",t.id);return}t=document.createElement("div"),t.id=`forge-select-dropdown-temp-${V2(10)}`,t.setAttribute("data-forge-aria-controls-placeholder",""),this._targetElement.setAttribute("aria-controls",t.id),this._component.appendChild(t)}};var Tf="<template></template>",Sf=":host{display:none}",H0=class extends Vt{static get observedAttributes(){return[e0.attributes.TARGET,e0.attributes.SELECTED_TEXT_TARGET,e0.attributes.SYNC_SELECTED_TEXT,Lt.attributes.VALUE,Lt.attributes.MULTIPLE,Lt.attributes.OBSERVE_SCROLL,Lt.attributes.OBSERVE_SCROLL_THRESHOLD,Lt.attributes.POPUP_CLASSES,Lt.attributes.OPTION_LIMIT,Lt.attributes.SYNC_POPUP_WIDTH]}constructor(){super(),H(this,Tf,Sf),this._core=new v4(new p4(this))}attributeChangedCallback(t,e,o){switch(t){case e0.attributes.TARGET:this.target=o;return;case e0.attributes.SELECTED_TEXT_TARGET:this.selectedTextTarget=o;return;case e0.attributes.SYNC_SELECTED_TEXT:this.syncSelectedText=p(o);return}super.attributeChangedCallback(t,e,o)}};i([c()],H0.prototype,"target",2),i([c()],H0.prototype,"selectedTextTarget",2),i([c()],H0.prototype,"syncSelectedText",2),H0=i([y({name:e0.elementName,dependencies:[$1,t0,R1,v2,j1,Pt,Je,pe,i1]})],H0);function E7(){f(H0)}var B7=class extends o2{constructor(t){super(t)}_build(){return document.createElement(X2.elementName)}_configure(){var t;typeof((t=this._config.options)==null?void 0:t.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}onChange(t){this._element.addEventListener("change",e=>t(e.detail))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};var kf=`${b}skip-link`,A7={TARGET:"target",THEME:"theme",MUTED:"muted",PERSISTENT:"persistent",INLINE:"inline",SKIP_URL_CHANGE:"skip-url-change"},Of=d({},A7),Df={ANCHOR:"a"},bt={elementName:kf,observedAttributes:A7,attributes:Of,selectors:Df};var Pf='<template><a class="forge-skip-link" part="anchor"><slot>Skip to main content</slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></a></template>',Nf=':host{--_skip-link-inset:var(--forge-skip-link-inset, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px));--_skip-link-z-index:var(--forge-skip-link-z-index, var(--forge-z-index-popup, 10));--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, var(--forge-animation-duration-short4, 200ms));--_skip-link-transition-timing-function:var(--forge-skip-link-transition-timing-function, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}:host{transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);display:block;position:fixed;inset:var(--_skip-link-inset);z-index:var(--_skip-link-z-index);block-size:fit-content;inline-size:fit-content;opacity:0;transform:translateY(-100%)}:host([hidden]){display:none}:host(:where(:focus-within,[persistent])){transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);transform:translateY(0);opacity:1}.forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000));--_skip-link-shape:var(--forge-skip-link-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_skip-link-elevation:var(--forge-skip-link-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_skip-link-padding-block:var(--forge-skip-link-padding-block, var(--forge-spacing-xsmall, 8px));--_skip-link-padding-inline:var(--forge-skip-link-padding-inline, var(--forge-spacing-medium, 16px));--_skip-link-focus-indicator-color:var(--forge-skip-link-focus-indicator-color, var(--_skip-link-background))}.forge-skip-link{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);display:block;outline:0;box-shadow:var(--_skip-link-elevation);border-radius:var(--_skip-link-shape);background:var(--_skip-link-background);padding-block:var(--_skip-link-padding-block);padding-inline:var(--_skip-link-padding-inline);cursor:pointer;color:var(--_skip-link-color);text-decoration:underline}:host([theme=primary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary, #3f51b5));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=primary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary-container-high, #b6bde3));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary-container-high, #000000))}:host([theme=secondary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([theme=tertiary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary, #3d5afe));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary-container-high, #b5c0ff));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary-container-high, #000000))}:host([theme=success]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success, #2e7d32));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success-container-high, #b0ceb1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success-container-high, #000000))}:host([theme=error]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error, #b00020));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error-container-high, #e19eaa));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error-container-high, #000000))}:host([theme=warning]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning, #d14900));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning-container-high, #eeba9e));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning-container-high, #000000))}:host([theme=info]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info, #1565c0));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info-container-high, #a6c4e7));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info-container-high, #000000))}:host(:where(:not([theme]),[theme=default])[muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([inline]){position:absolute;transform:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_skip-link-focus-indicator-color);--forge-focus-indicator-shape:var(--_skip-link-shape)}@media (prefers-reduced-motion:reduce){:host{--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, 0s)}}',Fa=class extends M{constructor(){super();this._target="";this._theme="default";this._muted=!1;this._persistent=!1;this._inline=!1;this._skipUrlChange=!1;this._clickListener=e=>this._handleClick(e);H(this,Pf,Nf),this._anchorElement=w(this,bt.selectors.ANCHOR)}static get observedAttributes(){return Object.values(bt.observedAttributes)}attributeChangedCallback(e,o,a){switch(e){case bt.observedAttributes.TARGET:this.target=a;break;case bt.observedAttributes.THEME:this.theme=a;break;case bt.observedAttributes.MUTED:this.muted=p(a);break;case bt.observedAttributes.PERSISTENT:this.persistent=p(a);break;case bt.observedAttributes.INLINE:this.inline=p(a);break;case bt.observedAttributes.SKIP_URL_CHANGE:this.skipUrlChange=p(a);break}}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this.setAttribute(bt.attributes.TARGET,this._target),this._anchorElement.href=`#${this._target}`)}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this.setAttribute(bt.attributes.THEME,this._theme))}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this.toggleAttribute(bt.attributes.MUTED,this._muted))}get persistent(){return this._persistent}set persistent(e){this._persistent!==e&&(this._persistent=e,this.toggleAttribute(bt.attributes.PERSISTENT,this._persistent))}get inline(){return this._inline}set inline(e){this._inline!==e&&(this._inline=e,this.toggleAttribute(bt.attributes.INLINE,this._inline))}get skipUrlChange(){return this._skipUrlChange}set skipUrlChange(e){if(this._skipUrlChange!==e){if(this._skipUrlChange=e,this.toggleAttribute(bt.attributes.SKIP_URL_CHANGE,this._skipUrlChange),this._skipUrlChange){this._anchorElement.addEventListener("click",this._clickListener);return}this._anchorElement.removeEventListener("click",this._clickListener)}}_handleClick(e){e.preventDefault();let o=document.getElementById(this._target);o==null||o.focus(),o==null||o.scrollIntoView({behavior:"smooth"})}};Fa=i([y({name:bt.elementName,dependencies:[J,r1]})],Fa);function T7(){f(Fa)}var On=class extends M{};On.formAssociated=!0;var Rf=`${b}slider`,Ff={ARIA_LABEL:"data-aria-label",ARIA_LABEL_START:"data-aria-label-start",ARIA_LABEL_END:"data-aria-label-end",VALUE:"value",VALUE_START:"value-start",VALUE_END:"value-end",LABEL:"label",LABEL_START:"label-start",LABEL_END:"label-end",MIN:"min",MAX:"max",STEP:"step",TICKMARKS:"tickmarks",LABELED:"labeled",RANGE:"range",DISABLED:"disabled",READONLY:"readonly"},Uf={ROOT:".forge-slider",TRACK:".track",HANDLE_CONTAINER:".handle-container",START_INPUT:"input.start",END_INPUT:"input.end",START_HANDLE:".handle.start",START_HANDLE_THUMB:".handle.start .handle-thumb",END_HANDLE:".handle.end",END_HANDLE_THUMB:".handle.end .handle-thumb",START_LABEL:".handle.start .handle-label",START_LABEL_CONTENT:".handle.start .handle-label-content",END_LABEL:".handle.end .handle-label",END_LABEL_CONTENT:".handle.end .handle-label-content",LABEL:".handle-label",INPUT:"input[type=range]"},Wf={RANGE:"range",TICKMARKS:"tickmarks",ON_TOP:"on-top",OVERLAPPING:"overlapping",HOVER:"hover",HANDLE:"handle",HANDLE_THUMB:"handle-thumb",HANDLE_START:"start",HANDLE_LABEL:"handle-label",LABEL:"handle-label",LABEL_CONTENT:"handle-label-content"},Gf={INPUT:"forge-slider-input",CHANGE:"forge-slider-change",RANGE_INPUT:"forge-slider-range-input",RANGE_CHANGE:"forge-slider-range-change"},qf={START_FRACTION:"--_slider-start-fraction",END_FRACTION:"--_slider-end-fraction",TICK_COUNT:"--_slider-tick-count"},Yf={DEFAULT_STEP:1,DEFAULT_VALUE:50,DEFAULT_START_VALUE:33,DEFAULT_END_VALUE:67},V={elementName:Rf,attributes:Ff,selectors:Uf,classes:Wf,events:Gf,numbers:Yf,cssCustomProperties:qf};function S7(n){let t=document.createElement("input");return t.type="range",t.id="start",t.min=String(n.min),t.max=String(n.max),t.step=String(n.step),t.valueAsNumber=n.valueStart,t.disabled=n.disabled,t.classList.add("start"),n.hasAttribute(V.attributes.ARIA_LABEL_START)&&t.setAttribute("aria-label",n.getAttribute(V.attributes.ARIA_LABEL_START)),t.setAttribute("aria-valuetext",String(n.valueStart)),t}function k7(n){let t=document.createElement("div");t.classList.add(V.classes.HANDLE,V.classes.HANDLE_START),t.setAttribute("part","handle-start");let e=document.createElement("forge-state-layer");e.target="start",t.appendChild(e);let o=document.createElement("forge-focus-indicator");o.target="start",t.appendChild(o);let a=document.createElement("div");a.classList.add(V.classes.HANDLE_THUMB),a.setAttribute("part","handle-start-thumb"),t.appendChild(a);let s=document.createElement("div");s.classList.add(V.classes.HANDLE_LABEL),s.setAttribute("part","handle-start-label"),t.appendChild(s);let r=document.createElement("span");return r.textContent=n,r.classList.add(V.classes.LABEL_CONTENT),r.setAttribute("part","handle-start-label-content"),s.appendChild(r),t}function _3(n){let t=document.createElement("div");t.classList.add(V.classes.LABEL);let e=document.createElement("span");return e.textContent=n,e.classList.add(V.classes.LABEL_CONTENT),t.appendChild(e),t}var m4=class extends I{constructor(t){super(t),this._rootElement=w(t,V.selectors.ROOT),this._trackElement=w(t,V.selectors.TRACK),this._handleContainerElement=w(t,V.selectors.HANDLE_CONTAINER),this._endInputElement=w(t,V.selectors.END_INPUT),this._endHandleElement=w(t,V.selectors.END_HANDLE),this._endHandleThumbElement=w(t,V.selectors.END_HANDLE_THUMB),this._endLabelContentElement=w(t,V.selectors.END_LABEL_CONTENT)}addInputListener(t,e){this._getInputs().forEach(a=>a.addEventListener(t,e))}update({startFraction:t,endFraction:e,tickCount:o}){this._rootElement.style.setProperty(V.cssCustomProperties.START_FRACTION,String(t)),this._rootElement.style.setProperty(V.cssCustomProperties.END_FRACTION,String(e)),this._rootElement.style.setProperty(V.cssCustomProperties.TICK_COUNT,String(o))}updateLabels(t,e){var o;this._startLabelContentElement&&(this._startLabelContentElement.textContent=t),this._endLabelContentElement&&(this._endLabelContentElement.textContent=e),(o=this._startInputElement)==null||o.setAttribute("aria-valuetext",t),this._endInputElement.setAttribute("aria-valuetext",e)}updateHandleLayering(){let t=this._endInputElement.matches(":focus");this._startHandleElement&&f2(this._startHandleElement,!t,V.classes.ON_TOP),f2(this._endHandleElement,t,V.classes.ON_TOP)}tryHoverStartHandle(t){var e,o,a;this._startHandleThumbElement&&h5(t,this._startHandleThumbElement)?(this._handleContainerElement.classList.add(V.classes.HOVER),(e=this._startHandleElement)==null||e.classList.add(V.classes.HOVER)):(o=this._startInputElement)!=null&&o.matches(":focus")||(this._handleContainerElement.classList.remove(V.classes.HOVER),(a=this._startHandleElement)==null||a.classList.remove(V.classes.HOVER))}tryHoverEndHandle(t){h5(t,this._endHandleThumbElement)?(this._handleContainerElement.classList.add(V.classes.HOVER),this._endHandleElement.classList.add(V.classes.HOVER)):this._endInputElement.matches(":focus")||(this._handleContainerElement.classList.remove(V.classes.HOVER),this._endHandleElement.classList.remove(V.classes.HOVER))}tryDetectOverlap(){if(this._startHandleElement){let t=Dl(this._startHandleElement,this._endHandleElement);f2(this._endHandleElement,t,V.classes.OVERLAPPING),f2(this._startHandleElement,t,V.classes.OVERLAPPING)}}leaveHandleContainer(){this._handleContainerElement.classList.remove(V.classes.HOVER)}syncInputValues(t,e){if(this._startInputElement&&(this._startInputElement.valueAsNumber=t),this._endInputElement.valueAsNumber=e,this._startInputElement){let o=new FormData;o.append(this._component.nameStart,String(t)),o.append(this._component.nameEnd,String(e)),this._component[s1].setFormValue(o)}else this._component[s1].setFormValue(String(e))}setRange(t){var e,o;if(this._rootElement.classList.toggle(V.classes.RANGE,t),t){this._startInputElement=S7(this._component),this._rootElement.insertAdjacentElement("afterbegin",this._startInputElement),this._endInputElement.valueAsNumber=this._component.valueEnd;let a=this._startInputElement.value;this._startHandleElement=k7(a),this._handleContainerElement.insertAdjacentElement("afterbegin",this._startHandleElement),this._startHandleThumbElement=w(this._component,V.selectors.START_HANDLE_THUMB),this._startLabelContentElement=w(this._component,V.selectors.START_LABEL_CONTENT)}else(e=this._startInputElement)==null||e.remove(),(o=this._startHandleElement)==null||o.remove(),this._startInputElement=void 0,this._startHandleElement=void 0,this._startHandleThumbElement=void 0,this._startLabelContentElement=void 0}setTickmarks(t){this._trackElement.classList.toggle(V.classes.TICKMARKS,t)}setStep(t){this._getInputs().forEach(o=>o.step=String(t))}setMin(t){this._getInputs().forEach(o=>o.min=String(t))}setMax(t){this._getInputs().forEach(o=>o.max=String(t))}setDisabled(t){this._getInputs().forEach(a=>a.disabled=t),this._rootElement.querySelectorAll(I1.elementName).forEach(a=>a.disabled=t)}setReadonly(t){this._getInputs().forEach(o=>o.readOnly=t)}toggleLabels(t){var o;if(this._rootElement.querySelectorAll(V.selectors.LABEL).forEach(a=>a.remove()),this._endLabelContentElement=void 0,this._startLabelContentElement=void 0,t){let a=_3(this._endInputElement.value);if(this._endHandleElement.insertAdjacentElement("beforeend",a),this._endLabelContentElement=w(this._component,V.selectors.END_LABEL_CONTENT),this._startInputElement){let s=_3(this._startInputElement.value);(o=this._startHandleElement)==null||o.insertAdjacentElement("beforeend",s),this._startLabelContentElement=w(this._component,V.selectors.START_LABEL_CONTENT)}}}setStartAriaLabel(t){this._startInputElement&&G(this._startInputElement,!!t,"aria-label",t)}setEndAriaLabel(t){G(this._endInputElement,!!t,"aria-label",t)}_getInputs(){let t=[];return this._startInputElement&&t.push(this._startInputElement),[...t,this._endInputElement]}};var d4=class{constructor(t){this._adapter=t;this._value=V.numbers.DEFAULT_VALUE;this._valueStart=V.numbers.DEFAULT_START_VALUE;this._valueEnd=V.numbers.DEFAULT_END_VALUE;this._min=0;this._max=100;this._step=V.numbers.DEFAULT_STEP;this._tickmarks=!1;this._labeled=!0;this._range=!1;this._disabled=!1;this._readonly=!1;this._pointerEnterListener=e=>this._handlePointerEnter(e),this._pointerMoveListener=e=>this._handlePointerMove(e),this._pointerLeaveListener=e=>this._handlePointerLeave(e),this._changeUpdateListener=e=>this._handleInputUpdate(e),this._focusListener=e=>this._handleFocus(e)}initialize(){this._applyInputListeners(),this._update()}_update(){var z,x;let{value:t,valueStart:e,valueEnd:o}=this._clampMinMax(),a=this._step<=0?1:this._step,s=Math.max(this._max-this._min,a),r=this._range?((e!=null?e:this._min)-this._min)/s:0,l=this._range?o:t,h=((l!=null?l:this.min)-this.min)/s,v=s/a;this._adapter.update({startFraction:r,endFraction:h,tickCount:v}),this._adapter.syncInputValues(e,this._range?o:t),this._range&&this._adapter.tryDetectOverlap();let m=(z=this._labelStart)!=null?z:String(e),u=(x=this._labelEnd)!=null?x:String(this._range?o:t);typeof this._labelBuilder=="function"&&(this._range?(m=this._labelBuilder(e,"start"),u=this._labelBuilder(o,"end")):u=this._labelBuilder(t)),this._adapter.updateLabels(m,u)}_clampMinMax(){let t=this._value,e=this._valueStart,o=this._valueEnd;return this._range?(e>this._max?e=this._max:e<this._min&&(e=this._min),o>this._max?o=this._max:o<this._min&&(o=this._min)):t>this._max?t=this._max:this._value<this._min&&(t=this._min),{value:t,valueStart:e,valueEnd:o}}_applyInputListeners(){this._adapter.addInputListener("pointerenter",this._pointerEnterListener),this._adapter.addInputListener("pointermove",this._pointerMoveListener),this._adapter.addInputListener("pointerleave",this._pointerLeaveListener),this._adapter.addInputListener("input",this._changeUpdateListener),this._adapter.addInputListener("change",this._changeUpdateListener),this._adapter.addInputListener("focus",this._focusListener)}_handlePointerEnter(t){this._handlePointerMove(t)}_handlePointerMove({target:t,x:e,y:o}){t.id==="start"?this._adapter.tryHoverStartHandle({x:e,y:o}):this._adapter.tryHoverEndHandle({x:e,y:o})}_handlePointerLeave(t){this._adapter.leaveHandleContainer()}_handleInputUpdate(t){if(t.stopPropagation(),this._disabled||this._readonly){this._adapter.syncInputValues(this._valueStart,this._range?this._valueEnd:this._value);return}let e=t.target;if(this._range){let l=e.id==="start";if(l?this._valueStart=e.valueAsNumber:this._valueEnd=e.valueAsNumber,this._canClamp()){l?this._valueStart=this._valueEnd:this._valueEnd=this._valueStart,this._adapter.syncInputValues(this._valueStart,this._valueEnd),this._update();return}}else this._value=e.valueAsNumber;let o={default:{change:V.events.CHANGE,input:V.events.INPUT},range:{change:V.events.RANGE_CHANGE,input:V.events.RANGE_INPUT}},a=this._range?o.range[t.type]:o.default[t.type],s=this._range?{valueStart:this._valueStart,valueEnd:this._valueEnd}:{value:this._value},r=new CustomEvent(a,{detail:s,bubbles:!0});this._adapter.dispatchHostEvent(r),this._update()}_handleFocus(t){this._adapter.updateHandleLayering()}_canClamp(){return this._valueStart>this._valueEnd||this._valueEnd<this._valueStart}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._update())}get valueStart(){return this._valueStart}set valueStart(t){this._valueStart!==t&&(this._valueStart=t,this._update())}get valueEnd(){return this._valueEnd}set valueEnd(t){this._valueEnd!==t&&(this._valueEnd=t,this._update())}get label(){return this.labelEnd}set label(t){this.labelEnd=t}get labelStart(){return this._labelStart}set labelStart(t){this._labelStart!==t&&(this._labelStart=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelEnd(){return this._labelEnd}set labelEnd(t){this._labelEnd!==t&&(this._labelEnd=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelBuilder(){return this._labelBuilder}set labelBuilder(t){this._labelBuilder=t,this._update()}get min(){return this._min}set min(t){this._min!==t&&(this._min=t,this._adapter.setMin(this._min),this._update(),this._adapter.setHostAttribute(V.attributes.MIN,String(this._min)))}get max(){return this._max}set max(t){this._max!==t&&(this._max=t,this._adapter.setMax(this._max),this._update(),this._adapter.setHostAttribute(V.attributes.MAX,String(this._max)))}get step(){return this._step}set step(t){this._step!==t&&(this._step=t,this._adapter.setStep(this._step),this._update(),this._adapter.setHostAttribute(V.attributes.STEP,String(this._step)))}get tickmarks(){return this._tickmarks}set tickmarks(t){this._tickmarks!==t&&(this._tickmarks=t,this._adapter.setTickmarks(this._tickmarks),this._adapter.toggleHostAttribute(V.attributes.TICKMARKS,this._tickmarks))}get labeled(){return this._labeled}set labeled(t){this._labeled!==t&&(this._labeled=t,this._adapter.toggleLabels(this._labeled),this._update(),this._adapter.toggleHostAttribute(V.attributes.LABELED,this._labeled))}get range(){return this._range}set range(t){this._range!==t&&(this._range=t,this._adapter.setRange(this._range),this._range&&this._applyInputListeners(),this._update(),this._adapter.toggleHostAttribute(V.attributes.RANGE,this._range))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(V.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(t),this._adapter.toggleHostAttribute(V.attributes.READONLY,this._readonly))}set ariaLabel(t){this.ariaLabelEnd=t}set ariaLabelStart(t){this._adapter.setStartAriaLabel(t)}set ariaLabelEnd(t){this._adapter.setEndAriaLabel(t)}};var Kf='<template><div part="root" class="forge-slider"><input type="range" class="end" id="end" min="0" max="100" step="1" aria-valuetext="0"><div class="track" part="track"></div><div class="handle-container-padded"><div class="handle-container-block"><div class="handle-container"><div class="handle end" part="handle-end"><forge-state-layer exportparts="surface:state-layer" target="end"></forge-state-layer><forge-focus-indicator part="focus-indicator" target="end"></forge-focus-indicator><div class="handle-thumb" part="handle-end-thumb"></div><div class="handle-label" part="handle-end-label"><span class="handle-label-content" part="handle-end-label-content"></span></div></div></div></div></div></div></template>',$f=':host{display:inline-flex;vertical-align:middle;min-inline-size:100%}:host([hidden]){display:none}.forge-slider{--_slider-start-fraction:0;--_slider-end-fraction:0;--_slider-tick-count:100;--_slider-track-height:var(--forge-slider-track-height, 4px);--_slider-active-track-color:var(--forge-slider-active-track-color, var(--forge-theme-primary, #3f51b5));--_slider-active-track-height:var(--forge-slider-active-track-height, var(--_slider-track-height));--_slider-active-track-shape:var(--forge-slider-active-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-disabled-active-track-color:var(--forge-slider-disabled-active-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-active-track-opacity:var(--forge-slider-disabled-active-track-opacity, 0.38);--_slider-disabled-handle-color:var(--forge-slider-disabled-handle-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-color:var(--forge-slider-disabled-inactive-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-opacity:var(--forge-slider-disabled-inactive-track-opacity, 0.12);--_slider-focus-handle-color:var(--forge-slider-focus-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-color:var(--forge-slider-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-height:var(--forge-slider-handle-height, 20px);--_slider-handle-shape:var(--forge-slider-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_slider-handle-width:var(--forge-slider-handle-width, 20px);--_slider-hover-handle-color:var(--forge-slider-hover-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-inactive-track-color:var(--forge-slider-inactive-track-color, var(--forge-theme-primary-container, #d1d5ed));--_slider-inactive-track-height:var(--forge-slider-inactive-track-height, var(--_slider-track-height));--_slider-inactive-track-shape:var(--forge-slider-inactive-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-shape:var(--forge-slider-label-container-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-color:var(--forge-slider-label-container-color, var(--forge-theme-primary, #3f51b5));--_slider-label-container-height:var(--forge-slider-label-container-height, 28px);--_slider-label-text-color:var(--forge-slider-label-text-color, var(--forge-theme-on-primary, #ffffff));--_slider-pressed-handle-color:var(--forge-slider-pressed-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-state-layer-size:var(--forge-slider-state-layer-size, 40px);--_slider-with-overlap-handle-outline-color:var(--forge-slider-with-overlap-handle-outline-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-overlap-handle-outline-width:var(--forge-slider-with-overlap-handle-outline-width, 1px);--_slider-with-tick-marks-active-container-color:var(--forge-slider-with-tick-marks-active-container-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-tick-marks-container-size:var(--forge-slider-with-tick-marks-container-size, 2px);--_slider-with-tick-marks-disabled-active-container-color:var(--forge-slider-with-tick-marks-disabled-active-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-disabled-inactive-container-color:var(--forge-slider-with-tick-marks-disabled-inactive-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-inactive-container-color:var(--forge-slider-with-tick-marks-inactive-container-color, var(--forge-theme-primary, #3f51b5))}.forge-slider{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_slider-state-layer-size);pointer-events:none;touch-action:none}.forge-slider.range :host-context([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range :host([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start{clip-path:inset(0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))) 0 0)}.forge-slider.range input.end{clip-path:inset(0 0 0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)))}.forge-slider.range :host-context([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range :host([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range input.end:dir(rtl){clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.track{position:absolute;inset:0;display:flex;align-items:center}.track::after,.track::before{content:"";position:absolute;inset-inline-start:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));inset-inline-end:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));background-size:calc((100% - var(--_slider-with-tick-marks-container-size) * 2)/ var(--_slider-tick-count)) 100%}.track::before{block-size:var(--_slider-inactive-track-height);border-radius:var(--_slider-inactive-track-shape);background-color:var(--_slider-inactive-track-color)}.track::after{block-size:var(--_slider-active-track-height);border-radius:var(--_slider-active-track-shape);clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)));background-color:var(--_slider-active-track-color)}.track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-inactive-container-color) 0,var(--_slider-with-tick-marks-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-active-container-color) 0,var(--_slider-with-tick-marks-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.handle-container-block,.handle-container-padded{position:relative;block-size:100%;inline-size:100%}.handle-container-padded{padding-inline:calc(var(--_slider-state-layer-size)/ 2)}.handle-container{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100% * var(--_slider-start-fraction));inline-size:calc(100% * (var(--_slider-end-fraction) - var(--_slider-start-fraction)))}.handle{position:absolute;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);border-radius:var(--_slider-handle-shape);display:grid;place-items:center}.handle.start{inset-inline-start:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle.end{inset-inline-end:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle-thumb{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);position:absolute;height:var(--_slider-handle-height);width:var(--_slider-handle-width);border-radius:var(--_slider-handle-shape);background:var(--_slider-handle-color)}.handle-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);position:absolute;box-sizing:border-box;display:grid;padding:4px;place-items:center;border-radius:var(--_slider-label-container-shape);color:var(--_slider-label-text-color);font-weight:500;white-space:nowrap;inset-block-end:100%;min-inline-size:var(--_slider-label-container-height);min-block-size:var(--_slider-label-container-height);background:var(--_slider-label-container-color);transition:transform var(--forge-animation-duration-short2, 100ms) var(--forge-animation-easing-standard, cubic-bezier(.2, 0, 0, 1));transform-origin:center bottom;transform:scale(0)}.handle-label::after,.handle-label::before{content:"";position:absolute;display:block;background:inherit}.handle-label::before{inline-size:calc(var(--_slider-label-container-height)/ 2);block-size:calc(var(--_slider-label-container-height)/ 2);bottom:calc(var(--_slider-label-container-height)/ -10);transform:rotate(45deg)}.handle-label::after{inset:0;border-radius:inherit}.handle-label-content{z-index:1}.handle-container.hover .handle-thumb{background:var(--_slider-hover-handle-color)}:host(:not([disabled])) input.end:active~.handle-container-padded .handle.end>.handle-thumb,:host(:not([disabled])) input.start:active~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-pressed-handle-color)}:host([disabled]) .handle-thumb{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);background:var(--_slider-disabled-handle-color)}:host([disabled]) .handle-label{background:var(--_slider-disabled-handle-color)}:host([disabled]) .track::before{opacity:calc(1 / var(--_slider-disabled-active-track-opacity) * var(--_slider-disabled-inactive-track-opacity));background-color:var(--_slider-disabled-inactive-track-color)}:host([disabled]) .track::after{background-color:var(--_slider-disabled-active-track-color)}:host([disabled]) .track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-inactive-container-color) 0,var(--_slider-with-tick-marks-disabled-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) .track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-active-container-color) 0,var(--_slider-with-tick-marks-disabled-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) input[type=range]{cursor:not-allowed}:host-context([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}:host([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}.track:dir(rtl)::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}input.end:focus~.handle-container-padded .handle.end>.handle-thumb,input.start:focus~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-focus-handle-color)}.on-top.overlapping .handle-label,.on-top.overlapping .handle-label::before,.on-top.overlapping .handle-thumb{border:var(--_slider-with-overlap-handle-outline-color) solid var(--_slider-with-overlap-handle-outline-width)}.handle-container.hover .handle-label,:host(:focus-within) .handle-label,:where(:has(input:active)) .handle-label{transform:scale(1)}input[type=range]{opacity:0;-webkit-tap-highlight-color:transparent;position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:0 0;cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}input[type=range]::-moz-range-track{appearance:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}input[type=range]::-moz-range-thumb{appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.on-top{z-index:1}@media (prefers-reduced-motion){.handle-label{transition-duration:0}}forge-focus-indicator{--forge-focus-indicator-shape:50%;--forge-focus-indicator-outward-offset:0px}forge-state-layer{--forge-state-layer-color:var(--_slider-handle-color)}',O7,_2=class extends(O7=On,s1,O7){static get observedAttributes(){return[V.attributes.ARIA_LABEL,V.attributes.ARIA_LABEL_START,V.attributes.ARIA_LABEL_END,V.attributes.VALUE,V.attributes.VALUE_START,V.attributes.VALUE_END,V.attributes.LABEL,V.attributes.LABEL_START,V.attributes.LABEL_END,V.attributes.MAX,V.attributes.MIN,V.attributes.STEP,V.attributes.TICKMARKS,V.attributes.LABELED,V.attributes.RANGE,V.attributes.DISABLED,V.attributes.READONLY]}get form(){return this[s1].form}get labels(){return this[s1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){G(this,!!t,"name",t!=null?t:"")}get nameStart(){var t;return(t=this.getAttribute("name-start"))!=null?t:this.name}set nameStart(t){G(this,!!t,"name-start",t!=null?t:"")}get nameEnd(){var t;return(t=this.getAttribute("name-end"))!=null?t:this.nameStart}set nameEnd(t){G(this,!!t,"name-end",t!=null?t:"")}constructor(){super(),H(this,Kf,$f),this[s1]=this.attachInternals(),this._core=new d4(new m4(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case V.attributes.ARIA_LABEL:this._core.ariaLabel=o;break;case V.attributes.ARIA_LABEL_START:this._core.ariaLabelStart=o;break;case V.attributes.ARIA_LABEL_END:this._core.ariaLabelEnd=o;break;case V.attributes.VALUE:this.value=K(o);break;case V.attributes.VALUE_START:this.valueStart=K(o);break;case V.attributes.VALUE_END:this.valueEnd=K(o);break;case V.attributes.LABEL:this.label=o;break;case V.attributes.LABEL_START:this.labelStart=o;break;case V.attributes.LABEL_END:this.labelEnd=o;break;case V.attributes.MIN:this.min=K(o);break;case V.attributes.MAX:this.max=K(o);break;case V.attributes.STEP:this.step=K(o);break;case V.attributes.TICKMARKS:this.tickmarks=p(o);break;case V.attributes.LABELED:this.labeled=p(o);break;case V.attributes.RANGE:this.range=p(o);break;case V.attributes.DISABLED:this.disabled=p(o);break;case V.attributes.READONLY:this.readonly=p(o);break}}formResetCallback(){if(this._core.range){let e=this.getAttribute("value-start");this.valueStart=e!==null?Number(e):V.numbers.DEFAULT_START_VALUE;let o=this.getAttribute("value-end");this.valueEnd=o!==null?Number(o):V.numbers.DEFAULT_END_VALUE;return}let t=this.getAttribute("value");this.value=t!==null?Number(t):V.numbers.DEFAULT_VALUE}formStateRestoreCallback(t){if(t&&t[0]instanceof FormData){let e=Array.from(t[0]),[[,o],[,a]]=e;this.valueStart=Number(o),this.valueEnd=Number(a),this.range=!0;return}this.value=Number(t),this.range=!1}formDisabledCallback(t){this.disabled=t}};_2.formAssociated=!0,i([c()],_2.prototype,"value",2),i([c()],_2.prototype,"valueStart",2),i([c()],_2.prototype,"valueEnd",2),i([c()],_2.prototype,"label",2),i([c()],_2.prototype,"labelStart",2),i([c()],_2.prototype,"labelEnd",2),i([c()],_2.prototype,"labelBuilder",2),i([c()],_2.prototype,"min",2),i([c()],_2.prototype,"max",2),i([c()],_2.prototype,"step",2),i([c()],_2.prototype,"tickmarks",2),i([c()],_2.prototype,"labeled",2),i([c()],_2.prototype,"range",2),i([c()],_2.prototype,"disabled",2),i([c()],_2.prototype,"readonly",2),_2=i([y({name:V.elementName,dependencies:[J,r1]})],_2);var D7=class extends o2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get valueStart(){return this._element.valueStart}set valueStart(t){this._element.valueStart=t}get valueEnd(){return this._element.valueEnd}set valueEnd(t){this._element.valueEnd=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get min(){return this._element.min}set min(t){this._element.min=t}get max(){return this._element.max}set max(t){this._element.max=t}get step(){return this._element.step}get range(){return this._element.range}set range(t){this._element.range=t}get tickmarks(){return this._element.tickmarks}set tickmarks(t){this._element.tickmarks=t}get labeled(){return this._element.labeled}set labeled(t){this._element.labeled=t}get labelBuilder(){return this._element.labelBuilder}set labelBuilder(t){this._element.labelBuilder=t}onInput(t){this._element.addEventListener("forge-slider-input",({detail:e})=>t(e))}onChange(t){this._element.addEventListener("forge-slider-change",({detail:e})=>t(e))}onRangeInput(t){this._element.addEventListener("forge-slider-range-input",({detail:e})=>t(e))}onRangeChange(t){this._element.addEventListener("forge-slider-range-change",({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}_build(){return document.createElement(V.elementName)}};function P7(){f(_2)}var I0=`${b}split-view-panel`,Xf={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},Zf={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},Ua={ROOT:"root",HANDLE:"handle",ICON:"icon",STATE_LAYER:"state-layer",CONTENT:"content"},jf={ROOT:`#${Ua.ROOT}`,HANDLE:`#${Ua.HANDLE}`,ICON:`#${Ua.ICON}`,STATE_LAYER:`#${Ua.STATE_LAYER}`,CONTENT:`#${Ua.CONTENT}`},Qf={WILL_RESIZE:`${I0}-will-resize`,RESIZE_START:`${I0}-resize-start`,RESIZE_END:`${I0}-resize-end`,RESIZE:`${I0}-resize`,DID_OPEN:`${I0}-did-open`,DID_CLOSE:`${I0}-did-close`,WILL_OPEN:`${I0}-will-open`,WILL_CLOSE:`${I0}-will-close`},Jf={STATE_LAYER_ACTIVATION_WAIT:200},tb={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},P={elementName:I0,attributes:Xf,classes:Zf,ids:Ua,selectors:jf,events:Qf,numbers:Jf,customCssProperties:tb},N7=(o=>(o[o.Under=1]="Under",o[o.Active=2]="Active",o[o.Above=3]="Above",o))(N7||{});function R7(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function F7(n,t){let e=n.getContentSize(t.orientation);return S(d({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function U7(n){return S(d({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function W7(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let o=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,s=e.startPoint-a;e.resizable==="start"&&(s*=-1);let r=e.startSize-s;e.currentSize=g4(r,e),n.setContentSize(e.currentSize),w4(n,e,"pointer"),n.setValuenow(u4(e.currentSize,e));let l=r-e.currentSize+s;return K7(n,l,e),o!==e.currentSize}function G7(n,t,e){if(e.startSize===void 0)return!1;let o=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=g4(a,e),n.setContentSize(e.currentSize),w4(n,e,"keyboard"),n.setValuenow(u4(e.currentSize,e));let s=a-e.currentSize+e.keyboardDelta*-1;return K7(n,s,e),o!==e.currentSize}function q7(n,t){return n.setContentSize(t.min),t.min}function Y7(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),o=k0(t.max,e);return n.setContentSize(o),o}function K7(n,t,e){if(e.siblingSize!==void 0){let o=e.siblingSize+t;n.setSiblingContentSize(o)}}function g4(n,t){return n=Math.max(n,t.min),n=k0(n,t.max,t.availableSpace),n}function w4(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let o=k0(t.max,t.availableSpace);return t.currentSize>=o?(t.isAtMax||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function $7(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let o=k0(e.max,e.availableSpace);return t>=o?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function u4(n,t){if(!t.availableSpace&&!t.max)return 100;let e=k0(t.max,t.availableSpace);return cs(n,t.min,e)}function x3(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function X7(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function _4(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof L2&&!e.open);if(e instanceof L2)return e}function eb(n){var s,r;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),o=e!=null&&e[1]?+e[1]:-1,a=(r=(s=e==null?void 0:e[2])==null?void 0:s.toLowerCase())!=null?r:"";return{amount:o,unit:a}}function Uo(n,t){let e=eb(n);return e.unit==="%"?Ol(e.amount,t):e.amount}function Z7(){let n=document.createElement("div");return n.classList.add(P.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var x4=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=R7();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}destroy(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):m5(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){m5(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=q7(this._adapter,this._state);this._adapter.emitHostEvent(P.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Y7(this._adapter,this._state);this._adapter.emitHostEvent(P.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){G7(this._adapter,t,this._state)&&this._adapter.emitHostEvent(P.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,w4(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._endResize()}_handlePointermove(t){W7(this._adapter,t,this._state)&&this._adapter.emitHostEvent(P.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(P.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=F7(this._adapter,this._state),this._adapter.emitHostEvent(P.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(P.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=U7(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,o=!1){let a=t?P.events.WILL_OPEN:P.events.WILL_CLOSE,s={auto:e,userInitiated:o};this._adapter.emitHostEvent(a,s,!0,!0)&&(this._open=t,this._applyOpen(s))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let o=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=o,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(P.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=Uo(this._size,t);this._adapter.setHostAttribute(P.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let o=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=k0(this._pixelMax,o),s=cs(e,this._pixelMin,a);this._adapter.setValuenow(s),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(P.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=Uo(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var o;if(this._adapter.toggleHostAttribute(P.attributes.MAX,this._max!==void 0,(o=this._max)==null?void 0:o.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=Uo(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(P.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(P.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(P.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!O(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(P.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(P.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!O(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(P.attributes.AUTO_CLOSE_THRESHOLD,O(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!O(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=Uo(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=g4(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(P.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(O(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),O(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),O(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,O(this._autoClose)||this._applyAutoClose()),O(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,O(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=Uo(this._min,a),this._pixelMax=O(this._max)?Uo(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),o=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=u4(e,S(d({},this._state),{availableSpace:o}));this._adapter.setValuenow(a)}t.cursor&&$7(this._adapter,e,S(d({},this._state),{availableSpace:o}))}};var ob=`${b}split-view`,ab={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},nb={ROOT:"forge-split-view"},j7={ROOT:"root"},sb={ROOT:`#${j7.ROOT}`,PANEL:P.elementName},rb={RESIZE_THROTTLE_THRESHOLD:200},ib={ANIMATING_LAYER:"--forge-split-view-animating-layer"},t2={elementName:ob,attributes:ab,classes:nb,ids:j7,selectors:sb,numbers:rb,customCssProperties:ib};var f4=class extends I{constructor(t){super(t),this._root=w(t,P.selectors.ROOT),this._handle=w(t,P.selectors.HANDLE),this._icon=w(t,P.selectors.ICON),this._stateLayer=w(t,P.selectors.STATE_LAYER),this._content=w(t,P.selectors.CONTENT)}initialize(){let t=this._component.parentElement;(t==null?void 0:t.tagName.toLowerCase())===t2.elementName&&(this._parent=t)}tryRemoveOverlay(){var t;(t=this._overlay)==null||t.remove(),this._overlay=void 0}setPointerdownListener(t){this._handle.addEventListener("pointerdown",t)}setPointerupListener(t){document.addEventListener("pointerup",t)}removePointerupListener(t){document.removeEventListener("pointerup",t)}setPointermoveListener(t){document.addEventListener("pointermove",t)}removePointermoveListener(t){document.removeEventListener("pointermove",t)}setKeydownListener(t){this._handle.addEventListener("keydown",t)}setKeyupListener(t){this._handle.addEventListener("keyup",t)}removeKeyupListener(t){this._handle.removeEventListener("keyup",t)}getParentProperty(t){var e;return(e=this._parent)==null?void 0:e[t]}setAccessibleLabel(t){this._handle.setAttribute("aria-label",t)}setDisabled(t){this._root.classList.toggle(P.classes.DISABLED,t),this._handle&&(this._handle.setAttribute("tabindex",t?"-1":"0"),G(this._handle,t,"aria-disabled","true"))}setResizable(t){this._root.setAttribute(P.attributes.RESIZABLE,t.toString()),G(this._handle,t!=="off","aria-valuemin","0"),G(this._handle,t!=="off","aria-valuemax","100"),t!=="off"&&(this._handle.remove(),t==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(t){this._root.setAttribute(P.attributes.ORIENTATION,t),this._handle.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",X7(t))}setOpen(t,e=!0,o){var s,r;let a=()=>{var l,h;t||this._root.classList.add(P.classes.CLOSED),o&&this.emitHostEvent(t?P.events.DID_OPEN:P.events.DID_CLOSE,o),(l=this._parent)==null||l.unlayerSlottedPanels(),(h=this._parent)==null||h.update({accessibility:!0,cursor:!0})};if(t&&this._root.classList.contains(P.classes.CLOSED)){if(this._root.classList.remove(P.classes.CLOSED),!e){a();return}(s=this._parent)==null||s.layerSlottedPanels(this._component),Gt(this._root,P.classes.OPENING,!0).then(()=>{a()})}else if(!t&&!this._root.classList.contains(P.classes.CLOSED)){if(!e){a();return}(r=this._parent)==null||r.layerSlottedPanels(this._component),Gt(this._root,P.classes.CLOSING,!0).then(()=>{a()})}}setGrabbed(t){var e;this._root.classList.toggle(P.classes.GRABBED,t),this._handle.setAttribute("aria-grabbed",t.toString()),t?(this._overlay||(this._overlay=Z7()),document.body.append(this._overlay)):(e=this._overlay)==null||e.remove()}setHandleCursor(t,e){t?this._root.style.setProperty(P.customCssProperties.CURSOR,x3(t,e)):this._root.style.removeProperty(P.customCssProperties.CURSOR)}setBodyCursor(t,e){var o;(o=this._overlay)==null||o.style.setProperty("cursor",x3(t,e))}getContentSize(t){return t==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(t){this._component.style.setProperty(P.customCssProperties.SIZE,`${t}px`)}setValuenow(t){this._handle.setAttribute("aria-valuenow",t.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(t,e){if(e==="off")return-1;let o=_4(this._component);return o?o.getCollapsibleSize()+this.getContentSize(t):this.getParentSize(t)}getSiblingContentSize(){var e;let t=_4(this._component);return(e=t==null?void 0:t.getContentSize())!=null?e:0}setSiblingContentSize(t){let e=_4(this._component);e==null||e.setContentSize(t)}animateStateLayer(t){t?window.setTimeout(()=>{this._stateLayer.playAnimation()},P.numbers.STATE_LAYER_ACTIVATION_WAIT):this._stateLayer.playAnimation()}getParentSize(t){var o,a;let e=t==="horizontal"?(o=this._parent)==null?void 0:o.clientWidth:(a=this._parent)==null?void 0:a.clientHeight;return e!=null?e:0}updateParent(t){var e;(e=this._parent)==null||e.update(t)}};var lb='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-state-layer target="handle" id="state-layer" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator inward target="handle" part="focus-indicator"></forge-focus-indicator></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',cb=".forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:udbt8z1;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes udbt8z1{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:udbt8zh;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes udbt8zh{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:udbt909;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes udbt909{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:udbt90t;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes udbt90t{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:udbt91o;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes udbt91o{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:udbt928;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes udbt928{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:udbt92i;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes udbt92i{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:udbt92k;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes udbt92k{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}",L2=class extends M{static get observedAttributes(){return[P.attributes.RESIZABLE,P.attributes.SIZE,P.attributes.MIN,P.attributes.MAX,P.attributes.ACCESSIBLE_LABEL,P.attributes.OPEN,P.attributes.DISABLED,P.attributes.ALLOW_CLOSE,P.attributes.AUTO_CLOSE,P.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),X.define([wl,gl]),H(this,lb,cb),this._core=new x4(new f4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case P.attributes.RESIZABLE:this.resizable=o;break;case P.attributes.SIZE:this.size=o;break;case P.attributes.MIN:this.min=o;break;case P.attributes.MAX:o?this.max=o:this.max=void 0;break;case P.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=o;break;case P.attributes.OPEN:this.open=p(o);break;case P.attributes.DISABLED:this.hasAttribute(t)?this.disabled=p(o):this.disabled=void 0;break;case P.attributes.ALLOW_CLOSE:this.hasAttribute(t)?this.allowClose=p(o):this.allowClose=void 0;break;case P.attributes.AUTO_CLOSE:this.hasAttribute(t)?this.autoClose=p(o):this.autoClose=void 0;break;case P.attributes.AUTO_CLOSE_THRESHOLD:o?this.autoCloseThreshold=K(o):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._core.getContentSize()}getCollapsibleSize(){return this._core.getCollapsibleSize()}setContentSize(t){this._core.setContentSize(t)}update(t){this._core.update(t)}};i([c()],L2.prototype,"resizable",2),i([c()],L2.prototype,"size",2),i([c()],L2.prototype,"min",2),i([c()],L2.prototype,"max",2),i([c()],L2.prototype,"accessibleLabel",2),i([c()],L2.prototype,"open",2),i([c()],L2.prototype,"disabled",2),i([c()],L2.prototype,"allowClose",2),i([c()],L2.prototype,"autoClose",2),i([c()],L2.prototype,"autoCloseThreshold",2),L2=i([y({name:P.elementName,dependencies:[j,r1,J]})],L2);function Dy1(){f(L2)}var b4=class extends I{constructor(t){super(t),this._root=w(t,t2.selectors.ROOT)}registerSlotListener(t){this._root.addEventListener("slotchange",t)}registerDidOpenListener(t){this._root.addEventListener(P.events.DID_OPEN,t)}registerDidCloseListener(t){this._root.addEventListener(P.events.DID_CLOSE,t)}observeResize(t){B0.observe(this._root,t)}unobserveResize(){B0.unobserve(this._root)}getSlottedPanels(){let t=this._component.querySelectorAll(t2.selectors.PANEL);return Array.from(t).filter(a=>a.parentElement===this._component)}refitSlottedPanels(t){let e=t==="horizontal"?this._root.clientWidth:this._root.clientHeight,o=this.getSlottedPanels(),a=o.map(r=>{var v;let l=(v=r.shadowRoot)==null?void 0:v.querySelector(P.selectors.ROOT),h=t==="horizontal"?l==null?void 0:l.clientWidth:l==null?void 0:l.clientHeight;return h!=null?h:0}).reduce((r,l)=>r+l,0);if(a<=e)return;let s=a-e;o.slice().reverse().filter(r=>r.open).forEach(r=>{if(s<=0)return;let l=r.getContentSize(),h=r.getCollapsibleSize(),v=Math.min(s,h),m=l-v;r.setContentSize(m),s-=v})}};var y4=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=Gn(e=>this._onResize(e),t2.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}destroy(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(t2.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(t2.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(t2.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(t2.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(t2.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),o=t.resizable==="start"?1:-1,a=t.resizable==="start"?1:3;e.forEach(s=>{(s===t||a===2)&&(a+=o),s.style.setProperty(t2.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(t2.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(o=>{o.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var hb='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',vb=".forge-split-view{display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{flex-direction:row}:host([orientation=vertical]) .forge-split-view{flex-direction:column}",Te=class extends M{static get observedAttributes(){return[t2.attributes.ORIENTATION,t2.attributes.DISABLED,t2.attributes.ALLOW_CLOSE,t2.attributes.AUTO_CLOSE,t2.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),H(this,hb,vb),this._core=new y4(new b4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case t2.attributes.ORIENTATION:this.orientation=o;break;case t2.attributes.DISABLED:this.disabled=p(o);break;case t2.attributes.ALLOW_CLOSE:this.allowClose=p(o);break;case t2.attributes.AUTO_CLOSE:this.autoClose=p(o);break;case t2.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=K(o);break}}layerSlottedPanels(t){this._core.layerSlottedPanels(t)}unlayerSlottedPanels(){this._core.unlayerSlottedPanels()}update(t){this._core.update(t)}refit(){this._core.refitSlottedPanels()}};i([c()],Te.prototype,"orientation",2),i([c()],Te.prototype,"disabled",2),i([c()],Te.prototype,"allowClose",2),i([c()],Te.prototype,"autoClose",2),i([c()],Te.prototype,"autoCloseThreshold",2),Te=i([y({name:t2.elementName,dependencies:[L2]})],Te);function Q7(){f(Te)}var pb=`${b}stack`,J7={DEFAULT:"forge-stack"},mb={ROOT:`.${J7.DEFAULT}`},tm={INLINE:"inline",WRAP:"wrap",STRETCH:"stretch",GAP:"gap",ALIGNMENT:"alignment",JUSTIFY:"justify"},db=d({},tm),gb={DEFAULT_GAP:"16"},W2={elementName:pb,classes:J7,observedAttributes:tm,attributes:db,selectors:mb,strings:gb};var M4=class extends I{constructor(t){super(t),this._rootElement=w(t,W2.selectors.ROOT)}setGap(t){let e=/^\d+$/.test(t)?`${t}px`:t;this._rootElement.style.gap=`var(--forge-stack-gap, ${e})`}};var z4=class{constructor(t){this._adapter=t;this._inline=!1;this._wrap=!1;this._stretch=!1;this._gap=W2.strings.DEFAULT_GAP;this._alignment="start";this._justify="start"}get inline(){return this._inline}set inline(t){t=!!t,this._inline!==t&&(this._inline=t,this._adapter.toggleHostAttribute(W2.attributes.INLINE,this._inline))}get wrap(){return this._wrap}set wrap(t){t=!!t,this._wrap!==t&&(this._wrap=t,this._adapter.toggleHostAttribute(W2.attributes.WRAP,this._wrap))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(W2.attributes.STRETCH,this._stretch))}get gap(){return this._gap}set gap(t){this._gap!==t&&(this._gap=t,this._adapter.setGap(this._gap),this._adapter.setHostAttribute(W2.attributes.GAP,this._gap))}get alignment(){return this._alignment}set alignment(t){this._alignment!==t&&(this._alignment=t,this._adapter.setHostAttribute(W2.attributes.ALIGNMENT,this._alignment))}get justify(){return this._justify}set justify(t){this._justify!==t&&(this._justify=t,this._adapter.setHostAttribute(W2.attributes.JUSTIFY,this._justify))}};var wb='<template><div class="forge-stack" part="root"><slot></slot></div></template>',ub=".forge-stack{display:flex;flex-direction:column;align-items:var(--_stack-alignment);justify-content:var(--_stack-justify);gap:var(--_stack-gap);height:var(--_stack-height);width:100%;--_stack-gap:var(--forge-stack-gap, var(--forge-spacing-medium, 16px));--_stack-height:var(--forge-stack-height);--_stack-stretch:var(--forge-stack-stretch, initial);--_stack-alignment:var(--forge-stack-alignment, normal);--_stack-justify:var(--forge-stack-justify, normal);--_stack-wrap:var(--forge-stack-wrap, wrap)}.forge-stack ::slotted(*){flex:var(--_stack-stretch)}:host([inline]) .forge-stack{flex-direction:row}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host(:not([inline])) .forge-stack{--_stack-height:var(--forge-stack-height, 100%)}:host([stretch]) ::slotted(*){--_stack-stretch:var(--forge-stack-stretch, 1)}:host([alignment=start]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, start)}:host([alignment=center]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, center)}:host([alignment=end]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, end)}:host([justify=start]) .forge-stack{--_stack-justify:var(--forge-stack-justify, start)}:host([justify=center]) .forge-stack{--_stack-justify:var(--forge-stack-justify, center)}:host([justify=end]) .forge-stack{--_stack-justify:var(--forge-stack-justify, end)}",_e=class extends M{static get observedAttributes(){return Object.values(W2.observedAttributes)}constructor(){super(),H(this,wb,ub),this._core=new z4(new M4(this))}attributeChangedCallback(t,e,o){switch(t){case W2.observedAttributes.INLINE:this.inline=p(o);break;case W2.observedAttributes.WRAP:this.wrap=p(o);break;case W2.observedAttributes.STRETCH:this.stretch=p(o);break;case W2.observedAttributes.GAP:this.gap=o;break;case W2.observedAttributes.ALIGNMENT:this.alignment=o;break;case W2.observedAttributes.JUSTIFY:this.justify=o;break}}};i([c()],_e.prototype,"inline",2),i([c()],_e.prototype,"wrap",2),i([c()],_e.prototype,"stretch",2),i([c()],_e.prototype,"gap",2),i([c()],_e.prototype,"alignment",2),i([c()],_e.prototype,"justify",2),_e=i([y({name:W2.elementName})],_e);function em(){f(_e)}var H4=`${b}step`,po={STEP:"forge-step",STEP_CONTAINER:"container",ERROR:"error",SELECTED:"selected",COMPLETED:"completed",EDITABLE:"editable",ALTERNATIVE:"alternative",ICON_CONTENT:"icon-content",ICON:"icon",LABEL_CONTAINER:"label-container",LABEL:"label",OPTIONAL_LABEL:"optional-label",INDEX:"index",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",EXPANSION_PANEL:"expansion-panel",EXPANSION_ICON:"expanded-icon",EXPANSION_ICON_EXPANDED:"expanded-icon--expanded",EXPANSION_CONTENT:"expansion-content"},_b={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},xb={STEP:`.${po.STEP}`,STEP_CONTAINER:`.${po.STEP_CONTAINER}`,INDEX:`.${po.INDEX}`,ICON:`.${po.ICON}`,ICON_CONTENT:`.${po.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${po.EXPANSION_PANEL}`,EXPANSION_ICON:`.${po.EXPANSION_ICON}`},fb={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},bb={SELECT:`${H4}-select`,EXPANDED_CONTENT_FOCUSIN:`${H4}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${H4}-expanded-content-focusout`},k={elementName:H4,classes:po,selectors:xb,attributes:_b,events:bb,strings:fb};var I4=class extends I{constructor(t){super(t),this._stepContainer=w(t,k.selectors.STEP),this._container=w(t,k.selectors.STEP_CONTAINER),this._stateLayerElement=w(this._component,I1.elementName)}get component(){return this._component}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","tab")}setIndex(t){this._stepContainer.querySelector(k.selectors.INDEX).innerHTML=(t+1||"").toString()}toggleRootClass(t,e){f2(this._stepContainer,e,t)}toggleDisabled(t){f2(this._stepContainer,t,k.classes.DISABLED),G(this._component,t,"aria-disabled"),this._stateLayerElement.disabled=t}toggleIcon(t,e){let o=this._stepContainer.querySelector(k.selectors.INDEX),a=this._stepContainer.querySelector(k.selectors.ICON);if(!e){o.style.display="inherit",a.style.display="none";return}o.style.display="none",a.style.display="inherit",a.name=t}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}setSlotListener(t){this._expansionSlot.addEventListener("slotchange",t)}removeSlotListener(t){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",t)}setExpanded(t){this._expansionPanel&&(this._expansionPanel.open=t,G(this._expansionPanel,!t,"tabindex","-1")),f2(this._stepContainer,t,k.classes.EXPANDED)}setExpansionPanelAnimations(t){this._expansionPanel.animationType=t?"default":"none"}addExpansionPanel(){this._container.querySelector(k.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(k.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let t=this._container.querySelector(k.selectors.EXPANSION_PANEL);t&&this._container.removeChild(t)}addExpansionIcon(){this._stepContainer.querySelector(k.selectors.EXPANSION_ICON)||this._stepContainer.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let t=this._stepContainer.querySelector(k.selectors.EXPANSION_ICON);t&&this._stepContainer.removeChild(t)}addExpansionPanelListener(t,e){this._expansionPanel.addEventListener(t,e)}removeExpansionPanelListener(t,e){this._expansionPanel&&this._expansionPanel.removeEventListener(t,e)}isExpandedContentInFocus(t){return this._expansionSlot.assignedElements().some(e=>e.contains(t||document.activeElement))}_createExpansionPanel(){let t=document.createElement("forge-expansion-panel");t.animationType="none",t.setAttribute("part","expansion-panel"),H1(k.classes.EXPANSION_PANEL,t);let e=document.createElement("slot");return e.setAttribute("name","expansion-content"),H1(k.classes.EXPANSION_CONTENT,e),t.appendChild(e),t}_createExpansionIcon(){let t=document.createElement("forge-icon");return H1(k.classes.EXPANSION_ICON,t),t.name="keyboard_arrow_down",t.setAttribute("part","expanded-icon"),t}};var L4=class{constructor(t){this._adapter=t;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(t){this._index!==t&&(this._index=t,this._applyIndex(),this._adapter.setHostAttribute(k.attributes.INDEX,t.toString()))}get editable(){return this._editable}set editable(t){this._editable!==t&&(this._editable=t,this._adapter.toggleHostAttribute(k.attributes.EDITABLE,t),this._applyEditable())}get completed(){return this._completed}set completed(t){this._completed!==t&&(this._completed=t,this._adapter.toggleHostAttribute(k.attributes.COMPLETED,t),this._applyCompleted())}get error(){return this._error}set error(t){this._error!==t&&(this._error=t,this._adapter.toggleHostAttribute(k.attributes.ERROR,t),this._applyError())}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.toggleHostAttribute(k.attributes.SELECTED,t),this._applySelected())}get alternative(){return this._alternative}set alternative(t){this._alternative!==t&&(this._alternative=t,this._adapter.toggleHostAttribute(k.attributes.ALTERNATIVE,t),this._applyAlternative())}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._applyDisabled()}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(t){t!==this._expanded&&(this._expanded=t,this._adapter.toggleHostAttribute(k.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(t){t!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=t)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(k.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(k.classes.VERTICAL,this._vertical)}_applyAlternative(){this._adapter.toggleRootClass(k.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(k.classes.SELECTED,this._selected),this._adapter.setHostAttribute(k.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.hostElement.tabIndex=this._selected?0:-1,this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(k.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(k.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(k.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(k.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(t){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(k.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(k.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(k.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(t){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(t.target)&&(this._adapter.emitHostEvent(k.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(t){t.relatedTarget&&!this._adapter.isExpandedContentInFocus(t.relatedTarget)&&(this._adapter.emitHostEvent(k.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var yb='<template><div class="container" part="root"><div class="forge-step" part="step"><div class="before" part="before"></div><div class="icon-container" part="icon-container"><div class="icon-content" part="icon-content"><span class="index" part="index"></span><forge-icon class="icon" part="icon"></forge-icon></div></div><div class="text-container" part="text-container"><div class="title" part="title-container"><slot></slot></div><div class="subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></div></template>',Mb=':host{--_step-primary-color:var(--forge-step-primary-color, var(--forge-theme-primary, #3f51b5));--_step-text-color:var(--forge-step-text-color, var(--forge-theme-on-primary, #ffffff));--_step-border-radius:var(--forge-step-border-radius, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)));--_step-border-radius-vertical:var(--forge-step-border-radius-vertical, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_step-disabled-text-color:var(--forge-step-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_step-disabled-color:var(--forge-step-disabled-color, var(--forge-theme-surface-container-minimum, #f5f5f5));--_step-icon-fill:var(--forge-step-icon-fill, unset);--_step-icon-fill-active:var(--forge-step-icon-fill-active, var(--_step-primary-color));--_step-icon-text-color:var(--forge-step-icon-text-color, var(--forge-theme-primary, #3f51b5));--_step-icon-text-color-active:var(--forge-step-icon-text-color-active, var(--forge-theme-on-primary, #ffffff));--_step-icon-content-size:var(--forge-step-icon-content-size, 24px);--_step-icon-size:var(--forge-step-icon-size, calc(var(--forge-typography-font-size, 1rem) * 0.875));--_step-icon-transition-duration:var(--forge-step-icon-transition-duration, var(--forge-animation-duration-medium4, 400ms));--_step-icon-transition-easing:var(--forge-step-icon-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_step-line-color:var(--forge-step-line-color, var(--forge-theme-outline, #e0e0e0));--_step-line-min-width:var(--forge-step-line-min-width, 10px);--_step-line-min-width-clustered:var(--forge-step-line-min-width-clustered, 25px);--_step-label-color:var(--forge-step-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_step-sub-label-color:var(--forge-step-sub-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_step-error-color:var(--forge-step-error-color, var(--forge-theme-error, #b00020));--_step-error-text-color:var(--forge-step-error-text-color, var(--forge-theme-on-error, #ffffff));--_step-expansion-panel-border-left-width:var(--forge-step-expansion-panel-border-left-width, 1px);--_step-expansion-panel-margin-bottom:var(--forge-step-expansion-panel-margin-bottom, 4px);--_step-expansion-panel-margin-left:var(--forge-step-expansion-panel-margin-left, 60px);--_step-expansion-panel-margin-top:var(--forge-step-expansion-panel-margin-top, 4px);--_step-expansion-panel-icon-color:var(--forge-step-expansion-panel-icon-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host(:focus){outline:0}:host([error]){--forge-state-layer-color:var(--_step-error-color)}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:is(:first-child)):host(:not([vertical]))::after{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host([vertical]){flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{--_step-border-radius:var(--_step-border-radius-vertical);width:100%;min-height:52px}:host([vertical]) .forge-step .text-container{white-space:normal}:host([vertical]) .icon-container .icon-content{margin:0 16px 0 0}:host([vertical]) .expansion-panel{display:none}:host([vertical]) .expanded-icon{color:var(--_step-expansion-panel-icon-color);display:none;margin-left:auto}:host([vertical][expandable]) .expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step .expanded-icon{display:none}forge-expansion-panel::part(root){border-color:var(--_step-line-color);margin-left:var(--_step-expansion-panel-margin-left);margin-top:var(--_step-expansion-panel-margin-top);margin-bottom:var(--_step-expansion-panel-margin-bottom);border-left-width:var(--_step-expansion-panel-border-left-width);border-left-style:solid}forge-focus-indicator{--forge-focus-indicator-color:var(--_step-primary-color);--forge-focus-indicator-shape:16px}.container{display:contents}.forge-step{-webkit-tap-highlight-color:transparent;padding:12px 16px;outline:0;background:0 0;border:none;border-radius:var(--_step-border-radius);position:relative;display:flex;overflow:hidden;align-items:center;box-sizing:border-box;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step.error forge-focus-indicator{--forge-focus-indicator-color:var(--_step-error-color)}.forge-step.vertical forge-focus-indicator{--forge-focus-indicator-shape:4px}.forge-step.selected:not(.disabled){--forge-state-layer-color:var(--_step-primary-color)}.forge-step.selected:not(.disabled)::before{background-color:var(--_step-primary-color);content:"";position:absolute;inset:0;opacity:.08;height:100%;width:100%}.forge-step.selected:not(.disabled).error{--_step-primary-color:var(--_step-error-color)}.forge-step .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--_step-label-color);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle ::slotted(*){color:var(--_step-sub-label-color);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.forge-step .icon-container .icon-content{color:var(--_step-icon-text-color);background-color:var(--_step-icon-fill);height:var(--_step-icon-content-size);width:var(--_step-icon-content-size);border-style:solid;border-width:2px;border-color:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color var(--_step-icon-transition-duration) var(--_step-icon-transition-easing);margin:0 8px 0 0;flex:none}.forge-step .icon-container .icon-content forge-icon{font-size:var(--_step-icon-size)}.forge-step.disabled{color:var(--_step-disabled-text-color);cursor:not-allowed}.forge-step.disabled.forge-step .icon-container .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .title{color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .subtitle ::slotted(*){color:var(--_step-disabled-text-color)}.forge-step.alternative{flex-direction:column}.forge-step.alternative .icon-container .icon-content{margin:0}.forge-step.alternative .text-container{margin-top:8px;place-items:center}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content{border-color:var(--_step-primary-color)}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content .index,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content .index{color:var(--_step-primary-color)}.forge-step.selected.disabled .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.selected:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.selected:not(.disabled) .title{color:var(--_step-primary-color);font-weight:500}.forge-step.selected:not(.disabled) .subtitle ::slotted(*){color:var(--_step-primary-color);font-weight:500}.forge-step.error:not(.disabled) .title{color:var(--_step-error-color)}.forge-step.error:not(.disabled) .subtitle ::slotted(*){color:var(--_step-error-color)}.forge-step.error:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-error-color);--_step-icon-text-color:var(--_step-error-text-color)}.forge-step.completed:not(.disabled):not(.error):not(.editable) .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.completed:not(.disabled):not(.error).editable .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.expandable .expanded-icon{display:inline-block;transition:transform .3s ease-in-out}.forge-step.expandable.expanded .expanded-icon{transform:rotate(180deg)}.forge-step.expandable .icon-container .icon-content{margin:0 16px 0 0}.forge-step .text-container{display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:not(:last-child)[clustered])::after{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:last-child[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}',Z2=class extends M{static get observedAttributes(){return[k.attributes.COMPLETED,k.attributes.EDITABLE,k.attributes.ERROR,k.attributes.INDEX,k.attributes.SELECTED,k.attributes.ALTERNATIVE,k.attributes.DISABLED,k.attributes.VERTICAL,k.attributes.EXPANDED,k.attributes.IGNORE_USER_EXPANSION]}constructor(){super(),X.define([yl,vl,Il,cl,h0]),H(this,yb,Mb),this._core=new L4(new I4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case k.attributes.INDEX:this.index=K(o);break;case k.attributes.COMPLETED:this.completed=p(o);break;case k.attributes.EDITABLE:this.editable=p(o);break;case k.attributes.ERROR:this.error=p(o);break;case k.attributes.SELECTED:this.selected=p(o);break;case k.attributes.ALTERNATIVE:this.alternative=p(o);break;case k.attributes.DISABLED:this.disabled=p(o);break;case k.attributes.VERTICAL:this.vertical=p(o);break;case k.attributes.EXPANDED:this.expanded=p(o);break;case k.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=p(o);break}}};i([c()],Z2.prototype,"alternative",2),i([c()],Z2.prototype,"index",2),i([c()],Z2.prototype,"editable",2),i([c()],Z2.prototype,"completed",2),i([c()],Z2.prototype,"error",2),i([c()],Z2.prototype,"selected",2),i([c()],Z2.prototype,"disabled",2),i([c()],Z2.prototype,"vertical",2),i([c()],Z2.prototype,"expanded",2),i([c()],Z2.prototype,"ignoreUserExpansion",2),Z2=i([y({name:k.elementName,dependencies:[j,tt,r1,J]})],Z2);function om(){f(Z2)}var zb=`${b}stepper`,am={STEPPER:"forge-stepper",LINEAR:"linear",ALTERNATIVE:"alternative",CLUSTERED:"clustered",FIXED:"fixed",ALIGN_LEFT:"align-left",ALIGN_CENTER:"align-center",ALIGN_RIGHT:"align-right",VERTICAL:"vertical",FOCUSED:"focused"},Hb={STEPPER:`.${am.STEPPER}`},Ib={SELECTED_INDEX:"selected-index",LINEAR:"linear",ALTERNATIVE:"alternative",LAYOUT_MODE:"layout-mode",LAYOUT_ALIGN:"layout-align",DISABLED:"disabled",VERTICAL:"vertical"},yt={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_KEY:"Tab"},Wo={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,HOME_KEYCODE:36,ENTER_KEYCODE:13,SPACE_KEYCODE:32},Lb=[yt.ARROW_LEFT_KEY,yt.ARROW_RIGHT_KEY,yt.ARROW_DOWN_KEY,yt.ARROW_UP_KEY,yt.END_KEY,yt.HOME_KEY,yt.ENTER_KEY,yt.SPACE_KEY,yt.TAB_KEY],Vb={[Wo.ARROW_LEFT_KEYCODE]:yt.ARROW_LEFT_KEY,[Wo.ARROW_RIGHT_KEYCODE]:yt.ARROW_RIGHT_KEY,[Wo.END_KEYCODE]:yt.END_KEY,[Wo.HOME_KEYCODE]:yt.HOME_KEY,[Wo.ENTER_KEYCODE]:yt.ENTER_KEY,[Wo.SPACE_KEYCODE]:yt.SPACE_KEY},F={elementName:zb,classes:am,selectors:Hb,attributes:Ib,numbers:Wo,strings:yt,ACCEPTABLE_KEYS:Lb,KEYCODE_MAP:Vb};var L0=class n{static createStepElement(t,e,o){var s,r;let a=document.createElement(k.elementName);return a.index=e,a.completed=t.completed||!1,a.editable=t.editable||!1,a.selected=o.selectedIndex===e,a.alternative=o.alternative,a.error=t.error||!1,a.disabled=t.disabled||!1,a.vertical=(r=(s=t.vertical)!=null?s:o.vertical)!=null?r:!1,a.ignoreUserExpansion=t.ignoreUserExpansion||!1,a.expanded=t.expanded||!1,o.linear&&e>o.selectedIndex&&(a.tabIndex=-1),a.textContent=t.label,t.optionalLabel&&a.appendChild(this.createStepOptionalLabel(t.optionalLabel)),a}static createStepOptionalLabel(t){let e=document.createElement("span");return e.slot="optional",e.textContent=t||"",e}static setLinearState(t,e){let o=t.classList.contains(F.classes.LINEAR);o&&!e&&(t.classList.remove(F.classes.LINEAR),o=!1),!o&&e&&t.classList.add(F.classes.LINEAR)}static setAlternativeState(t,e){let o=t.classList.contains(F.classes.ALTERNATIVE);o&&!e&&(t.classList.remove(F.classes.ALTERNATIVE),o=!1),!o&&e&&t.classList.add(F.classes.ALTERNATIVE)}static setLayoutMode(t,e){switch(e){case"clustered":t.classList.contains(F.classes.FIXED)&&t.classList.remove(F.classes.FIXED),t.classList.add(F.classes.CLUSTERED);break;case"fixed":t.classList.contains(F.classes.CLUSTERED)&&t.classList.remove(F.classes.CLUSTERED),t.classList.add(F.classes.FIXED);break}}static setLayoutAlign(t,e){switch(t.classList.contains(F.classes.ALIGN_LEFT)&&t.classList.remove(F.classes.ALIGN_LEFT),t.classList.contains(F.classes.ALIGN_CENTER)&&t.classList.remove(F.classes.ALIGN_CENTER),t.classList.contains(F.classes.ALIGN_RIGHT)&&t.classList.remove(F.classes.ALIGN_RIGHT),e){case"left":t.classList.add(F.classes.ALIGN_LEFT);break;case"center":t.classList.add(F.classes.ALIGN_CENTER);break;case"right":t.classList.add(F.classes.ALIGN_RIGHT);break}}static createSteps(t){let e=[];return t.steps.forEach((o,a)=>{let s=n.createStepElement(o,a,t);e.push(s)}),e[0].setAttribute(k.attributes.FIRST,""),e[e.length-1].setAttribute(k.attributes.LAST,""),e}};var V4=class extends I{constructor(t){super(t),this._rootElement=w(t,F.selectors.STEPPER),this._slotElement=this._rootElement.querySelector("slot")}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","tablist")}patchSafari(){this._applyToSteps(t=>t.setAttribute("safari",""))}addSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}getLastStep(){let t=this._getSteps();return t.item(t.length-1)}setSelected(t){this._getSteps().forEach(e=>{e===t?e.selected=!0:e.selected=!1})}assignIndices(){this._getSteps().forEach((e,o)=>{e.index=o})}assignFirstLastStep(){let t=this._getSteps();t&&t.length>1&&(t[0].setAttribute("first",""),t[t.length-1].setAttribute("last",""))}setLayoutAlign(t){L0.setLayoutAlign(this._rootElement,t)}setLayoutMode(t){L0.setLayoutMode(this._rootElement,t),this._applyToSteps(e=>e.setAttribute(k.attributes.CLUSTERED,""))}setAlternativeState(t){L0.setAlternativeState(this._rootElement,t),this._applyToSteps(e=>e.alternative=t)}setVertical(t){f2(this._rootElement,t,F.classes.VERTICAL),this._applyToSteps(e=>e.vertical=t)}setLinearState(t){L0.setLinearState(this._rootElement,t)}removeRootListener(t,e){this._rootElement.removeEventListener("click",e)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}setSelectedByIndex(t){this._applyToSteps(e=>{e.selected&&e.index!==t&&(e.selected=!1),e.index===t&&(e.selected=!0)})}applyConfiguredSteps(t){this._component.querySelectorAll(k.elementName).forEach(e=>{this._component.removeChild(e)}),t.forEach(e=>this._component.appendChild(e))}tryGetFocusedStep(){let t;return this._applyToSteps(e=>{e.matches(":focus-within")&&(t=e)}),t}getFocusedOrSelectedStep(){let t=this.tryGetFocusedStep();return t||(t=this._getSteps()[0],t.focus()),t}getStep(t){let e=0,o=this._getSteps();return t<0?o.item(o.length-1):(o.length>t&&(e=t),o.item(e))}toggleDisabled(t){this._applyToSteps(e=>e.disabled=t)}toggleRootClass(t,e){f2(this._rootElement,e,t)}isStepperFocused(){return this._rootElement.classList.contains(F.classes.FOCUSED)}setStepsListener(t,e){this._applyToSteps(o=>o.addEventListener(t,e))}removeStepsListener(t,e){this._applyToSteps(o=>o.removeEventListener(t,e))}_applyToSteps(t){this._getSteps().forEach(t)}_getSteps(){return this._component.querySelectorAll(k.elementName)}};var C4=class{constructor(t){this._adapter=t;this._steps=[];this._selectedIndex=0;this._linear=!1;this._alternative=!1;this._layoutMode="fixed";this._layoutAlign="center";this._initialize=!1;this._clickListener=e=>this._handleClick(e),this._keyListener=e=>this._onKeydown(e),this._stepFocusListener=()=>this._onStepFocus(),this._stepBlurListener=()=>this._onStepBlur(),this._stepExpandedContentFocusInListener=e=>this._onStepExpandedContentFocusIn(e),this._stepExpandedContentFocusOutListener=e=>this._onStepExpandedContentFocusOut(e),this._slotChangeListener=e=>this._onSlotChange(e)}initialize(){this._adapter.initializeAccessibility(),this._adapter.assignIndices(),this._adapter.setLinearState(this._linear),this._adapter.setAlternativeState(this._alternative),this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setLayoutMode(this._layoutMode),this._adapter.addRootListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keyListener),this._adapter.assignFirstLastStep(),this._adapter.addRootListener(k.events.EXPANDED_CONTENT_FOCUSIN,this._stepExpandedContentFocusInListener),this._adapter.addRootListener(k.events.EXPANDED_CONTENT_FOCUSOUT,this._stepExpandedContentFocusOutListener),this._applySelectedIndex(),this._patchBrowser(),this._adapter.setStepsListener("blur",this._stepBlurListener),this._adapter.setStepsListener("focus",this._stepFocusListener),this._initialize||this._adapter.addSlotChangeListener(this._slotChangeListener),this._initialize=!0}destroy(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keyListener),this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.removeStepsListener("blur",this._stepBlurListener),this._adapter.removeStepsListener("focus",this._stepFocusListener)}get steps(){return this._steps.map(t=>d({},t))}set steps(t){if(Array.isArray(t)&&t.length>0)this._steps=[...t.map(e=>d({},e))];else{this._steps=[];return}this._renderConfiguration()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){if(!O(t))t=0;else if(!O2(t)){let e=Number(t);t=isNaN(e)?0:e}this._selectedIndex!==t&&(this._selectedIndex=t,this._adapter.setHostAttribute(F.attributes.SELECTED_INDEX,this._selectedIndex.toString()),this._applySelectedIndex())}get linear(){return this._linear}set linear(t){t=!!t,this._linear!==t&&(this._linear=t,this._adapter.setLinearState(this._linear),this._adapter.setHostAttribute(F.attributes.LINEAR,this._linear.toString()))}get alternative(){return this._alternative}set alternative(t){t=!!t,this._alternative!==t&&(this._alternative=t,this._adapter.setAlternativeState(this._alternative),this._adapter.setHostAttribute(F.attributes.ALTERNATIVE,this._alternative.toString()))}get layoutMode(){return this._layoutMode}set layoutMode(t){/^(fixed|clustered)$/.test(t)&&this._layoutMode!==t&&(this._layoutMode=t,this._adapter.setHostAttribute(F.attributes.LAYOUT_MODE,this._layoutMode),this._adapter.setLayoutMode(this._layoutMode))}get layoutAlign(){return this._layoutAlign}set layoutAlign(t){/^(left|center|right)$/.test(t)&&this._layoutAlign!==t&&(this._layoutAlign=t,this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setHostAttribute(F.attributes.LAYOUT_ALIGN,this._layoutAlign))}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._applyDisabled())}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._adapter.toggleHostAttribute(F.attributes.VERTICAL,this._vertical))}_applyVertical(){this._adapter.setVertical(this._vertical)}_applyDisabled(){this._disabled?this._adapter.setHostAttribute(F.attributes.DISABLED,"disabled"):this._adapter.removeHostAttribute(F.attributes.DISABLED),this._adapter.toggleDisabled(this._disabled)}_applySelectedIndex(){this._adapter.setSelectedByIndex(this._selectedIndex)}_handleClick(t){if(t.preventDefault(),this._linear)return;let o=C2(t).filter(a=>a.nodeType===Node.ELEMENT_NODE).find(a=>a.matches(k.elementName));o&&!o.selected&&!o.disabled&&this._adapter.emitHostEvent(k.events.SELECT,o.index,!0,!0)&&(this._adapter.setSelected(o),this.selectedIndex=o.index)}_renderConfiguration(){let t=L0.createSteps({steps:this._steps,vertical:this._vertical,selectedIndex:this._selectedIndex,alternative:this._alternative,layoutAlign:this._layoutAlign,layoutMode:this._layoutMode,linear:this._linear});this.destroy(),this._adapter.applyConfiguredSteps(t),this.initialize()}_onKeydown(t){var a;if(this._linear)return;let e=this._getKeyFromEvent(t);if(!this._adapter.isStepperFocused()||!e)return;if([k.strings.HOME_KEY,k.strings.END_KEY,k.strings.ARROW_DOWN_KEY,F.strings.ARROW_UP_KEY,F.strings.ENTER_KEY,F.strings.SPACE_KEY].includes(e)&&t.preventDefault(),[F.strings.ENTER_KEY,F.strings.SPACE_KEY].includes(e)){(a=this._adapter.getFocusedOrSelectedStep())==null||a.click();return}let o=this._vertical?this._determineVerticalMoveTarget(e):this._determineMoveTarget(e);o&&this._moveFocusTo(o)}_moveFocusTo(t){t.focus()}_getKeyFromEvent(t){return F.ACCEPTABLE_KEYS.includes(t.key)?t.key:F.KEYCODE_MAP[t.keyCode]}_determineMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case F.strings.ARROW_RIGHT_KEY:return this._adapter.getStep(e.index+1);case F.strings.ARROW_LEFT_KEY:return this._adapter.getStep(e.index-1);case F.strings.HOME_KEY:return this._adapter.getStep(0);case F.strings.END_KEY:return this._adapter.getLastStep()}return e}_determineVerticalMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case F.strings.ARROW_DOWN_KEY:return this._adapter.getStep(e.index+1);case F.strings.ARROW_UP_KEY:return this._adapter.getStep(e.index-1);case F.strings.HOME_KEY:return this._adapter.getStep(0);case F.strings.END_KEY:return this._adapter.getLastStep()}return e}_onSlotChange(t){this.destroy(),this.initialize()}_onStepExpandedContentFocusIn(t){let e=this._adapter.getStep(t.detail.index+1);e&&(e.tabIndex=0),t.detail.tabIndex=0}_onStepExpandedContentFocusOut(t){let e=t.target,o=this._adapter.getStep(e.index+1);o&&(o.tabIndex=-1),e.tabIndex=-1}_onStepFocus(){this._adapter.toggleRootClass(F.classes.FOCUSED,!0)}_onStepBlur(){this._adapter.toggleRootClass(F.classes.FOCUSED,!1)}_patchBrowser(){new Q2().SAFARI()&&this._adapter.patchSafari()}};var Cb='<template><div class="forge-stepper" part="root"><slot></slot></div></template>',Eb=":host{display:block}:host([hidden]){display:none}:host([vertical]) .forge-stepper{display:unset;align-items:unset;white-space:unset;overflow:unset}.forge-stepper{display:flex;align-items:center;white-space:nowrap;overflow:hidden}.forge-stepper:not(.vertical) ::slotted(*){display:flex;align-items:center;position:relative;min-width:112px}.forge-stepper.fixed ::slotted(*){flex:1}.forge-stepper.alternative{align-items:flex-start}.forge-stepper.alternative ::slotted(*){min-width:160px}.forge-stepper.align-left{justify-content:flex-start}.forge-stepper.align-center{justify-content:center}.forge-stepper.align-right{justify-content:flex-end}",Nt=class extends M{static get observedAttributes(){return[F.attributes.SELECTED_INDEX,F.attributes.LINEAR,F.attributes.ALTERNATIVE,F.attributes.LAYOUT_MODE,F.attributes.LAYOUT_ALIGN,F.attributes.DISABLED,F.attributes.VERTICAL]}constructor(){super(),H(this,Cb,Eb),this._core=new C4(new V4(this))}async connectedCallback(){await Ko(this),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case F.attributes.SELECTED_INDEX:this.selectedIndex=Number(o)||0;break;case F.attributes.LINEAR:this.linear=p(o);break;case F.attributes.ALTERNATIVE:this.alternative=p(o);break;case F.attributes.LAYOUT_MODE:this.layoutMode=o;break;case F.attributes.LAYOUT_ALIGN:this.layoutAlign=o;break;case F.attributes.DISABLED:this.disabled=p(o);break;case F.attributes.VERTICAL:this.vertical=p(o);break}}};i([c()],Nt.prototype,"steps",2),i([c()],Nt.prototype,"selectedIndex",2),i([c()],Nt.prototype,"linear",2),i([c()],Nt.prototype,"alternative",2),i([c()],Nt.prototype,"layoutMode",2),i([c()],Nt.prototype,"layoutAlign",2),i([c()],Nt.prototype,"disabled",2),i([c()],Nt.prototype,"vertical",2),Nt=i([y({name:F.elementName,dependencies:[Z2]})],Nt);function nm(){f(Nt)}var Se=`${b}table`,sm={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},Bb={TABLE:".forge-table",CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",ROW_SELECTED:`.${sm.TABLE_BODY_ROW_SELECTED}`},Ab={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation",SELECT_CHECKBOX:"forge-table-row-select-checkbox"},Tb={ROW_CLICK:`${Se}-row-click`,SELECT:`${Se}-select`,SELECT_DOUBLE:`${Se}-select-double`,SELECT_ALL:`${Se}-select-all`,SORT:`${Se}-sort`,FILTER:`${Se}-filter`,INITIALIZED:`${Se}-initialized`,COLUMN_RESIZE:`${Se}-column-resize`,BEFORE_BODY_RENDERED:`${Se}-before-body-rendered`,BODY_RENDERED:`${Se}-body-rendered`},Sb={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},kb={SORT_DOWN:"arrow_downward"},Ob={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},_={elementName:Se,classes:sm,selectors:Bb,attributes:Ab,events:Tb,strings:Sb,icons:kb,numbers:Ob};var E4=(o=>(o.Left="left",o.Right="right",o.Center="center",o))(E4||{}),B4=(o=>(o.Ascending="ASC",o.Descending="DESC",o.Unset="UNSET",o))(B4||{}),Db=(r=>(r.InputText="text",r.InputNumber="number",r.Select="select",r.SelectMultiple="select-multiple",r.Date="date",r.DateRange="date-range",r))(Db||{});function rm(n){return n&&typeof n=="object"&&"content"in n}var A1=class n{static createTable(t){n._resetTable(t.tableElement);let e=n._createTableHead(t),o=n._createTableBody(t);t.clickListener&&(n._attachRowClickListeners(o,t.clickListener,t.doubleClickListener),n._addRowClickAttributes(o)),t.fixedHeaders&&n.setFixedHeaders(t),t.resizable&&n.setResizable(t),t.dense&&n.setDenseState(t.tableElement,t.dense),t.wrapContent&&n.setWrapContentState(t.tableElement,t.wrapContent),t.selectListener&&n._addSelectColumn(e,o,t.selectListener,t.selectAllListener,t.selectAllTemplate,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),(t.resizable||t.columnConfigurations.some(a=>!!a.sortable))&&(n._attachHeadRowMouseDownListener(e,t.headRowMouseDownListener),n._isMac()&&n._attachHeadRowContextMenuListener(e,t.headRowContextMenuListener)),n.setLayoutType(t),n._setTableHead(t.tableElement,e),t.filter&&n.setFilterRow(t),n._setTableBody(t.tableElement,o)}static _setTableHead(t,e){t.tHead?s0(e,t.tHead):t.appendChild(e)}static _setTableBody(t,e){t.tBodies.length?s0(e,t.tBodies[0]):t.appendChild(e)}static recreateTableBody(t){let e=n._createTableBody(t);t.clickListener&&(n._attachRowClickListeners(e,t.clickListener,t.doubleClickListener),n._addRowClickAttributes(e)),t.selectListener&&(n._createBodySelectColumn(e,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),n._attachRowSelectListeners(e,t.selectListener)),n._setTableBody(t.tableElement,e)}static _resetTable(t){n2(t)}static _createMultisortTooltip(){let t=document.createElement("forge-tooltip");return t.textContent="Ctrl + click to sort multiple columns",t.placement="bottom",t.delay=0,t}static _createTableHead(t){let e=document.createElement("thead"),o=e.insertRow();H1([_.classes.TABLE_ROW,_.classes.TABLE_HEAD_ROW],o);let a=!1;for(let s=0;s<t.columnConfigurations.length;s++){let r=t.columnConfigurations[s],l=document.createElement("th");l.scope="col",H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],l);let h;if(r.sortable?(h=document.createElement("button"),h.type="button",h.addEventListener("keydown",t.sortableHeadCellKeydownListener)):h=document.createElement("div"),h.classList.add(_.classes.TABLE_HEAD_CELL_CONTAINER),t.multiColumnSort){let v=n._createMultisortTooltip();h.appendChild(v)}if(r.align&&n._setCellAlignmentClass(h,r.align),O(r.width)){let v=j4(r.width);v&&(l.style.width=v)}if(t.resizable&&r.resizable!==!1){let v=document.createElement("div");v.classList.add(_.classes.TABLE_RESIZE_HANDLE),l.appendChild(v)}if(O(r.headerCellStyle)&&vt(r.headerCellStyle)&&(Object.assign(l.style,r.headerCellStyle),Object.assign(h.style,r.headerCellStyle)),r.sortable){l.classList.add(_.classes.TABLE_HEAD_CELL_SORTABLE);let v=document.createElement("span");H1([_.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,_.classes.TABLE_HEAD_CELL_SORT_ORDER],v);let m=document.createElement(p1.elementName);m.name=_.icons.SORT_DOWN,H1([_.classes.TABLE_HEAD_CELL_SORT_ICON],m),t.multiColumnSort?typeof r.initialSort=="object"&&r.initialSort.sortOrder&&(v.textContent=r.initialSort.sortOrder.toString(),t.columnConfigurations.filter(u=>typeof u.initialSort=="object").length>1&&ye(_.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,v),l.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),m.classList.add(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(l,r.initialSort.direction)):t.sortedColumn===s&&!a&&!t.multiColumnSort&&(l.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),m.classList.add(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(l,t.sortDirection),a=!0),h.appendChild(m),h.appendChild(v)}if(typeof r.headerTemplate=="function")Promise.resolve(r.headerTemplate(s,h,r)).then(v=>{if(v){let m=document.createElement("div");H1(_.classes.TABLE_CELL_CONTAINER,m),typeof v=="string"?m.innerHTML=v:n._prepend(v,m),m.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE,""),n._prepend(m,h)}});else{let v=document.createElement("span");v.classList.add(_.classes.TABLE_HEAD_CELL_TEXT),v.textContent=r.header&&typeof r.header=="string"?r.header.trim():"",v.textContent.trim().length===0&&l.setAttribute("aria-hidden","true"),n._prepend(v,h)}l.appendChild(h),o.appendChild(l)}return e}static setSortDirection(t,e,o){let a=n._getHeaderCellByIndex(t,e);t.querySelectorAll("th[aria-sort]").forEach(s=>s.removeAttribute("aria-sort")),n._setColumnSortDirection(a,o)}static _setColumnSortDirection(t,e){t.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&t.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),t.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&t.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!e||e==="DESC"?(t.setAttribute("aria-sort","descending"),t.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(t.setAttribute("aria-sort","ascending"),t.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(t){let e=document.createElement("tbody");return n._getOrderedRowData(t.columnConfigurations,t.data).forEach((a,s)=>{let r=e.insertRow();H1([_.classes.TABLE_ROW,_.classes.TABLE_BODY_ROW],r),n._populateRowCells(t,r,a,s),typeof t.rowCreatedCallback=="function"&&t.rowCreatedCallback(r,s,d({},t.data[s].data))}),e}static _populateRowCells(t,e,o,a){for(let s=0;s<o.length;s++){let r=t.columnConfigurations[s],l=e.insertCell();if(H1([_.classes.TABLE_CELL,_.classes.TABLE_BODY_CELL],l),O(r.width)){let v=j4(r.width);v&&(l.style.width=v)}let h=document.createElement("div");if(h.classList.add(_.classes.TABLE_CELL_CONTAINER),O(r.cellStyle)&&vt(r.cellStyle)&&(Object.assign(l.style,r.cellStyle),Object.assign(h.style,r.cellStyle)),r.template&&typeof r.template=="function"){let v=t.data[a]?t.data[a].data:void 0;Promise.resolve(r.template(a,h,v,s)).then(m=>{let u=rm(m)?m:{content:m,stopClickPropagation:r.stopCellTemplateClickPropagation};u.content&&(typeof u.content=="string"?h.innerHTML=u.content:h.appendChild(u.content),h.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&h.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(r.property){let v=document.createElement("span");v.classList.add(_.classes.TABLE_CELL_CONTAINER_TEXT),h.appendChild(v),r.transform&&typeof r.transform=="function"?Promise.resolve(r.transform(o[s])).then(m=>v.textContent=m):o[s]==null?v.textContent="":v.textContent=o[s].toString()}if(r.align&&n._setCellAlignmentClass(h,r.align),l.appendChild(h),O(r.columnSpan)){if(r.columnSpan==="all"){l.colSpan=o.length-s;break}else if(typeof r.columnSpan=="number"&&r.columnSpan>0){let v=r.columnSpan;r.columnSpan>o.length-s&&(v=o.length),l.colSpan=v,s=s+(v-1)}}typeof t.cellCreatedCallback=="function"&&t.cellCreatedCallback(l,a,s)}}static _setCellAlignmentClass(t,e){switch(e){case"center":t.classList.add(_.classes.TABLE_CELL_CENTER);break;case"right":t.classList.add(_.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(t){return Array.from(t).filter(e=>!e.classList.contains(_.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(t){return Array.from(t).filter(e=>e.classList.contains(_.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(t,e){return t.map(o=>({config:o,data:e.map(a=>{if(o.property){let s=P3(a.data,o.property);return O(s)?s:null}return null})}))}static _getOrderedRowData(t,e){let o=n._createColumnDataMap(t,e),a=[];for(let s of o)for(let r=0;r<s.data.length;r++)a[r]||(a[r]=[]),a[r].push(s.data[r]);return a}static _attachRowClickListeners(t,e,o){n._getNonExpandedRows(t.rows).forEach(s=>{s.addEventListener("click",e),o&&s.addEventListener("dblclick",o)})}static _addRowClickAttributes(t){n._getNonExpandedRows(t.rows).forEach(o=>{o.classList.add(_.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(t){n._getNonExpandedRows(t.rows).forEach(o=>{o.classList.remove(_.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(t,e){n._getNonExpandedRows(t.rows).forEach(a=>n._attachRowSelectListener(a,e))}static _attachRowSelectListener(t,e){let o=n._getCheckboxElement(t);o==null||o.addEventListener("change",e),o==null||o.addEventListener("keydown",e),o==null||o.addEventListener("pointerdown",e)}static _detachRowSelectListeners(t,e){Array.from(t.rows).forEach(o=>{let a=n._getCheckboxElement(o);a==null||a.removeEventListener("change",e),a==null||a.removeEventListener("keydown",e),a==null||a.removeEventListener("pointerdown",e)})}static _detachRowClickListeners(t,e,o){Array.from(t.rows).forEach(a=>{a.removeEventListener("click",e),a.removeEventListener("dblclick",o)})}static _attachSelectAllListener(t,e){let o=t.rows[t.rows.length-1],a=n._getCheckboxElement(o);if(!a)throw new Error("Checkbox element not found.");a.addEventListener("change",e)}static _tryAttachSelectAllTemplateListener(t,e){let o=t.rows[t.rows.length-1],a=n._tryGetSelectAllCheckboxElement(o);a&&a.addEventListener("change",e)}static _detachSelectAllListener(t,e){let o=t.rows[t.rows.length-1],a=n._tryGetSelectAllCheckboxElement(o);a&&a.removeEventListener("change",e)}static _attachHeadRowMouseDownListener(t,e){let o=t.rows[0];if(!o)throw new Error("Missing table header row. Unable to attach sort listener.");o.addEventListener("mousedown",e)}static _attachHeadRowContextMenuListener(t,e){let o=t.rows[0];if(!o)throw new Error("Missing table header row. Unable to attach sort listener.");o.addEventListener("contextmenu",e)}static _createSelectColumn(t,e,o,a,s,r,l,h,v){t&&n._createHeadSelectColumn(t,o,a,s,r,v),e&&n._createBodySelectColumn(e,r,l,h,v)}static _createHeadSelectColumn(t,e,o,a,s,r){var l;if(Array.from(t.rows).forEach(h=>{let v=document.createElement("th");H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],v),h.insertBefore(v,h.cells.item(0))}),e){let h=(l=t.rows.item(t.rows.length-1))==null?void 0:l.cells.item(0);h.classList.add(_.classes.TABLE_CELL_SELECT),typeof o=="function"?n._renderSelectAllTemplate(o,t).then(()=>{typeof a=="function"&&a()}):h==null||h.appendChild(n._createCheckboxElement(!0,s,null,null,null,r))}}static _createBodySelectColumn(t,e,o,a,s){if(n._getNonExpandedRows(t.rows).forEach((l,h)=>n._addRowSelectColumn(l,e,h,o[h],a,s)),t.rows.length){let l=t.rows.item(0);l&&n._updateExpandedRowColspan(t.rows,l.cells.length)}}static _addRowSelectColumn(t,e,o,a,s,r){let l=t.insertCell(0);H1([_.classes.TABLE_CELL,_.classes.TABLE_BODY_CELL,_.classes.TABLE_CELL_SELECT],l),l.appendChild(n._createCheckboxElement(!1,e,o,a,s,r))}static _destroySelectColumn(t,e){let o=n._getNonExpandedRows(e.rows);if(Array.from(t.rows).forEach(a=>a.removeChild(a.cells.item(0))),Array.from(o).forEach(a=>a.removeChild(a.cells.item(0))),e.rows.length){let a=e.rows.item(0);a&&n._updateExpandedRowColspan(e.rows,a.cells.length)}}static _hasSelectColumn(t,e){return[...Array.from(t.rows),...Array.from(e.rows)].some(a=>a.cells.item(0).classList.contains(_.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(t,e,o,a,s,r){let l=document.createElement("div");if(l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),e)switch(e){case"center":l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let h=document.createElement(T1.elementName);h.setAttribute(_.attributes.SELECT_CHECKBOX,""),l.appendChild(h);let v=m=>{let u=document.createElement("forge-tooltip");return u.placement="left",u.type="label",u.textContent=m,u};if(t)if(typeof r=="string"&&r.length){let u=v(r);l.appendChild(u)}else h.setAttribute("aria-label","Select all rows");else{let m=s||"";if(a&&typeof s=="function"&&(m=s.call(null,o,a.data)),typeof m=="string"&&m.length){let u=v(m);l.appendChild(u)}else h.setAttribute("aria-label","Select row")}return l}static _getCheckboxElement(t){let e=t.querySelector(`.${_.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(_.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(t){let e=t.querySelector(`.${_.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(_.selectors.CHECKBOX_INPUT)||e.querySelector(_.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(t,e){t&&(t.checked=e)}static _setIndeterminateCheckboxState(t,e){t&&(t.indeterminate=e)}static _setRowSelectedState(t,e){e?t.classList.contains(_.classes.TABLE_BODY_ROW_SELECTED)||t.classList.add(_.classes.TABLE_BODY_ROW_SELECTED):t.classList.remove(_.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(t,e){n._getExpandedRows(t).forEach(a=>{let s=a.cells.item(0);s&&(s.colSpan=e)})}static updateSelectedState(t,e){n._setRowSelectedState(t,e);let o=n._getCheckboxElement(t);o&&n._setSelectedCheckboxState(o,e)}static getRowByIndex(t,e){return n._getNonExpandedRows(t.tBodies[0].rows)[e]}static updateSelectAllState(t,e,o){if(!t.tHead)return;let a=t.tHead.rows[t.tHead.rows.length-1],s=n._tryGetSelectAllCheckboxElement(a);s&&(n._setSelectedCheckboxState(s,e),n._setIndeterminateCheckboxState(s,!!o))}static setSelectedRows(t,e,o,a,s=!1){if(!t.tBodies.length)return;s||n.clearSelectedRows(t);let r=t.tBodies[0].rows,l=0;a.length&&Array.from(r).forEach((h,v)=>{let m=o[v];if($n(a,xo(e,m))){n._setRowSelectedState(h,!0);let z=n._getCheckboxElement(h);z&&n._setSelectedCheckboxState(z,!0),l++}}),n.updateSelectAllState(t,l>0&&r.length===l)}static clearSelectedRows(t){if(!t.tBodies.length)return;n._getNonExpandedRows(t.tBodies[0].rows).forEach(o=>{n._setRowSelectedState(o,!1);let a=n._getCheckboxElement(o);a&&n._setSelectedCheckboxState(a,!1)})}static setSortedColumn(t,e,o){let a=n._getHeaderCellByIndex(t,e);n._getSortIconElementFromHeaderCell(a).classList.add(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(a,o)}static setMultiSortColumnSortNumber(t,e,o,a){let l=n._getHeaderCellByIndex(t,o).querySelector(`.${_.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${_.classes.TABLE_HEAD_CELL_SORT_ORDER}`);l&&(f2(l,typeof a!="number"||!e,_.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),a&&(l.textContent=a.toString()))}static removeColumnSort(t,e){let o=n._getHeaderCellByIndex(t,e);o.removeAttribute("aria-sort"),o.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&o.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),o.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&o.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let a=n._getSortIconElementFromHeaderCell(o);a&&a.classList.contains(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&a.classList.remove(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(t,e){if(!t.tHead)throw new Error("Table head element cannot be null.");return t.tHead.rows.item(0).cells.item(e)}static _getSortIconElementFromHeaderCell(t){return t.querySelector(`.${_.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(t,e,o,a,s,r,l,h,v){let m=t.tHead,u=t.tBodies[0];!m||!u||(e?n._addSelectColumn(m,u,o,a,s,r,l,h,v):n._hasSelectColumn(m,u)&&(o&&n._detachRowSelectListeners(u,o),a&&n._detachSelectAllListener(m,a),n._destroySelectColumn(m,u)))}static _addSelectColumn(t,e,o,a,s,r,l,h,v){n._createSelectColumn(t,e,!!a,s,()=>{a&&n._tryAttachSelectAllTemplateListener(t,a)},r,l,h,v),o&&n._attachRowSelectListeners(e,o),a&&!s&&n._tryAttachSelectAllTemplateListener(t,a)}static setDenseState(t,e){t.classList.contains(_.classes.TABLE_DENSE)&&t.classList.remove(_.classes.TABLE_DENSE),e&&t.classList.add(_.classes.TABLE_DENSE)}static setRoomyState(t,e){t.classList.contains(_.classes.TABLE_ROOMY)&&t.classList.remove(_.classes.TABLE_ROOMY),e&&t.classList.add(_.classes.TABLE_ROOMY)}static setResizable(t){let e=t.tableElement.tHead;t.resizable?(t.tableElement.classList.add(_.classes.TABLE_RESIZABLE),n._addResizeHandles(e,t)):(t.tableElement.classList.remove(_.classes.TABLE_RESIZABLE),n._removeResizeHandles(e,t))}static _addResizeHandles(t,e){if(!t)return;let o=t.rows.item(0);if(o){let a=Array.from(o.cells);e.selectListener&&(a=a.slice(1));for(let s of a){let r=a.indexOf(s);if(e.columnConfigurations[r].resizable!==!1){let h=document.createElement("div");h.classList.add(_.classes.TABLE_RESIZE_HANDLE),s.appendChild(h)}}}}static _removeResizeHandles(t,e){if(!t)return;let o=t.rows.item(0);if(o){let a=Array.from(o.cells);e.selectListener&&(a=a.slice(1));for(let s of a){let r=document.querySelector(`.${_.classes.TABLE_RESIZE_HANDLE}`);r&&s.removeChild(r)}}}static setWrapContentState(t,e){e?t.classList.remove(_.classes.TABLE_NO_WRAP_CONTENT):t.classList.add(_.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(t,e,o,a,s,r){let l=t.tHead;if(!l)return;!e&&o&&n._detachSelectAllListener(l,o);let v=l.rows[l.rows.length-1].cells.item(0);e?v.childElementCount||(v.classList.add(_.classes.TABLE_CELL_SELECT),a?n._renderSelectAllTemplate(a,l).then(()=>{o&&n._tryAttachSelectAllTemplateListener(l,o)}):v.appendChild(n._createCheckboxElement(!0,s||null,null,null,null,r)),o&&!a&&n._attachSelectAllListener(l,o)):(o&&n._detachSelectAllListener(l,o),n2(v))}static setFilterRow(t){if(!t.tableElement.tHead)return;let e=n._getFilterRowElement(t.tableElement.tHead),o;if(t.filter?t.tableElement.classList.add(_.classes.TABLE_FILTER_VISIBLE):t.tableElement.classList.remove(_.classes.TABLE_FILTER_VISIBLE),t.filter&&!e){if(t.columnConfigurations.every(s=>!s.filter))return;t.selectListener&&t.selectAllListener&&(o=t.tableElement.tHead.rows[t.tableElement.tHead.rows.length-1].cells.item(0));let a=n._createFilterRowElement(t);a&&o&&Array.from(o.children).forEach(s=>{var r;(r=a.cells.item(0))==null||r.appendChild(s)})}else if(!t.filter&&e){if(t.selectListener&&t.selectAllListener){o=e.cells.item(0);let a=Array.from(t.tableElement.tHead.rows).indexOf(e)-1,s=t.tableElement.tHead.rows.item(a);s&&Array.from(o.children).forEach(r=>{var l;(l=s.cells.item(0))==null||l.appendChild(r)})}Fe(e)}}static _createFilterRowElement(t){if(!t.tableElement.tHead)throw new Error("Table head element cannot be null.");let e=t.tableElement.tHead.insertRow();if(H1([_.classes.TABLE_ROW,_.classes.TABLE_HEAD_ROW_FILTER],e),t.selectListener){let o=document.createElement("th");H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],o),e.insertBefore(o,e.cells[0]),o.classList.add(_.classes.TABLE_CELL_SELECT)}return t.columnConfigurations.forEach((o,a)=>{let s=document.createElement("th");if(H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],s),o.filter&&O(o.filterDelegate)){let r=document.createElement("div");r.classList.add(_.classes.TABLE_HEAD_CELL_CONTAINER),o.align&&n._setCellAlignmentClass(r,o.align);let l=n._createFilterElement(o,a,t.filterListener);r.appendChild(l),s.appendChild(r)}e.appendChild(s)}),e}static _createFilterElement(t,e,o){let a;if(n0(t.filterDelegate))a=t.filterDelegate();else if(t.filterDelegate instanceof o2||t.filterDelegate instanceof Z1)a=t.filterDelegate;else throw new Error("Invalid filter delegate.");if(o&&a instanceof o2&&n0(a.onChange))if(!O(t.filterDebounceTime)||O2(t.filterDebounceTime)){let s=O(t.filterDebounceTime)?t.filterDebounceTime:_.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;a.onChange(Ne(r=>o(r,e),s))}else a.onChange(s=>o(s,e));return a.element}static _getFilterRowElement(t){if(t)return Array.from(t.rows).find(e=>e.classList.contains(_.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(t,e,o){let a=t.tableElement.tBodies[0],r=n._getNonExpandedRows(a.rows)[e];r.classList.add(_.classes.TABLE_ROW_EXPANDED);let l=Array.from(a.rows).indexOf(r),h=a.insertRow(l+1);H1([_.classes.TABLE_ROW,_.classes.TABLE_BODY_ROW,_.classes.TABLE_ROW_EXPANDABLE_CONTENT],h);let v=h.insertCell();v.setAttribute("colspan",r.cells.length.toString()),v.classList.add(_.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let m=document.createElement("div"),u=document.createElement(D1.elementName);u.appendChild(m),v.appendChild(u);let z=o;if(n0(o)){let x=t.data[e]?t.data[e].data:void 0,C=o(e,m,x);try{let E=await Promise.resolve(C);z=rm(E)?E.content:E}catch(E){console.error("Failed to load row template "+E.message),z=""}}z&&n._setRowTemplate(m,z),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(t,e){Ut(e)?t.innerHTML=e:t.appendChild(e)}static collapseRow(t,e){if(!t.tableElement||!t.tableElement.tBodies.length||!t.tableElement.tBodies[0].rows.length)return Promise.resolve();let o=t.tableElement.tBodies[0],s=n._getNonExpandedRows(o.rows)[e],r=Array.from(o.rows).indexOf(s);if(s&&s.classList.contains(_.classes.TABLE_ROW_EXPANDED)){let l=o.rows[r+1],h=l.querySelector(D1.elementName);if(h&&h.open){let v=new Promise(m=>{h.addEventListener(D1.events.ANIMATION_COMPLETE,()=>{s.classList.remove(_.classes.TABLE_ROW_EXPANDED),Fe(l),m()},{once:!0})});return h.open=!1,v}}return Promise.resolve()}static isRowExpanded(t,e){let o=t.tableElement.tBodies[0],s=n._getNonExpandedRows(o.rows)[e];return s&&s.classList.contains(_.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(t){t.fixedHeaders?t.tableElement.classList.add(_.classes.TABLE_FIXED):t.tableElement.classList.remove(_.classes.TABLE_FIXED)}static setLayoutType(t){t.layoutType==="fixed"?t.tableElement.classList.add(_.classes.TABLE_LAYOUT_FIXED):t.tableElement.classList.remove(_.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(t){let e=t.tableElement;if(e.tHead&&e.tHead.rows.length){let o=Array.from(e.tHead.rows[0].cells);for(let a of o){let s=getComputedStyle(a).width;a.style.width&&a.style.width!==s&&(a.style.width=s)}}}static setColumnResizeIndicatorVisibility(t,e,o){let a=t.tableElement;if(a.tHead&&a.tHead.rows.length){let s=Array.from(a.tHead.rows);for(let r of s){let l=r.cells[e];l&&(o?l.classList.add(_.classes.TABLE_CELL_RESIZABLE):l.classList.remove(_.classes.TABLE_CELL_RESIZABLE))}}if(a.tBodies.length){let s=Array.from(a.tBodies[0].rows);for(let r of s){let l=r.cells[e];l&&(o?l.classList.add(_.classes.TABLE_CELL_RESIZABLE):l.classList.remove(_.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(t,e,o,a){let s=t.tBodies[0];s&&(e?n._attachRowClickListeners(s,o,a):n._detachRowClickListeners(s,o,a))}static setRowClickAttributes(t,e){let o=t.tBodies[0];o&&(e?n._addRowClickAttributes(o):n._removeRowClickAttributes(o))}static getOwnerDocument(t){return t.ownerDocument||document}static _prepend(t,e){let o=e.childNodes.item(0);o?e.insertBefore(t,o):e.appendChild(t)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(t,e){return Promise.resolve(t()).then(o=>{let a=e.rows.item(e.rows.length-1);if(!a)return;let s=a.cells.item(0);o&&s&&(typeof o=="string"?s.innerHTML=o:o instanceof HTMLElement&&s.appendChild(o),s.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var A4=class extends I{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(_.classes.TABLE),this._component.children.length&&n2(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return A1.createTable(t)}recreateTableBody(t){A1.recreateTableBody(t)}setSelectedRows(t,e,o,a,s=!1){A1.setSelectedRows(t,e,o,a,s)}clearSelectedRows(t){A1.clearSelectedRows(t)}updateSelectedState(t,e){A1.updateSelectedState(t,e)}updateSelectAllState(t,e,o){A1.updateSelectAllState(t,e,o)}setSortedColumn(t,e,o){A1.setSortedColumn(t,e,o)}removeColumnSort(t,e){A1.removeColumnSort(t,e)}setSortDirection(t,e,o){A1.setSortDirection(t,e,o)}setSelectColumnVisibility(t,e,o,a,s,r,l,h,v){A1.setSelectColumnVisibility(t,e,o,a||null,s||null,r||null,l||[],h||null,v||null)}setDense(t,e){A1.setDenseState(t,e)}setRoomy(t,e){A1.setRoomyState(t,e)}setResizable(t){A1.setResizable(t)}setSelectAllVisibility(t,e,o,a,s,r=null){A1.setSelectAllVisibility(t,e,o,a,s||null,r||null)}setFilterRow(t){A1.setFilterRow(t)}expandRow(t,e,o){return A1.expandRow(t,e,o)}collapseRow(t,e){return A1.collapseRow(t,e)}isRowExpanded(t,e){return A1.isRowExpanded(t,e)}setFixedHeaders(t){A1.setFixedHeaders(t)}setTableLayoutType(t){A1.setLayoutType(t)}setWrapContentState(t){A1.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,e){A1.getOwnerDocument(this._component).addEventListener(t,e)}removeDocumentListener(t,e){A1.getOwnerDocument(this._component).removeEventListener(t,e)}normalizeColumnWidths(t){A1.normalizeColumnWidths(t)}setResizeColumnVisibility(t,e,o){A1.setColumnResizeIndicatorVisibility(t,e,o)}addTableClass(t){H1(t,this._tableElement)}removeTableClass(t){ye(t,this._tableElement)}setRowClickListeners(t,e,o,a){A1.setRowClickListeners(t,e,o,a)}setRowClickAttributes(t,e){A1.setRowClickAttributes(t,e)}};var T4=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(t=>d({},t))]}addSortColumn(t){this._sortedColumns.push(d({},t)),this._updateSortNumbers()}updateSortColumn(t){let e=this._sortedColumns.find(o=>o.columnIndex===t.columnIndex);if(e)switch(e.direction){case"ASC":this.removeSortColumn(t);break;case"DESC":e.direction="ASC";break;case"UNSET":e.direction="DESC";break}}setSortColumns(t){this._sortedColumns=[...t.map(e=>d({},e))]}removeSortColumn(t){typeof t=="number"?this._sortedColumns.splice(t,1):this._sortedColumns.splice(this._sortedColumns.indexOf(t),1),this._updateSortNumbers()}isSortColumn(t){return typeof t=="number"?this._sortedColumns.some(e=>e.columnIndex===t):this._sortedColumns.includes(t)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(t){return this._sortedColumns.find(e=>e.columnIndex===t)}_updateSortNumbers(){this._sortedColumns.every(t=>typeof t.sortOrder=="number")&&this._sortedColumns.sort((t,e)=>t.sortOrder-e.sortOrder),this._sortedColumns.forEach((t,e)=>t.sortOrder=e+1)}};var S4=class{constructor(t,e=!1){this.data=t;this.selected=e}};var k4=class{constructor(t){this._adapter=t;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=_.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=_.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new T4;this._rowClickListener=e=>this._onRowClick(e),this._rowDoubleClickListener=e=>this._onRowDoubleClick(e),this._selectRowListener=e=>this._onRowSelected(e),this._selectAllListener=e=>this._onSelectAll(e),this._sortableHeadCellKeydownListener=e=>this._onSortableHeadCellKeydown(e),this._headRowMouseDownListener=e=>this._onHeadRowMouseDown(e),this._headRowContextMenuListener=e=>this._onHeadRowContextMenu(e),this._documentMouseMoveListener=e=>this._onMouseMove(e),this._documentMouseUpListener=e=>this._onMouseUp(e),this._filterListener=(e,o)=>this._onFilter(e,o),this._selectionManager=new $a(this._selectKey),this._hiddenColumnManager=new $a}initialize(){this._adapter.initialize(),this._adapter.setHostAttribute(_.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(_.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(_.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(_.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(_.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(_.events.INITIALIZED,void 0,!1)}destroy(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(t){Array.isArray(t)&&t.length>0?vt(t[0])?this._data=t.map(e=>d({},e)):this._data=[...t]:this._data=[],this._tableRows=this._data.map(e=>new S4(e,this._selectionManager.exists(e))),this._renderBody()}get data(){return this._data.map(t=>d({},t))}set columnConfigurations(t){this._columnConfigurations=t.map(e=>d({},e)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(e=>{e.hidden&&this._hiddenColumnManager.add(e)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(t=>d({},t))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(t=>!this._hiddenColumnManager.exists(t))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(t){this._select!==t&&(this._select=t,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(_.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(_.attributes.SELECT))}get select(){return this._select}set multiselect(t){this._multiselect!==t&&(this._multiselect=t,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(_.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(t){this._originalSelectKey!==t&&(Array.isArray(t)?(this._originalSelectKey=[...t],this._selectKey=[...t]):(this._originalSelectKey=t,this._selectKey=[t]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(_.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(t){t!==this._roomy&&(this._roomy=t,this._applyRoomy())}set filter(t){this._filter!==t&&(this._filter=t,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(_.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(t){this._fixedHeaders!==t&&(this._fixedHeaders=t,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(t){this._layoutType!==t&&(this._layoutType=t,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(t){this._wrapContent!==t&&(this._wrapContent=t,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(t){this._minResizeWidth!==t&&(this._minResizeWidth=t,O2(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=_.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(t){this._allowRowClick!==t&&(this._allowRowClick=t,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(t){t!==this._multiColumnSort&&(this._multiColumnSort=t,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(t){t!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=t,this._adapter.setHostAttribute(_.attributes.SELECT_CHECKBOX_ALIGNMENT,t),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(t){t!==this._tooltipSelect&&(this._tooltipSelect=t,typeof t=="string"&&this._adapter.setHostAttribute(_.attributes.TOOLTIP_SELECT,t),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(t){t!==this._tooltipSelectAll&&(this._tooltipSelectAll=t,this._adapter.setHostAttribute(_.attributes.TOOLTIP_SELECT_ALL,t),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(t){t!==this._selectAllTemplate&&(this._selectAllTemplate=t,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(t){this._rowCreatedCallback=t}get cellCreated(){return this._cellCreatedCallback}set cellCreated(t){this._cellCreatedCallback=t}isRowSelected(t){let e=xo(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],t);return this.selectKey?!!this._selectionManager.getItems().find(o=>Xn(o,e)):this._selectionManager.exists(t)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(t,e){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||e)&&this.clearSelections(),t&&t.length&&(this._selectionManager.add(t),this._updateSelections(!e))}deselectRows(t){t&&t.length&&(this._selectionManager.remove(t),this._updateSelections(!1))}clearSelections(){let t=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(e=>e.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(t),this._select&&this._multiselect&&this._adapter.updateSelectAllState(t,!1)}hideColumn(t){let e=this._columnConfigurations[t];this._sortedColumnIndex===t&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(e)||(this._hiddenColumnManager.add(e),this.render())}showColumn(t){let e=this._columnConfigurations[t];this._hiddenColumnManager.exists(e)&&(this._hiddenColumnManager.remove(e),this.render())}isColumnHidden(t){let e=this._columnConfigurations[t];return!!e&&this._hiddenColumnManager.exists(e)}render(){this._adapter.emitHostEvent(_.events.BEFORE_BODY_RENDERED,void 0,!1),this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0,this._adapter.emitHostEvent(_.events.BODY_RENDERED,void 0,!1)}_renderBody(){this._rendered&&(this._adapter.emitHostEvent(_.events.BEFORE_BODY_RENDERED,void 0,!1),this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections(),this._adapter.emitHostEvent(_.events.BODY_RENDERED,void 0,!1))}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let t=this._selectionManager.getItems();t.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,t,!1)}expandRow(t,e){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(t<0||t>this._tableRows.length)throw new Error(`Invalid row index: ${t}.`);return this._adapter.expandRow(this._tableConfiguration,t,e)}collapseRow(t){return!this._rendered||t<0||t>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,t)}isRowExpanded(t){return this._adapter.isRowExpanded(this._tableConfiguration,t)}selectRowsByIndex(t,e){let o=t.map(a=>this._data[a]).filter(a=>!!a);this.selectRows(o,!e)}deselectRowsByIndex(t){let e=t.map(o=>this._data[o]).filter(o=>!!o);this.deselectRows(e)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(t=>t.selected)}_updateSelections(t){this._tableRows.forEach(o=>o.selected=this._selectionManager.exists(o.data));let e=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),t),(e!==this._isAllSelected||this._isIndeterminate(e))&&(this._isAllSelected=e,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(t){if(t.stopImmediatePropagation(),t.target.matches(`[${_.attributes.SELECT_CHECKBOX}]`))return;let a=C2(t).filter(v=>v.nodeType===1).find(v=>v.hasAttribute(_.attributes.CUSTOM_CELL_TEMPLATE));if(a&&a.hasAttribute(_.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:r,data:l}=this._getSelectedRowFromEvent(t),h={index:r,data:l};this._adapter.emitHostEvent(_.events.ROW_CLICK,h,!0,!1)}_onRowDoubleClick(t){if(t.stopPropagation(),t.target.matches(`[${_.attributes.SELECT_CHECKBOX}]`))return;let e=this._getSelectedRowFromEvent(t),o={index:e.index,data:e.data};this._adapter.emitHostEvent(_.events.SELECT_DOUBLE,o,!0,!1)}_onRowSelected(t){var r;if(t.type==="change"){t.preventDefault();return}if(t.type==="keydown"&&t.key!==" ")return;let e=this._getSelectedRowFromEvent(t);this._multiselect||this._tableRows.filter(h=>h.selected).forEach(h=>{Xn(h.data,xo(this._selectKey,e.data))||this.deselectRows([h.data])});let o=!this._selectionManager.exists(e.data);this._adapter.updateSelectedState(e.rowElement,o),o?this._selectionManager.add(e.data):this._selectionManager.remove(e.data),this._tableRows[e.index].selected=o;let a=[e.index],s=!1;if(this._multiselect){if(t.shiftKey&&this._previouslyClickedRow&&((r=document.getSelection())==null||r.removeAllRanges(),a=this._shiftSelectRows(e),a.includes(this._previouslyClickedRow.index))){let h=a.indexOf(this._previouslyClickedRow.index);a.splice(h,1)}s=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),s,this._isIndeterminate(s))}for(let l of a){let h=this._tableRows[l].data,m={selected:this._selectionManager.exists(h),index:l,data:h};this._adapter.emitHostEvent(_.events.SELECT,m,!0,!1)}if(this._isAllSelected!==s){this._isAllSelected=s;let l={status:this._isAllSelected,count:this._tableRows.filter(h=>h.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(_.events.SELECT_ALL,l,!0,!1)}this._previouslyClickedRow=d({},e)}_getSelectedRowFromEvent(t){let o=C2(t).find(l=>l.tagName==="TR"),a=o.parentElement,s=this._getNonExpandedRows(a).findIndex(l=>l===o),r=this._tableRows[s].data;return{rowElement:o,index:s,data:r}}_getNonExpandedRows(t){return Array.from(t.rows).filter(e=>!e.classList.contains(_.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(t){t.stopPropagation(),this._isAllSelected=!this._isAllSelected;let e=this._adapter.getTableElement();this._adapter.updateSelectAllState(e,this._isAllSelected),this._tableRows.forEach((a,s)=>{a.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(a.data):this._selectionManager.remove(a.data);let r=A1.getRowByIndex(e,s);r&&this._adapter.updateSelectedState(r,this._isAllSelected)});let o={status:this._isAllSelected,count:this._tableRows.filter(a=>a.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(_.events.SELECT_ALL,o,!0,!1)}_onHeadRowContextMenu(t){t.ctrlKey&&t.preventDefault()}_onHeadRowMouseDown(t){if(t.button!==0)return;let e=C2(t),o=t.target,a=e.find(l=>l.tagName==="TR"),s=e.find(l=>l.tagName==="TH"),r=Array.from(a.cells).findIndex(l=>l===s);this._headCellMouseDownIndex=r,o!==s&&o.classList.contains(_.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:s,startWidth:s.offsetWidth,startX:t.pageX,width:s.offsetWidth,index:this._select?r-1:r},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,r,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(t){if(this._resizeDescriptor){let e=this._resizeDescriptor.startWidth+(t.pageX-this._resizeDescriptor.startX);e<this._minResizeWidth&&(e=this._minResizeWidth),this._resizeDescriptor.width=e,this._resizeDescriptor.element.style.width=`${e}px`,this._adapter.addTableClass(_.classes.TABLE_RESIZING)}}_onMouseUp(t){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(_.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let e={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(_.events.COLUMN_RESIZE,e),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(t.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,t.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(t){if(t.key===" "||t.key==="Enter"){let e=C2(t),o=e.find(r=>r.tagName==="TR"),a=e.find(r=>r.tagName==="TH"),s=Array.from(o.cells).findIndex(r=>r===a);this._onSort(s)}}_onSort(t){let e=this._select?t-1:t,o=e>=0?this._visibleColumnConfigurations[e]:null;if(!o||!o.sortable)return;let a="ASC",s=e===this._sortedColumnIndex,r=this._sortDirection==="ASC"||this._sortDirection===void 0,l=s&&this._sortDirection==="DESC";s&&r&&(a="DESC"),l&&!o.preventUnsort&&(a="UNSET");let h={direction:a,columnIndex:e};if(this._adapter.emitHostEvent(_.events.SORT,h,!0,!0)){if(s&&this._sortDirection==="DESC"&&!o.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=a,e===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),t,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=e,this._adapter.setSortedColumn(this._adapter.getTableElement(),t,this._sortDirection))}}_onMultiSort(t,e){let o=this._select?t-1:t,a=o>=0?this._visibleColumnConfigurations[o]:null;if(!a||!a.sortable)return;let s=this._multiSortManager.sortedColumns,r=this._multiSortManager.getSortColumn(o);r?this._multiSortManager.updateSortColumn(r):e?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:o,propertyName:a.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:o,propertyName:a.property}));let l=this._multiSortManager.sortedColumns.map(m=>d({},m));if(!this._adapter.emitHostEvent(_.events.SORT,l,!0,!0)){this._multiSortManager.setSortColumns(s);return}let v=this._multiSortManager.sortedColumns.length>1;for(let m=0;m<this._visibleColumnConfigurations.length;m++){let u=this._select?m+1:m;if(!this._multiSortManager.isSortColumn(m))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),A1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),v,u,null);else{let z=this._multiSortManager.getSortColumn(m);z&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,z.direction),A1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),v,u,z.sortOrder||null))}}}_onFilter(t,e){let o={value:t,columnIndex:e};this._adapter.emitHostEvent(_.events.FILTER,o,!0,!1)}_shiftSelectRows(t){let e=[];if(this._previouslyClickedRow){let o=this._previouslyClickedRow.index,a=t.index,s=a>=o?o:a,r=a>=o?a:o;r+=r>s?1:0,s+=s>r?1:0;let l=m=>this.selectRows(m,!1),h=this._tableRows.find(m=>m.selected&&m.data===t.data),v=this._tableRows.find(m=>{var u;return m.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!m.selected});(!h||v)&&(l=m=>this.deselectRows(m));for(let m=s;m<r;m++)e.push(m);l(this.data.filter((m,u)=>e.includes(u)))}return e}_isIndeterminate(t){return!t&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(_.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(t=>t.initialSort),this._sortedColumnIndex>=0&&this._sortDirection===void 0){let t=this._visibleColumnConfigurations[this._sortedColumnIndex];t.initialSort===!0&&t.sortDirection?this._sortDirection=t.sortDirection:typeof t.initialSort=="object"&&t.initialSort.direction&&(this._sortDirection=t.initialSort.direction)}if(this._multiColumnSort){let t=[];this._visibleColumnConfigurations.forEach((e,o)=>{typeof e.initialSort=="object"&&t.push({columnIndex:o,direction:e.initialSort.direction,sortOrder:e.initialSort.sortOrder,propertyName:e.property})}),this._multiSortManager.setSortColumns(t)}}};var X1=class extends M{static get observedAttributes(){return[_.attributes.SELECT,_.attributes.MULTISELECT,_.attributes.SELECT_KEY,_.attributes.DENSE,_.attributes.ROOMY,_.attributes.FILTER,_.attributes.FIXED_HEADERS,_.attributes.LAYOUT_TYPE,_.attributes.WRAP_CONTENT,_.attributes.RESIZABLE,_.attributes.MIN_RESIZE_WIDTH,_.attributes.ALLOW_ROW_CLICK,_.attributes.MULTI_COLUMN_SORT,_.attributes.SELECT_CHECKBOX_ALIGNMENT,_.attributes.TOOLTIP_SELECT,_.attributes.TOOLTIP_SELECT_ALL]}constructor(){super(),X.define(il),this._core=new k4(new A4(this))}initializedCallback(){this._core.initialize()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case _.attributes.SELECT:this.select=p(o);break;case _.attributes.MULTISELECT:this.multiselect=p(o);break;case _.attributes.SELECT_KEY:this.selectKey=o;break;case _.attributes.DENSE:this.dense=p(o);break;case _.attributes.ROOMY:this.roomy=p(o);break;case _.attributes.FILTER:this.filter=p(o);break;case _.attributes.FIXED_HEADERS:this.fixedHeaders=p(o);break;case _.attributes.LAYOUT_TYPE:this.layoutType=o;break;case _.attributes.WRAP_CONTENT:this.wrapContent=p(o);break;case _.attributes.RESIZABLE:this.resizable=p(o);break;case _.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=K(o);break;case _.attributes.ALLOW_ROW_CLICK:this.allowRowClick=p(o);break;case _.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=p(o);break;case _.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(_.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case _.attributes.TOOLTIP_SELECT:this.tooltipSelect=o;break;case _.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=o;break}}hideColumn(t){this._core.hideColumn(t)}showColumn(t){this._core.showColumn(t)}isColumnHidden(t){return this._core.isColumnHidden(t)}getSelectedRows(){return this._core.getSelectedRows()}selectRow(t){this._core.selectRows([t],!1)}selectRows(t,e=!1){this._core.selectRows(t,!e)}deselectRow(t){this._core.deselectRows([t])}deselectRows(t){this._core.deselectRows(t)}clearSelections(){this._core.clearSelections()}render(){this._core.render()}expandRow(t,e){return this._core.expandRow(t,e)}collapseRow(t){return this._core.collapseRow(t)}isRowExpanded(t){return this._core.isRowExpanded(t)}selectRowsByIndex(t,e){typeof t=="number"?this._core.selectRowsByIndex([t],e):Array.isArray(t)&&this._core.selectRowsByIndex(t,e)}deselectRowsByIndex(t){typeof t=="number"?this._core.deselectRowsByIndex([t]):Array.isArray(t)&&this._core.deselectRowsByIndex(t)}isRowSelected(t){return this._core.isRowSelected(t)}};i([c()],X1.prototype,"data",2),i([c()],X1.prototype,"columnConfigurations",2),i([c()],X1.prototype,"select",2),i([c()],X1.prototype,"multiselect",2),i([c()],X1.prototype,"selectKey",2),i([c()],X1.prototype,"tooltipSelect",2),i([c()],X1.prototype,"tooltipSelectAll",2),i([c()],X1.prototype,"dense",2),i([c()],X1.prototype,"roomy",2),i([c()],X1.prototype,"filter",2),i([c()],X1.prototype,"fixedHeaders",2),i([c()],X1.prototype,"layoutType",2),i([c()],X1.prototype,"wrapContent",2),i([c()],X1.prototype,"resizable",2),i([c()],X1.prototype,"minResizeWidth",2),i([c()],X1.prototype,"allowRowClick",2),i([c()],X1.prototype,"multiColumnSort",2),i([c()],X1.prototype,"rowCreated",2),i([c()],X1.prototype,"cellCreated",2),i([c()],X1.prototype,"selectAllTemplate",2),i([c()],X1.prototype,"selectCheckboxAlignment",2),X1=i([y({name:_.elementName,dependencies:[tt,j,at,m1]})],X1);function im(){f(X1)}var lm=`${b}tab-bar`,cm={DISABLED:"disabled",ACTIVE_TAB:"active-tab",VERTICAL:"vertical",STACKED:"stacked",CLUSTERED:"clustered",SECONDARY:"secondary",INVERTED:"inverted",AUTO_ACTIVATE:"auto-activate",SCROLL_BUTTONS:"scroll-buttons"},Pb=d({},cm),Nb={ROOT:".forge-tab-bar",SCROLL_CONTAINER:".scroll-container",DEFAULT_SLOT:"slot:not([name])"},Rb={SCROLL_BUTTON:"scroll-button"},Fb={CHANGE:`${lm}-change`},Ub={SCROLL_MARGIN:48},N1={elementName:lm,observedAttributes:cm,attributes:Pb,events:Fb,selectors:Nb,classes:Rb,numbers:Ub},f3=new Map([["default",new Set(["Home","End"])],["horizontal",new Set(["ArrowLeft","ArrowRight"])],["vertical",new Set(["ArrowUp","ArrowDown"])]]);var hm=`${b}tab`,vm={DISABLED:"disabled",SELECTED:"selected",VERTICAL:"vertical",STACKED:"stacked",SECONDARY:"secondary",INVERTED:"inverted"},Wb=d({},vm),Gb={INDICATOR:".indicator"},qb={},Yb={SELECT:`${hm}-select`},Kb={EASING:"cubic-bezier(0.4, 0, 0.2, 1)"},$b={ANIMATION_DURATION:250},K1={elementName:hm,observedAttributes:vm,attributes:Wb,selectors:Gb,classes:qb,events:Yb,strings:Kb,numbers:$b};var O4=class extends I{constructor(t){super(t),this._tabIndicatorElement=w(this._component,K1.selectors.INDICATOR),this._focusIndicatorElement=w(this._component,w1.elementName),this._stateLayerElement=w(this._component,I1.elementName)}initialize(){this._component.tabIndex=this._component.selected?0:-1,this._component.setAttribute("role","tab"),this._component.setAttribute("aria-selected",this._component.selected?"true":"false")}activateFocusIndicator(){this._focusIndicatorElement.active=!0}addInteractionListener(t,e){this._component.addEventListener(t,e)}setDisabled(t){this._stateLayerElement.disabled=t,this._component.tabIndex=t?-1:this._component.selected?0:-1,this._component.setAttribute("aria-disabled",String(t)),G(this._component,t,K1.attributes.DISABLED,String(t))}setSelected(t){this._component.tabIndex=t?0:-1,this._component.setAttribute("aria-selected",String(t))}animateSelected(){this._tabIndicatorElement.getAnimations().forEach(e=>e.cancel());let t=this._getKeyframes();t&&this._tabIndicatorElement.animate(t,{duration:K1.numbers.ANIMATION_DURATION,easing:K1.strings.EASING})}animateStateLayer(){this._stateLayerElement.playAnimation()}_getKeyframes(){var x;let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this._component.selected)return t?[{opacity:1},{transform:"none"}]:null;let e={},o=this._component.vertical,a=this._getSelectedTabIndicator(),s=(x=a==null?void 0:a.getBoundingClientRect())!=null?x:{},r=o?s.top:s.left,l=o?s.height:s.width,h=this._tabIndicatorElement.getBoundingClientRect(),v=o?h.top:h.left,m=o?h.height:h.width,u=o?"Y":"X",z=l/m;return!t&&r!==void 0&&v!==void 0&&!isNaN(z)?e.transform=`translate${u}(${(r-v).toFixed(4)}px) scale${u}(${z.toFixed(4)})`:e.opacity=0,[e,{transform:"none"}]}_getSelectedTabIndicator(){let t=N3(this._component,N1.elementName);if(t){let o=Array.from(t.querySelectorAll(K1.elementName)).find(a=>a.hasAttribute(K1.attributes.SELECTED));if(o)return w(o,K1.selectors.INDICATOR)}return null}};var D4=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._vertical=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._clickListener=()=>this._onClick(),this._keydownListener=e=>this._onKeydown(e)}initialize(){this._adapter.initialize(),this._adapter.addInteractionListener("click",this._clickListener),this._adapter.addInteractionListener("keydown",this._keydownListener)}setFocus(t){t!=null&&t.focusVisible&&this._adapter.activateFocusIndicator()}_onClick(){this._disabled||this._selected||this._dispatchSelectEvent()}_onKeydown(t){if(this._disabled||this._selected)return;(t.key===" "||t.key==="Enter")&&(t.preventDefault(),this._adapter.animateStateLayer(),this._dispatchSelectEvent())}_dispatchSelectEvent(){this._adapter.dispatchHostEvent(new CustomEvent(K1.events.SELECT,{bubbles:!0,composed:!0}))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(K1.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.animateSelected(),this._adapter.toggleHostAttribute(K1.attributes.SELECTED,this._selected))}get vertical(){return this._vertical}set vertical(t){this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(K1.attributes.VERTICAL,this._vertical))}get stacked(){return this._stacked}set stacked(t){this._stacked!==t&&(this._stacked=t,this._adapter.toggleHostAttribute(K1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){this._secondary!==t&&(this._secondary=t,this._adapter.toggleHostAttribute(K1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){this._inverted!==t&&(this._inverted=t,this._adapter.toggleHostAttribute(K1.attributes.INVERTED,this._inverted))}};var Xb='<template><div class="forge-tab" part="container"><span class="content" part="content"><slot name="start"><slot name="leading"></slot></slot><span class="label" part="label"><slot></slot></span><slot name="end"><slot name="trailing"></slot></slot><span class="indicator" part="indicator"></span></span><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></template>',Zb=':host{display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-padding-block:var(--forge-tab-padding-block, 0);--_tab-padding-inline:var(--forge-tab-padding-inline, 0);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-vertical-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-secondary-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-secondary-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-inverted-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-vertical-inverted-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-spacing:var(--forge-tab-content-spacing, var(--forge-spacing-xsmall, 8px));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-content-padding-block:var(--forge-tab-content-padding-block, var(--_tab-content-padding));--_tab-content-padding-inline:var(--forge-tab-content-padding-inline, var(--forge-spacing-medium, 16px));--_tab-content-padding-inline-secondary:var(--forge-tab-content-padding-inline-secondary, var(--forge-spacing-medium, 16px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding-block:var(--_tab-padding-block);padding-inline:var(--_tab-padding-inline);margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;white-space:nowrap;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding-block));min-height:var(--_tab-content-height);width:100%;padding-block:var(--_tab-content-padding-block);padding-inline:var(--_tab-content-padding-inline);gap:var(--_tab-content-spacing)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);min-width:100%;inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=end]),:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=start]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=end]),:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=start]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{max-height:none;flex-direction:column;height:100%}:host([vertical]) .forge-tab{--_tab-padding-inline:var(--forge-tab-padding-inline, 0);width:100%;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%;min-height:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}',Rt=class extends M{static get observedAttributes(){return Object.values(K1.observedAttributes)}constructor(){super(),H(this,Xb,Zb),this._core=new D4(new O4(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case K1.observedAttributes.DISABLED:this.disabled=p(o);break;case K1.observedAttributes.SELECTED:this.selected=p(o);break;case K1.observedAttributes.VERTICAL:this.vertical=p(o);break;case K1.observedAttributes.STACKED:this.stacked=p(o);break;case K1.observedAttributes.SECONDARY:this.secondary=p(o);break;case K1.observedAttributes.INVERTED:this.inverted=p(o);break}}focus(t){super.focus(t),this._core.setFocus(t)}};i([c()],Rt.prototype,"disabled",2),i([c()],Rt.prototype,"selected",2),i([c()],Rt.prototype,"vertical",2),i([c()],Rt.prototype,"stacked",2),i([c()],Rt.prototype,"secondary",2),i([c()],Rt.prototype,"inverted",2),Rt=i([y({name:K1.elementName,dependencies:[J,r1]})],Rt);function pm(){f(Rt)}var P4=class extends I{constructor(t){super(t),this._defaultSlotElement=w(this._component,N1.selectors.DEFAULT_SLOT),this._rootElement=w(this._component,N1.selectors.ROOT),this._scrollContainer=w(this._component,N1.selectors.SCROLL_CONTAINER)}initializeContainerSizeObserver(t){this._resizeObserver=new ResizeObserver(()=>t()),this._resizeObserver.observe(this._component)}initializeScrollObserver(t){this._scrollContainer.addEventListener("scroll",t,{passive:!0})}destroyContainerSizeObserver(){var t;(t=this._resizeObserver)==null||t.disconnect(),this._resizeObserver=void 0}destroyScrollObserver(t){this._scrollContainer.removeEventListener("scroll",t,{passive:!0})}setVertical(t){G(this._component,!!t,"aria-orientation","vertical")}setScrollBackwardButtonListener(t){var e;(e=this._backwardScrollButton)==null||e.addEventListener("click",t)}setScrollForwardButtonListener(t){var e;(e=this._forwardScrollButton)==null||e.addEventListener("click",t)}addSlotListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}getTabs(){return Array.from(this._component.querySelectorAll(K1.elementName))}async tryScrollTabIntoView(t){if(await new Promise(requestAnimationFrame),!t.isConnected||!t.selected&&!t.matches(":focus"))return;let e=this._component.vertical,o=e?this._scrollContainer.offsetTop:this._scrollContainer.offsetLeft,a=e?t.offsetTop:t.offsetLeft,s=e?t.offsetHeight:t.offsetWidth,r=e?this._scrollContainer.scrollTop:this._scrollContainer.scrollLeft,l=e?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth,h=a-(N1.numbers.SCROLL_MARGIN+o),v=a+s-l+(N1.numbers.SCROLL_MARGIN-o),m=Math.min(h,Math.max(v,r)),u=t.matches(":focus")?"smooth":"instant";this._scrollContainer.scrollTo({behavior:u,[e?"left":"top"]:0,[e?"top":"left"]:m})}getScrollState(){let{scrollHeight:t,scrollWidth:e,scrollLeft:o,scrollTop:a,clientHeight:s,clientWidth:r}=this._scrollContainer,l=this._component.vertical?s+a:r+o,h=this._component.vertical?t:e,v=l===h;return{isScrolledStart:(this._component.vertical?l-s:l-r)===0,isScrolledEnd:v}}isScrollable(){let{scrollHeight:t,scrollWidth:e,clientHeight:o,clientWidth:a}=this._scrollContainer;return this._component.vertical?t>o:e>a}setScrollButtons(t){var e,o;t?(this._backwardScrollButton=this._createScrollButton(this._component.vertical?Qa.name:v0.name),this._rootElement.insertAdjacentElement("afterbegin",this._backwardScrollButton),this._forwardScrollButton=this._createScrollButton(this._component.vertical?h0.name:ze.name),this._rootElement.insertAdjacentElement("beforeend",this._forwardScrollButton)):((e=this._backwardScrollButton)==null||e.remove(),this._backwardScrollButton=void 0,(o=this._forwardScrollButton)==null||o.remove(),this._forwardScrollButton=void 0)}syncScrollButtons({backwardEnabled:t,forwardEnabled:e}){var o,a;if(this._backwardScrollButton){let s=!t;s&&this._backwardScrollButton.matches(":focus")&&((o=this._forwardScrollButton)==null||o.focus()),this._backwardScrollButton.disabled=s,this._backwardScrollButton.tabIndex=-1}if(this._forwardScrollButton){let s=!e;s&&this._forwardScrollButton.matches(":focus")&&((a=this._backwardScrollButton)==null||a.focus()),this._forwardScrollButton.disabled=s,this._forwardScrollButton.tabIndex=-1}}scroll(t){let e=this._component.vertical?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth;this._scrollContainer.scrollBy({behavior:"smooth",[this._component.vertical?"top":"left"]:e*(t==="forward"?1:-1)})}updateScrollButtonIcons(t){var a,s;let e=(a=this._backwardScrollButton)==null?void 0:a.querySelector("forge-icon");e&&(e.name=t?Qa.name:v0.name);let o=(s=this._forwardScrollButton)==null?void 0:s.querySelector("forge-icon");o&&(o.name=t?h0.name:ze.name)}_createScrollButton(t){let e=document.createElement("forge-icon-button");e.classList.add(N1.classes.SCROLL_BUTTON),e.shape="squared",e.type="button",e.tabIndex=-1,e.setAttribute("aria-hidden","true");let o=document.createElement("forge-icon");return o.name=t,e.appendChild(o),e}};var N4=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._disabled=!1;this._vertical=!1;this._clustered=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._autoActivate=!1;this._scrollButtons=!1;this._tabs=[];this._scrollButtonsVisible=!1;this._tabsChangedListener=()=>this._onTabsChanged(),this._tabSelectedListener=e=>this._onTabSelected(e),this._keydownListener=e=>this._onKeydown(e),this._resizeListener=()=>this._onResize(),this._scrollListener=()=>this._onScroll(),this._scrollBackwardButtonListener=()=>this._onScrollBackward(),this._scrollForwardButtonListener=()=>this._onScrollForward()}initialize(){this._adapter.addSlotListener(this._tabsChangedListener),this._adapter.addHostListener(K1.events.SELECT,this._tabSelectedListener),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.setVertical(this._vertical),this._scrollButtons&&(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState()),this._tryScrollActiveTabIntoView(),this._isInitialized=!0}destroy(){this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._isInitialized=!1}async _onTabsChanged(){this._tabs=this._adapter.getTabs(),this._syncTabState(),this._scrollButtons&&this._detectScrollableStatus(),this._tryScrollActiveTabIntoView()}_onTabSelected(t){this._selectTab({tab:t.target,focusTab:!0})}async _onKeydown(t){var s,r;let e=this._vertical?"vertical":"horizontal";if(!(((s=f3.get("default"))==null?void 0:s.has(t.key))||((r=f3.get(e))==null?void 0:r.has(t.key))))return;t.preventDefault();let a=-1;if(t.key==="Home")a=this._tabs.findIndex(l=>!l.disabled);else if(t.key==="End")a=this._tabs.reduceRight((l,h,v)=>!h.disabled&&l===-1?v:l,-1);else{let l=this._tabs.findIndex(m=>m.matches(":focus")),h=t.key==="ArrowLeft"||t.key==="ArrowUp",v=m=>{var z;a=m+(h?-1:1),a=a<0?this._tabs.length-1:a%this._tabs.length,!this._tabs.every(x=>x.disabled)&&((z=this._tabs[a])!=null&&z.disabled)&&v(a)};v(l)}a!==-1&&(this._autoActivate?this._selectTab({tab:this._tabs[a],focusTab:!0}):(this._tabs[a].focus({preventScroll:!0,focusVisible:!0}),await this._adapter.tryScrollTabIntoView(this._tabs[a])))}async _selectTab({tab:t,emitEvent:e=!0,focusTab:o=!1}){if(!t||t.disabled)return;let a=this._tabs.find(s=>s.selected);if(a!==t){if(e){let s=this._tabs.indexOf(t),r=new CustomEvent(N1.events.CHANGE,{detail:{index:s},bubbles:!0,cancelable:!0,composed:!0});if(this._adapter.dispatchHostEvent(r),r.defaultPrevented)return}t.selected=!0,o&&t.focus({preventScroll:!0}),await this._adapter.tryScrollTabIntoView(t),a&&(a.selected=!1),this._activeTab=this._tabs.indexOf(t)}}_syncTabState(){this._tabs.forEach((t,e)=>{t.selected=e===this._activeTab,this._disabled&&(t.disabled=this._disabled),t.vertical=this._vertical,t.stacked=this._stacked,t.secondary=this._secondary,t.inverted=this._inverted})}_onResize(){this._detectScrollableStatus()}_onScroll(){this._updateScrollState()}_onScrollBackward(){this._adapter.scroll("backward")}_onScrollForward(){this._adapter.scroll("forward")}_detectScrollableStatus(){let t=this._adapter.isScrollable();this._scrollButtonsVisible!==t&&(this._adapter.setScrollButtons(t),t?(this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState(),this._adapter.setScrollBackwardButtonListener(this._scrollBackwardButtonListener),this._adapter.setScrollForwardButtonListener(this._scrollForwardButtonListener)):this._adapter.destroyScrollObserver(this._scrollListener),this._scrollButtonsVisible=t)}_updateScrollState(){let{isScrolledEnd:t,isScrolledStart:e}=this._adapter.getScrollState(),o={backwardEnabled:!e,forwardEnabled:!t};this._adapter.syncScrollButtons(o)}_tryScrollActiveTabIntoView(){this._tabScrollAnimationFrame&&window.cancelAnimationFrame(this._tabScrollAnimationFrame),this._tabScrollAnimationFrame=window.requestAnimationFrame(()=>{this._tabScrollAnimationFrame=void 0,this._adapter.isScrollable()&&typeof this._activeTab=="number"&&this._activeTab>=0&&this._tabs[this._activeTab]&&this._adapter.tryScrollTabIntoView(this._tabs[this._activeTab])})}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._tabs.forEach(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(N1.attributes.DISABLED,this._disabled))}get activeTab(){return this._activeTab}set activeTab(t){if(this._activeTab!==t)if(this._activeTab=t!=null?t:void 0,typeof this._activeTab=="number"){let e=this._tabs[this._activeTab];this._selectTab({tab:e,emitEvent:!1,focusTab:!1}),this._adapter.setHostAttribute(N1.attributes.ACTIVE_TAB,String(this._activeTab))}else this._tabs.forEach(e=>e.selected=!1),this._adapter.removeHostAttribute(N1.attributes.ACTIVE_TAB)}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._isInitialized&&this._adapter.setVertical(this._vertical),this._tabs.forEach(e=>e.vertical=this._vertical),this._scrollButtonsVisible&&this._adapter.updateScrollButtonIcons(this._vertical),this._adapter.toggleHostAttribute(K1.attributes.VERTICAL,this._vertical))}get clustered(){return this._clustered}set clustered(t){t=!!t,this._clustered!==t&&(this._clustered=t,this._adapter.toggleHostAttribute(N1.attributes.CLUSTERED,this._clustered))}get stacked(){return this._stacked}set stacked(t){t=!!t,this._stacked!==t&&(this._stacked=t,this._tabs.forEach(e=>e.stacked=this._stacked),this._adapter.toggleHostAttribute(N1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){t=!!t,this._secondary!==t&&(this._secondary=t,this._tabs.forEach(e=>e.secondary=this._secondary),this._adapter.toggleHostAttribute(N1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){t=!!t,this._inverted!==t&&(this._inverted=t,this._tabs.forEach(e=>e.inverted=this._inverted),this._adapter.toggleHostAttribute(N1.attributes.INVERTED,this._inverted))}get autoActivate(){return this._autoActivate}set autoActivate(t){t=!!t,this._autoActivate!==t&&(this._autoActivate=t,this._adapter.toggleHostAttribute(N1.attributes.AUTO_ACTIVATE,this._autoActivate))}get scrollButtons(){return this._scrollButtons}set scrollButtons(t){t=!!t,this._scrollButtons!==t&&(this._scrollButtons=!!t,this._isInitialized&&(this._scrollButtons?(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._detectScrollableStatus(),this._updateScrollState(),this._tryScrollActiveTabIntoView()):(this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._adapter.setScrollButtons(this._scrollButtons),this._scrollButtonsVisible=!1)),this._adapter.setHostAttribute(N1.attributes.SCROLL_BUTTONS,String(this._scrollButtons)))}};var jb='<template><div class="forge-tab-bar" part="container"><div class="scroll-container" part="scroll-container"><slot></slot></div></div></template>',Qb=":host{position:relative;display:block}:host([hidden]){display:none}.forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, space-between);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 1);--_tab-bar-divider-color:var(--forge-tab-bar-divider-color, var(--forge-theme-outline, #e0e0e0));--_tab-bar-divider-thickness:var(--forge-tab-bar-divider-thickness, 1px)}.forge-tab-bar{position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;align-items:center;border-bottom:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}.scroll-container{position:relative;display:flex;justify-content:var(--_tab-bar-justify);align-items:flex-end;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){flex:var(--_tab-bar-stretch);align-self:stretch}::slotted([selected]){z-index:1}forge-icon-button{--forge-icon-button-shape-squared:0px}:host([vertical]) .forge-tab-bar{grid-template-columns:none;grid-template-rows:auto 1fr auto;align-items:initial;border-bottom:none;border-right:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color);height:100%}:host([vertical]) .scroll-container{display:inline-flex;flex-direction:column;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .forge-tab-bar{border-bottom:none;border-top:variale(divider-thickness) solid var(--_tab-bar-divider-color)}:host([inverted][vertical]) .forge-tab-bar{border-bottom:none;border-top:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}:host([clustered]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 0)}:host([clustered=start]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start)}:host([clustered=center]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, center)}:host([clustered=end]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-end)}:host([theme=app-bar]){--forge-tab-active-color:var(--_app-bar-theme-foreground);--forge-tab-inactive-color:var(--_app-bar-theme-foreground-muted)}:host([theme=app-bar]) forge-icon-button{--forge-icon-button-icon-color:var(--_app-bar-theme-foreground)}",Ct=class extends V1(L1(M)){static get observedAttributes(){return Object.values(N1.observedAttributes)}constructor(){super(),X.define([v0,ze,Qa,h0]),H(this,jb,Qb),this._core=new N4(new P4(this))}connectedCallback(){this[N]({role:"tablist"},{setAttribute:!0}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case N1.observedAttributes.DISABLED:this.disabled=p(o);break;case N1.observedAttributes.ACTIVE_TAB:this.activeTab=o?K(o):void 0;break;case N1.observedAttributes.VERTICAL:this.vertical=p(o);break;case N1.observedAttributes.CLUSTERED:this.clustered=p(o);break;case N1.observedAttributes.STACKED:this.stacked=p(o);break;case N1.observedAttributes.SECONDARY:this.secondary=p(o);break;case N1.observedAttributes.INVERTED:this.inverted=p(o);break;case N1.observedAttributes.AUTO_ACTIVATE:this.autoActivate=p(o);break;case N1.observedAttributes.SCROLL_BUTTONS:this.scrollButtons=p(o);break}}};i([c()],Ct.prototype,"disabled",2),i([c()],Ct.prototype,"activeTab",2),i([c()],Ct.prototype,"vertical",2),i([c()],Ct.prototype,"clustered",2),i([c()],Ct.prototype,"stacked",2),i([c()],Ct.prototype,"secondary",2),i([c()],Ct.prototype,"inverted",2),i([c()],Ct.prototype,"autoActivate",2),i([c()],Ct.prototype,"scrollButtons",2),Ct=i([y({name:N1.elementName,dependencies:[Rt,i1,j]})],Ct);function mm(){f(Ct)}var Dn=`${b}time-picker`,dm={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},Jb={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${dm.TOGGLE}]`},ty={OPEN:`${Dn}-open`,CLOSE:`${Dn}-close`,INPUT:`${Dn}-input`,CHANGE:`${Dn}-change`},ey={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},W={elementName:Dn,attributes:dm,selectors:Jb,events:ty,numbers:ey};var R4=class extends I{constructor(t){super(t)}get inputElement(){return this._inputElement}initialize(){this._inputElement=this._component.querySelector(W.selectors.INPUT)}initializeMask(t){this.destroyMask(),this._inputElement&&(this._inputMask=new ys(this._inputElement,t))}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(t){var e,o,a,s,r,l,h,v,m;(e=this._inputElement)==null||e.setAttribute("autocomplete","off"),(o=this._inputElement)==null||o.setAttribute("autocorrect","off"),(a=this._inputElement)==null||a.setAttribute("autocapitalize","off"),(s=this._inputElement)==null||s.setAttribute("spellcheck","false"),(r=this._inputElement)==null||r.setAttribute("role","combobox"),(l=this._inputElement)==null||l.setAttribute("aria-live","assertive"),(h=this._inputElement)==null||h.setAttribute("aria-atomic","true"),(v=this._inputElement)==null||v.setAttribute("aria-haspopup","true"),(m=this._inputElement)==null||m.setAttribute("aria-expanded","false"),Ge(),this._inputElement&&Yt(this._inputElement)}addInputListener(t,e,o){var a;(a=this._inputElement)==null||a.addEventListener(t,e,{capture:o})}removeInputListener(t,e,o){var a;(a=this._inputElement)==null||a.removeEventListener(t,e,{capture:o})}addToggleListener(t,e){this._toggleElement&&this._toggleElement.addEventListener(t,e)}removeToggleListener(t,e){this._toggleElement&&this._toggleElement.removeEventListener(t,e)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let t=this._component.querySelector(E1.elementName),e=this._component.querySelector(W.selectors.TOGGLE);if(t){let o=t.querySelector(`${t1.elementName}[slot=trailing]`);if(o||e){this._toggleElement=o||e;return}let a=document.createElement(t1.elementName);a.slot="trailing",a.density="medium",a.type="button",a.tabIndex=-1,a.setAttribute("aria-label","Toggle time dropdown");let s=document.createElement(p1.elementName);s.name="clock_outline",a.appendChild(s),t.appendChild(a),this._toggleElement=a}else e&&(this._toggleElement=e)}tryFocusInput(){var t;(t=this._inputElement)==null||t.select()}tryBlurInput(){var t;(t=this._inputElement)==null||t.blur()}selectInputText(){var t;(t=this._inputElement)==null||t.select()}isInputDisabled(){var t,e;return(e=(t=this._inputElement)==null?void 0:t.disabled)!=null?e:!1}isInputFocused(){return Ue(this._component.ownerDocument)===this._inputElement}setInputValue(t,e){var o;((o=this._inputElement)==null?void 0:o.value)!==t&&(this._inputElement&&(this._inputElement.value=t),this._inputMask&&this._inputMask.update(),e&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){var t,e;return this._inputMask?this._inputMask.maskedValue:(e=(t=this._inputElement)==null?void 0:t.value)!=null?e:""}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString())),this.setToggleDisabled(t)}attachDropdown(t){var e;this._targetElement||(this._targetElement=this._getTargetElement(this._component.popupTarget)),this._listDropdown=new qe(this._targetElement,t),this._listDropdown.open(),(e=this._inputElement)==null||e.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`)}async detachDropdown({destroy:t=!1}={}){this._listDropdown&&(t?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0),this._inputElement&&Yt(this._inputElement)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}setActiveDescendant(t){this._inputElement&&G(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._getTargetElement(t).getBoundingClientRect().width}_emitInputEvent(t){var e;(e=this._inputElement)==null||e.dispatchEvent(new Event(t))}emitInputEvent(t,e){this._inputElement&&i0(this._inputElement,t,e)}setInputReadonly(t){this._inputElement&&(this._inputElement.readOnly=t)}setToggleDisabled(t){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",t.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=t;else{let e=this._toggleElement.querySelector("button");e&&(e.disabled=t)}}hasActiveOption(){var t,e;return((e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1)>=0}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}getActiveOption(){var t;return(t=this._listDropdown)==null?void 0:t.getActiveOption()}_getTargetElement(t){return this._targetElement?this._targetElement:(this._targetElement=t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){var e;let t=this._component.querySelector(E1.elementName);return(e=t==null?void 0:t.popoverTargetElement)!=null?e:this._component}};function F4(n,t,e){if(!n||/^\s*$/.test(n))return null;let o=0,a=0,s=0;if(Jo.test(n)){let r=Yl(n);o=+r.hours||0,a=+r.minutes||0,s=+r.seconds||0}else if(ps.test(n)){let r=Kl(n);o=+r.hours||0,a=+r.minutes||0,s=+r.seconds||0,o===12&&r.meridiem==="AM"&&(o=0),o<12&&r.meridiem==="PM"&&(o+=12)}else return null;return um(o)+Wa(a)+(e?y3(s):0)}function lt(n,t,e){if(typeof n!="number"||n<0)return null;let o=Math.min(gm(n),23),a=Math.min(wm(n),59),r=n/(1e3*60)<720?"AM":"PM";t||(o=o<=12?o:o-12,o===0&&(o=12));let l=`${String(o).padStart(2,"0")}:${String(a).padStart(2,"0")}`;if(e){let h=Math.min(b3(n),59);l+=`:${String(h).padStart(2,"0")}`}return t||(l+=` ${r}`),l}function gm(n){return Math.abs(Math.floor(n/(1e3*60*60)))}function wm(n){return Math.abs(Math.floor(U4(n)%60))}function U4(n){return n/(1e3*60)}function b3(n){return Math.abs(Math.floor(oy(n)%60))}function oy(n){return n/1e3}function um(n){return n*60*60*1e3}function Wa(n){return n*60*1e3}function y3(n){return n*1e3}function _m(n){return n-y3(b3(n))}function M3(n){let t=new Date,e=t.getHours(),o=t.getMinutes();return um(e)+Wa(o)+(n?y3(t.getSeconds()):0)}function cC1(n,t,e=!1){n||(n=new Date);let o=F4(t,!0,e);if(!o)return n.setHours(0,0,0),n;let a=gm(o),s=828e5;a>s?a=s:a<0&&(a=0);let r=wm(o),l=e?b3(o):0;return n.setHours(a,r,l),n}var W4=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=W.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=V2(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown({destroy:!0}),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,o;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":{t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown({emitCloseEvent:!0}));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((o=this._dropdownConfig)==null?void 0:o.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":{t.preventDefault();let a=M3(this._allowSeconds);if(this._value!==a){let s=lt(a,!0,this._allowSeconds);this._emitChangeEvent(s)&&(this._applyValue(a),this._selectInputText())}break}}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown({emitCloseEvent:!0}):(Q2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown({emitCloseEvent:!0})}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:Ne(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown({emitCloseEvent:!0})}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=lt(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(_m(this._value)),this._isInitialized&&t!==this._value){let e=lt(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown({emitCloseEvent:!0}),t=Xl(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let o;!this._masked&&typeof this._parseCallback=="function"?o=this._parseCallback.call(null,t):o=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),o=this._validateMillis(o),this._trySetValue(o)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(W.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=lt(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(W.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){return typeof t=="number"&&(typeof this._min=="number"||typeof this._max=="number")&&(this._isTimeInRange(t,this._min,this._max)||(t=null)),typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isTimeInRange(t,e,o){return typeof e!="number"&&typeof o!="number"?!0:typeof e=="number"&&typeof o!="number"?t>=e:typeof o=="number"&&typeof e!="number"?t<=o:typeof e=="number"&&typeof o=="number"?e<=o?t>=e&&t<=o:t>=e||t<=o:!0}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):$l(t)}_isValidInputValue(t){return Jo.test(t)}_onSelect(t){if(this._closeDropdown({emitCloseEvent:!0}),!t.isCustom&&t.metadata==="now"&&(t.time=M3(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let a=t.customCallback.call(null,t.metadata);if(typeof a!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=a}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=lt(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let o=this._formatValue(this._value);this._adapter.getInputValue()!==o&&this._adapter.setInputValue(o,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>W.numbers.MAX_DAY_MILLIS?W.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length||!this._adapter.inputElement)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(W.attributes.OPEN);let e=t.filter(s=>!s.divider&&!s.disabled),o=[],a=0;if(t.length)if(this._value!=null){let s=this._findClosestOptionIndex(this._value,e);s>=0&&(e[s].value.time===this._value?o=[e[s].value]:a=s)}else if(typeof this._startTime=="number"){let s=this._findClosestOptionIndex(this._startTime,e);s>=0&&s<e.length&&(a=s)}else this._startTime==null&&(a=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,referenceElement:this._adapter.inputElement,selectedValues:o,syncWidth:!0,visibleStartIndex:a,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:s=>this._onSelect(s),closeCallback:()=>this._closeDropdown({emitCloseEvent:!0}),activeChangeCallback:s=>this._adapter.setActiveDescendant(s),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(W.events.OPEN,void 0,!1)}_closeDropdown({destroy:t=!1,emitCloseEvent:e=!1}={}){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(W.attributes.OPEN),this._adapter.detachDropdown({destroy:t}),e&&this._adapter.emitHostEvent(W.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,o=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,a=F4(o,!0,!1);return this._findClosestOptionIndex(a,t)}_findClosestOptionIndex(t,e){let o=e.reduce((a,s)=>Math.abs((s.value.time||0)-t)<Math.abs((a.value.time||0)-t)?s:a);return e.indexOf(o)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let o=this._formatValue(this._value);e!==o&&(this._adapter.setInputValue(o,t),this._adapter.emitInputEvent(W.events.INPUT,o))}_generateTimeOptions(){let t=this._min!=null?Math.max(U4(this._min),0):0,e=this._max!=null?Math.min(U4(this._max),W.numbers.MAX_DAY_MINUTES):W.numbers.MAX_DAY_MINUTES,o=this._step,a=[],s=[];if(this._showHourOptions){let r=this._min!=null&&this._max!=null&&this._min>this._max;if(r){for(let l=t;l<W.numbers.MAX_DAY_MINUTES;l+=o){let h=Wa(l),v=this._restrictedTimes.includes(h),m=lt(h,this._use24HourTime,!1)||"",u={time:h};a.push({label:m,value:u,disabled:v})}for(let l=0;l<=e;l+=o){let h=Wa(l),v=this._restrictedTimes.includes(h),m=lt(h,this._use24HourTime,!1)||"",u={time:h};a.push({label:m,value:u,disabled:v})}}else{let l=this._min!=null?t:0,h=this._max!=null?e:W.numbers.MAX_DAY_MINUTES;for(let v=l;v<=h&&v!==W.numbers.MAX_DAY_MINUTES;v+=o){let m=Wa(v),u=this._restrictedTimes.includes(m),z=lt(m,this._use24HourTime,!1)||"",x={time:m};a.push({label:z,value:x,disabled:u})}}if(!r){let l=a.findIndex(h=>h.value.time/1e3/60>=720);l>=0&&l<a.length-1&&a.splice(l,0,{label:"",value:null,divider:!0})}}if(this._showNow){let r={time:null,metadata:"now"};s.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(l=>{let h={time:null,metadata:l.value,isCustom:!0,customCallback:l.toMilliseconds};return{label:l.label,value:h}});s=[...s,...r]}return s.length&&(a.length&&a.splice(0,0,{label:"",value:null,divider:!0}),s.forEach((r,l)=>a.splice(l,0,r))),a}_convertTimeStringToMillis(t,e,o){return(!t||!this._isValidTimeFormat(t))&&(t=""),F4(t,e,o)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):lt(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(W.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(W.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(W.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return lt(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return lt(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._value,o=this._validateMillis(this._value);if(this._setValue(o),this._isInitialized&&(this._applyValue(o),e!==o)){let a=lt(o,!0,this._allowSeconds);this._emitChangeEvent(a)}}}get max(){return lt(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._value,o=this._validateMillis(this._value);if(this._setValue(o),this._isInitialized&&(this._applyValue(o),e!==o)){let a=lt(o,!0,this._allowSeconds);this._emitChangeEvent(a)}}}get restrictedTimes(){return this._restrictedTimes.map(t=>lt(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return lt(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(W.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var ay="<template><slot></slot></template>",ny=":host{display:block}:host([hidden]){display:none}",W1=class extends M{static get observedAttributes(){return[W.attributes.VALUE,W.attributes.OPEN,W.attributes.ALLOW_SECONDS,W.attributes.MASKED,W.attributes.SHOW_MASK_FORMAT,W.attributes.USE_24_HOUR_TIME,W.attributes.ALLOW_INVALID_TIME,W.attributes.MIN,W.attributes.MAX,W.attributes.START_TIME,W.attributes.STEP,W.attributes.ALLOW_INPUT,W.attributes.SHOW_NOW,W.attributes.SHOW_HOUR_OPTIONS,W.attributes.DISABLED,W.attributes.POPUP_CLASSES,W.attributes.ALLOW_DROPDOWN]}constructor(){super(),X.define([ml,jo]),H(this,ay,ny),this._core=new W4(new R4(this))}connectedCallback(){this.querySelector(W.selectors.INPUT)?this._core.initialize():C0(this,W.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case W.attributes.VALUE:this.value=o;break;case W.attributes.OPEN:this.open=p(o);break;case W.attributes.ALLOW_SECONDS:this.allowSeconds=p(o);break;case W.attributes.MASKED:this.masked=p(o);break;case W.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(o);break;case W.attributes.USE_24_HOUR_TIME:this.use24HourTime=p(o);break;case W.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=p(o);break;case W.attributes.SHOW_NOW:this.showNow=p(o);break;case W.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=p(o);break;case W.attributes.MIN:this.min=o;break;case W.attributes.MAX:this.max=o;break;case W.attributes.START_TIME:this.startTime=o;break;case W.attributes.STEP:this.step=K(o);break;case W.attributes.ALLOW_INPUT:this.allowInput=p(o);break;case W.attributes.DISABLED:this.disabled=p(o);break;case W.attributes.POPUP_CLASSES:this.popupClasses=o;break;case W.attributes.ALLOW_DROPDOWN:this.allowDropdown=p(o);break}}};i([c()],W1.prototype,"value",2),i([c()],W1.prototype,"open",2),i([c()],W1.prototype,"allowSeconds",2),i([c()],W1.prototype,"masked",2),i([c()],W1.prototype,"showMaskFormat",2),i([c()],W1.prototype,"use24HourTime",2),i([c()],W1.prototype,"allowInvalidTime",2),i([c()],W1.prototype,"min",2),i([c()],W1.prototype,"max",2),i([c()],W1.prototype,"restrictedTimes",2),i([c()],W1.prototype,"startTime",2),i([c()],W1.prototype,"step",2),i([c()],W1.prototype,"allowInput",2),i([c()],W1.prototype,"showNow",2),i([c()],W1.prototype,"showHourOptions",2),i([c()],W1.prototype,"customOptions",2),i([c()],W1.prototype,"validationCallback",2),i([c()],W1.prototype,"parseCallback",2),i([c()],W1.prototype,"formatCallback",2),i([c()],W1.prototype,"coercionCallback",2),i([c()],W1.prototype,"prepareMaskCallback",2),i([c()],W1.prototype,"disabled",2),i([c()],W1.prototype,"popupClasses",2),i([c()],W1.prototype,"allowDropdown",2),i([c()],W1.prototype,"popupTarget",2),W1=i([y({name:W.elementName,dependencies:[v2,j1,i1,j,R1,j,B1]})],W1);var xm=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(W.elementName);return this._attachTextField(t),t}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(W.events.CHANGE,e=>{var o;return t((o=e.detail)!=null?o:"")})}onInput(t){this._element.addEventListener(W.events.INPUT,e=>{var o;return t((o=e.detail)!=null?o:"")})}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var o,a,s,r;let e={props:d({},(a=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(r=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:r.options)};this._textFieldDelegate=new ao(e),t.appendChild(this._textFieldDelegate.element)}};function fm(){f(W1)}var z3=`${b}toast`,bm={OPEN:"open",DURATION:"duration",PLACEMENT:"placement",ACTION_TEXT:"action-text",DISMISSIBLE:"dismissible",DISMISS_LABEL:"dismiss-label",THEME:"theme"},sy=d({},bm),ry={ACTION:`${z3}-action`,CLOSE:`${z3}-close`},iy={EXITING:"exiting"},ly={SURFACE:".surface",ACTION_BUTTON:".action-button",CLOSE_BUTTON:".close-button"},cy={PLACEMENT:"bottom",DURATION:2750,THEME:"default"},k1={elementName:z3,observedAttributes:bm,attributes:sy,classes:iy,selectors:ly,defaults:cy,events:ry};var G4=class extends I{constructor(t){super(t),this._overlayElement=w(t,B.elementName),this._surfaceElement=w(t,k1.selectors.SURFACE),this._actionButtonElement=w(t,k1.selectors.ACTION_BUTTON),this._closeButtonElement=w(t,k1.selectors.CLOSE_BUTTON)}show(){this._overlayElement.open=!0}async hide(){await Gt(this._surfaceElement,k1.classes.EXITING),this._overlayElement.open=!1}addCloseListener(t){this._closeButtonElement.addEventListener("click",t)}removeCloseListener(t){this._closeButtonElement.removeEventListener("click",t)}addActionListener(t){this._actionButtonElement.addEventListener("click",t)}removeActionListener(t){this._actionButtonElement.removeEventListener("click",t)}setDismissLabel(t){this._closeButtonElement.setAttribute("aria-label",t)}setActionText(t){this._actionButtonElement.textContent=t,t?this._actionButtonElement.removeAttribute("hidden"):this._actionButtonElement.setAttribute("hidden","")}};var q4=class{constructor(t){this._adapter=t;this._open=!1;this._duration=k1.defaults.DURATION;this._placement=k1.defaults.PLACEMENT;this._dismissible=!1;this._theme=k1.defaults.THEME;this._actionListener=this._onAction.bind(this);this._closeListener=this._onClose.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["duration","placement","dismissible"]),this._open&&this.show()}show(){this._adapter.show(),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout&&window.clearTimeout(this._hideTimeout),this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration)),this._open=!0,this._adapter.toggleHostAttribute(k1.attributes.OPEN,this._open)}async hide({dispatchEvent:t=!0}={}){this._hideTimeout&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=void 0),await this._adapter.hide(),this._open=!1,this._adapter.toggleHostAttribute(k1.attributes.OPEN,this._open),t&&this._adapter.dispatchHostEvent(new CustomEvent(k1.events.CLOSE,{bubbles:!0}))}_onAction(t){t.stopPropagation(),this._adapter.dispatchHostEvent(new CustomEvent(k1.events.ACTION,{bubbles:!0}))}_onClose(t){this.hide()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._adapter.isConnected?t?this.show():this.hide({dispatchEvent:!1}):this._open=t,this._adapter.toggleHostAttribute(k1.attributes.OPEN,this._open))}get duration(){return this._duration}set duration(t){this._duration!==t&&(this._duration=t,this._hideTimeout&&(window.clearTimeout(this._hideTimeout),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration))))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(k1.attributes.PLACEMENT,this._placement))}get actionText(){return this._actionText}set actionText(t){var e;t=(e=t==null?void 0:t.trim())!=null?e:"",this._actionText!==t&&(this._actionText=t,this._adapter.setActionText(this._actionText),this._actionText?this._adapter.addActionListener(this._actionListener):this._adapter.removeActionListener(this._actionListener),this._adapter.toggleHostAttribute(k1.attributes.ACTION_TEXT,!!this._actionText,this._actionText))}get dismissible(){return this._dismissible}set dismissible(t){t=!!t,this._dismissible!==t&&(this._dismissible=t,this._dismissible?this._adapter.addCloseListener(this._closeListener):this._adapter.removeCloseListener(this._closeListener),this._adapter.toggleHostAttribute(k1.attributes.DISMISSIBLE,this._dismissible))}get dismissLabel(){return this._dismissLabel}set dismissLabel(t){this._dismissLabel!==t&&(this._dismissLabel=t,this._adapter.setDismissLabel(this._dismissLabel))}get theme(){return this._theme}set theme(t){t!=null||(t=k1.defaults.THEME),this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(k1.attributes.THEME,this._theme))}};var hy='<template><forge-overlay exportparts="root:overlay" no-anchor persistent><div class="surface" part="surface"><slot name="icon"></slot><div class="message" part="message"><slot></slot></div><forge-button hidden part="action-button" class="action-button"></forge-button><forge-icon-button part="close-button" class="close-button" aria-label="Dismiss" density="medium"><forge-icon name="close"></forge-icon></forge-icon-button></div></forge-overlay></template>',vy='@keyframes slidein{from{transform:translateY(var(--_toast-slide-origin))}to{transform:translateY(0)}}@keyframes slideout{from{transform:translateY(0)}to{transform:translateY(var(--_toast-slide-origin))}}@keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadeout{from{opacity:1}to{opacity:0}}@layer base,open,theme,placement,media; @layer base{:host{display:contents}:host([hidden]){display:none}.surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-surface-inverse, #333333));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-surface-inverse, #ffffff));--_toast-offset:var(--forge-toast-offset, var(--forge-spacing-medium, 16px));--_toast-shape:var(--forge-toast-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toast-elevation:var(--forge-toast-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_toast-action-color:var(--forge-toast-action-color, var(--forge-theme-secondary, #ffc107));--_toast-min-width:var(--forge-toast-min-width, 344px);--_toast-max-width:var(--forge-toast-max-width, 672px);--_toast-min-height:var(--forge-toast-min-height, 48px);--_toast-inline-padding:var(--forge-toast-inline-padding, var(--forge-spacing-medium, 16px));--_toast-spacing:var(--forge-toast-spacing, var(--forge-spacing-xsmall, 8px));--_toast-message-padding:var(--forge-toast-message-padding, var(--forge-spacing-xsmall, 8px));--_toast-enter-duration:var(--forge-toast-enter-duration, var(--forge-animation-duration-medium1, 250ms));--_toast-enter-timing:var(--forge-toast-enter-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_toast-exit-duration:var(--forge-toast-exit-duration, var(--forge-animation-duration-short4, 200ms));--_toast-exit-timing:var(--forge-toast-exit-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_toast-slide-origin:var(--forge-toast-slide-origin, 100%)}.surface{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:fixed;display:flex;align-items:center;column-gap:var(--_toast-spacing);border-radius:var(--_toast-shape);padding-inline:var(--_toast-inline-padding);margin:var(--_toast-offset);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);min-height:var(--_toast-min-height);box-sizing:border-box;background:var(--_toast-background);color:var(--_toast-color);box-shadow:var(--_toast-elevation)}.message{flex-grow:1;padding-block:var(--_toast-message-padding);text-overflow:ellipsis;overflow:hidden}forge-button.action-button{--forge-button-primary-color:var(--_toast-action-color)}forge-icon-button.close-button{--forge-icon-button-focus-indicator-color:var(--_toast-color)}:host(:not([dismissible])) .close-button{display:none}.action-button:not([hidden]){margin-inline-end:-8px}:host([dismissible]) .close-button{margin-inline-end:-8px}}@layer theme{:host([theme=primary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-primary, #3f51b5));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-primary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=secondary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-secondary, #ffc107));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-secondary, #000000));--_toast-action-color:var(--_toast-color)}:host([theme=tertiary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-tertiary, #3d5afe));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-tertiary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=success]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-success, #2e7d32));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-success, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=warning]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-warning, #d14900));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-warning, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=error]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-error, #b00020));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-error, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=info]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-info, #1565c0));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-info, #ffffff));--_toast-action-color:var(--_toast-color)}}@layer open{forge-overlay[open] .surface{animation-name:slidein;animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-timing)}forge-overlay[open] .surface.exiting{animation-name:slideout;animation-duration:var(--_toast-exit-duration);animation-timing-function:var(--_toast-exit-timing)}}@layer placement{:host([placement=bottom-start]) .surface{bottom:0;left:0}:host(:is(:not([placement]),[placement=bottom])) .surface{bottom:0;left:50%;translate:-50%}:host([placement=bottom-end]) .surface{bottom:0;right:0}:host([placement=top-start]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:0}:host([placement=top]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:50%;translate:-50%}:host([placement=top-end]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;right:0}}@layer media{@media (prefers-reduced-motion:reduce){forge-overlay[open] .surface{animation-name:fadein}forge-overlay[open] .surface.exiting{animation-name:fadeout}}@media (max-width:599px){:host([placement^=top]) .surface{bottom:auto;top:0}.surface{bottom:0;left:0;right:0;margin:0;translate:none;max-width:none;min-width:auto;border-radius:0}}}',Jt=class extends L1(V1(M)){static get observedAttributes(){return Object.values(k1.observedAttributes)}constructor(){super(),X.define(jo),H(this,hy,vy),this._core=new q4(new G4(this))}connectedCallback(){this.hasAttribute("role")||this.getAttribute("aria-hidden")==="true"||this[N]({role:"alert",ariaLive:"assertive",ariaAtomic:"true"}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case k1.attributes.OPEN:this.open=p(o);break;case k1.attributes.DURATION:{let a=Number(o);this.duration=a&&a>0?a:k1.defaults.DURATION;break}case k1.attributes.PLACEMENT:this.placement=o||k1.defaults.PLACEMENT;break;case k1.attributes.ACTION_TEXT:this.actionText=o;break;case k1.attributes.DISMISSIBLE:this.dismissible=p(o);break;case k1.attributes.DISMISS_LABEL:this.dismissLabel=o;break;case k1.attributes.THEME:this.theme=o;break}}show(){this._core.show()}hide(){return this._core.hide()}static present(l){var h=l,{message:t,element:e,icon:o,className:a,topLayer:s}=h,r=O1(h,["message","element","icon","className","topLayer"]);let v=document.createElement(k1.elementName);if(e?v.appendChild(e):t&&v.append(t),o){let u=document.createElement("forge-icon");Object.assign(u,o),u.slot="icon",v.appendChild(u)}if(a){let u=Array.isArray(a)?a:[a];v.classList.add(...u)}return r&&Object.assign(v,r),(s&&Array.from(B1[b0]).at(-1)||document.body).appendChild(v),v.open=!0,v.addEventListener(k1.events.CLOSE,()=>v.remove()),v}};i([c()],Jt.prototype,"open",2),i([c()],Jt.prototype,"duration",2),i([c()],Jt.prototype,"placement",2),i([c()],Jt.prototype,"actionText",2),i([c()],Jt.prototype,"dismissible",2),i([c()],Jt.prototype,"dismissLabel",2),i([c()],Jt.prototype,"theme",2),Jt=i([y({name:k1.elementName,dependencies:[d2,T2,i1,j]})],Jt);function ym(){f(Jt)}var py=`${b}view-switcher`,H3={ROOT:"forge-view-switcher",VIEW_HIDDEN:"forge-view-switcher__view--hidden",VIEW_SWITCHER_SLIDE:"slide",VIEW_SWITCHER_FADE:"fade"},my={ROOT:`.${H3.ROOT}`,DEFAULT_SLOT:"slot:not([name])",VIEW_HIDDEN:`.${H3.VIEW_HIDDEN}`},dy={INDEX:"index",ANIMATION_TYPE:"animation-type"},gy={DEFAULT_TRANSITION_DURATION:500},e2={elementName:py,attributes:dy,classes:H3,selectors:my,numbers:gy},I3=(e=>(e.Left="left",e.Right="right",e))(I3||{}),wy=(o=>(o.None="none",o.Slide="slide",o.Fade="fade",o))(wy||{});var Y4=class extends I{constructor(t){super(t),this._rootElement=w(t,e2.selectors.ROOT),this._slotElement=w(t,e2.selectors.DEFAULT_SLOT)}getViewCount(){return this._getViews().length}startViewObserver(t){this._viewObserver=new MutationObserver(t),this._viewObserver.observe(this._component,{childList:!0})}stopViewObserver(){var t;(t=this._viewObserver)==null||t.disconnect()}initializeSlideViews(t){let e=this._getViews();e.forEach((o,a)=>{if(o.style.removeProperty("opacity"),o.style.removeProperty("display"),a===t){e[t].classList.remove(e2.classes.VIEW_HIDDEN),o.style.removeProperty("visibility");return}o.style.transition="none",o.classList.add(e2.classes.VIEW_HIDDEN),o.style.visibility="hidden",a>t?o.style.transform="translate3d(100%, 0, 0)":o.style.transform="translate3d(-100%, 0, 0)"}),window.requestAnimationFrame(()=>{e=this._getViews(),e.forEach((o,a)=>{a!==t&&o.style.removeProperty("transition")})})}initializeFadeViews(t){let e=this._getViews();e.forEach((o,a)=>{if(o.style.removeProperty("transform"),o.style.removeProperty("display"),a===t){o.classList.remove(e2.classes.VIEW_HIDDEN),o.style.removeProperty("visibility");return}o.classList.add(e2.classes.VIEW_HIDDEN),o.style.visibility="hidden"}),e[t]&&(e[t].style.opacity="1")}setActiveView(t){let e=this._getViews();e.forEach((o,a)=>{a!==t&&(o.classList.add(e2.classes.VIEW_HIDDEN),o.style.display="none")}),e[t]&&(e[t].classList.remove(e2.classes.VIEW_HIDDEN),e[t].style.removeProperty("display"))}hideInactiveViews(t){this._getViews().forEach((o,a)=>{if(o.style.removeProperty("opacity"),o.style.removeProperty("transform"),o.style.removeProperty("visibility"),a===t){o.classList.remove(e2.classes.VIEW_HIDDEN);return}o.classList.add(e2.classes.VIEW_HIDDEN),o.style.display="none"})}async transitionToView(t,e,o,a){let s=this._getViews(),r=s[t],l=s[e];return new Promise(h=>{l.style.removeProperty("visibility"),window.requestAnimationFrame(()=>{let v;switch(o){case"slide":this._slideToView(r,l,a),v="transform";break;case"fade":this._fadeToView(r,l),v="opacity";break;default:return}this._animateHeight(r,l),r?r.addEventListener("transitionend",m):l.classList.remove(e2.classes.VIEW_HIDDEN);function m(u){u.propertyName===v&&(r.removeEventListener("transitionend",m),l.classList.remove(e2.classes.VIEW_HIDDEN),h())}})})}_slideToView(t,e,o){o==="left"?(t&&(t.style.transform="translate3d(-100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)"):(t&&(t.style.transform="translate3d(100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)")}_fadeToView(t,e){t&&(t.style.opacity="0"),e.style.opacity="1"}_animateHeight(t,e){let o=t?this._getViewHeight(t):0,a=this._getViewHeight(e);o!==a&&(this._rootElement.addEventListener("transitionend",this._onRootTransitionEnd.bind(this)),this._setHeight(o),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._setHeight(a)})}))}_onRootTransitionEnd(t){t.propertyName==="height"&&(this._rootElement.removeEventListener("transitionend",this._onRootTransitionEnd),this._rootElement.style.removeProperty("height"))}setAnimationType(t){switch(ye([e2.classes.VIEW_SWITCHER_SLIDE,e2.classes.VIEW_SWITCHER_FADE],this._component),t){case"slide":this._component.classList.add(e2.classes.VIEW_SWITCHER_SLIDE);break;case"fade":this._component.classList.add(e2.classes.VIEW_SWITCHER_FADE);break}}_getViews(){return this._slotElement.assignedNodes().filter(t=>t.nodeType===1)}_setHeight(t){this._rootElement.style.height=`${t}px`}_getViewHeight(t){let e=0,o=t.children.length?Array.from(t.children):[t];for(let a of o){let s=window.getComputedStyle(a),r=parseFloat(s.marginTop)+parseFloat(s.marginBottom);e+=Math.ceil(a.offsetHeight+r)}return e}};var K4=class{constructor(t){this._adapter=t;this._viewCount=0;this._viewIndex=0;this._animationType="none";this._viewsChangedListener=()=>this._onViewsChanged()}initialize(){this._viewCount=this._adapter.getViewCount(),this._adapter.startViewObserver(this._viewsChangedListener),this._adapter.setAnimationType(this._animationType),this._viewCount&&this._initializeAnimationType()}destroy(){this._adapter.stopViewObserver()}_initializeAnimationType(){switch(this._animationType){case"slide":this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.hideInactiveViews(this._viewIndex);break}}_onViewsChanged(){if(this._viewCount=this._adapter.getViewCount(),this._viewCount===0&&(this._viewIndex=0),this._viewCount&&this._initializeAnimationType(),this._viewCount>0&&this._viewIndex>=this._viewCount){let t=this._viewIndex;this._viewIndex=this._viewCount>0?this._viewCount-1:0,this._goToView(t,this._viewCount)}}async _goToView(t,e){if(this._viewCount=O(e)?e:this._adapter.getViewCount(),!(!(this._viewIndex>=0&&this._viewIndex<=this._viewCount-1)||t===this._clampedViewIndex(this._viewIndex,this._viewCount)))switch(this._animationType){case"slide":{let a=this._viewIndex>t?"left":"right";await this._adapter.transitionToView(t,this._viewIndex,"slide",a),this._adapter.initializeSlideViews(this._viewIndex);break}case"fade":await this._adapter.transitionToView(t,this._viewIndex,"fade"),this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.setActiveView(this._viewIndex);break}}_clampedViewIndex(t,e){return t<0?t=0:t>e-1&&(t=e>0?e-1:0),t}next(){this.index++}previous(){this.index--}goToStart(){this.index=0}goToEnd(){this.index=this._viewCount-1}get index(){return this._viewIndex}set index(t){if(this._viewIndex!==t){let e=this._viewIndex;this._viewIndex=t,this._goToView(e),this._adapter.setHostAttribute(e2.attributes.INDEX,this._viewIndex.toString())}}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._initializeAnimationType(),this._adapter.setAnimationType(this._animationType),this._adapter.setHostAttribute(e2.attributes.ANIMATION_TYPE,this._animationType))}};var uy=`${b}view`,Mm={elementName:uy};var _y="<template><slot></slot></template>",xy=":host{display:block}:host([hidden]){display:none}",mo=class extends M{constructor(){super(),H(this,_y,xy)}};mo=i([y({name:Mm.elementName})],mo);var fy='<template><div class="forge-view-switcher" part="root"><slot></slot></div></template>',by=":host{height:var(--_view-switcher-height);width:var(--_view-switcher-width);display:block}:host{--_view-switcher-height:var(--forge-view-switcher-height, auto);--_view-switcher-width:var(--forge-view-switcher-width, auto)}:host([hidden]){display:none}.forge-view-switcher{--_view-switcher-animation-duration:var(--forge-view-switcher-animation-duration, var(--forge-animation-duration-medium2, 300ms));--_view-switcher-animation-easing:var(--forge-view-switcher-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-view-switcher{height:var(--_view-switcher-height);width:var(--_view-switcher-width);position:relative;overflow:hidden;transition-property:height;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host(.slide) ::slotted(forge-view){transition-property:transform;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:transform}:host(.fade) ::slotted(forge-view){transition-property:opacity;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:opacity}:host(.fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}",go=class extends M{static get observedAttributes(){return[e2.attributes.INDEX,e2.attributes.ANIMATION_TYPE]}constructor(){super(),H(this,fy,by),this._core=new K4(new Y4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case e2.attributes.INDEX:this.index=K(o);break;case e2.attributes.ANIMATION_TYPE:this.animationType=o;break}}next(){this._core.next()}previous(){this._core.previous()}goToStart(){this._core.goToStart()}goToEnd(){this._core.goToEnd()}};i([c()],go.prototype,"index",2),i([c()],go.prototype,"animationType",2),go=i([y({name:e2.elementName,dependencies:[mo]})],go);function zm(){f(mo)}function Hm(){f(go)}var yy=`${b}deprecated-button`,My={TYPE:"type",DISABLED:"disabled",FULL_WIDTH:"full-width"},zy={BUTTON:"button,a"},Ft={elementName:yy,attributes:My,selectors:zy};var Hy='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Iy=':host{--_button-primary-color:var(--forge-button-primary-color, var(--forge-theme-primary, #3f51b5));--_button-text-color:var(--forge-button-text-color, var(--_button-primary-color));--_button-disabled-color:var(--forge-button-disabled-color, var(--forge-theme-surface-container, #e0e0e0));--_button-padding:var(--forge-button-padding, var(--forge-spacing-medium, 16px));--_button-display:var(--forge-button-display, inline-grid);--_button-justify:var(--forge-button-justify, center);--_button-shape:var(--forge-button-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-height:var(--forge-button-height, 36px);--_button-min-width:var(--forge-button-min-width, 64px);--_button-spacing:var(--forge-button-spacing, var(--forge-spacing-xsmall, 8px));--_button-border-width:var(--forge-button-border-width, medium);--_button-border-style:var(--forge-button-border-style, none);--_button-border-color:var(--forge-button-border-color, currentColor);--_button-shape-start-start-radius:var(--forge-button-shape-start-start-radius, var(--_button-shape));--_button-shape-start-end-radius:var(--forge-button-shape-start-end-radius, var(--_button-shape));--_button-shape-end-start-radius:var(--forge-button-shape-end-start-radius, var(--_button-shape));--_button-shape-end-end-radius:var(--forge-button-shape-end-end-radius, var(--_button-shape));--_button-padding-block:var(--forge-button-padding-block, var(--_button-0));--_button-padding-inline:var(--forge-button-padding-inline, var(--_button-padding));--_button-background:var(--forge-button-background, transparent);--_button-hover-background:var(--forge-button-hover-background, var(--_button-background));--_button-active-background:var(--forge-button-active-background, var(--_button-background));--_button-color:var(--forge-button-color, var(--_button-text-color));--_button-icon-size:var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_button-shadow:var(--forge-button-shadow, none);--_button-hover-shadow:var(--forge-button-hover-shadow, none);--_button-active-shadow:var(--forge-button-active-shadow, none);--_button-cursor:var(--forge-button-cursor, pointer);--_button-transition-duration:var(--forge-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-transition-timing:var(--forge-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-text-padding-inline:var(--forge-button-text-padding-inline, var(--forge-spacing-xsmall, 8px));--_button-outlined-background:var(--forge-button-outlined-background, transparent);--_button-outlined-color:var(--forge-button-outlined-color, var(--_button-primary-color));--_button-outlined-border-width:var(--forge-button-outlined-border-width, var(--forge-border-thin, 1px));--_button-outlined-border-style:var(--forge-button-outlined-border-style, solid);--_button-outlined-border-color:var(--forge-button-outlined-border-color, var(--_button-primary-color));--_button-tonal-background:var(--forge-button-tonal-background, var(--forge-theme-primary-container, #d1d5ed));--_button-tonal-disabled-background:var(--forge-button-tonal-disabled-background, var(--_button-disabled-color));--_button-tonal-color:var(--forge-button-tonal-color, var(--forge-theme-on-primary-container, #222c62));--_button-tonal-disabled-color:var(--forge-button-tonal-disabled-color, var(--_button-disabled-text-color));--_button-filled-background:var(--forge-button-filled-background, var(--_button-primary-color));--_button-filled-disabled-background:var(--forge-button-filled-disabled-background, var(--_button-disabled-color));--_button-filled-color:var(--forge-button-filled-color, var(--forge-theme-on-primary, #ffffff));--_button-filled-disabled-color:var(--forge-button-filled-disabled-color, var(--_button-disabled-text-color));--_button-raised-background:var(--forge-button-raised-background, var(--_button-primary-color));--_button-raised-disabled-background:var(--forge-button-raised-disabled-background, var(--_button-disabled-color));--_button-raised-color:var(--forge-button-raised-color, var(--forge-theme-on-primary, #ffffff));--_button-raised-disabled-color:var(--forge-button-raised-disabled-color, var(--_button-disabled-text-color));--_button-raised-shadow:var(--forge-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_button-raised-hover-shadow:var(--forge-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_button-raised-active-shadow:var(--forge-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_button-raised-disabled-shadow:var(--forge-button-raised-disabled-shadow, none);--_button-link-color:var(--forge-button-link-color, var(--_button-primary-color));--_button-link-text-decoration:var(--forge-button-link-text-decoration, underline);--_button-link-height:var(--forge-button-link-height, auto);--_button-link-padding:var(--forge-button-link-padding, 0);--_button-link-line-height:var(--forge-button-link-line-height, normal);--_button-link-width:var(--forge-button-link-width, auto);--_button-link-hover-text-decoration:var(--forge-button-link-hover-text-decoration, none);--_button-link-active-opacity:var(--forge-button-link-active-opacity, 0.65);--_button-link-transition-duration:var(--forge-button-link-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-link-transition-timing:var(--forge-button-link-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-disabled-cursor:var(--forge-button-disabled-cursor, not-allowed);--_button-disabled-text-color:var(--forge-button-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-disabled-background:var(--forge-button-disabled-background, transparent);--_button-disabled-border-color:var(--forge-button-disabled-border-color, var(--_button-disabled-color));--_button-disabled-shadow:var(--forge-button-disabled-shadow, none);--_button-dense-height:var(--forge-button-dense-height, 24px);--_button-pill-shape:var(--forge-button-pill-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_button-pill-padding-inline:var(--forge-button-pill-padding-inline, var(--forge-spacing-small, 12px));--_button-focus-indicator-offset:var(--forge-button-focus-indicator-offset, 4px);--_button-text-focus-indicator-offset:var(--forge-button-text-focus-indicator-offset, 0px);--_button-link-focus-indicator-offset:var(--forge-button-link-focus-indicator-offset, 2px);--_button-popover-icon-transition-duration:var(--forge-button-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-popover-icon-transition-timing:var(--forge-button-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-popover-icon-open-rotation:var(--forge-button-popover-icon-open-rotation, 180deg)}:host{display:var(--_button-display);position:relative;outline:0;vertical-align:middle;-webkit-tap-highlight-color:transparent;border-radius:var(--_button-shape)}:host([hidden]){display:none}::slotted(:is(button,a)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-display);grid-auto-flow:column;align-items:center;justify-content:var(--_button-justify);gap:var(--_button-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-min-width);height:var(--_button-height);inline-size:100%;border-width:var(--_button-border-width);border-style:var(--_button-border-style);border-color:var(--_button-border-color);border-start-start-radius:var(--_button-shape-start-start-radius);border-start-end-radius:var(--_button-shape-start-end-radius);border-end-start-radius:var(--_button-shape-end-start-radius);border-end-end-radius:var(--_button-shape-end-end-radius);padding-block:var(--_button-padding-block);padding-inline:var(--_button-padding-inline);box-shadow:var(--_button-shadow);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-background);color:var(--_button-color);cursor:var(--_button-cursor);transition-property:box-shadow,background;transition-duration:var(--_button-transition-duration);transition-timing-function:var(--_button-transition-timing);--forge-icon-font-size:1.25em}::slotted(:is(button,a))::-moz-focus-inner{padding:0;border:0}::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-hover-shadow);background:var(--_button-hover-background)}::slotted(:is(button,a)):active{--_button-shadow:var(--_button-active-shadow);background:var(--_button-active-background)}::slotted(a){text-decoration:none;--forge-typography-link-text-decoration:none}forge-state-layer{--forge-state-layer-color:var(--_button-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_button-primary-color);--forge-focus-indicator-outward-offset:var(--_button-focus-indicator-offset)}:host(:is([type*=unelevated],[type*=raised])) ::slotted(:is(button,a)){--_button-background:var(--_button-filled-background);--_button-color:var(--_button-filled-color)}:host(:is([type*=unelevated],[type*=raised])) forge-state-layer{--forge-state-layer-color:var(--_button-filled-color)}:host([type*=raised]) ::slotted(:is(button,a)){--_button-background:var(--_button-raised-background);--_button-color:var(--_button-raised-color);--_button-shadow:var(--_button-raised-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-raised-hover-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):active{--_button-shadow:var(--_button-raised-active-shadow)}:host([type*=outlined]) ::slotted(:is(button,a)){--_button-background:var(--_button-outlined-background);--_button-color:var(--_button-outlined-color);--_button-border-width:var(--_button-outlined-border-width);--_button-border-style:var(--_button-outlined-border-style);--_button-border-color:var(--_button-outlined-border-color)}:host([full-width]){width:100%}:host(:is([dense],[type*=dense])) ::slotted(:is(button,a)){--_button-height:var(--_button-dense-height)}:host([disabled]){cursor:var(--_button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-disabled-background);--_button-color:var(--_button-disabled-text-color);--_button-shadow:var(--_button-disabled-shadow);pointer-events:none}:host([type*=outlined][disabled]) ::slotted(button[disabled]){--_button-border-color:var(--_button-disabled-border-color)}:host(:is([type*=unelevated],[type*=raised])[disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-filled-disabled-background);--_button-color:var(--_button-filled-disabled-color)}:host([type*=raised][disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-raised-disabled-background);--_button-color:var(--_button-raised-disabled-color);--_button-shadow:var(--_button-raised-disabled-shadow)}',Ga=class extends M{constructor(){super();this._buttonOrAnchorElement=null;this._disabled=!1;this._fullWidth=!1;this._buttonChangeListener=this._onButtonChange.bind(this);this._keydownListener=e=>this._onKeydown(e);H(this,Hy,Iy),this._slotElement=w(this,"slot:not([name])"),this._focusIndicator=w(this,w1.elementName),this._stateLayer=w(this,I1.elementName)}static get observedAttributes(){return Object.values(Ft.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._buttonChangeListener),this.children.length?this._initialize():Ko(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,o,a){switch(e){case Ft.attributes.TYPE:this.type=a;return;case Ft.attributes.DISABLED:this.disabled=p(a);return;case Ft.attributes.FULL_WIDTH:this.fullWidth=p(a);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onButtonChange(){this._detachButton(),this._initialize()}_initialize(){this._buttonOrAnchorElement=this.querySelector(Ft.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(o=>o.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;G(this,e,Ft.attributes.DISABLED)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this.setAttribute(Ft.attributes.TYPE,this._type))}get disabled(){return this._disabled}set disabled(e){var o;this._disabled!==e&&(this._disabled=e,(o=this._buttonOrAnchorElement)==null||o.toggleAttribute(Ft.attributes.DISABLED,this._disabled),this.toggleAttribute(Ft.attributes.DISABLED,this._disabled))}get fullWidth(){return this._fullWidth}set fullWidth(e){this._fullWidth!==e&&(this._fullWidth=e,this.toggleAttribute(Ft.attributes.FULL_WIDTH,this._fullWidth))}focus(e){var o;(o=this._buttonOrAnchorElement)==null||o.focus(e)}};Ga=i([y({name:Ft.elementName,dependencies:[J,r1]})],Ga);var Im=class extends Z1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e,o;let t=document.createElement(Ft.elementName);return this._buttonElement=document.createElement("button"),this._buttonElement.type=((e=this._config.options)==null?void 0:e.type)||"button",this._buttonElement.textContent=((o=this._config.options)==null?void 0:o.text)||"",t.appendChild(this._buttonElement),t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",o=>t(o))}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",o=>t(o))}};function Lm(){f(Ga)}var Ly=`${b}deprecated-icon-button`,Vm={DISABLED:"disabled",TOGGLE:"toggle",IS_ON:"is-on",DENSITY_LEVEL:"density-level"},Vy=S(d({},Vm),{ON_ICON:"forge-icon-button-on"}),Cy={BUTTON:"button,a",ICON_LIKE:"button > i,span,svg,img,forge-icon"},Ey={TOGGLE:"forge-icon-button-toggle"},j2={elementName:Ly,observedAttributes:Vm,attributes:Vy,selectors:Cy,events:Ey};var By='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Ay=":host{--_icon-button-display:var(--forge-icon-button-display, inline-flex);--_icon-button-size:var(--forge-icon-button-size, 48px);--_icon-button-gap:var(--forge-icon-button-gap, 0);--_icon-button-icon-color:var(--forge-icon-button-icon-color, currentColor);--_icon-button-background-color:var(--forge-icon-button-background-color, none);--_icon-button-icon-size:var(--forge-icon-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.5));--_icon-button-cursor:var(--forge-icon-button-cursor, pointer);--_icon-button-padding:var(--forge-icon-button-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-border:var(--forge-icon-button-border, none);--_icon-button-shadow:var(--forge-icon-button-shadow, none);--_icon-button-transition-duration:var(--forge-icon-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_icon-button-transition-timing:var(--forge-icon-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_icon-button-shape:var(--forge-icon-button-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_icon-button-shape-start-start:var(--forge-icon-button-shape-start-start, var(--_icon-button-shape));--_icon-button-shape-start-end:var(--forge-icon-button-shape-start-end, var(--_icon-button-shape));--_icon-button-shape-end-start:var(--forge-icon-button-shape-end-start, var(--_icon-button-shape));--_icon-button-shape-end-end:var(--forge-icon-button-shape-end-end, var(--_icon-button-shape));--_icon-button-shape-squared:var(--forge-icon-button-shape-squared, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_icon-button-outlined-border-width:var(--forge-icon-button-outlined-border-width, 1px);--_icon-button-outlined-border-style:var(--forge-icon-button-outlined-border-style, solid);--_icon-button-outlined-border-color:var(--forge-icon-button-outlined-border-color, var(--_icon-button-icon-color));--_icon-button-tonal-icon-color:var(--forge-icon-button-tonal-icon-color, var(--forge-theme-on-primary-container, #222c62));--_icon-button-tonal-background-color:var(--forge-icon-button-tonal-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-filled-icon-color:var(--forge-icon-button-filled-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-filled-background-color:var(--forge-icon-button-filled-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-raised-shadow:var(--forge-icon-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-hover-shadow:var(--forge-icon-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-active-shadow:var(--forge-icon-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_icon-button-raised-disabled-shadow:var(--forge-icon-button-raised-disabled-shadow, none);--_icon-button-density-small-size:var(--forge-icon-button-density-small-size, 24px);--_icon-button-density-small-padding:var(--forge-icon-button-density-small-padding, var(--forge-spacing-xxxsmall, 2px));--_icon-button-density-small-icon-size:var(--forge-icon-button-density-small-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_icon-button-density-medium-size:var(--forge-icon-button-density-medium-size, 36px);--_icon-button-density-medium-padding:var(--forge-icon-button-density-medium-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-density-large-size:var(--forge-icon-button-density-large-size, var(--_icon-button-size));--_icon-button-toggle-on-background-color:var(--forge-icon-button-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-toggle-on-icon-color:var(--forge-icon-button-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-outlined-toggle-on-background-color:var(--forge-icon-button-outlined-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-outlined-toggle-on-icon-color:var(--forge-icon-button-outlined-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-tonal-toggle-background-color:var(--forge-icon-button-tonal-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-tonal-toggle-on-background-color:var(--forge-icon-button-tonal-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-tonal-toggle-on-icon-color:var(--forge-icon-button-tonal-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-background-color:var(--forge-icon-button-filled-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-filled-toggle-icon-color:var(--forge-icon-button-filled-toggle-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-background-color:var(--forge-icon-button-filled-toggle-on-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-icon-color:var(--forge-icon-button-filled-toggle-on-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-disabled-cursor:var(--forge-icon-button-disabled-cursor, not-allowed);--_icon-button-disabled-opacity:var(--forge-icon-button-disabled-opacity, 0.38);--_icon-button-popover-icon-padding:var(--forge-icon-button-popover-icon-padding, var(--forge-spacing-xsmall, 8px));--_icon-button-focus-indicator-color:var(--forge-icon-button-focus-indicator-color, var(--forge-theme-primary, #3f51b5))}:host{display:var(--_icon-button-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent;border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end)}:host([hidden]){display:none}::slotted(:is(button,a)){position:relative;z-index:0;display:var(--_icon-button-display);align-items:center;justify-content:center;gap:var(--_icon-button-gap);box-sizing:border-box;height:var(--_icon-button-density-large-size);min-width:var(--_icon-button-density-large-size);border:var(--_icon-button-border);border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end);padding:var(--_icon-button-padding);box-shadow:var(--_icon-button-shadow);color:var(--_icon-button-icon-color);background:var(--_icon-button-background-color);font-size:var(--_icon-button-icon-size);cursor:var(--_icon-button-cursor);user-select:none;transition-property:box-shadow,background;transition-duration:var(--_icon-button-transition-duration);transition-timing-function:var(--_icon-button-transition-timing);font-size:var(--_icon-button-icon-size);height:var(--_icon-button-size);width:var(--_icon-button-size)}::slotted(a){text-decoration:none;color:var(--_icon-button-icon-color)!important}forge-state-layer{--forge-state-layer-color:var(--_icon-button-icon-color)}forge-focus-indicator{--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-color:var(--_icon-button-focus-indicator-color);--forge-focus-indicator-shape-start-start:var(--_icon-button-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_icon-button-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_icon-button-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_icon-button-shape-end-end)}:host(:is([dense],[density=large]):not(:is([density=medium],[density-level]))){--_icon-button-size:var(--_icon-button-density-small-size);--_icon-button-icon-size:var(--_icon-button-density-small-icon-size);--_icon-button-padding:var(--_icon-button-density-small-padding);--forge-icon-font-size:var(--_icon-button-icon-size)}:host([dense]:not([density=large]):not([density=small]):is([density=medium],[density-level])){--_icon-button-size:var(--_icon-button-density-medium-size);--_icon-button-padding:var(--_icon-button-density-medium-padding)}:host([disabled]){cursor:var(--_icon-button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){pointer-events:none;opacity:var(--_icon-button-disabled-opacity)}:host([toggle]:is([on],[is-on]):not([is-on=false])){--_icon-button-background-color:var(--_icon-button-toggle-on-background-color);--_icon-button-icon-color:var(--_icon-button-toggle-on-icon-color);--_icon-button-background-color:var(--forge-icon-button-background-color, var(--forge-theme-primary-container-low, #e8eaf6))}",qa=class extends M{constructor(){super();this._disabled=!1;this._toggle=!1;this._isOn=!1;this._densityLevel=0;this._buttonOrAnchorElement=null;this._slotChangeListener=this._onSlotChange.bind(this);this._keydownListener=this._onKeydown.bind(this);this._toggleClickListener=this._onToggle.bind(this);H(this,By,Ay),this._slotElement=w(this,"slot:not([name])"),this._focusIndicator=w(this,w1.elementName),this._stateLayer=w(this,I1.elementName)}static get observedAttributes(){return Object.values(j2.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._slotChangeListener),this.children.length?this._initialize():Ko(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,o,a){switch(e){case j2.attributes.DISABLED:this.disabled=p(a);return;case j2.attributes.TOGGLE:this.toggle=p(a);return;case j2.attributes.IS_ON:this.isOn=p(a);return;case j2.attributes.DENSITY_LEVEL:this.densityLevel=K(a);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onSlotChange(){this._detachButton(),this._initialize()}_onToggle(){this.isOn=!this._isOn,this.dispatchEvent(new CustomEvent("forge-icon-button-toggle",{bubbles:!0,composed:!0,detail:this._isOn}))}_initialize(){this._buttonOrAnchorElement=this.querySelector(j2.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._toggle&&this._initializeToggle(),this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(o=>o.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;this.toggleAttribute(j2.attributes.DISABLED,e)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}_initializeToggle(){this._buttonOrAnchorElement&&(this._buttonOrAnchorElement.addEventListener("click",this._toggleClickListener),this._syncToggleState())}_destroyToggle(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("click",this._toggleClickListener)}_syncToggleState(){let e=Array.from(this.querySelectorAll(j2.selectors.ICON_LIKE)),o=e.find(s=>s.hasAttribute(j2.attributes.ON_ICON)),a=e.filter(s=>s!==o);o==null||o.toggleAttribute("hidden",!this._isOn),a.forEach(s=>s.toggleAttribute("hidden",this._isOn)),this.toggleAttribute(j2.attributes.IS_ON,this._isOn)}get disabled(){return this._disabled}set disabled(e){var o;e=!!e,this._disabled!==e&&(this._disabled=e,(o=this._buttonOrAnchorElement)==null||o.toggleAttribute(j2.attributes.DISABLED,this._disabled),this.toggleAttribute(j2.attributes.DISABLED,this._disabled))}get toggle(){return this._toggle}set toggle(e){e=!!e,this._toggle!==e&&(this._toggle=e,this.isConnected&&(this._toggle?this._initializeToggle():this._destroyToggle()),this.toggleAttribute(j2.attributes.TOGGLE,this._toggle))}get isOn(){return this._isOn}set isOn(e){e=!!e,this._isOn!==e&&(this._isOn=e,this.isConnected&&this._syncToggleState())}get densityLevel(){return this._densityLevel}set densityLevel(e){this._densityLevel!==e&&(this._densityLevel=e,this.setAttribute(j2.attributes.DENSITY_LEVEL,String(this._densityLevel)))}focus(e){var o;(o=this._buttonOrAnchorElement)==null||o.focus(e)}};qa=i([y({name:j2.elementName,dependencies:[j,J,r1]})],qa);var Cm=class extends Z1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e;let t=document.createElement(j2.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(e=this._config.options)!=null&&e.tooltip){let o=document.createElement("forge-tooltip");o.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(o.position=this._config.options.tooltipPosition),t.appendChild(o)}return t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",t)}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",t)}get iconElement(){return this._iconElement}get disabled(){var t;return!!((t=this._buttonElement)!=null&&t.disabled)}set disabled(t){this._buttonElement&&(this._buttonElement.disabled=t)}_configure(){this._configureIcon()}_configureIcon(){var e,o,a,s;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((o=this._config.options)==null?void 0:o.iconType)||"component"){case"font":{let r=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[We];(a=this._buttonElement)==null||a.classList.add(...r),this._buttonElement&&(this._buttonElement.textContent=this._config.options.iconName);break}case"component":this._iconElement=document.createElement(p1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&this._iconElement.classList.add(...this._config.options.iconClass),(s=this._buttonElement)==null||s.appendChild(this._iconElement);break}}};function Em(){f(qa)}var $4=class extends I{constructor(t){super(t)}startButtonObserver(){this._buttonChangeObserver=new MutationObserver(t=>{let e=t.reduce((o,{addedNodes:a})=>{let s=Array.from(a).filter(r=>r.nodeType===Node.ELEMENT_NODE).map(r=>r.nodeName.toLowerCase()===A2.elementName?r:r.querySelector(A2.elementName)).filter(r=>!!r);return o.concat(s)},[]);e.length&&(e.forEach(o=>{o.variant=this._component.variant,o.theme=this._component.theme,o.disabled=this._component.disabled,o.dense=this._component.dense}),this.setPill(this._component.pill))}),this._buttonChangeObserver.observe(this._component,{childList:!0,subtree:!0})}destroyButtonObserver(){var t;(t=this._buttonChangeObserver)==null||t.disconnect(),this._buttonChangeObserver=void 0}setVariant(t){this._getButtons().forEach(o=>o.variant=t)}setTheme(t){this._getButtons().forEach(o=>o.theme=t)}setDisabled(t){this._getButtons().forEach(o=>o.disabled=t)}setDense(t){this._getButtons().forEach(o=>o.dense=t)}setPill(t){let e=this._getButtons();e.length>2&&Array.from(e).slice(1,e.length-1).filter(({pill:s})=>s).forEach(s=>s.pill=!1);let o=e[0];o&&(o.pill=t);let a=e[e.length-1];a&&(a.pill=t)}_getButtons(){return this._component.querySelectorAll(A2.elementName)}};var Ty=`${b}split-button`,Sy={VARIANT:"variant",THEME:"theme",DISABLED:"disabled",DENSE:"dense",PILL:"pill"},ky={DEFAULT_VARIANT:"text",DEFAULT_THEME:"primary"},x2={elementName:Ty,attributes:Sy,defaults:ky};var X4=class{constructor(t){this._adapter=t;this._variant=x2.defaults.DEFAULT_VARIANT;this._theme=x2.defaults.DEFAULT_THEME;this._disabled=!1;this._dense=!1;this._pill=!1}initialize(){this._adapter.startButtonObserver(),this._adapter.setVariant(this._variant),this._adapter.setTheme(this._theme),this._adapter.setDisabled(this._disabled),this._adapter.setDense(this._dense),this._adapter.setPill(this._pill)}destroy(){this._adapter.destroyButtonObserver()}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t!=null?t:x2.defaults.DEFAULT_VARIANT,this._adapter.setVariant(t),this._adapter.setHostAttribute(x2.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:x2.defaults.DEFAULT_THEME,this._adapter.setTheme(this._theme),this._adapter.setHostAttribute(x2.attributes.THEME,this._theme))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(x2.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._dense),this._adapter.toggleHostAttribute(x2.attributes.DENSE,this._dense))}get pill(){return this._pill}set pill(t){this._pill!==t&&(this._pill=t,this._adapter.setPill(this._pill),this._adapter.toggleHostAttribute(x2.attributes.PILL,this._pill))}};var Oy="<template><slot></slot></template>",Dy=":host{--_split-button-min-width:var(--forge-split-button-min-width, 0);--_split-button-gap:var(--forge-split-button-gap, var(--forge-border-thin, 1px));--_split-button-focus-indicator-offset:var(--forge-split-button-focus-indicator-offset, var(--forge-button-focus-indicator-offset, 4px));--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, var(--_split-button-gap));--_split-button-focus-indicator-offset-adjusted:calc(var(--_split-button-focus-indicator-offset) + var(--_split-button-focus-indicator-divider-offset) * 2)}:host{display:inline-flex;justify-content:center;align-items:center}:host([hidden]){display:none}::slotted(*){--forge-button-min-width:var(--_split-button-min-width);--forge-button-focus-indicator-offset:var(--_split-button-focus-indicator-offset)}::slotted(:first-child){--forge-button-shape-start-end-radius:0;--forge-button-shape-end-end-radius:0;--forge-focus-indicator-shape-start-end:0;--forge-focus-indicator-shape-end-end:0;--forge-focus-indicator-offset-inline:0 var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:not(:first-child):not(:last-child)){--forge-button-shape:0;--forge-focus-indicator-shape:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:last-child){--forge-button-shape-start-start-radius:0;--forge-button-shape-end-start-radius:0;--forge-focus-indicator-shape-start-start:0;--forge-focus-indicator-shape-end-start:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted) 0}:host([variant=outlined]){--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, 0px)}:host([variant=outlined]) ::slotted(:not(:first-child)){margin-inline-start:calc(-1 * var(--_split-button-gap))}:host(:is([variant=tonal],[variant=filled],[variant=raised],:not([variant]))) ::slotted(:not(:last-child)){margin-inline-end:var(--_split-button-gap)}",ke=class extends M{static get observedAttributes(){return[x2.attributes.VARIANT,x2.attributes.THEME,x2.attributes.DISABLED,x2.attributes.DENSE,x2.attributes.PILL]}constructor(){super(),H(this,Oy,Dy),this._core=new X4(new $4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case x2.attributes.VARIANT:this.variant=o;break;case x2.attributes.THEME:this.theme=o;break;case x2.attributes.DISABLED:this.disabled=p(o);break;case x2.attributes.DENSE:this.dense=p(o);break;case x2.attributes.PILL:this.pill=p(o);break}}};i([c()],ke.prototype,"variant",2),i([c()],ke.prototype,"theme",2),i([c()],ke.prototype,"disabled",2),i([c()],ke.prototype,"dense",2),i([c()],ke.prototype,"pill",2),ke=i([y({name:x2.elementName,dependencies:[T2]})],ke);function hT1(){f(ke)}function wT1(){let n="0123456789ABCDEF".split(""),t="#";for(let e=0;e<6;e++)t+=n[Math.floor(Math.random()*16)];return t}function TS1(){cc(),Ic(),yv(),yh(),jh(),Tv(),Vc(),f6(),_a(),y6(),rr(),z6(),B6(),A6(),zv(),Pv(),Uv(),cp(),dp(),qv(),p6(),g6(),m6(),gp(),fp(),yp(),zp(),V6(),Sv(),Vp(),ic(),s6(),kp(),Np(),Hc(),Sc(),nc(),Rp(),Gp(),e7(),$p(),o6(),n7(),mv(),sv(),nv(),bv(),l7(),p7(),Ap(),Ep(),sc(),b7(),y7(),xh(),d7(),V7(),vv(),Av(),Kv(),Xv(),x7(),L7(),E7(),dv(),T7(),P7(),Q7(),em(),zc(),om(),nm(),Jv(),mm(),pm(),im(),l6(),fm(),ym(),Bv(),bh(),zm(),Hm()}function SS1(){Lm(),Em()}export{Ho as ACCORDION_CONSTANTS,_c as ANIMATION_FILL,P1 as APP_BAR_CONSTANTS,Ye as APP_BAR_HELP_BUTTON_CONSTANTS,ia as APP_BAR_MENU_BUTTON_CONSTANTS,g2 as APP_BAR_NOTIFICATION_BUTTON_CONSTANTS,f1 as APP_BAR_PROFILE_BUTTON_CONSTANTS,P2 as APP_BAR_SEARCH_CONSTANTS,c5 as ARIA_CONTROLS_PLACEHOLDER_ID,c1 as AUTOCOMPLETE_CONSTANTS,Dr as AVATAR_CONSTANTS,Iv as AVATAR_TAG_NAME,Es as AccordionAdapter,Io as AccordionComponent,Bs as AccordionCore,Os as AppBarAdapter,ne as AppBarComponent,Ds as AppBarCore,Vr as AppBarHelpButtonAdapter,to as AppBarHelpButtonComponent,Cr as AppBarHelpButtonCore,ma as AppBarMenuButtonComponent,ir as AppBarNotificationButtonAdapter,Ee as AppBarNotificationButtonComponent,lr as AppBarNotificationButtonCore,Pr as AppBarProfileButtonAdapter,K2 as AppBarProfileButtonComponent,Nr as AppBarProfileButtonCore,Ns as AppBarSearchAdapter,d0 as AppBarSearchComponent,Ps as AppBarSearchCore,mi as AutocompleteAdapter,p2 as AutocompleteComponent,x6 as AutocompleteComponentDelegate,di as AutocompleteCore,w6 as AutocompleteMode,ve as AvatarComponent,i2 as BACKDROP_CONSTANTS,_R as BADGE_CONSTANTS,Kh as BADGE_TAG_NAME,I2 as BANNER_CONSTANTS,J1 as BASE_DRAWER_CONSTANTS,Y as BASE_FIELD_CONSTANTS,Lt as BASE_SELECT_CONSTANTS,S1 as BOTTOM_SHEET_CONSTANTS,Dt as BUTTON_AREA_CONSTANTS,A2 as BUTTON_CONSTANTS,Ul as BUTTON_FORM_ATTRIBUTES,et as BUTTON_TOGGLE_CONSTANTS,q1 as BUTTON_TOGGLE_GROUP_CONSTANTS,Xe as BackdropComponent,le as BadgeComponent,Zh as BadgeComponentDelegate,gi as BannerAdapter,f0 as BannerComponent,wi as BannerCore,I as BaseAdapter,M as BaseComponent,Z1 as BaseComponentDelegate,lo as BaseDrawerAdapter,Qe as BaseDrawerComponent,co as BaseDrawerCore,z2 as BaseField,ba as BaseFieldAdapter,ya as BaseFieldCore,Na as BaseSelectAdapter,Vt as BaseSelectComponent,Ra as BaseSelectCore,yi as BottomSheetAdapter,Ze as BottomSheetComponent,Mi as BottomSheetCore,Ar as ButtonAdapter,zi as ButtonAreaAdapter,Ro as ButtonAreaComponent,Hi as ButtonAreaCore,T2 as ButtonComponent,Sr as ButtonComponentDelegate,Tr as ButtonCore,Ur as ButtonToggleAdapter,me as ButtonToggleComponent,Wr as ButtonToggleCore,Gr as ButtonToggleGroupAdapter,ot as ButtonToggleGroupComponent,qr as ButtonToggleGroupCore,g as CALENDAR_CONSTANTS,lp as CALENDAR_DROPDOWN_CONSTANTS,T as CALENDAR_MENU_CONSTANTS,Bc1 as CARD_CONSTANTS,hp as CARD_TAG_NAME,s5 as CDN_BASE_URL,T1 as CHECKBOX_CONSTANTS,g1 as CHIP_CONSTANTS,u2 as CHIP_FIELD_CONSTANTS,nt as CHIP_SET_CONSTANTS,S2 as CIRCULAR_PROGRESS_CONSTANTS,_1 as COLOR_PICKER_CONSTANTS,b as COMPONENT_NAME_PREFIX,Oi as CalendarAdapter,v1 as CalendarComponent,ip as CalendarComponentDelegate,Di as CalendarCore,Ha as CalendarDropdown,Vi as CalendarMenuAdapter,je as CalendarMenuComponent,Ci as CalendarMenuCore,O6 as CalendarMonthFocus,M0 as CardComponent,E4 as CellAlign,Yr as CheckboxAdapter,at as CheckboxComponent,Gv as CheckboxComponentDelegate,Kr as CheckboxCore,hi as ChipAdapter,H2 as ChipComponent,vi as ChipCore,ii as ChipFieldAdapter,No as ChipFieldComponent,d6 as ChipFieldComponentDelegate,li as ChipFieldCore,Ma as ChipSetComponent,Pi as CircularProgressAdapter,Pt as CircularProgressComponent,Ni as CircularProgressCore,Ri as ColorPickerAdapter,we as ColorPickerComponent,Gi as ColorPickerCore,v3 as ColorPickerValueType,Ht as DATE_PICKER_CONSTANTS,U2 as DATE_RANGE_PICKER_CONSTANTS,h3 as DEFAULT_COLOR,nn as DEFAULT_DATE_MASK,ja as DEFERRED_LABEL_TARGET,Ft as DEPRECATED_BUTTON_CONSTANTS,j2 as DEPRECATED_ICON_BUTTON_CONSTANTS,D as DIALOG_CONSTANTS,xa as DIVIDER_CONSTANTS,Lp as DRAWER_CONSTANTS,zo as DateInputMask,Yi as DatePickerAdapter,Ca as DatePickerComponent,bp as DatePickerComponentDelegate,Ki as DatePickerCore,$i as DatePickerRange,l2 as DateRange,Mp as DateRangeComponentDelegate,Xi as DateRangePickerAdapter,io as DateRangePickerComponent,Zi as DateRangePickerCore,Ln as DayOfWeek,ls as Deferred,Ga as DeprecatedButtonComponent,Im as DeprecatedButtonComponentDelegate,qa as DeprecatedIconButtonComponent,Cm as DeprecatedIconButtonComponentDelegate,xi as DialogAdapter,B1 as DialogComponent,bi as DialogCore,zt as DismissibleStack,eo as DividerComponent,Ea as DrawerComponent,xc as EASING,D1 as EXPANSION_PANEL_CONSTANTS,Vs as ExpansionPanelAdapter,tt as ExpansionPanelComponent,Cs as ExpansionPanelCore,L as FIELD_CONSTANTS,x1 as FILE_PICKER_CONSTANTS,c2 as FLOATING_ACTION_BUTTON_CONSTANTS,w1 as FOCUS_INDICATOR_CONSTANTS,ai as FieldAdapter,F1 as FieldComponent,ni as FieldCore,Ji as FilePickerAdapter,Qt as FilePickerComponent,Sp as FilePickerComponentDelegate,t4 as FilePickerCore,e4 as FloatingActionButtonAdapter,z0 as FloatingActionButtonComponent,Pp as FloatingActionButtonComponentDelegate,o4 as FloatingActionButtonCore,Ss as FocusIndicatorAdapter,J as FocusIndicatorComponent,ks as FocusIndicatorCore,o2 as FormFieldComponentDelegate,ns as GlobalConfiguration,ql as HAS_MERIDIEM_REGEX,t1 as ICON_BUTTON_CONSTANTS,We as ICON_CLASS_NAME,p1 as ICON_CONSTANTS,Ms as ICON_REGISTRY_KEY,mc as INITIAL_ORIGIN_SCALE,Sa as INLINE_MESSAGE_CONSTANTS,_H as INPUT_ARIA_ATTRIBUTES,xH as INPUT_PROPERTIES,ud as ISO_8601_REGEX,_d as ISO_TIMEZONE_REGEX,zs as IconAdapter,Fs as IconButtonAdapter,i1 as IconButtonComponent,Tc as IconButtonComponentDelegate,Rs as IconButtonCore,j as IconComponent,U0 as IconComponentDelegate,Is as IconCore,X as IconRegistry,ka as InlineMessageComponent,m2 as KEYBOARD_SHORTCUT_CONSTANTS,sl as KEYSTROKE_DEBOUNCE_THRESHOLD,qp as KEY_ITEM_TAG_NAME,Fp as KEY_TAG_NAME,ho as KeyComponent,Be as KeyItemComponent,a4 as KeyboardShortcutAdapter,It as KeyboardShortcutComponent,n4 as KeyboardShortcutCore,a2 as LABEL_CONSTANTS,ue as LABEL_VALUE_CONSTANTS,F2 as LINEAR_PROGRESS_CONSTANTS,C1 as LIST_CONSTANTS,h1 as LIST_ITEM_CONSTANTS,ei as LabelAdapter,de as LabelComponent,oi as LabelCore,Oa as LabelValueComponent,a7 as LabelValueComponentDelegate,ce as LinearProgressComponent,cr as ListAdapter,v2 as ListComponent,hr as ListCore,vr as ListItemAdapter,j1 as ListItemComponent,pr as ListItemCore,n1 as MENU_CONSTANTS,c7 as METER_GROUP_TAG_NAME,s7 as METER_TAG_NAME,M5 as MINIMUM_PRESS_MS,Bp as MINI_DRAWER_CONSTANTS,Ba as MODAL_DRAWER_CONSTANTS,Ir as MenuAdapter,M2 as MenuComponent,Lr as MenuCore,Y1 as MeterComponent,k2 as MeterGroupComponent,Ta as MiniDrawerComponent,ji as ModalDrawerAdapter,Aa as ModalDrawerComponent,Qi as ModalDrawerCore,f3 as NAVIGATION_KEYS,At as OPEN_ICON_CONSTANTS,R as OPTION_CONSTANTS,vo as OPTION_GROUP_CONSTANTS,B as OVERLAY_CONSTANTS,sa as OpenIconComponent,i4 as OptionAdapter,$1 as OptionComponent,l4 as OptionCore,t0 as OptionGroupComponent,u6 as OptionType,Zs as OverlayAdapter,d2 as OverlayComponent,Qs as OverlayCore,dc as PADDING,m7 as PAGE_STATE_CONSTANTS,Z as PAGINATOR_CONSTANTS,Id as PARSEABLE_TIME_FORMAT,Q as POPOVER_CONSTANTS,hv as POPOVER_HOVER_TIMEOUT,pc as PRESS_GROW_MS,uc as PRESS_PSEUDO,$ as PROFILE_CARD_CONSTANTS,Da as PageStateComponent,r4 as PaginatorAdapter,it as PaginatorComponent,s4 as PaginatorCore,fc as PointerState,dr as PopoverAdapter,R1 as PopoverComponent,wr as PopoverCore,Er as ProfileCardAdapter,Y2 as ProfileCardComponent,Br as ProfileCardCore,b1 as RADIO_CONSTANTS,fa as RADIO_GROUP_CONSTANTS,uH as REFLECTIVE_ARIA_ATTRIBUTES,Xr as RadioAdapter,_t as RadioComponent,Zr as RadioCore,jr as RadioGroupAdapter,oo as RadioGroupComponent,Qr as RadioGroupCore,Pa as SCAFFOLD_CONSTANTS,X2 as SELECT_CONSTANTS,e0 as SELECT_DROPDOWN_CONSTANTS,xr as SKELETON_CONSTANTS,bt as SKIP_LINK_CONSTANTS,V as SLIDER_CONSTANTS,wc as SOFT_EDGE_CONTAINER_RATIO,gc as SOFT_EDGE_MINIMUM_SIZE,x2 as SPLIT_BUTTON_CONSTANTS,t2 as SPLIT_VIEW_CONSTANTS,P as SPLIT_VIEW_PANEL_CONSTANTS,W2 as STACK_CONSTANTS,I1 as STATE_LAYER_CONSTANTS,F as STEPPER_CONSTANTS,k as STEP_CONSTANTS,pa as SUPPORTS_POPOVER,l1 as SWITCH_CONSTANTS,Je as ScaffoldComponent,c4 as SelectAdapter,Ae as SelectComponent,B7 as SelectComponentDelegate,h4 as SelectCore,p4 as SelectDropdownAdapter,H0 as SelectDropdownComponent,v4 as SelectDropdownCore,M7 as SelectOptionType,Q0 as SkeletonComponent,Fa as SkipLinkComponent,_2 as SliderComponent,D7 as SliderComponentDelegate,Fl as SlottedElementAdapter,B4 as SortDirection,$4 as SplitButtonAdapter,ke as SplitButtonComponent,X4 as SplitButtonCore,b4 as SplitViewAdapter,N7 as SplitViewAnimatingLayer,Te as SplitViewComponent,y4 as SplitViewCore,f4 as SplitViewPanelAdapter,L2 as SplitViewPanelComponent,x4 as SplitViewPanelCore,M4 as StackAdapter,_e as StackComponent,z4 as StackCore,As as StateLayerAdapter,r1 as StateLayerComponent,ra as StateLayerCoords,Ts as StateLayerCore,I4 as StepAdapter,Z2 as StepComponent,L4 as StepCore,V4 as StepperAdapter,Nt as StepperComponent,C4 as StepperCore,Jr as SwitchAdapter,$2 as SwitchComponent,Qv as SwitchComponentDelegate,ti as SwitchCore,_ as TABLE_CONSTANTS,N1 as TAB_BAR_CONSTANTS,K1 as TAB_CONSTANTS,E1 as TEXT_FIELD_CONSTANTS,W as TIME_PICKER_CONSTANTS,k1 as TOAST_CONSTANTS,yn as TOOLBAR_CONSTANTS,a1 as TOOLTIP_CONSTANTS,vc as TOUCH_DELAY_MS,Ed as TWELVE_HOUR_TIME_MASK,Bd as TWELVE_HOUR_TIME_MASK_WITH_SECONDS,ps as TWELVE_HOUR_TIME_REGEX,Ad as TWENTY_FOUR_HOUR_TIME_MASK,Td as TWENTY_FOUR_HOUR_TIME_MASK_WITH_SECONDS,Jo as TWENTY_FOUR_HOUR_TIME_REGEX,O4 as TabAdapter,P4 as TabBarAdapter,Ct as TabBarComponent,N4 as TabBarCore,Rt as TabComponent,D4 as TabCore,A4 as TableAdapter,X1 as TableComponent,k4 as TableCore,Db as TableFilterType,S4 as TableRow,si as TextFieldAdapter,x0 as TextFieldComponent,ao as TextFieldComponentDelegate,ri as TextFieldCore,ys as TimeInputMask,R4 as TimePickerAdapter,W1 as TimePickerComponent,xm as TimePickerComponentDelegate,W4 as TimePickerCore,G4 as ToastAdapter,Jt as ToastComponent,q4 as ToastCore,pe as ToolbarComponent,Js as TooltipAdapter,m1 as TooltipComponent,er as TooltipCore,Mm as VIEW_CONSTANTS,e2 as VIEW_SWITCHER_CONSTANTS,I3 as ViewAnimationDirection,mo as ViewComponent,Y4 as ViewSwitcherAdapter,wy as ViewSwitcherAnimationType,go as ViewSwitcherComponent,K4 as ViewSwitcherCore,ec as awaitIconDefinition,c0 as canUserHoverElements,Nl as checkVisibility,g4 as clampSize,U7 as clearState,d5 as cloneAttributes,zd as cloneProperties,Hd as cloneValidationMessage,l3 as coerceDateFromValue,yo as coerceStringToArray,vs as composedPathFrom,Z7 as createOverlay,Hs as createSanitizedSvg,Wl as createSvgFromString,kl as createUserInteractionListener,cc as defineAccordionComponent,Ic as defineAppBarComponent,yv as defineAppBarHelpButtonComponent,yh as defineAppBarMenuButtonComponent,jh as defineAppBarNotificationButtonComponent,Tv as defineAppBarProfileButtonComponent,Vc as defineAppBarSearchComponent,f6 as defineAutocompleteComponent,_a as defineAvatarComponent,y6 as defineBackdropComponent,rr as defineBadgeComponent,z6 as defineBannerComponent,B6 as defineBottomSheetComponent,A6 as defineButtonAreaComponent,zv as defineButtonComponent,Pv as defineButtonToggleComponent,Uv as defineButtonToggleGroupComponent,cp as defineCalendarComponent,S51 as defineCalendarMenuComponent,dp as defineCardComponent,qv as defineCheckboxComponent,p6 as defineChipComponent,g6 as defineChipFieldComponent,m6 as defineChipSetComponent,gp as defineCircularProgressComponent,fp as defineColorPickerComponent,TS1 as defineComponents,yp as defineDatePickerComponent,zp as defineDateRangePickerComponent,Lm as defineDeprecatedButtonComponent,SS1 as defineDeprecatedComponents,Em as defineDeprecatedIconButtonComponent,V6 as defineDialogComponent,Sv as defineDividerComponent,Vp as defineDrawerComponent,ic as defineExpansionPanelComponent,s6 as defineFieldComponent,kp as defineFilePickerComponent,Np as defineFloatingActionButtonComponent,Hc as defineFocusIndicatorComponent,Sc as defineIconButtonComponent,nc as defineIconComponent,Rp as defineInlineMessageComponent,Gp as defineKeyComponent,$p as defineKeyItemComponent,e7 as defineKeyboardShortcutComponent,o6 as defineLabelComponent,n7 as defineLabelValueComponent,mv as defineLinearProgressComponent,sv as defineListComponent,nv as defineListItemComponent,bv as defineMenuComponent,l7 as defineMeterComponent,p7 as defineMeterGroupComponent,Ap as defineMiniDrawerComponent,Ep as defineModalDrawerComponent,sc as defineOpenIconComponent,b7 as defineOptionComponent,y7 as defineOptionGroupComponent,xh as defineOverlayComponent,d7 as definePageStateComponent,V7 as definePaginatorComponent,vv as definePopoverComponent,Av as defineProfileCardComponent,Kv as defineRadioComponent,Xv as defineRadioGroupComponent,x7 as defineScaffoldComponent,L7 as defineSelectComponent,E7 as defineSelectDropdownComponent,dv as defineSkeletonComponent,T7 as defineSkipLinkComponent,P7 as defineSliderComponent,hT1 as defineSplitButtonComponent,Q7 as defineSplitViewComponent,Dy1 as defineSplitViewPanelComponent,em as defineStackComponent,zc as defineStateLayerComponent,om as defineStepComponent,nm as defineStepperComponent,Jv as defineSwitchComponent,mm as defineTabBarComponent,pm as defineTabComponent,im as defineTableComponent,l6 as defineTextFieldComponent,fm as defineTimePickerComponent,ym as defineToastComponent,Bv as defineToolbarComponent,bh as defineTooltipComponent,zm as defineViewComponent,Hm as defineViewSwitcherComponent,b0 as dialogStack,Qp as elementAcceptsTextInput,hc as elementName,Dl as elementsOverlapping,Ls as emulateUserToggle,m5 as eventIncludesArrowKey,Vn as eventIncludesDate,j6 as eventIncludesElement,ac as fetchIconContent,Xx as fixKey,Zo as forgeLabelRef,Al as formatDate,D0 as forwardAttributes,Mo as frame,n3 as getAccessibleHeader,sp as getAllYearOptions,tc as getCachedIcon,X6 as getClearButton,M3 as getCurrentTimeOfDayMillis,x3 as getCursor,o3 as getDateElement,rt as getDateId,Fo as getDateRangeFromDates,U6 as getDateRow,Ei as getDateSpacerElement,ep as getDatesFromDateRange,Si as getDatesInRange,F6 as getDayElement,I_ as getDayId,i3 as getEventDescriptions,G6 as getEventElement,W6 as getEventWrapperElement,e3 as getEventWrapperId,ki as getEventsOnDate,Cn as getFirstDateOfWeek,w31 as getFirstDayOfMonth,P6 as getFirstDayOfWeekForLocale,$6 as getFooter,te as getFormState,Bt as getFormValue,Ii as getGrid,T6 as getGridItems,X7 as getHandleIcon,a3 as getHeader,En as getIndexOfDate,l5 as getLastDateOfMonth,Q6 as getLastDateOfWeek,k6 as getList,Li as getListItems,D6 as getLocalizedDayOfMonth,t3 as getLocalizedDayOfWeek,ro as getLocalizedMonth,y0 as getLocalizedYear,Ti as getMinAndMaxDates,$x as getModiferKeysString,Y6 as getMonthButtonContent,r3 as getMonthDates,Tl as getMonthLength,ap as getMonthOptions,rp as getMultipleFromRange,fH as getPartPrefixedAttributes,Uo as getPixelDimension,S6 as getScrollSpy,_6 as getSelectedOption,Bi as getSortedDaysOfWeek,_4 as getSplitViewPanelSibling,Z6 as getTodayButton,q6 as getTooltip,ee as getValidationMessage,u4 as getValuenow,g31 as getWeekDates,N6 as getWeekendDaysForLocale,K6 as getYearButtonContent,np as getYearOptions,$7 as handleBoundariesAfterResize,w4 as handleBoundariesDuringResize,ui as hideBackdrop,Sl as highlightTextHTML,um as hoursToMillis,R7 as initState,oe as inputType,s1 as internals,ft as isDisabled,s2 as isFocusable,xt as isInMonth,L_ as isInRange,Pl as isInstanceOf,kv as isLabelAware,u3 as isOptionGroupObject,ff as isOptionObject,Mn as isOptionType,h5 as isPointerOverElement,R6 as isRtlLocale,Gl as isSafeSvg,b2 as isSameDate,w3 as isSelectOptionType,za as isSelected,$l as isSupportedTimeFormat,J6 as isToday,G7 as keyboardResize,tn as locateElementById,hs as locateTargetHeuristic,t7 as matchKeyCombination,Y7 as maxResize,cC1 as mergeDateWithTime,gm as millisToHours,U4 as millisToMinutes,wm as millisToMinutesClamped,oy as millisToSeconds,b3 as millisToSecondsClamped,lt as millisToTimeString,q7 as minResize,Wa as minutesToMillis,zn as optionEqualPredicate,K0 as overlayStack,V_ as parseDateOffset,Bl as parseDateString,Jp as parseKeyCombinations,eb as parseSize,op as parseYearRange,Ol as percentToPixels,iH as pixelsToPercent,W7 as pointerResize,nl as prefersReducedMotion,Rl as proxyShadowScrollEvent,wT1 as randomHexColor,Hn as removeAllExceptLastChild,oc as removeIconListener,Qo as replaceElement,K7 as resizeSibling,v5 as roundByDPR,lH as safeMax,k0 as safeMin,b5 as sanitizeExternalType,cs as scaleValue,y3 as secondsToMillis,Yt as setAriaControls,N as setDefaultAria,F7 as setState,s3 as setTabindexOnElement,Mt as setValidity,c3 as shouldHandleEvent,_i as showBackdrop,Ai as sortDates,tp as splitIntoWeeks,_m as stripSecondsFromMillis,ol as supportsElementInternalsAria,al as supportsHover,ss as supportsPopover,ae as task,jp as textInputTypes,F4 as timeStringToMillis,He as toggleState,Kl as tokenize12HourTimeString,Yl as tokenize24HourTimeString,$r as tryCheck,Xl as tryCoerceTimeString,Ge as tryCreateAriaControlsPlaceholder,O0 as tryDismiss,hH as unwrapElements,rs as updateTarget,cH as wrapElements};
|
|
69
|
+
`}_syncMeters(){this._meters.forEach(e=>{e.direction=this.direction,e.min=this.min,e.max=this.max})}_handleMeterChange(e){e.stopPropagation(),this._meters.reduce((o,a,s,r)=>(a.style.setProperty("--_meter-z-index",`${r.length-s}`),a.style.setProperty("--_meter-inset",`${o}%`),o+a.percentage),0)}_handleHeadingSlotChange(){let e=[...this._labelNodes,...this._valueNodes].filter(o=>{var a;return!!((a=o.textContent)!=null&&a.trim())});this._hasSlottedHeadingContent=!!e.length}};k2.styles=dt(of),k2.formAssociated=!0,k2[h7]=c7,i([u1({type:Number})],k2.prototype,"min",2),i([u1({type:Number})],k2.prototype,"max",2),i([u1({type:Boolean})],k2.prototype,"tickmarks",2),i([u1()],k2.prototype,"direction",2),i([u1()],k2.prototype,"density",2),i([u1()],k2.prototype,"shape",2),i([u1({attribute:"inner-shape"})],k2.prototype,"innerShape",2),i([ie()],k2.prototype,"_hasSlottedHeadingContent",2),i([j0({slot:"label"})],k2.prototype,"_labelNodes",2),i([j0({slot:"value"})],k2.prototype,"_valueNodes",2),i([qh({selector:"forge-meter"})],k2.prototype,"_meters",2),k2=i([kt(c7)],k2);function p7(){f(k2)}var af=`${b}page-state`,m7={elementName:af};var nf='<template><div class="forge-page-state" part="root"><div class="graphic" part="graphic-container"><slot name="graphic"></slot></div><div class="title" part="title-container"><slot name="title"></slot></div><div class="message" part="message-container"><slot name="message"></slot></div><div class="actions" part="actions-container"><slot name="action"></slot></div></div></template>',sf=':host{--_page-state-width:var(--forge-page-state-width, 576px);--_page-state-height:var(--forge-page-state-height, auto);--_page-state-spacing:var(--forge-page-state-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-width:var(--forge-page-state-mobile-width, 70%);--_page-state-graphic-height:var(--forge-page-state-graphic-height, 296px);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-mobile-graphic-height:var(--forge-page-state-mobile-graphic-height, auto);--_page-state-title-color:var(--forge-page-state-title-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_page-state-title-spacing:var(--forge-page-state-title-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-title-spacing-mobile:var(--forge-page-state-title-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-message-color:var(--forge-page-state-message-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_page-state-message-spacing:var(--forge-page-state-message-spacing, var(--forge-spacing-xxxlarge, 56px));--_page-state-message-spacing-mobile:var(--forge-page-state-message-spacing-mobile, var(--forge-spacing-large, 24px));--_page-state-actions-spacing:var(--forge-page-state-actions-spacing, 16px)}:host{display:flex;justify-content:center;align-items:center;width:100%;container-type:inline-size}:host([hidden]){display:none}.forge-page-state{width:var(--_page-state-width);margin-block:var(--_page-state-spacing);text-align:center}.forge-page-state .graphic{display:flex;justify-content:center;align-items:center;height:var(--_page-state-graphic-height);width:100%;margin-block-end:var(--_page-state-graphic-spacing)}.forge-page-state .graphic ::slotted([slot=graphic]){height:100%;width:100%}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading8-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading8-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-font-size-scale, 2.25)));font-weight:var(--forge-typography-heading8-font-weight,500);line-height:var(--forge-typography-heading8-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading8-line-height-scale, 2.625)));letter-spacing:var(--forge-typography-heading8-letter-spacing, -.0027777778em);text-transform:var(--forge-typography-heading8-text-transform,inherit);text-decoration:var(--forge-typography-heading8-text-decoration,inherit);--_page-state-title-spacing:var(--_page-state-title-spacing-mobile);color:var(--_page-state-title-color);margin-block:var(--_page-state-title-spacing)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body4-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body4-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1.25)));font-weight:var(--forge-typography-body4-font-weight,400);line-height:var(--forge-typography-body4-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-body4-letter-spacing, .005em);text-transform:var(--forge-typography-body4-text-transform,inherit);text-decoration:var(--forge-typography-body4-text-decoration,inherit);--_page-state-message-spacing:var(--_page-state-message-spacing-mobile);color:var(--_page-state-message-color);margin-block-end:var(--_page-state-message-spacing)}.forge-page-state .actions{display:grid;justify-content:center;grid-auto-flow:column;gap:var(--_page-state-actions-spacing)}@container (max-width:599px){.forge-page-state{--_page-state-width:var(--_page-state-mobile-width)}.forge-page-state .graphic{--_page-state-graphic-height:var(--_page-state-mobile-graphic-height);--_page-state-graphic-spacing:var(--forge-page-state-graphic-spacing, 0)}.forge-page-state .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-heading5-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-heading5-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-font-size-scale, 1.5)));font-weight:var(--forge-typography-heading5-font-weight,500);line-height:var(--forge-typography-heading5-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-heading5-line-height-scale, 1.75)));letter-spacing:var(--forge-typography-heading5-letter-spacing, 0);text-transform:var(--forge-typography-heading5-text-transform,inherit);text-decoration:var(--forge-typography-heading5-text-decoration,inherit)}.forge-page-state .message{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit)}.forge-page-state .actions{grid-auto-flow:row}}',Da=class extends M{constructor(){super(),H(this,nf,sf)}};Da=i([y({name:m7.elementName})],Da);function d7(){f(Da)}var g7=`${b}paginator`,w7={PAGE_INDEX:"page-index",PAGE_SIZE:"page-size",OFFSET:"offset",TOTAL:"total",PAGE_SIZE_OPTIONS:"page-size-options",LABEL:"label",FIRST_LAST:"first-last",FIRST:"first",DISABLED:"disabled",ALTERNATIVE:"alternative"},rf=d({},w7),lf={LABEL:".label > slot[name=label]",PAGE_SIZE_SELECT:".page-size-options",RANGE_LABEL:".range-label > slot[name=range-label]",FIRST_PAGE_BUTTON:".first-page",FIRST_PAGE_CONTAINER:"#first-page-container",PREVIOUS_PAGE_BUTTON:".previous-page",PREVIOUS_PAGE_CONTAINER:"#previous-page-container",NEXT_PAGE_BUTTON:".next-page",NEXT_PAGE_CONTAINER:"#next-page-container",LAST_PAGE_BUTTON:".last-page",LAST_PAGE_CONTAINER:"#last-page-container",RANGE_LABEL_ALTERNATIVE:".alternative-range-label > slot[name=alternative-range-label]"},cf={CHANGE:`${g7}-change`},hf={DEFAULT_PAGE_INDEX:0,DEFAULT_TOTAL:0,DEFAULT_PAGE_SIZE:25,DEFAULT_PAGE_SIZE_OPTIONS:[5,15,25,50,100]},vf={DEFAULT_LABEL:"Rows per page:",RANGE_SEPARATOR_LABEL:"of"},Z={elementName:g7,observedAttributes:w7,attributes:rf,selectors:lf,events:cf,numbers:hf,strings:vf};var s4=class{constructor(t){this._adapter=t;this._pageIndex=Z.numbers.DEFAULT_PAGE_INDEX;this._pageSize=Z.numbers.DEFAULT_PAGE_SIZE;this._offset=0;this._total=Z.numbers.DEFAULT_TOTAL;this._pageSizeOptions=Z.numbers.DEFAULT_PAGE_SIZE_OPTIONS.map(t=>({label:`${t}`,value:`${t}`}));this._label=Z.strings.DEFAULT_LABEL;this._firstLast=!1;this._first=!1;this._disabled=!1;this._alternative=!1;this._firstPageListener=this._onFirstPage.bind(this);this._previousPageListener=this._onPreviousPage.bind(this);this._nextPageListener=this._onNextPage.bind(this);this._lastPageListener=this._onLastPage.bind(this);this._pageSizeListener=this._onPageSizeChanged.bind(this)}initialize(){this._updateRangeLabel(),this._adapter.setLabel(this._label),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.setPageSize(this._pageSize),this._attachListeners(),this._toggleFirstLastButtons(),this._syncInteractionState()}focus(t){this._adapter.setFocus(t)}_attachListeners(){this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.attachFirstPageListener(this._firstPageListener),this._adapter.attachPreviousPageListener(this._previousPageListener),this._adapter.attachNextPageListener(this._nextPageListener),this._adapter.attachLastPageListener(this._lastPageListener)}_onFirstPage(t){if(t.stopPropagation(),!this._hasFirstPage())return;let e=0;this._dispatchChangeEvent("first-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPreviousPage(t){if(t.stopPropagation(),!this._hasPreviousPage())return;let e=this._pageIndex-1;this._dispatchChangeEvent("previous-page",{pageIndex:e})&&this._applyPageIndex(e)}_onNextPage(t){if(t.stopPropagation(),!this._hasNextPage())return;let e=this._pageIndex+1;this._dispatchChangeEvent("next-page",{pageIndex:e})&&this._applyPageIndex(e)}_onLastPage(t){if(t.stopPropagation(),!this._hasLastPage())return;let e=this._getMaxPages();this._dispatchChangeEvent("last-page",{pageIndex:e})&&this._applyPageIndex(e)}_onPageSizeChanged(t){t.stopPropagation();let e=Number(t.detail);this._dispatchChangeEvent("page-size",{pageIndex:0,pageSize:e})?(this._applyPageIndex(0),this._applyPageSize(e)):t.preventDefault()}_dispatchChangeEvent(t,{pageSize:e=this._pageSize,pageIndex:o=this._pageIndex}={}){let a=o*e,s={type:t,pageSize:e,pageIndex:o,offset:a},r=new CustomEvent(Z.events.CHANGE,{detail:s,bubbles:!0,cancelable:!0});return this._adapter.dispatchHostEvent(r),!r.defaultPrevented}_getMaxPages(){return Math.ceil(this._total/this._pageSize)-1}_updateRangeLabel(){let t;if(typeof this._rangeLabelCallback=="function"){let e={pageSize:this._pageSize,pageIndex:this._pageIndex,offset:this._offset,pageStart:this._pageIndex*this._pageSize+1,pageEnd:Math.min((this._pageIndex+1)*this._pageSize,this._total),total:this._total};t=this._rangeLabelCallback.call(null,e)}else if(this.pageSize>1){let e=this._pageIndex*this._pageSize,a=(Math.floor(e/this._pageSize)||0)*this._pageSize+1,s=e<this._total?Math.min(e+this._pageSize,this._total):e+this._pageSize;t=`${a}-${s} ${Z.strings.RANGE_SEPARATOR_LABEL} ${this._total}`}else t=`${this._pageIndex+1} ${Z.strings.RANGE_SEPARATOR_LABEL} ${this._total}`;this._adapter.setRangeLabel(t)}_syncInteractionState(){if(this._disabled)return;this._adapter.setFirstPageButtonEnabled(!0),this._adapter.setPreviousPageButtonEnabled(!0),this._adapter.setNextPageButtonEnabled(!0),this._adapter.setLastPageButtonEnabled(!0);let t=[];this._hasFirstPage()||t.push("first"),this._hasPreviousPage()||t.push("previous"),this._hasNextPage()||t.push("next"),this._hasLastPage()||t.push("last"),this._adapter.tryDisableFields(t)}_toggleFirstLastButtons(){this._toggleFirstButton(),this._firstLast?this._adapter.hasLastPageButton()||this._adapter.showLastPageButton():this._adapter.hasLastPageButton()&&this._adapter.hideLastPageButton()}_toggleFirstButton(){this._first||this._firstLast?this._adapter.hasFirstPageButton()||this._adapter.showFirstPageButton():this._adapter.hasFirstPageButton()&&this._adapter.hideFirstPageButton()}_hasFirstPage(){return this._hasPreviousPage()}_hasPreviousPage(){return this._pageIndex>0&&this._pageSize>0}_hasNextPage(){let t=this._getMaxPages();return this._pageIndex<t&&this._pageSize>0}_hasLastPage(){return this._hasNextPage()}_computePageIndexFromOffset(t){t>=this._total&&(this._total>=this._pageSize?t=this._total-this._pageSize:t=0);let e=Math.min(Math.max(t,0),this._total),o=Math.floor(e/this._pageSize);this._applyPageIndex(o)}_computeOffset(){this._total>0&&(this._offset=this._pageIndex*this._pageSize)}_applyPageIndex(t){this._pageIndex=t,this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState(),this._adapter.toggleHostAttribute(Z.attributes.PAGE_INDEX,this._pageIndex!=null,this._pageIndex.toString())}_applyPageSize(t){this._pageSize=t,this._adapter.setPageSize(this._pageSize),this._computeOffset(),this._updateRangeLabel(),this._syncInteractionState()}_applyTotal(t){this._total=t,this._updateRangeLabel(),this._offset>0&&this._total>0&&this._computePageIndexFromOffset(this._offset),this._syncInteractionState()}_applyDisabled(t){this._disabled=t,t?(this._adapter.setPageSizeSelectEnabled(!1),this._adapter.setFirstPageButtonEnabled(!1),this._adapter.setPreviousPageButtonEnabled(!1),this._adapter.setNextPageButtonEnabled(!1),this._adapter.setLastPageButtonEnabled(!1)):(this._adapter.setPageSizeSelectEnabled(!0),this._syncInteractionState())}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex!==t&&(O(t)?this._applyPageIndex(t):this._adapter.removeHostAttribute(Z.attributes.PAGE_INDEX))}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize!==t&&(this._applyPageSize(t),this._adapter.setHostAttribute(Z.attributes.PAGE_SIZE,`${this._pageSize}`))}get offset(){return this._offset}set offset(t){this._offset!==t&&(this._offset=t,this._computePageIndexFromOffset(t))}get total(){return this._total}set total(t){this._total!==t&&(this._applyTotal(t),this._adapter.setHostAttribute(Z.attributes.TOTAL,`${this._total}`))}get pageSizeOptions(){return this._pageSizeOptions.map(t=>Number(t.value))}set pageSizeOptions(t){if(ht(t)&&t.length){if(this._pageSizeOptions=t.map(e=>({label:e.toString(),value:e.toString()})).sort((e,o)=>K(e.value)-K(o.value)),this._adapter.setPageSizeOptions(this._pageSizeOptions),this._adapter.attachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!0),O(this._pageSize)&&this._pageSizeOptions.length&&!this._pageSizeOptions.find(e=>K(e.value)===this._pageSize)){let e=K(this._pageSizeOptions[0].value);this._applyPageSize(e)}}else t!=null&&t.length||(this._adapter.detachPageSizeChangeListener(this._pageSizeListener),this._adapter.setPageSizeVisibility(!1))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.setLabel(this._label),O(this._label)&&this._label.length?this._adapter.setHostAttribute(Z.attributes.LABEL,String(this._label)):this._adapter.removeHostAttribute(Z.attributes.LABEL))}get firstLast(){return this._firstLast}set firstLast(t){t=!!t,this._firstLast!==t&&(this._firstLast=t,this._toggleFirstLastButtons(),this._adapter.toggleHostAttribute(Z.attributes.FIRST_LAST,this._firstLast))}get first(){return this._first}set first(t){t=!!t,this._first!==t&&(this._first=t,this._toggleFirstButton(),this._adapter.toggleHostAttribute(Z.attributes.FIRST,this._first))}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._applyDisabled(t),this._adapter.toggleHostAttribute(Z.attributes.DISABLED,this._disabled))}get alternative(){return this._alternative}set alternative(t){t=!!t,t!==this._alternative&&(this._alternative=t,this._adapter.toggleHostAttribute(Z.attributes.ALTERNATIVE,this._alternative))}get rangeLabelCallback(){return this._rangeLabelCallback}set rangeLabelCallback(t){this._rangeLabelCallback=t,this._updateRangeLabel()}};var r4=class extends I{constructor(t){super(t),this._labelElement=w(t,Z.selectors.LABEL),this._pageSizeSelect=w(t,Z.selectors.PAGE_SIZE_SELECT),this._rangeLabel=w(t,Z.selectors.RANGE_LABEL),this._rangeLabelAlternative=w(t,Z.selectors.RANGE_LABEL_ALTERNATIVE),this._firstPageButton=w(t,Z.selectors.FIRST_PAGE_BUTTON),this._firstPageContainer=w(t,Z.selectors.FIRST_PAGE_CONTAINER),this._previousPageButton=w(t,Z.selectors.PREVIOUS_PAGE_BUTTON),this._previousPageContainer=w(t,Z.selectors.PREVIOUS_PAGE_CONTAINER),this._nextPageButton=w(t,Z.selectors.NEXT_PAGE_BUTTON),this._nextPageContainer=w(t,Z.selectors.NEXT_PAGE_CONTAINER),this._lastPageButton=w(t,Z.selectors.LAST_PAGE_BUTTON),this._lastPageContainer=w(t,Z.selectors.LAST_PAGE_CONTAINER)}setLabel(t){this._labelElement.textContent=t}setPageSizeOptions(t){n2(this._pageSizeSelect),this._pageSizeSelect.options=t}setPageSize(t){this._pageSizeSelect.value=t.toString()}setRangeLabel(t){this._rangeLabel.innerText=t,this._rangeLabelAlternative.innerText=t}hasFirstPageButton(){return!!w(this._component,Z.selectors.FIRST_PAGE_BUTTON)}showFirstPageButton(){this._firstPagePlaceholder=Za(this._component,!0,Z.elementName,Z.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hideFirstPageButton(){this._firstPagePlaceholder=Za(this._component,!1,Z.elementName,Z.selectors.FIRST_PAGE_CONTAINER,this._firstPageContainer,this._firstPagePlaceholder)}hasLastPageButton(){return!!w(this._component,Z.selectors.LAST_PAGE_BUTTON)}showLastPageButton(){this._lastPagePlaceholder=Za(this._component,!0,Z.elementName,Z.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}hideLastPageButton(){this._lastPagePlaceholder=Za(this._component,!1,Z.elementName,Z.selectors.LAST_PAGE_CONTAINER,this._lastPageContainer,this._lastPagePlaceholder)}attachPageSizeChangeListener(t){this._pageSizeSelect.addEventListener("change",t)}detachPageSizeChangeListener(t){this._pageSizeSelect.removeEventListener("change",t)}attachFirstPageListener(t){this._firstPageButton.addEventListener("click",t)}attachPreviousPageListener(t){this._previousPageButton.addEventListener("click",t)}attachNextPageListener(t){this._nextPageButton.addEventListener("click",t)}attachLastPageListener(t){this._lastPageButton.addEventListener("click",t)}setFirstPageButtonEnabled(t){this._firstPageButton.disabled=!t}setPreviousPageButtonEnabled(t){this._previousPageButton.disabled=!t}setNextPageButtonEnabled(t){this._nextPageButton.disabled=!t}setLastPageButtonEnabled(t){this._lastPageButton.disabled=!t}setPageSizeSelectEnabled(t){this._pageSizeSelect.disabled=!t}setPageSizeVisibility(t){this._pageSizeSelect.hidden=!t}setFocus(t){this._tryFocus([this._pageSizeSelect,this._firstPageButton,this._previousPageButton,this._nextPageButton,this._lastPageButton],t)}tryDisableFields(t){let e={first:()=>this.setFirstPageButtonEnabled(!1),last:()=>this.setLastPageButtonEnabled(!1),previous:()=>this.setPreviousPageButtonEnabled(!1),next:()=>this.setNextPageButtonEnabled(!1)};t.forEach(o=>{var a;return(a=e[o])==null?void 0:a.call(e)})}_tryFocus(t,e){let o=typeof(e==null?void 0:e.preventScroll)=="boolean"?e.preventScroll:!0;for(let a of t)if(a&&a.isConnected&&!a.disabled&&a.style.display!=="none"){a.focus(S(d({},e),{preventScroll:o}));return}}};function u7(n){class t extends n{constructor(...o){super(...o)}initializeFieldInstance(o){this._fieldElement=o,this._fieldElement.shadowRoot||window.customElements.upgrade(this._fieldElement)}attributeChangedCallback(o,a,s){var r;switch(o){case Y.observedAttributes.LABEL_POSITION:this.labelPosition=s;return;case Y.observedAttributes.LABEL_ALIGNMENT:this.labelAlignment=s;return;case Y.observedAttributes.INVALID:this.invalid=p(s);return;case Y.observedAttributes.REQUIRED:this.required=p(s);return;case Y.observedAttributes.OPTIONAL:this.optional=p(s);return;case Y.observedAttributes.DISABLED:this.disabled=p(s);return;case Y.observedAttributes.FLOAT_LABEL:this.floatLabel=p(s);return;case Y.observedAttributes.VARIANT:this.variant=s;return;case Y.observedAttributes.THEME:this.theme=s;return;case Y.observedAttributes.SHAPE:this.shape=s;return;case Y.observedAttributes.DENSITY:this.density=s;return;case Y.observedAttributes.DENSE:this.dense=p(s);return;case Y.observedAttributes.POPOVER_ICON:this.popoverIcon=p(s);return;case Y.observedAttributes.SUPPORT_TEXT_INSET:this.supportTextInset=s;return}(r=super.attributeChangedCallback)==null||r.call(this,o,a,s)}get labelPosition(){return this._fieldElement.labelPosition}set labelPosition(o){this._fieldElement.labelPosition!==o&&(this._fieldElement.labelPosition=o,this.setAttribute(L.attributes.LABEL_POSITION,o))}get labelAlignment(){return this._fieldElement.labelAlignment}set labelAlignment(o){this._fieldElement.labelAlignment!==o&&(this._fieldElement.labelAlignment=o,this.setAttribute(L.attributes.LABEL_ALIGNMENT,o))}get invalid(){return this._fieldElement.invalid}set invalid(o){this._fieldElement.invalid!==o&&(this._fieldElement.invalid=o,this.toggleAttribute(L.attributes.INVALID,o))}get required(){return this._fieldElement.required}set required(o){this._fieldElement.required!==o&&(this._fieldElement.required=o,this.toggleAttribute(L.attributes.REQUIRED,o))}get optional(){return this._fieldElement.optional}set optional(o){this._fieldElement.optional!==o&&(this._fieldElement.optional=o,this.toggleAttribute(L.attributes.OPTIONAL,o))}get disabled(){return this._fieldElement.disabled}set disabled(o){this._fieldElement.disabled!==o&&(this._fieldElement.disabled=o,this.toggleAttribute(L.attributes.DISABLED,o))}get floatLabel(){return this._fieldElement.floatLabel}set floatLabel(o){this._fieldElement.floatLabel!==o&&(this._fieldElement.floatLabel=o,this.toggleAttribute(L.attributes.FLOAT_LABEL,o))}get variant(){return this._fieldElement.variant}set variant(o){this._fieldElement.variant!==o&&(this._fieldElement.variant=o,this.setAttribute(L.attributes.VARIANT,o))}get theme(){return this._fieldElement.theme}set theme(o){this._fieldElement.theme!==o&&(this._fieldElement.theme=o,this.setAttribute(L.attributes.THEME,o))}get shape(){return this._fieldElement.shape}set shape(o){this._fieldElement.shape!==o&&(this._fieldElement.shape=o,this.setAttribute(L.attributes.SHAPE,o))}get density(){return this._fieldElement.density}set density(o){this._fieldElement.density!==o&&(this._fieldElement.density=o,this.setAttribute(L.attributes.DENSITY,o))}get dense(){return this._fieldElement.dense}set dense(o){this._fieldElement.dense!==o&&(this._fieldElement.dense=o,this.toggleAttribute(L.attributes.DENSE,o))}get popoverIcon(){return this._fieldElement.popoverIcon}set popoverIcon(o){this._fieldElement.popoverIcon!==o&&(this._fieldElement.popoverIcon=o,this.toggleAttribute(L.attributes.POPOVER_ICON,o))}get supportTextInset(){return this._fieldElement.supportTextInset}set supportTextInset(o){this._fieldElement.supportTextInset!==o&&(this._fieldElement.supportTextInset=o,this.setAttribute(L.attributes.SUPPORT_TEXT_INSET,o))}floatLabelWithoutAnimation(o){this._fieldElement.floatLabelWithoutAnimation(o)}}return t}var pf=`${b}scaffold`,_7={VIEWPORT:"viewport"},mf=d({},_7),Pa={elementName:pf,observedAttributes:_7,attributes:mf};var df='<template><div class="forge-scaffold" part="root"><slot name="left"></slot><div class="header" part="header"><slot name="header"></slot></div><div class="body" part="body"><slot name="body-left"></slot><slot name="body-header"></slot><slot name="body"></slot><slot name="body-footer"></slot><slot name="body-right"></slot></div><slot name="footer"></slot><slot name="right"></slot></div></template>',gf=':host{--_scaffold-height:var(--forge-scaffold-height, 100%);--_scaffold-width:var(--forge-scaffold-width, 100%)}:host{display:block;width:var(--_scaffold-width);height:var(--_scaffold-height)}:host([hidden]){display:none}.forge-scaffold{--_scaffold-overflow:var(--forge-scaffold-overflow, initial);--_scaffold-body-position:var(--forge-scaffold-body-position, relative)}.forge-scaffold{position:relative;display:grid;grid-template-areas:"left header right" "left body right" "left footer right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;height:var(--_scaffold-height);width:var(--_scaffold-width);overflow:var(--_scaffold-overflow)}.header{grid-area:header;min-width:0;min-height:0}.body{position:var(--_scaffold-body-position);display:grid;grid-area:body;grid-template-areas:"body-left body-header body-right" "body-left body-inner body-right" "body-left body-footer body-right";grid-template-rows:auto 1fr auto;grid-template-columns:auto 1fr auto;width:var(--_scaffold-width);min-width:0;min-height:0;overflow:var(--_scaffold-overflow)}::slotted(*){min-width:0;min-height:0}::slotted([slot=left]){grid-area:left}::slotted([slot=right]){grid-area:right}::slotted([slot=body-left]){grid-area:body-left}::slotted([slot=body-right]){grid-area:body-right}::slotted([slot=body-header]){grid-area:body-header}::slotted([slot=body]){overflow:auto;grid-area:body-inner}::slotted([slot=body-footer]){grid-area:body-footer}::slotted([slot=footer]){grid-area:footer}::slotted([slot=body-left]),::slotted([slot=body-right]),::slotted([slot=body]),::slotted([slot=left]),::slotted([slot=right]){overflow:auto}:host([viewport]){--_scaffold-height:var(--forge-scaffold-height, 100dvh);--_scaffold-width:var(--forge-scaffold-width, 100dvw)}',Je=class extends M{static get observedAttributes(){return Object.values(Pa.observedAttributes)}constructor(){super(),H(this,df,gf)}attributeChangedCallback(t,e,o){switch(t){case Pa.observedAttributes.VIEWPORT:this.viewport=o!==null;break}}get viewport(){return this.hasAttribute(Pa.attributes.VIEWPORT)}set viewport(t){this.toggleAttribute(Pa.attributes.VIEWPORT,!!t)}};Je=i([y({name:Pa.elementName})],Je);function x7(){f(Je)}var i4=class extends I{constructor(t){super(t)}};var f7=`${b}option`,wf={DISABLED:"disabled",DIVIDER:"divider",LABEL:"label",SECONDARY_LABEL:"secondary-label",LEADING_ICON_CLASS:"leading-icon-class",LEADING_ICON_TYPE:"leading-icon-type",LEADING_ICON:"leading-icon",OPTION_CLASS:"option-class",TRAILING_ICON_CLASS:"trailing-icon-class",TRAILING_ICON_TYPE:"trailing-icon-type",TRAILING_ICON:"trailing-icon",TOOLTIP:"tooltip",VALUE:"value"},uf={VALUE_CHANGE:`${f7}-value-change`},R={elementName:f7,attributes:wf,events:uf};var l4=class{constructor(t){this._adapter=t;this._disabled=!1;this._divider=!1;this._optionClass=[]}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._adapter.emitHostEvent(R.events.VALUE_CHANGE,this._value))}get label(){return this._label}set label(t){this._label!==t&&(this._label=t,this._adapter.toggleHostAttribute(R.attributes.LABEL,!!this._label,this._label))}get secondaryLabel(){return this._secondaryLabel}set secondaryLabel(t){this._secondaryLabel!==t&&(this._secondaryLabel=t,this._adapter.toggleHostAttribute(R.attributes.SECONDARY_LABEL,!!this._secondaryLabel,this._secondaryLabel))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.toggleHostAttribute(R.attributes.DISABLED,this._disabled))}get divider(){return this._divider}set divider(t){this._divider!==t&&(this._divider=t,this._adapter.toggleHostAttribute(R.attributes.DIVIDER,this._divider))}get optionClass(){return this._optionClass}set optionClass(t){t?typeof t=="string"&&(t=t.split(" ")):t=[],t=t.filter(e=>e&&!/\s+/.test(e)),this._optionClass.toString()!==t.toString()&&(this._optionClass=t,this._adapter.toggleHostAttribute(R.attributes.OPTION_CLASS,this._optionClass&&!!this._optionClass.length,this._optionClass.join(" ")))}get leadingIcon(){return this._leadingIcon}set leadingIcon(t){this._leadingIcon!==t&&(this._leadingIcon=t,this._adapter.toggleHostAttribute(R.attributes.LEADING_ICON,!!this._leadingIcon,this._leadingIcon))}get leadingIconClass(){return this._leadingIconClass}set leadingIconClass(t){this._leadingIconClass!==t&&(this._leadingIconClass=t,this._adapter.toggleHostAttribute(R.attributes.LEADING_ICON_CLASS,!!this._leadingIconClass,this._leadingIconClass))}get leadingIconType(){return this._leadingIconType}set leadingIconType(t){this._leadingIconType!==t&&(this._leadingIconType=t,this._adapter.toggleHostAttribute(R.attributes.LEADING_ICON_TYPE,!!this._leadingIconType,this._leadingIconType))}get leadingIconComponentProps(){return this._leadingIconComponentProps}set leadingIconComponentProps(t){this._leadingIconComponentProps!==t&&(this._leadingIconComponentProps=t)}get trailingIcon(){return this._trailingIcon}set trailingIcon(t){this._trailingIcon!==t&&(this._trailingIcon=t,this._adapter.toggleHostAttribute(R.attributes.TRAILING_ICON,!!this._trailingIcon,this._trailingIcon))}get trailingIconClass(){return this._trailingIconClass}set trailingIconClass(t){this._trailingIconClass!==t&&(this._trailingIconClass=t,this._adapter.toggleHostAttribute(R.attributes.TRAILING_ICON_CLASS,!!this._trailingIconClass,this._trailingIconClass))}get trailingIconType(){return this._trailingIconType}set trailingIconType(t){this._trailingIconType!==t&&(this._trailingIconType=t,this._adapter.toggleHostAttribute(R.attributes.TRAILING_ICON_TYPE,!!this._trailingIconType,this._trailingIconType))}get trailingIconComponentProps(){return this._trailingIconComponentProps}set trailingIconComponentProps(t){this._trailingIconComponentProps!==t&&(this._trailingIconComponentProps=t)}get leadingBuilder(){return this._leadingBuilder}set leadingBuilder(t){this._leadingBuilder!==t&&(this._leadingBuilder=t)}get trailingBuilder(){return this._trailingBuilder}set trailingBuilder(t){this._trailingBuilder!==t&&(this._trailingBuilder=t)}get tooltip(){return this._tooltip}set tooltip(t){this._tooltip!==t&&(this._tooltip=t)}};var $1=class extends M{static get observedAttributes(){return[R.attributes.VALUE,R.attributes.LABEL,R.attributes.SECONDARY_LABEL,R.attributes.DISABLED,R.attributes.DIVIDER,R.attributes.OPTION_CLASS,R.attributes.LEADING_ICON,R.attributes.LEADING_ICON_CLASS,R.attributes.LEADING_ICON_TYPE,R.attributes.TRAILING_ICON,R.attributes.TRAILING_ICON_CLASS,R.attributes.TRAILING_ICON_TYPE,R.attributes.TOOLTIP]}constructor(){super(),this._core=new l4(new i4(this))}attributeChangedCallback(t,e,o){switch(t){case R.attributes.VALUE:this.value=o;break;case R.attributes.LABEL:this.label=o;break;case R.attributes.SECONDARY_LABEL:this.secondaryLabel=o;break;case R.attributes.DISABLED:this.disabled=p(o);break;case R.attributes.DIVIDER:this.divider=this.hasAttribute(R.attributes.DIVIDER);break;case R.attributes.OPTION_CLASS:this.optionClass=o;break;case R.attributes.LEADING_ICON:this.leadingIcon=o;break;case R.attributes.LEADING_ICON_CLASS:this.leadingIconClass=o;break;case R.attributes.LEADING_ICON_TYPE:this.leadingIconType=o;break;case R.attributes.TRAILING_ICON:this.trailingIcon=o;break;case R.attributes.TRAILING_ICON_CLASS:this.trailingIconClass=o;break;case R.attributes.TRAILING_ICON_TYPE:this.trailingIconType=o;break;case R.attributes.TOOLTIP:this.tooltip=o?{text:o}:void 0;break}}};i([c()],$1.prototype,"value",2),i([c()],$1.prototype,"label",2),i([c()],$1.prototype,"secondaryLabel",2),i([c()],$1.prototype,"disabled",2),i([c()],$1.prototype,"divider",2),i([c()],$1.prototype,"optionClass",2),i([c()],$1.prototype,"leadingIcon",2),i([c()],$1.prototype,"leadingIconClass",2),i([c()],$1.prototype,"leadingIconType",2),i([c()],$1.prototype,"leadingIconComponentProps",2),i([c()],$1.prototype,"trailingIcon",2),i([c()],$1.prototype,"trailingIconClass",2),i([c()],$1.prototype,"trailingIconType",2),i([c()],$1.prototype,"trailingIconComponentProps",2),i([c()],$1.prototype,"leadingBuilder",2),i([c()],$1.prototype,"trailingBuilder",2),i([c()],$1.prototype,"tooltip",2),$1=i([y({name:R.elementName})],$1);function b7(){f($1)}var _f=`${b}option-group`,xf={LABEL:"label"},vo={elementName:_f,attributes:xf};var t0=class extends M{static get observedAttributes(){return[vo.attributes.LABEL]}constructor(){super()}attributeChangedCallback(t,e,o){switch(t){case vo.attributes.LABEL:this.label=o;break}}get label(){return this._label}set label(t){this._label!==t&&(this._label=t||"",this.setAttribute(vo.attributes.LABEL,this._label))}get text(){return this._label}set text(t){this.label=t}};t0=i([y({name:vo.elementName})],t0);function y7(){f(t0)}var M7=(e=>(e[e.Option=0]="Option",e[e.Group=1]="Group",e))(M7||{});function w3(n,t){let e=n.some(a=>u3(a)),o=n.some(a=>ff(a));return e&&t===1||o&&t===0}function u3(n){return O(n)&&vt(n)&&Object.prototype.hasOwnProperty.call(n,"options")}function ff(n){return O(n)&&vt(n)&&Object.prototype.hasOwnProperty.call(n,"label")&&Object.prototype.hasOwnProperty.call(n,"value")}var Na=class extends I{constructor(t){super(t)}get popupElement(){var t;return(t=this._listDropdown)==null?void 0:t.dropdownElement}getOptions(){let t=Array.from(this._component.querySelectorAll(vo.elementName));if(t.length)return t.map(e=>{let o=Array.from(e.querySelectorAll(R.elementName)),a=this._createOptionsFromElements(o);return{text:e.label,builder:e.builder,value:e.value,options:a}});{let e=Array.from(this._component.querySelectorAll(R.elementName));return this._createOptionsFromElements(e)}}_createOptionsFromElements(t){return t.map(e=>{let o=e.hasAttribute(R.attributes.OPTION_CLASS)?e.getAttribute(R.attributes.OPTION_CLASS):e.optionClass;return typeof o=="string"&&(o=o.split(" ")),{label:e.hasAttribute(R.attributes.LABEL)?e.getAttribute(R.attributes.LABEL):O(e.label)?e.label:e.innerText,secondaryLabel:e.hasAttribute(R.attributes.SECONDARY_LABEL)?e.getAttribute(R.attributes.SECONDARY_LABEL):O(e.secondaryLabel)?e.secondaryLabel:void 0,value:e.hasAttribute(R.attributes.VALUE)?e.getAttribute(R.attributes.VALUE):e.value,disabled:e.hasAttribute(R.attributes.DISABLED),divider:e.hasAttribute(R.attributes.DIVIDER),optionClass:o,leadingIcon:e.hasAttribute(R.attributes.LEADING_ICON)?e.getAttribute(R.attributes.LEADING_ICON):e.leadingIcon,leadingIconClass:e.hasAttribute(R.attributes.LEADING_ICON_CLASS)?e.getAttribute(R.attributes.LEADING_ICON_CLASS):e.leadingIconClass,leadingIconType:e.hasAttribute(R.attributes.LEADING_ICON_TYPE)?e.getAttribute(R.attributes.LEADING_ICON_TYPE):e.leadingIconType,leadingIconComponentProps:e.leadingIconComponentProps,trailingIcon:e.hasAttribute(R.attributes.TRAILING_ICON)?e.getAttribute(R.attributes.TRAILING_ICON):e.trailingIcon,trailingIconClass:e.hasAttribute(R.attributes.TRAILING_ICON_CLASS)?e.getAttribute(R.attributes.TRAILING_ICON_CLASS):e.trailingIconClass,trailingIconType:e.hasAttribute(R.attributes.TRAILING_ICON_TYPE)?e.getAttribute(R.attributes.TRAILING_ICON_TYPE):e.trailingIconType,trailingIconComponentProps:e.trailingIconComponentProps,leadingBuilder:e.leadingBuilder,trailingBuilder:e.trailingBuilder,tooltip:e.tooltip}})}open(t){var e;if(this._listDropdown=new qe(this._targetElement,t),this._listDropdown.open(),this._component.id){let o=(e=this._listDropdown.dropdownElement)==null?void 0:e.querySelector("forge-list");o==null||o.setAttribute("aria-labelledby",this._component.id)}}async close(){this._listDropdown&&(await this._listDropdown.close(),this.destroyListDropdown())}destroyListDropdown(){var t;(t=this._listDropdown)==null||t.destroy(),this._listDropdown=void 0}setDismissListener(t){!this._listDropdown||!this._listDropdown.dropdownElement||this._listDropdown.dropdownElement.addEventListener(Q.events.TOGGLE,t)}toggleOptionMultiple(t,e){var o;(o=this._listDropdown)==null||o.toggleOptionMultiple(t,e)}getActiveOptionIndex(){var t,e;return(e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1}activateSelectedOption(){var t;(t=this._listDropdown)==null||t.activateSelectedOption()}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}highlightActiveOption(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}patchSelectedValues(t){var e;(e=this._listDropdown)==null||e.setSelectedValues(t)}setOptionsListener(t){let e=a=>{a.stopPropagation(),t(this.getOptions())};this._component.addEventListener(R.events.VALUE_CHANGE,e);let o=new MutationObserver(()=>t(this.getOptions()));return o.observe(this._component,{childList:!0,subtree:!0}),()=>{this._component.removeEventListener(R.events.VALUE_CHANGE,e),o.disconnect()}}setOptions(t,e=!0){e&&this._clearOptions();for(let o of t)if(u3(o)){let a=this._createOptionGroupElement(o);for(let s of o.options){let r=this._createOptionElement(s);a.appendChild(r)}this._component.appendChild(a)}else{let a=this._createOptionElement(o);this._component.appendChild(a)}}appendDropdownOptions(t){var e;(e=this._listDropdown)==null||e.appendOptions(t)}setDropdownOptions(t){var e;(e=this._listDropdown)==null||e.setOptions(t)}scrollSelectedOptionIntoView(){var t;(t=this._listDropdown)==null||t.scrollSelectedOptionIntoView()}isFocusWithinPopup(t){return!this._listDropdown||!this._listDropdown.dropdownElement?!1:this._listDropdown.dropdownElement.contains(t)}queueDropdownPositionUpdate(){this.popupElement&&window.requestAnimationFrame(()=>{let t=this.popupElement;t==null||t.position()})}_clearOptions(){Array.from(this._component.querySelectorAll(vo.elementName)).forEach(o=>Fe(o)),Array.from(this._component.querySelectorAll(R.elementName)).forEach(o=>Fe(o))}_createOptionGroupElement(t){let e=document.createElement("forge-option-group");return Object.assign(e,t),e}_createOptionElement(t){let e=document.createElement("forge-option");return Object.assign(e,t),e.textContent=t.label,t.elementAttributes&&t.elementAttributes.forEach((o,a)=>{e.setAttribute(a,o)}),e}};var z7={VALUE:"value",MULTIPLE:"multiple",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold",POPUP_CLASSES:"popup-classes",OPTION_LIMIT:"option-limit",SYNC_POPUP_WIDTH:"sync-popup-width",CONSTRAIN_POPUP_WIDTH:"constrain-popup-width",WRAP_OPTION_TEXT:"wrap-option-text"},bf=d({},z7),yf={CHANGE:"change"},Lt={observedAttributes:z7,attributes:bf,events:yf};var Ra=class extends J0{constructor(e){super();this._adapter=e;this._options=[];this._value=[];this._multiple=!1;this._open=!1;this._selectedValues=[];this._selectedLabels=[];this._selectedIndexes=[];this._filterString="";this._focusListener=o=>this._onFocus(o),this._blurListener=o=>this._onBlur(o),this._clickListener=o=>this._onClick(o),this._keydownListener=o=>this._onKeydown(o),this._optionsChangedListener=o=>this._onOptionsChanged(o),this._activeChangeListener=o=>this._onActiveOptionChanged(o),this._dropdownScrollEndListener=()=>this._onDropdownScrollEnd(),this._dismissListener=()=>this._onDismiss(),this._identifier=V2()}_onFocus(e){}initialize(){this._optionListenerDestructor&&this._optionListenerDestructor(),this._optionListenerDestructor=this._adapter.setOptionsListener(this._optionsChangedListener),this._initializeValue()}initializeTarget(){this._adapter.initializeAccessibility(),this._adapter.addClickListener(this._clickListener),this._adapter.addTargetListener("blur",this._blurListener),this._adapter.addTargetListener("focus",this._focusListener),this._adapter.addTargetListener("keydown",this._keydownListener)}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeTargetListener("blur",this._blurListener),this._adapter.removeTargetListener("focus",this._focusListener),this._adapter.removeTargetListener("keydown",this._keydownListener),this._optionListenerDestructor&&this._optionListenerDestructor(),this._open=!1,this._adapter.destroyListDropdown()}appendOptions(e){this._adapter.setOptions(e,!1),this._open&&this._adapter.appendDropdownOptions(e)}selectAll(){this._multiple&&(this.value=this._flatOptions.map(e=>e.value))}deselectAll(){this._multiple&&(this.value=[])}get _flatOptions(){return w3(this._options,1)?this._options.flatMap(e=>e.options):this._options}get _nonDividerOptions(){return this._flatOptions.filter(e=>!e.divider)}_initializeValue(){let e=this._options.length&&this._options||this._adapter.getOptions();O(this._value)&&e.length&&this._applyValue(this._value)}_onClick(e){e.button===0&&(this._open?this._closeDropdown():this._openDropdown())}_onBlur(e){this._adapter.isFocusWithinPopup(e.relatedTarget)||this._open&&this._closeDropdown()}_openDropdown(){if(this._options=this._adapter.getOptions(),!this._flatOptions.length)return;this._open=!0;let e={options:this._options,referenceElement:this._adapter.hostElement,multiple:this._multiple,selectedValues:[...this._selectedValues],id:this._identifier,optionBuilder:this._optionBuilder,syncWidth:this._syncPopupWidth,constrainViewportWidth:this._constrainPopupWidth,wrapOptionText:this._wrapOptionText,observeScroll:this._observeScroll,observeScrollThreshold:this._observeScrollThreshold,scrollEndListener:this._dropdownScrollEndListener,activeChangeCallback:this._activeChangeListener,targetWidthCallback:this._targetWidthCallback,popupPlacement:this._popoverPlacement,popupOffset:this._popoverOffset,popupFlip:this._popoverFlip,popupShift:this._popoverShift,popupFallbackPlacements:this._popoverFallbackPlacements,popupClasses:this._popupClasses,optionLimit:this._optionLimit,headerBuilder:this._popupHeaderBuilder,footerBuilder:this._popupFooterBuilder,closeCallback:()=>this._closeDropdown(),selectCallback:o=>{let a=this._flatOptions,s=a.find(r=>r.value===o);if(s){let r=a.indexOf(s);this._onSelect(s,r,!0)}}};this._adapter.open(e),this._adapter.setDismissListener(this._dismissListener)}_closeDropdown(){this._open=!1,this._adapter.close()}async _onSelect(e,o,a=!0){if(this._valueChanging)return!1;let s=e?e.value:"",r=e?e.label:"",l=[...this._value],h=[...this._selectedValues],v=[...this._selectedLabels],m=[...this._selectedIndexes];if(this._multiple)if(this._selectedValues.includes(s)){let E=this._selectedValues.indexOf(s);this._selectedValues.splice(E,1),this._selectedLabels.splice(E,1),this._selectedIndexes.splice(E,1)}else this._selectedValues.push(s),this._selectedLabels.push(r),this._selectedIndexes.push(o);else O(s)?(this._selectedValues[0]=s,this._selectedLabels[0]=r,this._selectedIndexes[0]=o):(this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]);this._value=[...this._selectedValues];let u=()=>{this._selectedValues=[...h],this._selectedLabels=[...v],this._selectedIndexes=[...m],this._value=[...l]},z=()=>{if(this._multiple){let E=this._selectedIndexes.includes(o);this._adapter.toggleOptionMultiple(o,E)}this._applySelection()},x=this.multiple?[...this._selectedValues]:this._selectedValues[0];if(this._open&&a&&!this._multiple&&this._closeDropdown(),typeof this._beforeValueChange=="function"){this._valueChanging=Promise.resolve(this._beforeValueChange.call(null,x));let E=await this._valueChanging;if(this._valueChanging=void 0,!E)return u(),this._tryUpdateDropdownPosition(),!1}let C=!this._adapter.emitHostEvent(Lt.events.CHANGE,x,!0,!0);return C?u():z(),this._tryUpdateDropdownPosition(),!C}_selectActiveOption(){let e=this._adapter.getActiveOptionIndex();e>=0&&this._nonDividerOptions[e]&&this._onSelect(this._nonDividerOptions[e],e)}_tryUpdateDropdownPosition(){this._open&&this._adapter.queueDropdownPositionUpdate()}_reset(){this._selectedValues=[],this._selectedLabels=[],this._selectedIndexes=[]}_applyValue(e){this._selectedValues=[],this._selectedLabels=[],this._options=this._adapter.getOptions(),Array.isArray(e)||(e=[e]),this._value=[];for(let o of e){this._value.includes(o)||this._value.push(o);let a=this._flatOptions.find(s=>Wt(s.value,o));a&&(this._selectedValues.push(a.value),this._selectedLabels.push(a.label))}this._selectedIndexes=this._selectedValues.map(o=>this._flatOptions.findIndex(a=>a.value===o)),this._adapter.patchSelectedValues(this._selectedValues)}_onDismiss(){this._closeDropdown()}_getSelectedText(){if(typeof this._selectedTextBuilder=="function"){let e=this._flatOptions.filter(o=>this._selectedValues.includes(o.value));return this._selectedTextBuilder(e)}return this._multiple?this._selectedLabels.length?this._selectedLabels.length===1?this._selectedLabels[0]:`${this._selectedLabels.length} options selected`:"":this._selectedLabels.filter(e=>e&&e.length).join(" ").trim()}_onKeydown(e){let o=e.key==="Escape"||e.keyCode===27,a=e.key==="Enter"||e.keyCode===13,s=e.key==="Space"||e.keyCode===32,r=e.key==="ArrowDown"||e.keyCode===40,l=e.key==="ArrowUp"||e.keyCode===38,h=e.keyCode>=48&&e.keyCode<=90,v=e.key==="Home"||e.keyCode===36,m=e.key==="End"||e.keyCode===35;if(e.key==="Tab"&&this._open&&!this._multiple){this._selectActiveOption();return}if(!h&&this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterString="",this._filterTimeout=void 0),o&&(e.preventDefault(),e.stopPropagation(),this._open)){this._closeDropdown();return}if(s)e.preventDefault(),e.stopPropagation(),this._open?this._closeDropdown():this._openDropdown();else if(a)this._open&&(e.stopPropagation(),e.preventDefault(),this._options=this._adapter.getOptions(),this._selectActiveOption());else if(l||r){if(e.preventDefault(),!this._open){this._openDropdown(),this._adapter.activateFirstOption();return}if(this._flatOptions.length===0)return;let z=0;this._open?(z=this._adapter.getActiveOptionIndex(),z===-1&&(z=this._getFirstSelectedOptionIndex())):z=this._getFirstSelectedOptionIndex(),l?z=this._getPreviousHighlightableOptionIndex(z,this._nonDividerOptions):z=this._getNextHighlightableOptionIndex(z,this._nonDividerOptions),this._adapter.highlightActiveOption(z)}else if(v)this._open&&(e.preventDefault(),this._adapter.highlightActiveOption(this._nonDividerOptions.findIndex(z=>!z.disabled)));else if(m){if(this._open){e.preventDefault();let z=this._nonDividerOptions;for(let x=z.length-1;x>=0;x--)if(!z[x].disabled){this._adapter.highlightActiveOption(x);break}}}else h&&this._filter(e.key)}_getFirstSelectedOptionIndex(){return this._nonDividerOptions.findIndex(e=>this._selectedValues.includes(e.value))}_getPreviousHighlightableOptionIndex(e,o){let a=e;return a<=0?a=o.length-1:a--,o[a].disabled?this._getPreviousHighlightableOptionIndex(a,o):a}_getNextHighlightableOptionIndex(e,o){let a=e;return a===o.length-1?a=0:a++,o[a].disabled?this._getNextHighlightableOptionIndex(a,o):a}_filter(e){this._filterTimeout&&(window.clearTimeout(this._filterTimeout),this._filterTimeout=void 0),this._filterString+=e,this._filterTimeout=window.setTimeout(()=>{this._filterString="",this._filterTimeout=void 0},300),this._options=this._adapter.getOptions();let o=this._flatOptions.find(({disabled:a,label:s})=>!a&&s.trim().toLowerCase().startsWith(this._filterString.trim().toLowerCase()));if(o){let a=this._flatOptions.indexOf(o);this._open?this._adapter.highlightActiveOption(a):this._multiple||this._onSelect(o,a,!1)}}_onOptionsChanged(e){this._options=e,this._applyValue(this._value)}_onActiveOptionChanged(e){this._adapter.updateActiveDescendant(e)}get value(){return this._multiple?[...this._value]:this._value[0]}set value(e){let o;Array.isArray(e)?o=[...e]:o=e,this._applyValue(o)}get selectedIndex(){return this._multiple?[...this._selectedIndexes]:this._selectedIndexes[0]}set selectedIndex(e){this._options=this._adapter.getOptions();let o;if(Array.isArray(e)?o=[...e]:o=[e],o.sort(),this.multiple)this.value=o.map(a=>this._flatOptions[a]).filter(a=>a).map(a=>a.value);else{let a=this._flatOptions[o[o.length-1]];if(!a)return;this.value=a.value}}get options(){return this._adapter.getOptions()}set options(e){let o;w3(e,1)?o=e.map(a=>d({},a)):o=e.map(a=>d({},a)),this._options=o,this._adapter.setOptions(o),this._initializeValue(),this._open&&this._adapter.setDropdownOptions(o)}get multiple(){return this._multiple}set multiple(e){this._multiple!==e&&(this._multiple=e,this._reset(),this._open&&this._closeDropdown())}get open(){return this._open}set open(e){this._open!==e&&(e?this._openDropdown():this._closeDropdown())}get optionBuilder(){return this._optionBuilder}set optionBuilder(e){this._optionBuilder=e}get selectedTextBuilder(){return this._selectedTextBuilder}set selectedTextBuilder(e){this._selectedTextBuilder=e}get optionLimit(){return this._optionLimit}set optionLimit(e){this._optionLimit=e}get popupClasses(){return this._popupClasses}set popupClasses(e){this._popupClasses=e}get popupHeaderBuilder(){return this._popupHeaderBuilder}set popupHeaderBuilder(e){this._popupHeaderBuilder=e}get popupFooterBuilder(){return this._popupFooterBuilder}set popupFooterBuilder(e){this._popupFooterBuilder=e}get popupElement(){return this._adapter.popupElement}get beforeValueChange(){return this._beforeValueChange}set beforeValueChange(e){this._beforeValueChange=e}};var Vt=class extends Q1{constructor(){super()}attributeChangedCallback(t,e,o){switch(super.attributeChangedCallback(t,e,o),t){case Lt.attributes.MULTIPLE:this.multiple=p(o);break;case Lt.attributes.VALUE:this.value=o;break}}appendOptions(t){this._core.appendOptions(t)}selectAll(){this._core.selectAll()}deselectAll(){this._core.deselectAll()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}};i([c()],Vt.prototype,"value",2),i([c()],Vt.prototype,"selectedIndex",2),i([c()],Vt.prototype,"options",2),i([c()],Vt.prototype,"multiple",2),i([c()],Vt.prototype,"open",2),i([c()],Vt.prototype,"optionBuilder",2),i([c()],Vt.prototype,"selectedTextBuilder",2),i([c()],Vt.prototype,"beforeValueChange",2),i([c({set:!1})],Vt.prototype,"popupElement",2);var H7=`${b}select`,Mf={FIELD:"#field",SELECTED_TEXT:"#selected-text",LABEL:"#select-label"},I7={OPEN:"open",TYPE:"type",VALUE:"value",LABEL:"label",MULTIPLE:"multiple",DISABLED:"disabled",PLACEHOLDER:"placeholder",OBSERVE_SCROLL:"observe-scroll",OBSERVE_SCROLL_THRESHOLD:"observe-scroll-threshold"},zf=d({},I7),Hf={SCROLLED_BOTTOM:`${H7}-scrolled-bottom`},X2={elementName:H7,observedAttributes:I7,attributes:zf,selectors:Mf,events:Hf};var c4=class extends Na{constructor(t){super(t),this._fieldElement=w(t,X2.selectors.FIELD),this._labelElement=w(t,X2.selectors.LABEL),this._selectedTextElement=w(t,X2.selectors.SELECTED_TEXT),this._fieldElement.setAttribute("exportparts",Object.values(L.parts).join(", ")),this._fieldElement.focusIndicatorTargetElement=this._component}get fieldElement(){return this._fieldElement}initializeAccessibility(){this._component.setAttribute("role","combobox"),this._component.setAttribute("aria-haspopup","true"),this._component.setAttribute("aria-expanded","false"),Ge(),Yt(this._component),this.fieldElement.required&&this.setHostAttribute("aria-required","true"),this.fieldElement.disabled&&this.setHostAttribute("aria-disabled","true"),this.fieldElement.invalid&&this.setHostAttribute("aria-invalid","true"),this._component[s2]=!this._component.disabled}setLabel(t){let o=!(this._fieldElement.labelPosition==="inset"&&(this._fieldElement.density==="extra-small"||this._fieldElement.dense))&&!!(t!=null&&t.trim());(!this._component.hasAttribute("aria-label")||this._component.getAttribute("aria-label")===this._labelElement.textContent)&&this._component.setAttribute("aria-label",t),o?(this._labelElement.isConnected||this._fieldElement.insertAdjacentElement("afterbegin",this._labelElement),this._labelElement.textContent=t):this._labelElement.remove()}setPlaceholderText(t){G(this._selectedTextElement,!!(t!=null&&t.trim()),"placeholder",t)}open(t){this._targetElement||(this._targetElement=w(this._fieldElement,L.selectors.POPOVER_TARGET)),super.open(t),this._component.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._component.setAttribute("aria-expanded","true"),this._fieldElement.popoverExpanded=!0}close(){return this._component.setAttribute("aria-expanded","false"),this._component.removeAttribute("aria-activedescendant"),Yt(this._component),this._fieldElement.popoverExpanded=!1,super.close()}floatLabel(t){this._fieldElement.floatLabel=t}updateActiveDescendant(t){G(this._component,!!t,"aria-activedescendant",t)}setSelectedText(t){this._selectedTextElement.textContent=t}setDisabled(t){this._component[s2]=!t,G(this._component,t,"aria-disabled","true")}setRequired(){this._component[Mt]()}addClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}addTargetListener(t,e){this._component.addEventListener(t,e)}removeTargetListener(t,e){this._component.removeEventListener(t,e)}syncValue(t){let o=(Array.isArray(t)?!t.length||!t.some(s=>s!=null):t==null)?null:new FormData,a=JSON.stringify(t);o&&t&&o.append(this._component.name,a),this._component.setFormValue(o,a),this._component[Mt]()}};var h4=class extends Ra{constructor(e){super(e);this._label="";this._required=!1;this._permanentlyFloatLabel=!1;this._mousedownListener=this._onMouseDown.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["labelPosition","variant"]),super.initialize(),super.initializeTarget(),this._initializeLabel(),this._initializeAccessibility(),this._adapter.addTargetListener("mousedown",this._mousedownListener)}destroy(){super.destroy(),this._adapter.removeTargetListener("mousedown",this._mousedownListener)}syncFloatingLabelState({force:e}={}){e!==void 0&&(this._permanentlyFloatLabel=e),this._updateLabel(),this._tryFloatLabel()}setDisabled(e){this._adapter.setDisabled(e)}_initializeLabel(){this._updateLabel(),this._tryFloatLabel()}_initializeValue(){super._initializeValue(),this._tryFloatLabel()}_initializeAccessibility(){this._adapter.initializeAccessibility()}_onMouseDown(e){e.preventDefault()}_onClick(e){this._adapter.fieldElement.disabled||e.composedPath().find(a=>{var s;return(s=a.matches)==null?void 0:s.call(a,"slot[name=accessory]")})||(this._adapter.focusHost(),super._onClick(e))}_openDropdown(){super._openDropdown(),this._open&&this._adapter.toggleHostAttribute(X2.attributes.OPEN,!0)}_closeDropdown(){super._closeDropdown(),this._open||this._adapter.toggleHostAttribute(X2.attributes.OPEN,!1)}_onDismiss(){super._onDismiss()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(X2.events.SCROLLED_BOTTOM)}async _onSelect(e,o,a=!0){let s=await super._onSelect(e,o,a);return s&&(this._adapter.setSelectedText(this._getSelectedText()),a&&!this._multiple&&this._adapter.focusHost()),this._tryFloatLabel(),this._adapter.syncValue(this._value),s}_reset(){super._reset(),this._adapter.setSelectedText(""),this._tryFloatLabel()}_tryFloatLabel(){if(this._permanentlyFloatLabel){this._adapter.floatLabel(!0);return}let e=!!this._getSelectedText()||!!this._selectedValues.length,o=!!this._placeholder;this._adapter.floatLabel(e||o)}_updateLabel(){this._adapter.setLabel(this._label)}_applyValue(e){super._applyValue(e),this._adapter.syncValue(this._value);let o=this._getSelectedText();this._adapter.setSelectedText(o),this._tryFloatLabel()}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._updateLabel(),this._label&&this._initializeLabel(),this._adapter.toggleHostAttribute(X2.attributes.LABEL,!!this._label,this._label))}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder!==e&&(this._placeholder=e,this._adapter.setPlaceholderText(this._placeholder),this._initializeLabel())}get multiple(){return super.multiple}set multiple(e){this._multiple!==e&&(super.multiple=e,this._adapter.toggleHostAttribute(X2.attributes.MULTIPLE,e))}set required(e){this._required!==e&&this._adapter.setRequired()}};var If='<template><forge-field id="field" popover-icon focus-indicator-allow-focus focus-indicator-focus-mode="focus"><span id="select-label" slot="label"></span><slot slot="start" name="start"></slot><div data-forge-field-input class="selected-text-container" part="text-container" aria-live="assertive" aria-atomic="true"><slot name="value"><span id="selected-text" class="selected-text" part="text"></span></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text" name="support-text"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text" name="helper-text"></slot></forge-field></template>',Lf=":host{display:block;outline:0}:host([hidden]){display:none}forge-field{--_select-placeholder-color:var(--forge-select-placeholder-color, var(--forge-field-placeholder-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6))))}.selected-text-container{display:grid;align-items:center;cursor:pointer}.selected-text,::slotted([slot=value]){white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.selected-text:empty::before{content:attr(placeholder);color:var(--_select-placeholder-color);font-size:inherit}:host([disabled]) .selected-text-container{cursor:not-allowed}forge-field{display:contents}",Ae=class extends $e(mt(Ke(V1(L1(u7(Vt)))))){static get observedAttributes(){return[...Q1.observedAttributes,...Object.values(Y.observedAttributes),...Object.values(X2.observedAttributes),...Object.values(Lt.observedAttributes)]}constructor(){var e;super(),X.define([S0,T0]),H(this,If,Lf);let t=(e=this.shadowRoot)==null?void 0:e.querySelector(L.elementName);this.initializeFieldInstance(t),this[oe]="select",this._core=new h4(new c4(this))}connectedCallback(){super.connectedCallback(),this[N]({role:"combobox",ariaDisabled:this.disabled?"true":"false",ariaRequired:this.required?"true":"false"})}attributeChangedCallback(t,e,o){switch(t){case X2.observedAttributes.OPEN:this.open=p(o);return;case X2.observedAttributes.LABEL:this.label=o;return;case X2.observedAttributes.PLACEHOLDER:this.placeholder=o;return}super.attributeChangedCallback(t,e,o)}[Bt](){return this.value}[Mt](){this[s1].setValidity({valueMissing:this.required&&!this.value},this[ee]({required:this.required,value:this.value}))}formResetCallback(){this.value=null}formStateRestoreCallback(t){this.value=JSON.parse(t)}labelClickedCallback(){this.click(),this.focus()}labelChangedCallback(t){this[N]({ariaLabel:t})}setFormValue(t,e){this[s1].setFormValue(t,e)}get floatLabel(){return super.floatLabel}set floatLabel(t){this._core.syncFloatingLabelState({force:t})}get density(){return super.density}set density(t){super.density=t,this._core.syncFloatingLabelState()}get dense(){return super.dense}set dense(t){super.dense=t,this._core.syncFloatingLabelState()}get disabled(){return super.disabled}set disabled(t){super.disabled=t,this._core.setDisabled(t)}get required(){return super.required}set required(t){super.required=t,this._core.required=t}get labelPosition(){return super.labelPosition}set labelPosition(t){super.labelPosition=t,this._core.syncFloatingLabelState()}};i([c()],Ae.prototype,"label",2),i([c()],Ae.prototype,"placeholder",2),i([c()],Ae.prototype,"readonly",2),Ae=i([y({name:X2.elementName,dependencies:[F1,$1,t0,R1,v2,j1,Pt,j,Je,pe,i1]})],Ae);function L7(){f(Ae)}var Vf='<template><div class="forge-paginator" part="root" forge-popover-host><div class="container" part="container"><div class="label" part="label" id="label"><slot name="label"></slot></div><forge-select class="page-size-options" aria-labelledby="label" label-position="none" density="extra-small" part="page-size-options"></forge-select><div class="range-label" part="range-label"><slot name="range-label"></slot></div></div><div class="actions" part="actions"><div id="first-page-container"><forge-icon-button class="first-page" part="first-page-button" part="first-page-button-element"><forge-icon name="first_page" part="first-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="first-page-tooltip">Go to the first page</slot></forge-tooltip></div><div id="previous-page-container"><forge-icon-button class="previous-page" part="previous-page-button" part="previous-page-button-element"><forge-icon name="keyboard_arrow_left" part="previous-page-button-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="previous-page-tooltip">Go to the previous page</slot></forge-tooltip></div><div class="alternative-range-label" part="alternative-range-label"><slot name="alternative-range-label"></slot></div><div id="next-page-container"><forge-icon-button class="next-page" part="next-page-button" part="next-page-button-element"><forge-icon name="keyboard_arrow_right" part="next-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="next-page-tooltip">Go to the next page</slot></forge-tooltip></div><div id="last-page-container"><forge-icon-button class="last-page" part="last-page-button" part="last-page-button-element"><forge-icon name="last_page" part="last-page-icon"></forge-icon></forge-icon-button><forge-tooltip type="label" placement="top"><slot name="last-page-tooltip">Go to the last page</slot></forge-tooltip></div></div></div></template>',Cf=':host{display:block}:host([hidden]){display:none}.forge-paginator{display:flex;gap:var(--forge-spacing-xsmall,8px)}.container{display:flex;gap:var(--forge-spacing-medium,16px);align-items:center}.alternative-range-label,.label,.range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.actions{display:flex;align-items:center}.alternative-range-label{display:none}:host([alternative]) .alternative-range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);display:inline-block}:host([alternative]) .container{display:none}:host([alternative]) .actions{width:100%;justify-content:var(--forge-paginator-alternative-alignment,start)}',it=class extends M{static get observedAttributes(){return Object.values(Z.observedAttributes)}constructor(){super(),X.define([ul,v0,ze,fl]),H(this,Vf,Cf),this._core=new s4(new r4(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){var a,s,r,l;switch(t){case Z.observedAttributes.PAGE_INDEX:this.pageIndex=(a=K(o))!=null?a:Z.numbers.DEFAULT_PAGE_INDEX;break;case Z.observedAttributes.PAGE_SIZE:this.pageSize=(s=K(o))!=null?s:Z.numbers.DEFAULT_PAGE_SIZE;break;case Z.observedAttributes.OFFSET:this.offset=K(o);break;case Z.observedAttributes.TOTAL:this.total=(r=K(o))!=null?r:Z.numbers.DEFAULT_TOTAL;break;case Z.observedAttributes.PAGE_SIZE_OPTIONS:this.pageSizeOptions=(l=Wn(o))!=null?l:Z.numbers.DEFAULT_PAGE_SIZE_OPTIONS;break;case Z.observedAttributes.LABEL:this.label=o;break;case Z.observedAttributes.FIRST_LAST:this.firstLast=p(o);break;case Z.observedAttributes.FIRST:this.first=p(o);break;case Z.observedAttributes.DISABLED:this.disabled=p(o);break;case Z.observedAttributes.ALTERNATIVE:this.alternative=p(o);break}}focus(t){this._core.focus(t)}};i([c()],it.prototype,"pageIndex",2),i([c()],it.prototype,"pageSize",2),i([c()],it.prototype,"offset",2),i([c()],it.prototype,"total",2),i([c()],it.prototype,"pageSizeOptions",2),i([c()],it.prototype,"label",2),i([c()],it.prototype,"firstLast",2),i([c()],it.prototype,"first",2),i([c()],it.prototype,"disabled",2),i([c()],it.prototype,"alternative",2),i([c()],it.prototype,"rangeLabelCallback",2),it=i([y({name:Z.elementName,dependencies:[i1,Ae,m1]})],it);function V7(){f(it)}var C7=`${b}select-dropdown`,Ef={TARGET:"target",SELECTED_TEXT_TARGET:"selected-text-target",SYNC_SELECTED_TEXT:"sync-selected-text"},Bf=d({},Ef),Af={SCROLLED_BOTTOM:`${C7}-scrolled-bottom`},e0={elementName:C7,attributes:Bf,events:Af};var v4=class extends Ra{constructor(e){super(e);this._syncSelectedText=!1;this._originalTargetText="";this._targetDisconnectedListener=()=>this._onTargetDisconnected()}initialize(){this._tryAttach(),super.initialize()}destroy(){super.destroy(),this._adapter.isAttached()&&this._detach()}_onDropdownScrollEnd(){this._adapter.emitHostEvent(e0.events.SCROLLED_BOTTOM)}_applyValue(e){super._applyValue(e),this._applySelection()}_applySelection(){if(super._applySelection(),this._syncSelectedText||typeof this._selectedTextBuilder=="function"){let e=this._getSelectedText();e||(e=this._originalTargetText),this._adapter.setTargetText(e||"",this._selectedTextTarget)}}_tryAttach(){this._adapter.attach(this._target),this._adapter.isAttached()&&(this._targetDisconnectedDestructor=this._adapter.setTargetDisconnectedListener(this._targetDisconnectedListener),this._originalTargetText=this._adapter.getTargetText(this._selectedTextTarget),this.initializeTarget())}_detach(){this._adapter.detach(),this._targetDisconnectedDestructor&&(this._targetDisconnectedDestructor(),this._targetDisconnectedDestructor=void 0)}_onTargetDisconnected(){this._adapter.detach()}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this._adapter.isAttached()&&this._detach(),this._tryAttach())}get selectedTextTarget(){return this._selectedTextTarget}set selectedTextTarget(e){this._selectedTextTarget!==e&&(this._selectedTextTarget=e)}get syncSelectedText(){return this._syncSelectedText}set syncSelectedText(e){this._syncSelectedText!==e&&(this._syncSelectedText=e)}};var p4=class extends Na{constructor(t){super(t)}initializeAccessibility(){this._targetElement.setAttribute("role","combobox"),this._targetElement.setAttribute("aria-live","polite"),this._targetElement.setAttribute("aria-haspopup","true"),this._targetElement.setAttribute("aria-expanded","false"),this.setAriaControls()}addClickListener(t){this._targetElement.addEventListener("click",t)}removeClickListener(t){this._targetElement&&this._targetElement.removeEventListener("click",t)}addTargetListener(t,e){let o,a;t==="keydown"&&(o=!1,a=!0),this._targetElement.addEventListener(t,e,{passive:o,capture:a})}removeTargetListener(t,e){this._targetElement&&this._targetElement.removeEventListener(t,e)}updateActiveDescendant(t){t?this._targetElement.setAttribute("aria-activedescendant",t):this._targetElement.removeAttribute("aria-activedescendant")}open(t){super.open(t),this._targetElement.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`),this._targetElement.setAttribute("aria-expanded","true")}close(){return this._targetElement.setAttribute("aria-expanded","false"),this._targetElement.removeAttribute("aria-activedescendant"),this.setAriaControls(),super.close()}attach(t){let a=(this._component.getRootNode()||HTMLDocument||this._component.ownerDocument||document).querySelector(t);a&&(this._targetElement=a)}detach(){this._targetElement=void 0}setTargetDisconnectedListener(t){if(!this._targetElement||!this._targetElement.parentElement)return()=>{};let e=new MutationObserver(o=>{o.some(s=>Array.from(s.removedNodes).some(r=>r===this._targetElement))&&(e.disconnect(),t())});return e.observe(this._targetElement.parentElement,{childList:!0}),()=>e.disconnect()}isAttached(){return!!this._targetElement}setTargetText(t,e){let o=this._targetElement;if(e){let a=this._getElementBySelector(e);a&&(o=a)}o&&(o.textContent=t)}getTargetText(t){let e=t?this._getElementBySelector(t):this._targetElement;return e?e.innerText:""}_getElementBySelector(t){return this._targetElement.querySelector(t)||this._getRootNode().querySelector(t)}_getRootNode(){var t,e;return(e=(t=this._component.getRootNode())!=null?t:this._component.ownerDocument)!=null?e:document}setAriaControls(){let t=this._component.querySelector("[data-forge-aria-controls-placeholder]");if(t){this._targetElement.setAttribute("aria-controls",t.id);return}t=document.createElement("div"),t.id=`forge-select-dropdown-temp-${V2(10)}`,t.setAttribute("data-forge-aria-controls-placeholder",""),this._targetElement.setAttribute("aria-controls",t.id),this._component.appendChild(t)}};var Tf="<template></template>",Sf=":host{display:none}",H0=class extends Vt{static get observedAttributes(){return[e0.attributes.TARGET,e0.attributes.SELECTED_TEXT_TARGET,e0.attributes.SYNC_SELECTED_TEXT,Lt.attributes.VALUE,Lt.attributes.MULTIPLE,Lt.attributes.OBSERVE_SCROLL,Lt.attributes.OBSERVE_SCROLL_THRESHOLD,Lt.attributes.POPUP_CLASSES,Lt.attributes.OPTION_LIMIT,Lt.attributes.SYNC_POPUP_WIDTH]}constructor(){super(),H(this,Tf,Sf),this._core=new v4(new p4(this))}attributeChangedCallback(t,e,o){switch(t){case e0.attributes.TARGET:this.target=o;return;case e0.attributes.SELECTED_TEXT_TARGET:this.selectedTextTarget=o;return;case e0.attributes.SYNC_SELECTED_TEXT:this.syncSelectedText=p(o);return}super.attributeChangedCallback(t,e,o)}};i([c()],H0.prototype,"target",2),i([c()],H0.prototype,"selectedTextTarget",2),i([c()],H0.prototype,"syncSelectedText",2),H0=i([y({name:e0.elementName,dependencies:[$1,t0,R1,v2,j1,Pt,Je,pe,i1]})],H0);function E7(){f(H0)}var B7=class extends o2{constructor(t){super(t)}_build(){return document.createElement(X2.elementName)}_configure(){var t;typeof((t=this._config.options)==null?void 0:t.helperText)=="string"&&this.setHelperText(this._config.options.helperText)}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._element.invalid||!1}set invalid(t){this._element.invalid=t}onChange(t){this._element.addEventListener("change",e=>t(e.detail))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}setHelperText(t){t?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=t):this._helperTextElement&&this._helperTextElement.isConnected&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}};var kf=`${b}skip-link`,A7={TARGET:"target",THEME:"theme",MUTED:"muted",PERSISTENT:"persistent",INLINE:"inline",SKIP_URL_CHANGE:"skip-url-change"},Of=d({},A7),Df={ANCHOR:"a"},bt={elementName:kf,observedAttributes:A7,attributes:Of,selectors:Df};var Pf='<template><a class="forge-skip-link" part="anchor"><slot>Skip to main content</slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></a></template>',Nf=':host{--_skip-link-inset:var(--forge-skip-link-inset, var(--forge-spacing-xsmall, 8px) var(--forge-spacing-medium, 16px));--_skip-link-z-index:var(--forge-skip-link-z-index, var(--forge-z-index-popup, 10));--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, var(--forge-animation-duration-short4, 200ms));--_skip-link-transition-timing-function:var(--forge-skip-link-transition-timing-function, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}:host{transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);display:block;position:fixed;inset:var(--_skip-link-inset);z-index:var(--_skip-link-z-index);block-size:fit-content;inline-size:fit-content;opacity:0;transform:translateY(-100%)}:host([hidden]){display:none}:host(:where(:focus-within,[persistent])){transition-property:opacity,transform;transition-duration:var(--_skip-link-transition-duration);transition-timing-function:var(--_skip-link-transition-timing-function);transform:translateY(0);opacity:1}.forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000));--_skip-link-shape:var(--forge-skip-link-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_skip-link-elevation:var(--forge-skip-link-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_skip-link-padding-block:var(--forge-skip-link-padding-block, var(--forge-spacing-xsmall, 8px));--_skip-link-padding-inline:var(--forge-skip-link-padding-inline, var(--forge-spacing-medium, 16px));--_skip-link-focus-indicator-color:var(--forge-skip-link-focus-indicator-color, var(--_skip-link-background))}.forge-skip-link{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);display:block;outline:0;box-shadow:var(--_skip-link-elevation);border-radius:var(--_skip-link-shape);background:var(--_skip-link-background);padding-block:var(--_skip-link-padding-block);padding-inline:var(--_skip-link-padding-inline);cursor:pointer;color:var(--_skip-link-color);text-decoration:underline}:host([theme=primary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary, #3f51b5));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary, #ffffff))}:host([theme=primary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-primary-container-high, #b6bde3));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-primary-container-high, #000000))}:host([theme=secondary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary, #ffc107));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary, #000000))}:host([theme=secondary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([theme=tertiary]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary, #3d5afe));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary, #ffffff))}:host([theme=tertiary][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-tertiary-container-high, #b5c0ff));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-tertiary-container-high, #000000))}:host([theme=success]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success, #2e7d32));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success, #ffffff))}:host([theme=success][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-success-container-high, #b0ceb1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-success-container-high, #000000))}:host([theme=error]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error, #b00020));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error, #ffffff))}:host([theme=error][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-error-container-high, #e19eaa));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-error-container-high, #000000))}:host([theme=warning]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning, #d14900));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning, #ffffff))}:host([theme=warning][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-warning-container-high, #eeba9e));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-warning-container-high, #000000))}:host([theme=info]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info, #1565c0));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info, #ffffff))}:host([theme=info][muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-info-container-high, #a6c4e7));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-info-container-high, #000000))}:host(:where(:not([theme]),[theme=default])[muted]) .forge-skip-link{--_skip-link-background:var(--forge-skip-link-background, var(--forge-theme-secondary-container-high, #ffe7a1));--_skip-link-color:var(--forge-skip-link-color, var(--forge-theme-on-secondary-container-high, #000000))}:host([inline]){position:absolute;transform:none}forge-focus-indicator{--forge-focus-indicator-color:var(--_skip-link-focus-indicator-color);--forge-focus-indicator-shape:var(--_skip-link-shape)}@media (prefers-reduced-motion:reduce){:host{--_skip-link-transition-duration:var(--forge-skip-link-transition-duration, 0s)}}',Fa=class extends M{constructor(){super();this._target="";this._theme="default";this._muted=!1;this._persistent=!1;this._inline=!1;this._skipUrlChange=!1;this._clickListener=e=>this._handleClick(e);H(this,Pf,Nf),this._anchorElement=w(this,bt.selectors.ANCHOR)}static get observedAttributes(){return Object.values(bt.observedAttributes)}attributeChangedCallback(e,o,a){switch(e){case bt.observedAttributes.TARGET:this.target=a;break;case bt.observedAttributes.THEME:this.theme=a;break;case bt.observedAttributes.MUTED:this.muted=p(a);break;case bt.observedAttributes.PERSISTENT:this.persistent=p(a);break;case bt.observedAttributes.INLINE:this.inline=p(a);break;case bt.observedAttributes.SKIP_URL_CHANGE:this.skipUrlChange=p(a);break}}get target(){return this._target}set target(e){this._target!==e&&(this._target=e,this.setAttribute(bt.attributes.TARGET,this._target),this._anchorElement.href=`#${this._target}`)}get theme(){return this._theme}set theme(e){this._theme!==e&&(this._theme=e,this.setAttribute(bt.attributes.THEME,this._theme))}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this.toggleAttribute(bt.attributes.MUTED,this._muted))}get persistent(){return this._persistent}set persistent(e){this._persistent!==e&&(this._persistent=e,this.toggleAttribute(bt.attributes.PERSISTENT,this._persistent))}get inline(){return this._inline}set inline(e){this._inline!==e&&(this._inline=e,this.toggleAttribute(bt.attributes.INLINE,this._inline))}get skipUrlChange(){return this._skipUrlChange}set skipUrlChange(e){if(this._skipUrlChange!==e){if(this._skipUrlChange=e,this.toggleAttribute(bt.attributes.SKIP_URL_CHANGE,this._skipUrlChange),this._skipUrlChange){this._anchorElement.addEventListener("click",this._clickListener);return}this._anchorElement.removeEventListener("click",this._clickListener)}}_handleClick(e){e.preventDefault();let o=document.getElementById(this._target);o==null||o.focus(),o==null||o.scrollIntoView({behavior:"smooth"})}};Fa=i([y({name:bt.elementName,dependencies:[J,r1]})],Fa);function T7(){f(Fa)}var On=class extends M{};On.formAssociated=!0;var Rf=`${b}slider`,Ff={ARIA_LABEL:"data-aria-label",ARIA_LABEL_START:"data-aria-label-start",ARIA_LABEL_END:"data-aria-label-end",VALUE:"value",VALUE_START:"value-start",VALUE_END:"value-end",LABEL:"label",LABEL_START:"label-start",LABEL_END:"label-end",MIN:"min",MAX:"max",STEP:"step",TICKMARKS:"tickmarks",LABELED:"labeled",RANGE:"range",DISABLED:"disabled",READONLY:"readonly"},Uf={ROOT:".forge-slider",TRACK:".track",HANDLE_CONTAINER:".handle-container",START_INPUT:"input.start",END_INPUT:"input.end",START_HANDLE:".handle.start",START_HANDLE_THUMB:".handle.start .handle-thumb",END_HANDLE:".handle.end",END_HANDLE_THUMB:".handle.end .handle-thumb",START_LABEL:".handle.start .handle-label",START_LABEL_CONTENT:".handle.start .handle-label-content",END_LABEL:".handle.end .handle-label",END_LABEL_CONTENT:".handle.end .handle-label-content",LABEL:".handle-label",INPUT:"input[type=range]"},Wf={RANGE:"range",TICKMARKS:"tickmarks",ON_TOP:"on-top",OVERLAPPING:"overlapping",HOVER:"hover",HANDLE:"handle",HANDLE_THUMB:"handle-thumb",HANDLE_START:"start",HANDLE_LABEL:"handle-label",LABEL:"handle-label",LABEL_CONTENT:"handle-label-content"},Gf={INPUT:"forge-slider-input",CHANGE:"forge-slider-change",RANGE_INPUT:"forge-slider-range-input",RANGE_CHANGE:"forge-slider-range-change"},qf={START_FRACTION:"--_slider-start-fraction",END_FRACTION:"--_slider-end-fraction",TICK_COUNT:"--_slider-tick-count"},Yf={DEFAULT_STEP:1,DEFAULT_VALUE:50,DEFAULT_START_VALUE:33,DEFAULT_END_VALUE:67},V={elementName:Rf,attributes:Ff,selectors:Uf,classes:Wf,events:Gf,numbers:Yf,cssCustomProperties:qf};function S7(n){let t=document.createElement("input");return t.type="range",t.id="start",t.min=String(n.min),t.max=String(n.max),t.step=String(n.step),t.valueAsNumber=n.valueStart,t.disabled=n.disabled,t.classList.add("start"),n.hasAttribute(V.attributes.ARIA_LABEL_START)&&t.setAttribute("aria-label",n.getAttribute(V.attributes.ARIA_LABEL_START)),t.setAttribute("aria-valuetext",String(n.valueStart)),t}function k7(n){let t=document.createElement("div");t.classList.add(V.classes.HANDLE,V.classes.HANDLE_START),t.setAttribute("part","handle-start");let e=document.createElement("forge-state-layer");e.target="start",t.appendChild(e);let o=document.createElement("forge-focus-indicator");o.target="start",t.appendChild(o);let a=document.createElement("div");a.classList.add(V.classes.HANDLE_THUMB),a.setAttribute("part","handle-start-thumb"),t.appendChild(a);let s=document.createElement("div");s.classList.add(V.classes.HANDLE_LABEL),s.setAttribute("part","handle-start-label"),t.appendChild(s);let r=document.createElement("span");return r.textContent=n,r.classList.add(V.classes.LABEL_CONTENT),r.setAttribute("part","handle-start-label-content"),s.appendChild(r),t}function _3(n){let t=document.createElement("div");t.classList.add(V.classes.LABEL);let e=document.createElement("span");return e.textContent=n,e.classList.add(V.classes.LABEL_CONTENT),t.appendChild(e),t}var m4=class extends I{constructor(t){super(t),this._rootElement=w(t,V.selectors.ROOT),this._trackElement=w(t,V.selectors.TRACK),this._handleContainerElement=w(t,V.selectors.HANDLE_CONTAINER),this._endInputElement=w(t,V.selectors.END_INPUT),this._endHandleElement=w(t,V.selectors.END_HANDLE),this._endHandleThumbElement=w(t,V.selectors.END_HANDLE_THUMB),this._endLabelContentElement=w(t,V.selectors.END_LABEL_CONTENT)}addInputListener(t,e){this._getInputs().forEach(a=>a.addEventListener(t,e))}update({startFraction:t,endFraction:e,tickCount:o}){this._rootElement.style.setProperty(V.cssCustomProperties.START_FRACTION,String(t)),this._rootElement.style.setProperty(V.cssCustomProperties.END_FRACTION,String(e)),this._rootElement.style.setProperty(V.cssCustomProperties.TICK_COUNT,String(o))}updateLabels(t,e){var o;this._startLabelContentElement&&(this._startLabelContentElement.textContent=t),this._endLabelContentElement&&(this._endLabelContentElement.textContent=e),(o=this._startInputElement)==null||o.setAttribute("aria-valuetext",t),this._endInputElement.setAttribute("aria-valuetext",e)}updateHandleLayering(){let t=this._endInputElement.matches(":focus");this._startHandleElement&&f2(this._startHandleElement,!t,V.classes.ON_TOP),f2(this._endHandleElement,t,V.classes.ON_TOP)}tryHoverStartHandle(t){var e,o,a;this._startHandleThumbElement&&h5(t,this._startHandleThumbElement)?(this._handleContainerElement.classList.add(V.classes.HOVER),(e=this._startHandleElement)==null||e.classList.add(V.classes.HOVER)):(o=this._startInputElement)!=null&&o.matches(":focus")||(this._handleContainerElement.classList.remove(V.classes.HOVER),(a=this._startHandleElement)==null||a.classList.remove(V.classes.HOVER))}tryHoverEndHandle(t){h5(t,this._endHandleThumbElement)?(this._handleContainerElement.classList.add(V.classes.HOVER),this._endHandleElement.classList.add(V.classes.HOVER)):this._endInputElement.matches(":focus")||(this._handleContainerElement.classList.remove(V.classes.HOVER),this._endHandleElement.classList.remove(V.classes.HOVER))}tryDetectOverlap(){if(this._startHandleElement){let t=Dl(this._startHandleElement,this._endHandleElement);f2(this._endHandleElement,t,V.classes.OVERLAPPING),f2(this._startHandleElement,t,V.classes.OVERLAPPING)}}leaveHandleContainer(){this._handleContainerElement.classList.remove(V.classes.HOVER)}syncInputValues(t,e){if(this._startInputElement&&(this._startInputElement.valueAsNumber=t),this._endInputElement.valueAsNumber=e,this._startInputElement){let o=new FormData;o.append(this._component.nameStart,String(t)),o.append(this._component.nameEnd,String(e)),this._component[s1].setFormValue(o)}else this._component[s1].setFormValue(String(e))}setRange(t){var e,o;if(this._rootElement.classList.toggle(V.classes.RANGE,t),t){this._startInputElement=S7(this._component),this._rootElement.insertAdjacentElement("afterbegin",this._startInputElement),this._endInputElement.valueAsNumber=this._component.valueEnd;let a=this._startInputElement.value;this._startHandleElement=k7(a),this._handleContainerElement.insertAdjacentElement("afterbegin",this._startHandleElement),this._startHandleThumbElement=w(this._component,V.selectors.START_HANDLE_THUMB),this._startLabelContentElement=w(this._component,V.selectors.START_LABEL_CONTENT)}else(e=this._startInputElement)==null||e.remove(),(o=this._startHandleElement)==null||o.remove(),this._startInputElement=void 0,this._startHandleElement=void 0,this._startHandleThumbElement=void 0,this._startLabelContentElement=void 0}setTickmarks(t){this._trackElement.classList.toggle(V.classes.TICKMARKS,t)}setStep(t){this._getInputs().forEach(o=>o.step=String(t))}setMin(t){this._getInputs().forEach(o=>o.min=String(t))}setMax(t){this._getInputs().forEach(o=>o.max=String(t))}setDisabled(t){this._getInputs().forEach(a=>a.disabled=t),this._rootElement.querySelectorAll(I1.elementName).forEach(a=>a.disabled=t)}setReadonly(t){this._getInputs().forEach(o=>o.readOnly=t)}toggleLabels(t){var o;if(this._rootElement.querySelectorAll(V.selectors.LABEL).forEach(a=>a.remove()),this._endLabelContentElement=void 0,this._startLabelContentElement=void 0,t){let a=_3(this._endInputElement.value);if(this._endHandleElement.insertAdjacentElement("beforeend",a),this._endLabelContentElement=w(this._component,V.selectors.END_LABEL_CONTENT),this._startInputElement){let s=_3(this._startInputElement.value);(o=this._startHandleElement)==null||o.insertAdjacentElement("beforeend",s),this._startLabelContentElement=w(this._component,V.selectors.START_LABEL_CONTENT)}}}setStartAriaLabel(t){this._startInputElement&&G(this._startInputElement,!!t,"aria-label",t)}setEndAriaLabel(t){G(this._endInputElement,!!t,"aria-label",t)}_getInputs(){let t=[];return this._startInputElement&&t.push(this._startInputElement),[...t,this._endInputElement]}};var d4=class{constructor(t){this._adapter=t;this._value=V.numbers.DEFAULT_VALUE;this._valueStart=V.numbers.DEFAULT_START_VALUE;this._valueEnd=V.numbers.DEFAULT_END_VALUE;this._min=0;this._max=100;this._step=V.numbers.DEFAULT_STEP;this._tickmarks=!1;this._labeled=!0;this._range=!1;this._disabled=!1;this._readonly=!1;this._pointerEnterListener=e=>this._handlePointerEnter(e),this._pointerMoveListener=e=>this._handlePointerMove(e),this._pointerLeaveListener=e=>this._handlePointerLeave(e),this._changeUpdateListener=e=>this._handleInputUpdate(e),this._focusListener=e=>this._handleFocus(e)}initialize(){this._applyInputListeners(),this._update()}_update(){var z,x;let{value:t,valueStart:e,valueEnd:o}=this._clampMinMax(),a=this._step<=0?1:this._step,s=Math.max(this._max-this._min,a),r=this._range?((e!=null?e:this._min)-this._min)/s:0,l=this._range?o:t,h=((l!=null?l:this.min)-this.min)/s,v=s/a;this._adapter.update({startFraction:r,endFraction:h,tickCount:v}),this._adapter.syncInputValues(e,this._range?o:t),this._range&&this._adapter.tryDetectOverlap();let m=(z=this._labelStart)!=null?z:String(e),u=(x=this._labelEnd)!=null?x:String(this._range?o:t);typeof this._labelBuilder=="function"&&(this._range?(m=this._labelBuilder(e,"start"),u=this._labelBuilder(o,"end")):u=this._labelBuilder(t)),this._adapter.updateLabels(m,u)}_clampMinMax(){let t=this._value,e=this._valueStart,o=this._valueEnd;return this._range?(e>this._max?e=this._max:e<this._min&&(e=this._min),o>this._max?o=this._max:o<this._min&&(o=this._min)):t>this._max?t=this._max:this._value<this._min&&(t=this._min),{value:t,valueStart:e,valueEnd:o}}_applyInputListeners(){this._adapter.addInputListener("pointerenter",this._pointerEnterListener),this._adapter.addInputListener("pointermove",this._pointerMoveListener),this._adapter.addInputListener("pointerleave",this._pointerLeaveListener),this._adapter.addInputListener("input",this._changeUpdateListener),this._adapter.addInputListener("change",this._changeUpdateListener),this._adapter.addInputListener("focus",this._focusListener)}_handlePointerEnter(t){this._handlePointerMove(t)}_handlePointerMove({target:t,x:e,y:o}){t.id==="start"?this._adapter.tryHoverStartHandle({x:e,y:o}):this._adapter.tryHoverEndHandle({x:e,y:o})}_handlePointerLeave(t){this._adapter.leaveHandleContainer()}_handleInputUpdate(t){if(t.stopPropagation(),this._disabled||this._readonly){this._adapter.syncInputValues(this._valueStart,this._range?this._valueEnd:this._value);return}let e=t.target;if(this._range){let l=e.id==="start";if(l?this._valueStart=e.valueAsNumber:this._valueEnd=e.valueAsNumber,this._canClamp()){l?this._valueStart=this._valueEnd:this._valueEnd=this._valueStart,this._adapter.syncInputValues(this._valueStart,this._valueEnd),this._update();return}}else this._value=e.valueAsNumber;let o={default:{change:V.events.CHANGE,input:V.events.INPUT},range:{change:V.events.RANGE_CHANGE,input:V.events.RANGE_INPUT}},a=this._range?o.range[t.type]:o.default[t.type],s=this._range?{valueStart:this._valueStart,valueEnd:this._valueEnd}:{value:this._value},r=new CustomEvent(a,{detail:s,bubbles:!0});this._adapter.dispatchHostEvent(r),this._update()}_handleFocus(t){this._adapter.updateHandleLayering()}_canClamp(){return this._valueStart>this._valueEnd||this._valueEnd<this._valueStart}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._update())}get valueStart(){return this._valueStart}set valueStart(t){this._valueStart!==t&&(this._valueStart=t,this._update())}get valueEnd(){return this._valueEnd}set valueEnd(t){this._valueEnd!==t&&(this._valueEnd=t,this._update())}get label(){return this.labelEnd}set label(t){this.labelEnd=t}get labelStart(){return this._labelStart}set labelStart(t){this._labelStart!==t&&(this._labelStart=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelEnd(){return this._labelEnd}set labelEnd(t){this._labelEnd!==t&&(this._labelEnd=t,this._adapter.updateLabels(this._labelStart,this._labelEnd))}get labelBuilder(){return this._labelBuilder}set labelBuilder(t){this._labelBuilder=t,this._update()}get min(){return this._min}set min(t){this._min!==t&&(this._min=t,this._adapter.setMin(this._min),this._update(),this._adapter.setHostAttribute(V.attributes.MIN,String(this._min)))}get max(){return this._max}set max(t){this._max!==t&&(this._max=t,this._adapter.setMax(this._max),this._update(),this._adapter.setHostAttribute(V.attributes.MAX,String(this._max)))}get step(){return this._step}set step(t){this._step!==t&&(this._step=t,this._adapter.setStep(this._step),this._update(),this._adapter.setHostAttribute(V.attributes.STEP,String(this._step)))}get tickmarks(){return this._tickmarks}set tickmarks(t){this._tickmarks!==t&&(this._tickmarks=t,this._adapter.setTickmarks(this._tickmarks),this._adapter.toggleHostAttribute(V.attributes.TICKMARKS,this._tickmarks))}get labeled(){return this._labeled}set labeled(t){this._labeled!==t&&(this._labeled=t,this._adapter.toggleLabels(this._labeled),this._update(),this._adapter.toggleHostAttribute(V.attributes.LABELED,this._labeled))}get range(){return this._range}set range(t){this._range!==t&&(this._range=t,this._adapter.setRange(this._range),this._range&&this._applyInputListeners(),this._update(),this._adapter.toggleHostAttribute(V.attributes.RANGE,this._range))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(t),this._adapter.toggleHostAttribute(V.attributes.DISABLED,this._disabled))}get readonly(){return this._readonly}set readonly(t){this._readonly!==t&&(this._readonly=t,this._adapter.setReadonly(t),this._adapter.toggleHostAttribute(V.attributes.READONLY,this._readonly))}set ariaLabel(t){this.ariaLabelEnd=t}set ariaLabelStart(t){this._adapter.setStartAriaLabel(t)}set ariaLabelEnd(t){this._adapter.setEndAriaLabel(t)}};var Kf='<template><div part="root" class="forge-slider"><input type="range" class="end" id="end" min="0" max="100" step="1" aria-valuetext="0"><div class="track" part="track"></div><div class="handle-container-padded"><div class="handle-container-block"><div class="handle-container"><div class="handle end" part="handle-end"><forge-state-layer exportparts="surface:state-layer" target="end"></forge-state-layer><forge-focus-indicator part="focus-indicator" target="end"></forge-focus-indicator><div class="handle-thumb" part="handle-end-thumb"></div><div class="handle-label" part="handle-end-label"><span class="handle-label-content" part="handle-end-label-content"></span></div></div></div></div></div></div></template>',$f=':host{display:inline-flex;vertical-align:middle;min-inline-size:100%}:host([hidden]){display:none}.forge-slider{--_slider-start-fraction:0;--_slider-end-fraction:0;--_slider-tick-count:100;--_slider-track-height:var(--forge-slider-track-height, 4px);--_slider-active-track-color:var(--forge-slider-active-track-color, var(--forge-theme-primary, #3f51b5));--_slider-active-track-height:var(--forge-slider-active-track-height, var(--_slider-track-height));--_slider-active-track-shape:var(--forge-slider-active-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-disabled-active-track-color:var(--forge-slider-disabled-active-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-active-track-opacity:var(--forge-slider-disabled-active-track-opacity, 0.38);--_slider-disabled-handle-color:var(--forge-slider-disabled-handle-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-color:var(--forge-slider-disabled-inactive-track-color, var(--forge-theme-surface-container-high, #9e9e9e));--_slider-disabled-inactive-track-opacity:var(--forge-slider-disabled-inactive-track-opacity, 0.12);--_slider-focus-handle-color:var(--forge-slider-focus-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-color:var(--forge-slider-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-handle-height:var(--forge-slider-handle-height, 20px);--_slider-handle-shape:var(--forge-slider-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_slider-handle-width:var(--forge-slider-handle-width, 20px);--_slider-hover-handle-color:var(--forge-slider-hover-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-inactive-track-color:var(--forge-slider-inactive-track-color, var(--forge-theme-primary-container, #d1d5ed));--_slider-inactive-track-height:var(--forge-slider-inactive-track-height, var(--_slider-track-height));--_slider-inactive-track-shape:var(--forge-slider-inactive-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-shape:var(--forge-slider-label-container-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_slider-label-container-color:var(--forge-slider-label-container-color, var(--forge-theme-primary, #3f51b5));--_slider-label-container-height:var(--forge-slider-label-container-height, 28px);--_slider-label-text-color:var(--forge-slider-label-text-color, var(--forge-theme-on-primary, #ffffff));--_slider-pressed-handle-color:var(--forge-slider-pressed-handle-color, var(--forge-theme-primary, #3f51b5));--_slider-state-layer-size:var(--forge-slider-state-layer-size, 40px);--_slider-with-overlap-handle-outline-color:var(--forge-slider-with-overlap-handle-outline-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-overlap-handle-outline-width:var(--forge-slider-with-overlap-handle-outline-width, 1px);--_slider-with-tick-marks-active-container-color:var(--forge-slider-with-tick-marks-active-container-color, var(--forge-theme-on-primary, #ffffff));--_slider-with-tick-marks-container-size:var(--forge-slider-with-tick-marks-container-size, 2px);--_slider-with-tick-marks-disabled-active-container-color:var(--forge-slider-with-tick-marks-disabled-active-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-disabled-inactive-container-color:var(--forge-slider-with-tick-marks-disabled-inactive-container-color, var(--forge-theme-on-surface-container-high, #000000));--_slider-with-tick-marks-inactive-container-color:var(--forge-slider-with-tick-marks-inactive-container-color, var(--forge-theme-primary, #3f51b5))}.forge-slider{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_slider-state-layer-size);pointer-events:none;touch-action:none}.forge-slider.range :host-context([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range :host([dir=rtl]) input.start{clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))))}.forge-slider.range input.start{clip-path:inset(0 calc(100% - (var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2))) 0 0)}.forge-slider.range input.end{clip-path:inset(0 0 0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)))}.forge-slider.range :host-context([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range :host([dir=rtl]) input.end{clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.forge-slider.range input.end:dir(rtl){clip-path:inset(0 calc(var(--_slider-state-layer-size)/ 2 + (100% - var(--_slider-state-layer-size)) * (var(--_slider-start-fraction) + (var(--_slider-end-fraction) - var(--_slider-start-fraction))/ 2)) 0 0)}.track{position:absolute;inset:0;display:flex;align-items:center}.track::after,.track::before{content:"";position:absolute;inset-inline-start:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));inset-inline-end:calc(var(--_slider-state-layer-size)/ 2 - var(--_slider-with-tick-marks-container-size));background-size:calc((100% - var(--_slider-with-tick-marks-container-size) * 2)/ var(--_slider-tick-count)) 100%}.track::before{block-size:var(--_slider-inactive-track-height);border-radius:var(--_slider-inactive-track-shape);background-color:var(--_slider-inactive-track-color)}.track::after{block-size:var(--_slider-active-track-height);border-radius:var(--_slider-active-track-shape);clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)));background-color:var(--_slider-active-track-color)}.track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-inactive-container-color) 0,var(--_slider-with-tick-marks-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-active-container-color) 0,var(--_slider-with-tick-marks-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}.handle-container-block,.handle-container-padded{position:relative;block-size:100%;inline-size:100%}.handle-container-padded{padding-inline:calc(var(--_slider-state-layer-size)/ 2)}.handle-container{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100% * var(--_slider-start-fraction));inline-size:calc(100% * (var(--_slider-end-fraction) - var(--_slider-start-fraction)))}.handle{position:absolute;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);border-radius:var(--_slider-handle-shape);display:grid;place-items:center}.handle.start{inset-inline-start:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle.end{inset-inline-end:calc(0px - var(--_slider-state-layer-size)/ 2)}.handle-thumb{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);position:absolute;height:var(--_slider-handle-height);width:var(--_slider-handle-width);border-radius:var(--_slider-handle-shape);background:var(--_slider-handle-color)}.handle-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit);position:absolute;box-sizing:border-box;display:grid;padding:4px;place-items:center;border-radius:var(--_slider-label-container-shape);color:var(--_slider-label-text-color);font-weight:500;white-space:nowrap;inset-block-end:100%;min-inline-size:var(--_slider-label-container-height);min-block-size:var(--_slider-label-container-height);background:var(--_slider-label-container-color);transition:transform var(--forge-animation-duration-short2, 100ms) var(--forge-animation-easing-standard, cubic-bezier(.2, 0, 0, 1));transform-origin:center bottom;transform:scale(0)}.handle-label::after,.handle-label::before{content:"";position:absolute;display:block;background:inherit}.handle-label::before{inline-size:calc(var(--_slider-label-container-height)/ 2);block-size:calc(var(--_slider-label-container-height)/ 2);bottom:calc(var(--_slider-label-container-height)/ -10);transform:rotate(45deg)}.handle-label::after{inset:0;border-radius:inherit}.handle-label-content{z-index:1}.handle-container.hover .handle-thumb{background:var(--_slider-hover-handle-color)}:host(:not([disabled])) input.end:active~.handle-container-padded .handle.end>.handle-thumb,:host(:not([disabled])) input.start:active~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-pressed-handle-color)}:host([disabled]) .handle-thumb{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);background:var(--_slider-disabled-handle-color)}:host([disabled]) .handle-label{background:var(--_slider-disabled-handle-color)}:host([disabled]) .track::before{opacity:calc(1 / var(--_slider-disabled-active-track-opacity) * var(--_slider-disabled-inactive-track-opacity));background-color:var(--_slider-disabled-inactive-track-color)}:host([disabled]) .track::after{background-color:var(--_slider-disabled-active-track-color)}:host([disabled]) .track.tickmarks::before{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-inactive-container-color) 0,var(--_slider-with-tick-marks-disabled-inactive-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) .track.tickmarks::after{background-image:radial-gradient(circle at var(--_slider-with-tick-marks-container-size) center,var(--_slider-with-tick-marks-disabled-active-container-color) 0,var(--_slider-with-tick-marks-disabled-active-container-color) calc(var(--_slider-with-tick-marks-container-size)/ 2),transparent calc(var(--_slider-with-tick-marks-container-size)/ 2))}:host([disabled]) input[type=range]{cursor:not-allowed}:host-context([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}:host([dir=rtl]) .track::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}.track:dir(rtl)::after{clip-path:inset(0 calc(calc(var(--_slider-with-tick-marks-container-size) * min(var(--_slider-start-fraction) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * var(--_slider-start-fraction)) 0 calc(calc(var(--_slider-with-tick-marks-container-size) * min((1 - var(--_slider-end-fraction)) * 1000000000,1)) + calc(100% - var(--_slider-with-tick-marks-container-size) * 2) * (1 - var(--_slider-end-fraction))))}input.end:focus~.handle-container-padded .handle.end>.handle-thumb,input.start:focus~.handle-container-padded .handle.start>.handle-thumb{background:var(--_slider-focus-handle-color)}.on-top.overlapping .handle-label,.on-top.overlapping .handle-label::before,.on-top.overlapping .handle-thumb{border:var(--_slider-with-overlap-handle-outline-color) solid var(--_slider-with-overlap-handle-outline-width)}.handle-container.hover .handle-label,:host(:focus-within) .handle-label,:where(:has(input:active)) .handle-label{transform:scale(1)}input[type=range]{opacity:0;-webkit-tap-highlight-color:transparent;position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:0 0;cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none}input[type=range]::-moz-range-track{appearance:none}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}input[type=range]::-moz-range-thumb{appearance:none;block-size:var(--_slider-state-layer-size);inline-size:var(--_slider-state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.on-top{z-index:1}@media (prefers-reduced-motion){.handle-label{transition-duration:0}}forge-focus-indicator{--forge-focus-indicator-shape:50%;--forge-focus-indicator-outward-offset:0px}forge-state-layer{--forge-state-layer-color:var(--_slider-handle-color)}',O7,_2=class extends(O7=On,s1,O7){static get observedAttributes(){return[V.attributes.ARIA_LABEL,V.attributes.ARIA_LABEL_START,V.attributes.ARIA_LABEL_END,V.attributes.VALUE,V.attributes.VALUE_START,V.attributes.VALUE_END,V.attributes.LABEL,V.attributes.LABEL_START,V.attributes.LABEL_END,V.attributes.MAX,V.attributes.MIN,V.attributes.STEP,V.attributes.TICKMARKS,V.attributes.LABELED,V.attributes.RANGE,V.attributes.DISABLED,V.attributes.READONLY]}get form(){return this[s1].form}get labels(){return this[s1].labels}get name(){var t;return(t=this.getAttribute("name"))!=null?t:""}set name(t){G(this,!!t,"name",t!=null?t:"")}get nameStart(){var t;return(t=this.getAttribute("name-start"))!=null?t:this.name}set nameStart(t){G(this,!!t,"name-start",t!=null?t:"")}get nameEnd(){var t;return(t=this.getAttribute("name-end"))!=null?t:this.nameStart}set nameEnd(t){G(this,!!t,"name-end",t!=null?t:"")}constructor(){super(),H(this,Kf,$f),this[s1]=this.attachInternals(),this._core=new d4(new m4(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case V.attributes.ARIA_LABEL:this._core.ariaLabel=o;break;case V.attributes.ARIA_LABEL_START:this._core.ariaLabelStart=o;break;case V.attributes.ARIA_LABEL_END:this._core.ariaLabelEnd=o;break;case V.attributes.VALUE:this.value=K(o);break;case V.attributes.VALUE_START:this.valueStart=K(o);break;case V.attributes.VALUE_END:this.valueEnd=K(o);break;case V.attributes.LABEL:this.label=o;break;case V.attributes.LABEL_START:this.labelStart=o;break;case V.attributes.LABEL_END:this.labelEnd=o;break;case V.attributes.MIN:this.min=K(o);break;case V.attributes.MAX:this.max=K(o);break;case V.attributes.STEP:this.step=K(o);break;case V.attributes.TICKMARKS:this.tickmarks=p(o);break;case V.attributes.LABELED:this.labeled=p(o);break;case V.attributes.RANGE:this.range=p(o);break;case V.attributes.DISABLED:this.disabled=p(o);break;case V.attributes.READONLY:this.readonly=p(o);break}}formResetCallback(){if(this._core.range){let e=this.getAttribute("value-start");this.valueStart=e!==null?Number(e):V.numbers.DEFAULT_START_VALUE;let o=this.getAttribute("value-end");this.valueEnd=o!==null?Number(o):V.numbers.DEFAULT_END_VALUE;return}let t=this.getAttribute("value");this.value=t!==null?Number(t):V.numbers.DEFAULT_VALUE}formStateRestoreCallback(t){if(t&&t[0]instanceof FormData){let e=Array.from(t[0]),[[,o],[,a]]=e;this.valueStart=Number(o),this.valueEnd=Number(a),this.range=!0;return}this.value=Number(t),this.range=!1}formDisabledCallback(t){this.disabled=t}};_2.formAssociated=!0,i([c()],_2.prototype,"value",2),i([c()],_2.prototype,"valueStart",2),i([c()],_2.prototype,"valueEnd",2),i([c()],_2.prototype,"label",2),i([c()],_2.prototype,"labelStart",2),i([c()],_2.prototype,"labelEnd",2),i([c()],_2.prototype,"labelBuilder",2),i([c()],_2.prototype,"min",2),i([c()],_2.prototype,"max",2),i([c()],_2.prototype,"step",2),i([c()],_2.prototype,"tickmarks",2),i([c()],_2.prototype,"labeled",2),i([c()],_2.prototype,"range",2),i([c()],_2.prototype,"disabled",2),i([c()],_2.prototype,"readonly",2),_2=i([y({name:V.elementName,dependencies:[J,r1]})],_2);var D7=class extends o2{constructor(t){super(t)}get value(){return this._element.value}set value(t){this._element.value=t}get valueStart(){return this._element.valueStart}set valueStart(t){this._element.valueStart=t}get valueEnd(){return this._element.valueEnd}set valueEnd(t){this._element.valueEnd=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get min(){return this._element.min}set min(t){this._element.min=t}get max(){return this._element.max}set max(t){this._element.max=t}get step(){return this._element.step}get range(){return this._element.range}set range(t){this._element.range=t}get tickmarks(){return this._element.tickmarks}set tickmarks(t){this._element.tickmarks=t}get labeled(){return this._element.labeled}set labeled(t){this._element.labeled=t}get labelBuilder(){return this._element.labelBuilder}set labelBuilder(t){this._element.labelBuilder=t}onInput(t){this._element.addEventListener("forge-slider-input",({detail:e})=>t(e))}onChange(t){this._element.addEventListener("forge-slider-change",({detail:e})=>t(e))}onRangeInput(t){this._element.addEventListener("forge-slider-range-input",({detail:e})=>t(e))}onRangeChange(t){this._element.addEventListener("forge-slider-range-change",({detail:e})=>t(e))}onFocus(t){this._element.addEventListener("focus",e=>t(e))}onBlur(t){this._element.addEventListener("blur",e=>t(e))}_build(){return document.createElement(V.elementName)}};function P7(){f(_2)}var I0=`${b}split-view-panel`,Xf={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},Zf={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},Ua={ROOT:"root",HANDLE:"handle",ICON:"icon",STATE_LAYER:"state-layer",CONTENT:"content"},jf={ROOT:`#${Ua.ROOT}`,HANDLE:`#${Ua.HANDLE}`,ICON:`#${Ua.ICON}`,STATE_LAYER:`#${Ua.STATE_LAYER}`,CONTENT:`#${Ua.CONTENT}`},Qf={WILL_RESIZE:`${I0}-will-resize`,RESIZE_START:`${I0}-resize-start`,RESIZE_END:`${I0}-resize-end`,RESIZE:`${I0}-resize`,DID_OPEN:`${I0}-did-open`,DID_CLOSE:`${I0}-did-close`,WILL_OPEN:`${I0}-will-open`,WILL_CLOSE:`${I0}-will-close`},Jf={STATE_LAYER_ACTIVATION_WAIT:200},tb={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},P={elementName:I0,attributes:Xf,classes:Zf,ids:Ua,selectors:jf,events:Qf,numbers:Jf,customCssProperties:tb},N7=(o=>(o[o.Under=1]="Under",o[o.Active=2]="Active",o[o.Above=3]="Above",o))(N7||{});function R7(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function F7(n,t){let e=n.getContentSize(t.orientation);return S(d({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function U7(n){return S(d({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function W7(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let o=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,s=e.startPoint-a;e.resizable==="start"&&(s*=-1);let r=e.startSize-s;e.currentSize=g4(r,e),n.setContentSize(e.currentSize),w4(n,e,"pointer"),n.setValuenow(u4(e.currentSize,e));let l=r-e.currentSize+s;return K7(n,l,e),o!==e.currentSize}function G7(n,t,e){if(e.startSize===void 0)return!1;let o=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=g4(a,e),n.setContentSize(e.currentSize),w4(n,e,"keyboard"),n.setValuenow(u4(e.currentSize,e));let s=a-e.currentSize+e.keyboardDelta*-1;return K7(n,s,e),o!==e.currentSize}function q7(n,t){return n.setContentSize(t.min),t.min}function Y7(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),o=k0(t.max,e);return n.setContentSize(o),o}function K7(n,t,e){if(e.siblingSize!==void 0){let o=e.siblingSize+t;n.setSiblingContentSize(o)}}function g4(n,t){return n=Math.max(n,t.min),n=k0(n,t.max,t.availableSpace),n}function w4(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let o=k0(t.max,t.availableSpace);return t.currentSize>=o?(t.isAtMax||(n.animateStateLayer(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function $7(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let o=k0(e.max,e.availableSpace);return t>=o?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function u4(n,t){if(!t.availableSpace&&!t.max)return 100;let e=k0(t.max,t.availableSpace);return cs(n,t.min,e)}function x3(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function X7(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function _4(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof L2&&!e.open);if(e instanceof L2)return e}function eb(n){var s,r;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),o=e!=null&&e[1]?+e[1]:-1,a=(r=(s=e==null?void 0:e[2])==null?void 0:s.toLowerCase())!=null?r:"";return{amount:o,unit:a}}function Uo(n,t){let e=eb(n);return e.unit==="%"?Ol(e.amount,t):e.amount}function Z7(){let n=document.createElement("div");return n.classList.add(P.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var x4=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=R7();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}destroy(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):m5(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){m5(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=q7(this._adapter,this._state);this._adapter.emitHostEvent(P.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Y7(this._adapter,this._state);this._adapter.emitHostEvent(P.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){G7(this._adapter,t,this._state)&&this._adapter.emitHostEvent(P.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,w4(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._endResize()}_handlePointermove(t){W7(this._adapter,t,this._state)&&this._adapter.emitHostEvent(P.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(P.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=F7(this._adapter,this._state),this._adapter.emitHostEvent(P.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(P.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=U7(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,o=!1){let a=t?P.events.WILL_OPEN:P.events.WILL_CLOSE,s={auto:e,userInitiated:o};this._adapter.emitHostEvent(a,s,!0,!0)&&(this._open=t,this._applyOpen(s))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let o=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=o,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(P.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=Uo(this._size,t);this._adapter.setHostAttribute(P.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let o=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=k0(this._pixelMax,o),s=cs(e,this._pixelMin,a);this._adapter.setValuenow(s),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(P.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=Uo(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var o;if(this._adapter.toggleHostAttribute(P.attributes.MAX,this._max!==void 0,(o=this._max)==null?void 0:o.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=Uo(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(P.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(P.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(P.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!O(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(P.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(P.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!O(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(P.attributes.AUTO_CLOSE_THRESHOLD,O(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!O(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=Uo(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=g4(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(P.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(O(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),O(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),O(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,O(this._autoClose)||this._applyAutoClose()),O(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,O(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=Uo(this._min,a),this._pixelMax=O(this._max)?Uo(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),o=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=u4(e,S(d({},this._state),{availableSpace:o}));this._adapter.setValuenow(a)}t.cursor&&$7(this._adapter,e,S(d({},this._state),{availableSpace:o}))}};var ob=`${b}split-view`,ab={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},nb={ROOT:"forge-split-view"},j7={ROOT:"root"},sb={ROOT:`#${j7.ROOT}`,PANEL:P.elementName},rb={RESIZE_THROTTLE_THRESHOLD:200},ib={ANIMATING_LAYER:"--forge-split-view-animating-layer"},t2={elementName:ob,attributes:ab,classes:nb,ids:j7,selectors:sb,numbers:rb,customCssProperties:ib};var f4=class extends I{constructor(t){super(t),this._root=w(t,P.selectors.ROOT),this._handle=w(t,P.selectors.HANDLE),this._icon=w(t,P.selectors.ICON),this._stateLayer=w(t,P.selectors.STATE_LAYER),this._content=w(t,P.selectors.CONTENT)}initialize(){let t=this._component.parentElement;(t==null?void 0:t.tagName.toLowerCase())===t2.elementName&&(this._parent=t)}tryRemoveOverlay(){var t;(t=this._overlay)==null||t.remove(),this._overlay=void 0}setPointerdownListener(t){this._handle.addEventListener("pointerdown",t)}setPointerupListener(t){document.addEventListener("pointerup",t)}removePointerupListener(t){document.removeEventListener("pointerup",t)}setPointermoveListener(t){document.addEventListener("pointermove",t)}removePointermoveListener(t){document.removeEventListener("pointermove",t)}setKeydownListener(t){this._handle.addEventListener("keydown",t)}setKeyupListener(t){this._handle.addEventListener("keyup",t)}removeKeyupListener(t){this._handle.removeEventListener("keyup",t)}getParentProperty(t){var e;return(e=this._parent)==null?void 0:e[t]}setAccessibleLabel(t){this._handle.setAttribute("aria-label",t)}setDisabled(t){this._root.classList.toggle(P.classes.DISABLED,t),this._handle&&(this._handle.setAttribute("tabindex",t?"-1":"0"),G(this._handle,t,"aria-disabled","true"))}setResizable(t){this._root.setAttribute(P.attributes.RESIZABLE,t.toString()),G(this._handle,t!=="off","aria-valuemin","0"),G(this._handle,t!=="off","aria-valuemax","100"),t!=="off"&&(this._handle.remove(),t==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(t){this._root.setAttribute(P.attributes.ORIENTATION,t),this._handle.setAttribute("aria-orientation",t==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",X7(t))}setOpen(t,e=!0,o){var s,r;let a=()=>{var l,h;t||this._root.classList.add(P.classes.CLOSED),o&&this.emitHostEvent(t?P.events.DID_OPEN:P.events.DID_CLOSE,o),(l=this._parent)==null||l.unlayerSlottedPanels(),(h=this._parent)==null||h.update({accessibility:!0,cursor:!0})};if(t&&this._root.classList.contains(P.classes.CLOSED)){if(this._root.classList.remove(P.classes.CLOSED),!e){a();return}(s=this._parent)==null||s.layerSlottedPanels(this._component),Gt(this._root,P.classes.OPENING,!0).then(()=>{a()})}else if(!t&&!this._root.classList.contains(P.classes.CLOSED)){if(!e){a();return}(r=this._parent)==null||r.layerSlottedPanels(this._component),Gt(this._root,P.classes.CLOSING,!0).then(()=>{a()})}}setGrabbed(t){var e;this._root.classList.toggle(P.classes.GRABBED,t),this._handle.setAttribute("aria-grabbed",t.toString()),t?(this._overlay||(this._overlay=Z7()),document.body.append(this._overlay)):(e=this._overlay)==null||e.remove()}setHandleCursor(t,e){t?this._root.style.setProperty(P.customCssProperties.CURSOR,x3(t,e)):this._root.style.removeProperty(P.customCssProperties.CURSOR)}setBodyCursor(t,e){var o;(o=this._overlay)==null||o.style.setProperty("cursor",x3(t,e))}getContentSize(t){return t==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(t){this._component.style.setProperty(P.customCssProperties.SIZE,`${t}px`)}setValuenow(t){this._handle.setAttribute("aria-valuenow",t.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(t,e){if(e==="off")return-1;let o=_4(this._component);return o?o.getCollapsibleSize()+this.getContentSize(t):this.getParentSize(t)}getSiblingContentSize(){var e;let t=_4(this._component);return(e=t==null?void 0:t.getContentSize())!=null?e:0}setSiblingContentSize(t){let e=_4(this._component);e==null||e.setContentSize(t)}animateStateLayer(t){t?window.setTimeout(()=>{this._stateLayer.playAnimation()},P.numbers.STATE_LAYER_ACTIVATION_WAIT):this._stateLayer.playAnimation()}getParentSize(t){var o,a;let e=t==="horizontal"?(o=this._parent)==null?void 0:o.clientWidth:(a=this._parent)==null?void 0:a.clientHeight;return e!=null?e:0}updateParent(t){var e;(e=this._parent)==null||e.update(t)}};var lb='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-state-layer target="handle" id="state-layer" exportparts="surface:state-layer"></forge-state-layer><forge-focus-indicator inward target="handle" part="focus-indicator"></forge-focus-indicator></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',cb=".forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:u3o1dol;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u3o1dol{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:u3o1dpk;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u3o1dpk{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u3o1dqg;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u3o1dqg{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:u3o1dqw;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u3o1dqw{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:u3o1drv;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u3o1drv{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u3o1dsn;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u3o1dsn{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u3o1dta;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u3o1dta{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u3o1dtk;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u3o1dtk{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}",L2=class extends M{static get observedAttributes(){return[P.attributes.RESIZABLE,P.attributes.SIZE,P.attributes.MIN,P.attributes.MAX,P.attributes.ACCESSIBLE_LABEL,P.attributes.OPEN,P.attributes.DISABLED,P.attributes.ALLOW_CLOSE,P.attributes.AUTO_CLOSE,P.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),X.define([wl,gl]),H(this,lb,cb),this._core=new x4(new f4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case P.attributes.RESIZABLE:this.resizable=o;break;case P.attributes.SIZE:this.size=o;break;case P.attributes.MIN:this.min=o;break;case P.attributes.MAX:o?this.max=o:this.max=void 0;break;case P.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=o;break;case P.attributes.OPEN:this.open=p(o);break;case P.attributes.DISABLED:this.hasAttribute(t)?this.disabled=p(o):this.disabled=void 0;break;case P.attributes.ALLOW_CLOSE:this.hasAttribute(t)?this.allowClose=p(o):this.allowClose=void 0;break;case P.attributes.AUTO_CLOSE:this.hasAttribute(t)?this.autoClose=p(o):this.autoClose=void 0;break;case P.attributes.AUTO_CLOSE_THRESHOLD:o?this.autoCloseThreshold=K(o):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._core.getContentSize()}getCollapsibleSize(){return this._core.getCollapsibleSize()}setContentSize(t){this._core.setContentSize(t)}update(t){this._core.update(t)}};i([c()],L2.prototype,"resizable",2),i([c()],L2.prototype,"size",2),i([c()],L2.prototype,"min",2),i([c()],L2.prototype,"max",2),i([c()],L2.prototype,"accessibleLabel",2),i([c()],L2.prototype,"open",2),i([c()],L2.prototype,"disabled",2),i([c()],L2.prototype,"allowClose",2),i([c()],L2.prototype,"autoClose",2),i([c()],L2.prototype,"autoCloseThreshold",2),L2=i([y({name:P.elementName,dependencies:[j,r1,J]})],L2);function Dy1(){f(L2)}var b4=class extends I{constructor(t){super(t),this._root=w(t,t2.selectors.ROOT)}registerSlotListener(t){this._root.addEventListener("slotchange",t)}registerDidOpenListener(t){this._root.addEventListener(P.events.DID_OPEN,t)}registerDidCloseListener(t){this._root.addEventListener(P.events.DID_CLOSE,t)}observeResize(t){B0.observe(this._root,t)}unobserveResize(){B0.unobserve(this._root)}getSlottedPanels(){let t=this._component.querySelectorAll(t2.selectors.PANEL);return Array.from(t).filter(a=>a.parentElement===this._component)}refitSlottedPanels(t){let e=t==="horizontal"?this._root.clientWidth:this._root.clientHeight,o=this.getSlottedPanels(),a=o.map(r=>{var v;let l=(v=r.shadowRoot)==null?void 0:v.querySelector(P.selectors.ROOT),h=t==="horizontal"?l==null?void 0:l.clientWidth:l==null?void 0:l.clientHeight;return h!=null?h:0}).reduce((r,l)=>r+l,0);if(a<=e)return;let s=a-e;o.slice().reverse().filter(r=>r.open).forEach(r=>{if(s<=0)return;let l=r.getContentSize(),h=r.getCollapsibleSize(),v=Math.min(s,h),m=l-v;r.setContentSize(m),s-=v})}};var y4=class{constructor(t){this._adapter=t;this._orientation="horizontal";this._disabled=!1;this._allowClose=!1;this._autoClose=!1;this._autoCloseThreshold=0;this._isInitialized=!1;this._slotListener=e=>this._onSlotChange(e),this._didOpenListener=()=>this._onDidOpen(),this._didCloseListener=()=>this._onDidClose(),this._resizeObserverCallback=Gn(e=>this._onResize(e),t2.numbers.RESIZE_THROTTLE_THRESHOLD)}initialize(){this._adapter.registerSlotListener(this._slotListener),this._adapter.registerDidOpenListener(this._didOpenListener),this._adapter.registerDidCloseListener(this._didCloseListener),this._adapter.observeResize(this._resizeObserverCallback),this._applyOrientation(),this._isInitialized=!0}destroy(){this._adapter.unobserveResize()}_onSlotChange(t){this._layoutSlottedPanels(),this.update({accessibility:!0,cursor:!0,orientation:this._orientation})}_onDidOpen(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onDidClose(){this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0,size:!0})}_onResize(t){this.update({accessibility:!0,cursor:!0,size:!0})}_layoutSlottedPanels(){let t=this._adapter.getSlottedPanels();t.length<2||t.some(e=>e.resizable!=="off")||t.slice(1).forEach(e=>e.resizable="start")}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._applyOrientation())}_applyOrientation(){this._adapter.setHostAttribute(t2.attributes.ORIENTATION,this._orientation),this.update({orientation:this._orientation}),this._isInitialized&&this._adapter.refitSlottedPanels(this._orientation),this.update({accessibility:!0,cursor:!0})}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){this._adapter.toggleHostAttribute(t2.attributes.DISABLED,this._disabled),this.update({properties:{disabled:this._disabled}})}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){this._adapter.toggleHostAttribute(t2.attributes.ALLOW_CLOSE,this._allowClose),this.update({properties:{allowClose:this._allowClose}})}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){this._adapter.toggleHostAttribute(t2.attributes.AUTO_CLOSE,this._autoClose),this.update({properties:{autoClose:this._autoClose}})}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){this._adapter.setHostAttribute(t2.attributes.AUTO_CLOSE_THRESHOLD,this._autoCloseThreshold.toString()),this.update({properties:{autoCloseThreshold:this._autoCloseThreshold}})}layerSlottedPanels(t){let e=this._adapter.getSlottedPanels(),o=t.resizable==="start"?1:-1,a=t.resizable==="start"?1:3;e.forEach(s=>{(s===t||a===2)&&(a+=o),s.style.setProperty(t2.customCssProperties.ANIMATING_LAYER,a.toString())})}unlayerSlottedPanels(){this._adapter.getSlottedPanels().forEach(e=>{e.style.removeProperty(t2.customCssProperties.ANIMATING_LAYER)})}update(t){this._adapter.getSlottedPanels().forEach(o=>{o.update(t)})}refitSlottedPanels(){this._adapter.refitSlottedPanels(this._orientation)}};var hb='<template><div class="forge-split-view" id="root" part="root"><slot></slot></div></template>',vb=".forge-split-view{display:flex;width:100%;height:100%}:host{--forge-split-view-handle-width:8px;display:block;height:100%;width:100%;overflow:hidden}:host([hidden]){display:none}:host([orientation=horizontal]) .forge-split-view{flex-direction:row}:host([orientation=vertical]) .forge-split-view{flex-direction:column}",Te=class extends M{static get observedAttributes(){return[t2.attributes.ORIENTATION,t2.attributes.DISABLED,t2.attributes.ALLOW_CLOSE,t2.attributes.AUTO_CLOSE,t2.attributes.AUTO_CLOSE_THRESHOLD]}constructor(){super(),H(this,hb,vb),this._core=new y4(new b4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case t2.attributes.ORIENTATION:this.orientation=o;break;case t2.attributes.DISABLED:this.disabled=p(o);break;case t2.attributes.ALLOW_CLOSE:this.allowClose=p(o);break;case t2.attributes.AUTO_CLOSE:this.autoClose=p(o);break;case t2.attributes.AUTO_CLOSE_THRESHOLD:this.autoCloseThreshold=K(o);break}}layerSlottedPanels(t){this._core.layerSlottedPanels(t)}unlayerSlottedPanels(){this._core.unlayerSlottedPanels()}update(t){this._core.update(t)}refit(){this._core.refitSlottedPanels()}};i([c()],Te.prototype,"orientation",2),i([c()],Te.prototype,"disabled",2),i([c()],Te.prototype,"allowClose",2),i([c()],Te.prototype,"autoClose",2),i([c()],Te.prototype,"autoCloseThreshold",2),Te=i([y({name:t2.elementName,dependencies:[L2]})],Te);function Q7(){f(Te)}var pb=`${b}stack`,J7={DEFAULT:"forge-stack"},mb={ROOT:`.${J7.DEFAULT}`},tm={INLINE:"inline",WRAP:"wrap",STRETCH:"stretch",GAP:"gap",ALIGNMENT:"alignment",JUSTIFY:"justify"},db=d({},tm),gb={DEFAULT_GAP:"16"},W2={elementName:pb,classes:J7,observedAttributes:tm,attributes:db,selectors:mb,strings:gb};var M4=class extends I{constructor(t){super(t),this._rootElement=w(t,W2.selectors.ROOT)}setGap(t){let e=/^\d+$/.test(t)?`${t}px`:t;this._rootElement.style.gap=`var(--forge-stack-gap, ${e})`}};var z4=class{constructor(t){this._adapter=t;this._inline=!1;this._wrap=!1;this._stretch=!1;this._gap=W2.strings.DEFAULT_GAP;this._alignment="start";this._justify="start"}get inline(){return this._inline}set inline(t){t=!!t,this._inline!==t&&(this._inline=t,this._adapter.toggleHostAttribute(W2.attributes.INLINE,this._inline))}get wrap(){return this._wrap}set wrap(t){t=!!t,this._wrap!==t&&(this._wrap=t,this._adapter.toggleHostAttribute(W2.attributes.WRAP,this._wrap))}get stretch(){return this._stretch}set stretch(t){t=!!t,this._stretch!==t&&(this._stretch=t,this._adapter.toggleHostAttribute(W2.attributes.STRETCH,this._stretch))}get gap(){return this._gap}set gap(t){this._gap!==t&&(this._gap=t,this._adapter.setGap(this._gap),this._adapter.setHostAttribute(W2.attributes.GAP,this._gap))}get alignment(){return this._alignment}set alignment(t){this._alignment!==t&&(this._alignment=t,this._adapter.setHostAttribute(W2.attributes.ALIGNMENT,this._alignment))}get justify(){return this._justify}set justify(t){this._justify!==t&&(this._justify=t,this._adapter.setHostAttribute(W2.attributes.JUSTIFY,this._justify))}};var wb='<template><div class="forge-stack" part="root"><slot></slot></div></template>',ub=".forge-stack{display:flex;flex-direction:column;align-items:var(--_stack-alignment);justify-content:var(--_stack-justify);gap:var(--_stack-gap);height:var(--_stack-height);width:100%;--_stack-gap:var(--forge-stack-gap, var(--forge-spacing-medium, 16px));--_stack-height:var(--forge-stack-height);--_stack-stretch:var(--forge-stack-stretch, initial);--_stack-alignment:var(--forge-stack-alignment, normal);--_stack-justify:var(--forge-stack-justify, normal);--_stack-wrap:var(--forge-stack-wrap, wrap)}.forge-stack ::slotted(*){flex:var(--_stack-stretch)}:host([inline]) .forge-stack{flex-direction:row}:host([inline][wrap]) .forge-stack{flex-wrap:wrap}:host(:not([inline])) .forge-stack{--_stack-height:var(--forge-stack-height, 100%)}:host([stretch]) ::slotted(*){--_stack-stretch:var(--forge-stack-stretch, 1)}:host([alignment=start]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, start)}:host([alignment=center]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, center)}:host([alignment=end]) .forge-stack{--_stack-alignment:var(--forge-stack-alignment, end)}:host([justify=start]) .forge-stack{--_stack-justify:var(--forge-stack-justify, start)}:host([justify=center]) .forge-stack{--_stack-justify:var(--forge-stack-justify, center)}:host([justify=end]) .forge-stack{--_stack-justify:var(--forge-stack-justify, end)}",_e=class extends M{static get observedAttributes(){return Object.values(W2.observedAttributes)}constructor(){super(),H(this,wb,ub),this._core=new z4(new M4(this))}attributeChangedCallback(t,e,o){switch(t){case W2.observedAttributes.INLINE:this.inline=p(o);break;case W2.observedAttributes.WRAP:this.wrap=p(o);break;case W2.observedAttributes.STRETCH:this.stretch=p(o);break;case W2.observedAttributes.GAP:this.gap=o;break;case W2.observedAttributes.ALIGNMENT:this.alignment=o;break;case W2.observedAttributes.JUSTIFY:this.justify=o;break}}};i([c()],_e.prototype,"inline",2),i([c()],_e.prototype,"wrap",2),i([c()],_e.prototype,"stretch",2),i([c()],_e.prototype,"gap",2),i([c()],_e.prototype,"alignment",2),i([c()],_e.prototype,"justify",2),_e=i([y({name:W2.elementName})],_e);function em(){f(_e)}var H4=`${b}step`,po={STEP:"forge-step",STEP_CONTAINER:"container",ERROR:"error",SELECTED:"selected",COMPLETED:"completed",EDITABLE:"editable",ALTERNATIVE:"alternative",ICON_CONTENT:"icon-content",ICON:"icon",LABEL_CONTAINER:"label-container",LABEL:"label",OPTIONAL_LABEL:"optional-label",INDEX:"index",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",EXPANSION_PANEL:"expansion-panel",EXPANSION_ICON:"expanded-icon",EXPANSION_ICON_EXPANDED:"expanded-icon--expanded",EXPANSION_CONTENT:"expansion-content"},_b={SELECTED:"selected",INDEX:"index",EDITABLE:"editable",COMPLETED:"completed",ERROR:"error",ALTERNATIVE:"alternative",FIRST:"first",LAST:"last",ARIA_SELECTED:"aria-selected",CLUSTERED:"clustered",DISABLED:"disabled",VERTICAL:"vertical",EXPANDED:"expanded",EXPANDABLE:"expandable",IGNORE_USER_EXPANSION:"ignore-user-expansion"},xb={STEP:`.${po.STEP}`,STEP_CONTAINER:`.${po.STEP_CONTAINER}`,INDEX:`.${po.INDEX}`,ICON:`.${po.ICON}`,ICON_CONTENT:`.${po.ICON_CONTENT}`,EXPANSION_SLOT:'slot[name="expansion-content"]',EXPANSION_PANEL:`.${po.EXPANSION_PANEL}`,EXPANSION_ICON:`.${po.EXPANSION_ICON}`},fb={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",EXPANSION_CONTENT_SLOT_NAME:"expansion-content"},bb={SELECT:`${H4}-select`,EXPANDED_CONTENT_FOCUSIN:`${H4}-expanded-content-focusin`,EXPANDED_CONTENT_FOCUSOUT:`${H4}-expanded-content-focusout`},k={elementName:H4,classes:po,selectors:xb,attributes:_b,events:bb,strings:fb};var I4=class extends I{constructor(t){super(t),this._stepContainer=w(t,k.selectors.STEP),this._container=w(t,k.selectors.STEP_CONTAINER),this._stateLayerElement=w(this._component,I1.elementName)}get component(){return this._component}initialize(){this._component.hasAttribute("role")||this._component.setAttribute("role","tab")}setIndex(t){this._stepContainer.querySelector(k.selectors.INDEX).innerHTML=(t+1||"").toString()}toggleRootClass(t,e){f2(this._stepContainer,e,t)}toggleDisabled(t){f2(this._stepContainer,t,k.classes.DISABLED),G(this._component,t,"aria-disabled"),this._stateLayerElement.disabled=t}toggleIcon(t,e){let o=this._stepContainer.querySelector(k.selectors.INDEX),a=this._stepContainer.querySelector(k.selectors.ICON);if(!e){o.style.display="inherit",a.style.display="none";return}o.style.display="none",a.style.display="inherit",a.name=t}slotHasContent(){return this._expansionSlot.assignedElements({flatten:!0}).length>0}setClickListener(t){this._component.addEventListener("click",t)}removeClickListener(t){this._component.removeEventListener("click",t)}setSlotListener(t){this._expansionSlot.addEventListener("slotchange",t)}removeSlotListener(t){this._expansionSlot&&this._expansionSlot.removeEventListener("slotchange",t)}setExpanded(t){this._expansionPanel&&(this._expansionPanel.open=t,G(this._expansionPanel,!t,"tabindex","-1")),f2(this._stepContainer,t,k.classes.EXPANDED)}setExpansionPanelAnimations(t){this._expansionPanel.animationType=t?"default":"none"}addExpansionPanel(){this._container.querySelector(k.selectors.EXPANSION_PANEL)||(this._expansionPanel=this._container.appendChild(this._createExpansionPanel()),this._expansionSlot=this._expansionPanel.querySelector(k.selectors.EXPANSION_SLOT))}removeExpansionPanel(){let t=this._container.querySelector(k.selectors.EXPANSION_PANEL);t&&this._container.removeChild(t)}addExpansionIcon(){this._stepContainer.querySelector(k.selectors.EXPANSION_ICON)||this._stepContainer.appendChild(this._createExpansionIcon())}removeExpansionIcon(){let t=this._stepContainer.querySelector(k.selectors.EXPANSION_ICON);t&&this._stepContainer.removeChild(t)}addExpansionPanelListener(t,e){this._expansionPanel.addEventListener(t,e)}removeExpansionPanelListener(t,e){this._expansionPanel&&this._expansionPanel.removeEventListener(t,e)}isExpandedContentInFocus(t){return this._expansionSlot.assignedElements().some(e=>e.contains(t||document.activeElement))}_createExpansionPanel(){let t=document.createElement("forge-expansion-panel");t.animationType="none",t.setAttribute("part","expansion-panel"),H1(k.classes.EXPANSION_PANEL,t);let e=document.createElement("slot");return e.setAttribute("name","expansion-content"),H1(k.classes.EXPANSION_CONTENT,e),t.appendChild(e),t}_createExpansionIcon(){let t=document.createElement("forge-icon");return H1(k.classes.EXPANSION_ICON,t),t.name="keyboard_arrow_down",t.setAttribute("part","expanded-icon"),t}};var L4=class{constructor(t){this._adapter=t;this._clickListener=()=>this._onClickListener(),this._expansionContentSlotChangeListener=e=>this._onExpansionContentSlotChange(e),this._expansionContentFocusInListener=e=>this._onExpansionContentFocusIn(e),this._expansionContentFocusOutListener=e=>this._onExpansionContentFocusOut(e)}initialize(){this._adapter.initialize(),this._applySelected(),this._toggleIcon(),this._vertical&&(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener),this._adapter.addExpansionPanelListener("focusin",this._expansionContentFocusInListener),this._adapter.addExpansionPanelListener("focusout",this._expansionContentFocusOutListener)),this._initialized=!0}destroy(){this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanelListener("focusin",this._onExpansionContentFocusIn),this._adapter.removeExpansionPanelListener("focusout",this._onExpansionContentFocusOut)}get index(){return this._index}set index(t){this._index!==t&&(this._index=t,this._applyIndex(),this._adapter.setHostAttribute(k.attributes.INDEX,t.toString()))}get editable(){return this._editable}set editable(t){this._editable!==t&&(this._editable=t,this._adapter.toggleHostAttribute(k.attributes.EDITABLE,t),this._applyEditable())}get completed(){return this._completed}set completed(t){this._completed!==t&&(this._completed=t,this._adapter.toggleHostAttribute(k.attributes.COMPLETED,t),this._applyCompleted())}get error(){return this._error}set error(t){this._error!==t&&(this._error=t,this._adapter.toggleHostAttribute(k.attributes.ERROR,t),this._applyError())}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.toggleHostAttribute(k.attributes.SELECTED,t),this._applySelected())}get alternative(){return this._alternative}set alternative(t){this._alternative!==t&&(this._alternative=t,this._adapter.toggleHostAttribute(k.attributes.ALTERNATIVE,t),this._applyAlternative())}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._applyDisabled()}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._initialized&&(this._vertical?(this._adapter.addExpansionPanel(),this._adapter.addExpansionIcon(),this._adapter.setClickListener(this._clickListener),this._adapter.setSlotListener(this._expansionContentSlotChangeListener)):(this._adapter.removeClickListener(this._clickListener),this._adapter.removeSlotListener(this._expansionContentSlotChangeListener),this._adapter.removeExpansionPanel(),this._adapter.removeExpansionIcon())))}get expanded(){return this._expanded}set expanded(t){t!==this._expanded&&(this._expanded=t,this._adapter.toggleHostAttribute(k.attributes.EXPANDED,this._expanded),this._initialized&&this._applyExpanded())}get ignoreUserExpansion(){return this._ignoreUserExpansion}set ignoreUserExpansion(t){t!==this._ignoreUserExpansion&&(this._ignoreUserExpansion=t)}_applyExpanded(){this._adapter.setExpanded(this._expanded)}_applyVertical(){this._adapter.toggleHostAttribute(k.attributes.VERTICAL,this._vertical),this._adapter.toggleRootClass(k.classes.VERTICAL,this._vertical)}_applyAlternative(){this._adapter.toggleRootClass(k.classes.ALTERNATIVE,this._alternative)}_applySelected(){this._adapter.toggleRootClass(k.classes.SELECTED,this._selected),this._adapter.setHostAttribute(k.attributes.ARIA_SELECTED,(this._selected||!1).toString()),this._adapter.hostElement.tabIndex=this._selected?0:-1,this._toggleIcon()}_applyIndex(){this._adapter.setIndex(this._index)}_applyEditable(){this._adapter.toggleRootClass(k.classes.EDITABLE,this._editable),this._toggleIcon()}_applyCompleted(){this._adapter.toggleRootClass(k.classes.COMPLETED,this._completed),this._toggleIcon()}_applyError(){this._adapter.toggleRootClass(k.classes.ERROR,this._error),this._toggleIcon()}_applyDisabled(){this._adapter.toggleDisabled(this._disabled),this._toggleIcon()}_getIconState(){return this._error?"warning":this._completed?this._editable?"mode_edit":"check":this._editable&&this._selected&&!this._disabled?"mode_edit":this._disabled?"block":""}_toggleIcon(){this._iconState=this._getIconState(),this._adapter.toggleIcon(this._iconState,this._iconState!=="")}_toggleExpanded(){this._adapter.slotHasContent()&&(this._expanded=!this._expanded,this._applyExpanded(),this._adapter.toggleHostAttribute(k.attributes.EXPANDED,this._expanded))}_onClickListener(){this._vertical&&!this._ignoreUserExpansion&&this._toggleExpanded()}_onExpansionContentSlotChange(t){let e=this._adapter.slotHasContent();e?(this._adapter.setHostAttribute(k.attributes.EXPANDABLE),this._applyExpanded(),this._adapter.setExpansionPanelAnimations(!0)):(this._adapter.removeHostAttribute(k.attributes.EXPANDABLE),this._adapter.setExpansionPanelAnimations(!1)),this._adapter.toggleRootClass(k.classes.EXPANDABLE,e)}_onExpansionContentFocusIn(t){!this._expandedContentFocused&&this._adapter.isExpandedContentInFocus(t.target)&&(this._adapter.emitHostEvent(k.events.EXPANDED_CONTENT_FOCUSIN,this._adapter.component),this._expandedContentFocused=!0)}_onExpansionContentFocusOut(t){t.relatedTarget&&!this._adapter.isExpandedContentInFocus(t.relatedTarget)&&(this._adapter.emitHostEvent(k.events.EXPANDED_CONTENT_FOCUSOUT,this._adapter.component),this._expandedContentFocused=!1)}};var yb='<template><div class="container" part="root"><div class="forge-step" part="step"><div class="before" part="before"></div><div class="icon-container" part="icon-container"><div class="icon-content" part="icon-content"><span class="index" part="index"></span><forge-icon class="icon" part="icon"></forge-icon></div></div><div class="text-container" part="text-container"><div class="title" part="title-container"><slot></slot></div><div class="subtitle" part="subtitle-container"><slot name="optional"></slot></div></div><div class="after" part="after"></div><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></div></template>',Mb=':host{--_step-primary-color:var(--forge-step-primary-color, var(--forge-theme-primary, #3f51b5));--_step-text-color:var(--forge-step-text-color, var(--forge-theme-on-primary, #ffffff));--_step-border-radius:var(--forge-step-border-radius, calc(var(--forge-shape-extra-large, 16px) * var(--forge-shape-factor, 1)));--_step-border-radius-vertical:var(--forge-step-border-radius-vertical, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_step-disabled-text-color:var(--forge-step-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_step-disabled-color:var(--forge-step-disabled-color, var(--forge-theme-surface-container-minimum, #f5f5f5));--_step-icon-fill:var(--forge-step-icon-fill, unset);--_step-icon-fill-active:var(--forge-step-icon-fill-active, var(--_step-primary-color));--_step-icon-text-color:var(--forge-step-icon-text-color, var(--forge-theme-primary, #3f51b5));--_step-icon-text-color-active:var(--forge-step-icon-text-color-active, var(--forge-theme-on-primary, #ffffff));--_step-icon-content-size:var(--forge-step-icon-content-size, 24px);--_step-icon-size:var(--forge-step-icon-size, calc(var(--forge-typography-font-size, 1rem) * 0.875));--_step-icon-transition-duration:var(--forge-step-icon-transition-duration, var(--forge-animation-duration-medium4, 400ms));--_step-icon-transition-easing:var(--forge-step-icon-transition-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_step-line-color:var(--forge-step-line-color, var(--forge-theme-outline, #e0e0e0));--_step-line-min-width:var(--forge-step-line-min-width, 10px);--_step-line-min-width-clustered:var(--forge-step-line-min-width-clustered, 25px);--_step-label-color:var(--forge-step-label-color, var(--forge-theme-text-high, rgba(0, 0, 0, 0.87)));--_step-sub-label-color:var(--forge-step-sub-label-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_step-error-color:var(--forge-step-error-color, var(--forge-theme-error, #b00020));--_step-error-text-color:var(--forge-step-error-text-color, var(--forge-theme-on-error, #ffffff));--_step-expansion-panel-border-left-width:var(--forge-step-expansion-panel-border-left-width, 1px);--_step-expansion-panel-margin-bottom:var(--forge-step-expansion-panel-margin-bottom, 4px);--_step-expansion-panel-margin-left:var(--forge-step-expansion-panel-margin-left, 60px);--_step-expansion-panel-margin-top:var(--forge-step-expansion-panel-margin-top, 4px);--_step-expansion-panel-icon-color:var(--forge-step-expansion-panel-icon-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)))}:host(:focus){outline:0}:host([error]){--forge-state-layer-color:var(--_step-error-color)}:host(:first-child[alternative])::after{align-self:flex-start;top:22px;margin:0}:host(:last-child[alternative])::before{align-self:flex-start;top:22px;margin:0}:host(:not(:first-child):not(:last-child)[alternative])::after,:host(:not(:first-child):not(:last-child)[alternative])::before{align-self:flex-start;top:22px;min-width:7px;margin:0}:host(:not(:last-child)[alternative]) .after{align-self:flex-start;top:22px;position:absolute;width:calc(50% - 18px);left:calc(50% + 18px);height:0;right:0}:host(:not(:first-child)[alternative]) .before{align-self:flex-start;top:22px;position:absolute;left:0;width:calc(50% - 18px);height:0}:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::after,:host(:not(:first-child):not(:last-child)):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host(:last-child):host(:not([vertical]))::before{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px 0 0}:host(:is(:first-child)):host(:not([vertical]))::after{border-color:var(--_step-line-color);min-width:var(--_step-line-min-width);content:"";position:relative;height:0;flex:1;flex-basis:0.000000001px;border-top-style:solid;border-top-width:1px;border-radius:1px 0 0 1px;margin:0 -10px}:host([vertical]){flex-direction:column}:host([vertical])::after{content:none}:host([vertical])::before{content:none}:host([vertical]) .forge-step{--_step-border-radius:var(--_step-border-radius-vertical);width:100%;min-height:52px}:host([vertical]) .forge-step .text-container{white-space:normal}:host([vertical]) .icon-container .icon-content{margin:0 16px 0 0}:host([vertical]) .expansion-panel{display:none}:host([vertical]) .expanded-icon{color:var(--_step-expansion-panel-icon-color);display:none;margin-left:auto}:host([vertical][expandable]) .expansion-panel{display:block}:host([ignore-user-expansion]) .forge-step .expanded-icon{display:none}forge-expansion-panel::part(root){border-color:var(--_step-line-color);margin-left:var(--_step-expansion-panel-margin-left);margin-top:var(--_step-expansion-panel-margin-top);margin-bottom:var(--_step-expansion-panel-margin-bottom);border-left-width:var(--_step-expansion-panel-border-left-width);border-left-style:solid}forge-focus-indicator{--forge-focus-indicator-color:var(--_step-primary-color);--forge-focus-indicator-shape:16px}.container{display:contents}.forge-step{-webkit-tap-highlight-color:transparent;padding:12px 16px;outline:0;background:0 0;border:none;border-radius:var(--_step-border-radius);position:relative;display:flex;overflow:hidden;align-items:center;box-sizing:border-box;cursor:pointer}.forge-step:focus{outline:0}.forge-step::-moz-focus-inner,.forge-step::-moz-focus-outer{padding:0;border:0}.forge-step.error forge-focus-indicator{--forge-focus-indicator-color:var(--_step-error-color)}.forge-step.vertical forge-focus-indicator{--forge-focus-indicator-shape:4px}.forge-step.selected:not(.disabled){--forge-state-layer-color:var(--_step-primary-color)}.forge-step.selected:not(.disabled)::before{background-color:var(--_step-primary-color);content:"";position:absolute;inset:0;opacity:.08;height:100%;width:100%}.forge-step.selected:not(.disabled).error{--_step-primary-color:var(--_step-error-color)}.forge-step .title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, .875)));font-weight:var(--forge-typography-body1-font-weight,400);line-height:var(--forge-typography-body1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.125)));letter-spacing:var(--forge-typography-body1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-body1-text-transform,inherit);text-decoration:var(--forge-typography-body1-text-decoration,inherit);color:var(--_step-label-color);text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle{text-align:left;overflow:hidden;text-overflow:ellipsis}.forge-step .subtitle ::slotted(*){color:var(--_step-sub-label-color);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label1-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-label1-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .75)));font-weight:var(--forge-typography-label1-font-weight,400);line-height:var(--forge-typography-label1-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label1-letter-spacing, .0357142857em);text-transform:var(--forge-typography-label1-text-transform,inherit);text-decoration:var(--forge-typography-label1-text-decoration,inherit)}.forge-step .icon-container .icon-content{color:var(--_step-icon-text-color);background-color:var(--_step-icon-fill);height:var(--_step-icon-content-size);width:var(--_step-icon-content-size);border-style:solid;border-width:2px;border-color:transparent;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background-color var(--_step-icon-transition-duration) var(--_step-icon-transition-easing);margin:0 8px 0 0;flex:none}.forge-step .icon-container .icon-content forge-icon{font-size:var(--_step-icon-size)}.forge-step.disabled{color:var(--_step-disabled-text-color);cursor:not-allowed}.forge-step.disabled.forge-step .icon-container .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .title{color:var(--_step-disabled-text-color)}.forge-step.disabled .text-container .subtitle ::slotted(*){color:var(--_step-disabled-text-color)}.forge-step.alternative{flex-direction:column}.forge-step.alternative .icon-container .icon-content{margin:0}.forge-step.alternative .text-container{margin-top:8px;place-items:center}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content{border-color:var(--_step-primary-color)}.forge-step:not(.selected):not(.disabled).editable:not(.completed):not(.error) .icon-content .index,.forge-step:not(.selected):not(.disabled):not(.editable):not(.completed):not(.error) .icon-content .index{color:var(--_step-primary-color)}.forge-step.selected.disabled .icon-content{--_step-icon-fill:var(--_step-disabled-color);--_step-icon-text-color:var(--_step-disabled-text-color)}.forge-step.selected:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.selected:not(.disabled) .title{color:var(--_step-primary-color);font-weight:500}.forge-step.selected:not(.disabled) .subtitle ::slotted(*){color:var(--_step-primary-color);font-weight:500}.forge-step.error:not(.disabled) .title{color:var(--_step-error-color)}.forge-step.error:not(.disabled) .subtitle ::slotted(*){color:var(--_step-error-color)}.forge-step.error:not(.disabled) .icon-container .icon-content{--_step-icon-fill:var(--_step-error-color);--_step-icon-text-color:var(--_step-error-text-color)}.forge-step.completed:not(.disabled):not(.error):not(.editable) .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.completed:not(.disabled):not(.error).editable .icon-content{--_step-icon-fill:var(--_step-icon-fill-active);--_step-icon-text-color:var(--_step-icon-text-color-active)}.forge-step.expandable .expanded-icon{display:inline-block;transition:transform .3s ease-in-out}.forge-step.expandable.expanded .expanded-icon{transform:rotate(180deg)}.forge-step.expandable .icon-container .icon-content{margin:0 16px 0 0}.forge-step .text-container{display:flex;flex-direction:column;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:not(:last-child)[clustered])::after{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:last-child[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}:host(:not(:first-child):not(:last-child)[clustered])::after,:host(:not(:first-child):not(:last-child)[clustered])::before{--_step-line-min-width:var(--_step-line-min-width-clustered)}',Z2=class extends M{static get observedAttributes(){return[k.attributes.COMPLETED,k.attributes.EDITABLE,k.attributes.ERROR,k.attributes.INDEX,k.attributes.SELECTED,k.attributes.ALTERNATIVE,k.attributes.DISABLED,k.attributes.VERTICAL,k.attributes.EXPANDED,k.attributes.IGNORE_USER_EXPANSION]}constructor(){super(),X.define([yl,vl,Il,cl,h0]),H(this,yb,Mb),this._core=new L4(new I4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case k.attributes.INDEX:this.index=K(o);break;case k.attributes.COMPLETED:this.completed=p(o);break;case k.attributes.EDITABLE:this.editable=p(o);break;case k.attributes.ERROR:this.error=p(o);break;case k.attributes.SELECTED:this.selected=p(o);break;case k.attributes.ALTERNATIVE:this.alternative=p(o);break;case k.attributes.DISABLED:this.disabled=p(o);break;case k.attributes.VERTICAL:this.vertical=p(o);break;case k.attributes.EXPANDED:this.expanded=p(o);break;case k.attributes.IGNORE_USER_EXPANSION:this.ignoreUserExpansion=p(o);break}}};i([c()],Z2.prototype,"alternative",2),i([c()],Z2.prototype,"index",2),i([c()],Z2.prototype,"editable",2),i([c()],Z2.prototype,"completed",2),i([c()],Z2.prototype,"error",2),i([c()],Z2.prototype,"selected",2),i([c()],Z2.prototype,"disabled",2),i([c()],Z2.prototype,"vertical",2),i([c()],Z2.prototype,"expanded",2),i([c()],Z2.prototype,"ignoreUserExpansion",2),Z2=i([y({name:k.elementName,dependencies:[j,tt,r1,J]})],Z2);function om(){f(Z2)}var zb=`${b}stepper`,am={STEPPER:"forge-stepper",LINEAR:"linear",ALTERNATIVE:"alternative",CLUSTERED:"clustered",FIXED:"fixed",ALIGN_LEFT:"align-left",ALIGN_CENTER:"align-center",ALIGN_RIGHT:"align-right",VERTICAL:"vertical",FOCUSED:"focused"},Hb={STEPPER:`.${am.STEPPER}`},Ib={SELECTED_INDEX:"selected-index",LINEAR:"linear",ALTERNATIVE:"alternative",LAYOUT_MODE:"layout-mode",LAYOUT_ALIGN:"layout-align",DISABLED:"disabled",VERTICAL:"vertical"},yt={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",ARROW_UP_KEY:"ArrowUp",ARROW_DOWN_KEY:"ArrowDown",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_KEY:"Tab"},Wo={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,HOME_KEYCODE:36,ENTER_KEYCODE:13,SPACE_KEYCODE:32},Lb=[yt.ARROW_LEFT_KEY,yt.ARROW_RIGHT_KEY,yt.ARROW_DOWN_KEY,yt.ARROW_UP_KEY,yt.END_KEY,yt.HOME_KEY,yt.ENTER_KEY,yt.SPACE_KEY,yt.TAB_KEY],Vb={[Wo.ARROW_LEFT_KEYCODE]:yt.ARROW_LEFT_KEY,[Wo.ARROW_RIGHT_KEYCODE]:yt.ARROW_RIGHT_KEY,[Wo.END_KEYCODE]:yt.END_KEY,[Wo.HOME_KEYCODE]:yt.HOME_KEY,[Wo.ENTER_KEYCODE]:yt.ENTER_KEY,[Wo.SPACE_KEYCODE]:yt.SPACE_KEY},F={elementName:zb,classes:am,selectors:Hb,attributes:Ib,numbers:Wo,strings:yt,ACCEPTABLE_KEYS:Lb,KEYCODE_MAP:Vb};var L0=class n{static createStepElement(t,e,o){var s,r;let a=document.createElement(k.elementName);return a.index=e,a.completed=t.completed||!1,a.editable=t.editable||!1,a.selected=o.selectedIndex===e,a.alternative=o.alternative,a.error=t.error||!1,a.disabled=t.disabled||!1,a.vertical=(r=(s=t.vertical)!=null?s:o.vertical)!=null?r:!1,a.ignoreUserExpansion=t.ignoreUserExpansion||!1,a.expanded=t.expanded||!1,o.linear&&e>o.selectedIndex&&(a.tabIndex=-1),a.textContent=t.label,t.optionalLabel&&a.appendChild(this.createStepOptionalLabel(t.optionalLabel)),a}static createStepOptionalLabel(t){let e=document.createElement("span");return e.slot="optional",e.textContent=t||"",e}static setLinearState(t,e){let o=t.classList.contains(F.classes.LINEAR);o&&!e&&(t.classList.remove(F.classes.LINEAR),o=!1),!o&&e&&t.classList.add(F.classes.LINEAR)}static setAlternativeState(t,e){let o=t.classList.contains(F.classes.ALTERNATIVE);o&&!e&&(t.classList.remove(F.classes.ALTERNATIVE),o=!1),!o&&e&&t.classList.add(F.classes.ALTERNATIVE)}static setLayoutMode(t,e){switch(e){case"clustered":t.classList.contains(F.classes.FIXED)&&t.classList.remove(F.classes.FIXED),t.classList.add(F.classes.CLUSTERED);break;case"fixed":t.classList.contains(F.classes.CLUSTERED)&&t.classList.remove(F.classes.CLUSTERED),t.classList.add(F.classes.FIXED);break}}static setLayoutAlign(t,e){switch(t.classList.contains(F.classes.ALIGN_LEFT)&&t.classList.remove(F.classes.ALIGN_LEFT),t.classList.contains(F.classes.ALIGN_CENTER)&&t.classList.remove(F.classes.ALIGN_CENTER),t.classList.contains(F.classes.ALIGN_RIGHT)&&t.classList.remove(F.classes.ALIGN_RIGHT),e){case"left":t.classList.add(F.classes.ALIGN_LEFT);break;case"center":t.classList.add(F.classes.ALIGN_CENTER);break;case"right":t.classList.add(F.classes.ALIGN_RIGHT);break}}static createSteps(t){let e=[];return t.steps.forEach((o,a)=>{let s=n.createStepElement(o,a,t);e.push(s)}),e[0].setAttribute(k.attributes.FIRST,""),e[e.length-1].setAttribute(k.attributes.LAST,""),e}};var V4=class extends I{constructor(t){super(t),this._rootElement=w(t,F.selectors.STEPPER),this._slotElement=this._rootElement.querySelector("slot")}initializeAccessibility(){this._component.hasAttribute("role")||this._component.setAttribute("role","tablist")}patchSafari(){this._applyToSteps(t=>t.setAttribute("safari",""))}addSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}removeSlotChangeListener(t){this._slotElement.addEventListener("slotchange",t)}getLastStep(){let t=this._getSteps();return t.item(t.length-1)}setSelected(t){this._getSteps().forEach(e=>{e===t?e.selected=!0:e.selected=!1})}assignIndices(){this._getSteps().forEach((e,o)=>{e.index=o})}assignFirstLastStep(){let t=this._getSteps();t&&t.length>1&&(t[0].setAttribute("first",""),t[t.length-1].setAttribute("last",""))}setLayoutAlign(t){L0.setLayoutAlign(this._rootElement,t)}setLayoutMode(t){L0.setLayoutMode(this._rootElement,t),this._applyToSteps(e=>e.setAttribute(k.attributes.CLUSTERED,""))}setAlternativeState(t){L0.setAlternativeState(this._rootElement,t),this._applyToSteps(e=>e.alternative=t)}setVertical(t){f2(this._rootElement,t,F.classes.VERTICAL),this._applyToSteps(e=>e.vertical=t)}setLinearState(t){L0.setLinearState(this._rootElement,t)}removeRootListener(t,e){this._rootElement.removeEventListener("click",e)}addRootListener(t,e){this._rootElement.addEventListener(t,e)}setSelectedByIndex(t){this._applyToSteps(e=>{e.selected&&e.index!==t&&(e.selected=!1),e.index===t&&(e.selected=!0)})}applyConfiguredSteps(t){this._component.querySelectorAll(k.elementName).forEach(e=>{this._component.removeChild(e)}),t.forEach(e=>this._component.appendChild(e))}tryGetFocusedStep(){let t;return this._applyToSteps(e=>{e.matches(":focus-within")&&(t=e)}),t}getFocusedOrSelectedStep(){let t=this.tryGetFocusedStep();return t||(t=this._getSteps()[0],t.focus()),t}getStep(t){let e=0,o=this._getSteps();return t<0?o.item(o.length-1):(o.length>t&&(e=t),o.item(e))}toggleDisabled(t){this._applyToSteps(e=>e.disabled=t)}toggleRootClass(t,e){f2(this._rootElement,e,t)}isStepperFocused(){return this._rootElement.classList.contains(F.classes.FOCUSED)}setStepsListener(t,e){this._applyToSteps(o=>o.addEventListener(t,e))}removeStepsListener(t,e){this._applyToSteps(o=>o.removeEventListener(t,e))}_applyToSteps(t){this._getSteps().forEach(t)}_getSteps(){return this._component.querySelectorAll(k.elementName)}};var C4=class{constructor(t){this._adapter=t;this._steps=[];this._selectedIndex=0;this._linear=!1;this._alternative=!1;this._layoutMode="fixed";this._layoutAlign="center";this._initialize=!1;this._clickListener=e=>this._handleClick(e),this._keyListener=e=>this._onKeydown(e),this._stepFocusListener=()=>this._onStepFocus(),this._stepBlurListener=()=>this._onStepBlur(),this._stepExpandedContentFocusInListener=e=>this._onStepExpandedContentFocusIn(e),this._stepExpandedContentFocusOutListener=e=>this._onStepExpandedContentFocusOut(e),this._slotChangeListener=e=>this._onSlotChange(e)}initialize(){this._adapter.initializeAccessibility(),this._adapter.assignIndices(),this._adapter.setLinearState(this._linear),this._adapter.setAlternativeState(this._alternative),this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setLayoutMode(this._layoutMode),this._adapter.addRootListener("click",this._clickListener),this._adapter.addHostListener("keydown",this._keyListener),this._adapter.assignFirstLastStep(),this._adapter.addRootListener(k.events.EXPANDED_CONTENT_FOCUSIN,this._stepExpandedContentFocusInListener),this._adapter.addRootListener(k.events.EXPANDED_CONTENT_FOCUSOUT,this._stepExpandedContentFocusOutListener),this._applySelectedIndex(),this._patchBrowser(),this._adapter.setStepsListener("blur",this._stepBlurListener),this._adapter.setStepsListener("focus",this._stepFocusListener),this._initialize||this._adapter.addSlotChangeListener(this._slotChangeListener),this._initialize=!0}destroy(){this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeHostListener("keydown",this._keyListener),this._adapter.removeSlotChangeListener(this._slotChangeListener),this._adapter.removeStepsListener("blur",this._stepBlurListener),this._adapter.removeStepsListener("focus",this._stepFocusListener)}get steps(){return this._steps.map(t=>d({},t))}set steps(t){if(Array.isArray(t)&&t.length>0)this._steps=[...t.map(e=>d({},e))];else{this._steps=[];return}this._renderConfiguration()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){if(!O(t))t=0;else if(!O2(t)){let e=Number(t);t=isNaN(e)?0:e}this._selectedIndex!==t&&(this._selectedIndex=t,this._adapter.setHostAttribute(F.attributes.SELECTED_INDEX,this._selectedIndex.toString()),this._applySelectedIndex())}get linear(){return this._linear}set linear(t){t=!!t,this._linear!==t&&(this._linear=t,this._adapter.setLinearState(this._linear),this._adapter.setHostAttribute(F.attributes.LINEAR,this._linear.toString()))}get alternative(){return this._alternative}set alternative(t){t=!!t,this._alternative!==t&&(this._alternative=t,this._adapter.setAlternativeState(this._alternative),this._adapter.setHostAttribute(F.attributes.ALTERNATIVE,this._alternative.toString()))}get layoutMode(){return this._layoutMode}set layoutMode(t){/^(fixed|clustered)$/.test(t)&&this._layoutMode!==t&&(this._layoutMode=t,this._adapter.setHostAttribute(F.attributes.LAYOUT_MODE,this._layoutMode),this._adapter.setLayoutMode(this._layoutMode))}get layoutAlign(){return this._layoutAlign}set layoutAlign(t){/^(left|center|right)$/.test(t)&&this._layoutAlign!==t&&(this._layoutAlign=t,this._adapter.setLayoutAlign(this._layoutAlign),this._adapter.setHostAttribute(F.attributes.LAYOUT_ALIGN,this._layoutAlign))}get disabled(){return this._disabled}set disabled(t){t!==this._disabled&&(this._disabled=t,this._applyDisabled())}get vertical(){return this._vertical}set vertical(t){t!==this._vertical&&(this._vertical=t,this._applyVertical(),this._adapter.toggleHostAttribute(F.attributes.VERTICAL,this._vertical))}_applyVertical(){this._adapter.setVertical(this._vertical)}_applyDisabled(){this._disabled?this._adapter.setHostAttribute(F.attributes.DISABLED,"disabled"):this._adapter.removeHostAttribute(F.attributes.DISABLED),this._adapter.toggleDisabled(this._disabled)}_applySelectedIndex(){this._adapter.setSelectedByIndex(this._selectedIndex)}_handleClick(t){if(t.preventDefault(),this._linear)return;let o=C2(t).filter(a=>a.nodeType===Node.ELEMENT_NODE).find(a=>a.matches(k.elementName));o&&!o.selected&&!o.disabled&&this._adapter.emitHostEvent(k.events.SELECT,o.index,!0,!0)&&(this._adapter.setSelected(o),this.selectedIndex=o.index)}_renderConfiguration(){let t=L0.createSteps({steps:this._steps,vertical:this._vertical,selectedIndex:this._selectedIndex,alternative:this._alternative,layoutAlign:this._layoutAlign,layoutMode:this._layoutMode,linear:this._linear});this.destroy(),this._adapter.applyConfiguredSteps(t),this.initialize()}_onKeydown(t){var a;if(this._linear)return;let e=this._getKeyFromEvent(t);if(!this._adapter.isStepperFocused()||!e)return;if([k.strings.HOME_KEY,k.strings.END_KEY,k.strings.ARROW_DOWN_KEY,F.strings.ARROW_UP_KEY,F.strings.ENTER_KEY,F.strings.SPACE_KEY].includes(e)&&t.preventDefault(),[F.strings.ENTER_KEY,F.strings.SPACE_KEY].includes(e)){(a=this._adapter.getFocusedOrSelectedStep())==null||a.click();return}let o=this._vertical?this._determineVerticalMoveTarget(e):this._determineMoveTarget(e);o&&this._moveFocusTo(o)}_moveFocusTo(t){t.focus()}_getKeyFromEvent(t){return F.ACCEPTABLE_KEYS.includes(t.key)?t.key:F.KEYCODE_MAP[t.keyCode]}_determineMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case F.strings.ARROW_RIGHT_KEY:return this._adapter.getStep(e.index+1);case F.strings.ARROW_LEFT_KEY:return this._adapter.getStep(e.index-1);case F.strings.HOME_KEY:return this._adapter.getStep(0);case F.strings.END_KEY:return this._adapter.getLastStep()}return e}_determineVerticalMoveTarget(t){let e=this._adapter.getFocusedOrSelectedStep();if(e)switch(t){case F.strings.ARROW_DOWN_KEY:return this._adapter.getStep(e.index+1);case F.strings.ARROW_UP_KEY:return this._adapter.getStep(e.index-1);case F.strings.HOME_KEY:return this._adapter.getStep(0);case F.strings.END_KEY:return this._adapter.getLastStep()}return e}_onSlotChange(t){this.destroy(),this.initialize()}_onStepExpandedContentFocusIn(t){let e=this._adapter.getStep(t.detail.index+1);e&&(e.tabIndex=0),t.detail.tabIndex=0}_onStepExpandedContentFocusOut(t){let e=t.target,o=this._adapter.getStep(e.index+1);o&&(o.tabIndex=-1),e.tabIndex=-1}_onStepFocus(){this._adapter.toggleRootClass(F.classes.FOCUSED,!0)}_onStepBlur(){this._adapter.toggleRootClass(F.classes.FOCUSED,!1)}_patchBrowser(){new Q2().SAFARI()&&this._adapter.patchSafari()}};var Cb='<template><div class="forge-stepper" part="root"><slot></slot></div></template>',Eb=":host{display:block}:host([hidden]){display:none}:host([vertical]) .forge-stepper{display:unset;align-items:unset;white-space:unset;overflow:unset}.forge-stepper{display:flex;align-items:center;white-space:nowrap;overflow:hidden}.forge-stepper:not(.vertical) ::slotted(*){display:flex;align-items:center;position:relative;min-width:112px}.forge-stepper.fixed ::slotted(*){flex:1}.forge-stepper.alternative{align-items:flex-start}.forge-stepper.alternative ::slotted(*){min-width:160px}.forge-stepper.align-left{justify-content:flex-start}.forge-stepper.align-center{justify-content:center}.forge-stepper.align-right{justify-content:flex-end}",Nt=class extends M{static get observedAttributes(){return[F.attributes.SELECTED_INDEX,F.attributes.LINEAR,F.attributes.ALTERNATIVE,F.attributes.LAYOUT_MODE,F.attributes.LAYOUT_ALIGN,F.attributes.DISABLED,F.attributes.VERTICAL]}constructor(){super(),H(this,Cb,Eb),this._core=new C4(new V4(this))}async connectedCallback(){await Ko(this),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case F.attributes.SELECTED_INDEX:this.selectedIndex=Number(o)||0;break;case F.attributes.LINEAR:this.linear=p(o);break;case F.attributes.ALTERNATIVE:this.alternative=p(o);break;case F.attributes.LAYOUT_MODE:this.layoutMode=o;break;case F.attributes.LAYOUT_ALIGN:this.layoutAlign=o;break;case F.attributes.DISABLED:this.disabled=p(o);break;case F.attributes.VERTICAL:this.vertical=p(o);break}}};i([c()],Nt.prototype,"steps",2),i([c()],Nt.prototype,"selectedIndex",2),i([c()],Nt.prototype,"linear",2),i([c()],Nt.prototype,"alternative",2),i([c()],Nt.prototype,"layoutMode",2),i([c()],Nt.prototype,"layoutAlign",2),i([c()],Nt.prototype,"disabled",2),i([c()],Nt.prototype,"vertical",2),Nt=i([y({name:F.elementName,dependencies:[Z2]})],Nt);function nm(){f(Nt)}var Se=`${b}table`,sm={TABLE:"forge-table",TABLE_DENSE:"forge-table--dense",TABLE_ROOMY:"forge-table--roomy",TABLE_RESIZABLE:"forge-table--resizable",TABLE_RESIZING:"forge-table--resizing",TABLE_RESIZE_HANDLE:"forge-table__resize-handle",TABLE_NO_WRAP_CONTENT:"forge-table--no-wrap-content",TABLE_LAYOUT_FIXED:"forge-table--layout-fixed",TABLE_FILTER_VISIBLE:"forge-table--filter-visible",TABLE_FIXED:"forge-table--fixed",TABLE_HEAD:"forge-table-head",TABLE_HEAD_ROW:"forge-table-head__row",TABLE_HEAD_ROW_FILTER:"forge-table-head__row__filter",TABLE_HEAD_CELL:"forge-table-head__cell",TABLE_HEAD_CELL_CONTAINER:"forge-table-head__cell-container",TABLE_HEAD_CELL_SORTABLE:"forge-table-head__cell--sortable",TABLE_HEAD_CELL_SORT_ICON:"forge-table-head__cell-sort-icon",TABLE_HEAD_CELL_TEXT:"forge-table-head__cell-text",TABLE_HEAD_CELL_SORT_ICON_ACTIVE:"forge-table-head__cell-sort-icon--active",TABLE_HEAD_CELL_SORTED_ASCENDING:"forge-table-head__cell--sorted-ascending",TABLE_HEAD_CELL_SORTED_DESCENDING:"forge-table-head__cell--sorted-descending",TABLE_HEAD_CELL_SORT_ORDER:"forge-table-head__cell__sort-order",TABLE_HEAD_CELL_SORT_ORDER_HIDDEN:"forge-table-head__cell__sort-order--hidden",TABLE_BODY:"forge-table-body",TABLE_BODY_ROW:"forge-table-body__row",TABLE_BODY_ROW_SELECTED:"forge-table-body__row--selected",TABLE_BODY_ROW_CLICKABLE:"forge-table-body__row--clickable",TABLE_BODY_CELL:"forge-table-body__cell",TABLE_ROW:"forge-table-row",TABLE_ROW_EXPANDED:"forge-table-row--expanded",TABLE_ROW_EXPANDABLE_CONTENT:"forge-table-row__expandable-content",TABLE_ROW_EXPANDABLE_CONTENT_CELL:"forge-table-row__expandable-content-cell",TABLE_CELL:"forge-table-cell",TABLE_CELL_SELECT:"forge-table-cell__select",TABLE_CELL_SELECT_CHECKBOX:"forge-table-cell__select-checkbox",TABLE_CELL_SELECT_CHECKBOX_CONTAINER:"forge-table-cell__select-checkbox-container",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT:"forge-table-cell__select-checkbox-container--align-right",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT:"forge-table-cell__select-checkbox-container--align-left",TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER:"forge-table-cell__select-checkbox-container--align-center",TABLE_CELL_CONTAINER:"forge-table-cell__container",TABLE_CELL_CONTAINER_TEXT:"forge-table-cell__container-text",TABLE_CELL_CENTER:"forge-table-cell--center",TABLE_CELL_RIGHT:"forge-table-cell--right",TABLE_CELL_RESIZABLE:"forge-table-cell--resizing"},Bb={TABLE:".forge-table",CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",SELECT_ALL_TEMPLATE_CHECKBOX_INPUT:":is(forge-checkbox,input[type=checkbox]):not([forge-ignore])",ROW_SELECTED:`.${sm.TABLE_BODY_ROW_SELECTED}`},Ab={SELECT:"select",MULTISELECT:"multiselect",SELECT_KEY:"select-key",DENSE:"dense",ROOMY:"roomy",FILTER:"filter",FIXED_HEADERS:"fixed-headers",LAYOUT_TYPE:"layout-type",WRAP_CONTENT:"wrap-content",RESIZABLE:"resizable",MIN_RESIZE_WIDTH:"min-resize-width",ALLOW_ROW_CLICK:"allow-row-click",MULTI_COLUMN_SORT:"multi-column-sort",SELECT_CHECKBOX_ALIGNMENT:"select-checkbox-alignment",TOOLTIP_SELECT:"tooltip-select",TOOLTIP_SELECT_ALL:"tooltip-select-all",CHECKBOX_TYPE:"forge-checkbox-type",CUSTOM_CELL_TEMPLATE:"data-cell-template",CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION:"data-cell-template-stop-propagation",SELECT_CHECKBOX:"forge-table-row-select-checkbox"},Tb={ROW_CLICK:`${Se}-row-click`,SELECT:`${Se}-select`,SELECT_DOUBLE:`${Se}-select-double`,SELECT_ALL:`${Se}-select-all`,SORT:`${Se}-sort`,FILTER:`${Se}-filter`,INITIALIZED:`${Se}-initialized`,COLUMN_RESIZE:`${Se}-column-resize`,BEFORE_BODY_RENDERED:`${Se}-before-body-rendered`,BODY_RENDERED:`${Se}-body-rendered`},Sb={SELECT_ALL:"select-all",SELECT_ROW:"select-row",DEFAULT_LAYOUT_TYPE:"auto"},kb={SORT_DOWN:"arrow_downward"},Ob={DEFAULT_FILTER_DEBOUNCE_TIME:750,MIN_RESIZE_WIDTH:100,RESIZE_HOVER_DURATION:150},_={elementName:Se,classes:sm,selectors:Bb,attributes:Ab,events:Tb,strings:Sb,icons:kb,numbers:Ob};var E4=(o=>(o.Left="left",o.Right="right",o.Center="center",o))(E4||{}),B4=(o=>(o.Ascending="ASC",o.Descending="DESC",o.Unset="UNSET",o))(B4||{}),Db=(r=>(r.InputText="text",r.InputNumber="number",r.Select="select",r.SelectMultiple="select-multiple",r.Date="date",r.DateRange="date-range",r))(Db||{});function rm(n){return n&&typeof n=="object"&&"content"in n}var A1=class n{static createTable(t){n._resetTable(t.tableElement);let e=n._createTableHead(t),o=n._createTableBody(t);t.clickListener&&(n._attachRowClickListeners(o,t.clickListener,t.doubleClickListener),n._addRowClickAttributes(o)),t.fixedHeaders&&n.setFixedHeaders(t),t.resizable&&n.setResizable(t),t.dense&&n.setDenseState(t.tableElement,t.dense),t.wrapContent&&n.setWrapContentState(t.tableElement,t.wrapContent),t.selectListener&&n._addSelectColumn(e,o,t.selectListener,t.selectAllListener,t.selectAllTemplate,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),(t.resizable||t.columnConfigurations.some(a=>!!a.sortable))&&(n._attachHeadRowMouseDownListener(e,t.headRowMouseDownListener),n._isMac()&&n._attachHeadRowContextMenuListener(e,t.headRowContextMenuListener)),n.setLayoutType(t),n._setTableHead(t.tableElement,e),t.filter&&n.setFilterRow(t),n._setTableBody(t.tableElement,o)}static _setTableHead(t,e){t.tHead?s0(e,t.tHead):t.appendChild(e)}static _setTableBody(t,e){t.tBodies.length?s0(e,t.tBodies[0]):t.appendChild(e)}static recreateTableBody(t){let e=n._createTableBody(t);t.clickListener&&(n._attachRowClickListeners(e,t.clickListener,t.doubleClickListener),n._addRowClickAttributes(e)),t.selectListener&&(n._createBodySelectColumn(e,t.selectCheckboxAlignment,t.data,t.tooltipSelect,t.tooltipSelectAll),n._attachRowSelectListeners(e,t.selectListener)),n._setTableBody(t.tableElement,e)}static _resetTable(t){n2(t)}static _createMultisortTooltip(){let t=document.createElement("forge-tooltip");return t.textContent="Ctrl + click to sort multiple columns",t.placement="bottom",t.delay=0,t}static _createTableHead(t){let e=document.createElement("thead"),o=e.insertRow();H1([_.classes.TABLE_ROW,_.classes.TABLE_HEAD_ROW],o);let a=!1;for(let s=0;s<t.columnConfigurations.length;s++){let r=t.columnConfigurations[s],l=document.createElement("th");l.scope="col",H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],l);let h;if(r.sortable?(h=document.createElement("button"),h.type="button",h.addEventListener("keydown",t.sortableHeadCellKeydownListener)):h=document.createElement("div"),h.classList.add(_.classes.TABLE_HEAD_CELL_CONTAINER),t.multiColumnSort){let v=n._createMultisortTooltip();h.appendChild(v)}if(r.align&&n._setCellAlignmentClass(h,r.align),O(r.width)){let v=j4(r.width);v&&(l.style.width=v)}if(t.resizable&&r.resizable!==!1){let v=document.createElement("div");v.classList.add(_.classes.TABLE_RESIZE_HANDLE),l.appendChild(v)}if(O(r.headerCellStyle)&&vt(r.headerCellStyle)&&(Object.assign(l.style,r.headerCellStyle),Object.assign(h.style,r.headerCellStyle)),r.sortable){l.classList.add(_.classes.TABLE_HEAD_CELL_SORTABLE);let v=document.createElement("span");H1([_.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,_.classes.TABLE_HEAD_CELL_SORT_ORDER],v);let m=document.createElement(p1.elementName);m.name=_.icons.SORT_DOWN,H1([_.classes.TABLE_HEAD_CELL_SORT_ICON],m),t.multiColumnSort?typeof r.initialSort=="object"&&r.initialSort.sortOrder&&(v.textContent=r.initialSort.sortOrder.toString(),t.columnConfigurations.filter(u=>typeof u.initialSort=="object").length>1&&ye(_.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN,v),l.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),m.classList.add(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(l,r.initialSort.direction)):t.sortedColumn===s&&!a&&!t.multiColumnSort&&(l.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),m.classList.add(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(l,t.sortDirection),a=!0),h.appendChild(m),h.appendChild(v)}if(typeof r.headerTemplate=="function")Promise.resolve(r.headerTemplate(s,h,r)).then(v=>{if(v){let m=document.createElement("div");H1(_.classes.TABLE_CELL_CONTAINER,m),typeof v=="string"?m.innerHTML=v:n._prepend(v,m),m.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE,""),n._prepend(m,h)}});else{let v=document.createElement("span");v.classList.add(_.classes.TABLE_HEAD_CELL_TEXT),v.textContent=r.header&&typeof r.header=="string"?r.header.trim():"",v.textContent.trim().length===0&&l.setAttribute("aria-hidden","true"),n._prepend(v,h)}l.appendChild(h),o.appendChild(l)}return e}static setSortDirection(t,e,o){let a=n._getHeaderCellByIndex(t,e);t.querySelectorAll("th[aria-sort]").forEach(s=>s.removeAttribute("aria-sort")),n._setColumnSortDirection(a,o)}static _setColumnSortDirection(t,e){t.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&t.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),t.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&t.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING),!e||e==="DESC"?(t.setAttribute("aria-sort","descending"),t.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)):(t.setAttribute("aria-sort","ascending"),t.classList.add(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING))}static _createTableBody(t){let e=document.createElement("tbody");return n._getOrderedRowData(t.columnConfigurations,t.data).forEach((a,s)=>{let r=e.insertRow();H1([_.classes.TABLE_ROW,_.classes.TABLE_BODY_ROW],r),n._populateRowCells(t,r,a,s),typeof t.rowCreatedCallback=="function"&&t.rowCreatedCallback(r,s,d({},t.data[s].data))}),e}static _populateRowCells(t,e,o,a){for(let s=0;s<o.length;s++){let r=t.columnConfigurations[s],l=e.insertCell();if(H1([_.classes.TABLE_CELL,_.classes.TABLE_BODY_CELL],l),O(r.width)){let v=j4(r.width);v&&(l.style.width=v)}let h=document.createElement("div");if(h.classList.add(_.classes.TABLE_CELL_CONTAINER),O(r.cellStyle)&&vt(r.cellStyle)&&(Object.assign(l.style,r.cellStyle),Object.assign(h.style,r.cellStyle)),r.template&&typeof r.template=="function"){let v=t.data[a]?t.data[a].data:void 0;Promise.resolve(r.template(a,h,v,s)).then(m=>{let u=rm(m)?m:{content:m,stopClickPropagation:r.stopCellTemplateClickPropagation};u.content&&(typeof u.content=="string"?h.innerHTML=u.content:h.appendChild(u.content),h.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE,""),u.stopClickPropagation&&h.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION,""))})}else if(r.property){let v=document.createElement("span");v.classList.add(_.classes.TABLE_CELL_CONTAINER_TEXT),h.appendChild(v),r.transform&&typeof r.transform=="function"?Promise.resolve(r.transform(o[s])).then(m=>v.textContent=m):o[s]==null?v.textContent="":v.textContent=o[s].toString()}if(r.align&&n._setCellAlignmentClass(h,r.align),l.appendChild(h),O(r.columnSpan)){if(r.columnSpan==="all"){l.colSpan=o.length-s;break}else if(typeof r.columnSpan=="number"&&r.columnSpan>0){let v=r.columnSpan;r.columnSpan>o.length-s&&(v=o.length),l.colSpan=v,s=s+(v-1)}}typeof t.cellCreatedCallback=="function"&&t.cellCreatedCallback(l,a,s)}}static _setCellAlignmentClass(t,e){switch(e){case"center":t.classList.add(_.classes.TABLE_CELL_CENTER);break;case"right":t.classList.add(_.classes.TABLE_CELL_RIGHT);break}}static _getNonExpandedRows(t){return Array.from(t).filter(e=>!e.classList.contains(_.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _getExpandedRows(t){return Array.from(t).filter(e=>e.classList.contains(_.classes.TABLE_ROW_EXPANDABLE_CONTENT))}static _createColumnDataMap(t,e){return t.map(o=>({config:o,data:e.map(a=>{if(o.property){let s=P3(a.data,o.property);return O(s)?s:null}return null})}))}static _getOrderedRowData(t,e){let o=n._createColumnDataMap(t,e),a=[];for(let s of o)for(let r=0;r<s.data.length;r++)a[r]||(a[r]=[]),a[r].push(s.data[r]);return a}static _attachRowClickListeners(t,e,o){n._getNonExpandedRows(t.rows).forEach(s=>{s.addEventListener("click",e),o&&s.addEventListener("dblclick",o)})}static _addRowClickAttributes(t){n._getNonExpandedRows(t.rows).forEach(o=>{o.classList.add(_.classes.TABLE_BODY_ROW_CLICKABLE)})}static _removeRowClickAttributes(t){n._getNonExpandedRows(t.rows).forEach(o=>{o.classList.remove(_.classes.TABLE_BODY_ROW_CLICKABLE)})}static _attachRowSelectListeners(t,e){n._getNonExpandedRows(t.rows).forEach(a=>n._attachRowSelectListener(a,e))}static _attachRowSelectListener(t,e){let o=n._getCheckboxElement(t);o==null||o.addEventListener("change",e),o==null||o.addEventListener("keydown",e),o==null||o.addEventListener("pointerdown",e)}static _detachRowSelectListeners(t,e){Array.from(t.rows).forEach(o=>{let a=n._getCheckboxElement(o);a==null||a.removeEventListener("change",e),a==null||a.removeEventListener("keydown",e),a==null||a.removeEventListener("pointerdown",e)})}static _detachRowClickListeners(t,e,o){Array.from(t.rows).forEach(a=>{a.removeEventListener("click",e),a.removeEventListener("dblclick",o)})}static _attachSelectAllListener(t,e){let o=t.rows[t.rows.length-1],a=n._getCheckboxElement(o);if(!a)throw new Error("Checkbox element not found.");a.addEventListener("change",e)}static _tryAttachSelectAllTemplateListener(t,e){let o=t.rows[t.rows.length-1],a=n._tryGetSelectAllCheckboxElement(o);a&&a.addEventListener("change",e)}static _detachSelectAllListener(t,e){let o=t.rows[t.rows.length-1],a=n._tryGetSelectAllCheckboxElement(o);a&&a.removeEventListener("change",e)}static _attachHeadRowMouseDownListener(t,e){let o=t.rows[0];if(!o)throw new Error("Missing table header row. Unable to attach sort listener.");o.addEventListener("mousedown",e)}static _attachHeadRowContextMenuListener(t,e){let o=t.rows[0];if(!o)throw new Error("Missing table header row. Unable to attach sort listener.");o.addEventListener("contextmenu",e)}static _createSelectColumn(t,e,o,a,s,r,l,h,v){t&&n._createHeadSelectColumn(t,o,a,s,r,v),e&&n._createBodySelectColumn(e,r,l,h,v)}static _createHeadSelectColumn(t,e,o,a,s,r){var l;if(Array.from(t.rows).forEach(h=>{let v=document.createElement("th");H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],v),h.insertBefore(v,h.cells.item(0))}),e){let h=(l=t.rows.item(t.rows.length-1))==null?void 0:l.cells.item(0);h.classList.add(_.classes.TABLE_CELL_SELECT),typeof o=="function"?n._renderSelectAllTemplate(o,t).then(()=>{typeof a=="function"&&a()}):h==null||h.appendChild(n._createCheckboxElement(!0,s,null,null,null,r))}}static _createBodySelectColumn(t,e,o,a,s){if(n._getNonExpandedRows(t.rows).forEach((l,h)=>n._addRowSelectColumn(l,e,h,o[h],a,s)),t.rows.length){let l=t.rows.item(0);l&&n._updateExpandedRowColspan(t.rows,l.cells.length)}}static _addRowSelectColumn(t,e,o,a,s,r){let l=t.insertCell(0);H1([_.classes.TABLE_CELL,_.classes.TABLE_BODY_CELL,_.classes.TABLE_CELL_SELECT],l),l.appendChild(n._createCheckboxElement(!1,e,o,a,s,r))}static _destroySelectColumn(t,e){let o=n._getNonExpandedRows(e.rows);if(Array.from(t.rows).forEach(a=>a.removeChild(a.cells.item(0))),Array.from(o).forEach(a=>a.removeChild(a.cells.item(0))),e.rows.length){let a=e.rows.item(0);a&&n._updateExpandedRowColspan(e.rows,a.cells.length)}}static _hasSelectColumn(t,e){return[...Array.from(t.rows),...Array.from(e.rows)].some(a=>a.cells.item(0).classList.contains(_.classes.TABLE_CELL_SELECT))}static _createCheckboxElement(t,e,o,a,s,r){let l=document.createElement("div");if(l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER),e)switch(e){case"center":l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_CENTER);break;case"left":l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_LEFT);break;case"right":l.classList.add(_.classes.TABLE_CELL_SELECT_CHECKBOX_CONTAINER_ALIGN_RIGHT);break}let h=document.createElement(T1.elementName);h.setAttribute(_.attributes.SELECT_CHECKBOX,""),l.appendChild(h);let v=m=>{let u=document.createElement("forge-tooltip");return u.placement="left",u.type="label",u.textContent=m,u};if(t)if(typeof r=="string"&&r.length){let u=v(r);l.appendChild(u)}else h.setAttribute("aria-label","Select all rows");else{let m=s||"";if(a&&typeof s=="function"&&(m=s.call(null,o,a.data)),typeof m=="string"&&m.length){let u=v(m);l.appendChild(u)}else h.setAttribute("aria-label","Select row")}return l}static _getCheckboxElement(t){let e=t.querySelector(`.${_.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(_.selectors.CHECKBOX_INPUT):null}static _tryGetSelectAllCheckboxElement(t){let e=t.querySelector(`.${_.classes.TABLE_CELL_SELECT}`);return e?e.querySelector(_.selectors.CHECKBOX_INPUT)||e.querySelector(_.selectors.SELECT_ALL_TEMPLATE_CHECKBOX_INPUT):null}static _setSelectedCheckboxState(t,e){t&&(t.checked=e)}static _setIndeterminateCheckboxState(t,e){t&&(t.indeterminate=e)}static _setRowSelectedState(t,e){e?t.classList.contains(_.classes.TABLE_BODY_ROW_SELECTED)||t.classList.add(_.classes.TABLE_BODY_ROW_SELECTED):t.classList.remove(_.classes.TABLE_BODY_ROW_SELECTED)}static _updateExpandedRowColspan(t,e){n._getExpandedRows(t).forEach(a=>{let s=a.cells.item(0);s&&(s.colSpan=e)})}static updateSelectedState(t,e){n._setRowSelectedState(t,e);let o=n._getCheckboxElement(t);o&&n._setSelectedCheckboxState(o,e)}static getRowByIndex(t,e){return n._getNonExpandedRows(t.tBodies[0].rows)[e]}static updateSelectAllState(t,e,o){if(!t.tHead)return;let a=t.tHead.rows[t.tHead.rows.length-1],s=n._tryGetSelectAllCheckboxElement(a);s&&(n._setSelectedCheckboxState(s,e),n._setIndeterminateCheckboxState(s,!!o))}static setSelectedRows(t,e,o,a,s=!1){if(!t.tBodies.length)return;s||n.clearSelectedRows(t);let r=t.tBodies[0].rows,l=0;a.length&&Array.from(r).forEach((h,v)=>{let m=o[v];if($n(a,xo(e,m))){n._setRowSelectedState(h,!0);let z=n._getCheckboxElement(h);z&&n._setSelectedCheckboxState(z,!0),l++}}),n.updateSelectAllState(t,l>0&&r.length===l)}static clearSelectedRows(t){if(!t.tBodies.length)return;n._getNonExpandedRows(t.tBodies[0].rows).forEach(o=>{n._setRowSelectedState(o,!1);let a=n._getCheckboxElement(o);a&&n._setSelectedCheckboxState(a,!1)})}static setSortedColumn(t,e,o){let a=n._getHeaderCellByIndex(t,e);n._getSortIconElementFromHeaderCell(a).classList.add(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE),n._setColumnSortDirection(a,o)}static setMultiSortColumnSortNumber(t,e,o,a){let l=n._getHeaderCellByIndex(t,o).querySelector(`.${_.classes.TABLE_HEAD_CELL_CONTAINER}`).querySelector(`.${_.classes.TABLE_HEAD_CELL_SORT_ORDER}`);l&&(f2(l,typeof a!="number"||!e,_.classes.TABLE_HEAD_CELL_SORT_ORDER_HIDDEN),a&&(l.textContent=a.toString()))}static removeColumnSort(t,e){let o=n._getHeaderCellByIndex(t,e);o.removeAttribute("aria-sort"),o.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING)&&o.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_ASCENDING),o.classList.contains(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING)&&o.classList.remove(_.classes.TABLE_HEAD_CELL_SORTED_DESCENDING);let a=n._getSortIconElementFromHeaderCell(o);a&&a.classList.contains(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)&&a.classList.remove(_.classes.TABLE_HEAD_CELL_SORT_ICON_ACTIVE)}static _getHeaderCellByIndex(t,e){if(!t.tHead)throw new Error("Table head element cannot be null.");return t.tHead.rows.item(0).cells.item(e)}static _getSortIconElementFromHeaderCell(t){return t.querySelector(`.${_.classes.TABLE_HEAD_CELL_SORT_ICON}`)}static setSelectColumnVisibility(t,e,o,a,s,r,l,h,v){let m=t.tHead,u=t.tBodies[0];!m||!u||(e?n._addSelectColumn(m,u,o,a,s,r,l,h,v):n._hasSelectColumn(m,u)&&(o&&n._detachRowSelectListeners(u,o),a&&n._detachSelectAllListener(m,a),n._destroySelectColumn(m,u)))}static _addSelectColumn(t,e,o,a,s,r,l,h,v){n._createSelectColumn(t,e,!!a,s,()=>{a&&n._tryAttachSelectAllTemplateListener(t,a)},r,l,h,v),o&&n._attachRowSelectListeners(e,o),a&&!s&&n._tryAttachSelectAllTemplateListener(t,a)}static setDenseState(t,e){t.classList.contains(_.classes.TABLE_DENSE)&&t.classList.remove(_.classes.TABLE_DENSE),e&&t.classList.add(_.classes.TABLE_DENSE)}static setRoomyState(t,e){t.classList.contains(_.classes.TABLE_ROOMY)&&t.classList.remove(_.classes.TABLE_ROOMY),e&&t.classList.add(_.classes.TABLE_ROOMY)}static setResizable(t){let e=t.tableElement.tHead;t.resizable?(t.tableElement.classList.add(_.classes.TABLE_RESIZABLE),n._addResizeHandles(e,t)):(t.tableElement.classList.remove(_.classes.TABLE_RESIZABLE),n._removeResizeHandles(e,t))}static _addResizeHandles(t,e){if(!t)return;let o=t.rows.item(0);if(o){let a=Array.from(o.cells);e.selectListener&&(a=a.slice(1));for(let s of a){let r=a.indexOf(s);if(e.columnConfigurations[r].resizable!==!1){let h=document.createElement("div");h.classList.add(_.classes.TABLE_RESIZE_HANDLE),s.appendChild(h)}}}}static _removeResizeHandles(t,e){if(!t)return;let o=t.rows.item(0);if(o){let a=Array.from(o.cells);e.selectListener&&(a=a.slice(1));for(let s of a){let r=document.querySelector(`.${_.classes.TABLE_RESIZE_HANDLE}`);r&&s.removeChild(r)}}}static setWrapContentState(t,e){e?t.classList.remove(_.classes.TABLE_NO_WRAP_CONTENT):t.classList.add(_.classes.TABLE_NO_WRAP_CONTENT)}static setSelectAllVisibility(t,e,o,a,s,r){let l=t.tHead;if(!l)return;!e&&o&&n._detachSelectAllListener(l,o);let v=l.rows[l.rows.length-1].cells.item(0);e?v.childElementCount||(v.classList.add(_.classes.TABLE_CELL_SELECT),a?n._renderSelectAllTemplate(a,l).then(()=>{o&&n._tryAttachSelectAllTemplateListener(l,o)}):v.appendChild(n._createCheckboxElement(!0,s||null,null,null,null,r)),o&&!a&&n._attachSelectAllListener(l,o)):(o&&n._detachSelectAllListener(l,o),n2(v))}static setFilterRow(t){if(!t.tableElement.tHead)return;let e=n._getFilterRowElement(t.tableElement.tHead),o;if(t.filter?t.tableElement.classList.add(_.classes.TABLE_FILTER_VISIBLE):t.tableElement.classList.remove(_.classes.TABLE_FILTER_VISIBLE),t.filter&&!e){if(t.columnConfigurations.every(s=>!s.filter))return;t.selectListener&&t.selectAllListener&&(o=t.tableElement.tHead.rows[t.tableElement.tHead.rows.length-1].cells.item(0));let a=n._createFilterRowElement(t);a&&o&&Array.from(o.children).forEach(s=>{var r;(r=a.cells.item(0))==null||r.appendChild(s)})}else if(!t.filter&&e){if(t.selectListener&&t.selectAllListener){o=e.cells.item(0);let a=Array.from(t.tableElement.tHead.rows).indexOf(e)-1,s=t.tableElement.tHead.rows.item(a);s&&Array.from(o.children).forEach(r=>{var l;(l=s.cells.item(0))==null||l.appendChild(r)})}Fe(e)}}static _createFilterRowElement(t){if(!t.tableElement.tHead)throw new Error("Table head element cannot be null.");let e=t.tableElement.tHead.insertRow();if(H1([_.classes.TABLE_ROW,_.classes.TABLE_HEAD_ROW_FILTER],e),t.selectListener){let o=document.createElement("th");H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],o),e.insertBefore(o,e.cells[0]),o.classList.add(_.classes.TABLE_CELL_SELECT)}return t.columnConfigurations.forEach((o,a)=>{let s=document.createElement("th");if(H1([_.classes.TABLE_CELL,_.classes.TABLE_HEAD_CELL],s),o.filter&&O(o.filterDelegate)){let r=document.createElement("div");r.classList.add(_.classes.TABLE_HEAD_CELL_CONTAINER),o.align&&n._setCellAlignmentClass(r,o.align);let l=n._createFilterElement(o,a,t.filterListener);r.appendChild(l),s.appendChild(r)}e.appendChild(s)}),e}static _createFilterElement(t,e,o){let a;if(n0(t.filterDelegate))a=t.filterDelegate();else if(t.filterDelegate instanceof o2||t.filterDelegate instanceof Z1)a=t.filterDelegate;else throw new Error("Invalid filter delegate.");if(o&&a instanceof o2&&n0(a.onChange))if(!O(t.filterDebounceTime)||O2(t.filterDebounceTime)){let s=O(t.filterDebounceTime)?t.filterDebounceTime:_.numbers.DEFAULT_FILTER_DEBOUNCE_TIME;a.onChange(Ne(r=>o(r,e),s))}else a.onChange(s=>o(s,e));return a.element}static _getFilterRowElement(t){if(t)return Array.from(t.rows).find(e=>e.classList.contains(_.classes.TABLE_HEAD_ROW_FILTER))}static async expandRow(t,e,o){let a=t.tableElement.tBodies[0],r=n._getNonExpandedRows(a.rows)[e];r.classList.add(_.classes.TABLE_ROW_EXPANDED);let l=Array.from(a.rows).indexOf(r),h=a.insertRow(l+1);H1([_.classes.TABLE_ROW,_.classes.TABLE_BODY_ROW,_.classes.TABLE_ROW_EXPANDABLE_CONTENT],h);let v=h.insertCell();v.setAttribute("colspan",r.cells.length.toString()),v.classList.add(_.classes.TABLE_ROW_EXPANDABLE_CONTENT_CELL);let m=document.createElement("div"),u=document.createElement(D1.elementName);u.appendChild(m),v.appendChild(u);let z=o;if(n0(o)){let x=t.data[e]?t.data[e].data:void 0,C=o(e,m,x);try{let E=await Promise.resolve(C);z=rm(E)?E.content:E}catch(E){console.error("Failed to load row template "+E.message),z=""}}z&&n._setRowTemplate(m,z),window.requestAnimationFrame(()=>u.open=!0)}static _setRowTemplate(t,e){Ut(e)?t.innerHTML=e:t.appendChild(e)}static collapseRow(t,e){if(!t.tableElement||!t.tableElement.tBodies.length||!t.tableElement.tBodies[0].rows.length)return Promise.resolve();let o=t.tableElement.tBodies[0],s=n._getNonExpandedRows(o.rows)[e],r=Array.from(o.rows).indexOf(s);if(s&&s.classList.contains(_.classes.TABLE_ROW_EXPANDED)){let l=o.rows[r+1],h=l.querySelector(D1.elementName);if(h&&h.open){let v=new Promise(m=>{h.addEventListener(D1.events.ANIMATION_COMPLETE,()=>{s.classList.remove(_.classes.TABLE_ROW_EXPANDED),Fe(l),m()},{once:!0})});return h.open=!1,v}}return Promise.resolve()}static isRowExpanded(t,e){let o=t.tableElement.tBodies[0],s=n._getNonExpandedRows(o.rows)[e];return s&&s.classList.contains(_.classes.TABLE_ROW_EXPANDED)}static setFixedHeaders(t){t.fixedHeaders?t.tableElement.classList.add(_.classes.TABLE_FIXED):t.tableElement.classList.remove(_.classes.TABLE_FIXED)}static setLayoutType(t){t.layoutType==="fixed"?t.tableElement.classList.add(_.classes.TABLE_LAYOUT_FIXED):t.tableElement.classList.remove(_.classes.TABLE_LAYOUT_FIXED)}static normalizeColumnWidths(t){let e=t.tableElement;if(e.tHead&&e.tHead.rows.length){let o=Array.from(e.tHead.rows[0].cells);for(let a of o){let s=getComputedStyle(a).width;a.style.width&&a.style.width!==s&&(a.style.width=s)}}}static setColumnResizeIndicatorVisibility(t,e,o){let a=t.tableElement;if(a.tHead&&a.tHead.rows.length){let s=Array.from(a.tHead.rows);for(let r of s){let l=r.cells[e];l&&(o?l.classList.add(_.classes.TABLE_CELL_RESIZABLE):l.classList.remove(_.classes.TABLE_CELL_RESIZABLE))}}if(a.tBodies.length){let s=Array.from(a.tBodies[0].rows);for(let r of s){let l=r.cells[e];l&&(o?l.classList.add(_.classes.TABLE_CELL_RESIZABLE):l.classList.remove(_.classes.TABLE_CELL_RESIZABLE))}}}static setRowClickListeners(t,e,o,a){let s=t.tBodies[0];s&&(e?n._attachRowClickListeners(s,o,a):n._detachRowClickListeners(s,o,a))}static setRowClickAttributes(t,e){let o=t.tBodies[0];o&&(e?n._addRowClickAttributes(o):n._removeRowClickAttributes(o))}static getOwnerDocument(t){return t.ownerDocument||document}static _prepend(t,e){let o=e.childNodes.item(0);o?e.insertBefore(t,o):e.appendChild(t)}static _isMac(){return!!(navigator&&navigator.platform&&navigator.platform.substr(0,3)==="Mac")}static _renderSelectAllTemplate(t,e){return Promise.resolve(t()).then(o=>{let a=e.rows.item(e.rows.length-1);if(!a)return;let s=a.cells.item(0);o&&s&&(typeof o=="string"?s.innerHTML=o:o instanceof HTMLElement&&s.appendChild(o),s.setAttribute(_.attributes.CUSTOM_CELL_TEMPLATE,""))})}};var A4=class extends I{constructor(t){super(t)}initialize(){this._tableElement||(this._tableElement=document.createElement("table"),this._tableElement.classList.add(_.classes.TABLE),this._component.children.length&&n2(this._component),this._component.appendChild(this._tableElement))}getTableElement(){return this._tableElement||this.initialize(),this._tableElement}createTable(t){return A1.createTable(t)}recreateTableBody(t){A1.recreateTableBody(t)}setSelectedRows(t,e,o,a,s=!1){A1.setSelectedRows(t,e,o,a,s)}clearSelectedRows(t){A1.clearSelectedRows(t)}updateSelectedState(t,e){A1.updateSelectedState(t,e)}updateSelectAllState(t,e,o){A1.updateSelectAllState(t,e,o)}setSortedColumn(t,e,o){A1.setSortedColumn(t,e,o)}removeColumnSort(t,e){A1.removeColumnSort(t,e)}setSortDirection(t,e,o){A1.setSortDirection(t,e,o)}setSelectColumnVisibility(t,e,o,a,s,r,l,h,v){A1.setSelectColumnVisibility(t,e,o,a||null,s||null,r||null,l||[],h||null,v||null)}setDense(t,e){A1.setDenseState(t,e)}setRoomy(t,e){A1.setRoomyState(t,e)}setResizable(t){A1.setResizable(t)}setSelectAllVisibility(t,e,o,a,s,r=null){A1.setSelectAllVisibility(t,e,o,a,s||null,r||null)}setFilterRow(t){A1.setFilterRow(t)}expandRow(t,e,o){return A1.expandRow(t,e,o)}collapseRow(t,e){return A1.collapseRow(t,e)}isRowExpanded(t,e){return A1.isRowExpanded(t,e)}setFixedHeaders(t){A1.setFixedHeaders(t)}setTableLayoutType(t){A1.setLayoutType(t)}setWrapContentState(t){A1.setWrapContentState(t.tableElement,t.wrapContent)}addDocumentListener(t,e){A1.getOwnerDocument(this._component).addEventListener(t,e)}removeDocumentListener(t,e){A1.getOwnerDocument(this._component).removeEventListener(t,e)}normalizeColumnWidths(t){A1.normalizeColumnWidths(t)}setResizeColumnVisibility(t,e,o){A1.setColumnResizeIndicatorVisibility(t,e,o)}addTableClass(t){H1(t,this._tableElement)}removeTableClass(t){ye(t,this._tableElement)}setRowClickListeners(t,e,o,a){A1.setRowClickListeners(t,e,o,a)}setRowClickAttributes(t,e){A1.setRowClickAttributes(t,e)}};var T4=class{constructor(){this._sortedColumns=[]}get sortedColumns(){return[...this._sortedColumns.map(t=>d({},t))]}addSortColumn(t){this._sortedColumns.push(d({},t)),this._updateSortNumbers()}updateSortColumn(t){let e=this._sortedColumns.find(o=>o.columnIndex===t.columnIndex);if(e)switch(e.direction){case"ASC":this.removeSortColumn(t);break;case"DESC":e.direction="ASC";break;case"UNSET":e.direction="DESC";break}}setSortColumns(t){this._sortedColumns=[...t.map(e=>d({},e))]}removeSortColumn(t){typeof t=="number"?this._sortedColumns.splice(t,1):this._sortedColumns.splice(this._sortedColumns.indexOf(t),1),this._updateSortNumbers()}isSortColumn(t){return typeof t=="number"?this._sortedColumns.some(e=>e.columnIndex===t):this._sortedColumns.includes(t)}clearMultiSort(){this._sortedColumns=[]}getSortColumn(t){return this._sortedColumns.find(e=>e.columnIndex===t)}_updateSortNumbers(){this._sortedColumns.every(t=>typeof t.sortOrder=="number")&&this._sortedColumns.sort((t,e)=>t.sortOrder-e.sortOrder),this._sortedColumns.forEach((t,e)=>t.sortOrder=e+1)}};var S4=class{constructor(t,e=!1){this.data=t;this.selected=e}};var k4=class{constructor(t){this._adapter=t;this._tableRows=[];this._data=[];this._columnConfigurations=[];this._select=!1;this._multiselect=!0;this._dense=!1;this._roomy=!1;this._filter=!1;this._fixedHeaders=!1;this._layoutType=_.strings.DEFAULT_LAYOUT_TYPE;this._wrapContent=!0;this._resizable=!1;this._minResizeWidth=_.numbers.MIN_RESIZE_WIDTH;this._multiColumnSort=!1;this._selectCheckboxAlignment="center";this._isAllSelected=!1;this._sortedColumnIndex=-1;this._rendered=!1;this._allowRowClick=!1;this._multiSortManager=new T4;this._rowClickListener=e=>this._onRowClick(e),this._rowDoubleClickListener=e=>this._onRowDoubleClick(e),this._selectRowListener=e=>this._onRowSelected(e),this._selectAllListener=e=>this._onSelectAll(e),this._sortableHeadCellKeydownListener=e=>this._onSortableHeadCellKeydown(e),this._headRowMouseDownListener=e=>this._onHeadRowMouseDown(e),this._headRowContextMenuListener=e=>this._onHeadRowContextMenu(e),this._documentMouseMoveListener=e=>this._onMouseMove(e),this._documentMouseUpListener=e=>this._onMouseUp(e),this._filterListener=(e,o)=>this._onFilter(e,o),this._selectionManager=new $a(this._selectKey),this._hiddenColumnManager=new $a}initialize(){this._adapter.initialize(),this._adapter.setHostAttribute(_.attributes.SELECT,this._select.toString()),this._adapter.setHostAttribute(_.attributes.MULTISELECT,this._multiselect.toString()),this._adapter.setHostAttribute(_.attributes.DENSE,this._dense.toString()),this._adapter.setHostAttribute(_.attributes.ROOMY,this._roomy.toString()),this._adapter.setHostAttribute(_.attributes.FILTER,this._filter.toString()),this._adapter.emitHostEvent(_.events.INITIALIZED,void 0,!1)}destroy(){this._resizeDescriptor=void 0,this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener)}set data(t){Array.isArray(t)&&t.length>0?vt(t[0])?this._data=t.map(e=>d({},e)):this._data=[...t]:this._data=[],this._tableRows=this._data.map(e=>new S4(e,this._selectionManager.exists(e))),this._renderBody()}get data(){return this._data.map(t=>d({},t))}set columnConfigurations(t){this._columnConfigurations=t.map(e=>d({},e)),this._hiddenColumnManager.clear(),this._columnConfigurations.forEach(e=>{e.hidden&&this._hiddenColumnManager.add(e)}),this._refreshTableSort(),this.render()}get columnConfigurations(){return this._columnConfigurations.map(t=>d({},t))}get _visibleColumnConfigurations(){return this._columnConfigurations.filter(t=>!this._hiddenColumnManager.exists(t))}get _tableConfiguration(){return{tableElement:this._adapter.getTableElement(),columnConfigurations:this._visibleColumnConfigurations,data:this._tableRows,clickListener:this._allowRowClick?this._rowClickListener:null,doubleClickListener:this._allowRowClick?this._rowDoubleClickListener:null,selectListener:this._select?this._selectRowListener:null,selectAllListener:this._multiselect?this._selectAllListener:null,sortableHeadCellKeydownListener:this._sortableHeadCellKeydownListener,headRowMouseDownListener:this._headRowMouseDownListener,headRowContextMenuListener:this._headRowContextMenuListener,filterListener:this._filter?this._filterListener:null,sortDirection:this._sortDirection,sortedColumn:this._sortedColumnIndex,multiColumnSort:this._multiColumnSort,filter:this._filter,wrapContent:this._wrapContent,fixedHeaders:this._fixedHeaders,layoutType:this._layoutType,dense:this._dense,resizable:this._resizable,rowCreatedCallback:this._rowCreatedCallback,cellCreatedCallback:this._cellCreatedCallback,selectAllTemplate:this._selectAllTemplate,selectCheckboxAlignment:this._selectCheckboxAlignment,tooltipSelect:this._tooltipSelect,tooltipSelectAll:this._tooltipSelectAll}}set select(t){this._select!==t&&(this._select=t,this._adapter.setSelectColumnVisibility(this._adapter.getTableElement(),this._select,this._selectRowListener,this._multiselect?this._selectAllListener:void 0,this._multiselect?this._selectAllTemplate:null,this._selectCheckboxAlignment,this._tableRows,this._tooltipSelect,this._tooltipSelectAll),this._updateSelections(!0),this._select?this._adapter.setHostAttribute(_.attributes.SELECT,this._select.toString()):this._adapter.removeHostAttribute(_.attributes.SELECT))}get select(){return this._select}set multiselect(t){this._multiselect!==t&&(this._multiselect=t,this._select&&(this._adapter.setSelectAllVisibility(this._adapter.getTableElement(),this._multiselect,this._multiselect?this._selectAllListener:null,this._multiselect?this.selectAllTemplate:null,this._selectCheckboxAlignment,this._tooltipSelectAll),this._updateSelections(!0)),this._adapter.setHostAttribute(_.attributes.MULTISELECT,this._multiselect.toString()))}get multiselect(){return this._multiselect}get selectKey(){return Array.isArray(this._selectKey)?[...this._selectKey]:this._selectKey}set selectKey(t){this._originalSelectKey!==t&&(Array.isArray(t)?(this._originalSelectKey=[...t],this._selectKey=[...t]):(this._originalSelectKey=t,this._selectKey=[t]),this._selectionManager.setKey(this._selectKey),this._updateSelections(!1))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._adapter.getTableElement(),this._dense),this._adapter.setHostAttribute(_.attributes.DENSE,this._dense.toString()))}get roomy(){return this._roomy}set roomy(t){t!==this._roomy&&(this._roomy=t,this._applyRoomy())}set filter(t){this._filter!==t&&(this._filter=t,this._adapter.setFilterRow(this._tableConfiguration),this._adapter.setHostAttribute(_.attributes.FILTER,this._filter.toString()))}get filter(){return this._filter}set fixedHeaders(t){this._fixedHeaders!==t&&(this._fixedHeaders=t,this._adapter.setFixedHeaders(this._tableConfiguration))}get fixedHeaders(){return this._fixedHeaders}get layoutType(){return this._layoutType}set layoutType(t){this._layoutType!==t&&(this._layoutType=t,this._adapter.setTableLayoutType(this._tableConfiguration))}get wrapContent(){return this._wrapContent}set wrapContent(t){this._wrapContent!==t&&(this._wrapContent=t,this._adapter.setWrapContentState(this._tableConfiguration))}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._adapter.setResizable(this._tableConfiguration))}get minResizeWidth(){return this._minResizeWidth}set minResizeWidth(t){this._minResizeWidth!==t&&(this._minResizeWidth=t,O2(this._minResizeWidth)?this._minResizeWidth<0&&(this._minResizeWidth=0):this._minResizeWidth=_.numbers.MIN_RESIZE_WIDTH)}get allowRowClick(){return this._allowRowClick}set allowRowClick(t){this._allowRowClick!==t&&(this._allowRowClick=t,this._rendered&&(this._adapter.setRowClickListeners(this._adapter.getTableElement(),this._allowRowClick,this._rowClickListener,this._rowDoubleClickListener),this._adapter.setRowClickAttributes(this._adapter.getTableElement(),this._allowRowClick)))}get multiColumnSort(){return this._multiColumnSort}set multiColumnSort(t){t!==this._multiColumnSort&&(this._multiColumnSort=t,this._refreshTableSort(),this.render())}get selectCheckboxAlignment(){return this._selectCheckboxAlignment}set selectCheckboxAlignment(t){t!==this._selectCheckboxAlignment&&(this._selectCheckboxAlignment=t,this._adapter.setHostAttribute(_.attributes.SELECT_CHECKBOX_ALIGNMENT,t),this.render())}get tooltipSelect(){return this._tooltipSelect}set tooltipSelect(t){t!==this._tooltipSelect&&(this._tooltipSelect=t,typeof t=="string"&&this._adapter.setHostAttribute(_.attributes.TOOLTIP_SELECT,t),this.render())}get tooltipSelectAll(){return this._tooltipSelectAll}set tooltipSelectAll(t){t!==this._tooltipSelectAll&&(this._tooltipSelectAll=t,this._adapter.setHostAttribute(_.attributes.TOOLTIP_SELECT_ALL,t),this.render())}get selectAllTemplate(){return this._selectAllTemplate}set selectAllTemplate(t){t!==this._selectAllTemplate&&(this._selectAllTemplate=t,this.render())}get rowCreated(){return this._rowCreatedCallback}set rowCreated(t){this._rowCreatedCallback=t}get cellCreated(){return this._cellCreatedCallback}set cellCreated(t){this._cellCreatedCallback=t}isRowSelected(t){let e=xo(Array.isArray(this._selectKey)?this._selectKey:[this._selectKey],t);return this.selectKey?!!this._selectionManager.getItems().find(o=>Xn(o,e)):this._selectionManager.exists(t)}getSelectedRows(){return this._selectionManager.getItems()}selectRows(t,e){if(!this._selectKey)throw new Error("You must set a selectKey to select rows.");(!this._multiselect||e)&&this.clearSelections(),t&&t.length&&(this._selectionManager.add(t),this._updateSelections(!e))}deselectRows(t){t&&t.length&&(this._selectionManager.remove(t),this._updateSelections(!1))}clearSelections(){let t=this._adapter.getTableElement();this._selectionManager.clear(),this._tableRows.forEach(e=>e.selected=!1),this._isAllSelected=!1,this._adapter.clearSelectedRows(t),this._select&&this._multiselect&&this._adapter.updateSelectAllState(t,!1)}hideColumn(t){let e=this._columnConfigurations[t];this._sortedColumnIndex===t&&(this._sortedColumnIndex=-1),this._hiddenColumnManager.exists(e)||(this._hiddenColumnManager.add(e),this.render())}showColumn(t){let e=this._columnConfigurations[t];this._hiddenColumnManager.exists(e)&&(this._hiddenColumnManager.remove(e),this.render())}isColumnHidden(t){let e=this._columnConfigurations[t];return!!e&&this._hiddenColumnManager.exists(e)}render(){this._adapter.emitHostEvent(_.events.BEFORE_BODY_RENDERED,void 0,!1),this._adapter.createTable(this._tableConfiguration),this._renderSelections(),this._rendered=!0,this._adapter.emitHostEvent(_.events.BODY_RENDERED,void 0,!1)}_renderBody(){this._rendered&&(this._adapter.emitHostEvent(_.events.BEFORE_BODY_RENDERED,void 0,!1),this._adapter.recreateTableBody(this._tableConfiguration),this._renderSelections(),this._adapter.emitHostEvent(_.events.BODY_RENDERED,void 0,!1))}_renderSelections(){this.select&&(this._isAllSelected=this._getSelectAllState(),this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)));let t=this._selectionManager.getItems();t.length&&this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,t,!1)}expandRow(t,e){if(!this._rendered)throw new Error("Cannot expand a row before the table has rendered.");if(t<0||t>this._tableRows.length)throw new Error(`Invalid row index: ${t}.`);return this._adapter.expandRow(this._tableConfiguration,t,e)}collapseRow(t){return!this._rendered||t<0||t>this._tableRows.length?Promise.resolve():this._adapter.collapseRow(this._tableConfiguration,t)}isRowExpanded(t){return this._adapter.isRowExpanded(this._tableConfiguration,t)}selectRowsByIndex(t,e){let o=t.map(a=>this._data[a]).filter(a=>!!a);this.selectRows(o,!e)}deselectRowsByIndex(t){let e=t.map(o=>this._data[o]).filter(o=>!!o);this.deselectRows(e)}_getSelectAllState(){return this._tableRows.length>0&&this._tableRows.every(t=>t.selected)}_updateSelections(t){this._tableRows.forEach(o=>o.selected=this._selectionManager.exists(o.data));let e=this._getSelectAllState();this._adapter.setSelectedRows(this._adapter.getTableElement(),this._selectKey,this._data,this._selectionManager.getItems(),t),(e!==this._isAllSelected||this._isIndeterminate(e))&&(this._isAllSelected=e,this._multiselect&&this._adapter.updateSelectAllState(this._adapter.getTableElement(),this._isAllSelected,this._isIndeterminate(this._isAllSelected)))}_onRowClick(t){if(t.stopImmediatePropagation(),t.target.matches(`[${_.attributes.SELECT_CHECKBOX}]`))return;let a=C2(t).filter(v=>v.nodeType===1).find(v=>v.hasAttribute(_.attributes.CUSTOM_CELL_TEMPLATE));if(a&&a.hasAttribute(_.attributes.CUSTOM_CELL_TEMPLATE_STOP_PROPAGATION))return;let{index:r,data:l}=this._getSelectedRowFromEvent(t),h={index:r,data:l};this._adapter.emitHostEvent(_.events.ROW_CLICK,h,!0,!1)}_onRowDoubleClick(t){if(t.stopPropagation(),t.target.matches(`[${_.attributes.SELECT_CHECKBOX}]`))return;let e=this._getSelectedRowFromEvent(t),o={index:e.index,data:e.data};this._adapter.emitHostEvent(_.events.SELECT_DOUBLE,o,!0,!1)}_onRowSelected(t){var r;if(t.type==="change"){t.preventDefault();return}if(t.type==="keydown"&&t.key!==" ")return;let e=this._getSelectedRowFromEvent(t);this._multiselect||this._tableRows.filter(h=>h.selected).forEach(h=>{Xn(h.data,xo(this._selectKey,e.data))||this.deselectRows([h.data])});let o=!this._selectionManager.exists(e.data);this._adapter.updateSelectedState(e.rowElement,o),o?this._selectionManager.add(e.data):this._selectionManager.remove(e.data),this._tableRows[e.index].selected=o;let a=[e.index],s=!1;if(this._multiselect){if(t.shiftKey&&this._previouslyClickedRow&&((r=document.getSelection())==null||r.removeAllRanges(),a=this._shiftSelectRows(e),a.includes(this._previouslyClickedRow.index))){let h=a.indexOf(this._previouslyClickedRow.index);a.splice(h,1)}s=this._getSelectAllState(),this._adapter.updateSelectAllState(this._adapter.getTableElement(),s,this._isIndeterminate(s))}for(let l of a){let h=this._tableRows[l].data,m={selected:this._selectionManager.exists(h),index:l,data:h};this._adapter.emitHostEvent(_.events.SELECT,m,!0,!1)}if(this._isAllSelected!==s){this._isAllSelected=s;let l={status:this._isAllSelected,count:this._tableRows.filter(h=>h.selected).length,data:[...this._data],targetType:"row"};this._adapter.emitHostEvent(_.events.SELECT_ALL,l,!0,!1)}this._previouslyClickedRow=d({},e)}_getSelectedRowFromEvent(t){let o=C2(t).find(l=>l.tagName==="TR"),a=o.parentElement,s=this._getNonExpandedRows(a).findIndex(l=>l===o),r=this._tableRows[s].data;return{rowElement:o,index:s,data:r}}_getNonExpandedRows(t){return Array.from(t.rows).filter(e=>!e.classList.contains(_.classes.TABLE_ROW_EXPANDABLE_CONTENT))}_onSelectAll(t){t.stopPropagation(),this._isAllSelected=!this._isAllSelected;let e=this._adapter.getTableElement();this._adapter.updateSelectAllState(e,this._isAllSelected),this._tableRows.forEach((a,s)=>{a.selected=this._isAllSelected,this._isAllSelected?this._selectionManager.add(a.data):this._selectionManager.remove(a.data);let r=A1.getRowByIndex(e,s);r&&this._adapter.updateSelectedState(r,this._isAllSelected)});let o={status:this._isAllSelected,count:this._tableRows.filter(a=>a.selected).length,data:[...this._data],targetType:"select-all"};this._adapter.emitHostEvent(_.events.SELECT_ALL,o,!0,!1)}_onHeadRowContextMenu(t){t.ctrlKey&&t.preventDefault()}_onHeadRowMouseDown(t){if(t.button!==0)return;let e=C2(t),o=t.target,a=e.find(l=>l.tagName==="TR"),s=e.find(l=>l.tagName==="TH"),r=Array.from(a.cells).findIndex(l=>l===s);this._headCellMouseDownIndex=r,o!==s&&o.classList.contains(_.classes.TABLE_RESIZE_HANDLE)&&(this._resizeDescriptor={element:s,startWidth:s.offsetWidth,startX:t.pageX,width:s.offsetWidth,index:this._select?r-1:r},this._adapter.addDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.setResizeColumnVisibility(this._tableConfiguration,r,!0)),this._adapter.addDocumentListener("mouseup",this._documentMouseUpListener)}_onMouseMove(t){if(this._resizeDescriptor){let e=this._resizeDescriptor.startWidth+(t.pageX-this._resizeDescriptor.startX);e<this._minResizeWidth&&(e=this._minResizeWidth),this._resizeDescriptor.width=e,this._resizeDescriptor.element.style.width=`${e}px`,this._adapter.addTableClass(_.classes.TABLE_RESIZING)}}_onMouseUp(t){if(this._adapter.removeDocumentListener("mousemove",this._documentMouseMoveListener),this._adapter.removeDocumentListener("mouseup",this._documentMouseUpListener),this._adapter.removeTableClass(_.classes.TABLE_RESIZING),this._headCellMouseDownIndex!==void 0){if(this._resizeDescriptor){this._adapter.normalizeColumnWidths(this._tableConfiguration),this._adapter.setResizeColumnVisibility(this._tableConfiguration,this._headCellMouseDownIndex,!1);let e={index:this._resizeDescriptor.index,width:this._resizeDescriptor.width};this._adapter.emitHostEvent(_.events.COLUMN_RESIZE,e),this._resizeDescriptor=void 0}else this._tableConfiguration.tableElement.tHead.contains(t.target)&&(this._multiColumnSort?this._onMultiSort(this._headCellMouseDownIndex,t.ctrlKey):this._onSort(this._headCellMouseDownIndex));this._headCellMouseDownIndex=void 0}}_onSortableHeadCellKeydown(t){if(t.key===" "||t.key==="Enter"){let e=C2(t),o=e.find(r=>r.tagName==="TR"),a=e.find(r=>r.tagName==="TH"),s=Array.from(o.cells).findIndex(r=>r===a);this._onSort(s)}}_onSort(t){let e=this._select?t-1:t,o=e>=0?this._visibleColumnConfigurations[e]:null;if(!o||!o.sortable)return;let a="ASC",s=e===this._sortedColumnIndex,r=this._sortDirection==="ASC"||this._sortDirection===void 0,l=s&&this._sortDirection==="DESC";s&&r&&(a="DESC"),l&&!o.preventUnsort&&(a="UNSET");let h={direction:a,columnIndex:e};if(this._adapter.emitHostEvent(_.events.SORT,h,!0,!0)){if(s&&this._sortDirection==="DESC"&&!o.preventUnsort){this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=-1;return}this._sortDirection=a,e===this._sortedColumnIndex?this._adapter.setSortDirection(this._adapter.getTableElement(),t,this._sortDirection):(this._sortedColumnIndex>=0&&this._adapter.removeColumnSort(this._adapter.getTableElement(),this._select?this._sortedColumnIndex+1:this._sortedColumnIndex),this._sortedColumnIndex=e,this._adapter.setSortedColumn(this._adapter.getTableElement(),t,this._sortDirection))}}_onMultiSort(t,e){let o=this._select?t-1:t,a=o>=0?this._visibleColumnConfigurations[o]:null;if(!a||!a.sortable)return;let s=this._multiSortManager.sortedColumns,r=this._multiSortManager.getSortColumn(o);r?this._multiSortManager.updateSortColumn(r):e?this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:o,propertyName:a.property}):(this._multiSortManager.clearMultiSort(),this._multiSortManager.addSortColumn({direction:"DESC",columnIndex:o,propertyName:a.property}));let l=this._multiSortManager.sortedColumns.map(m=>d({},m));if(!this._adapter.emitHostEvent(_.events.SORT,l,!0,!0)){this._multiSortManager.setSortColumns(s);return}let v=this._multiSortManager.sortedColumns.length>1;for(let m=0;m<this._visibleColumnConfigurations.length;m++){let u=this._select?m+1:m;if(!this._multiSortManager.isSortColumn(m))this._adapter.removeColumnSort(this._adapter.getTableElement(),u),A1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),v,u,null);else{let z=this._multiSortManager.getSortColumn(m);z&&(this._adapter.setSortedColumn(this._adapter.getTableElement(),u,z.direction),A1.setMultiSortColumnSortNumber(this._adapter.getTableElement(),v,u,z.sortOrder||null))}}}_onFilter(t,e){let o={value:t,columnIndex:e};this._adapter.emitHostEvent(_.events.FILTER,o,!0,!1)}_shiftSelectRows(t){let e=[];if(this._previouslyClickedRow){let o=this._previouslyClickedRow.index,a=t.index,s=a>=o?o:a,r=a>=o?a:o;r+=r>s?1:0,s+=s>r?1:0;let l=m=>this.selectRows(m,!1),h=this._tableRows.find(m=>m.selected&&m.data===t.data),v=this._tableRows.find(m=>{var u;return m.data===((u=this._previouslyClickedRow)==null?void 0:u.data)&&!m.selected});(!h||v)&&(l=m=>this.deselectRows(m));for(let m=s;m<r;m++)e.push(m);l(this.data.filter((m,u)=>e.includes(u)))}return e}_isIndeterminate(t){return!t&&this.getSelectedRows().length>0&&this._data.length!==this.getSelectedRows().length}_applyRoomy(){this._adapter.setRoomy(this._adapter.getTableElement(),this._roomy),this._adapter.setHostAttribute(_.attributes.ROOMY,this._roomy.toString())}_refreshTableSort(){if(this._sortedColumnIndex=this._visibleColumnConfigurations.findIndex(t=>t.initialSort),this._sortedColumnIndex>=0&&this._sortDirection===void 0){let t=this._visibleColumnConfigurations[this._sortedColumnIndex];t.initialSort===!0&&t.sortDirection?this._sortDirection=t.sortDirection:typeof t.initialSort=="object"&&t.initialSort.direction&&(this._sortDirection=t.initialSort.direction)}if(this._multiColumnSort){let t=[];this._visibleColumnConfigurations.forEach((e,o)=>{typeof e.initialSort=="object"&&t.push({columnIndex:o,direction:e.initialSort.direction,sortOrder:e.initialSort.sortOrder,propertyName:e.property})}),this._multiSortManager.setSortColumns(t)}}};var X1=class extends M{static get observedAttributes(){return[_.attributes.SELECT,_.attributes.MULTISELECT,_.attributes.SELECT_KEY,_.attributes.DENSE,_.attributes.ROOMY,_.attributes.FILTER,_.attributes.FIXED_HEADERS,_.attributes.LAYOUT_TYPE,_.attributes.WRAP_CONTENT,_.attributes.RESIZABLE,_.attributes.MIN_RESIZE_WIDTH,_.attributes.ALLOW_ROW_CLICK,_.attributes.MULTI_COLUMN_SORT,_.attributes.SELECT_CHECKBOX_ALIGNMENT,_.attributes.TOOLTIP_SELECT,_.attributes.TOOLTIP_SELECT_ALL]}constructor(){super(),X.define(il),this._core=new k4(new A4(this))}initializedCallback(){this._core.initialize()}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case _.attributes.SELECT:this.select=p(o);break;case _.attributes.MULTISELECT:this.multiselect=p(o);break;case _.attributes.SELECT_KEY:this.selectKey=o;break;case _.attributes.DENSE:this.dense=p(o);break;case _.attributes.ROOMY:this.roomy=p(o);break;case _.attributes.FILTER:this.filter=p(o);break;case _.attributes.FIXED_HEADERS:this.fixedHeaders=p(o);break;case _.attributes.LAYOUT_TYPE:this.layoutType=o;break;case _.attributes.WRAP_CONTENT:this.wrapContent=p(o);break;case _.attributes.RESIZABLE:this.resizable=p(o);break;case _.attributes.MIN_RESIZE_WIDTH:this.minResizeWidth=K(o);break;case _.attributes.ALLOW_ROW_CLICK:this.allowRowClick=p(o);break;case _.attributes.MULTI_COLUMN_SORT:this.multiColumnSort=p(o);break;case _.attributes.SELECT_CHECKBOX_ALIGNMENT:this.selectCheckboxAlignment=this.getAttribute(_.attributes.SELECT_CHECKBOX_ALIGNMENT)||"center";break;case _.attributes.TOOLTIP_SELECT:this.tooltipSelect=o;break;case _.attributes.TOOLTIP_SELECT_ALL:this.tooltipSelectAll=o;break}}hideColumn(t){this._core.hideColumn(t)}showColumn(t){this._core.showColumn(t)}isColumnHidden(t){return this._core.isColumnHidden(t)}getSelectedRows(){return this._core.getSelectedRows()}selectRow(t){this._core.selectRows([t],!1)}selectRows(t,e=!1){this._core.selectRows(t,!e)}deselectRow(t){this._core.deselectRows([t])}deselectRows(t){this._core.deselectRows(t)}clearSelections(){this._core.clearSelections()}render(){this._core.render()}expandRow(t,e){return this._core.expandRow(t,e)}collapseRow(t){return this._core.collapseRow(t)}isRowExpanded(t){return this._core.isRowExpanded(t)}selectRowsByIndex(t,e){typeof t=="number"?this._core.selectRowsByIndex([t],e):Array.isArray(t)&&this._core.selectRowsByIndex(t,e)}deselectRowsByIndex(t){typeof t=="number"?this._core.deselectRowsByIndex([t]):Array.isArray(t)&&this._core.deselectRowsByIndex(t)}isRowSelected(t){return this._core.isRowSelected(t)}};i([c()],X1.prototype,"data",2),i([c()],X1.prototype,"columnConfigurations",2),i([c()],X1.prototype,"select",2),i([c()],X1.prototype,"multiselect",2),i([c()],X1.prototype,"selectKey",2),i([c()],X1.prototype,"tooltipSelect",2),i([c()],X1.prototype,"tooltipSelectAll",2),i([c()],X1.prototype,"dense",2),i([c()],X1.prototype,"roomy",2),i([c()],X1.prototype,"filter",2),i([c()],X1.prototype,"fixedHeaders",2),i([c()],X1.prototype,"layoutType",2),i([c()],X1.prototype,"wrapContent",2),i([c()],X1.prototype,"resizable",2),i([c()],X1.prototype,"minResizeWidth",2),i([c()],X1.prototype,"allowRowClick",2),i([c()],X1.prototype,"multiColumnSort",2),i([c()],X1.prototype,"rowCreated",2),i([c()],X1.prototype,"cellCreated",2),i([c()],X1.prototype,"selectAllTemplate",2),i([c()],X1.prototype,"selectCheckboxAlignment",2),X1=i([y({name:_.elementName,dependencies:[tt,j,at,m1]})],X1);function im(){f(X1)}var lm=`${b}tab-bar`,cm={DISABLED:"disabled",ACTIVE_TAB:"active-tab",VERTICAL:"vertical",STACKED:"stacked",CLUSTERED:"clustered",SECONDARY:"secondary",INVERTED:"inverted",AUTO_ACTIVATE:"auto-activate",SCROLL_BUTTONS:"scroll-buttons"},Pb=d({},cm),Nb={ROOT:".forge-tab-bar",SCROLL_CONTAINER:".scroll-container",DEFAULT_SLOT:"slot:not([name])"},Rb={SCROLL_BUTTON:"scroll-button"},Fb={CHANGE:`${lm}-change`},Ub={SCROLL_MARGIN:48},N1={elementName:lm,observedAttributes:cm,attributes:Pb,events:Fb,selectors:Nb,classes:Rb,numbers:Ub},f3=new Map([["default",new Set(["Home","End"])],["horizontal",new Set(["ArrowLeft","ArrowRight"])],["vertical",new Set(["ArrowUp","ArrowDown"])]]);var hm=`${b}tab`,vm={DISABLED:"disabled",SELECTED:"selected",VERTICAL:"vertical",STACKED:"stacked",SECONDARY:"secondary",INVERTED:"inverted"},Wb=d({},vm),Gb={INDICATOR:".indicator"},qb={},Yb={SELECT:`${hm}-select`},Kb={EASING:"cubic-bezier(0.4, 0, 0.2, 1)"},$b={ANIMATION_DURATION:250},K1={elementName:hm,observedAttributes:vm,attributes:Wb,selectors:Gb,classes:qb,events:Yb,strings:Kb,numbers:$b};var O4=class extends I{constructor(t){super(t),this._tabIndicatorElement=w(this._component,K1.selectors.INDICATOR),this._focusIndicatorElement=w(this._component,w1.elementName),this._stateLayerElement=w(this._component,I1.elementName)}initialize(){this._component.tabIndex=this._component.selected?0:-1,this._component.setAttribute("role","tab"),this._component.setAttribute("aria-selected",this._component.selected?"true":"false")}activateFocusIndicator(){this._focusIndicatorElement.active=!0}addInteractionListener(t,e){this._component.addEventListener(t,e)}setDisabled(t){this._stateLayerElement.disabled=t,this._component.tabIndex=t?-1:this._component.selected?0:-1,this._component.setAttribute("aria-disabled",String(t)),G(this._component,t,K1.attributes.DISABLED,String(t))}setSelected(t){this._component.tabIndex=t?0:-1,this._component.setAttribute("aria-selected",String(t))}animateSelected(){this._tabIndicatorElement.getAnimations().forEach(e=>e.cancel());let t=this._getKeyframes();t&&this._tabIndicatorElement.animate(t,{duration:K1.numbers.ANIMATION_DURATION,easing:K1.strings.EASING})}animateStateLayer(){this._stateLayerElement.playAnimation()}_getKeyframes(){var x;let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!this._component.selected)return t?[{opacity:1},{transform:"none"}]:null;let e={},o=this._component.vertical,a=this._getSelectedTabIndicator(),s=(x=a==null?void 0:a.getBoundingClientRect())!=null?x:{},r=o?s.top:s.left,l=o?s.height:s.width,h=this._tabIndicatorElement.getBoundingClientRect(),v=o?h.top:h.left,m=o?h.height:h.width,u=o?"Y":"X",z=l/m;return!t&&r!==void 0&&v!==void 0&&!isNaN(z)?e.transform=`translate${u}(${(r-v).toFixed(4)}px) scale${u}(${z.toFixed(4)})`:e.opacity=0,[e,{transform:"none"}]}_getSelectedTabIndicator(){let t=N3(this._component,N1.elementName);if(t){let o=Array.from(t.querySelectorAll(K1.elementName)).find(a=>a.hasAttribute(K1.attributes.SELECTED));if(o)return w(o,K1.selectors.INDICATOR)}return null}};var D4=class{constructor(t){this._adapter=t;this._selected=!1;this._disabled=!1;this._vertical=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._clickListener=()=>this._onClick(),this._keydownListener=e=>this._onKeydown(e)}initialize(){this._adapter.initialize(),this._adapter.addInteractionListener("click",this._clickListener),this._adapter.addInteractionListener("keydown",this._keydownListener)}setFocus(t){t!=null&&t.focusVisible&&this._adapter.activateFocusIndicator()}_onClick(){this._disabled||this._selected||this._dispatchSelectEvent()}_onKeydown(t){if(this._disabled||this._selected)return;(t.key===" "||t.key==="Enter")&&(t.preventDefault(),this._adapter.animateStateLayer(),this._dispatchSelectEvent())}_dispatchSelectEvent(){this._adapter.dispatchHostEvent(new CustomEvent(K1.events.SELECT,{bubbles:!0,composed:!0}))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(K1.attributes.DISABLED,this._disabled))}get selected(){return this._selected}set selected(t){this._selected!==t&&(this._selected=t,this._adapter.setSelected(this._selected),this._adapter.animateSelected(),this._adapter.toggleHostAttribute(K1.attributes.SELECTED,this._selected))}get vertical(){return this._vertical}set vertical(t){this._vertical!==t&&(this._vertical=t,this._adapter.toggleHostAttribute(K1.attributes.VERTICAL,this._vertical))}get stacked(){return this._stacked}set stacked(t){this._stacked!==t&&(this._stacked=t,this._adapter.toggleHostAttribute(K1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){this._secondary!==t&&(this._secondary=t,this._adapter.toggleHostAttribute(K1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){this._inverted!==t&&(this._inverted=t,this._adapter.toggleHostAttribute(K1.attributes.INVERTED,this._inverted))}};var Xb='<template><div class="forge-tab" part="container"><span class="content" part="content"><slot name="start"><slot name="leading"></slot></slot><span class="label" part="label"><slot></slot></span><slot name="end"><slot name="trailing"></slot></slot><span class="indicator" part="indicator"></span></span><forge-state-layer exportparts="surface:state-layer" target=":host"></forge-state-layer><forge-focus-indicator part="focus-indicator" target=":host" inward></forge-focus-indicator></div></template>',Zb=':host{display:inline-flex;outline:0;-webkit-tap-highlight-color:transparent;vertical-align:middle}:host([hidden]){display:none}.forge-tab{--_tab-active-color:var(--forge-tab-active-color, var(--forge-theme-primary, #3f51b5));--_tab-inactive-color:var(--forge-tab-inactive-color, var(--forge-theme-text-medium, rgba(0, 0, 0, 0.6)));--_tab-height:var(--forge-tab-height, 48px);--_tab-stacked-height:var(--forge-tab-stacked-height, 64px);--_tab-padding-block:var(--forge-tab-padding-block, 0);--_tab-padding-inline:var(--forge-tab-padding-inline, 0);--_tab-disabled-opacity:var(--forge-tab-disabled-opacity, 0.38);--_tab-indicator-color:var(--forge-tab-indicator-color, var(--_tab-active-color));--_tab-indicator-height:var(--forge-tab-indicator-height, 3px);--_tab-indicator-shape:var(--forge-tab-indicator-shape, 3px 3px 0 0);--_tab-vertical-indicator-shape:var(--forge-tab-vertical-indicator-shape, 3px 0 0 3px);--_tab-secondary-indicator-height:var(--forge-tab-secondary-indicator-height, 2px);--_tab-secondary-indicator-shape:var(--forge-tab-secondary-indicator-shape, 0);--_tab-inverted-indicator-shape:var(--forge-tab-inverted-indicator-shape, 0 0 3px 3px);--_tab-vertical-inverted-indicator-shape:var(--forge-tab-vertical-inverted-indicator-shape, 0 3px 3px 0);--_tab-container-color:var(--forge-tab-container-color, transparent);--_tab-container-height:var(--forge-tab-container-height, var(--_tab-height));--_tab-container-shape:var(--forge-tab-container-shape, 0);--_tab-content-height:var(--forge-tab-content-height, var(--_tab-height));--_tab-content-spacing:var(--forge-tab-content-spacing, var(--forge-spacing-xsmall, 8px));--_tab-content-padding:var(--forge-tab-content-padding, var(--forge-spacing-xxsmall, 4px));--_tab-content-padding-block:var(--forge-tab-content-padding-block, var(--_tab-content-padding));--_tab-content-padding-inline:var(--forge-tab-content-padding-inline, var(--forge-spacing-medium, 16px));--_tab-content-padding-inline-secondary:var(--forge-tab-content-padding-inline-secondary, var(--forge-spacing-medium, 16px));--_tab-active-focus-icon-color:var(--forge-tab-active-focus-icon-color, var(--_tab-active-color));--_tab-active-hover-icon-color:var(--forge-tab-active-hover-icon-color, var(--_tab-active-color));--_tab-active-icon-color:var(--forge-tab-active-icon-color, var(--_tab-active-color));--_tab-active-pressed-icon-color:var(--forge-tab-active-pressed-icon-color, var(--_tab-active-color));--_tab-icon-size:var(--forge-tab-icon-size, 24px);--_tab-focus-icon-color:var(--forge-tab-focus-icon-color, var(--_tab-inactive-color));--_tab-hover-icon-color:var(--forge-tab-hover-icon-color, var(--_tab-inactive-color));--_tab-icon-color:var(--forge-tab-icon-color, var(--_tab-inactive-color));--_tab-pressed-icon-color:var(--forge-tab-pressed-icon-color, var(--_tab-inactive-color));--_tab-active-focus-label-text-color:var(--forge-tab-active-focus-label-text-color, var(--_tab-active-color));--_tab-active-hover-label-text-color:var(--forge-tab-active-hover-label-text-color, var(--_tab-active-color));--_tab-active-label-text-color:var(--forge-tab-active-label-text-color, var(--_tab-active-color));--_tab-active-pressed-label-text-color:var(--forge-tab-active-pressed-label-text-color, var(--_tab-active-color));--_tab-focus-label-text-color:var(--forge-tab-focus-label-text-color, var(--_tab-inactive-color));--_tab-hover-label-text-color:var(--forge-tab-hover-label-text-color, var(--_tab-inactive-color));--_tab-label-text-color:var(--forge-tab-label-text-color, var(--_tab-inactive-color));--_tab-pressed-label-text-color:var(--forge-tab-pressed-label-text-color, var(--_tab-inactive-color))}.forge-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;background:0 0;text-decoration:none;width:100%;position:relative;padding-block:var(--_tab-padding-block);padding-inline:var(--_tab-padding-inline);margin:0;z-index:0;background-color:var(--_tab-container-color);color:var(--_tab-label-text-color);min-height:var(--_tab-container-height)}.forge-tab::-moz-focus-inner{padding:0;border:0}.forge-tab ::slotted([slot=leading]),.forge-tab ::slotted([slot=trailing]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_tab-icon-color);font-size:var(--_tab-icon-size);width:var(--_tab-icon-size);height:var(--_tab-icon-size)}.forge-tab:hover{color:var(--_tab-hover-label-text-color);cursor:pointer}.forge-tab:hover ::slotted([slot=leading]),.forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-hover-icon-color)}.forge-tab .content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;white-space:nowrap;transition:150ms color linear;max-height:calc(var(--_tab-content-height) + 2 * var(--_tab-content-padding-block));min-height:var(--_tab-content-height);width:100%;padding-block:var(--_tab-content-padding-block);padding-inline:var(--_tab-content-padding-inline);gap:var(--_tab-content-spacing)}.forge-tab .content .label{display:inline-block;line-height:1}.forge-tab .indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_tab-indicator-color);border-radius:var(--_tab-indicator-shape);height:var(--_tab-indicator-height);min-width:100%;inset:auto 0 0;opacity:0}::slotted(*),:host{white-space:nowrap}forge-focus-indicator{--forge-focus-indicator-color:var(--_tab-active-color);--forge-focus-indicator-shape:8px}forge-state-layer{--forge-state-layer-color:var(--_tab-inactive-color)}:host(:focus) .forge-tab{color:var(--_tab-focus-label-text-color)}:host(:focus) .forge-tab ::slotted([slot=leading]),:host(:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-focus-icon-color)}:host(:active) .forge-tab{color:var(--_tab-pressed-label-text-color);outline:0}:host(:active) .forge-tab ::slotted([slot=leading]),:host(:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-pressed-icon-color)}:host([disabled]){cursor:not-allowed}:host([disabled]) .forge-tab{opacity:var(--_tab-disabled-opacity);pointer-events:none}:host([selected]) .forge-tab{color:var(--_tab-active-label-text-color)}:host([selected]) .forge-tab ::slotted([slot=end]),:host([selected]) .forge-tab ::slotted([slot=leading]),:host([selected]) .forge-tab ::slotted([slot=start]),:host([selected]) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-icon-color)}:host([selected]) .forge-tab:hover{color:var(--_tab-active-hover-label-text-color)}:host([selected]) .forge-tab:hover ::slotted([slot=end]),:host([selected]) .forge-tab:hover ::slotted([slot=leading]),:host([selected]) .forge-tab:hover ::slotted([slot=start]),:host([selected]) .forge-tab:hover ::slotted([slot=trailing]){color:var(--_tab-active-hover-icon-color)}:host([selected]) .forge-tab .indicator{opacity:1}:host([selected]) forge-state-layer{--forge-state-layer-color:var(--_tab-active-color)}:host([selected]:not([vertical])) forge-focus-indicator{--forge-focus-indicator-offset-block:0 calc(var(--_tab-indicator-height) + 1px)}:host([selected]:focus) .forge-tab{color:var(--_tab-active-focus-label-text-color)}:host([selected]:focus) .forge-tab ::slotted([slot=leading]),:host([selected]:focus) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-focus-icon-color)}:host([selected]:active) .forge-tab{color:var(--_tab-active-pressed-label-text-color)}:host([selected]:active) .forge-tab ::slotted([slot=leading]),:host([selected]:active) .forge-tab ::slotted([slot=trailing]){color:var(--_tab-active-pressed-icon-color)}:host([stacked]) .forge-tab{--_tab-height:var(--_tab-stacked-height)}:host([stacked]) .forge-tab .content{max-height:none;flex-direction:column;height:100%}:host([vertical]) .forge-tab{--_tab-padding-inline:var(--forge-tab-padding-inline, 0);width:100%;flex-direction:row;border-bottom:none}:host([vertical]) .forge-tab .content{width:100%;min-height:100%}:host([vertical]) .forge-tab .indicator{height:100%;min-width:var(--_tab-indicator-height);inset:0 0 0 auto}:host([vertical]) forge-focus-indicator{--forge-focus-indicator-offset-inline:0 calc(var(--_tab-indicator-height) + 1px)}:host([vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-indicator-shape)}:host([inverted]) .forge-tab{--_tab-indicator-shape:var(--_tab-inverted-indicator-shape)}:host([inverted]) .indicator{inset:0 0 auto;transform-origin:top left}:host([inverted][vertical]) .forge-tab{--_tab-indicator-shape:var(--_tab-vertical-inverted-indicator-shape)}:host([inverted][vertical]) .indicator{inset:0 auto 0 0}',Rt=class extends M{static get observedAttributes(){return Object.values(K1.observedAttributes)}constructor(){super(),H(this,Xb,Zb),this._core=new D4(new O4(this))}connectedCallback(){this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case K1.observedAttributes.DISABLED:this.disabled=p(o);break;case K1.observedAttributes.SELECTED:this.selected=p(o);break;case K1.observedAttributes.VERTICAL:this.vertical=p(o);break;case K1.observedAttributes.STACKED:this.stacked=p(o);break;case K1.observedAttributes.SECONDARY:this.secondary=p(o);break;case K1.observedAttributes.INVERTED:this.inverted=p(o);break}}focus(t){super.focus(t),this._core.setFocus(t)}};i([c()],Rt.prototype,"disabled",2),i([c()],Rt.prototype,"selected",2),i([c()],Rt.prototype,"vertical",2),i([c()],Rt.prototype,"stacked",2),i([c()],Rt.prototype,"secondary",2),i([c()],Rt.prototype,"inverted",2),Rt=i([y({name:K1.elementName,dependencies:[J,r1]})],Rt);function pm(){f(Rt)}var P4=class extends I{constructor(t){super(t),this._defaultSlotElement=w(this._component,N1.selectors.DEFAULT_SLOT),this._rootElement=w(this._component,N1.selectors.ROOT),this._scrollContainer=w(this._component,N1.selectors.SCROLL_CONTAINER)}initializeContainerSizeObserver(t){this._resizeObserver=new ResizeObserver(()=>t()),this._resizeObserver.observe(this._component)}initializeScrollObserver(t){this._scrollContainer.addEventListener("scroll",t,{passive:!0})}destroyContainerSizeObserver(){var t;(t=this._resizeObserver)==null||t.disconnect(),this._resizeObserver=void 0}destroyScrollObserver(t){this._scrollContainer.removeEventListener("scroll",t,{passive:!0})}setVertical(t){G(this._component,!!t,"aria-orientation","vertical")}setScrollBackwardButtonListener(t){var e;(e=this._backwardScrollButton)==null||e.addEventListener("click",t)}setScrollForwardButtonListener(t){var e;(e=this._forwardScrollButton)==null||e.addEventListener("click",t)}addSlotListener(t){this._defaultSlotElement.addEventListener("slotchange",t)}getTabs(){return Array.from(this._component.querySelectorAll(K1.elementName))}async tryScrollTabIntoView(t){if(await new Promise(requestAnimationFrame),!t.isConnected||!t.selected&&!t.matches(":focus"))return;let e=this._component.vertical,o=e?this._scrollContainer.offsetTop:this._scrollContainer.offsetLeft,a=e?t.offsetTop:t.offsetLeft,s=e?t.offsetHeight:t.offsetWidth,r=e?this._scrollContainer.scrollTop:this._scrollContainer.scrollLeft,l=e?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth,h=a-(N1.numbers.SCROLL_MARGIN+o),v=a+s-l+(N1.numbers.SCROLL_MARGIN-o),m=Math.min(h,Math.max(v,r)),u=t.matches(":focus")?"smooth":"instant";this._scrollContainer.scrollTo({behavior:u,[e?"left":"top"]:0,[e?"top":"left"]:m})}getScrollState(){let{scrollHeight:t,scrollWidth:e,scrollLeft:o,scrollTop:a,clientHeight:s,clientWidth:r}=this._scrollContainer,l=this._component.vertical?s+a:r+o,h=this._component.vertical?t:e,v=l===h;return{isScrolledStart:(this._component.vertical?l-s:l-r)===0,isScrolledEnd:v}}isScrollable(){let{scrollHeight:t,scrollWidth:e,clientHeight:o,clientWidth:a}=this._scrollContainer;return this._component.vertical?t>o:e>a}setScrollButtons(t){var e,o;t?(this._backwardScrollButton=this._createScrollButton(this._component.vertical?Qa.name:v0.name),this._rootElement.insertAdjacentElement("afterbegin",this._backwardScrollButton),this._forwardScrollButton=this._createScrollButton(this._component.vertical?h0.name:ze.name),this._rootElement.insertAdjacentElement("beforeend",this._forwardScrollButton)):((e=this._backwardScrollButton)==null||e.remove(),this._backwardScrollButton=void 0,(o=this._forwardScrollButton)==null||o.remove(),this._forwardScrollButton=void 0)}syncScrollButtons({backwardEnabled:t,forwardEnabled:e}){var o,a;if(this._backwardScrollButton){let s=!t;s&&this._backwardScrollButton.matches(":focus")&&((o=this._forwardScrollButton)==null||o.focus()),this._backwardScrollButton.disabled=s,this._backwardScrollButton.tabIndex=-1}if(this._forwardScrollButton){let s=!e;s&&this._forwardScrollButton.matches(":focus")&&((a=this._backwardScrollButton)==null||a.focus()),this._forwardScrollButton.disabled=s,this._forwardScrollButton.tabIndex=-1}}scroll(t){let e=this._component.vertical?this._scrollContainer.offsetHeight:this._scrollContainer.offsetWidth;this._scrollContainer.scrollBy({behavior:"smooth",[this._component.vertical?"top":"left"]:e*(t==="forward"?1:-1)})}updateScrollButtonIcons(t){var a,s;let e=(a=this._backwardScrollButton)==null?void 0:a.querySelector("forge-icon");e&&(e.name=t?Qa.name:v0.name);let o=(s=this._forwardScrollButton)==null?void 0:s.querySelector("forge-icon");o&&(o.name=t?h0.name:ze.name)}_createScrollButton(t){let e=document.createElement("forge-icon-button");e.classList.add(N1.classes.SCROLL_BUTTON),e.shape="squared",e.type="button",e.tabIndex=-1,e.setAttribute("aria-hidden","true");let o=document.createElement("forge-icon");return o.name=t,e.appendChild(o),e}};var N4=class{constructor(t){this._adapter=t;this._isInitialized=!1;this._disabled=!1;this._vertical=!1;this._clustered=!1;this._stacked=!1;this._secondary=!1;this._inverted=!1;this._autoActivate=!1;this._scrollButtons=!1;this._tabs=[];this._scrollButtonsVisible=!1;this._tabsChangedListener=()=>this._onTabsChanged(),this._tabSelectedListener=e=>this._onTabSelected(e),this._keydownListener=e=>this._onKeydown(e),this._resizeListener=()=>this._onResize(),this._scrollListener=()=>this._onScroll(),this._scrollBackwardButtonListener=()=>this._onScrollBackward(),this._scrollForwardButtonListener=()=>this._onScrollForward()}initialize(){this._adapter.addSlotListener(this._tabsChangedListener),this._adapter.addHostListener(K1.events.SELECT,this._tabSelectedListener),this._adapter.addHostListener("keydown",this._keydownListener),this._adapter.setVertical(this._vertical),this._scrollButtons&&(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState()),this._tryScrollActiveTabIntoView(),this._isInitialized=!0}destroy(){this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._isInitialized=!1}async _onTabsChanged(){this._tabs=this._adapter.getTabs(),this._syncTabState(),this._scrollButtons&&this._detectScrollableStatus(),this._tryScrollActiveTabIntoView()}_onTabSelected(t){this._selectTab({tab:t.target,focusTab:!0})}async _onKeydown(t){var s,r;let e=this._vertical?"vertical":"horizontal";if(!(((s=f3.get("default"))==null?void 0:s.has(t.key))||((r=f3.get(e))==null?void 0:r.has(t.key))))return;t.preventDefault();let a=-1;if(t.key==="Home")a=this._tabs.findIndex(l=>!l.disabled);else if(t.key==="End")a=this._tabs.reduceRight((l,h,v)=>!h.disabled&&l===-1?v:l,-1);else{let l=this._tabs.findIndex(m=>m.matches(":focus")),h=t.key==="ArrowLeft"||t.key==="ArrowUp",v=m=>{var z;a=m+(h?-1:1),a=a<0?this._tabs.length-1:a%this._tabs.length,!this._tabs.every(x=>x.disabled)&&((z=this._tabs[a])!=null&&z.disabled)&&v(a)};v(l)}a!==-1&&(this._autoActivate?this._selectTab({tab:this._tabs[a],focusTab:!0}):(this._tabs[a].focus({preventScroll:!0,focusVisible:!0}),await this._adapter.tryScrollTabIntoView(this._tabs[a])))}async _selectTab({tab:t,emitEvent:e=!0,focusTab:o=!1}){if(!t||t.disabled)return;let a=this._tabs.find(s=>s.selected);if(a!==t){if(e){let s=this._tabs.indexOf(t),r=new CustomEvent(N1.events.CHANGE,{detail:{index:s},bubbles:!0,cancelable:!0,composed:!0});if(this._adapter.dispatchHostEvent(r),r.defaultPrevented)return}t.selected=!0,o&&t.focus({preventScroll:!0}),await this._adapter.tryScrollTabIntoView(t),a&&(a.selected=!1),this._activeTab=this._tabs.indexOf(t)}}_syncTabState(){this._tabs.forEach((t,e)=>{t.selected=e===this._activeTab,this._disabled&&(t.disabled=this._disabled),t.vertical=this._vertical,t.stacked=this._stacked,t.secondary=this._secondary,t.inverted=this._inverted})}_onResize(){this._detectScrollableStatus()}_onScroll(){this._updateScrollState()}_onScrollBackward(){this._adapter.scroll("backward")}_onScrollForward(){this._adapter.scroll("forward")}_detectScrollableStatus(){let t=this._adapter.isScrollable();this._scrollButtonsVisible!==t&&(this._adapter.setScrollButtons(t),t?(this._adapter.initializeScrollObserver(this._scrollListener),this._updateScrollState(),this._adapter.setScrollBackwardButtonListener(this._scrollBackwardButtonListener),this._adapter.setScrollForwardButtonListener(this._scrollForwardButtonListener)):this._adapter.destroyScrollObserver(this._scrollListener),this._scrollButtonsVisible=t)}_updateScrollState(){let{isScrolledEnd:t,isScrolledStart:e}=this._adapter.getScrollState(),o={backwardEnabled:!e,forwardEnabled:!t};this._adapter.syncScrollButtons(o)}_tryScrollActiveTabIntoView(){this._tabScrollAnimationFrame&&window.cancelAnimationFrame(this._tabScrollAnimationFrame),this._tabScrollAnimationFrame=window.requestAnimationFrame(()=>{this._tabScrollAnimationFrame=void 0,this._adapter.isScrollable()&&typeof this._activeTab=="number"&&this._activeTab>=0&&this._tabs[this._activeTab]&&this._adapter.tryScrollTabIntoView(this._tabs[this._activeTab])})}get disabled(){return this._disabled}set disabled(t){t=!!t,this._disabled!==t&&(this._disabled=t,this._tabs.forEach(e=>e.disabled=this._disabled),this._adapter.toggleHostAttribute(N1.attributes.DISABLED,this._disabled))}get activeTab(){return this._activeTab}set activeTab(t){if(this._activeTab!==t)if(this._activeTab=t!=null?t:void 0,typeof this._activeTab=="number"){let e=this._tabs[this._activeTab];this._selectTab({tab:e,emitEvent:!1,focusTab:!1}),this._adapter.setHostAttribute(N1.attributes.ACTIVE_TAB,String(this._activeTab))}else this._tabs.forEach(e=>e.selected=!1),this._adapter.removeHostAttribute(N1.attributes.ACTIVE_TAB)}get vertical(){return this._vertical}set vertical(t){t=!!t,this._vertical!==t&&(this._vertical=t,this._isInitialized&&this._adapter.setVertical(this._vertical),this._tabs.forEach(e=>e.vertical=this._vertical),this._scrollButtonsVisible&&this._adapter.updateScrollButtonIcons(this._vertical),this._adapter.toggleHostAttribute(K1.attributes.VERTICAL,this._vertical))}get clustered(){return this._clustered}set clustered(t){t=!!t,this._clustered!==t&&(this._clustered=t,this._adapter.toggleHostAttribute(N1.attributes.CLUSTERED,this._clustered))}get stacked(){return this._stacked}set stacked(t){t=!!t,this._stacked!==t&&(this._stacked=t,this._tabs.forEach(e=>e.stacked=this._stacked),this._adapter.toggleHostAttribute(N1.attributes.STACKED,this._stacked))}get secondary(){return this._secondary}set secondary(t){t=!!t,this._secondary!==t&&(this._secondary=t,this._tabs.forEach(e=>e.secondary=this._secondary),this._adapter.toggleHostAttribute(N1.attributes.SECONDARY,this._secondary))}get inverted(){return this._inverted}set inverted(t){t=!!t,this._inverted!==t&&(this._inverted=t,this._tabs.forEach(e=>e.inverted=this._inverted),this._adapter.toggleHostAttribute(N1.attributes.INVERTED,this._inverted))}get autoActivate(){return this._autoActivate}set autoActivate(t){t=!!t,this._autoActivate!==t&&(this._autoActivate=t,this._adapter.toggleHostAttribute(N1.attributes.AUTO_ACTIVATE,this._autoActivate))}get scrollButtons(){return this._scrollButtons}set scrollButtons(t){t=!!t,this._scrollButtons!==t&&(this._scrollButtons=!!t,this._isInitialized&&(this._scrollButtons?(this._adapter.initializeContainerSizeObserver(this._resizeListener),this._adapter.initializeScrollObserver(this._scrollListener),this._detectScrollableStatus(),this._updateScrollState(),this._tryScrollActiveTabIntoView()):(this._adapter.destroyContainerSizeObserver(),this._adapter.destroyScrollObserver(this._scrollListener),this._adapter.setScrollButtons(this._scrollButtons),this._scrollButtonsVisible=!1)),this._adapter.setHostAttribute(N1.attributes.SCROLL_BUTTONS,String(this._scrollButtons)))}};var jb='<template><div class="forge-tab-bar" part="container"><div class="scroll-container" part="scroll-container"><slot></slot></div></div></template>',Qb=":host{position:relative;display:block}:host([hidden]){display:none}.forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, space-between);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 1);--_tab-bar-divider-color:var(--forge-tab-bar-divider-color, var(--forge-theme-outline, #e0e0e0));--_tab-bar-divider-thickness:var(--forge-tab-bar-divider-thickness, 1px)}.forge-tab-bar{position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;align-items:center;border-bottom:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}.scroll-container{position:relative;display:flex;justify-content:var(--_tab-bar-justify);align-items:flex-end;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){flex:var(--_tab-bar-stretch);align-self:stretch}::slotted([selected]){z-index:1}forge-icon-button{--forge-icon-button-shape-squared:0px}:host([vertical]) .forge-tab-bar{grid-template-columns:none;grid-template-rows:auto 1fr auto;align-items:initial;border-bottom:none;border-right:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color);height:100%}:host([vertical]) .scroll-container{display:inline-flex;flex-direction:column;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .forge-tab-bar{border-bottom:none;border-top:variale(divider-thickness) solid var(--_tab-bar-divider-color)}:host([inverted][vertical]) .forge-tab-bar{border-bottom:none;border-top:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}:host([clustered]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 0)}:host([clustered=start]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start)}:host([clustered=center]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, center)}:host([clustered=end]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-end)}:host([theme=app-bar]){--forge-tab-active-color:var(--_app-bar-theme-foreground);--forge-tab-inactive-color:var(--_app-bar-theme-foreground-muted)}:host([theme=app-bar]) forge-icon-button{--forge-icon-button-icon-color:var(--_app-bar-theme-foreground)}",Ct=class extends V1(L1(M)){static get observedAttributes(){return Object.values(N1.observedAttributes)}constructor(){super(),X.define([v0,ze,Qa,h0]),H(this,jb,Qb),this._core=new N4(new P4(this))}connectedCallback(){this[N]({role:"tablist"},{setAttribute:!0}),this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case N1.observedAttributes.DISABLED:this.disabled=p(o);break;case N1.observedAttributes.ACTIVE_TAB:this.activeTab=o?K(o):void 0;break;case N1.observedAttributes.VERTICAL:this.vertical=p(o);break;case N1.observedAttributes.CLUSTERED:this.clustered=p(o);break;case N1.observedAttributes.STACKED:this.stacked=p(o);break;case N1.observedAttributes.SECONDARY:this.secondary=p(o);break;case N1.observedAttributes.INVERTED:this.inverted=p(o);break;case N1.observedAttributes.AUTO_ACTIVATE:this.autoActivate=p(o);break;case N1.observedAttributes.SCROLL_BUTTONS:this.scrollButtons=p(o);break}}};i([c()],Ct.prototype,"disabled",2),i([c()],Ct.prototype,"activeTab",2),i([c()],Ct.prototype,"vertical",2),i([c()],Ct.prototype,"clustered",2),i([c()],Ct.prototype,"stacked",2),i([c()],Ct.prototype,"secondary",2),i([c()],Ct.prototype,"inverted",2),i([c()],Ct.prototype,"autoActivate",2),i([c()],Ct.prototype,"scrollButtons",2),Ct=i([y({name:N1.elementName,dependencies:[Rt,i1,j]})],Ct);function mm(){f(Ct)}var Dn=`${b}time-picker`,dm={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},Jb={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${dm.TOGGLE}]`},ty={OPEN:`${Dn}-open`,CLOSE:`${Dn}-close`,INPUT:`${Dn}-input`,CHANGE:`${Dn}-change`},ey={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},W={elementName:Dn,attributes:dm,selectors:Jb,events:ty,numbers:ey};var R4=class extends I{constructor(t){super(t)}get inputElement(){return this._inputElement}initialize(){this._inputElement=this._component.querySelector(W.selectors.INPUT)}initializeMask(t){this.destroyMask(),this._inputElement&&(this._inputMask=new ys(this._inputElement,t))}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var t;(t=this._inputMask)==null||t.destroy(),this._inputMask=void 0}initializeAccessibility(t){var e,o,a,s,r,l,h,v,m;(e=this._inputElement)==null||e.setAttribute("autocomplete","off"),(o=this._inputElement)==null||o.setAttribute("autocorrect","off"),(a=this._inputElement)==null||a.setAttribute("autocapitalize","off"),(s=this._inputElement)==null||s.setAttribute("spellcheck","false"),(r=this._inputElement)==null||r.setAttribute("role","combobox"),(l=this._inputElement)==null||l.setAttribute("aria-live","assertive"),(h=this._inputElement)==null||h.setAttribute("aria-atomic","true"),(v=this._inputElement)==null||v.setAttribute("aria-haspopup","true"),(m=this._inputElement)==null||m.setAttribute("aria-expanded","false"),Ge(),this._inputElement&&Yt(this._inputElement)}addInputListener(t,e,o){var a;(a=this._inputElement)==null||a.addEventListener(t,e,{capture:o})}removeInputListener(t,e,o){var a;(a=this._inputElement)==null||a.removeEventListener(t,e,{capture:o})}addToggleListener(t,e){this._toggleElement&&this._toggleElement.addEventListener(t,e)}removeToggleListener(t,e){this._toggleElement&&this._toggleElement.removeEventListener(t,e)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let t=this._component.querySelector(E1.elementName),e=this._component.querySelector(W.selectors.TOGGLE);if(t){let o=t.querySelector(`${t1.elementName}[slot=trailing]`);if(o||e){this._toggleElement=o||e;return}let a=document.createElement(t1.elementName);a.slot="trailing",a.density="medium",a.type="button",a.tabIndex=-1,a.setAttribute("aria-label","Toggle time dropdown");let s=document.createElement(p1.elementName);s.name="clock_outline",a.appendChild(s),t.appendChild(a),this._toggleElement=a}else e&&(this._toggleElement=e)}tryFocusInput(){var t;(t=this._inputElement)==null||t.select()}tryBlurInput(){var t;(t=this._inputElement)==null||t.blur()}selectInputText(){var t;(t=this._inputElement)==null||t.select()}isInputDisabled(){var t,e;return(e=(t=this._inputElement)==null?void 0:t.disabled)!=null?e:!1}isInputFocused(){return Ue(this._component.ownerDocument)===this._inputElement}setInputValue(t,e){var o;((o=this._inputElement)==null?void 0:o.value)!==t&&(this._inputElement&&(this._inputElement.value=t),this._inputMask&&this._inputMask.update(),e&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){var t,e;return this._inputMask?this._inputMask.maskedValue:(e=(t=this._inputElement)==null?void 0:t.value)!=null?e:""}setDisabled(t){this._inputElement&&(this._inputElement.disabled=t,this._inputElement.setAttribute("aria-disabled",t.toString())),this.setToggleDisabled(t)}attachDropdown(t){var e;this._targetElement||(this._targetElement=this._getTargetElement(this._component.popupTarget)),this._listDropdown=new qe(this._targetElement,t),this._listDropdown.open(),(e=this._inputElement)==null||e.setAttribute("aria-controls",`list-dropdown-popup-${t.id}`)}async detachDropdown({destroy:t=!1}={}){this._listDropdown&&(t?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0),this._inputElement&&Yt(this._inputElement)}propagateKey(t){var e;(e=this._listDropdown)==null||e.handleKey(t)}setActiveDescendant(t){this._inputElement&&G(this._inputElement,!!t,"aria-activedescendant",t)}getTargetElementWidth(t){return this._getTargetElement(t).getBoundingClientRect().width}_emitInputEvent(t){var e;(e=this._inputElement)==null||e.dispatchEvent(new Event(t))}emitInputEvent(t,e){this._inputElement&&i0(this._inputElement,t,e)}setInputReadonly(t){this._inputElement&&(this._inputElement.readOnly=t)}setToggleDisabled(t){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",t.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=t;else{let e=this._toggleElement.querySelector("button");e&&(e.disabled=t)}}hasActiveOption(){var t,e;return((e=(t=this._listDropdown)==null?void 0:t.getActiveOptionIndex())!=null?e:-1)>=0}activateOptionByIndex(t){var e;(e=this._listDropdown)==null||e.activateOption(t)}activateFirstOption(){var t;(t=this._listDropdown)==null||t.activateFirstOption()}getActiveOption(){var t;return(t=this._listDropdown)==null?void 0:t.getActiveOption()}_getTargetElement(t){return this._targetElement?this._targetElement:(this._targetElement=t?this._component.querySelector(t)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){var e;let t=this._component.querySelector(E1.elementName);return(e=t==null?void 0:t.popoverTargetElement)!=null?e:this._component}};function F4(n,t,e){if(!n||/^\s*$/.test(n))return null;let o=0,a=0,s=0;if(Jo.test(n)){let r=Yl(n);o=+r.hours||0,a=+r.minutes||0,s=+r.seconds||0}else if(ps.test(n)){let r=Kl(n);o=+r.hours||0,a=+r.minutes||0,s=+r.seconds||0,o===12&&r.meridiem==="AM"&&(o=0),o<12&&r.meridiem==="PM"&&(o+=12)}else return null;return um(o)+Wa(a)+(e?y3(s):0)}function lt(n,t,e){if(typeof n!="number"||n<0)return null;let o=Math.min(gm(n),23),a=Math.min(wm(n),59),r=n/(1e3*60)<720?"AM":"PM";t||(o=o<=12?o:o-12,o===0&&(o=12));let l=`${String(o).padStart(2,"0")}:${String(a).padStart(2,"0")}`;if(e){let h=Math.min(b3(n),59);l+=`:${String(h).padStart(2,"0")}`}return t||(l+=` ${r}`),l}function gm(n){return Math.abs(Math.floor(n/(1e3*60*60)))}function wm(n){return Math.abs(Math.floor(U4(n)%60))}function U4(n){return n/(1e3*60)}function b3(n){return Math.abs(Math.floor(oy(n)%60))}function oy(n){return n/1e3}function um(n){return n*60*60*1e3}function Wa(n){return n*60*1e3}function y3(n){return n*1e3}function _m(n){return n-y3(b3(n))}function M3(n){let t=new Date,e=t.getHours(),o=t.getMinutes();return um(e)+Wa(o)+(n?y3(t.getSeconds()):0)}function cC1(n,t,e=!1){n||(n=new Date);let o=F4(t,!0,e);if(!o)return n.setHours(0,0,0),n;let a=gm(o),s=828e5;a>s?a=s:a<0&&(a=0);let r=wm(o),l=e?b3(o):0;return n.setHours(a,r,l),n}var W4=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=W.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=V2(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}destroy(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown({destroy:!0}),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,o;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":{t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown({emitCloseEvent:!0}));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((o=this._dropdownConfig)==null?void 0:o.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":{t.preventDefault();let a=M3(this._allowSeconds);if(this._value!==a){let s=lt(a,!0,this._allowSeconds);this._emitChangeEvent(s)&&(this._applyValue(a),this._selectInputText())}break}}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown({emitCloseEvent:!0}):(Q2.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown({emitCloseEvent:!0})}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:Ne(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown({emitCloseEvent:!0})}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=lt(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(_m(this._value)),this._isInitialized&&t!==this._value){let e=lt(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown({emitCloseEvent:!0}),t=Xl(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let o;!this._masked&&typeof this._parseCallback=="function"?o=this._parseCallback.call(null,t):o=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),o=this._validateMillis(o),this._trySetValue(o)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(W.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=lt(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(W.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){return typeof t=="number"&&(typeof this._min=="number"||typeof this._max=="number")&&(this._isTimeInRange(t,this._min,this._max)||(t=null)),typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isTimeInRange(t,e,o){return typeof e!="number"&&typeof o!="number"?!0:typeof e=="number"&&typeof o!="number"?t>=e:typeof o=="number"&&typeof e!="number"?t<=o:typeof e=="number"&&typeof o=="number"?e<=o?t>=e&&t<=o:t>=e||t<=o:!0}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):$l(t)}_isValidInputValue(t){return Jo.test(t)}_onSelect(t){if(this._closeDropdown({emitCloseEvent:!0}),!t.isCustom&&t.metadata==="now"&&(t.time=M3(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let a=t.customCallback.call(null,t.metadata);if(typeof a!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=a}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=lt(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let o=this._formatValue(this._value);this._adapter.getInputValue()!==o&&this._adapter.setInputValue(o,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>W.numbers.MAX_DAY_MILLIS?W.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length||!this._adapter.inputElement)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(W.attributes.OPEN);let e=t.filter(s=>!s.divider&&!s.disabled),o=[],a=0;if(t.length)if(this._value!=null){let s=this._findClosestOptionIndex(this._value,e);s>=0&&(e[s].value.time===this._value?o=[e[s].value]:a=s)}else if(typeof this._startTime=="number"){let s=this._findClosestOptionIndex(this._startTime,e);s>=0&&s<e.length&&(a=s)}else this._startTime==null&&(a=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,referenceElement:this._adapter.inputElement,selectedValues:o,syncWidth:!0,visibleStartIndex:a,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:s=>this._onSelect(s),closeCallback:()=>this._closeDropdown({emitCloseEvent:!0}),activeChangeCallback:s=>this._adapter.setActiveDescendant(s),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(W.events.OPEN,void 0,!1)}_closeDropdown({destroy:t=!1,emitCloseEvent:e=!1}={}){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(W.attributes.OPEN),this._adapter.detachDropdown({destroy:t}),e&&this._adapter.emitHostEvent(W.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,o=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,a=F4(o,!0,!1);return this._findClosestOptionIndex(a,t)}_findClosestOptionIndex(t,e){let o=e.reduce((a,s)=>Math.abs((s.value.time||0)-t)<Math.abs((a.value.time||0)-t)?s:a);return e.indexOf(o)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let o=this._formatValue(this._value);e!==o&&(this._adapter.setInputValue(o,t),this._adapter.emitInputEvent(W.events.INPUT,o))}_generateTimeOptions(){let t=this._min!=null?Math.max(U4(this._min),0):0,e=this._max!=null?Math.min(U4(this._max),W.numbers.MAX_DAY_MINUTES):W.numbers.MAX_DAY_MINUTES,o=this._step,a=[],s=[];if(this._showHourOptions){let r=this._min!=null&&this._max!=null&&this._min>this._max;if(r){for(let l=t;l<W.numbers.MAX_DAY_MINUTES;l+=o){let h=Wa(l),v=this._restrictedTimes.includes(h),m=lt(h,this._use24HourTime,!1)||"",u={time:h};a.push({label:m,value:u,disabled:v})}for(let l=0;l<=e;l+=o){let h=Wa(l),v=this._restrictedTimes.includes(h),m=lt(h,this._use24HourTime,!1)||"",u={time:h};a.push({label:m,value:u,disabled:v})}}else{let l=this._min!=null?t:0,h=this._max!=null?e:W.numbers.MAX_DAY_MINUTES;for(let v=l;v<=h&&v!==W.numbers.MAX_DAY_MINUTES;v+=o){let m=Wa(v),u=this._restrictedTimes.includes(m),z=lt(m,this._use24HourTime,!1)||"",x={time:m};a.push({label:z,value:x,disabled:u})}}if(!r){let l=a.findIndex(h=>h.value.time/1e3/60>=720);l>=0&&l<a.length-1&&a.splice(l,0,{label:"",value:null,divider:!0})}}if(this._showNow){let r={time:null,metadata:"now"};s.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(l=>{let h={time:null,metadata:l.value,isCustom:!0,customCallback:l.toMilliseconds};return{label:l.label,value:h}});s=[...s,...r]}return s.length&&(a.length&&a.splice(0,0,{label:"",value:null,divider:!0}),s.forEach((r,l)=>a.splice(l,0,r))),a}_convertTimeStringToMillis(t,e,o){return(!t||!this._isValidTimeFormat(t))&&(t=""),F4(t,e,o)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):lt(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(W.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(W.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(W.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return lt(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return lt(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._value,o=this._validateMillis(this._value);if(this._setValue(o),this._isInitialized&&(this._applyValue(o),e!==o)){let a=lt(o,!0,this._allowSeconds);this._emitChangeEvent(a)}}}get max(){return lt(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._value,o=this._validateMillis(this._value);if(this._setValue(o),this._isInitialized&&(this._applyValue(o),e!==o)){let a=lt(o,!0,this._allowSeconds);this._emitChangeEvent(a)}}}get restrictedTimes(){return this._restrictedTimes.map(t=>lt(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return lt(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(W.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var ay="<template><slot></slot></template>",ny=":host{display:block}:host([hidden]){display:none}",W1=class extends M{static get observedAttributes(){return[W.attributes.VALUE,W.attributes.OPEN,W.attributes.ALLOW_SECONDS,W.attributes.MASKED,W.attributes.SHOW_MASK_FORMAT,W.attributes.USE_24_HOUR_TIME,W.attributes.ALLOW_INVALID_TIME,W.attributes.MIN,W.attributes.MAX,W.attributes.START_TIME,W.attributes.STEP,W.attributes.ALLOW_INPUT,W.attributes.SHOW_NOW,W.attributes.SHOW_HOUR_OPTIONS,W.attributes.DISABLED,W.attributes.POPUP_CLASSES,W.attributes.ALLOW_DROPDOWN]}constructor(){super(),X.define([ml,jo]),H(this,ay,ny),this._core=new W4(new R4(this))}connectedCallback(){this.querySelector(W.selectors.INPUT)?this._core.initialize():C0(this,W.selectors.INPUT).then(()=>this._core.initialize())}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case W.attributes.VALUE:this.value=o;break;case W.attributes.OPEN:this.open=p(o);break;case W.attributes.ALLOW_SECONDS:this.allowSeconds=p(o);break;case W.attributes.MASKED:this.masked=p(o);break;case W.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=p(o);break;case W.attributes.USE_24_HOUR_TIME:this.use24HourTime=p(o);break;case W.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=p(o);break;case W.attributes.SHOW_NOW:this.showNow=p(o);break;case W.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=p(o);break;case W.attributes.MIN:this.min=o;break;case W.attributes.MAX:this.max=o;break;case W.attributes.START_TIME:this.startTime=o;break;case W.attributes.STEP:this.step=K(o);break;case W.attributes.ALLOW_INPUT:this.allowInput=p(o);break;case W.attributes.DISABLED:this.disabled=p(o);break;case W.attributes.POPUP_CLASSES:this.popupClasses=o;break;case W.attributes.ALLOW_DROPDOWN:this.allowDropdown=p(o);break}}};i([c()],W1.prototype,"value",2),i([c()],W1.prototype,"open",2),i([c()],W1.prototype,"allowSeconds",2),i([c()],W1.prototype,"masked",2),i([c()],W1.prototype,"showMaskFormat",2),i([c()],W1.prototype,"use24HourTime",2),i([c()],W1.prototype,"allowInvalidTime",2),i([c()],W1.prototype,"min",2),i([c()],W1.prototype,"max",2),i([c()],W1.prototype,"restrictedTimes",2),i([c()],W1.prototype,"startTime",2),i([c()],W1.prototype,"step",2),i([c()],W1.prototype,"allowInput",2),i([c()],W1.prototype,"showNow",2),i([c()],W1.prototype,"showHourOptions",2),i([c()],W1.prototype,"customOptions",2),i([c()],W1.prototype,"validationCallback",2),i([c()],W1.prototype,"parseCallback",2),i([c()],W1.prototype,"formatCallback",2),i([c()],W1.prototype,"coercionCallback",2),i([c()],W1.prototype,"prepareMaskCallback",2),i([c()],W1.prototype,"disabled",2),i([c()],W1.prototype,"popupClasses",2),i([c()],W1.prototype,"allowDropdown",2),i([c()],W1.prototype,"popupTarget",2),W1=i([y({name:W.elementName,dependencies:[v2,j1,i1,j,R1,j,B1]})],W1);var xm=class extends o2{constructor(t){super(t)}_build(){let t=document.createElement(W.elementName);return this._attachTextField(t),t}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(t){this._element.value=t}get disabled(){return this._element.disabled}set disabled(t){this._element.disabled=t}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(t){this._textFieldDelegate.invalid=t}onChange(t){this._element.addEventListener(W.events.CHANGE,e=>{var o;return t((o=e.detail)!=null?o:"")})}onInput(t){this._element.addEventListener(W.events.INPUT,e=>{var o;return t((o=e.detail)!=null?o:"")})}onFocus(t){this._textFieldDelegate.inputElement.addEventListener("focus",e=>t(e))}onBlur(t){this._textFieldDelegate.inputElement.addEventListener("blur",e=>t(e))}_attachTextField(t){var o,a,s,r;let e={props:d({},(a=(o=this._config.options)==null?void 0:o.textFieldDelegateConfig)==null?void 0:a.props),options:d({},(r=(s=this._config.options)==null?void 0:s.textFieldDelegateConfig)==null?void 0:r.options)};this._textFieldDelegate=new ao(e),t.appendChild(this._textFieldDelegate.element)}};function fm(){f(W1)}var z3=`${b}toast`,bm={OPEN:"open",DURATION:"duration",PLACEMENT:"placement",ACTION_TEXT:"action-text",DISMISSIBLE:"dismissible",DISMISS_LABEL:"dismiss-label",THEME:"theme"},sy=d({},bm),ry={ACTION:`${z3}-action`,CLOSE:`${z3}-close`},iy={EXITING:"exiting"},ly={SURFACE:".surface",ACTION_BUTTON:".action-button",CLOSE_BUTTON:".close-button"},cy={PLACEMENT:"bottom",DURATION:2750,THEME:"default"},k1={elementName:z3,observedAttributes:bm,attributes:sy,classes:iy,selectors:ly,defaults:cy,events:ry};var G4=class extends I{constructor(t){super(t),this._overlayElement=w(t,B.elementName),this._surfaceElement=w(t,k1.selectors.SURFACE),this._actionButtonElement=w(t,k1.selectors.ACTION_BUTTON),this._closeButtonElement=w(t,k1.selectors.CLOSE_BUTTON)}show(){this._overlayElement.open=!0}async hide(){await Gt(this._surfaceElement,k1.classes.EXITING),this._overlayElement.open=!1}addCloseListener(t){this._closeButtonElement.addEventListener("click",t)}removeCloseListener(t){this._closeButtonElement.removeEventListener("click",t)}addActionListener(t){this._actionButtonElement.addEventListener("click",t)}removeActionListener(t){this._actionButtonElement.removeEventListener("click",t)}setDismissLabel(t){this._closeButtonElement.setAttribute("aria-label",t)}setActionText(t){this._actionButtonElement.textContent=t,t?this._actionButtonElement.removeAttribute("hidden"):this._actionButtonElement.setAttribute("hidden","")}};var q4=class{constructor(t){this._adapter=t;this._open=!1;this._duration=k1.defaults.DURATION;this._placement=k1.defaults.PLACEMENT;this._dismissible=!1;this._theme=k1.defaults.THEME;this._actionListener=this._onAction.bind(this);this._closeListener=this._onClose.bind(this)}initialize(){this._adapter.tryApplyGlobalConfiguration(["duration","placement","dismissible"]),this._open&&this.show()}show(){this._adapter.show(),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout&&window.clearTimeout(this._hideTimeout),this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration)),this._open=!0,this._adapter.toggleHostAttribute(k1.attributes.OPEN,this._open)}async hide({dispatchEvent:t=!0}={}){this._hideTimeout&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=void 0),await this._adapter.hide(),this._open=!1,this._adapter.toggleHostAttribute(k1.attributes.OPEN,this._open),t&&this._adapter.dispatchHostEvent(new CustomEvent(k1.events.CLOSE,{bubbles:!0}))}_onAction(t){t.stopPropagation(),this._adapter.dispatchHostEvent(new CustomEvent(k1.events.ACTION,{bubbles:!0}))}_onClose(t){this.hide()}get open(){return this._open}set open(t){t=!!t,this._open!==t&&(this._adapter.isConnected?t?this.show():this.hide({dispatchEvent:!1}):this._open=t,this._adapter.toggleHostAttribute(k1.attributes.OPEN,this._open))}get duration(){return this._duration}set duration(t){this._duration!==t&&(this._duration=t,this._hideTimeout&&(window.clearTimeout(this._hideTimeout),isFinite(this._duration)&&this._duration>0&&(this._hideTimeout=window.setTimeout(()=>this.hide(),this._duration))))}get placement(){return this._placement}set placement(t){this._placement!==t&&(this._placement=t,this._adapter.setHostAttribute(k1.attributes.PLACEMENT,this._placement))}get actionText(){return this._actionText}set actionText(t){var e;t=(e=t==null?void 0:t.trim())!=null?e:"",this._actionText!==t&&(this._actionText=t,this._adapter.setActionText(this._actionText),this._actionText?this._adapter.addActionListener(this._actionListener):this._adapter.removeActionListener(this._actionListener),this._adapter.toggleHostAttribute(k1.attributes.ACTION_TEXT,!!this._actionText,this._actionText))}get dismissible(){return this._dismissible}set dismissible(t){t=!!t,this._dismissible!==t&&(this._dismissible=t,this._dismissible?this._adapter.addCloseListener(this._closeListener):this._adapter.removeCloseListener(this._closeListener),this._adapter.toggleHostAttribute(k1.attributes.DISMISSIBLE,this._dismissible))}get dismissLabel(){return this._dismissLabel}set dismissLabel(t){this._dismissLabel!==t&&(this._dismissLabel=t,this._adapter.setDismissLabel(this._dismissLabel))}get theme(){return this._theme}set theme(t){t!=null||(t=k1.defaults.THEME),this._theme!==t&&(this._theme=t,this._adapter.setHostAttribute(k1.attributes.THEME,this._theme))}};var hy='<template><forge-overlay exportparts="root:overlay" no-anchor persistent><div class="surface" part="surface"><slot name="icon"></slot><div class="message" part="message"><slot></slot></div><forge-button hidden part="action-button" class="action-button"></forge-button><forge-icon-button part="close-button" class="close-button" aria-label="Dismiss" density="medium"><forge-icon name="close"></forge-icon></forge-icon-button></div></forge-overlay></template>',vy='@keyframes slidein{from{transform:translateY(var(--_toast-slide-origin))}to{transform:translateY(0)}}@keyframes slideout{from{transform:translateY(0)}to{transform:translateY(var(--_toast-slide-origin))}}@keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes fadeout{from{opacity:1}to{opacity:0}}@layer base,open,theme,placement,media; @layer base{:host{display:contents}:host([hidden]){display:none}.surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-surface-inverse, #333333));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-surface-inverse, #ffffff));--_toast-offset:var(--forge-toast-offset, var(--forge-spacing-medium, 16px));--_toast-shape:var(--forge-toast-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_toast-elevation:var(--forge-toast-elevation, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12));--_toast-action-color:var(--forge-toast-action-color, var(--forge-theme-secondary, #ffc107));--_toast-min-width:var(--forge-toast-min-width, 344px);--_toast-max-width:var(--forge-toast-max-width, 672px);--_toast-min-height:var(--forge-toast-min-height, 48px);--_toast-inline-padding:var(--forge-toast-inline-padding, var(--forge-spacing-medium, 16px));--_toast-spacing:var(--forge-toast-spacing, var(--forge-spacing-xsmall, 8px));--_toast-message-padding:var(--forge-toast-message-padding, var(--forge-spacing-xsmall, 8px));--_toast-enter-duration:var(--forge-toast-enter-duration, var(--forge-animation-duration-medium1, 250ms));--_toast-enter-timing:var(--forge-toast-enter-timing, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_toast-exit-duration:var(--forge-toast-exit-duration, var(--forge-animation-duration-short4, 200ms));--_toast-exit-timing:var(--forge-toast-exit-timing, var(--forge-animation-easing-emphasized-accelerate, cubic-bezier(0.3, 0, 0.8, 0.15)));--_toast-slide-origin:var(--forge-toast-slide-origin, 100%)}.surface{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-body2-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-body2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-font-size-scale, 1)));font-weight:var(--forge-typography-body2-font-weight,400);line-height:var(--forge-typography-body2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-body-line-height-scale, 1.375)));letter-spacing:var(--forge-typography-body2-letter-spacing, .015625em);text-transform:var(--forge-typography-body2-text-transform,inherit);text-decoration:var(--forge-typography-body2-text-decoration,inherit);position:fixed;display:flex;align-items:center;column-gap:var(--_toast-spacing);border-radius:var(--_toast-shape);padding-inline:var(--_toast-inline-padding);margin:var(--_toast-offset);min-width:var(--_toast-min-width);max-width:var(--_toast-max-width);min-height:var(--_toast-min-height);box-sizing:border-box;background:var(--_toast-background);color:var(--_toast-color);box-shadow:var(--_toast-elevation)}.message{flex-grow:1;padding-block:var(--_toast-message-padding);text-overflow:ellipsis;overflow:hidden}forge-button.action-button{--forge-button-primary-color:var(--_toast-action-color)}forge-icon-button.close-button{--forge-icon-button-focus-indicator-color:var(--_toast-color)}:host(:not([dismissible])) .close-button{display:none}.action-button:not([hidden]){margin-inline-end:-8px}:host([dismissible]) .close-button{margin-inline-end:-8px}}@layer theme{:host([theme=primary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-primary, #3f51b5));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-primary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=secondary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-secondary, #ffc107));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-secondary, #000000));--_toast-action-color:var(--_toast-color)}:host([theme=tertiary]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-tertiary, #3d5afe));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-tertiary, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=success]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-success, #2e7d32));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-success, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=warning]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-warning, #d14900));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-warning, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=error]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-error, #b00020));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-error, #ffffff));--_toast-action-color:var(--_toast-color)}:host([theme=info]) .surface{--_toast-background:var(--forge-toast-background, var(--forge-theme-info, #1565c0));--_toast-color:var(--forge-toast-color, var(--forge-theme-on-info, #ffffff));--_toast-action-color:var(--_toast-color)}}@layer open{forge-overlay[open] .surface{animation-name:slidein;animation-duration:var(--_toast-enter-duration);animation-timing-function:var(--_toast-enter-timing)}forge-overlay[open] .surface.exiting{animation-name:slideout;animation-duration:var(--_toast-exit-duration);animation-timing-function:var(--_toast-exit-timing)}}@layer placement{:host([placement=bottom-start]) .surface{bottom:0;left:0}:host(:is(:not([placement]),[placement=bottom])) .surface{bottom:0;left:50%;translate:-50%}:host([placement=bottom-end]) .surface{bottom:0;right:0}:host([placement=top-start]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:0}:host([placement=top]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;left:50%;translate:-50%}:host([placement=top-end]) .surface{--_toast-slide-origin:var(--forge-toast-slide-origin, -100%);top:0;right:0}}@layer media{@media (prefers-reduced-motion:reduce){forge-overlay[open] .surface{animation-name:fadein}forge-overlay[open] .surface.exiting{animation-name:fadeout}}@media (max-width:599px){:host([placement^=top]) .surface{bottom:auto;top:0}.surface{bottom:0;left:0;right:0;margin:0;translate:none;max-width:none;min-width:auto;border-radius:0}}}',Jt=class extends L1(V1(M)){static get observedAttributes(){return Object.values(k1.observedAttributes)}constructor(){super(),X.define(jo),H(this,hy,vy),this._core=new q4(new G4(this))}connectedCallback(){this.hasAttribute("role")||this.getAttribute("aria-hidden")==="true"||this[N]({role:"alert",ariaLive:"assertive",ariaAtomic:"true"}),this._core.initialize()}attributeChangedCallback(t,e,o){switch(t){case k1.attributes.OPEN:this.open=p(o);break;case k1.attributes.DURATION:{let a=Number(o);this.duration=a&&a>0?a:k1.defaults.DURATION;break}case k1.attributes.PLACEMENT:this.placement=o||k1.defaults.PLACEMENT;break;case k1.attributes.ACTION_TEXT:this.actionText=o;break;case k1.attributes.DISMISSIBLE:this.dismissible=p(o);break;case k1.attributes.DISMISS_LABEL:this.dismissLabel=o;break;case k1.attributes.THEME:this.theme=o;break}}show(){this._core.show()}hide(){return this._core.hide()}static present(l){var h=l,{message:t,element:e,icon:o,className:a,topLayer:s}=h,r=O1(h,["message","element","icon","className","topLayer"]);let v=document.createElement(k1.elementName);if(e?v.appendChild(e):t&&v.append(t),o){let u=document.createElement("forge-icon");Object.assign(u,o),u.slot="icon",v.appendChild(u)}if(a){let u=Array.isArray(a)?a:[a];v.classList.add(...u)}return r&&Object.assign(v,r),(s&&Array.from(B1[b0]).at(-1)||document.body).appendChild(v),v.open=!0,v.addEventListener(k1.events.CLOSE,()=>v.remove()),v}};i([c()],Jt.prototype,"open",2),i([c()],Jt.prototype,"duration",2),i([c()],Jt.prototype,"placement",2),i([c()],Jt.prototype,"actionText",2),i([c()],Jt.prototype,"dismissible",2),i([c()],Jt.prototype,"dismissLabel",2),i([c()],Jt.prototype,"theme",2),Jt=i([y({name:k1.elementName,dependencies:[d2,T2,i1,j]})],Jt);function ym(){f(Jt)}var py=`${b}view-switcher`,H3={ROOT:"forge-view-switcher",VIEW_HIDDEN:"forge-view-switcher__view--hidden",VIEW_SWITCHER_SLIDE:"slide",VIEW_SWITCHER_FADE:"fade"},my={ROOT:`.${H3.ROOT}`,DEFAULT_SLOT:"slot:not([name])",VIEW_HIDDEN:`.${H3.VIEW_HIDDEN}`},dy={INDEX:"index",ANIMATION_TYPE:"animation-type"},gy={DEFAULT_TRANSITION_DURATION:500},e2={elementName:py,attributes:dy,classes:H3,selectors:my,numbers:gy},I3=(e=>(e.Left="left",e.Right="right",e))(I3||{}),wy=(o=>(o.None="none",o.Slide="slide",o.Fade="fade",o))(wy||{});var Y4=class extends I{constructor(t){super(t),this._rootElement=w(t,e2.selectors.ROOT),this._slotElement=w(t,e2.selectors.DEFAULT_SLOT)}getViewCount(){return this._getViews().length}startViewObserver(t){this._viewObserver=new MutationObserver(t),this._viewObserver.observe(this._component,{childList:!0})}stopViewObserver(){var t;(t=this._viewObserver)==null||t.disconnect()}initializeSlideViews(t){let e=this._getViews();e.forEach((o,a)=>{if(o.style.removeProperty("opacity"),o.style.removeProperty("display"),a===t){e[t].classList.remove(e2.classes.VIEW_HIDDEN),o.style.removeProperty("visibility");return}o.style.transition="none",o.classList.add(e2.classes.VIEW_HIDDEN),o.style.visibility="hidden",a>t?o.style.transform="translate3d(100%, 0, 0)":o.style.transform="translate3d(-100%, 0, 0)"}),window.requestAnimationFrame(()=>{e=this._getViews(),e.forEach((o,a)=>{a!==t&&o.style.removeProperty("transition")})})}initializeFadeViews(t){let e=this._getViews();e.forEach((o,a)=>{if(o.style.removeProperty("transform"),o.style.removeProperty("display"),a===t){o.classList.remove(e2.classes.VIEW_HIDDEN),o.style.removeProperty("visibility");return}o.classList.add(e2.classes.VIEW_HIDDEN),o.style.visibility="hidden"}),e[t]&&(e[t].style.opacity="1")}setActiveView(t){let e=this._getViews();e.forEach((o,a)=>{a!==t&&(o.classList.add(e2.classes.VIEW_HIDDEN),o.style.display="none")}),e[t]&&(e[t].classList.remove(e2.classes.VIEW_HIDDEN),e[t].style.removeProperty("display"))}hideInactiveViews(t){this._getViews().forEach((o,a)=>{if(o.style.removeProperty("opacity"),o.style.removeProperty("transform"),o.style.removeProperty("visibility"),a===t){o.classList.remove(e2.classes.VIEW_HIDDEN);return}o.classList.add(e2.classes.VIEW_HIDDEN),o.style.display="none"})}async transitionToView(t,e,o,a){let s=this._getViews(),r=s[t],l=s[e];return new Promise(h=>{l.style.removeProperty("visibility"),window.requestAnimationFrame(()=>{let v;switch(o){case"slide":this._slideToView(r,l,a),v="transform";break;case"fade":this._fadeToView(r,l),v="opacity";break;default:return}this._animateHeight(r,l),r?r.addEventListener("transitionend",m):l.classList.remove(e2.classes.VIEW_HIDDEN);function m(u){u.propertyName===v&&(r.removeEventListener("transitionend",m),l.classList.remove(e2.classes.VIEW_HIDDEN),h())}})})}_slideToView(t,e,o){o==="left"?(t&&(t.style.transform="translate3d(-100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)"):(t&&(t.style.transform="translate3d(100%, 0, 0)"),e.style.transform="translate3d(0, 0, 0)")}_fadeToView(t,e){t&&(t.style.opacity="0"),e.style.opacity="1"}_animateHeight(t,e){let o=t?this._getViewHeight(t):0,a=this._getViewHeight(e);o!==a&&(this._rootElement.addEventListener("transitionend",this._onRootTransitionEnd.bind(this)),this._setHeight(o),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._setHeight(a)})}))}_onRootTransitionEnd(t){t.propertyName==="height"&&(this._rootElement.removeEventListener("transitionend",this._onRootTransitionEnd),this._rootElement.style.removeProperty("height"))}setAnimationType(t){switch(ye([e2.classes.VIEW_SWITCHER_SLIDE,e2.classes.VIEW_SWITCHER_FADE],this._component),t){case"slide":this._component.classList.add(e2.classes.VIEW_SWITCHER_SLIDE);break;case"fade":this._component.classList.add(e2.classes.VIEW_SWITCHER_FADE);break}}_getViews(){return this._slotElement.assignedNodes().filter(t=>t.nodeType===1)}_setHeight(t){this._rootElement.style.height=`${t}px`}_getViewHeight(t){let e=0,o=t.children.length?Array.from(t.children):[t];for(let a of o){let s=window.getComputedStyle(a),r=parseFloat(s.marginTop)+parseFloat(s.marginBottom);e+=Math.ceil(a.offsetHeight+r)}return e}};var K4=class{constructor(t){this._adapter=t;this._viewCount=0;this._viewIndex=0;this._animationType="none";this._viewsChangedListener=()=>this._onViewsChanged()}initialize(){this._viewCount=this._adapter.getViewCount(),this._adapter.startViewObserver(this._viewsChangedListener),this._adapter.setAnimationType(this._animationType),this._viewCount&&this._initializeAnimationType()}destroy(){this._adapter.stopViewObserver()}_initializeAnimationType(){switch(this._animationType){case"slide":this._adapter.initializeSlideViews(this._viewIndex);break;case"fade":this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.hideInactiveViews(this._viewIndex);break}}_onViewsChanged(){if(this._viewCount=this._adapter.getViewCount(),this._viewCount===0&&(this._viewIndex=0),this._viewCount&&this._initializeAnimationType(),this._viewCount>0&&this._viewIndex>=this._viewCount){let t=this._viewIndex;this._viewIndex=this._viewCount>0?this._viewCount-1:0,this._goToView(t,this._viewCount)}}async _goToView(t,e){if(this._viewCount=O(e)?e:this._adapter.getViewCount(),!(!(this._viewIndex>=0&&this._viewIndex<=this._viewCount-1)||t===this._clampedViewIndex(this._viewIndex,this._viewCount)))switch(this._animationType){case"slide":{let a=this._viewIndex>t?"left":"right";await this._adapter.transitionToView(t,this._viewIndex,"slide",a),this._adapter.initializeSlideViews(this._viewIndex);break}case"fade":await this._adapter.transitionToView(t,this._viewIndex,"fade"),this._adapter.initializeFadeViews(this._viewIndex);break;case"none":default:this._adapter.setActiveView(this._viewIndex);break}}_clampedViewIndex(t,e){return t<0?t=0:t>e-1&&(t=e>0?e-1:0),t}next(){this.index++}previous(){this.index--}goToStart(){this.index=0}goToEnd(){this.index=this._viewCount-1}get index(){return this._viewIndex}set index(t){if(this._viewIndex!==t){let e=this._viewIndex;this._viewIndex=t,this._goToView(e),this._adapter.setHostAttribute(e2.attributes.INDEX,this._viewIndex.toString())}}get animationType(){return this._animationType}set animationType(t){this._animationType!==t&&(this._animationType=t,this._initializeAnimationType(),this._adapter.setAnimationType(this._animationType),this._adapter.setHostAttribute(e2.attributes.ANIMATION_TYPE,this._animationType))}};var uy=`${b}view`,Mm={elementName:uy};var _y="<template><slot></slot></template>",xy=":host{display:block}:host([hidden]){display:none}",mo=class extends M{constructor(){super(),H(this,_y,xy)}};mo=i([y({name:Mm.elementName})],mo);var fy='<template><div class="forge-view-switcher" part="root"><slot></slot></div></template>',by=":host{height:var(--_view-switcher-height);width:var(--_view-switcher-width);display:block}:host{--_view-switcher-height:var(--forge-view-switcher-height, auto);--_view-switcher-width:var(--forge-view-switcher-width, auto)}:host([hidden]){display:none}.forge-view-switcher{--_view-switcher-animation-duration:var(--forge-view-switcher-animation-duration, var(--forge-animation-duration-medium2, 300ms));--_view-switcher-animation-easing:var(--forge-view-switcher-animation-easing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)))}.forge-view-switcher{height:var(--_view-switcher-height);width:var(--_view-switcher-width);position:relative;overflow:hidden;transition-property:height;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing)}.forge-view-switcher ::slotted(.forge-view-switcher__view--hidden){position:absolute;top:0;right:0;bottom:0;left:0}:host(.slide) ::slotted(forge-view){transition-property:transform;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:transform}:host(.fade) ::slotted(forge-view){transition-property:opacity;transition-duration:var(--_view-switcher-animation-duration);transition-timing-function:var(--_view-switcher-animation-easing);will-change:opacity}:host(.fade) ::slotted(.forge-view-switcher__view--hidden){opacity:0}",go=class extends M{static get observedAttributes(){return[e2.attributes.INDEX,e2.attributes.ANIMATION_TYPE]}constructor(){super(),H(this,fy,by),this._core=new K4(new Y4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case e2.attributes.INDEX:this.index=K(o);break;case e2.attributes.ANIMATION_TYPE:this.animationType=o;break}}next(){this._core.next()}previous(){this._core.previous()}goToStart(){this._core.goToStart()}goToEnd(){this._core.goToEnd()}};i([c()],go.prototype,"index",2),i([c()],go.prototype,"animationType",2),go=i([y({name:e2.elementName,dependencies:[mo]})],go);function zm(){f(mo)}function Hm(){f(go)}var yy=`${b}deprecated-button`,My={TYPE:"type",DISABLED:"disabled",FULL_WIDTH:"full-width"},zy={BUTTON:"button,a"},Ft={elementName:yy,attributes:My,selectors:zy};var Hy='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Iy=':host{--_button-primary-color:var(--forge-button-primary-color, var(--forge-theme-primary, #3f51b5));--_button-text-color:var(--forge-button-text-color, var(--_button-primary-color));--_button-disabled-color:var(--forge-button-disabled-color, var(--forge-theme-surface-container, #e0e0e0));--_button-padding:var(--forge-button-padding, var(--forge-spacing-medium, 16px));--_button-display:var(--forge-button-display, inline-grid);--_button-justify:var(--forge-button-justify, center);--_button-shape:var(--forge-button-shape, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_button-height:var(--forge-button-height, 36px);--_button-min-width:var(--forge-button-min-width, 64px);--_button-spacing:var(--forge-button-spacing, var(--forge-spacing-xsmall, 8px));--_button-border-width:var(--forge-button-border-width, medium);--_button-border-style:var(--forge-button-border-style, none);--_button-border-color:var(--forge-button-border-color, currentColor);--_button-shape-start-start-radius:var(--forge-button-shape-start-start-radius, var(--_button-shape));--_button-shape-start-end-radius:var(--forge-button-shape-start-end-radius, var(--_button-shape));--_button-shape-end-start-radius:var(--forge-button-shape-end-start-radius, var(--_button-shape));--_button-shape-end-end-radius:var(--forge-button-shape-end-end-radius, var(--_button-shape));--_button-padding-block:var(--forge-button-padding-block, var(--_button-0));--_button-padding-inline:var(--forge-button-padding-inline, var(--_button-padding));--_button-background:var(--forge-button-background, transparent);--_button-hover-background:var(--forge-button-hover-background, var(--_button-background));--_button-active-background:var(--forge-button-active-background, var(--_button-background));--_button-color:var(--forge-button-color, var(--_button-text-color));--_button-icon-size:var(--forge-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_button-shadow:var(--forge-button-shadow, none);--_button-hover-shadow:var(--forge-button-hover-shadow, none);--_button-active-shadow:var(--forge-button-active-shadow, none);--_button-cursor:var(--forge-button-cursor, pointer);--_button-transition-duration:var(--forge-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-transition-timing:var(--forge-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-text-padding-inline:var(--forge-button-text-padding-inline, var(--forge-spacing-xsmall, 8px));--_button-outlined-background:var(--forge-button-outlined-background, transparent);--_button-outlined-color:var(--forge-button-outlined-color, var(--_button-primary-color));--_button-outlined-border-width:var(--forge-button-outlined-border-width, var(--forge-border-thin, 1px));--_button-outlined-border-style:var(--forge-button-outlined-border-style, solid);--_button-outlined-border-color:var(--forge-button-outlined-border-color, var(--_button-primary-color));--_button-tonal-background:var(--forge-button-tonal-background, var(--forge-theme-primary-container, #d1d5ed));--_button-tonal-disabled-background:var(--forge-button-tonal-disabled-background, var(--_button-disabled-color));--_button-tonal-color:var(--forge-button-tonal-color, var(--forge-theme-on-primary-container, #222c62));--_button-tonal-disabled-color:var(--forge-button-tonal-disabled-color, var(--_button-disabled-text-color));--_button-filled-background:var(--forge-button-filled-background, var(--_button-primary-color));--_button-filled-disabled-background:var(--forge-button-filled-disabled-background, var(--_button-disabled-color));--_button-filled-color:var(--forge-button-filled-color, var(--forge-theme-on-primary, #ffffff));--_button-filled-disabled-color:var(--forge-button-filled-disabled-color, var(--_button-disabled-text-color));--_button-raised-background:var(--forge-button-raised-background, var(--_button-primary-color));--_button-raised-disabled-background:var(--forge-button-raised-disabled-background, var(--_button-disabled-color));--_button-raised-color:var(--forge-button-raised-color, var(--forge-theme-on-primary, #ffffff));--_button-raised-disabled-color:var(--forge-button-raised-disabled-color, var(--_button-disabled-text-color));--_button-raised-shadow:var(--forge-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_button-raised-hover-shadow:var(--forge-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_button-raised-active-shadow:var(--forge-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_button-raised-disabled-shadow:var(--forge-button-raised-disabled-shadow, none);--_button-link-color:var(--forge-button-link-color, var(--_button-primary-color));--_button-link-text-decoration:var(--forge-button-link-text-decoration, underline);--_button-link-height:var(--forge-button-link-height, auto);--_button-link-padding:var(--forge-button-link-padding, 0);--_button-link-line-height:var(--forge-button-link-line-height, normal);--_button-link-width:var(--forge-button-link-width, auto);--_button-link-hover-text-decoration:var(--forge-button-link-hover-text-decoration, none);--_button-link-active-opacity:var(--forge-button-link-active-opacity, 0.65);--_button-link-transition-duration:var(--forge-button-link-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-link-transition-timing:var(--forge-button-link-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-disabled-cursor:var(--forge-button-disabled-cursor, not-allowed);--_button-disabled-text-color:var(--forge-button-disabled-text-color, var(--forge-theme-text-low, rgba(0, 0, 0, 0.38)));--_button-disabled-background:var(--forge-button-disabled-background, transparent);--_button-disabled-border-color:var(--forge-button-disabled-border-color, var(--_button-disabled-color));--_button-disabled-shadow:var(--forge-button-disabled-shadow, none);--_button-dense-height:var(--forge-button-dense-height, 24px);--_button-pill-shape:var(--forge-button-pill-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_button-pill-padding-inline:var(--forge-button-pill-padding-inline, var(--forge-spacing-small, 12px));--_button-focus-indicator-offset:var(--forge-button-focus-indicator-offset, 4px);--_button-text-focus-indicator-offset:var(--forge-button-text-focus-indicator-offset, 0px);--_button-link-focus-indicator-offset:var(--forge-button-link-focus-indicator-offset, 2px);--_button-popover-icon-transition-duration:var(--forge-button-popover-icon-transition-duration, var(--forge-animation-duration-short3, 150ms));--_button-popover-icon-transition-timing:var(--forge-button-popover-icon-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_button-popover-icon-open-rotation:var(--forge-button-popover-icon-open-rotation, 180deg)}:host{display:var(--_button-display);position:relative;outline:0;vertical-align:middle;-webkit-tap-highlight-color:transparent;border-radius:var(--_button-shape)}:host([hidden]){display:none}::slotted(:is(button,a)){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-button-font-family, var(--forge-typography-font-family, "Roboto", sans-serif));font-size:var(--forge-typography-button-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-button-font-size-scale, .875)));font-weight:var(--forge-typography-button-font-weight,500);line-height:var(--forge-typography-button-line-height, normal);letter-spacing:var(--forge-typography-button-letter-spacing, .0714285714em);text-transform:var(--forge-typography-button-text-transform,inherit);text-decoration:var(--forge-typography-button-text-decoration,inherit);position:relative;display:var(--_button-display);grid-auto-flow:column;align-items:center;justify-content:var(--_button-justify);gap:var(--_button-spacing);z-index:0;box-sizing:border-box;min-inline-size:var(--_button-min-width);height:var(--_button-height);inline-size:100%;border-width:var(--_button-border-width);border-style:var(--_button-border-style);border-color:var(--_button-border-color);border-start-start-radius:var(--_button-shape-start-start-radius);border-start-end-radius:var(--_button-shape-start-end-radius);border-end-start-radius:var(--_button-shape-end-start-radius);border-end-end-radius:var(--_button-shape-end-end-radius);padding-block:var(--_button-padding-block);padding-inline:var(--_button-padding-inline);box-shadow:var(--_button-shadow);outline:0;user-select:none;-webkit-appearance:none;vertical-align:middle;text-decoration:none;white-space:nowrap;background:var(--_button-background);color:var(--_button-color);cursor:var(--_button-cursor);transition-property:box-shadow,background;transition-duration:var(--_button-transition-duration);transition-timing-function:var(--_button-transition-timing);--forge-icon-font-size:1.25em}::slotted(:is(button,a))::-moz-focus-inner{padding:0;border:0}::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-hover-shadow);background:var(--_button-hover-background)}::slotted(:is(button,a)):active{--_button-shadow:var(--_button-active-shadow);background:var(--_button-active-background)}::slotted(a){text-decoration:none;--forge-typography-link-text-decoration:none}forge-state-layer{--forge-state-layer-color:var(--_button-color)}forge-focus-indicator{--forge-focus-indicator-color:var(--_button-primary-color);--forge-focus-indicator-outward-offset:var(--_button-focus-indicator-offset)}:host(:is([type*=unelevated],[type*=raised])) ::slotted(:is(button,a)){--_button-background:var(--_button-filled-background);--_button-color:var(--_button-filled-color)}:host(:is([type*=unelevated],[type*=raised])) forge-state-layer{--forge-state-layer-color:var(--_button-filled-color)}:host([type*=raised]) ::slotted(:is(button,a)){--_button-background:var(--_button-raised-background);--_button-color:var(--_button-raised-color);--_button-shadow:var(--_button-raised-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):hover{--_button-shadow:var(--_button-raised-hover-shadow)}:host([type*=raised]) ::slotted(:is(button,a)):active{--_button-shadow:var(--_button-raised-active-shadow)}:host([type*=outlined]) ::slotted(:is(button,a)){--_button-background:var(--_button-outlined-background);--_button-color:var(--_button-outlined-color);--_button-border-width:var(--_button-outlined-border-width);--_button-border-style:var(--_button-outlined-border-style);--_button-border-color:var(--_button-outlined-border-color)}:host([full-width]){width:100%}:host(:is([dense],[type*=dense])) ::slotted(:is(button,a)){--_button-height:var(--_button-dense-height)}:host([disabled]){cursor:var(--_button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-disabled-background);--_button-color:var(--_button-disabled-text-color);--_button-shadow:var(--_button-disabled-shadow);pointer-events:none}:host([type*=outlined][disabled]) ::slotted(button[disabled]){--_button-border-color:var(--_button-disabled-border-color)}:host(:is([type*=unelevated],[type*=raised])[disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-filled-disabled-background);--_button-color:var(--_button-filled-disabled-color)}:host([type*=raised][disabled]) ::slotted(button[disabled]){--_button-background:var(--_button-raised-disabled-background);--_button-color:var(--_button-raised-disabled-color);--_button-shadow:var(--_button-raised-disabled-shadow)}',Ga=class extends M{constructor(){super();this._buttonOrAnchorElement=null;this._disabled=!1;this._fullWidth=!1;this._buttonChangeListener=this._onButtonChange.bind(this);this._keydownListener=e=>this._onKeydown(e);H(this,Hy,Iy),this._slotElement=w(this,"slot:not([name])"),this._focusIndicator=w(this,w1.elementName),this._stateLayer=w(this,I1.elementName)}static get observedAttributes(){return Object.values(Ft.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._buttonChangeListener),this.children.length?this._initialize():Ko(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,o,a){switch(e){case Ft.attributes.TYPE:this.type=a;return;case Ft.attributes.DISABLED:this.disabled=p(a);return;case Ft.attributes.FULL_WIDTH:this.fullWidth=p(a);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onButtonChange(){this._detachButton(),this._initialize()}_initialize(){this._buttonOrAnchorElement=this.querySelector(Ft.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(o=>o.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;G(this,e,Ft.attributes.DISABLED)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}get type(){return this._type}set type(e){this._type!==e&&(this._type=e,this.setAttribute(Ft.attributes.TYPE,this._type))}get disabled(){return this._disabled}set disabled(e){var o;this._disabled!==e&&(this._disabled=e,(o=this._buttonOrAnchorElement)==null||o.toggleAttribute(Ft.attributes.DISABLED,this._disabled),this.toggleAttribute(Ft.attributes.DISABLED,this._disabled))}get fullWidth(){return this._fullWidth}set fullWidth(e){this._fullWidth!==e&&(this._fullWidth=e,this.toggleAttribute(Ft.attributes.FULL_WIDTH,this._fullWidth))}focus(e){var o;(o=this._buttonOrAnchorElement)==null||o.focus(e)}};Ga=i([y({name:Ft.elementName,dependencies:[J,r1]})],Ga);var Im=class extends Z1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e,o;let t=document.createElement(Ft.elementName);return this._buttonElement=document.createElement("button"),this._buttonElement.type=((e=this._config.options)==null?void 0:e.type)||"button",this._buttonElement.textContent=((o=this._config.options)==null?void 0:o.text)||"",t.appendChild(this._buttonElement),t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",o=>t(o))}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",o=>t(o))}};function Lm(){f(Ga)}var Ly=`${b}deprecated-icon-button`,Vm={DISABLED:"disabled",TOGGLE:"toggle",IS_ON:"is-on",DENSITY_LEVEL:"density-level"},Vy=S(d({},Vm),{ON_ICON:"forge-icon-button-on"}),Cy={BUTTON:"button,a",ICON_LIKE:"button > i,span,svg,img,forge-icon"},Ey={TOGGLE:"forge-icon-button-toggle"},j2={elementName:Ly,observedAttributes:Vm,attributes:Vy,selectors:Cy,events:Ey};var By='<template><slot></slot><forge-focus-indicator part="focus-indicator"></forge-focus-indicator><forge-state-layer exportparts="surface:state-layer"></forge-state-layer></template>',Ay=":host{--_icon-button-display:var(--forge-icon-button-display, inline-flex);--_icon-button-size:var(--forge-icon-button-size, 48px);--_icon-button-gap:var(--forge-icon-button-gap, 0);--_icon-button-icon-color:var(--forge-icon-button-icon-color, currentColor);--_icon-button-background-color:var(--forge-icon-button-background-color, none);--_icon-button-icon-size:var(--forge-icon-button-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.5));--_icon-button-cursor:var(--forge-icon-button-cursor, pointer);--_icon-button-padding:var(--forge-icon-button-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-border:var(--forge-icon-button-border, none);--_icon-button-shadow:var(--forge-icon-button-shadow, none);--_icon-button-transition-duration:var(--forge-icon-button-transition-duration, var(--forge-animation-duration-short3, 150ms));--_icon-button-transition-timing:var(--forge-icon-button-transition-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_icon-button-shape:var(--forge-icon-button-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_icon-button-shape-start-start:var(--forge-icon-button-shape-start-start, var(--_icon-button-shape));--_icon-button-shape-start-end:var(--forge-icon-button-shape-start-end, var(--_icon-button-shape));--_icon-button-shape-end-start:var(--forge-icon-button-shape-end-start, var(--_icon-button-shape));--_icon-button-shape-end-end:var(--forge-icon-button-shape-end-end, var(--_icon-button-shape));--_icon-button-shape-squared:var(--forge-icon-button-shape-squared, calc(var(--forge-shape-medium, 4px) * var(--forge-shape-factor, 1)));--_icon-button-outlined-border-width:var(--forge-icon-button-outlined-border-width, 1px);--_icon-button-outlined-border-style:var(--forge-icon-button-outlined-border-style, solid);--_icon-button-outlined-border-color:var(--forge-icon-button-outlined-border-color, var(--_icon-button-icon-color));--_icon-button-tonal-icon-color:var(--forge-icon-button-tonal-icon-color, var(--forge-theme-on-primary-container, #222c62));--_icon-button-tonal-background-color:var(--forge-icon-button-tonal-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-filled-icon-color:var(--forge-icon-button-filled-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-filled-background-color:var(--forge-icon-button-filled-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-raised-shadow:var(--forge-icon-button-raised-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-hover-shadow:var(--forge-icon-button-raised-hover-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12));--_icon-button-raised-active-shadow:var(--forge-icon-button-raised-active-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12));--_icon-button-raised-disabled-shadow:var(--forge-icon-button-raised-disabled-shadow, none);--_icon-button-density-small-size:var(--forge-icon-button-density-small-size, 24px);--_icon-button-density-small-padding:var(--forge-icon-button-density-small-padding, var(--forge-spacing-xxxsmall, 2px));--_icon-button-density-small-icon-size:var(--forge-icon-button-density-small-icon-size, calc(var(--forge-typography-font-size, 1rem) * 1.125));--_icon-button-density-medium-size:var(--forge-icon-button-density-medium-size, 36px);--_icon-button-density-medium-padding:var(--forge-icon-button-density-medium-padding, var(--forge-spacing-xxsmall, 4px));--_icon-button-density-large-size:var(--forge-icon-button-density-large-size, var(--_icon-button-size));--_icon-button-toggle-on-background-color:var(--forge-icon-button-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-toggle-on-icon-color:var(--forge-icon-button-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-outlined-toggle-on-background-color:var(--forge-icon-button-outlined-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-outlined-toggle-on-icon-color:var(--forge-icon-button-outlined-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-tonal-toggle-background-color:var(--forge-icon-button-tonal-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-tonal-toggle-on-background-color:var(--forge-icon-button-tonal-toggle-on-background-color, var(--forge-theme-primary-container, #d1d5ed));--_icon-button-tonal-toggle-on-icon-color:var(--forge-icon-button-tonal-toggle-on-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-background-color:var(--forge-icon-button-filled-toggle-background-color, var(--forge-theme-surface-container-low, #ebebeb));--_icon-button-filled-toggle-icon-color:var(--forge-icon-button-filled-toggle-icon-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-background-color:var(--forge-icon-button-filled-toggle-on-background-color, var(--forge-theme-primary, #3f51b5));--_icon-button-filled-toggle-on-icon-color:var(--forge-icon-button-filled-toggle-on-icon-color, var(--forge-theme-on-primary, #ffffff));--_icon-button-disabled-cursor:var(--forge-icon-button-disabled-cursor, not-allowed);--_icon-button-disabled-opacity:var(--forge-icon-button-disabled-opacity, 0.38);--_icon-button-popover-icon-padding:var(--forge-icon-button-popover-icon-padding, var(--forge-spacing-xsmall, 8px));--_icon-button-focus-indicator-color:var(--forge-icon-button-focus-indicator-color, var(--forge-theme-primary, #3f51b5))}:host{display:var(--_icon-button-display);position:relative;outline:0;-webkit-tap-highlight-color:transparent;border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end)}:host([hidden]){display:none}::slotted(:is(button,a)){position:relative;z-index:0;display:var(--_icon-button-display);align-items:center;justify-content:center;gap:var(--_icon-button-gap);box-sizing:border-box;height:var(--_icon-button-density-large-size);min-width:var(--_icon-button-density-large-size);border:var(--_icon-button-border);border-start-start-radius:var(--_icon-button-shape-start-start);border-start-end-radius:var(--_icon-button-shape-start-end);border-end-start-radius:var(--_icon-button-shape-end-start);border-end-end-radius:var(--_icon-button-shape-end-end);padding:var(--_icon-button-padding);box-shadow:var(--_icon-button-shadow);color:var(--_icon-button-icon-color);background:var(--_icon-button-background-color);font-size:var(--_icon-button-icon-size);cursor:var(--_icon-button-cursor);user-select:none;transition-property:box-shadow,background;transition-duration:var(--_icon-button-transition-duration);transition-timing-function:var(--_icon-button-transition-timing);font-size:var(--_icon-button-icon-size);height:var(--_icon-button-size);width:var(--_icon-button-size)}::slotted(a){text-decoration:none;color:var(--_icon-button-icon-color)!important}forge-state-layer{--forge-state-layer-color:var(--_icon-button-icon-color)}forge-focus-indicator{--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-color:var(--_icon-button-focus-indicator-color);--forge-focus-indicator-shape-start-start:var(--_icon-button-shape-start-start);--forge-focus-indicator-shape-start-end:var(--_icon-button-shape-start-end);--forge-focus-indicator-shape-end-start:var(--_icon-button-shape-end-start);--forge-focus-indicator-shape-end-end:var(--_icon-button-shape-end-end)}:host(:is([dense],[density=large]):not(:is([density=medium],[density-level]))){--_icon-button-size:var(--_icon-button-density-small-size);--_icon-button-icon-size:var(--_icon-button-density-small-icon-size);--_icon-button-padding:var(--_icon-button-density-small-padding);--forge-icon-font-size:var(--_icon-button-icon-size)}:host([dense]:not([density=large]):not([density=small]):is([density=medium],[density-level])){--_icon-button-size:var(--_icon-button-density-medium-size);--_icon-button-padding:var(--_icon-button-density-medium-padding)}:host([disabled]){cursor:var(--_icon-button-disabled-cursor)}:host([disabled]) ::slotted(button[disabled]){pointer-events:none;opacity:var(--_icon-button-disabled-opacity)}:host([toggle]:is([on],[is-on]):not([is-on=false])){--_icon-button-background-color:var(--_icon-button-toggle-on-background-color);--_icon-button-icon-color:var(--_icon-button-toggle-on-icon-color);--_icon-button-background-color:var(--forge-icon-button-background-color, var(--forge-theme-primary-container-low, #e8eaf6))}",qa=class extends M{constructor(){super();this._disabled=!1;this._toggle=!1;this._isOn=!1;this._densityLevel=0;this._buttonOrAnchorElement=null;this._slotChangeListener=this._onSlotChange.bind(this);this._keydownListener=this._onKeydown.bind(this);this._toggleClickListener=this._onToggle.bind(this);H(this,By,Ay),this._slotElement=w(this,"slot:not([name])"),this._focusIndicator=w(this,w1.elementName),this._stateLayer=w(this,I1.elementName)}static get observedAttributes(){return Object.values(j2.attributes)}connectedCallback(){this._slotElement.addEventListener("slotchange",this._slotChangeListener),this.children.length?this._initialize():Ko(this).then(()=>this._initialize())}disconnectedCallback(){this._detachButton()}attributeChangedCallback(e,o,a){switch(e){case j2.attributes.DISABLED:this.disabled=p(a);return;case j2.attributes.TOGGLE:this.toggle=p(a);return;case j2.attributes.IS_ON:this.isOn=p(a);return;case j2.attributes.DENSITY_LEVEL:this.densityLevel=K(a);return}}_onKeydown(e){(e.key==="Enter"||e.key===" ")&&this._stateLayer.playAnimation()}_onSlotChange(){this._detachButton(),this._initialize()}_onToggle(){this.isOn=!this._isOn,this.dispatchEvent(new CustomEvent("forge-icon-button-toggle",{bubbles:!0,composed:!0,detail:this._isOn}))}_initialize(){this._buttonOrAnchorElement=this.querySelector(j2.selectors.BUTTON),this._buttonOrAnchorElement&&(this._stateLayer.targetElement=this._buttonOrAnchorElement,this._focusIndicator.targetElement=this._buttonOrAnchorElement,this._buttonOrAnchorElement.addEventListener("keydown",this._keydownListener),this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._disabled&&!this._buttonOrAnchorElement.disabled?this._buttonOrAnchorElement.disabled=!0:this.disabled=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled,this._toggle&&this._initializeToggle(),this._buttonOrAnchorElement instanceof HTMLButtonElement&&(this._buttonAttrMutationObserver=new MutationObserver(e=>{e.some(o=>o.attributeName==="disabled")&&this._syncDisabledState()}),this._buttonAttrMutationObserver.observe(this._buttonOrAnchorElement,{attributes:!0,attributeFilter:["disabled"]})))}_syncDisabledState(){let e=this._buttonOrAnchorElement instanceof HTMLButtonElement&&this._buttonOrAnchorElement.disabled;this.toggleAttribute(j2.attributes.DISABLED,e)}_detachButton(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("keydown",this._keydownListener),this._buttonAttrMutationObserver&&(this._buttonAttrMutationObserver.disconnect(),this._buttonAttrMutationObserver=void 0)}_initializeToggle(){this._buttonOrAnchorElement&&(this._buttonOrAnchorElement.addEventListener("click",this._toggleClickListener),this._syncToggleState())}_destroyToggle(){var e;(e=this._buttonOrAnchorElement)==null||e.removeEventListener("click",this._toggleClickListener)}_syncToggleState(){let e=Array.from(this.querySelectorAll(j2.selectors.ICON_LIKE)),o=e.find(s=>s.hasAttribute(j2.attributes.ON_ICON)),a=e.filter(s=>s!==o);o==null||o.toggleAttribute("hidden",!this._isOn),a.forEach(s=>s.toggleAttribute("hidden",this._isOn)),this.toggleAttribute(j2.attributes.IS_ON,this._isOn)}get disabled(){return this._disabled}set disabled(e){var o;e=!!e,this._disabled!==e&&(this._disabled=e,(o=this._buttonOrAnchorElement)==null||o.toggleAttribute(j2.attributes.DISABLED,this._disabled),this.toggleAttribute(j2.attributes.DISABLED,this._disabled))}get toggle(){return this._toggle}set toggle(e){e=!!e,this._toggle!==e&&(this._toggle=e,this.isConnected&&(this._toggle?this._initializeToggle():this._destroyToggle()),this.toggleAttribute(j2.attributes.TOGGLE,this._toggle))}get isOn(){return this._isOn}set isOn(e){e=!!e,this._isOn!==e&&(this._isOn=e,this.isConnected&&this._syncToggleState())}get densityLevel(){return this._densityLevel}set densityLevel(e){this._densityLevel!==e&&(this._densityLevel=e,this.setAttribute(j2.attributes.DENSITY_LEVEL,String(this._densityLevel)))}focus(e){var o;(o=this._buttonOrAnchorElement)==null||o.focus(e)}};qa=i([y({name:j2.elementName,dependencies:[j,J,r1]})],qa);var Cm=class extends Z1{constructor(t){super(t)}destroy(){this._buttonElement=void 0}get buttonElement(){return this._buttonElement}_build(){var e;let t=document.createElement(j2.elementName);if(this._buttonElement=document.createElement("button"),this._buttonElement.type="button",t.appendChild(this._buttonElement),(e=this._config.options)!=null&&e.tooltip){let o=document.createElement("forge-tooltip");o.textContent=this._config.options.tooltip,this._config.options.tooltipPosition&&(o.position=this._config.options.tooltipPosition),t.appendChild(o)}return t}onClick(t){var e;(e=this._buttonElement)==null||e.addEventListener("click",t)}onFocus(t){var e;(e=this._buttonElement)==null||e.addEventListener("focus",t)}onBlur(t){var e;(e=this._buttonElement)==null||e.addEventListener("blur",t)}get iconElement(){return this._iconElement}get disabled(){var t;return!!((t=this._buttonElement)!=null&&t.disabled)}set disabled(t){this._buttonElement&&(this._buttonElement.disabled=t)}_configure(){this._configureIcon()}_configureIcon(){var e,o,a,s;if(!((e=this._config.options)!=null&&e.iconName))return;switch(((o=this._config.options)==null?void 0:o.iconType)||"component"){case"font":{let r=Array.isArray(this._config.options.iconClass)?this._config.options.iconClass:[We];(a=this._buttonElement)==null||a.classList.add(...r),this._buttonElement&&(this._buttonElement.textContent=this._config.options.iconName);break}case"component":this._iconElement=document.createElement(p1.elementName),this._iconElement.name=this._config.options.iconName,this._config.options.iconExternal!==void 0&&(this._iconElement.external=!!this._config.options.iconExternal),this._config.options.iconExternalType&&(this._iconElement.externalType=this._config.options.iconExternalType),this._config.options.iconClass&&this._iconElement.classList.add(...this._config.options.iconClass),(s=this._buttonElement)==null||s.appendChild(this._iconElement);break}}};function Em(){f(qa)}var $4=class extends I{constructor(t){super(t)}startButtonObserver(){this._buttonChangeObserver=new MutationObserver(t=>{let e=t.reduce((o,{addedNodes:a})=>{let s=Array.from(a).filter(r=>r.nodeType===Node.ELEMENT_NODE).map(r=>r.nodeName.toLowerCase()===A2.elementName?r:r.querySelector(A2.elementName)).filter(r=>!!r);return o.concat(s)},[]);e.length&&(e.forEach(o=>{o.variant=this._component.variant,o.theme=this._component.theme,o.disabled=this._component.disabled,o.dense=this._component.dense}),this.setPill(this._component.pill))}),this._buttonChangeObserver.observe(this._component,{childList:!0,subtree:!0})}destroyButtonObserver(){var t;(t=this._buttonChangeObserver)==null||t.disconnect(),this._buttonChangeObserver=void 0}setVariant(t){this._getButtons().forEach(o=>o.variant=t)}setTheme(t){this._getButtons().forEach(o=>o.theme=t)}setDisabled(t){this._getButtons().forEach(o=>o.disabled=t)}setDense(t){this._getButtons().forEach(o=>o.dense=t)}setPill(t){let e=this._getButtons();e.length>2&&Array.from(e).slice(1,e.length-1).filter(({pill:s})=>s).forEach(s=>s.pill=!1);let o=e[0];o&&(o.pill=t);let a=e[e.length-1];a&&(a.pill=t)}_getButtons(){return this._component.querySelectorAll(A2.elementName)}};var Ty=`${b}split-button`,Sy={VARIANT:"variant",THEME:"theme",DISABLED:"disabled",DENSE:"dense",PILL:"pill"},ky={DEFAULT_VARIANT:"text",DEFAULT_THEME:"primary"},x2={elementName:Ty,attributes:Sy,defaults:ky};var X4=class{constructor(t){this._adapter=t;this._variant=x2.defaults.DEFAULT_VARIANT;this._theme=x2.defaults.DEFAULT_THEME;this._disabled=!1;this._dense=!1;this._pill=!1}initialize(){this._adapter.startButtonObserver(),this._adapter.setVariant(this._variant),this._adapter.setTheme(this._theme),this._adapter.setDisabled(this._disabled),this._adapter.setDense(this._dense),this._adapter.setPill(this._pill)}destroy(){this._adapter.destroyButtonObserver()}get variant(){return this._variant}set variant(t){this._variant!==t&&(this._variant=t!=null?t:x2.defaults.DEFAULT_VARIANT,this._adapter.setVariant(t),this._adapter.setHostAttribute(x2.attributes.VARIANT,this._variant))}get theme(){return this._theme}set theme(t){this._theme!==t&&(this._theme=t!=null?t:x2.defaults.DEFAULT_THEME,this._adapter.setTheme(this._theme),this._adapter.setHostAttribute(x2.attributes.THEME,this._theme))}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._adapter.setDisabled(this._disabled),this._adapter.toggleHostAttribute(x2.attributes.DISABLED,this._disabled))}get dense(){return this._dense}set dense(t){this._dense!==t&&(this._dense=t,this._adapter.setDense(this._dense),this._adapter.toggleHostAttribute(x2.attributes.DENSE,this._dense))}get pill(){return this._pill}set pill(t){this._pill!==t&&(this._pill=t,this._adapter.setPill(this._pill),this._adapter.toggleHostAttribute(x2.attributes.PILL,this._pill))}};var Oy="<template><slot></slot></template>",Dy=":host{--_split-button-min-width:var(--forge-split-button-min-width, 0);--_split-button-gap:var(--forge-split-button-gap, var(--forge-border-thin, 1px));--_split-button-focus-indicator-offset:var(--forge-split-button-focus-indicator-offset, var(--forge-button-focus-indicator-offset, 4px));--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, var(--_split-button-gap));--_split-button-focus-indicator-offset-adjusted:calc(var(--_split-button-focus-indicator-offset) + var(--_split-button-focus-indicator-divider-offset) * 2)}:host{display:inline-flex;justify-content:center;align-items:center}:host([hidden]){display:none}::slotted(*){--forge-button-min-width:var(--_split-button-min-width);--forge-button-focus-indicator-offset:var(--_split-button-focus-indicator-offset)}::slotted(:first-child){--forge-button-shape-start-end-radius:0;--forge-button-shape-end-end-radius:0;--forge-focus-indicator-shape-start-end:0;--forge-focus-indicator-shape-end-end:0;--forge-focus-indicator-offset-inline:0 var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:not(:first-child):not(:last-child)){--forge-button-shape:0;--forge-focus-indicator-shape:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted)}::slotted(:last-child){--forge-button-shape-start-start-radius:0;--forge-button-shape-end-start-radius:0;--forge-focus-indicator-shape-start-start:0;--forge-focus-indicator-shape-end-start:0;--forge-focus-indicator-offset-inline:var(--_split-button-focus-indicator-offset-adjusted) 0}:host([variant=outlined]){--_split-button-focus-indicator-divider-offset:var(--forge-split-button-focus-indicator-divider-offset, 0px)}:host([variant=outlined]) ::slotted(:not(:first-child)){margin-inline-start:calc(-1 * var(--_split-button-gap))}:host(:is([variant=tonal],[variant=filled],[variant=raised],:not([variant]))) ::slotted(:not(:last-child)){margin-inline-end:var(--_split-button-gap)}",ke=class extends M{static get observedAttributes(){return[x2.attributes.VARIANT,x2.attributes.THEME,x2.attributes.DISABLED,x2.attributes.DENSE,x2.attributes.PILL]}constructor(){super(),H(this,Oy,Dy),this._core=new X4(new $4(this))}connectedCallback(){this._core.initialize()}disconnectedCallback(){this._core.destroy()}attributeChangedCallback(t,e,o){switch(t){case x2.attributes.VARIANT:this.variant=o;break;case x2.attributes.THEME:this.theme=o;break;case x2.attributes.DISABLED:this.disabled=p(o);break;case x2.attributes.DENSE:this.dense=p(o);break;case x2.attributes.PILL:this.pill=p(o);break}}};i([c()],ke.prototype,"variant",2),i([c()],ke.prototype,"theme",2),i([c()],ke.prototype,"disabled",2),i([c()],ke.prototype,"dense",2),i([c()],ke.prototype,"pill",2),ke=i([y({name:x2.elementName,dependencies:[T2]})],ke);function hT1(){f(ke)}function wT1(){let n="0123456789ABCDEF".split(""),t="#";for(let e=0;e<6;e++)t+=n[Math.floor(Math.random()*16)];return t}function TS1(){cc(),Ic(),yv(),yh(),jh(),Tv(),Vc(),f6(),_a(),y6(),rr(),z6(),B6(),A6(),zv(),Pv(),Uv(),cp(),dp(),qv(),p6(),g6(),m6(),gp(),fp(),yp(),zp(),V6(),Sv(),Vp(),ic(),s6(),kp(),Np(),Hc(),Sc(),nc(),Rp(),Gp(),e7(),$p(),o6(),n7(),mv(),sv(),nv(),bv(),l7(),p7(),Ap(),Ep(),sc(),b7(),y7(),xh(),d7(),V7(),vv(),Av(),Kv(),Xv(),x7(),L7(),E7(),dv(),T7(),P7(),Q7(),em(),zc(),om(),nm(),Jv(),mm(),pm(),im(),l6(),fm(),ym(),Bv(),bh(),zm(),Hm()}function SS1(){Lm(),Em()}export{Ho as ACCORDION_CONSTANTS,_c as ANIMATION_FILL,P1 as APP_BAR_CONSTANTS,Ye as APP_BAR_HELP_BUTTON_CONSTANTS,ia as APP_BAR_MENU_BUTTON_CONSTANTS,g2 as APP_BAR_NOTIFICATION_BUTTON_CONSTANTS,f1 as APP_BAR_PROFILE_BUTTON_CONSTANTS,P2 as APP_BAR_SEARCH_CONSTANTS,c5 as ARIA_CONTROLS_PLACEHOLDER_ID,c1 as AUTOCOMPLETE_CONSTANTS,Dr as AVATAR_CONSTANTS,Iv as AVATAR_TAG_NAME,Es as AccordionAdapter,Io as AccordionComponent,Bs as AccordionCore,Os as AppBarAdapter,ne as AppBarComponent,Ds as AppBarCore,Vr as AppBarHelpButtonAdapter,to as AppBarHelpButtonComponent,Cr as AppBarHelpButtonCore,ma as AppBarMenuButtonComponent,ir as AppBarNotificationButtonAdapter,Ee as AppBarNotificationButtonComponent,lr as AppBarNotificationButtonCore,Pr as AppBarProfileButtonAdapter,K2 as AppBarProfileButtonComponent,Nr as AppBarProfileButtonCore,Ns as AppBarSearchAdapter,d0 as AppBarSearchComponent,Ps as AppBarSearchCore,mi as AutocompleteAdapter,p2 as AutocompleteComponent,x6 as AutocompleteComponentDelegate,di as AutocompleteCore,w6 as AutocompleteMode,ve as AvatarComponent,i2 as BACKDROP_CONSTANTS,_R as BADGE_CONSTANTS,Kh as BADGE_TAG_NAME,I2 as BANNER_CONSTANTS,J1 as BASE_DRAWER_CONSTANTS,Y as BASE_FIELD_CONSTANTS,Lt as BASE_SELECT_CONSTANTS,S1 as BOTTOM_SHEET_CONSTANTS,Dt as BUTTON_AREA_CONSTANTS,A2 as BUTTON_CONSTANTS,Ul as BUTTON_FORM_ATTRIBUTES,et as BUTTON_TOGGLE_CONSTANTS,q1 as BUTTON_TOGGLE_GROUP_CONSTANTS,Xe as BackdropComponent,le as BadgeComponent,Zh as BadgeComponentDelegate,gi as BannerAdapter,f0 as BannerComponent,wi as BannerCore,I as BaseAdapter,M as BaseComponent,Z1 as BaseComponentDelegate,lo as BaseDrawerAdapter,Qe as BaseDrawerComponent,co as BaseDrawerCore,z2 as BaseField,ba as BaseFieldAdapter,ya as BaseFieldCore,Na as BaseSelectAdapter,Vt as BaseSelectComponent,Ra as BaseSelectCore,yi as BottomSheetAdapter,Ze as BottomSheetComponent,Mi as BottomSheetCore,Ar as ButtonAdapter,zi as ButtonAreaAdapter,Ro as ButtonAreaComponent,Hi as ButtonAreaCore,T2 as ButtonComponent,Sr as ButtonComponentDelegate,Tr as ButtonCore,Ur as ButtonToggleAdapter,me as ButtonToggleComponent,Wr as ButtonToggleCore,Gr as ButtonToggleGroupAdapter,ot as ButtonToggleGroupComponent,qr as ButtonToggleGroupCore,g as CALENDAR_CONSTANTS,lp as CALENDAR_DROPDOWN_CONSTANTS,T as CALENDAR_MENU_CONSTANTS,Bc1 as CARD_CONSTANTS,hp as CARD_TAG_NAME,s5 as CDN_BASE_URL,T1 as CHECKBOX_CONSTANTS,g1 as CHIP_CONSTANTS,u2 as CHIP_FIELD_CONSTANTS,nt as CHIP_SET_CONSTANTS,S2 as CIRCULAR_PROGRESS_CONSTANTS,_1 as COLOR_PICKER_CONSTANTS,b as COMPONENT_NAME_PREFIX,Oi as CalendarAdapter,v1 as CalendarComponent,ip as CalendarComponentDelegate,Di as CalendarCore,Ha as CalendarDropdown,Vi as CalendarMenuAdapter,je as CalendarMenuComponent,Ci as CalendarMenuCore,O6 as CalendarMonthFocus,M0 as CardComponent,E4 as CellAlign,Yr as CheckboxAdapter,at as CheckboxComponent,Gv as CheckboxComponentDelegate,Kr as CheckboxCore,hi as ChipAdapter,H2 as ChipComponent,vi as ChipCore,ii as ChipFieldAdapter,No as ChipFieldComponent,d6 as ChipFieldComponentDelegate,li as ChipFieldCore,Ma as ChipSetComponent,Pi as CircularProgressAdapter,Pt as CircularProgressComponent,Ni as CircularProgressCore,Ri as ColorPickerAdapter,we as ColorPickerComponent,Gi as ColorPickerCore,v3 as ColorPickerValueType,Ht as DATE_PICKER_CONSTANTS,U2 as DATE_RANGE_PICKER_CONSTANTS,h3 as DEFAULT_COLOR,nn as DEFAULT_DATE_MASK,ja as DEFERRED_LABEL_TARGET,Ft as DEPRECATED_BUTTON_CONSTANTS,j2 as DEPRECATED_ICON_BUTTON_CONSTANTS,D as DIALOG_CONSTANTS,xa as DIVIDER_CONSTANTS,Lp as DRAWER_CONSTANTS,zo as DateInputMask,Yi as DatePickerAdapter,Ca as DatePickerComponent,bp as DatePickerComponentDelegate,Ki as DatePickerCore,$i as DatePickerRange,l2 as DateRange,Mp as DateRangeComponentDelegate,Xi as DateRangePickerAdapter,io as DateRangePickerComponent,Zi as DateRangePickerCore,Ln as DayOfWeek,ls as Deferred,Ga as DeprecatedButtonComponent,Im as DeprecatedButtonComponentDelegate,qa as DeprecatedIconButtonComponent,Cm as DeprecatedIconButtonComponentDelegate,xi as DialogAdapter,B1 as DialogComponent,bi as DialogCore,zt as DismissibleStack,eo as DividerComponent,Ea as DrawerComponent,xc as EASING,D1 as EXPANSION_PANEL_CONSTANTS,Vs as ExpansionPanelAdapter,tt as ExpansionPanelComponent,Cs as ExpansionPanelCore,L as FIELD_CONSTANTS,x1 as FILE_PICKER_CONSTANTS,c2 as FLOATING_ACTION_BUTTON_CONSTANTS,w1 as FOCUS_INDICATOR_CONSTANTS,ai as FieldAdapter,F1 as FieldComponent,ni as FieldCore,Ji as FilePickerAdapter,Qt as FilePickerComponent,Sp as FilePickerComponentDelegate,t4 as FilePickerCore,e4 as FloatingActionButtonAdapter,z0 as FloatingActionButtonComponent,Pp as FloatingActionButtonComponentDelegate,o4 as FloatingActionButtonCore,Ss as FocusIndicatorAdapter,J as FocusIndicatorComponent,ks as FocusIndicatorCore,o2 as FormFieldComponentDelegate,ns as GlobalConfiguration,ql as HAS_MERIDIEM_REGEX,t1 as ICON_BUTTON_CONSTANTS,We as ICON_CLASS_NAME,p1 as ICON_CONSTANTS,Ms as ICON_REGISTRY_KEY,mc as INITIAL_ORIGIN_SCALE,Sa as INLINE_MESSAGE_CONSTANTS,_H as INPUT_ARIA_ATTRIBUTES,xH as INPUT_PROPERTIES,ud as ISO_8601_REGEX,_d as ISO_TIMEZONE_REGEX,zs as IconAdapter,Fs as IconButtonAdapter,i1 as IconButtonComponent,Tc as IconButtonComponentDelegate,Rs as IconButtonCore,j as IconComponent,U0 as IconComponentDelegate,Is as IconCore,X as IconRegistry,ka as InlineMessageComponent,m2 as KEYBOARD_SHORTCUT_CONSTANTS,sl as KEYSTROKE_DEBOUNCE_THRESHOLD,qp as KEY_ITEM_TAG_NAME,Fp as KEY_TAG_NAME,ho as KeyComponent,Be as KeyItemComponent,a4 as KeyboardShortcutAdapter,It as KeyboardShortcutComponent,n4 as KeyboardShortcutCore,a2 as LABEL_CONSTANTS,ue as LABEL_VALUE_CONSTANTS,F2 as LINEAR_PROGRESS_CONSTANTS,C1 as LIST_CONSTANTS,h1 as LIST_ITEM_CONSTANTS,ei as LabelAdapter,de as LabelComponent,oi as LabelCore,Oa as LabelValueComponent,a7 as LabelValueComponentDelegate,ce as LinearProgressComponent,cr as ListAdapter,v2 as ListComponent,hr as ListCore,vr as ListItemAdapter,j1 as ListItemComponent,pr as ListItemCore,n1 as MENU_CONSTANTS,c7 as METER_GROUP_TAG_NAME,s7 as METER_TAG_NAME,M5 as MINIMUM_PRESS_MS,Bp as MINI_DRAWER_CONSTANTS,Ba as MODAL_DRAWER_CONSTANTS,Ir as MenuAdapter,M2 as MenuComponent,Lr as MenuCore,Y1 as MeterComponent,k2 as MeterGroupComponent,Ta as MiniDrawerComponent,ji as ModalDrawerAdapter,Aa as ModalDrawerComponent,Qi as ModalDrawerCore,f3 as NAVIGATION_KEYS,At as OPEN_ICON_CONSTANTS,R as OPTION_CONSTANTS,vo as OPTION_GROUP_CONSTANTS,B as OVERLAY_CONSTANTS,sa as OpenIconComponent,i4 as OptionAdapter,$1 as OptionComponent,l4 as OptionCore,t0 as OptionGroupComponent,u6 as OptionType,Zs as OverlayAdapter,d2 as OverlayComponent,Qs as OverlayCore,dc as PADDING,m7 as PAGE_STATE_CONSTANTS,Z as PAGINATOR_CONSTANTS,Id as PARSEABLE_TIME_FORMAT,Q as POPOVER_CONSTANTS,hv as POPOVER_HOVER_TIMEOUT,pc as PRESS_GROW_MS,uc as PRESS_PSEUDO,$ as PROFILE_CARD_CONSTANTS,Da as PageStateComponent,r4 as PaginatorAdapter,it as PaginatorComponent,s4 as PaginatorCore,fc as PointerState,dr as PopoverAdapter,R1 as PopoverComponent,wr as PopoverCore,Er as ProfileCardAdapter,Y2 as ProfileCardComponent,Br as ProfileCardCore,b1 as RADIO_CONSTANTS,fa as RADIO_GROUP_CONSTANTS,uH as REFLECTIVE_ARIA_ATTRIBUTES,Xr as RadioAdapter,_t as RadioComponent,Zr as RadioCore,jr as RadioGroupAdapter,oo as RadioGroupComponent,Qr as RadioGroupCore,Pa as SCAFFOLD_CONSTANTS,X2 as SELECT_CONSTANTS,e0 as SELECT_DROPDOWN_CONSTANTS,xr as SKELETON_CONSTANTS,bt as SKIP_LINK_CONSTANTS,V as SLIDER_CONSTANTS,wc as SOFT_EDGE_CONTAINER_RATIO,gc as SOFT_EDGE_MINIMUM_SIZE,x2 as SPLIT_BUTTON_CONSTANTS,t2 as SPLIT_VIEW_CONSTANTS,P as SPLIT_VIEW_PANEL_CONSTANTS,W2 as STACK_CONSTANTS,I1 as STATE_LAYER_CONSTANTS,F as STEPPER_CONSTANTS,k as STEP_CONSTANTS,pa as SUPPORTS_POPOVER,l1 as SWITCH_CONSTANTS,Je as ScaffoldComponent,c4 as SelectAdapter,Ae as SelectComponent,B7 as SelectComponentDelegate,h4 as SelectCore,p4 as SelectDropdownAdapter,H0 as SelectDropdownComponent,v4 as SelectDropdownCore,M7 as SelectOptionType,Q0 as SkeletonComponent,Fa as SkipLinkComponent,_2 as SliderComponent,D7 as SliderComponentDelegate,Fl as SlottedElementAdapter,B4 as SortDirection,$4 as SplitButtonAdapter,ke as SplitButtonComponent,X4 as SplitButtonCore,b4 as SplitViewAdapter,N7 as SplitViewAnimatingLayer,Te as SplitViewComponent,y4 as SplitViewCore,f4 as SplitViewPanelAdapter,L2 as SplitViewPanelComponent,x4 as SplitViewPanelCore,M4 as StackAdapter,_e as StackComponent,z4 as StackCore,As as StateLayerAdapter,r1 as StateLayerComponent,ra as StateLayerCoords,Ts as StateLayerCore,I4 as StepAdapter,Z2 as StepComponent,L4 as StepCore,V4 as StepperAdapter,Nt as StepperComponent,C4 as StepperCore,Jr as SwitchAdapter,$2 as SwitchComponent,Qv as SwitchComponentDelegate,ti as SwitchCore,_ as TABLE_CONSTANTS,N1 as TAB_BAR_CONSTANTS,K1 as TAB_CONSTANTS,E1 as TEXT_FIELD_CONSTANTS,W as TIME_PICKER_CONSTANTS,k1 as TOAST_CONSTANTS,yn as TOOLBAR_CONSTANTS,a1 as TOOLTIP_CONSTANTS,vc as TOUCH_DELAY_MS,Ed as TWELVE_HOUR_TIME_MASK,Bd as TWELVE_HOUR_TIME_MASK_WITH_SECONDS,ps as TWELVE_HOUR_TIME_REGEX,Ad as TWENTY_FOUR_HOUR_TIME_MASK,Td as TWENTY_FOUR_HOUR_TIME_MASK_WITH_SECONDS,Jo as TWENTY_FOUR_HOUR_TIME_REGEX,O4 as TabAdapter,P4 as TabBarAdapter,Ct as TabBarComponent,N4 as TabBarCore,Rt as TabComponent,D4 as TabCore,A4 as TableAdapter,X1 as TableComponent,k4 as TableCore,Db as TableFilterType,S4 as TableRow,si as TextFieldAdapter,x0 as TextFieldComponent,ao as TextFieldComponentDelegate,ri as TextFieldCore,ys as TimeInputMask,R4 as TimePickerAdapter,W1 as TimePickerComponent,xm as TimePickerComponentDelegate,W4 as TimePickerCore,G4 as ToastAdapter,Jt as ToastComponent,q4 as ToastCore,pe as ToolbarComponent,Js as TooltipAdapter,m1 as TooltipComponent,er as TooltipCore,Mm as VIEW_CONSTANTS,e2 as VIEW_SWITCHER_CONSTANTS,I3 as ViewAnimationDirection,mo as ViewComponent,Y4 as ViewSwitcherAdapter,wy as ViewSwitcherAnimationType,go as ViewSwitcherComponent,K4 as ViewSwitcherCore,ec as awaitIconDefinition,c0 as canUserHoverElements,Nl as checkVisibility,g4 as clampSize,U7 as clearState,d5 as cloneAttributes,zd as cloneProperties,Hd as cloneValidationMessage,l3 as coerceDateFromValue,yo as coerceStringToArray,vs as composedPathFrom,Z7 as createOverlay,Hs as createSanitizedSvg,Wl as createSvgFromString,kl as createUserInteractionListener,cc as defineAccordionComponent,Ic as defineAppBarComponent,yv as defineAppBarHelpButtonComponent,yh as defineAppBarMenuButtonComponent,jh as defineAppBarNotificationButtonComponent,Tv as defineAppBarProfileButtonComponent,Vc as defineAppBarSearchComponent,f6 as defineAutocompleteComponent,_a as defineAvatarComponent,y6 as defineBackdropComponent,rr as defineBadgeComponent,z6 as defineBannerComponent,B6 as defineBottomSheetComponent,A6 as defineButtonAreaComponent,zv as defineButtonComponent,Pv as defineButtonToggleComponent,Uv as defineButtonToggleGroupComponent,cp as defineCalendarComponent,S51 as defineCalendarMenuComponent,dp as defineCardComponent,qv as defineCheckboxComponent,p6 as defineChipComponent,g6 as defineChipFieldComponent,m6 as defineChipSetComponent,gp as defineCircularProgressComponent,fp as defineColorPickerComponent,TS1 as defineComponents,yp as defineDatePickerComponent,zp as defineDateRangePickerComponent,Lm as defineDeprecatedButtonComponent,SS1 as defineDeprecatedComponents,Em as defineDeprecatedIconButtonComponent,V6 as defineDialogComponent,Sv as defineDividerComponent,Vp as defineDrawerComponent,ic as defineExpansionPanelComponent,s6 as defineFieldComponent,kp as defineFilePickerComponent,Np as defineFloatingActionButtonComponent,Hc as defineFocusIndicatorComponent,Sc as defineIconButtonComponent,nc as defineIconComponent,Rp as defineInlineMessageComponent,Gp as defineKeyComponent,$p as defineKeyItemComponent,e7 as defineKeyboardShortcutComponent,o6 as defineLabelComponent,n7 as defineLabelValueComponent,mv as defineLinearProgressComponent,sv as defineListComponent,nv as defineListItemComponent,bv as defineMenuComponent,l7 as defineMeterComponent,p7 as defineMeterGroupComponent,Ap as defineMiniDrawerComponent,Ep as defineModalDrawerComponent,sc as defineOpenIconComponent,b7 as defineOptionComponent,y7 as defineOptionGroupComponent,xh as defineOverlayComponent,d7 as definePageStateComponent,V7 as definePaginatorComponent,vv as definePopoverComponent,Av as defineProfileCardComponent,Kv as defineRadioComponent,Xv as defineRadioGroupComponent,x7 as defineScaffoldComponent,L7 as defineSelectComponent,E7 as defineSelectDropdownComponent,dv as defineSkeletonComponent,T7 as defineSkipLinkComponent,P7 as defineSliderComponent,hT1 as defineSplitButtonComponent,Q7 as defineSplitViewComponent,Dy1 as defineSplitViewPanelComponent,em as defineStackComponent,zc as defineStateLayerComponent,om as defineStepComponent,nm as defineStepperComponent,Jv as defineSwitchComponent,mm as defineTabBarComponent,pm as defineTabComponent,im as defineTableComponent,l6 as defineTextFieldComponent,fm as defineTimePickerComponent,ym as defineToastComponent,Bv as defineToolbarComponent,bh as defineTooltipComponent,zm as defineViewComponent,Hm as defineViewSwitcherComponent,b0 as dialogStack,Qp as elementAcceptsTextInput,hc as elementName,Dl as elementsOverlapping,Ls as emulateUserToggle,m5 as eventIncludesArrowKey,Vn as eventIncludesDate,j6 as eventIncludesElement,ac as fetchIconContent,Xx as fixKey,Zo as forgeLabelRef,Al as formatDate,D0 as forwardAttributes,Mo as frame,n3 as getAccessibleHeader,sp as getAllYearOptions,tc as getCachedIcon,X6 as getClearButton,M3 as getCurrentTimeOfDayMillis,x3 as getCursor,o3 as getDateElement,rt as getDateId,Fo as getDateRangeFromDates,U6 as getDateRow,Ei as getDateSpacerElement,ep as getDatesFromDateRange,Si as getDatesInRange,F6 as getDayElement,I_ as getDayId,i3 as getEventDescriptions,G6 as getEventElement,W6 as getEventWrapperElement,e3 as getEventWrapperId,ki as getEventsOnDate,Cn as getFirstDateOfWeek,w31 as getFirstDayOfMonth,P6 as getFirstDayOfWeekForLocale,$6 as getFooter,te as getFormState,Bt as getFormValue,Ii as getGrid,T6 as getGridItems,X7 as getHandleIcon,a3 as getHeader,En as getIndexOfDate,l5 as getLastDateOfMonth,Q6 as getLastDateOfWeek,k6 as getList,Li as getListItems,D6 as getLocalizedDayOfMonth,t3 as getLocalizedDayOfWeek,ro as getLocalizedMonth,y0 as getLocalizedYear,Ti as getMinAndMaxDates,$x as getModiferKeysString,Y6 as getMonthButtonContent,r3 as getMonthDates,Tl as getMonthLength,ap as getMonthOptions,rp as getMultipleFromRange,fH as getPartPrefixedAttributes,Uo as getPixelDimension,S6 as getScrollSpy,_6 as getSelectedOption,Bi as getSortedDaysOfWeek,_4 as getSplitViewPanelSibling,Z6 as getTodayButton,q6 as getTooltip,ee as getValidationMessage,u4 as getValuenow,g31 as getWeekDates,N6 as getWeekendDaysForLocale,K6 as getYearButtonContent,np as getYearOptions,$7 as handleBoundariesAfterResize,w4 as handleBoundariesDuringResize,ui as hideBackdrop,Sl as highlightTextHTML,um as hoursToMillis,R7 as initState,oe as inputType,s1 as internals,ft as isDisabled,s2 as isFocusable,xt as isInMonth,L_ as isInRange,Pl as isInstanceOf,kv as isLabelAware,u3 as isOptionGroupObject,ff as isOptionObject,Mn as isOptionType,h5 as isPointerOverElement,R6 as isRtlLocale,Gl as isSafeSvg,b2 as isSameDate,w3 as isSelectOptionType,za as isSelected,$l as isSupportedTimeFormat,J6 as isToday,G7 as keyboardResize,tn as locateElementById,hs as locateTargetHeuristic,t7 as matchKeyCombination,Y7 as maxResize,cC1 as mergeDateWithTime,gm as millisToHours,U4 as millisToMinutes,wm as millisToMinutesClamped,oy as millisToSeconds,b3 as millisToSecondsClamped,lt as millisToTimeString,q7 as minResize,Wa as minutesToMillis,zn as optionEqualPredicate,K0 as overlayStack,V_ as parseDateOffset,Bl as parseDateString,Jp as parseKeyCombinations,eb as parseSize,op as parseYearRange,Ol as percentToPixels,iH as pixelsToPercent,W7 as pointerResize,nl as prefersReducedMotion,Rl as proxyShadowScrollEvent,wT1 as randomHexColor,Hn as removeAllExceptLastChild,oc as removeIconListener,Qo as replaceElement,K7 as resizeSibling,v5 as roundByDPR,lH as safeMax,k0 as safeMin,b5 as sanitizeExternalType,cs as scaleValue,y3 as secondsToMillis,Yt as setAriaControls,N as setDefaultAria,F7 as setState,s3 as setTabindexOnElement,Mt as setValidity,c3 as shouldHandleEvent,_i as showBackdrop,Ai as sortDates,tp as splitIntoWeeks,_m as stripSecondsFromMillis,ol as supportsElementInternalsAria,al as supportsHover,ss as supportsPopover,ae as task,jp as textInputTypes,F4 as timeStringToMillis,He as toggleState,Kl as tokenize12HourTimeString,Yl as tokenize24HourTimeString,$r as tryCheck,Xl as tryCoerceTimeString,Ge as tryCreateAriaControlsPlaceholder,O0 as tryDismiss,hH as unwrapElements,rs as updateTarget,cH as wrapElements};
|
|
70
70
|
/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2023 Google LLC
|