iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
8 lines • 22.9 kB
JavaScript
/*! For license information please see 58224.8c07ec81015ff894.js.LICENSE.txt */
export const __rspack_esm_id=58224;export const __rspack_esm_ids=[58224];export const __webpack_modules__={12587(e,t,i){i.d(t,{E:()=>o,m:()=>a});const a=e=>{requestAnimationFrame(()=>setTimeout(e,0))},o=()=>new Promise(e=>{a(e)})},11382(e,t,i){var a=i(62826),o=i(5124),r=i(22441),s=i(6412),n=i(1087),l=i(12587);i(67094);class h extends o.WF{render(){const e=this.noCollapse?o.s6:o.qy` <ha-svg-icon .path="${"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}" class="summary-icon ${(0,s.H)({expanded:this.expanded})}"></ha-svg-icon> `;return o.qy` <div class="top ${(0,s.H)({expanded:this.expanded})}"> <div id="summary" class="${(0,s.H)({noCollapse:this.noCollapse})}" ="${this._toggleContainer}" ="${this._toggleContainer}" ="${this._focusChanged}" ="${this._focusChanged}" role="button" tabindex="${this.noCollapse?-1:0}" aria-expanded="${this.expanded}" aria-controls="sect1" part="summary"> ${this.leftChevron?e:o.s6} <slot name="leading-icon"></slot> <slot name="header"> <div class="header"> ${this.header} <slot class="secondary" name="secondary">${this.secondary}</slot> </div> </slot> <slot name="event"></slot> ${this.leftChevron?o.s6:e} <slot name="icons"></slot> </div> </div> <div class="container ${(0,s.H)({expanded:this.expanded})}" ="${this._handleTransitionEnd}" role="region" aria-labelledby="summary" aria-hidden="${!this.expanded}" tabindex="-1"> ${this._showContent?o.qy`<slot></slot>`:""} </div> `}willUpdate(e){super.willUpdate(e),e.has("expanded")&&(this._showContent=this.expanded,setTimeout(()=>{this._container.style.overflow=this.expanded?"initial":"hidden"},300))}_handleTransitionEnd(){this._container.style.removeProperty("height"),this._container.style.overflow=this.expanded?"initial":"hidden",this._showContent=this.expanded}async _toggleContainer(e){if(e.defaultPrevented)return;if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;if(e.preventDefault(),this.noCollapse)return;const t=!this.expanded;(0,n.r)(this,"expanded-will-change",{expanded:t}),this._container.style.overflow="hidden",t&&(this._showContent=!0,await(0,l.E)());const i=this._container.scrollHeight;this._container.style.height=`${i}px`,t||setTimeout(()=>{this._container.style.height="0px"},0),this.expanded=t,(0,n.r)(this,"expanded-changed",{expanded:this.expanded})}_focusChanged(e){this.noCollapse||this.shadowRoot.querySelector(".top").classList.toggle("focused","focus"===e.type)}constructor(...e){super(...e),this.expanded=!1,this.outlined=!1,this.leftChevron=!1,this.noCollapse=!1,this._showContent=this.expanded}}h.styles=o.AH`:host{display:block}.top{display:flex;align-items:center;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.top.expanded{border-bottom-left-radius:0px;border-bottom-right-radius:0px}.top.focused{background:var(--input-fill-color)}:host([outlined]){box-shadow:none;border-width:1px;border-style:solid;border-color:var(--outline-color);border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg))}.summary-icon{transition:transform 150ms cubic-bezier(.4, 0, .2, 1);direction:var(--direction);margin-left:8px;margin-inline-start:8px;margin-inline-end:initial;border-radius:var(--ha-border-radius-circle)}#summary:focus-visible ha-svg-icon.summary-icon{background-color:var(--ha-color-fill-neutral-normal-active)}::slotted([slot=leading-icon]),:host([left-chevron]) .summary-icon{margin-left:0;margin-right:8px;margin-inline-start:0;margin-inline-end:8px}#summary{flex:1;display:flex;padding:var(--expansion-panel-summary-padding,0 8px);min-height:48px;align-items:center;cursor:pointer;overflow:hidden;font-weight:var(--ha-font-weight-medium);outline:0}#summary.noCollapse{cursor:default}.summary-icon.expanded{transform:rotate(180deg)}.header,::slotted([slot=header]){flex:1;overflow-wrap:anywhere;color:var(--primary-text-color)}.container{padding:var(--expansion-panel-content-padding,0 8px);overflow:hidden;transition:height .3s cubic-bezier(.4, 0, .2, 1);height:0px}.container.expanded{height:auto}.secondary{display:block;color:var(--secondary-text-color);font-size:var(--ha-font-size-s)}`,(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],h.prototype,"expanded",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],h.prototype,"outlined",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"left-chevron",type:Boolean,reflect:!0})],h.prototype,"leftChevron",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"no-collapse",type:Boolean,reflect:!0})],h.prototype,"noCollapse",void 0),(0,a.Cg)([(0,r.MZ)()],h.prototype,"header",void 0),(0,a.Cg)([(0,r.MZ)()],h.prototype,"secondary",void 0),(0,a.Cg)([(0,r.wk)()],h.prototype,"_showContent",void 0),(0,a.Cg)([(0,r.P)(".container")],h.prototype,"_container",void 0),h=(0,a.Cg)([(0,r.EM)("ha-expansion-panel")],h)},64138(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HaIconPicker:()=>w});i(74423),i(44114),i(18111),i(22489),i(7588),i(61701),i(13579);var o=i(62826),r=i(5124),s=i(22441),n=i(22786),l=i(1087),h=i(700),c=(i(75064),i(38508)),d=(i(47680),e([c]));c=(d.then?(await d)():d)[0];let u=[],p=!1;const v=(e,t)=>{const i=`${t}:${e.name}`,a=e.name,o=a.split("-"),r=e.keywords??[],s={iconName:a};return o.forEach((e,t)=>{s[`part${t}`]=e}),r.forEach((e,t)=>{s[`keyword${t}`]=e}),{id:i,primary:i,icon:i,search_labels:s,sorting_label:i}},b=async()=>{p=!0;const e=await i.e(81340).then(i.t.bind(i,25143,19));u=e.default.map(e=>v(e,"mdi"));const t=[];Object.keys(h.y).forEach(e=>{t.push(m(e))}),(await Promise.all(t)).forEach(e=>{u.push(...e)})},m=async e=>{try{const t=h.y[e].getIconList;if("function"!=typeof t)return[];return(await t()).map(t=>v(t,e))}catch(t){return console.warn(`Unable to load icon list for ${e} iconset`),[]}},g=e=>r.qy` <ha-combo-box-item type="button"> <ha-icon .icon="${e.id}" slot="start"></ha-icon> ${e.id} </ha-combo-box-item> `;class w extends r.WF{render(){return r.qy` <ha-generic-picker allow-custom-value .getItems="${this._getIconPickerItems}" .helper="${this.helper}" .disabled="${this.disabled}" .required="${this.required}" .errorMessage="${this.errorMessage}" .invalid="${this.invalid}" .rowRenderer="${g}" .icon="${this._icon}" .label="${this.label}" .value="${this._value}" .searchFn="${this._filterIcons}" -changed="${this._valueChanged}"> <slot name="start"></slot> </ha-generic-picker> `}firstUpdated(){p||b().then(()=>{this._getIconPickerItems=()=>u,this.requestUpdate()})}_valueChanged(e){e.stopPropagation(),this._setValue(e.detail.value)}_setValue(e){this.value=e,(0,l.r)(this,"value-changed",{value:this._value},{bubbles:!1,composed:!1})}get _icon(){return this.value?.length?this.value:this.placeholder}get _value(){return this.value||""}constructor(...e){super(...e),this.disabled=!1,this.required=!1,this.invalid=!1,this._getIconPickerItems=()=>u,this._filterIcons=(0,n.A)((e,t,i)=>{const a=e.toLowerCase().replace(/\s+/g,"-"),o=i?.length?i:t;if(!a.length)return o;const r=[];for(const e of o){const t=(e.id.split(":")[1]||e.id).toLowerCase().split("-"),i=e.search_labels?Object.values(e.search_labels).filter(e=>null!==e).map(e=>e.toLowerCase()):[],o=e.id.toLowerCase();t.includes(a)?r.push({item:e,rank:1}):i.includes(a)?r.push({item:e,rank:2}):o.includes(a)?r.push({item:e,rank:3}):i.some(e=>e.includes(a))&&r.push({item:e,rank:4})}return r.sort((e,t)=>e.rank-t.rank).map(e=>e.item)})}}w.styles=r.AH`ha-generic-picker{width:100%;display:block}`,(0,o.Cg)([(0,s.MZ)()],w.prototype,"value",void 0),(0,o.Cg)([(0,s.MZ)()],w.prototype,"label",void 0),(0,o.Cg)([(0,s.MZ)()],w.prototype,"helper",void 0),(0,o.Cg)([(0,s.MZ)()],w.prototype,"placeholder",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"error-message"})],w.prototype,"errorMessage",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"disabled",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"required",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],w.prototype,"invalid",void 0),w=(0,o.Cg)([(0,s.EM)("ha-icon-picker")],w),a()}catch(e){a(e)}})},59646(e,t,i){i.a(e,async function(e,t){try{var a=i(62826),o=i(29344),r=i(5124),s=i(22441),n=i(88360),l=e([o]);o=(l.then?(await l)():l)[0];class h extends o.A{updated(e){super.updated(e),e.has("haptic")&&(this.haptic?this.addEventListener("change",this._forwardHaptic):this.removeEventListener("change",this._forwardHaptic))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this._forwardHaptic)}static get styles(){return[o.A.styles,r.AH`:host{--wa-form-control-toggle-size:var(--ha-switch-size, 24px);--wa-form-control-required-content:var(
--ha-switch-required-marker,
var(--ha-input-required-marker, "*")
);--wa-form-control-required-content-offset:var(
--ha-switch-required-marker-offset,
0.1rem
);--thumb-size:var(--ha-switch-thumb-size, 18px);--width:var(--ha-switch-width, 48px)}label{position:relative;height:max(var(--thumb-size),var(--wa-form-control-toggle-size))}label::before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-width:var(--ha-switch-min-touch-size,40px);min-height:var(--ha-switch-min-touch-size,40px)}label.disabled::before{pointer-events:none}.switch{background-color:var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-resting));border-color:var(--ha-switch-border-color,var(--ha-color-border-neutral-normal))}label:not(.disabled) .input:focus-visible~.switch,label:not(.disabled):hover .switch{background-color:var(--ha-switch-background-color-hover,var(--ha-switch-background-color,var(--ha-color-fill-disabled-quiet-hover)))}.checked .switch{background-color:var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-resting));border-color:var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud))}label:not(.disabled).checked .input:focus-visible~.switch,label:not(.disabled).checked:hover .switch{background-color:var(--ha-switch-checked-background-color-hover,var(--ha-switch-checked-background-color,var(--ha-color-fill-primary-normal-hover)));border-color:var(--ha-switch-checked-border-color-hover,var(--ha-switch-checked-border-color,var(--ha-color-border-primary-loud)))}.switch .thumb{background-color:var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal));border-color:var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal));border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);box-shadow:var(--ha-switch-thumb-box-shadow,var(--ha-box-shadow-s))}label:not(.disabled) .input:focus-visible~.switch .thumb,label:not(.disabled):hover .switch .thumb{background-color:var(--ha-switch-thumb-background-color-hover,var(--ha-switch-thumb-background-color,var(--ha-color-on-neutral-normal)));border-color:var(--ha-switch-thumb-border-color-hover,var(--ha-switch-thumb-border-color,var(--ha-color-on-neutral-normal)))}.checked .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal));border-color:var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal))}label:not(.disabled).checked .input:focus-visible~.switch .thumb,label:not(.disabled).checked:hover .switch .thumb{background-color:var(--ha-switch-checked-thumb-background-color-hover,var(--ha-switch-checked-thumb-background-color,var(--ha-color-on-primary-normal)));border-color:var(--ha-switch-checked-thumb-border-color-hover,var(--ha-switch-checked-thumb-border-color,var(--ha-color-on-primary-normal)))}label.disabled{opacity:var(--ha-switch-disabled-opacity, .3);cursor:not-allowed}label:not(.disabled) .input:focus-visible~.switch .thumb{outline:0;outline-offset:none}label:not(.disabled) .input:focus-visible~.switch{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}:host(:empty) slot.label{display:none}`]}constructor(...e){super(...e),this.haptic=!1,this._forwardHaptic=()=>{(0,n.j)(this,"light")}}}(0,a.Cg)([(0,s.MZ)({type:Boolean})],h.prototype,"haptic",void 0),h=(0,a.Cg)([(0,s.EM)("ha-switch")],h),t()}catch(e){t(e)}})},88360(e,t,i){i.d(t,{j:()=>o});var a=i(1087);const o=(e,t)=>{(0,a.r)(e,"haptic",t)}},46963(e,t,i){i.a(e,async function(e,a){try{i.r(t);var o=i(62826),r=i(5124),s=i(22441),n=i(1087),l=(i(11382),i(64138)),h=i(59646),c=i(91485),d=i(14503),u=e([l,h,c]);[l,h,c]=u.then?(await u)():u;class p extends r.WF{set item(e){this._item=e,e?(this._name=e.name||"",this._icon=e.icon||"",this._maximum=e.maximum??void 0,this._minimum=e.minimum??void 0,this._restore=e.restore??!0,this._step=e.step??1,this._initial=e.initial??0):(this._name="",this._icon="",this._maximum=void 0,this._minimum=void 0,this._restore=!0,this._step=1,this._initial=0)}focus(){this.updateComplete.then(()=>this._focusElement?.focus())}render(){return this.hass?r.qy` <div class="form"> <ha-input .value="${this._name}" .configValue="${"name"}" ="${this._valueChanged}" .label="${this.hass.localize("ui.dialogs.helper_settings.generic.name")}" auto-validate required .validationMessage="${this.hass.localize("ui.dialogs.helper_settings.required_error_msg")}" dialogInitialFocus .disabled="${this.disabled}"></ha-input> <ha-icon-picker .value="${this._icon}" .configValue="${"icon"}" -changed="${this._valueChanged}" .label="${this.hass.localize("ui.dialogs.helper_settings.generic.icon")}" .disabled="${this.disabled}"></ha-icon-picker> <ha-input .value="${void 0!==this._minimum?String(this._minimum):""}" .configValue="${"minimum"}" type="number" ="${this._valueChanged}" .label="${this.hass.localize("ui.dialogs.helper_settings.counter.minimum")}" .disabled="${this.disabled}"></ha-input> <ha-input .value="${void 0!==this._maximum?String(this._maximum):""}" .configValue="${"maximum"}" type="number" ="${this._valueChanged}" .label="${this.hass.localize("ui.dialogs.helper_settings.counter.maximum")}" .disabled="${this.disabled}"></ha-input> <ha-input .value="${void 0!==this._initial?String(this._initial):""}" .configValue="${"initial"}" type="number" ="${this._valueChanged}" .label="${this.hass.localize("ui.dialogs.helper_settings.counter.initial")}" .disabled="${this.disabled}"></ha-input> <ha-expansion-panel header="${this.hass.localize("ui.dialogs.helper_settings.generic.advanced_settings")}" outlined> <ha-input .value="${void 0!==this._step?String(this._step):""}" .configValue="${"step"}" type="number" ="${this._valueChanged}" .label="${this.hass.localize("ui.dialogs.helper_settings.counter.step")}" .disabled="${this.disabled}"></ha-input> <div class="row"> <ha-switch .checked="${this._restore}" .configValue="${"restore"}" ="${this._valueChanged}" .disabled="${this.disabled}"> </ha-switch> <div> ${this.hass.localize("ui.dialogs.helper_settings.counter.restore")} </div> </div> </ha-expansion-panel> </div> `:r.s6}_valueChanged(e){if(!this.new&&!this._item)return;e.stopPropagation();const t=e.target,i=t.configValue,a="number"===t.type?""!==t.value?Number(t.value):void 0:"ha-switch"===t.localName?e.target.checked:e.detail?.value||t.value;if(this[`_${i}`]===a)return;const o={...this._item};void 0===a||""===a?delete o[i]:o[i]=a,(0,n.r)(this,"value-changed",{value:o})}static get styles(){return[d.RF,r.AH`.form{color:var(--primary-text-color)}.row{margin-top:12px;margin-bottom:12px;color:var(--primary-text-color);display:flex;align-items:center}.row div{margin-left:16px;margin-inline-start:16px;margin-inline-end:initial}ha-input{margin:var(--ha-space-2) 0}`]}constructor(...e){super(...e),this.new=!1,this.disabled=!1}}(0,o.Cg)([(0,s.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"new",void 0),(0,o.Cg)([(0,s.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_name",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_icon",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_maximum",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_minimum",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_restore",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_initial",void 0),(0,o.Cg)([(0,s.wk)()],p.prototype,"_step",void 0),(0,o.Cg)([(0,s.P)("[dialogInitialFocus]")],p.prototype,"_focusElement",void 0),p=(0,o.Cg)([(0,s.EM)("ha-counter-form")],p),a()}catch(e){a(e)}})},29344(e,t,i){i.a(e,async function(e,a){try{i.d(t,{A:()=>_});var o=i(5124),r=i(22441),s=i(6412),n=i(63672),l=i(34514),h=i(40991),c=i(92070),d=i(41268),u=i(9395),p=i(62676),v=i(15477),b=i(31896),m=i(17060),g=i(19978),w=e([m]);m=(w.then?(await w)():w)[0];var y=Object.defineProperty,f=Object.getOwnPropertyDescriptor,k=(e,t,i,a)=>{for(var o,r=a>1?void 0:a?f(t,i):t,s=e.length-1;s>=0;s--)(o=e[s])&&(r=(a?o(t,i,r):o(r))||r);return a&&r&&y(t,i,r),r};let _=class extends p.q{static get validators(){return[...super.validators,(0,d.i)()]}get value(){return this._value??"on"}set value(e){this._value=e}handleSizeChange(){(0,h.b)(this.localName,this.size)}get checked(){return this.valueHasChanged?Boolean(this._checked):this._checked??this.defaultChecked}set checked(e){this._checked=Boolean(e),this.valueHasChanged=!0}handleClick(){this.hasInteracted=!0,this.checked=!this.checked,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}handleKeyDown(e){const t="rtl"===this.localize.dir();"ArrowLeft"===e.key&&(e.preventDefault(),this.checked=t,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))})),"ArrowRight"===e.key&&(e.preventDefault(),this.checked=!t,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}))}willUpdate(e){super.willUpdate(e),(e.has("value")||e.has("checked")||e.has("defaultChecked"))&&this.handleValueOrCheckedChange()}handleValueOrCheckedChange(){this.setValue(this.checked?this.value:null,this._value),this.updateValidity()}handleStateChange(){this.hasUpdated&&(this.input.checked=this.checked),this.customStates.set("checked",this.checked),this.updateValidity()}handleDisabledChange(){this.updateValidity()}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}setValue(e,t){this.checked?this.internals.setFormValue(e??"on",t):this.internals.setFormValue(null,null)}formResetCallback(){this._checked=null,super.formResetCallback(),this.handleValueOrCheckedChange()}render(){const e=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,t=!!this.hint||!!e;return o.qy` <label part="base" class="${(0,s.H)({checked:this.checked,disabled:this.disabled})}"> <input class="input" type="checkbox" title="${this.title}" name="${(0,n.J)(this.name)}" value="${(0,n.J)(this.value)}" .checked="${(0,l.V)(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" role="switch" aria-checked="${this.checked?"true":"false"}" aria-describedby="hint" ="${this.handleClick}" ="${this.handleKeyDown}"> <span part="control" class="switch"> <span part="thumb" class="thumb"></span> </span> <slot part="label" class="label"></slot> </label> <slot id="hint" name="hint" part="hint" class="${(0,s.H)({"has-slotted":t})}" aria-hidden="${t?"false":"true"}">${this.hint}</slot> `}constructor(){super(...arguments),this.hasSlotController=new c.X(this,"hint"),this.localize=new m.c(this),this.title="",this.name=null,this._value=this.getAttribute("value")??null,this.size="m",this.disabled=!1,this._checked=null,this.defaultChecked=this.hasAttribute("checked"),this.required=!1,this.hint="",this.withHint=!1}};_.shadowRootOptions={...p.q.shadowRootOptions,delegatesFocus:!0},_.css=[v.A,b.A,g.A],k([(0,r.P)('input[type="checkbox"]')],_.prototype,"input",2),k([(0,r.MZ)()],_.prototype,"title",2),k([(0,r.MZ)({reflect:!0})],_.prototype,"name",2),k([(0,r.MZ)({reflect:!0})],_.prototype,"value",1),k([(0,r.MZ)({reflect:!0})],_.prototype,"size",2),k([(0,u.w)("size")],_.prototype,"handleSizeChange",1),k([(0,r.MZ)({type:Boolean})],_.prototype,"disabled",2),k([(0,r.MZ)({type:Boolean,attribute:!1})],_.prototype,"checked",1),k([(0,r.MZ)({type:Boolean,attribute:"checked",reflect:!0})],_.prototype,"defaultChecked",2),k([(0,r.MZ)({type:Boolean,reflect:!0})],_.prototype,"required",2),k([(0,r.MZ)({attribute:"hint"})],_.prototype,"hint",2),k([(0,r.MZ)({attribute:"with-hint",type:Boolean})],_.prototype,"withHint",2),k([(0,u.w)(["checked","defaultChecked"])],_.prototype,"handleStateChange",1),k([(0,u.w)("disabled",{waitUntilFirstUpdate:!0})],_.prototype,"handleDisabledChange",1),_=k([(0,r.EM)("wa-switch")],_),_.disableWarning?.("change-in-update"),a()}catch(e){a(e)}})},19978(e,t,i){i.d(t,{A:()=>a});var a=i(5124).AH`:host{--height:var(--wa-form-control-toggle-size);--width:calc(var(--height) * 1.75);--thumb-size:0.75em;display:inline-flex;line-height:var(--wa-form-control-value-line-height)}label{position:relative;display:flex;align-items:center;font:inherit;color:var(--wa-form-control-value-color);vertical-align:middle;cursor:pointer}.switch{flex:0 0 auto;position:relative;display:flex;align-items:center;justify-content:center;width:var(--width);height:var(--height);background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color);border-radius:var(--height);border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);transition-property:translate,background,border-color,box-shadow;transition-duration:var(--wa-transition-normal);transition-timing-function:var(--wa-transition-easing)}.switch .thumb{aspect-ratio:1/1;width:var(--thumb-size);height:var(--thumb-size);background-color:var(--wa-form-control-border-color);border-radius:50%;translate:calc((var(--width) - var(--height))/ -2);transition:inherit}.switch .thumb:dir(rtl){translate:calc((var(--width) - var(--height))/ 2)}.input{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none}label:not(.disabled) .input:focus-visible~.switch .thumb{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.checked .switch{background-color:var(--wa-form-control-activated-color);border-color:var(--wa-form-control-activated-color)}.checked .switch .thumb{background-color:var(--wa-color-surface-default);translate:calc((var(--width) - var(--height))/ 2)}.checked .switch .thumb:dir(rtl){translate:calc((var(--width) - var(--height))/ -2)}label:has(> :disabled){opacity:.5;cursor:not-allowed}[part~=label]{display:inline-block;line-height:var(--height);margin-inline-start:.5em;user-select:none;-webkit-user-select:none}:host([required]) [part~=label]::after{content:var(--wa-form-control-required-content);color:var(--wa-form-control-required-content-color);margin-inline-start:var(--wa-form-control-required-content-offset)} (forced-colors:active){:checked+.switch .thumb,:checked:enabled+.switch:hover .thumb{background-color:ButtonText}}`}};