UNPKG

iobroker.lovelace

Version:

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

5 lines 35.7 kB
/*! For license information please see 97187.419516ad2af7c6eb.js.LICENSE.txt */ "use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[97187],{1126:function(t,e,o){o.a(t,async function(t,e){try{o(3362),o(27495),o(62953);var n=o(5124),i=o(67576),r=o(6412),s=o(63672),a=o(17051),l=o(42462),d=o(28438),h=o(98779),c=o(27259),u=o(25877),p=o(31247),f=o(4444),w=o(92070),m=o(9395),v=o(717),b=o(17060),g=o(88496),y=o(57024),C=t([g,b]);[g,b]=C.then?(await C)():C;let x,$,D,S=t=>t;var k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,E=(t,e,o,n)=>{for(var i,r=n>1?void 0:n?A(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=(n?i(e,o,r):i(r))||r);return n&&r&&k(e,o,r),r};let P=class extends v.A{firstUpdated(){n.S$||this.open&&(this.addOpenListeners(),this.drawer.showModal(),(0,f.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,f.I7)(this),this.removeOpenListeners()}async requestClose(t){const e=new d.L({source:t});if(this.dispatchEvent(e),e.defaultPrevented)return this.open=!0,void(0,c.Ud)(this.drawer,"pulse");this.removeOpenListeners(),await(0,c.Ud)(this.drawer,"hide"),this.open=!1,this.drawer.close(),(0,f.I7)(this);const o=this.originalTrigger;"function"==typeof(null==o?void 0:o.focus)&&setTimeout(()=>o.focus()),this.dispatchEvent(new a.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,u.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,u.Fw)(this)}handleDialogCancel(t){t.preventDefault(),!this.drawer.classList.contains("hide")&&t.target===this.drawer&&(0,u.a0)(this)&&this.requestClose(this.drawer)}handleDialogClick(t){const e=t.target.closest('[data-drawer="close"]');e&&(t.stopPropagation(),this.requestClose(e))}async handleDialogPointerDown(t){t.target===this.drawer&&(this.lightDismiss?this.requestClose(this.drawer):await(0,c.Ud)(this.drawer,"pulse"))}handleOpenChange(){this.open&&!this.drawer.open?this.show():this.drawer.open&&(this.open=!0,this.requestClose(this.drawer))}async show(){const t=new h.k;this.dispatchEvent(t),t.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.drawer.showModal(),(0,f.JG)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.drawer.focus()}),await(0,c.Ud)(this.drawer,"show"),this.dispatchEvent(new l.q))}render(){var t;const e=!this.withoutHeader,o=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return(0,n.qy)(x||(x=S` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="${0}" @cancel="${0}" @click="${0}" @pointerdown="${0}"> ${0} <div part="body" class="body"><slot></slot></div> ${0} </dialog> `),null!==(t=this.ariaLabelledby)&&void 0!==t?t:"title",(0,s.J)(this.ariaDescribedby),(0,r.H)({drawer:!0,open:this.open,top:"top"===this.placement,end:"end"===this.placement,bottom:"bottom"===this.placement,start:"start"===this.placement}),this.handleDialogCancel,this.handleDialogClick,this.handleDialogPointerDown,e?(0,n.qy)($||($=S` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${0} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${0}"> <wa-icon name="xmark" label="${0}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `),this.label.length>0?this.label:String.fromCharCode(8203),t=>this.requestClose(t.target),this.localize.term("close")):"",o?(0,n.qy)(D||(D=S` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `)):"")}constructor(){super(...arguments),this.localize=new b.c(this),this.hasSlotController=new w.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.placement="end",this.withoutHeader=!1,this.lightDismiss=!0,this.withFooter=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.open&&(0,u.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.requestClose(this.drawer))}}};P.css=y.A,E([(0,i.P)(".drawer")],P.prototype,"drawer",2),E([(0,i.MZ)({type:Boolean,reflect:!0})],P.prototype,"open",2),E([(0,i.MZ)({reflect:!0})],P.prototype,"label",2),E([(0,i.MZ)({reflect:!0})],P.prototype,"placement",2),E([(0,i.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],P.prototype,"withoutHeader",2),E([(0,i.MZ)({attribute:"light-dismiss",type:Boolean})],P.prototype,"lightDismiss",2),E([(0,i.MZ)({attribute:"aria-labelledby"})],P.prototype,"ariaLabelledby",2),E([(0,i.MZ)({attribute:"aria-describedby"})],P.prototype,"ariaDescribedby",2),E([(0,i.MZ)({attribute:"with-footer",type:Boolean})],P.prototype,"withFooter",2),E([(0,m.w)("open",{waitUntilFirstUpdate:!0})],P.prototype,"handleOpenChange",1),P=E([(0,i.EM)("wa-drawer")],P),n.S$||(document.addEventListener("click",t=>{const e=t.target.closest("[data-drawer]");if(e instanceof Element){const[t,o]=(0,p.v)(e.getAttribute("data-drawer")||"");if("open"===t&&null!=o&&o.length){const t=e.getRootNode().getElementById(o);"wa-drawer"===(null==t?void 0:t.localName)?t.open=!0:console.warn(`A drawer with an ID of "${o}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),e()}catch(x){e(x)}})},57024:function(t,e,o){o.d(e,{A:function(){return i}});let n;var i=(0,o(5124).AH)(n||(n=(t=>t)`:host{--size:25rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:200ms;--hide-duration:200ms;display:none}:host([open]){display:block}.drawer{display:flex;flex-direction:column;top:0;inset-inline-start:0;width:100%;height:100%;max-width:100%;max-height:100%;overflow:hidden;color:inherit;background-color:var(--wa-color-surface-raised);border:none;box-shadow:var(--wa-shadow-l);overflow:auto;padding:0;margin:0;animation-duration:var(--show-duration);animation-timing-function:ease}.drawer.show::backdrop{animation:show-backdrop var(--show-duration,200ms) ease}.drawer.hide::backdrop{animation:show-backdrop var(--hide-duration,200ms) ease reverse}.drawer.show.top{animation:show-drawer-from-top var(--show-duration) ease}.drawer.hide.top{animation:show-drawer-from-top var(--hide-duration) ease reverse}.drawer.show.end{animation:show-drawer-from-end var(--show-duration) ease}.drawer.show.end:dir(rtl){animation-name:show-drawer-from-start}.drawer.hide.end{animation:show-drawer-from-end var(--hide-duration) ease reverse}.drawer.hide.end:dir(rtl){animation-name:show-drawer-from-start}.drawer.show.bottom{animation:show-drawer-from-bottom var(--show-duration) ease}.drawer.hide.bottom{animation:show-drawer-from-bottom var(--hide-duration) ease reverse}.drawer.show.start{animation:show-drawer-from-start var(--show-duration) ease}.drawer.show.start:dir(rtl){animation-name:show-drawer-from-end}.drawer.hide.start{animation:show-drawer-from-start var(--hide-duration) ease reverse}.drawer.hide.start:dir(rtl){animation-name:show-drawer-from-end}.drawer.pulse{animation:pulse 250ms ease}.drawer:focus{outline:0}.top{top:0;inset-inline-end:auto;bottom:auto;inset-inline-start:0;width:100%;height:var(--size)}.end{top:0;inset-inline-end:0;bottom:auto;inset-inline-start:auto;width:var(--size);height:100%}.bottom{top:auto;inset-inline-end:auto;bottom:0;inset-inline-start:0;width:100%;height:var(--size)}.start{top:0;inset-inline-end:auto;bottom:auto;inset-inline-start:0;width:var(--size);height:100%}.header{display:flex;flex-wrap:nowrap;padding-inline-start:var(--spacing);padding-block-end:0;padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block))}.title{align-self:center;flex:1 1 auto;font:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);margin:0}.header-actions{align-self:start;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:end;gap:var(--wa-space-2xs);padding-inline-start:var(--spacing)}.header-actions ::slotted(wa-button),.header-actions wa-button{flex:0 0 auto;display:flex;align-items:center}.body{flex:1 1 auto;display:block;padding:var(--spacing);overflow:auto;-webkit-overflow-scrolling:touch}.body:focus{outline:0}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{display:flex;flex-wrap:wrap;gap:var(--wa-space-xs);justify-content:end;padding:var(--spacing);padding-block-start:0}.footer ::slotted(wa-button:not(:last-of-type)){margin-inline-end:var(--wa-spacing-xs)}.drawer::backdrop{background-color:var(--wa-color-overlay-modal,rgb(0 0 0 / .25));-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.01}100%{scale:1}}@keyframes show-drawer{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}@keyframes show-drawer-from-top{from{opacity:0;translate:0 -100%}to{opacity:1;translate:0 0}}@keyframes show-drawer-from-end{from{opacity:0;translate:100%}to{opacity:1;translate:0 0}}@keyframes show-drawer-from-bottom{from{opacity:0;translate:0 100%}to{opacity:1;translate:0 0}}@keyframes show-drawer-from-start{from{opacity:0;translate:-100% 0}to{opacity:1;translate:0 0}}@keyframes show-backdrop{from{opacity:0}to{opacity:1}}@media (forced-colors:active){.drawer{border:solid 1px #fff}}`))},61366:function(t,e,o){o.a(t,async function(t,e){try{o(74423),o(3362),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);var n=o(5124),i=o(67576),r=o(6412),s=o(63672),a=o(17051),l=o(42462),d=o(28438),h=o(98779),c=o(27259),u=o(25877),p=o(984),f=o(95010),w=o(9395),m=o(717),v=o(40158),b=o(10416),g=t([v]);v=(g.then?(await g)():g)[0];let A,E=t=>t;var y=Object.defineProperty,C=Object.getOwnPropertyDescriptor,k=(t,e,o,n)=>{for(var i,r=n>1?void 0:n?C(e,o):e,s=t.length-1;s>=0;s--)(i=t[s])&&(r=(n?i(e,o,r):i(r))||r);return n&&r&&y(e,o,r),r};const x=new Set;let $=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,u.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 h.k;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!1);x.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,x.add(this),(0,u.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 d.L;if(this.dispatchEvent(t),t.defaultPrevented)return void(this.open=!0);document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("click",this.handleDocumentClick),x.delete(this),(0,u.Fw)(this),await(0,c.Ud)(this.popup.popup,"hide-with-scale"),this.popup.active=!1,this.dialog.close(),this.dispatchEvent(new a.Z)}}handleForChange(){const t=this.getRootNode();if(!t)return;const e=this.for?t.getElementById(this.for):null,o=this.anchor;if(e===o)return;const{signal:n}=this.eventController;e&&e.addEventListener("click",this.handleAnchorClick,{signal:n}),o&&o.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,p.l)(this,"wa-after-show")}async hide(){if(this.open)return this.open=!1,(0,p.l)(this,"wa-after-hide")}handleDialogCancel(t){t.preventDefault(),this.dialog.classList.contains("hide")||(this.open=!1)}render(){return(0,n.qy)(A||(A=E` <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,s.J)(this.ariaLabelledby),(0,s.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,u.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)}}};$.css=b.A,$.dependencies={"wa-popup":v.A},k([(0,i.P)("dialog")],$.prototype,"dialog",2),k([(0,i.P)(".body")],$.prototype,"body",2),k([(0,i.P)("wa-popup")],$.prototype,"popup",2),k([(0,i.wk)()],$.prototype,"anchor",2),k([(0,i.MZ)()],$.prototype,"placement",2),k([(0,i.MZ)({type:Boolean,reflect:!0})],$.prototype,"open",2),k([(0,i.MZ)({type:Number})],$.prototype,"distance",2),k([(0,i.MZ)({type:Number})],$.prototype,"skidding",2),k([(0,i.MZ)()],$.prototype,"for",2),k([(0,i.MZ)({attribute:"without-arrow",type:Boolean,reflect:!0})],$.prototype,"withoutArrow",2),k([(0,i.MZ)({attribute:"auto-size"})],$.prototype,"autoSize",2),k([(0,i.MZ)({attribute:"auto-size-padding",type:Number})],$.prototype,"autoSizePadding",2),k([(0,i.MZ)({attribute:"trap-focus",type:Boolean})],$.prototype,"trapFocus",2),k([(0,i.MZ)({attribute:"aria-labelledby"})],$.prototype,"ariaLabelledby",2),k([(0,i.MZ)({attribute:"aria-describedby"})],$.prototype,"ariaDescribedby",2),k([(0,w.w)("open",{waitUntilFirstUpdate:!0})],$.prototype,"handleOpenChange",1),k([(0,w.w)("for")],$.prototype,"handleForChange",1),k([(0,w.w)(["distance","placement","skidding"])],$.prototype,"handleOptionsChange",1),$=k([(0,i.EM)("wa-popover")],$),e()}catch(A){e(A)}})},10416:function(t,e,o){o.d(e,{A:function(){return i}});let n;var i=(0,o(5124).AH)(n||(n=(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)}`))},31247:function(t,e,o){o.d(e,{v:function(){return n}});o(18111),o(22489),o(61701),o(42762);function n(t){return t.split(" ").map(t=>t.trim()).filter(t=>""!==t)}},4444:function(t,e,o){o.d(e,{JG:function(){return i},Rt:function(){return s},I7:function(){return r}});o(27495),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(25440),o(62953);const n=new Set;function i(t){if(n.add(t),!document.documentElement.classList.contains("wa-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}()+function(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),t<2&&(e=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",e),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${t}px`)}}function r(t){n.delete(t),0===n.size&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function s(t,e,o="vertical",n="smooth"){const i=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),r=i.top+e.scrollTop,s=i.left+e.scrollLeft,a=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,d=e.scrollTop,h=e.scrollTop+e.offsetHeight;"horizontal"!==o&&"both"!==o||(s<a?e.scrollTo({left:s,behavior:n}):s+t.clientWidth>l&&e.scrollTo({left:s-e.offsetWidth+t.clientWidth,behavior:n})),"vertical"!==o&&"both"!==o||(r<d?e.scrollTo({top:r,behavior:n}):r+t.clientHeight>h&&e.scrollTo({top:r-e.offsetHeight+t.clientHeight,behavior:n}))}},88696:function(t,e,o){o.a(t,async function(t,n){try{o.d(e,{P:function(){return l}});var i=o(69235),r=(o(3362),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953),o(37540)),s=o(42017),a=t([i]);i=(a.then?(await a)():a)[0];class l{handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}target(t){return d(this,t)}constructor(t,{target:e,config:o,callback:n,skipInitial:i}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=o,this.o=null!=i?i:this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver(t=>{this.handleChanges(t),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}}const d=(0,s.u$)(class extends r.Kq{render(t,e){}update(t,[e,o]){this.controller=e,this.part=t,this.observe=o,!1===o?(e.unobserve(t.element),this.observing=!1):!1===this.observing&&(e.observe(t.element),this.observing=!0)}disconnected(){var t;null!==(t=this.controller)&&void 0!==t&&t.unobserve(this.part.element),this.observing=!1}reconnected(){var t;!1!==this.observe&&!1===this.observing&&(null!==(t=this.controller)&&void 0!==t&&t.observe(this.part.element),this.observing=!0)}constructor(){super(...arguments),this.observing=!1}});n()}catch(l){n(l)}})},99731:function(t,e,o){o.d(e,{Y:function(){return u}});var n=o(40445),i=o(67576),r=(o(93775),o(18111),o(22489),o(20116),o(62953),o(5124)),s=o(99591);let a,l=t=>t;class d extends r.WF{get chips(){return this.childElements.filter(t=>t instanceof s.v)}render(){return(0,r.qy)(a||(a=l`<slot @slotchange="${0}"></slot>`),this.updateTabIndices)}handleKeyDown(t){const e="ArrowLeft"===t.key,o="ArrowRight"===t.key,n="Home"===t.key,i="End"===t.key;if(!(e||o||n||i))return;const{chips:r}=this;if(r.length<2)return;if(t.preventDefault(),n||i){return r[n?0:r.length-1].focus({trailing:i}),void this.updateTabIndices()}const s="rtl"===getComputedStyle(this).direction?e:o,a=r.find(t=>t.matches(":focus-within"));if(!a){return(s?r[0]:r[r.length-1]).focus({trailing:!s}),void this.updateTabIndices()}const l=r.indexOf(a);let d=s?l+1:l-1;for(;d!==l;){d>=r.length?d=0:d<0&&(d=r.length-1);const t=r[d];if(!t.disabled||t.alwaysFocusable){t.focus({trailing:!s}),this.updateTabIndices();break}s?d++:d--}}updateTabIndices(){const{chips:t}=this;let e;for(const o of t){const t=o.alwaysFocusable||!o.disabled;o.matches(":focus-within")&&t?e=o:(t&&!e&&(e=o),o.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,n.Cg)([(0,i.KN)()],d.prototype,"childElements",void 0);let h;const c=(0,r.AH)(h||(h=(t=>t)`:host{display:flex;flex-wrap:wrap;gap:8px}`));let u=class extends d{};u.styles=[c],u=(0,n.Cg)([(0,i.EM)("md-chip-set")],u)},76482:function(t,e,o){o.d(e,{i:function(){return s}});o(89463),o(62953);var n=o(5124);const i=Symbol("attachableController");let r;n.S$||(r=new MutationObserver(t=>{for(const o of t){var e;null===(e=o.target[i])||void 0===e||e.hostConnected()}}));class s{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(t){null===t?this.host.removeAttribute("for"):this.host.setAttribute("for",t)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(t){t?this.attach(t):this.detach()}attach(t){t!==this.currentControl&&(this.setCurrentControl(t),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(t){this.onControlChange(this.currentControl,t),this.currentControl=t}constructor(t,e){var o;this.host=t,this.onControlChange=e,this.currentControl=null,t.addController(this),t[i]=this,null===(o=r)||void 0===o||o.observe(t,{attributeFilter:["for"]})}}},76610:function(t,e,o){o.d(e,{Ux:function(){return n}});o(3362),o(27495),o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(42762),o(62953);const n={STANDARD:"cubic-bezier(0.2, 0, 0, 1)",STANDARD_ACCELERATE:"cubic-bezier(.3,0,1,1)",STANDARD_DECELERATE:"cubic-bezier(0,0,0,1)",EMPHASIZED:"cubic-bezier(.3,0,0,1)",EMPHASIZED_ACCELERATE:"cubic-bezier(.3,0,.8,.15)",EMPHASIZED_DECELERATE:"cubic-bezier(.05,.7,.1,1)"}},27525:function(t,e,o){o.d(e,{A6:function(){return r},RZ:function(){return i},c7:function(){return s},cG:function(){return d},u9:function(){return l},wm:function(){return a},zT:function(){return n}});o(62953);function n(t,e=h){const o=s(t,e);return o&&(o.tabIndex=0,o.focus()),o}function i(t,e=h){const o=function(t,e=h){for(let o=t.length-1;o>=0;o--){const n=t[o];if(e(n))return n}return null}(t,e);return o&&(o.tabIndex=0,o.focus()),o}function r(t,e=h){for(let o=0;o<t.length;o++){const n=t[o];if(0===n.tabIndex&&e(n))return{item:n,index:o}}return null}function s(t,e=h){for(const o of t)if(e(o))return o;return null}function a(t,e,o=h,i=!0){if(e){const n=function(t,e,o=h,n=!0){for(let i=1;i<t.length;i++){const r=(i+e)%t.length;if(r<e&&!n)return null;const s=t[r];if(o(s))return s}return t[e]?t[e]:null}(t,e.index,o,i);return n&&(n.tabIndex=0,n.focus()),n}return n(t,o)}function l(t,e,o=h,n=!0){if(e){const i=function(t,e,o=h,n=!0){for(let i=1;i<t.length;i++){const r=(e-i+t.length)%t.length;if(r>e&&!n)return null;const s=t[r];if(o(s))return s}return t[e]?t[e]:null}(t,e.index,o,n);return i&&(i.tabIndex=0,i.focus()),i}return i(t,o)}function d(){return new Event("request-activation",{bubbles:!0,composed:!0})}function h(t){return!t.disabled}},96245:function(t,e,o){o.d(e,{R:function(){return i}});let n;const i=(0,o(5124).AH)(n||(n=(t=>t)`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors:active){:host{display:none}}.surface,:host{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:transparent}.surface::after,.surface::before{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color,var(--md-sys-color-on-surface,#1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side,var(--md-ripple-pressed-color,var(--md-sys-color-on-surface,#1d1b20)) max(100% - 70px,65%),transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color,var(--md-sys-color-on-surface,#1d1b20));opacity:var(--md-ripple-hover-opacity, .08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, .12);transition-duration:105ms}`))},91382:function(t,e,o){o.d(e,{n:function(){return f}});o(3362),o(62953);var n=o(40445),i=o(5124),r=o(67576),s=o(6412),a=o(76482),l=o(76610);let d,h=t=>t;var c;!function(t){t[t.INACTIVE=0]="INACTIVE",t[t.TOUCH_DELAY=1]="TOUCH_DELAY",t[t.HOLDING=2]="HOLDING",t[t.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"}(c||(c={}));const u=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],p=i.S$?null:window.matchMedia("(forced-colors: active)");class f extends i.WF{get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return(0,i.qy)(d||(d=h`<div class="surface ${0}"></div>`),(0,s.H)(t))}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==c.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==c.HOLDING)return this.state===c.TOUCH_DELAY?(this.state=c.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=c.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=c.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.state=c.TOUCH_DELAY,await new Promise(t=>{setTimeout(t,150)}),this.state===c.TOUCH_DELAY&&(this.state=c.HOLDING,this.startPressAnimation(t))}}handleClick(){this.disabled||(this.state!==c.WAITING_FOR_CLICK?this.state===c.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||this.endPressAnimation()}determineRippleSize(){var t;const{height:e,width:o}=this.getBoundingClientRect(),n=Math.max(e,o),i=Math.max(.35*n,75),r=null!==(t=this.currentCSSZoom)&&void 0!==t?t:1,s=Math.floor(.2*n/r),a=Math.sqrt(o**2+e**2)+10;this.initialSize=s;const l=(a+i)/s;this.rippleScale=""+l/r,this.rippleSize=`${s}px`}getNormalizedPointerEventCoords(t){var e;const{scrollX:o,scrollY:n}=window,{left:i,top:r}=this.getBoundingClientRect(),s=o+i,a=n+r,{pageX:l,pageY:d}=t,h=null!==(e=this.currentCSSZoom)&&void 0!==e?e:1;return{x:(l-s)/h,y:(d-a)/h}}getTranslationCoordinates(t){var e;const{height:o,width:n}=this.getBoundingClientRect(),i=null!==(e=this.currentCSSZoom)&&void 0!==e?e:1,r={x:(n/i-this.initialSize)/2,y:(o/i-this.initialSize)/2};let s;return s=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:n/i/2,y:o/i/2},s={x:s.x-this.initialSize/2,y:s.y-this.initialSize/2},{startPoint:s,endPoint:r}}startPressAnimation(t){var e;if(!this.mdRoot)return;this.pressed=!0,null===(e=this.growAnimation)||void 0===e||e.cancel(),this.determineRippleSize();const{startPoint:o,endPoint:n}=this.getTranslationCoordinates(t),i=`${o.x}px, ${o.y}px`,r=`${n.x}px, ${n.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${i}) scale(1)`,`translate(${r}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:l.Ux.STANDARD,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=c.INACTIVE;const t=this.growAnimation;let e=1/0;"number"==typeof(null==t?void 0:t.currentTime)?e=t.currentTime:null!=t&&t.currentTime&&(e=t.currentTime.to("ms").value),e>=225?this.pressed=!1:(await new Promise(t=>{setTimeout(t,225-e)}),this.growAnimation===t&&(this.pressed=!1))}shouldReactToEvent(t){if(this.disabled||!t.isPrimary)return!1;if(this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if("pointerenter"===t.type||"pointerleave"===t.type)return!this.isTouch(t);const e=1===t.buttons;return this.isTouch(t)||e}isTouch({pointerType:t}){return"touch"===t}async handleEvent(t){if(null==p||!p.matches)switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t)}}onControlChange(t,e){if(!i.S$)for(const o of u)null==t||t.removeEventListener(o,this),null==e||e.addEventListener(o,this)}constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=c.INACTIVE,this.attachableController=new a.i(this,this.onControlChange.bind(this))}}(0,n.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,n.Cg)([(0,r.wk)()],f.prototype,"hovered",void 0),(0,n.Cg)([(0,r.wk)()],f.prototype,"pressed",void 0),(0,n.Cg)([(0,r.P)(".surface")],f.prototype,"mdRoot",void 0)},95192:function(t,e,o){o.d(e,{IU:function(){return d},Jt:function(){return a},Yd:function(){return n},hZ:function(){return l},y$:function(){return i}});o(44114),o(18111),o(7588),o(61701),o(3362),o(62953);function n(t){return new Promise((e,o)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>o(t.error)})}function i(t,e){let o;return(i,r)=>(()=>{if(o)return o;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),o=n(i),o.then(t=>{t.onclose=()=>o=void 0},()=>{}),o})().then(t=>r(t.transaction(e,i).objectStore(e)))}let r;function s(){return r||(r=i("keyval-store","keyval")),r}function a(t,e=s()){return e("readonly",e=>n(e.get(t)))}function l(t,e,o=s()){return o("readwrite",o=>(o.put(e,t),n(o.transaction)))}function d(t=s()){return t("readwrite",t=>(t.clear(),n(t.transaction)))}},37540:function(t,e,o){o.d(e,{Kq:function(){return c}});o(17642),o(58004),o(33853),o(45876),o(32475),o(15024),o(31698),o(62953);var n=o(63937),i=o(42017);const r=(t,e)=>{const o=t._$AN;if(void 0===o)return!1;for(const i of o){var n;null!==(n=i._$AO)&&void 0!==n&&n.call(i,e,!1),r(i,e)}return!0},s=t=>{let e,o;do{var n;if(void 0===(e=t._$AM))break;o=e._$AN,o.delete(t),t=e}while(0===(null===(n=o)||void 0===n?void 0:n.size))},a=t=>{for(let e;e=t._$AM;t=e){let o=e._$AN;if(void 0===o)e._$AN=o=new Set;else if(o.has(t))break;o.add(t),h(e)}};function l(t){void 0!==this._$AN?(s(this),this._$AM=t,a(this)):this._$AM=t}function d(t,e=!1,o=0){const n=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(e)if(Array.isArray(n))for(let a=o;a<n.length;a++)r(n[a],!1),s(n[a]);else null!=n&&(r(n,!1),s(n));else r(this,t)}const h=t=>{var e,o;t.type==i.OA.CHILD&&(null!==(e=t._$AP)&&void 0!==e||(t._$AP=d),null!==(o=t._$AQ)&&void 0!==o||(t._$AQ=l))};class c extends i.WL{_$AT(t,e,o){super._$AT(t,e,o),a(this),this.isConnected=t._$AU}_$AO(t,e=!0){var o,n;t!==this.isConnected&&(this.isConnected=t,t?null===(o=this.reconnected)||void 0===o||o.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(r(this,t),s(this))}setValue(t){if((0,n.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}constructor(){super(...arguments),this._$AN=void 0}}},91335:function(t,e,o){o.d(e,{Tc:function(){return u}});o(74423),o(44114),o(18111),o(20116),o(61701),o(45367),o(92731),o(84864),o(57465),o(27495),o(42762),o(62953);let n=["Shift","Meta","Alt","Control"],i=1e3,r="keydown",s="object"==typeof navigator?navigator.platform:"",a=/Mac|iPod|iPhone|iPad/.test(s)?"Meta":"Control",l="Win32"===s?["Control","Alt"]:["Alt"];function d(t){let e=t.target;return t.repeat||t.isComposing||e!==t.currentTarget&&e.matches("[contenteditable],input,select,textarea")}function h(t,e){return"function"==typeof t.getModifierState&&(t.getModifierState(e)||l.includes(e)&&t.getModifierState("AltGraph"))}function c(t,[e,o,i]){const r=e.includes("AltGraph");return!((i instanceof RegExp?!i.test(t.key)&&!i.test(t.code):i.toUpperCase()!==t.key.toUpperCase()&&i!==t.code)||e.find(e=>!h(t,e))||n.find(n=>!e.includes(n)&&!o.includes(n)&&i!==n&&h(t,n)&&!(r&&l.includes(n))))}function u(t,e,o={}){var n;let s=null!==(n=o.event)&&void 0!==n?n:r,l=function(t,e={}){var o,n;let r=null!==(o=e.timeout)&&void 0!==o?o:i,s=null!==(n=e.ignore)&&void 0!==n?n:d,l=Object.keys(t).map(e=>{return[e,(o=e,o.trim().split(" ").map(t=>{let e=function(t){let e=[],o=0;for(let n=0;n<t.length;n++)"+"===t[n]&&/[\w\]]/.test(t[n-1]||"")&&(e.push(t.slice(o,n)),o=n+1);return e.push(t.slice(o)),e}(t),o=e.pop(),n=o.match(/^\((.+)\)$/),i=n?new RegExp(`^(?:${n[1]})$`,"i"):o,r=[],s=[];for(const d of e){var l;let t=d.match(/^\[(.*)\]$/),e=null!==(l=null==t?void 0:t[1])&&void 0!==l?l:d;e="$mod"===e?a:e,t?s.push(e):r.push(e)}return[r,s,i]})),t[e]];var o}),u=new Map,p=null;return t=>{if(!function(t){return!!(t.key&&t.code&&t.getModifierState)}(t)||s(t))return;let e=[];for(let[o,n,i]of l){let r=u.get(o),[s,...a]=r||n;if(c(t,s))if(a.length>0)u.set(o,a),e.push(o);else{if(u.delete(o),!e.length){i(t);break}console.warn(`tinykeys: Conflict found, "${o}" did not fire, waiting for:`,e)}else h(t,t.key)||u.delete(o)}p&&clearTimeout(p),p=setTimeout(()=>u.clear(),r)}}(e,o);return t.addEventListener(s,l,o.capture),()=>{t.removeEventListener(s,l,o.capture)}}}}]);