1/*! For license information please see 88645.7a99a829ef4ef16b.js.LICENSE.txt */ 2export const __rspack_esm_id=88645;export const __rspack_esm_ids=[88645];export const __webpack_modules__={78069(e,t,a){a(86316);let o=!1;try{o="true"===window.localStorage.getItem("disableViewTransition")}catch{}const i=e=>{if(!(e=>(e instanceof DOMException||e instanceof Error)&&"AbortError"===e.name)(e))throw e};a.d(t,{},{D:e=>{o=e},J:e=>{if(!document.startViewTransition||o)return e(!1),Promise.resolve();let t=!1;try{const a=document.startViewTransition(()=>{t=!0,e(!0)});return a.ready.catch(i),a.finished.catch(i)}catch(a){return console.warn("View transition failed, falling back to direct execution.",a),t?Promise.reject(a):(e(!1),Promise.resolve())}}})},94584(e,t,a){var o=a(89797),i=a(20686),r=a(32379);class s extends i.WF{render(){return i.qy` <footer> <slot name="secondaryAction"></slot> <slot name="primaryAction"></slot> </footer> `}static get styles(){return[i.AH`footer{gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;display:flex}`]}}s=(0,o.Cg)([(0,r.EM)("ha-dialog-footer")],s)},51710(e,t,a){var o=a(89797),i=a(20686),r=a(32379);class s extends i.WF{render(){const e=i.qy`<div class="header-title"> <slot name="title"></slot> </div>`,t=i.qy`<div class="header-subtitle"> <slot name="subtitle"></slot> </div>`;return i.qy` <header class="header"> <div class="header-bar"> <section class="header-navigation-icon"> <slot name="navigationIcon"></slot> </section> <section class="header-content"> ${"above"===this.subtitlePosition?i.qy`${t}${e}`:i.qy`${e}${t}`} </section> <section class="header-action-items"> <slot name="actionItems"></slot> </section> </div> <slot></slot> </header> `}static get styles(){return[i.AH`:host{display:block}:host([show-border]){border-bottom:1px solid var(--mdc-dialog-scroll-divider-color,#0000001f)}.header-bar{padding:0 var(--ha-space-1);box-sizing:border-box;flex-direction:row;align-items:center;display:flex}.header-content{padding:10px var(--ha-space-1);min-height:var(--ha-space-12);text-overflow:ellipsis;white-space:nowrap;flex-direction:column;flex:1;justify-content:center;min-width:0;display:flex;overflow:hidden}.header-title{height:var(--ha-dialog-header-title-height,calc(var(--ha-font-size-xl) + var(--ha-space-1)));font-size:var(--ha-font-size-xl);line-height:var(--ha-line-height-condensed);font-weight:var(--ha-font-weight-medium);color:var(--ha-dialog-header-title-color,var(--primary-text-color))}.header-subtitle{font-size:var(--ha-font-size-m);line-height:var(--ha-line-height-normal);color:var(--ha-dialog-header-subtitle-color,var(--secondary-text-color))}@media (width>=450px) and (height>=500px){.header-bar{padding:0 var(--ha-space-2)}}.header-navigation-icon,.header-action-items{min-width:var(--ha-space-2);flex-direction:row;flex:none;height:100%;display:flex}`]}constructor(...e){super(...e),this.subtitlePosition="below",this.showBorder=!1}}(0,o.Cg)([(0,r.MZ)({type:String,attribute:"subtitle-position"})],s.prototype,"subtitlePosition",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0,attribute:"show-border"})],s.prototype,"showBorder",void 0),s=(0,o.Cg)([(0,r.EM)("ha-dialog-header")],s)},37334(e,t,a){a.a(e,async function(e,t){try{var o=a(89797),i=a(54108),r=a(20686),s=a(32379),l=a(25771),d=a(98878),n=a(86075),h=a(78069),c=a(66572),p=a(26452),g=a(79419),u=a(97096),v=(a(51710),a(69888)),f=e([i,v]);[i,v]=f.then?(await f)():f;const b="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";class w extends((0,p.V)(r.WF)){connectedCallback(){super.connectedCallback(),this.addEventListener("dialog-set-fullscreen",this._handleFullscreenChanged)}get scrollableElement(){return this.bodyContainer}updated(e){super.updated(e),e.has("open")&&(this._open=this.open)}render(){return r.qy` <wa-dialog .open=${this._open} .lightDismiss=${!this.preventScrimClose} without-header aria-labelledby=${(0,l.J)(this.ariaLabelledBy||(void 0!==this.headerTitle?"ha-dialog-title":void 0))} aria-describedby=${(0,l.J)(this.ariaDescribedBy)} @keydown=${this._handleKeyDown} @wa-hide=${this._handleHide} @wa-show=${this._handleShow} @wa-after-show=${this._handleAfterShow} @wa-after-hide=${this._handleAfterHide}> ${this.withoutHeader?r.s6:r.qy`<slot name="header"> <ha-dialog-header .subtitlePosition=${this.headerSubtitlePosition} .showBorder=${this._bodyScrolled}> <slot name="headerNavigationIcon" slot="navigationIcon"> <ha-icon-button data-dialog="close" .label=${this._i18n?.localize?.("ui.common.close")??"Close"} .path=${b}></ha-icon-button> </slot> ${void 0!==this.headerTitle?r.qy`<span slot="title" class="title" id="ha-dialog-title"> ${this.headerTitle} </span>`:r.qy`<slot name="headerTitle" slot="title"></slot>`} ${void 0!==this.headerSubtitle?r.qy`<span slot="subtitle">${this.headerSubtitle}</span>`:r.qy`<slot name="headerSubtitle" slot="subtitle"></slot>`} <slot name="headerActionItems" slot="actionItems"></slot> </ha-dialog-header> </slot>`} <div class="content-wrapper"> <div class="body ha-scrollbar" @scroll=${this._handleBodyScroll}> <slot></slot> </div> ${this.renderScrollableFades()} </div> <slot name="footer" slot="footer"></slot> </wa-dialog> `}disconnectedCallback(){this.removeEventListener("dialog-set-fullscreen",this._handleFullscreenChanged),this._setFullscreen(!1),super.disconnectedCallback(),this._open=!1}_handleFullscreenChanged(e){this._open?(0,h.J)(()=>{this._setFullscreen(e.detail)}):this._setFullscreen(e.detail)}_setFullscreen(e){this.toggleAttribute("fullscreen",e)}_handleBodyScroll(e){this._bodyScrolled=e.target.scrollTop>0}_handleKeyDown(e){"Escape"===e.key&&(this.preventScrimClose&&e.preventDefault(),e.stopPropagation(),e.currentTarget.open=!1)}_handleHide(e){if(e.eventPhase!==Event.AT_TARGET)return;const t=e.detail?.source===e.target.dialog;this.preventScrimClose&&t&&this.open&&e.preventDefault()}static get styles(){return[...super.styles,g.dp,r.AH`wa-dialog{--full-width:var(--ha-dialog-width-full,min(95vw, var(--safe-width)));
2--width:min(var(--ha-dialog-width-md,580px), var(--full-width));--spacing:var(--dialog-content-padding,var(--ha-space-6));--show-duration:var(--ha-dialog-show-duration,.2s);--hide-duration:var(--ha-dialog-hide-duration,.2s);--wa-color-surface-raised:var(--ha-dialog-surface-background,var(--card-background-color,var(--ha-color-surface-default)));--wa-panel-border-radius:var(--ha-dialog-border-radius,var(--ha-border-radius-3xl));max-width:var(--ha-dialog-max-width,var(--safe-width))}@media (prefers-reduced-motion:reduce){wa-dialog{--show-duration:0s;--hide-duration:0s}}:host([width=small]) wa-dialog{--width:min(var(--ha-dialog-width-sm,320px), var(--full-width))}:host([width=large]) wa-dialog{--width:min(var(--ha-dialog-width-lg,1024px), var(--full-width))}:host([width=full]) wa-dialog,:host([fullscreen]) wa-dialog{--width:var(--full-width)}:host([fullscreen]) wa-dialog::part(dialog){min-height:var(--safe-height);max-height:var(--safe-height);margin-top:0;transform:none}:host([fullscreen]) .content-wrapper{overflow:hidden}:host([fullscreen]) .body{padding:0;overflow:hidden}wa-dialog::part(dialog){backdrop-filter:var(--ha-dialog-surface-backdrop-filter,none);box-shadow:var(--dialog-box-shadow,var(--wa-shadow-l));color:var(--primary-text-color);min-width:var(--width,var(--full-width));max-width:var(--width,var(--full-width));max-height:var(--ha-dialog-max-height,calc(var(--safe-height) - var(--ha-space-20)));min-height:var(--ha-dialog-min-height);margin-top:var(--dialog-surface-margin-top,auto);transform:translate(calc(var(--safe-area-offset-left,0px) - var(--safe-area-offset-right,0px)), calc(var(--safe-area-offset-top,0px) - var(--safe-area-offset-bottom,0px)));flex-direction:column;display:flex;overflow:hidden}wa-dialog::part(dialog)::backdrop{backdrop-filter:var(--ha-dialog-scrim-backdrop-filter,var(--dialog-backdrop-filter,none));background-color:var(--mdc-dialog-scrim-color,none)}@media (width<=450px),(height<=500px){:host([type=standard]){--ha-dialog-border-radius:0}:host([type=standard]) wa-dialog{--full-width:var(--ha-dialog-width-full,100vw);--width:var(--full-width)}:host([type=standard]) wa-dialog::part(dialog){min-height:var(--ha-dialog-min-height,100vh);min-height:var(--ha-dialog-min-height,100dvh);max-height:var(--ha-dialog-max-height,100vh);max-height:var(--ha-dialog-max-height,100dvh);padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);padding-left:var(--safe-area-inset-left);padding-right:var(--safe-area-inset-right);margin-top:0;margin-bottom:0;transform:none}}.header-title-container{align-items:center;display:flex}.header-title{color:var(--ha-dialog-header-title-color,var(--primary-text-color));font-size:var(--ha-dialog-header-title-font-size,var(--ha-font-size-2xl));line-height:var(--ha-dialog-header-title-line-height,var(--ha-line-height-condensed));font-weight:var(--ha-dialog-header-title-font-weight,var(--ha-font-weight-normal));text-overflow:ellipsis;white-space:nowrap;margin:0;margin-right:var(--ha-space-3);overflow:hidden}wa-dialog::part(body){flex-direction:column;max-width:100%;padding:0;display:flex;overflow:hidden}.content-wrapper{flex-direction:column;flex:1;min-height:0;display:flex;position:relative}.body{position:var(--dialog-content-position,relative);padding:var(--dialog-content-padding,0 var(--ha-space-6) var(--ha-space-6) var(--ha-space-6));flex-grow:1;overflow:auto}:host([flexcontent]) .body{flex-direction:column;flex:1;max-width:100%;display:flex}wa-dialog::part(footer){padding:0}::slotted([slot=footer]){padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4) var(--ha-space-4);gap:var(--ha-space-3);justify-content:flex-end;align-items:center;width:100%;display:flex}`]}constructor(...e){super(...e),this.open=!1,this.type="standard",this.width="medium",this.preventScrimClose=!1,this.headerSubtitlePosition="below",this.flexContent=!1,this.withoutHeader=!1,this._open=!1,this._bodyScrolled=!1,this._handleShow=async e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!0,(0,n.r)(this,"opened"),await this.updateComplete,requestAnimationFrame(()=>{if(this._hassConfig?.auth.external&&(0,u.V)(this._hassConfig.auth.external)){const e=this.querySelector("[autofocus]");return void(null!==e&&(e.id||(e.id="ha-dialog-autofocus"),this._hassConfig.auth.external.fireMessage({type:"focus_element",payload:{element_id:e.id}})))}this.querySelector("[autofocus]")?.focus()}))},this._handleAfterShow=e=>{e.eventPhase===Event.AT_TARGET&&(0,n.r)(this,"after-show")},this._handleAfterHide=e=>{e.eventPhase===Event.AT_TARGET&&(this._open=!1,this._setFullscreen(!1),(0,n.r)(this,"closed"))}}}(0,o.Cg)([(0,s.MZ)({attribute:"aria-labelledby"})],w.prototype,"ariaLabelledBy",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"aria-describedby"})],w.prototype,"ariaDescribedBy",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],w.prototype,"open",void 0),(0,o.Cg)([(0,s.MZ)({reflect:!0})],w.prototype,"type",void 0),(0,o.Cg)([(0,s.MZ)({type:String,reflect:!0,attribute:"width"})],w.prototype,"width",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"prevent-scrim-close"})],w.prototype,"preventScrimClose",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"header-title"})],w.prototype,"headerTitle",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"header-subtitle"})],w.prototype,"headerSubtitle",void 0),(0,o.Cg)([(0,s.MZ)({type:String,attribute:"header-subtitle-position"})],w.prototype,"headerSubtitlePosition",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0,attribute:"flexcontent"})],w.prototype,"flexContent",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean,attribute:"without-header"})],w.prototype,"withoutHeader",void 0),(0,o.Cg)([(0,s.wk)()],w.prototype,"_open",void 0),(0,o.Cg)([(0,s.P)(".body")],w.prototype,"bodyContainer",void 0),(0,o.Cg)([(0,s.wk)(),(0,d.F)({context:c.D5,subscribe:!0})],w.prototype,"_i18n",void 0),(0,o.Cg)([(0,s.wk)(),(0,d.F)({context:c.WF,subscribe:!0})],w.prototype,"_hassConfig",void 0),(0,o.Cg)([(0,s.wk)()],w.prototype,"_bodyScrolled",void 0),(0,o.Cg)([(0,s.Ls)({passive:!0})],w.prototype,"_handleBodyScroll",null),w=(0,o.Cg)([(0,s.EM)("ha-dialog")],w),t()}catch(e){t(e)}})},7482(e,t,a){a.a(e,async function(e,t){try{a(97700),a(47144),a(89542);var o=a(89797),i=a(20686),r=a(32379),s=a(25771),l=a(19741),d=a(86075),n=a(98107),h=(a(99191),a(12357),a(44201)),c=(a(79994),e([n,h]));
2[n,h]=c.then?(await c)():c;class p extends i.WF{render(){return this.disabled?i.qy`${this._renderField()}${this._renderHelper()}`:i.qy` <ha-dropdown placement="bottom" @wa-select=${this._handleSelect} @wa-show=${this._handleShow} @wa-hide=${this._handleHide}> ${this._renderField()} ${this.options?this.options.map(e=>{const t=["string","number"].includes(typeof e);return i.qy` <ha-dropdown-item .value=${t?e:e.value} .disabled=${!t&&(e.disabled??!1)} .selected=${this.value===(t?e:e.value)}> ${e.iconPath?i.qy`<ha-svg-icon slot="icon" .path=${e.iconPath}></ha-svg-icon>`:i.s6} <div class="content"> ${t?e:e.label||e.value} ${e.secondary?i.qy`<div class="secondary"> ${e.secondary} </div>`:i.s6} </div> </ha-dropdown-item> `}):i.qy`<slot></slot>`} </ha-dropdown> ${this._renderHelper()} `}_renderField(){const e=this._getValueLabel(this.options,this.value);return i.qy` <ha-picker-field slot="trigger" type="button" class=${this._opened?"opened":""} compact=compact aria-label=${(0,s.J)(this.label)} @clear=${this._clearValue} .label=${this.label} .value=${e} .required=${this.required} .disabled=${this.disabled} .hideClearIcon=${!this.clearable||this.required||this.disabled||!String(this.value)}> </ha-picker-field> `}_renderHelper(){return this.helper?i.qy`<ha-input-helper-text>${this.helper}</ha-input-helper-text>`:i.s6}_handleSelect(e){e.stopPropagation();const t=e.detail.item.value;t!==this.value&&(0,d.r)(this,"selected",{value:t})}_clearValue(){!this.disabled&&this.value&&(0,d.r)(this,"selected",{value:void 0})}_handleShow(){this.style.setProperty("--select-menu-width",`${this._triggerField.offsetWidth}px`),this._opened=!0}_handleHide(){this._opened=!1}constructor(...e){super(...e),this.clearable=!1,this.required=!1,this.disabled=!1,this._opened=!1,this._getValueLabel=(0,l.A)((e,t)=>{const a=void 0!==t?String(t):void 0;if(!e||!a)return a;for(const t of e){const e=["string","number"].includes(typeof t);if(e&&t===a||!e&&String(t.value)===a)return e?t:t.label||t.value}return a})}}p.styles=i.AH`:host{position:relative}ha-picker-field.opened{--mdc-text-field-idle-line-color:var(--primary-color)}ha-dropdown-item .content{gap:var(--ha-space-1);flex-direction:column;display:flex}ha-dropdown-item .secondary{font-size:var(--ha-font-size-s);color:var(--ha-color-text-secondary)}ha-dropdown::part(menu){min-width:var(--select-menu-width)}ha-input-helper-text{margin:var(--ha-space-2) 0 0;display:block}`,(0,o.Cg)([(0,r.MZ)({type:Boolean})],p.prototype,"clearable",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],p.prototype,"options",void 0),(0,o.Cg)([(0,r.MZ)()],p.prototype,"label",void 0),(0,o.Cg)([(0,r.MZ)()],p.prototype,"helper",void 0),(0,o.Cg)([(0,r.MZ)()],p.prototype,"value",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],p.prototype,"required",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,o.Cg)([(0,r.wk)()],p.prototype,"_opened",void 0),(0,o.Cg)([(0,r.P)("ha-picker-field")],p.prototype,"_triggerField",void 0),p=(0,o.Cg)([(0,r.EM)("ha-select")],p),t()}catch(e){t(e)}})},26452(e,t,a){var o=a(89797),i=a(58477),r=a(20686),s=a(10899),l=a(32379);a.d(t,{},{V:e=>{class t extends e{get scrollableElement(){return t.DEFAULT_SCROLLABLE_ELEMENT}firstUpdated(e){super.firstUpdated?.(e),this.scrollableElement&&this._updateScrollableState(this.scrollableElement),this._attachScrollableElement()}updated(e){super.updated?.(e),this._attachScrollableElement()}disconnectedCallback(){this._detachScrollableElement(),this._contentScrolled=!1,this._contentScrollable=!1,super.disconnectedCallback()}renderScrollableFades(e=!1){return r.qy` <div class=${(0,s.H)({"fade-top":!0,rounded:e,visible:this._contentScrolled})}></div> <div class=${(0,s.H)({"fade-bottom":!0,rounded:e,visible:this._contentScrollable})}></div> `}static get styles(){const e=Object.getPrototypeOf(this);var t;return[...void 0===(t=e?.styles??[])?[]:Array.isArray(t)?t:[t],r.AH`.fade-top,.fade-bottom{height:var(--ha-space-2);pointer-events:none;border-radius:var(--ha-border-radius-square);opacity:0;background:linear-gradient(to bottom, var(--ha-color-shadow-scrollable-fade), transparent);transition:opacity .18s ease-in-out;position:absolute;
2left:0;right:0}.fade-top{top:0}.fade-bottom{bottom:0;transform:rotate(180deg)}.fade-top.visible,.fade-bottom.visible{opacity:1}.fade-top.rounded,.fade-bottom.rounded{border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}.fade-top.rounded{border-top-left-radius:var(--ha-border-radius-square);border-top-right-radius:var(--ha-border-radius-square)}.fade-bottom.rounded{border-bottom-left-radius:var(--ha-border-radius-square);border-bottom-right-radius:var(--ha-border-radius-square)}`]}_attachScrollableElement(){const e=this.scrollableElement;e!==this._scrollTarget&&(this._detachScrollableElement(),e&&(this._scrollTarget=e,e.addEventListener("scroll",this._onScroll,{passive:!0}),this._resize.observe(e),this._updateScrollableState(e)))}_detachScrollableElement(){this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._onScroll),this._resize.unobserve?.(this._scrollTarget),this._scrollTarget=void 0)}_updateScrollableState(e){const t=parseFloat(getComputedStyle(e).getPropertyValue("--safe-area-inset-bottom"))||0,{scrollHeight:a=0,clientHeight:o=0,scrollTop:i=0}=e;this._contentScrollable=a-o>i+t+this.scrollFadeSafeAreaPadding}constructor(...e){super(...e),this._contentScrolled=!1,this._contentScrollable=!1,this._onScroll=e=>{const t=e.currentTarget;this._contentScrolled=(t.scrollTop??0)>this.scrollFadeThreshold,this._updateScrollableState(t)},this._resize=new i.P(this,{target:null,callback:e=>{const t=e[0]?.target;t&&this._updateScrollableState(t)}}),this.scrollFadeSafeAreaPadding=4,this.scrollFadeThreshold=4}}return t.DEFAULT_SCROLLABLE_ELEMENT=null,(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrolled",void 0),(0,o.Cg)([(0,l.wk)()],t.prototype,"_contentScrollable",void 0),t}})},97096(e,t,a){var o=a(23533);a.d(t,{},{V:e=>!!e&&o.n})},23533(e,t,a){const o=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);a.d(t,{},{n:o})},54108(e,t,a){a.a(e,async function(e,t){try{var o=a(20686),i=a(32379),r=a(10899),s=a(25771),l=a(4075),d=a(70222),n=a(20390),h=a(14635),c=a(53963),p=a(84101),g=a(44735),u=a(39959),v=a(16406),f=a(99811),b=a(57065),w=a(45780),y=a(86464),m=a(89310),x=e([y,w]);[y,w]=x.then?(await x)():x;var _=Object.defineProperty,C=Object.getOwnPropertyDescriptor,S=(e,t,a,o)=>{for(var i,r=o>1?void 0:o?C(t,a):t,s=e.length-1;s>=0;s--)(i=e[s])&&(r=(o?i(t,a,r):i(r))||r);return o&&r&&_(t,a,r),r};let k=class extends b.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,u.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,u.I7)(this),this.removeOpenListeners()}async requestClose(e){const t=new n.L({source:e});if(this.dispatchEvent(t),t.defaultPrevented)return this.open=!0,void(0,c.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,c.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,u.I7)(this);const a=this.originalTrigger;"function"==typeof a?.focus&&setTimeout(()=>a.focus()),this.dispatchEvent(new l.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,p.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this)}handleDialogCancel(e){e.preventDefault(),!this.dialog.classList.contains("hide")&&e.target===this.dialog&&(0,p.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(e){const t=e.target.closest('[data-dialog="close"]');t&&(e.stopPropagation(),this.requestClose(t))}async handleDialogPointerDown(e){e.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,c.Ud)(this.dialog,"pulse"))}handleOpenChange(){this.open&&!this.dialog.open?this.show():!this.open&&this.dialog.open&&(this.open=!0,this.requestClose(this.dialog))}async show(){const e=new h.k;this.dispatchEvent(e),e.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,u.JG)(this),requestAnimationFrame(()=>{const e=this.querySelector("[autofocus]");e&&"function"==typeof e.focus?e.focus():this.dialog.focus()}),await(0,c.Ud)(this.dialog,"show"),this.dispatchEvent(new d.q))}render(){const e=!this.withoutHeader,t=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return o.qy` <dialog aria-labelledby=${this.ariaLabelledby??"title"} aria-describedby=${(0,s.J)(this.ariaDescribedby)} part="dialog" class=${(0,r.H)({dialog:!0,open:this.open})} @cancel=${this.handleDialogCancel} @click=${this.handleDialogClick} @pointerdown=${this.handleDialogPointerDown}> ${e?o.qy` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(8203)} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${e=>this.requestClose(e.target)}"> <wa-icon name="xmark" label=${this.localize.term("close")} library="system" variant="solid"></wa-icon> </wa-button>
2 </div> </header> `:""} <div part="body" class="body"><slot></slot></div> ${t?o.qy` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `:""} </dialog> `}constructor(){super(...arguments),this.localize=new w.c(this),this.hasSlotController=new v.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.withoutHeader=!1,this.lightDismiss=!1,this.withFooter=!1,this.handleDocumentKeyDown=e=>{"Escape"===e.key&&this.open&&(0,p.a0)(this)&&(e.preventDefault(),e.stopPropagation(),this.requestClose(this.dialog))}}};k.css=m.A,S([(0,i.P)(".dialog")],k.prototype,"dialog",2),S([(0,i.MZ)({type:Boolean,reflect:!0})],k.prototype,"open",2),S([(0,i.MZ)({reflect:!0})],k.prototype,"label",2),S([(0,i.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],k.prototype,"withoutHeader",2),S([(0,i.MZ)({attribute:"light-dismiss",type:Boolean})],k.prototype,"lightDismiss",2),S([(0,i.MZ)({attribute:"aria-labelledby"})],k.prototype,"ariaLabelledby",2),S([(0,i.MZ)({attribute:"aria-describedby"})],k.prototype,"ariaDescribedby",2),S([(0,i.MZ)({attribute:"with-footer",type:Boolean})],k.prototype,"withFooter",2),S([(0,f.w)("open",{waitUntilFirstUpdate:!0})],k.prototype,"handleOpenChange",1),k=S([(0,i.EM)("wa-dialog")],k),o.S$||(document.addEventListener("click",e=>{const t=e.target.closest("[data-dialog]");if(t instanceof Element){const[e,a]=(0,g.v)(t.getAttribute("data-dialog")||"");if("open"===e&&a?.length){const e=t.getRootNode().getElementById(a);"wa-dialog"===e?.localName?e.open=!0:console.warn(`A dialog with an ID of "${a}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),t()}catch(e){t(e)}})},89310(e,t,a){var o=a(20686).AH`:host{--width:31rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:.2s;--hide-duration:.2s;display:none}:host([open]){display:block}.dialog{width:var(--width);max-width:calc(100% - var(--wa-space-2xl));max-height:calc(100% - var(--wa-space-2xl));color:inherit;background-color:var(--wa-color-surface-raised);border-radius:var(--wa-panel-border-radius);box-shadow:var(--wa-shadow-l);border:none;flex-direction:column;margin:auto;padding:0;display:flex;inset:0}.dialog.show{animation:show-dialog var(--show-duration) ease}.dialog.show::backdrop{animation:show-backdrop var(--show-duration,.2s) ease}.dialog.hide{animation:show-dialog var(--hide-duration) ease reverse}.dialog.hide::backdrop{animation:show-backdrop var(--hide-duration,.2s) ease reverse}.dialog.pulse{animation:.25s pulse}.dialog:focus{outline:none}@media screen and (width<=420px){.dialog{max-height:80vh}}.open{opacity:1;display:flex}.header{flex-wrap:nowrap;flex:none;padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-end:0;padding-inline-start:var(--spacing);padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));display:flex}.title{font-family:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);flex:auto;align-self:center;margin:0}.header-actions{justify-content:end;align-self:start;gap:var(--wa-space-2xs);flex-wrap:wrap;flex-shrink:0;padding-inline-start:var(--spacing);display:flex}.header-actions wa-button,.header-actions ::slotted(wa-button){flex:none;align-items:center;display:flex}.body{padding:var(--spacing);-webkit-overflow-scrolling:touch;flex:auto;display:block;overflow:auto}.body:focus{outline:none}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{gap:var(--wa-space-xs);padding:var(--spacing);flex-wrap:wrap;flex:none;justify-content:end;padding-block-start:0;display:flex}.footer ::slotted(wa-button:not(:first-of-type)){margin-inline-start:var(--wa-spacing-xs)}.dialog::backdrop{background-color:var(--wa-color-overlay-modal,#00000040);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.02}to{scale:1}}@keyframes show-dialog{0%{opacity:0;scale:.8}to{opacity:1;scale:1}}@keyframes show-backdrop{0%{opacity:0}to{opacity:1}}@media (forced-colors:active){.dialog{border:1px solid #fff}}`;a.d(t,{A:()=>
2o})}}; 3//# sourceMappingURL=88645.7a99a829ef4ef16b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.