UNPKG

iobroker.lovelace

Version:

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

5 lines 36.9 kB
/*! For license information please see 67897.0002a6387a2f3407.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[67897],{51324:function(t,e,i){i.d(e,{ZS:function(){return h},is:function(){return s.i}});i(62953);var o,a,r=i(40445),n=i(67576),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:function(t,e,i){i.d(e,{M:function(){return m}});i(3362),i(62953);var o=i(40445),a=i(7658),r={ROOT:"mdc-form-field"},n={LABEL_SELECTOR:".mdc-form-field > label"},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),l=i(12451),h=i(51324),c=i(56161),d=i(5124),p=i(67576),u=i(6412);let f,b=t=>t;class m 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(0,d.qy)(f||(f=b` <div class="mdc-form-field ${0}"> <slot></slot> <label class="mdc-label" @click="${0}">${0}</label> </div>`),(0,u.H)(t),this._labelClick,this.label)}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})],m.prototype,"alignEnd",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean})],m.prototype,"spaceBetween",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean})],m.prototype,"nowrap",void 0),(0,o.Cg)([(0,p.MZ)({type:String}),(0,c.P)(async function(t){var e;null===(e=this.input)||void 0===e||e.setAttribute("aria-label",t)})],m.prototype,"label",void 0),(0,o.Cg)([(0,p.P)(".mdc-form-field")],m.prototype,"mdcRoot",void 0),(0,o.Cg)([(0,p.KN)({slot:"",flatten:!0,selector:"*"})],m.prototype,"slottedInputs",void 0),(0,o.Cg)([(0,p.P)("label")],m.prototype,"labelEl",void 0)},38627:function(t,e,i){i.d(e,{R:function(){return a}});let o;const a=(0,i(5124).AH)(o||(o=(t=>t)`.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:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var o=i(5124),a=i(67576),r=i(6412),n=i(63672),s=i(17051),l=i(42462),h=i(28438),c=i(98779),d=i(27259),p=i(25877),u=i(984),f=i(95010),b=i(9395),m=i(717),v=i(40158),g=i(10416),w=t([v]);v=(w.then?(await w)():w)[0];let C,z=t=>t;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 $=new Set;let M=class extends m.A{connectedCallback(){super.connectedCallback(),this.id||(this.id=(0,f.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 c.k;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);$.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,$.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,d.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),$.delete(this),(0,p.Fw)(this),await(0,d.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(0,o.qy)(C||(C=z` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="dialog" @cancel="${0}"> <wa-popup part="popup" exportparts=" popup:popup__popup, arrow:popup__arrow " class="${0}" placement="${0}" distance="${0}" skidding="${0}" flip shift ?arrow="${0}" .anchor="${0}" .autoSize="${0}" .autoSizePadding="${0}"> <div part="body" class="body" @click="${0}"> <slot></slot> </div> </wa-popup> </dialog> `),(0,n.J)(this.ariaLabelledby),(0,n.J)(this.ariaDescribedby),this.handleDialogCancel,(0,r.H)({popover:!0,"popover-open":this.open}),this.placement,this.distance,this.skidding,!this.withoutArrow,this.anchor,this.autoSize,this.autoSizePadding,this.handleBodyClick)}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)}}};M.css=g.A,M.dependencies={"wa-popup":v.A},x([(0,a.P)("dialog")],M.prototype,"dialog",2),x([(0,a.P)(".body")],M.prototype,"body",2),x([(0,a.P)("wa-popup")],M.prototype,"popup",2),x([(0,a.wk)()],M.prototype,"anchor",2),x([(0,a.MZ)()],M.prototype,"placement",2),x([(0,a.MZ)({type:Boolean,reflect:!0})],M.prototype,"open",2),x([(0,a.MZ)({type:Number})],M.prototype,"distance",2),x([(0,a.MZ)({type:Number})],M.prototype,"skidding",2),x([(0,a.MZ)()],M.prototype,"for",2),x([(0,a.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],M.prototype,"withoutArrow",2),x([(0,a.MZ)({attribute:"auto-size"})],M.prototype,"autoSize",2),x([(0,a.MZ)({attribute:"auto-size-padding",type:Number})],M.prototype,"autoSizePadding",2),x([(0,a.MZ)({attribute:"trap-focus",type:Boolean})],M.prototype,"trapFocus",2),x([(0,a.MZ)({attribute:"aria-labelledby"})],M.prototype,"ariaLabelledby",2),x([(0,a.MZ)({attribute:"aria-describedby"})],M.prototype,"ariaDescribedby",2),x([(0,b.w)("open",{waitUntilFirstUpdate:!0})],M.prototype,"handleOpenChange",1),x([(0,b.w)("for")],M.prototype,"handleForChange",1),x([(0,b.w)(["distance","placement","skidding"])],M.prototype,"handleOptionsChange",1),M=x([(0,a.EM)("wa-popover")],M),e()}catch(C){e(C)}})},10416:function(t,e,i){i.d(e,{A:function(){return a}});let o;var a=(0,i(5124).AH)(o||(o=(t=>t)`: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:function(t,e,i){i.a(t,async function(t,o){try{i.d(e,{A:function(){return M}});i(27495),i(62953);var a=i(5124),r=i(67576),n=i(6412),s=i(63672),l=i(34514),h=i(40991),c=i(92070),d=i(41268),p=i(9395),u=i(62676),f=i(15477),b=i(31896),m=i(17060),v=i(19978),g=t([m]);m=(g.then?(await g)():g)[0];let x,C,z,$=t=>t;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 M=class extends u.q{static get validators(){return[...super.validators,(0,d.i)()]}get value(){var t;return null!==(t=this._value)&&void 0!==t?t:"on"}set value(t){this._value=t}handleSizeChange(){(0,h.b)(this.localName,this.size)}get checked(){var t;return this.valueHasChanged?Boolean(this._checked):null!==(t=this._checked)&&void 0!==t?t: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(null!=t?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(0,a.qy)(x||(x=$` <label part="base" class="${0}"> <input class="input" type="checkbox" title="${0}" name="${0}" value="${0}" .checked="${0}" .disabled="${0}" .required="${0}" role="switch" aria-checked="${0}" aria-describedby="hint" @click="${0}" @keydown="${0}"> <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}" aria-hidden="${0}">${0}</slot> `),(0,n.H)({checked:this.checked,disabled:this.disabled}),this.title,(0,s.J)(this.name),(0,s.J)(this.value),(0,l.V)(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleKeyDown,(0,n.H)({"has-slotted":e}),e?"false":"true",this.hint)}constructor(){var t;super(...arguments),this.hasSlotController=new c.X(this,"hint"),this.localize=new m.c(this),this.title="",this.name=null,this._value=null!==(t=this.getAttribute("value"))&&void 0!==t?t:null,this.size="m",this.disabled=!1,this._checked=null,this.defaultChecked=this.hasAttribute("checked"),this.required=!1,this.hint="",this.withHint=!1}};M.shadowRootOptions=Object.assign(Object.assign({},u.q.shadowRootOptions),{},{delegatesFocus:!0}),M.css=[f.A,b.A,v.A],k([(0,r.P)('input[type="checkbox"]')],M.prototype,"input",2),k([(0,r.MZ)()],M.prototype,"title",2),k([(0,r.MZ)({reflect:!0})],M.prototype,"name",2),k([(0,r.MZ)({reflect:!0})],M.prototype,"value",1),k([(0,r.MZ)({reflect:!0})],M.prototype,"size",2),k([(0,p.w)("size")],M.prototype,"handleSizeChange",1),k([(0,r.MZ)({type:Boolean})],M.prototype,"disabled",2),k([(0,r.MZ)({type:Boolean,attribute:!1})],M.prototype,"checked",1),k([(0,r.MZ)({type:Boolean,attribute:"checked",reflect:!0})],M.prototype,"defaultChecked",2),k([(0,r.MZ)({type:Boolean,reflect:!0})],M.prototype,"required",2),k([(0,r.MZ)({attribute:"hint"})],M.prototype,"hint",2),k([(0,r.MZ)({attribute:"with-hint",type:Boolean})],M.prototype,"withHint",2),k([(0,p.w)(["checked","defaultChecked"])],M.prototype,"handleStateChange",1),k([(0,p.w)("disabled",{waitUntilFirstUpdate:!0})],M.prototype,"handleDisabledChange",1),M=k([(0,r.EM)("wa-switch")],M),null===(C=(z=M).disableWarning)||void 0===C||C.call(z,"change-in-update"),o()}catch(x){o(x)}})},19978:function(t,e,i){i.d(e,{A:function(){return a}});let o;var a=(0,i(5124).AH)(o||(o=(t=>t)`: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:function(t,e,i){i.a(t,async function(t,e){try{var o=i(69235),a=(i(3362),i(27495),i(62953),i(5124)),r=i(67576),n=i(6412),s=i(63672),l=i(34514),h=i(40991),c=i(92070),d=i(41268),p=i(9395),u=i(62676),f=i(15477),b=i(31896),m=i(32565),v=i(17060),g=i(9054),w=t([o,v]);[o,v]=w.then?(await w)():w;let C,z,$,M,A=t=>t;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};let E=class extends u.q{static get validators(){return[...super.validators,(0,d.i)()]}get value(){var t;return this.valueHasChanged?this._value:null!==(t=this._value)&&void 0!==t?t:this.defaultValue}set value(t){this._value!==t&&(this.valueHasChanged=!0,this._value=t)}handleSizeChange(){(0,h.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(){var t;super.disconnectedCallback(),clearTimeout(this.countAnnounceTimeout),null===(t=this.resizeObserver)||void 0===t||t.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=>{var e,i;const o=null!==(e=null===(i=t[0])||void 0===i?void 0:i.contentRect.width)&&void 0!==e?e:0;o!==this.lastObservedWidth&&(this.lastObservedWidth=o,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(()=>{var t;const e=(null!==(t=this.value)&&void 0!==t?t:"").length;this.announcedCountText=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-e):this.localize.term("numCharacters",e)},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=null!=e?e:this.input.selectionStart,r=null!=i?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(){var t;const e=this.hasUpdated?this.hasSlotController.test("label"):this.withLabel,i=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,o=!!this.label||!!e,r=!!this.hint||!!i,h=(null!==(t=this.value)&&void 0!==t?t:"").length,c=null!=this.maxlength?this.localize.term("numCharactersRemaining",this.maxlength-h):this.localize.term("numCharacters",h);return(0,a.qy)(C||(C=A` <label part="form-control-label label" class="${0}" for="input" aria-hidden="${0}"> <slot name="label">${0}</slot> </label> <div part="base" class="textarea"> <textarea part="textarea" id="input" class="control" title="${0}" name="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" ?required="${0}" placeholder="${0}" rows="${0}" minlength="${0}" maxlength="${0}" autocapitalize="${0}" autocorrect="${0}" ?autofocus="${0}" spellcheck="${0}" enterkeyhint="${0}" inputmode="${0}" aria-describedby="hint" @change="${0}" @input="${0}" @blur="${0}"></textarea> <div part="textarea-adjuster" class="size-adjuster" ?hidden="${0}"></div> </div> <div class="${0}"> <slot id="hint" name="hint" part="hint" aria-hidden="${0}" class="${0}">${0}</slot> ${0} </div> `),(0,n.H)({label:!0,"has-label":o}),o?"false":"true",this.label,this.title,(0,s.J)(this.name),(0,l.V)(this.value),this.disabled,this.readonly,this.required,(0,s.J)(this.placeholder),(0,s.J)(this.rows),(0,s.J)(this.minlength),(0,s.J)(this.maxlength),(0,s.J)(this.autocapitalize),(0,s.J)(this.autocorrect),this.autofocus,(0,s.J)(this.spellcheck),(0,s.J)(this.enterkeyhint),(0,s.J)(this.inputmode),this.handleChange,this.handleInput,this.handleBlur,"auto"!==this.resize,(0,n.H)({footer:!0,"has-count":this.withCount}),r?"false":"true",(0,n.H)({"has-slotted":r}),this.hint,this.withCount?(0,a.qy)(z||(z=A` <div part="count" class="count" aria-hidden="true">${0}</div> <div class="wa-visually-hidden-force" aria-live="polite">${0}</div> `),c,this.announcedCountText):"")}constructor(){var t;super(...arguments),this.assumeInteractionOn=["blur","input"],this.hasSlotController=new c.X(this,"hint","label"),this.localize=new v.c(this),this.announcedCountText="",this.title="",this.name=null,this._value=null,this.defaultValue=null!==(t=this.getAttribute("value"))&&void 0!==t?t:"",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}};E.css=[g.A,f.A,b.A,m.A],x([(0,r.wk)()],E.prototype,"announcedCountText",2),x([(0,r.P)(".control")],E.prototype,"input",2),x([(0,r.P)('[part~="base"]')],E.prototype,"base",2),x([(0,r.P)(".size-adjuster")],E.prototype,"sizeAdjuster",2),x([(0,r.MZ)()],E.prototype,"title",2),x([(0,r.MZ)({reflect:!0})],E.prototype,"name",2),x([(0,r.wk)()],E.prototype,"value",1),x([(0,r.MZ)({attribute:"value",reflect:!0})],E.prototype,"defaultValue",2),x([(0,r.MZ)({reflect:!0})],E.prototype,"size",2),x([(0,p.w)("size")],E.prototype,"handleSizeChange",1),x([(0,r.MZ)({reflect:!0})],E.prototype,"appearance",2),x([(0,r.MZ)()],E.prototype,"label",2),x([(0,r.MZ)({attribute:"hint"})],E.prototype,"hint",2),x([(0,r.MZ)()],E.prototype,"placeholder",2),x([(0,r.MZ)({type:Number})],E.prototype,"rows",2),x([(0,r.MZ)({reflect:!0})],E.prototype,"resize",2),x([(0,r.MZ)({type:Boolean})],E.prototype,"disabled",2),x([(0,r.MZ)({type:Boolean,reflect:!0})],E.prototype,"readonly",2),x([(0,r.MZ)({type:Boolean,reflect:!0})],E.prototype,"required",2),x([(0,r.MZ)({type:Number})],E.prototype,"minlength",2),x([(0,r.MZ)({type:Number})],E.prototype,"maxlength",2),x([(0,r.MZ)()],E.prototype,"autocapitalize",2),x([(0,r.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"off"===t),toAttribute:t=>t?"on":"off"}})],E.prototype,"autocorrect",2),x([(0,r.MZ)()],E.prototype,"autocomplete",2),x([(0,r.MZ)({type:Boolean})],E.prototype,"autofocus",2),x([(0,r.MZ)()],E.prototype,"enterkeyhint",2),x([(0,r.MZ)({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],E.prototype,"spellcheck",2),x([(0,r.MZ)()],E.prototype,"inputmode",2),x([(0,r.MZ)({attribute:"with-label",type:Boolean})],E.prototype,"withLabel",2),x([(0,r.MZ)({attribute:"with-hint",type:Boolean})],E.prototype,"withHint",2),x([(0,r.MZ)({attribute:"with-count",type:Boolean,reflect:!0})],E.prototype,"withCount",2),x([(0,p.w)("rows",{waitUntilFirstUpdate:!0})],E.prototype,"handleRowsChange",1),x([(0,p.w)("value",{waitUntilFirstUpdate:!0})],E.prototype,"handleValueChange",1),E=x([(0,r.EM)("wa-textarea")],E),null===($=(M=E).disableWarning)||void 0===$||$.call(M,"change-in-update"),e()}catch(C){e(C)}})},9054:function(t,e,i){i.d(e,{A:function(){return a}});let o;var a=(0,i(5124).AH)(o||(o=(t=>t)`: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:function(t,e,i){i.d(e,{A:function(){return a}});let o;var a=(0,i(5124).AH)(o||(o=(t=>t)`.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:function(t,e,i){i.d(e,{Y:function(){return p}});var o=i(40445),a=i(67576),r=(i(93775),i(18111),i(22489),i(20116),i(62953),i(5124)),n=i(99591);let s,l=t=>t;class h extends r.WF{get chips(){return this.childElements.filter(t=>t instanceof n.v)}render(){return(0,r.qy)(s||(s=l`<slot @slotchange="${0}"></slot>`),this.updateTabIndices)}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)()],h.prototype,"childElements",void 0);let c;const d=(0,r.AH)(c||(c=(t=>t)`:host{display:flex;flex-wrap:wrap;gap:8px}`));let p=class extends h{};p.styles=[d],p=(0,o.Cg)([(0,a.EM)("md-chip-set")],p)},57279:function(t,e,i){i.d(e,{L:function(){return r}});var o=i(77972),a=i(9160);function r(t,e,i){return(0,o.A)(t,e*a.s0,i)}},77972:function(t,e,i){i.d(e,{A:function(){return r}});var o=i(73420),a=i(83504);function r(t,e,i){return(0,o.w)((null==i?void 0:i.in)||t,+(0,a.a)(t)+e)}},95785:function(t,e,i){i.d(e,{z:function(){return 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:function(t,e,i){i.d(e,{U:function(){return a}});i(62953);var o=i(74816);function a(t,e,i){const[a,r]=(0,o.x)(null==i?void 0:i.in,t,e);return 12*(a.getFullYear()-r.getFullYear())+(a.getMonth()-r.getMonth())}},83339:function(t,e,i){i.d(e,{b:function(){return a}});var o=i(83504);function a(t,e){return+(0,o.a)(t)-+(0,o.a)(e)}},87950:function(t,e,i){i.d(e,{W:function(){return s}});i(62953);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)(null==i?void 0:i.in,t,t,e),c=(0,a.z)(l,h),d=Math.abs((0,r.U)(l,h));if(d<1)return 0;1===l.getMonth()&&l.getDate()>27&&l.setDate(30),l.setMonth(l.getMonth()-c*d);let p=(0,a.z)(l,h)===-c;(0,n.c)(s)&&1===d&&1===(0,a.z)(s,h)&&(p=!1);const u=c*(d-+p);return 0===u?0:u}},78016:function(t,e,i){i.d(e,{e:function(){return a}});var o=i(83504);function a(t,e){return 1===(0,o.a)(t,null==e?void 0:e.in).getDate()}},71566:function(t,e,i){i.d(e,{Q:function(){return a}});var o=i(83504);function a(t,e){const i=(0,o.a)(t,null==e?void 0:e.in);return i.setMinutes(0,0,0),i}}}]);