UNPKG

iobroker.lovelace

Version:

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

256 lines (230 loc) 26.5 kB
/*! For license information please see chunk.f556e6a0cac5fdfdeaf9.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[1522,6076,9462,1199],{79332:(t,e,i)=>{"use strict";i.d(e,{a:()=>a});i(65233);const a={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(t,e){for(var i in e)t[i]=e[i]},_cloneConfig:function(t){var e={isClone:!0};return this._copyProperties(e,t),e},_getAnimationConfigRecursive:function(t,e,i){var a;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(a=t?this.animationConfig[t]:this.animationConfig,Array.isArray(a)||(a=[a]),a)for(var n,s=0;n=a[s];s++)if(n.animatable)n.animatable._getAnimationConfigRecursive(n.type||t,e,i);else if(n.id){var o=e[n.id];o?(o.isClone||(e[n.id]=this._cloneConfig(o),o=e[n.id]),this._copyProperties(o,n)):e[n.id]=n}else i.push(n)},getAnimationConfig:function(t){var e={},i=[];for(var a in this._getAnimationConfigRecursive(t,e,i),e)i.push(e[a]);return i}}},96540:(t,e,i)=>{"use strict";i.d(e,{t:()=>n});i(65233);const a={_configureAnimations:function(t){var e=[],i=[];if(t.length>0)for(let e,a=0;e=t[a];a++){let t=document.createElement(e.name);if(t.isNeonAnimation){let a=null;t.configure||(t.configure=function(t){return null}),a=t.configure(e),i.push({result:a,config:e,neonAnimation:t})}else console.warn(this.is+":",e.name,"not found!")}for(var a=0;a<i.length;a++){let t=i[a].result,n=i[a].config,s=i[a].neonAnimation;try{"function"!=typeof t.cancel&&(t=document.timeline.play(t))}catch(e){t=null,console.warn("Couldnt play","(",n.name,").",e)}t&&e.push({neonAnimation:s,config:n,animation:t})}return e},_shouldComplete:function(t){for(var e=!0,i=0;i<t.length;i++)if("finished"!=t[i].animation.playState){e=!1;break}return e},_complete:function(t){for(var e=0;e<t.length;e++)t[e].neonAnimation.complete(t[e].config);for(e=0;e<t.length;e++)t[e].animation.cancel()},playAnimation:function(t,e){var i=this.getAnimationConfig(t);if(i){this._active=this._active||{},this._active[t]&&(this._complete(this._active[t]),delete this._active[t]);var a=this._configureAnimations(i);if(0!=a.length){this._active[t]=a;for(var n=0;n<a.length;n++)a[n].animation.onfinish=function(){this._shouldComplete(a)&&(this._complete(a),delete this._active[t],this.fire("neon-animation-finish",e,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",e,{bubbles:!1})}},cancelAnimation:function(){for(var t in this._active){var e=this._active[t];for(var i in e)e[i].animation.cancel()}this._active={}}},n=[i(79332).a,a]},51654:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s,n:()=>o});i(65233);var a=i(75009),n=i(87156);const s={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(t,e){e&&(t?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(t){this.closingReason=this.closingReason||{},this.closingReason.confirmed=t},_onDialogClick:function(t){for(var e=(0,n.vz)(t).path,i=0,a=e.indexOf(this);i<a;i++){var s=e[i];if(s.hasAttribute&&(s.hasAttribute("dialog-dismiss")||s.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(s.hasAttribute("dialog-confirm")),this.close(),t.stopPropagation();break}}}},o=[a.$,s]},22626:(t,e,i)=>{"use strict";i(65233),i(65660),i(1656);var a=i(51654),n=i(9672),s=i(50856);(0,n.k)({_template:s.d` <style> :host { display: block; @apply --layout-relative; } :host(.is-scrolled:not(:first-child))::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--divider-color); } :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: var(--divider-color); } .scrollable { padding: 0 24px; @apply --layout-scroll; @apply --paper-dialog-scrollable; } .fit { @apply --layout-fit; } </style> <div id="scrollable" class="scrollable" on-scroll="updateScrollState"> <slot></slot> </div> `,is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(a.Z)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}})},50808:(t,e,i)=>{"use strict";i(65233),i(65660),i(1656),i(47686),i(54242);const a=document.createElement("template");a.setAttribute("style","display: none;"),a.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(a.content);var n=i(96540),s=i(51654),o=i(9672),r=i(50856);(0,o.k)({_template:r.d` <style include="paper-dialog-shared-styles"></style> <slot></slot> `,is:"paper-dialog",behaviors:[s.n,n.t],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})},25856:(t,e,i)=>{"use strict";i(65233),i(65660);var a=i(26110),n=i(98235),s=i(9672),o=i(87156),r=i(50856);(0,s.k)({_template:r.d` <style> :host { display: inline-block; position: relative; width: 400px; border: 1px solid; padding: 2px; -moz-appearance: textarea; -webkit-appearance: textarea; overflow: hidden; } .mirror-text { visibility: hidden; word-wrap: break-word; @apply --iron-autogrow-textarea; } .fit { @apply --layout-fit; } textarea { position: relative; outline: none; border: none; resize: none; background: inherit; color: inherit; /* see comments in template */ width: 100%; height: 100%; font-size: inherit; font-family: inherit; line-height: inherit; text-align: inherit; @apply --iron-autogrow-textarea; } textarea::-webkit-input-placeholder { @apply --iron-autogrow-textarea-placeholder; } textarea:-moz-placeholder { @apply --iron-autogrow-textarea-placeholder; } textarea::-moz-placeholder { @apply --iron-autogrow-textarea-placeholder; } textarea:-ms-input-placeholder { @apply --iron-autogrow-textarea-placeholder; } </style> <!-- the mirror sizes the input/textarea so it grows with typing --> <!-- use &#160; instead &nbsp; of to allow this element to be used in XHTML --> <div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div> <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff --> <div class="textarea-container fit"> <textarea id="textarea" name\$="[[name]]" aria-label\$="[[label]]" autocomplete\$="[[autocomplete]]" autofocus\$="[[autofocus]]" inputmode\$="[[inputmode]]" placeholder\$="[[placeholder]]" readonly\$="[[readonly]]" required\$="[[required]]" disabled\$="[[disabled]]" rows\$="[[rows]]" minlength\$="[[minlength]]" maxlength\$="[[maxlength]]"></textarea> </div> `,is:"iron-autogrow-textarea",behaviors:[n.x,a.a],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(t){this.$.textarea.selectionStart=t},set selectionEnd(t){this.$.textarea.selectionEnd=t},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var t=this.$.textarea.validity.valid;return t&&(this.required&&""===this.value?t=!1:this.hasValidator()&&(t=n.x.validate.call(this,this.value))),this.invalid=!t,this.fire("iron-input-validate"),t},_bindValueChanged:function(t){this.value=t},_valueChanged:function(t){var e=this.textarea;e&&(e.value!==t&&(e.value=t||0===t?t:""),this.bindValue=t,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(t){var e=(0,o.vz)(t).path;this.value=e?e[0].value:t.target.value},_constrain:function(t){var e;for(t=t||[""],e=this.maxRows>0&&t.length>this.maxRows?t.slice(0,this.maxRows):t.slice(0);this.rows>0&&e.length<this.rows;)e.push("");return e.join("<br/>")+"&#160;"},_valueForMirror:function(){var t=this.textarea;if(t)return this.tokens=t&&t.value?t.value.replace(/&/gm,"&amp;").replace(/"/gm,"&quot;").replace(/'/gm,"&#39;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});i(2178),i(98121),i(65911);var l=i(21006),h=i(66668);(0,s.k)({_template:r.d` <style> :host { display: block; } :host([hidden]) { display: none !important; } label { pointer-events: none; } </style> <paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"> <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label> <iron-autogrow-textarea class="paper-input-input" slot="input" id$="[[_inputId]]" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" bind-value="{{value}}" invalid="{{invalid}}" validator$="[[validator]]" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea> <template is="dom-if" if="[[errorMessage]]"> <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error> </template> <template is="dom-if" if="[[charCounter]]"> <paper-input-char-counter slot="add-on"></paper-input-char-counter> </template> </paper-input-container> `,is:"paper-textarea",behaviors:[h.d0,l.V],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(t){this.$.input.textarea.selectionStart=t},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(t){this.$.input.textarea.selectionEnd=t},_ariaLabelledByChanged:function(t){this._focusableElement.setAttribute("aria-labelledby",t)},_ariaDescribedByChanged:function(t){this._focusableElement.setAttribute("aria-describedby",t)},get _focusableElement(){return this.inputElement.textarea}})},32333:(t,e,i)=>{"use strict";var a=i(55704);class n extends a.oi{static get properties(){return{value:{type:Number},high:{type:Number},low:{type:Number},min:{type:Number},max:{type:Number},step:{type:Number},startAngle:{type:Number},arcLength:{type:Number},handleSize:{type:Number},handleZoom:{type:Number},readonly:{type:Boolean},disabled:{type:Boolean},dragging:{type:Boolean,reflect:!0},rtl:{type:Boolean},_scale:{type:Number},valueLabel:{type:String},lowLabel:{type:String},highLabel:{type:String}}}constructor(){super(),this.min=0,this.max=100,this.step=1,this.startAngle=135,this.arcLength=270,this.handleSize=6,this.handleZoom=1.5,this.readonly=!1,this.disabled=!1,this.dragging=!1,this.rtl=!1,this._scale=1,this.attachedListeners=!1}get _start(){return this.startAngle*Math.PI/180}get _len(){return Math.min(this.arcLength*Math.PI/180,2*Math.PI-.01)}get _end(){return this._start+this._len}get _showHandle(){return!this.readonly&&(null!=this.value||null!=this.high&&null!=this.low)}_angleInside(t){let e=(this.startAngle+this.arcLength/2-t+180+360)%360-180;return e<this.arcLength/2&&e>-this.arcLength/2}_angle2xy(t){return this.rtl?{x:-Math.cos(t),y:Math.sin(t)}:{x:Math.cos(t),y:Math.sin(t)}}_xy2angle(t,e){return this.rtl&&(t=-t),(Math.atan2(e,t)-this._start+2*Math.PI)%(2*Math.PI)}_value2angle(t){const e=((t=Math.min(this.max,Math.max(this.min,t)))-this.min)/(this.max-this.min);return this._start+e*this._len}_angle2value(t){return Math.round((t/this._len*(this.max-this.min)+this.min)/this.step)*this.step}get _boundaries(){const t=this._angle2xy(this._start),e=this._angle2xy(this._end);let i=1;this._angleInside(270)||(i=Math.max(-t.y,-e.y));let a=1;this._angleInside(90)||(a=Math.max(t.y,e.y));let n=1;this._angleInside(180)||(n=Math.max(-t.x,-e.x));let s=1;return this._angleInside(0)||(s=Math.max(t.x,e.x)),{up:i,down:a,left:n,right:s,height:i+a,width:n+s}}_mouse2value(t){const e=t.type.startsWith("touch")?t.touches[0].clientX:t.clientX,i=t.type.startsWith("touch")?t.touches[0].clientY:t.clientY,a=this.shadowRoot.querySelector("svg").getBoundingClientRect(),n=this._boundaries,s=e-(a.left+n.left*a.width/n.width),o=i-(a.top+n.up*a.height/n.height),r=this._xy2angle(s,o);return this._angle2value(r)}dragStart(t){if(!this._showHandle||this.disabled)return;let e,i=t.target;if(this._rotation&&"focus"!==this._rotation.type)return;if(i.classList.contains("shadowpath"))if("touchstart"===t.type&&(e=window.setTimeout((()=>{this._rotation&&(this._rotation.cooldown=void 0)}),200)),null==this.low)i=this.shadowRoot.querySelector("#value");else{const e=this._mouse2value(t);i=Math.abs(e-this.low)<Math.abs(e-this.high)?this.shadowRoot.querySelector("#low"):this.shadowRoot.querySelector("#high")}if(i.classList.contains("overflow")&&(i=i.nextElementSibling),!i.classList.contains("handle"))return;i.setAttribute("stroke-width",2*this.handleSize*this.handleZoom*this._scale);const a="high"===i.id?this.low:this.min,n="low"===i.id?this.high:this.max;this._rotation={handle:i,min:a,max:n,start:this[i.id],type:t.type,cooldown:e},this.dragging=!0}_cleanupRotation(){const t=this._rotation.handle;t.setAttribute("stroke-width",2*this.handleSize*this._scale),this._rotation=!1,this.dragging=!1,t.blur()}dragEnd(t){if(!this._showHandle||this.disabled)return;if(!this._rotation)return;const e=this._rotation.handle;this._cleanupRotation();let i=new CustomEvent("value-changed",{detail:{[e.id]:this[e.id]},bubbles:!0,composed:!0});this.dispatchEvent(i),this.low&&this.low>=.99*this.max?this._reverseOrder=!0:this._reverseOrder=!1}drag(t){if(!this._showHandle||this.disabled)return;if(!this._rotation)return;if(this._rotation.cooldown)return window.clearTimeout(this._rotation.coldown),void this._cleanupRotation();if("focus"===this._rotation.type)return;t.preventDefault();const e=this._mouse2value(t);this._dragpos(e)}_dragpos(t){if(t<this._rotation.min||t>this._rotation.max)return;const e=this._rotation.handle;this[e.id]=t;let i=new CustomEvent("value-changing",{detail:{[e.id]:t},bubbles:!0,composed:!0});this.dispatchEvent(i)}_keyStep(t){if(!this._showHandle||this.disabled)return;if(!this._rotation)return;const e=this._rotation.handle;"ArrowLeft"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.rtl?this._dragpos(this[e.id]+this.step):this._dragpos(this[e.id]-this.step)),"ArrowRight"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),this.rtl?this._dragpos(this[e.id]-this.step):this._dragpos(this[e.id]+this.step)),"Home"===t.key&&(t.preventDefault(),this._dragpos(this.min)),"End"===t.key&&(t.preventDefault(),this._dragpos(this.max))}firstUpdated(){document.addEventListener("mouseup",this.dragEnd.bind(this)),document.addEventListener("touchend",this.dragEnd.bind(this),{passive:!1}),document.addEventListener("mousemove",this.drag.bind(this)),document.addEventListener("touchmove",this.drag.bind(this),{passive:!1}),document.addEventListener("keydown",this._keyStep.bind(this))}updated(t){if(this.shadowRoot.querySelector(".slider")){const t=window.getComputedStyle(this.shadowRoot.querySelector(".slider"));if(t&&t.strokeWidth){const e=parseFloat(t.strokeWidth);if(e>this.handleSize*this.handleZoom){const t=this._boundaries,i=`\n ${e/2*Math.abs(t.up)}px\n ${e/2*Math.abs(t.right)}px\n ${e/2*Math.abs(t.down)}px\n ${e/2*Math.abs(t.left)}px`;this.shadowRoot.querySelector("svg").style.margin=i}}}if(this.shadowRoot.querySelector("svg")&&void 0===this.shadowRoot.querySelector("svg").style.vectorEffect){t.has("_scale")&&1!=this._scale&&this.shadowRoot.querySelector("svg").querySelectorAll("path").forEach((t=>{if(t.getAttribute("stroke-width"))return;const e=parseFloat(getComputedStyle(t).getPropertyValue("stroke-width"));t.style.strokeWidth=e*this._scale+"px"}));const e=this.shadowRoot.querySelector("svg").getBoundingClientRect(),i=Math.max(e.width,e.height);this._scale=2/i}}_renderArc(t,e){const i=e-t;return t=this._angle2xy(t),e=this._angle2xy(e+.001),`\n M ${t.x} ${t.y}\n A 1 1,\n 0,\n ${i>Math.PI?"1":"0"} ${this.rtl?"0":"1"},\n ${e.x} ${e.y}\n `}_renderHandle(t){const e=this._value2angle(this[t]),i=this._angle2xy(e),n={value:this.valueLabel,low:this.lowLabel,high:this.highLabel}[t]||"";return a.YP` <g class="${t} handle"> <path id=${t} class="overflow" d=" M ${i.x} ${i.y} L ${i.x+.001} ${i.y+.001} " vector-effect="non-scaling-stroke" stroke="rgba(0,0,0,0)" stroke-width="${4*this.handleSize*this._scale}" /> <path id=${t} class="handle" d=" M ${i.x} ${i.y} L ${i.x+.001} ${i.y+.001} " vector-effect="non-scaling-stroke" stroke-width="${2*this.handleSize*this._scale}" tabindex="0" @focus=${this.dragStart} @blur=${this.dragEnd} role="slider" aria-valuemin=${this.min} aria-valuemax=${this.max} aria-valuenow=${this[t]} aria-disabled=${this.disabled} aria-label=${n||""} /> </g> `}render(){const t=this._boundaries;return a.dy` <svg @mousedown=${this.dragStart} @touchstart=${this.dragStart} xmln="http://www.w3.org/2000/svg" viewBox="${-t.left} ${-t.up} ${t.width} ${t.height}" style="margin: ${this.handleSize*this.handleZoom}px;" ?disabled=${this.disabled} focusable="false" > <g class="slider"> <path class="path" d=${this._renderArc(this._start,this._end)} vector-effect="non-scaling-stroke" /> <path class="bar" vector-effect="non-scaling-stroke" d=${this._renderArc(this._value2angle(null!=this.low?this.low:this.min),this._value2angle(null!=this.high?this.high:this.value))} /> <path class="shadowpath" d=${this._renderArc(this._start,this._end)} vector-effect="non-scaling-stroke" stroke="rgba(0,0,0,0)" stroke-width="${3*this.handleSize*this._scale}" stroke-linecap="butt" /> </g> <g class="handles"> ${this._showHandle?null!=this.low?this._reverseOrder?a.dy`${this._renderHandle("high")} ${this._renderHandle("low")}`:a.dy`${this._renderHandle("low")} ${this._renderHandle("high")}`:a.dy`${this._renderHandle("value")}`:""} </g> </svg> `}static get styles(){return a.iv` :host { display: inline-block; width: 100%; } svg { overflow: visible; display: block; } path { transition: stroke 1s ease-out, stroke-width 200ms ease-out; } .slider { fill: none; stroke-width: var(--round-slider-path-width, 3); stroke-linecap: var(--round-slider-linecap, round); } .path { stroke: var(--round-slider-path-color, lightgray); } .bar { stroke: var(--round-slider-bar-color, deepskyblue); } svg[disabled] .bar { stroke: var(--round-slider-disabled-bar-color, darkgray); } g.handles { stroke: var(--round-slider-handle-color, var(--round-slider-bar-color, deepskyblue)); stroke-linecap: round; cursor: var(--round-slider-handle-cursor, pointer); } g.low.handle { stroke: var(--round-slider-low-handle-color); } g.high.handle { stroke: var(--round-slider-high-handle-color); } svg[disabled] g.handles { stroke: var(--round-slider-disabled-bar-color, darkgray); } .handle:focus { outline: unset; } `}}customElements.define("round-slider",n)},60461:t=>{t.exports=function t(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(i){!e.hasOwnProperty(i)||null===e[i]||"object"!=typeof e[i]&&"function"!=typeof e[i]||Object.isFrozen(e[i])||t(e[i])})),e}},49629:(t,e,i)=>{"use strict";i.d(e,{o:()=>n});var a=i(99602);const n=t=>null!=t?t:a.Ld},14516:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var a=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function n(t,e){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(n=t[i],s=e[i],!(n===s||a(n)&&a(s)))return!1;var n,s;return!0}const s=function(t,e){var i;void 0===e&&(e=n);var a,s=[],o=!1;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return o&&i===this&&e(n,s)||(a=t.apply(this,n),o=!0,i=this,s=n),a}}}}]); //# sourceMappingURL=chunk.f556e6a0cac5fdfdeaf9.js.map