UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

5 lines 35.4 kB
/*! For license information please see 67897.f739187ea3c99603.js.LICENSE.txt */ export const __rspack_esm_id=67897;export const __rspack_esm_ids=[67897];export const __webpack_modules__={51324(t,e,i){i.d(e,{ZS:()=>h,is:()=>s.i});var o,a,r=i(62826),n=i(22441),s=i(12451);const l=null!==(a=null===(o=window.ShadyDOM)||void 0===o?void 0:o.inUse)&&void 0!==a&&a;class h extends s.O{findFormElement(){if(!this.shadowRoot||l)return null;const t=this.getRootNode().querySelectorAll("form");for(const e of Array.from(t))if(e.contains(this))return e;return null}connectedCallback(){var t;super.connectedCallback(),this.containingForm=this.findFormElement(),null===(t=this.containingForm)||void 0===t||t.addEventListener("formdata",this.formDataListener)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.containingForm)||void 0===t||t.removeEventListener("formdata",this.formDataListener),this.containingForm=null}click(){this.formElement&&!this.disabled&&(this.formElement.focus(),this.formElement.click())}firstUpdated(){super.firstUpdated(),this.shadowRoot&&this.mdcRoot.addEventListener("change",t=>{this.dispatchEvent(new Event("change",t))})}constructor(){super(...arguments),this.disabled=!1,this.containingForm=null,this.formDataListener=t=>{this.disabled||this.setFormData(t.formData)}}}h.shadowRootOptions={mode:"open",delegatesFocus:!0},(0,r.Cg)([(0,n.MZ)({type:Boolean})],h.prototype,"disabled",void 0)},68462(t,e,i){i.d(e,{M:()=>b});var o=i(62826),a=i(7658),r={ROOT:"mdc-form-field"},n={LABEL_SELECTOR:".mdc-form-field > label"};const s=function(t){function e(i){var a=t.call(this,(0,o.Cl)((0,o.Cl)({},e.defaultAdapter),i))||this;return a.click=function(){a.handleClick()},a}return(0,o.C6)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return r},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return n},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame(function(){t.adapter.deactivateInputRipple()})},e}(a.I);var l=i(12451),h=i(51324),d=i(56161),c=i(5124),p=i(22441),u=i(6412);class b extends l.O{createAdapter(){return{registerInteractionHandler:(t,e)=>{this.labelEl.addEventListener(t,e)},deregisterInteractionHandler:(t,e)=>{this.labelEl.removeEventListener(t,e)},activateInputRipple:async()=>{const t=this.input;if(t instanceof h.ZS){const e=await t.ripple;e&&e.startPress()}},deactivateInputRipple:async()=>{const t=this.input;if(t instanceof h.ZS){const e=await t.ripple;e&&e.endPress()}}}}get input(){var t,e;return null!==(e=null===(t=this.slottedInputs)||void 0===t?void 0:t[0])&&void 0!==e?e:null}render(){const t={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return c.qy` <div class="mdc-form-field ${(0,u.H)(t)}"> <slot></slot> <label class="mdc-label" @click="${this._labelClick}">${this.label}</label> </div>`}click(){this._labelClick()}_labelClick(){const t=this.input;t&&(t.focus(),t.click())}constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=s}}(0,o.Cg)([(0,p.MZ)({type:Boolean})],b.prototype,"alignEnd",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean})],b.prototype,"spaceBetween",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean})],b.prototype,"nowrap",void 0),(0,o.Cg)([(0,p.MZ)({type:String}),(0,d.P)(async function(t){var e;null===(e=this.input)||void 0===e||e.setAttribute("aria-label",t)})],b.prototype,"label",void 0),(0,o.Cg)([(0,p.P)(".mdc-form-field")],b.prototype,"mdcRoot",void 0),(0,o.Cg)([(0,p.KN)({slot:"",flatten:!0,selector:"*"})],b.prototype,"slottedInputs",void 0),(0,o.Cg)([(0,p.P)("label")],b.prototype,"labelEl",void 0)},38627(t,e,i){i.d(e,{R:()=>o});const o=i(5124).AH`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}.mdc-form-field>label[dir=rtl],[dir=rtl] .mdc-form-field>label{margin-left:auto;margin-right:0}.mdc-form-field>label[dir=rtl],[dir=rtl] .mdc-form-field>label{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}.mdc-form-field--align-end>label[dir=rtl],[dir=rtl] .mdc-form-field--align-end>label{margin-left:0;margin-right:auto}.mdc-form-field--align-end>label[dir=rtl],[dir=rtl] .mdc-form-field--align-end>label{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}.mdc-form-field--space-between>label[dir=rtl],[dir=rtl] .mdc-form-field--space-between>label{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}::slotted(mwc-switch){margin-right:10px}::slotted(mwc-switch[dir=rtl]),[dir=rtl] ::slotted(mwc-switch){margin-left:10px}`},61366(t,e,i){i.a(t,async function(t,e){try{i(74423),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);var o=i(5124),a=i(22441),r=i(6412),n=i(63672),s=i(17051),l=i(42462),h=i(28438),d=i(98779),c=i(27259),p=i(25877),u=i(984),b=i(95010),f=i(9395),m=i(717),v=i(40158),g=i(10416),w=t([v]);v=(w.then?(await w)():w)[0];var y=Object.defineProperty,k=Object.getOwnPropertyDescriptor,x=(t,e,i,o)=>{for(var a,r=o>1?void 0:o?k(e,i):e,n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o?a(e,i,r):a(r))||r);return o&&r&&y(e,i,r),r};const C=new Set;let z=class extends m.A{connectedCallback(){super.connectedCallback(),this.id||(this.id=(0,b.N)("wa-popover-")),this.eventController.signal.aborted&&(this.eventController=new AbortController),this.for&&this.anchor&&(this.anchor=null,this.handleForChange())}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this),this.eventController.abort()}firstUpdated(){this.open&&this.handleOpenChange()}updated(t){t.has("open")&&this.customStates.set("open",this.open)}async handleOpenChange(){if(this.open){const t=new d.k;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);C.forEach(t=>t.open=!1),document.addEventListener("keydown",this.handleDocumentKeyDown,{signal:this.eventController.signal}),document.addEventListener("click",this.handleDocumentClick,{signal:this.eventController.signal}),this.trapFocus?this.dialog.showModal():this.dialog.show(),this.popup.active=!0,C.add(this),(0,p.AZ)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.dialog.focus()}),this.popup.popup||await this.popup.updateComplete,await(0,c.Ud)(this.popup.popup,"show-with-scale"),this.popup.reposition(),this.dispatchEvent(new l.q)}else{const t=new h.L;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!0);document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("click",this.handleDocumentClick),C.delete(this),(0,p.Fw)(this),await(0,c.Ud)(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.dialog.close(),this.dispatchEvent(new s.Z)}}handleForChange(){const t=this.getRootNode();if(!t)return;const e=this.for?t.getElementById(this.for):null,i=this.anchor;if(e===i)return;const{signal:o}=this.eventController;e&&e.addEventListener("click",this.handleAnchorClick,{signal:o}),i&&i.removeEventListener("click",this.handleAnchorClick),this.anchor=e,this.for&&!e&&console.warn(`A popover was assigned to an element with an ID of "${this.for}" but the element could not be found.`,this)}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}async show(){if(!this.open)return this.open=!0,(0,u.l)(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,(0,u.l)(this,"wa-after-hide")}handleDialogCancel(t){t.preventDefault(),this.dialog.classList.contains("hide")||(this.open=!1)}render(){return o.qy` <dialog aria-labelledby="${(0,n.J)(this.ariaLabelledby)}" aria-describedby="${(0,n.J)(this.ariaDescribedby)}" part="dialog" class="dialog" @cancel="${this.handleDialogCancel}"> <wa-popup part="popup" exportparts=" popup:popup__popup, arrow:popup__arrow " class="${(0,r.H)({popover:!0,"popover-open":this.open})}" placement="${this.placement}" distance="${this.distance}" skidding="${this.skidding}" flip shift ?arrow="${!this.withoutArrow}" .anchor="${this.anchor}" .autoSize="${this.autoSize}" .autoSizePadding="${this.autoSizePadding}"> <div part="body" class="body" @click="${this.handleBodyClick}"> <slot></slot> </div> </wa-popup> </dialog> `}constructor(){super(...arguments),this.anchor=null,this.placement="top",this.open=!1,this.distance=8,this.skidding=0,this.for=null,this.withoutArrow=!1,this.autoSizePadding=0,this.trapFocus=!1,this.eventController=new AbortController,this.handleAnchorClick=()=>{this.open=!this.open},this.handleBodyClick=t=>{t.stopPropagation();t.target.closest('[data-popover="close"]')&&(this.open=!1)},this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.open&&(0,p.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.open=!1,this.anchor&&"function"==typeof this.anchor.focus&&this.anchor.focus())},this.handleDocumentClick=t=>{this.anchor&&t.composedPath().includes(this.anchor)||t.composedPath().includes(this)||(this.open=!1)}}};z.css=g.A,z.dependencies={"wa-popup":v.A},x([(0,a.P)("dialog")],z.prototype,"dialog",2),x([(0,a.P)(".body")],z.prototype,"body",2),x([(0,a.P)("wa-popup")],z.prototype,"popup",2),x([(0,a.wk)()],z.prototype,"anchor",2),x([(0,a.MZ)()],z.prototype,"placement",2),x([(0,a.MZ)({type:Boolean,reflect:!0})],z.prototype,"open",2),x([(0,a.MZ)({type:Number})],z.prototype,"distance",2),x([(0,a.MZ)({type:Number})],z.prototype,"skidding",2),x([(0,a.MZ)()],z.prototype,"for",2),x([(0,a.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],z.prototype,"withoutArrow",2),x([(0,a.MZ)({attribute:"auto-size"})],z.prototype,"autoSize",2),x([(0,a.MZ)({attribute:"auto-size-padding",type:Number})],z.prototype,"autoSizePadding",2),x([(0,a.MZ)({attribute:"trap-focus",type:Boolean})],z.prototype,"trapFocus",2),x([(0,a.MZ)({attribute:"aria-labelledby"})],z.prototype,"ariaLabelledby",2),x([(0,a.MZ)({attribute:"aria-describedby"})],z.prototype,"ariaDescribedby",2),x([(0,f.w)("open",{waitUntilFirstUpdate:!0})],z.prototype,"handleOpenChange",1),x([(0,f.w)("for")],z.prototype,"handleForChange",1),x([(0,f.w)(["distance","placement","skidding"])],z.prototype,"handleOptionsChange",1),z=x([(0,a.EM)("wa-popover")],z),e()}catch(t){e(t)}})},10416(t,e,i){i.d(e,{A:()=>o});var o=i(5124).AH`:host{--arrow-size:0.375rem;--max-width:25rem;--show-duration:100ms;--hide-duration:100ms;display:contents;font-size:var(--wa-font-size-m);line-height:var(--wa-line-height-normal);text-align:start;white-space:normal}.dialog{display:none;position:fixed;inset:0;width:100%;height:100%;margin:0;padding:0;border:none;background:0 0;overflow:visible;pointer-events:none}.dialog:focus{outline:0}.dialog[open]{display:block}.popover{--arrow-size:inherit;--popup-border-width:var(--wa-panel-border-width);--show-duration:inherit;--hide-duration:inherit;pointer-events:auto}.popover::part(arrow){background-color:var(--wa-color-surface-default);border-top:none;border-left:none;border-bottom:solid var(--wa-panel-border-width) var(--wa-color-surface-border);border-right:solid var(--wa-panel-border-width) var(--wa-color-surface-border);box-shadow:none}.popover[placement^=top]::part(popup){transform-origin:bottom}.popover[placement^=bottom]::part(popup){transform-origin:top}.popover[placement^=left]::part(popup){transform-origin:right}.popover[placement^=right]::part(popup){transform-origin:left}.body{display:flex;flex-direction:column;width:auto;max-width:min(var(--max-width),100vw);padding:var(--wa-space-l);background-color:var(--wa-color-surface-default);border:var(--wa-panel-border-width) solid var(--wa-color-surface-border);border-radius:var(--wa-panel-border-radius);border-style:var(--wa-panel-border-style);box-shadow:var(--wa-shadow-l);color:var(--wa-color-text-normal);user-select:none;-webkit-user-select:none}.popover[data-current-placement^=bottom] .body,.popover[data-current-placement^=top] .body{max-width:min(var(--max-width),100vw - (var(--wa-space-m) * 2));margin-inline:var(--wa-space-m)}.popover[data-current-placement^=left] .body,.popover[data-current-placement^=right] .body{max-height:calc(100vh - (var(--wa-space-m) * 2));margin-block:var(--wa-space-m)}`},29344(t,e,i){i.a(t,async function(t,o){try{i.d(e,{A:()=>x});var a=i(5124),r=i(22441),n=i(6412),s=i(63672),l=i(34514),h=i(40991),d=i(92070),c=i(41268),p=i(9395),u=i(62676),b=i(15477),f=i(31896),m=i(17060),v=i(19978),g=t([m]);m=(g.then?(await g)():g)[0];var w=Object.defineProperty,y=Object.getOwnPropertyDescriptor,k=(t,e,i,o)=>{for(var a,r=o>1?void 0:o?y(e,i):e,n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o?a(e,i,r):a(r))||r);return o&&r&&w(e,i,r),r};let x=class extends u.q{static get validators(){return[...super.validators,(0,c.i)()]}get value(){return this._value??"on"}set value(t){this._value=t}handleSizeChange(){(0,h.b)(this.localName,this.size)}get checked(){return this.valueHasChanged?Boolean(this._checked):this._checked??this.defaultChecked}set checked(t){this._checked=Boolean(t),this.valueHasChanged=!0}handleClick(){this.hasInteracted=!0,this.checked=!this.checked,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}handleKeyDown(t){const e="rtl"===this.localize.dir();"ArrowLeft"===t.key&&(t.preventDefault(),this.checked=e,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))})),"ArrowRight"===t.key&&(t.preventDefault(),this.checked=!e,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}))}willUpdate(t){super.willUpdate(t),(t.has("value")||t.has("checked")||t.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(t){this.input.focus(t)}blur(){this.input.blur()}setValue(t,e){this.checked?this.internals.setFormValue(t??"on",e):this.internals.setFormValue(null,null)}formResetCallback(){this._checked=null,super.formResetCallback(),this.handleValueOrCheckedChange()}render(){const t=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,e=!!this.hint||!!t;return a.qy` <label part="base" class="${(0,n.H)({checked:this.checked,disabled:this.disabled})}"> <input class="input" type="checkbox" title="${this.title}" name="${(0,s.J)(this.name)}" value="${(0,s.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" @click="${this.handleClick}" @keydown="${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,n.H)({"has-slotted":e})}" aria-hidden="${e?"false":"true"}">${this.hint}</slot> `}constructor(){super(...arguments),this.hasSlotController=new d.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}};x.shadowRootOptions={...u.q.shadowRootOptions,delegatesFocus:!0},x.css=[b.A,f.A,v.A],k([(0,r.P)('input[type="checkbox"]')],x.prototype,"input",2),k([(0,r.MZ)()],x.prototype,"title",2),k([(0,r.MZ)({reflect:!0})],x.prototype,"name",2),k([(0,r.MZ)({reflect:!0})],x.prototype,"value",1),k([(0,r.MZ)({reflect:!0})],x.prototype,"size",2),k([(0,p.w)("size")],x.prototype,"handleSizeChange",1),k([(0,r.MZ)({type:Boolean})],x.prototype,"disabled",2),k([(0,r.MZ)({type:Boolean,attribute:!1})],x.prototype,"checked",1),k([(0,r.MZ)({type:Boolean,attribute:"checked",reflect:!0})],x.prototype,"defaultChecked",2),k([(0,r.MZ)({type:Boolean,reflect:!0})],x.prototype,"required",2),k([(0,r.MZ)({attribute:"hint"})],x.prototype,"hint",2),k([(0,r.MZ)({attribute:"with-hint",type:Boolean})],x.prototype,"withHint",2),k([(0,p.w)(["checked","defaultChecked"])],x.prototype,"handleStateChange",1),k([(0,p.w)("disabled",{waitUntilFirstUpdate:!0})],x.prototype,"handleDisabledChange",1),x=k([(0,r.EM)("wa-switch")],x),x.disableWarning?.("change-in-update"),o()}catch(t){o(t)}})},19978(t,e,i){i.d(e,{A:()=>o});var o=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)}@media (forced-colors:active){:checked+.switch .thumb,:checked:enabled+.switch:hover .thumb{background-color:ButtonText}}`},99324(t,e,i){i.a(t,async function(t,e){try{var o=i(5124),a=i(22441),r=i(6412),n=i(63672),s=i(34514),l=i(40991),h=i(92070),d=i(41268),c=i(9395),p=i(62676),u=i(15477),b=i(31896),f=i(32565),m=i(17060),v=i(9054),g=t([m]);m=(g.then?(await g)():g)[0];var w=Object.defineProperty,y=Object.getOwnPropertyDescriptor,k=(t,e,i,o)=>{for(var a,r=o>1?void 0:o?y(e,i):e,n=t.length-1;n>=0;n--)(a=t[n])&&(r=(o?a(e,i,r):a(r))||r);return o&&r&&w(e,i,r),r};let x=class extends p.q{static get validators(){return[...super.validators,(0,d.i)()]}get value(){return this.valueHasChanged?this._value:this._value??this.defaultValue}set value(t){this._value!==t&&(this.valueHasChanged=!0,this._value=t)}handleSizeChange(){(0,l.b)(this.localName,this.size)}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{if(this.setTextareaDimensions(),this.updateResizeObserver(),this.didSSR&&this.input&&this.value!==this.input.value){const t=this.input.value;this.value=t}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.countAnnounceTimeout),this.resizeObserver?.disconnect(),this.resizeObserver=void 0}updateResizeObserver(){const t="none"!==this.resize;this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0),t&&this.input&&("auto"===this.resize?(this.resizeObserver=new ResizeObserver(t=>{const e=t[0]?.contentRect.width??0;e!==this.lastObservedWidth&&(this.lastObservedWidth=e,requestAnimationFrame(()=>this.setTextareaDimensions()))}),this.resizeObserver.observe(this)):(this.resizeObserver=new ResizeObserver(()=>this.setTextareaDimensions()),this.resizeObserver.observe(this.input)))}handleBlur(){this.checkValidity()}handleChange(t){this.valueHasChanged=!0,this.value=this.input.value,this.setTextareaDimensions(),this.checkValidity(),this.relayNativeEvent(t,{bubbles:!0,composed:!0})}handleInput(t){this.valueHasChanged=!0,this.value=this.input.value,this.relayNativeEvent(t,{bubbles:!0,composed:!0}),this.scheduleCountAnnouncement()}scheduleCountAnnouncement(){clearTimeout(this.countAnnounceTimeout),this.countAnnounceTimeout=setTimeout(()=>{const t=(this.value??"").length;this.announcedCountText=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-t):this.localize.term("numCharacters",t)},1e3)}setTextareaDimensions(){if("none"===this.resize)return this.base.style.width="",void(this.base.style.height="");if("auto"===this.resize){this.sizeAdjuster.style.height=`${this.input.clientHeight}px`,this.input.style.height="auto";const t=this.input.scrollHeight;return this.input.style.height=`${t}px`,this.sizeAdjuster.style.height=`${t}px`,this.base.style.width="",void(this.base.style.height="")}if(this.input.style.width){const t=Number(this.input.style.width.split(/px/)[0])+2;this.base.style.width=`${t}px`}if(this.input.style.height){const t=Number(this.input.style.height.split(/px/)[0])+2;this.base.style.height=`${t}px`}}handleRowsChange(){this.setTextareaDimensions()}async handleValueChange(){await this.updateComplete,this.checkValidity(),this.setTextareaDimensions()}updated(t){t.has("resize")&&(this.setTextareaDimensions(),this.updateResizeObserver()),super.updated(t),t.has("value")&&this.customStates.set("blank",!this.value)}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.input.scrollTop=t.top),void("number"==typeof t.left&&(this.input.scrollLeft=t.left))):{top:this.input.scrollTop,left:this.input.scrollTop}}setSelectionRange(t,e,i="none"){this.input.setSelectionRange(t,e,i)}setRangeText(t,e,i,o="preserve"){const a=e??this.input.selectionStart,r=i??this.input.selectionEnd;this.input.setRangeText(t,a,r,o),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaDimensions())}formResetCallback(){this._value=null,this.input&&(this.input.value=this.value||""),super.formResetCallback()}render(){const t=this.hasUpdated?this.hasSlotController.test("label"):this.withLabel,e=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,i=!!this.label||!!t,a=!!this.hint||!!e,l=(this.value??"").length,h=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-l):this.localize.term("numCharacters",l);return o.qy` <label part="form-control-label label" class="${(0,r.H)({label:!0,"has-label":i})}" for="input" aria-hidden="${i?"false":"true"}"> <slot name="label">${this.label}</slot> </label> <div part="base" class="textarea"> <textarea part="textarea" id="input" class="control" title="${this.title}" name="${(0,n.J)(this.name)}" .value="${(0,s.V)(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${(0,n.J)(this.placeholder)}" rows="${(0,n.J)(this.rows)}" minlength="${(0,n.J)(this.minlength)}" maxlength="${(0,n.J)(this.maxlength)}" autocapitalize="${(0,n.J)(this.autocapitalize)}" autocorrect="${(0,n.J)(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${(0,n.J)(this.spellcheck)}" enterkeyhint="${(0,n.J)(this.enterkeyhint)}" inputmode="${(0,n.J)(this.inputmode)}" aria-describedby="hint" @change="${this.handleChange}" @input="${this.handleInput}" @blur="${this.handleBlur}"></textarea> <div part="textarea-adjuster" class="size-adjuster" ?hidden="${"auto"!==this.resize}"></div> </div> <div class="${(0,r.H)({footer:!0,"has-count":this.withCount})}"> <slot id="hint" name="hint" part="hint" aria-hidden="${a?"false":"true"}" class="${(0,r.H)({"has-slotted":a})}">${this.hint}</slot> ${this.withCount?o.qy` <div part="count" class="count" aria-hidden="true">${h}</div> <div class="wa-visually-hidden-force" aria-live="polite">${this.announcedCountText}</div> `:""} </div> `}constructor(){super(...arguments),this.assumeInteractionOn=["blur","input"],this.hasSlotController=new h.X(this,"hint","label"),this.localize=new m.c(this),this.announcedCountText="",this.title="",this.name=null,this._value=null,this.defaultValue=this.getAttribute("value")??"",this.size="m",this.appearance="outlined",this.label="",this.hint="",this.placeholder="",this.rows=4,this.resize="vertical",this.disabled=!1,this.readonly=!1,this.required=!1,this.spellcheck=!0,this.withLabel=!1,this.withHint=!1,this.withCount=!1,this.lastObservedWidth=0}};x.css=[v.A,u.A,b.A,f.A],k([(0,a.wk)()],x.prototype,"announcedCountText",2),k([(0,a.P)(".control")],x.prototype,"input",2),k([(0,a.P)('[part~="base"]')],x.prototype,"base",2),k([(0,a.P)(".size-adjuster")],x.prototype,"sizeAdjuster",2),k([(0,a.MZ)()],x.prototype,"title",2),k([(0,a.MZ)({reflect:!0})],x.prototype,"name",2),k([(0,a.wk)()],x.prototype,"value",1),k([(0,a.MZ)({attribute:"value",reflect:!0})],x.prototype,"defaultValue",2),k([(0,a.MZ)({reflect:!0})],x.prototype,"size",2),k([(0,c.w)("size")],x.prototype,"handleSizeChange",1),k([(0,a.MZ)({reflect:!0})],x.prototype,"appearance",2),k([(0,a.MZ)()],x.prototype,"label",2),k([(0,a.MZ)({attribute:"hint"})],x.prototype,"hint",2),k([(0,a.MZ)()],x.prototype,"placeholder",2),k([(0,a.MZ)({type:Number})],x.prototype,"rows",2),k([(0,a.MZ)({reflect:!0})],x.prototype,"resize",2),k([(0,a.MZ)({type:Boolean})],x.prototype,"disabled",2),k([(0,a.MZ)({type:Boolean,reflect:!0})],x.prototype,"readonly",2),k([(0,a.MZ)({type:Boolean,reflect:!0})],x.prototype,"required",2),k([(0,a.MZ)({type:Number})],x.prototype,"minlength",2),k([(0,a.MZ)({type:Number})],x.prototype,"maxlength",2),k([(0,a.MZ)()],x.prototype,"autocapitalize",2),k([(0,a.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"off"===t),toAttribute:t=>t?"on":"off"}})],x.prototype,"autocorrect",2),k([(0,a.MZ)()],x.prototype,"autocomplete",2),k([(0,a.MZ)({type:Boolean})],x.prototype,"autofocus",2),k([(0,a.MZ)()],x.prototype,"enterkeyhint",2),k([(0,a.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],x.prototype,"spellcheck",2),k([(0,a.MZ)()],x.prototype,"inputmode",2),k([(0,a.MZ)({attribute:"with-label",type:Boolean})],x.prototype,"withLabel",2),k([(0,a.MZ)({attribute:"with-hint",type:Boolean})],x.prototype,"withHint",2),k([(0,a.MZ)({attribute:"with-count",type:Boolean,reflect:!0})],x.prototype,"withCount",2),k([(0,c.w)("rows",{waitUntilFirstUpdate:!0})],x.prototype,"handleRowsChange",1),k([(0,c.w)("value",{waitUntilFirstUpdate:!0})],x.prototype,"handleValueChange",1),x=k([(0,a.EM)("wa-textarea")],x),x.disableWarning?.("change-in-update"),e()}catch(t){e(t)}})},9054(t,e,i){i.d(e,{A:()=>o});var o=i(5124).AH`:host{border-width:0}.textarea{display:grid;align-items:center;margin:0;border:none;outline:0;cursor:inherit;font:inherit;background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color);border-radius:var(--wa-form-control-border-radius);border-style:var(--wa-form-control-border-style);border-width:var(--wa-form-control-border-width);-webkit-appearance:none;outline:var(--wa-focus-ring-style) var(--wa-focus-ring-width) transparent;outline-offset:var(--wa-focus-ring-offset)}.textarea:focus-within{outline-color:var(--wa-color-focus)}:host([appearance=outlined]) .textarea{background-color:var(--wa-form-control-background-color);border-color:var(--wa-form-control-border-color)}:host([appearance=filled]) .textarea{background-color:var(--wa-color-neutral-fill-quiet);border-color:var(--wa-color-neutral-fill-quiet)}:host([appearance=filled-outlined]) .textarea{background-color:var(--wa-color-neutral-fill-quiet);border-color:var(--wa-form-control-border-color)}textarea{display:block;width:100%;border:none;background:0 0;font:inherit;color:inherit;padding:calc(var(--wa-form-control-padding-block) - ((1lh - 1em)/ 2)) var(--wa-form-control-padding-inline);min-height:calc(var(--wa-form-control-height) - var(--border-width) * 2);box-shadow:none;margin:0}textarea::placeholder{color:var(--wa-form-control-placeholder-color);user-select:none;-webkit-user-select:none}textarea:autofill,textarea:autofill:active,textarea:autofill:focus,textarea:autofill:hover{box-shadow:none;caret-color:var(--wa-form-control-value-color)}textarea:focus{outline:0}.control,.size-adjuster{grid-area:1/1/2/2}.size-adjuster{visibility:hidden;pointer-events:none;opacity:0;padding:0}textarea::-webkit-search-cancel-button,textarea::-webkit-search-decoration,textarea::-webkit-search-results-button,textarea::-webkit-search-results-decoration{-webkit-appearance:none}:host([resize=none]) textarea{resize:none}:host([resize=vertical]) textarea,textarea{resize:vertical}:host([resize=horizontal]) textarea{resize:horizontal}:host([resize=both]) textarea{resize:both}:host([resize=auto]) textarea{height:auto;resize:none;overflow-y:hidden}.footer{display:flex;align-items:baseline;gap:1em}.footer.has-count [part=hint]{flex:1 1 auto;min-width:0}.count{flex:0 0 auto;color:var(--wa-form-control-hint-color);font-weight:var(--wa-form-control-hint-font-weight);line-height:var(--wa-form-control-hint-line-height);margin-block-start:0.5em;font-size:var(--wa-font-size-smaller);margin-inline-start:auto}`},32565(t,e,i){i.d(e,{A:()=>o});var o=i(5124).AH`.wa-visually-hidden-force,.wa-visually-hidden-hint::part(hint),.wa-visually-hidden-label::part(form-control-label),.wa-visually-hidden-label::part(label),.wa-visually-hidden:not(:focus-within){position:absolute!important;width:1px!important;height:1px!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;border:none!important;overflow:hidden!important;white-space:nowrap!important;padding:0!important}`},99731(t,e,i){i.d(e,{Y:()=>h});var o=i(62826),a=i(22441),r=(i(18111),i(22489),i(20116),i(5124)),n=i(99591);class s extends r.WF{get chips(){return this.childElements.filter(t=>t instanceof n.v)}render(){return r.qy`<slot @slotchange="${this.updateTabIndices}"></slot>`}handleKeyDown(t){const e="ArrowLeft"===t.key,i="ArrowRight"===t.key,o="Home"===t.key,a="End"===t.key;if(!(e||i||o||a))return;const{chips:r}=this;if(r.length<2)return;if(t.preventDefault(),o||a){return r[o?0:r.length-1].focus({trailing:a}),void this.updateTabIndices()}const n="rtl"===getComputedStyle(this).direction?e:i,s=r.find(t=>t.matches(":focus-within"));if(!s){return(n?r[0]:r[r.length-1]).focus({trailing:!n}),void this.updateTabIndices()}const l=r.indexOf(s);let h=n?l+1:l-1;for(;h!==l;){h>=r.length?h=0:h<0&&(h=r.length-1);const t=r[h];if(!t.disabled||t.alwaysFocusable){t.focus({trailing:!n}),this.updateTabIndices();break}n?h++:h--}}updateTabIndices(){const{chips:t}=this;let e;for(const i of t){const t=i.alwaysFocusable||!i.disabled;i.matches(":focus-within")&&t?e=i:(t&&!e&&(e=i),i.tabIndex=-1)}e&&(e.tabIndex=0)}constructor(){super(),this.internals=this.attachInternals(),r.S$||(this.addEventListener("focusin",this.updateTabIndices.bind(this)),this.addEventListener("update-focus",this.updateTabIndices.bind(this)),this.addEventListener("keydown",this.handleKeyDown.bind(this)),this.internals.role="toolbar")}}(0,o.Cg)([(0,a.KN)()],s.prototype,"childElements",void 0);const l=r.AH`:host{display:flex;flex-wrap:wrap;gap:8px}`;let h=class extends s{};h.styles=[l],h=(0,o.Cg)([(0,a.EM)("md-chip-set")],h)},57279(t,e,i){i.d(e,{L:()=>r});var o=i(77972),a=i(9160);function r(t,e,i){return(0,o.A)(t,e*a.s0,i)}},77972(t,e,i){i.d(e,{A:()=>r});var o=i(73420),a=i(83504);function r(t,e,i){return(0,o.w)(i?.in||t,+(0,a.a)(t)+e)}},95785(t,e,i){i.d(e,{z:()=>a});var o=i(83504);function a(t,e){const i=+(0,o.a)(t)-+(0,o.a)(e);return i<0?-1:i>0?1:i}},29224(t,e,i){i.d(e,{U:()=>a});var o=i(74816);function a(t,e,i){const[a,r]=(0,o.x)(i?.in,t,e);return 12*(a.getFullYear()-r.getFullYear())+(a.getMonth()-r.getMonth())}},83339(t,e,i){i.d(e,{b:()=>a});var o=i(83504);function a(t,e){return+(0,o.a)(t)-+(0,o.a)(e)}},87950(t,e,i){i.d(e,{W:()=>s});var o=i(74816),a=i(95785),r=i(29224),n=i(31810);function s(t,e,i){const[s,l,h]=(0,o.x)(i?.in,t,t,e),d=(0,a.z)(l,h),c=Math.abs((0,r.U)(l,h));if(c<1)return 0;1===l.getMonth()&&l.getDate()>27&&l.setDate(30),l.setMonth(l.getMonth()-d*c);let p=(0,a.z)(l,h)===-d;(0,n.c)(s)&&1===c&&1===(0,a.z)(s,h)&&(p=!1);const u=d*(c-+p);return 0===u?0:u}},78016(t,e,i){i.d(e,{e:()=>a});var o=i(83504);function a(t,e){return 1===(0,o.a)(t,e?.in).getDate()}},71566(t,e,i){i.d(e,{Q:()=>a});var o=i(83504);function a(t,e){const i=(0,o.a)(t,e?.in);return i.setMinutes(0,0,0),i}}};