iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
634 lines (536 loc) • 34.7 kB
JavaScript
/*! For license information please see chunk.b232991bc195ad48c931.js.LICENSE.txt */
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[7190],{35854:(e,t,a)=>{"use strict";a.d(t,{G:()=>i,R:()=>n});a(43437);var o=a(21006),r=a(98235);const i={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},n=[o.V,r.x,i]},85753:(e,t,a)=>{"use strict";a.d(t,{I:()=>r,E:()=>i});a(43437);var o=a(78161);const r={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},i=[o.i,r]},62132:(e,t,a)=>{"use strict";a.d(t,{K:()=>l});a(43437);var o=a(35854),r=a(49075),i=a(84938);const n={_checkedChanged:function(){o.G._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){i.o._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}},l=[r.B,o.R,n]},32296:(e,t,a)=>{"use strict";a(43437),a(1656);var o=a(62132),r=a(49075),i=a(9672),n=a(50856),l=a(87529);const c=n.d`<style>
:host {
display: inline-block;
white-space: nowrap;
cursor: pointer;
--calculated-paper-checkbox-size: var(--paper-checkbox-size, 18px);
/* -1px is a sentinel for the default and is replaced in \`attached\`. */
--calculated-paper-checkbox-ink-size: var(--paper-checkbox-ink-size, -1px);
@apply --paper-font-common-base;
line-height: 0;
-webkit-tap-highlight-color: transparent;
}
:host([hidden]) {
display: none ;
}
:host(:focus) {
outline: none;
}
.hidden {
display: none;
}
#checkboxContainer {
display: inline-block;
position: relative;
width: var(--calculated-paper-checkbox-size);
height: var(--calculated-paper-checkbox-size);
min-width: var(--calculated-paper-checkbox-size);
margin: var(--paper-checkbox-margin, initial);
vertical-align: var(--paper-checkbox-vertical-align, middle);
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
}
#ink {
position: absolute;
/* Center the ripple in the checkbox by negative offsetting it by
* (inkWidth - rippleWidth) / 2 */
top: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
left: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
width: var(--calculated-paper-checkbox-ink-size);
height: var(--calculated-paper-checkbox-ink-size);
color: var(--paper-checkbox-unchecked-ink-color, var(--primary-text-color));
opacity: 0.6;
pointer-events: none;
}
#ink:dir(rtl) {
right: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
left: auto;
}
#ink[checked] {
color: var(--paper-checkbox-checked-ink-color, var(--primary-color));
}
#checkbox {
position: relative;
box-sizing: border-box;
height: 100%;
border: solid 2px;
border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
border-radius: 2px;
pointer-events: none;
-webkit-transition: background-color 140ms, border-color 140ms;
transition: background-color 140ms, border-color 140ms;
-webkit-transition-duration: var(--paper-checkbox-animation-duration, 140ms);
transition-duration: var(--paper-checkbox-animation-duration, 140ms);
}
/* checkbox checked animations */
#checkbox.checked #checkmark {
-webkit-animation: checkmark-expand 140ms ease-out forwards;
animation: checkmark-expand 140ms ease-out forwards;
-webkit-animation-duration: var(--paper-checkbox-animation-duration, 140ms);
animation-duration: var(--paper-checkbox-animation-duration, 140ms);
}
@-webkit-keyframes checkmark-expand {
0% {
-webkit-transform: scale(0, 0) rotate(45deg);
}
100% {
-webkit-transform: scale(1, 1) rotate(45deg);
}
}
@keyframes checkmark-expand {
0% {
transform: scale(0, 0) rotate(45deg);
}
100% {
transform: scale(1, 1) rotate(45deg);
}
}
#checkbox.checked {
background-color: var(--paper-checkbox-checked-color, var(--primary-color));
border-color: var(--paper-checkbox-checked-color, var(--primary-color));
}
#checkmark {
position: absolute;
width: 36%;
height: 70%;
border-style: solid;
border-top: none;
border-left: none;
border-right-width: calc(2/15 * var(--calculated-paper-checkbox-size));
border-bottom-width: calc(2/15 * var(--calculated-paper-checkbox-size));
border-color: var(--paper-checkbox-checkmark-color, white);
-webkit-transform-origin: 97% 86%;
transform-origin: 97% 86%;
box-sizing: content-box; /* protect against page-level box-sizing */
}
#checkmark:dir(rtl) {
-webkit-transform-origin: 50% 14%;
transform-origin: 50% 14%;
}
/* label */
#checkboxLabel {
position: relative;
display: inline-block;
vertical-align: middle;
padding-left: var(--paper-checkbox-label-spacing, 8px);
white-space: normal;
line-height: normal;
color: var(--paper-checkbox-label-color, var(--primary-text-color));
@apply --paper-checkbox-label;
}
:host([checked]) #checkboxLabel {
color: var(--paper-checkbox-label-checked-color, var(--paper-checkbox-label-color, var(--primary-text-color)));
@apply --paper-checkbox-label-checked;
}
#checkboxLabel:dir(rtl) {
padding-right: var(--paper-checkbox-label-spacing, 8px);
padding-left: 0;
}
#checkboxLabel[hidden] {
display: none;
}
/* disabled state */
:host([disabled]) #checkbox {
opacity: 0.5;
border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
}
:host([disabled][checked]) #checkbox {
background-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
opacity: 0.5;
}
:host([disabled]) #checkboxLabel {
opacity: 0.65;
}
/* invalid state */
#checkbox.invalid:not(.checked) {
border-color: var(--paper-checkbox-error-color, var(--error-color));
}
</style>
<div id="checkboxContainer">
<div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]">
<div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div>
</div>
</div>
<div id="checkboxLabel"><slot></slot></div>`;c.setAttribute("strip-whitespace",""),(0,i.k)({_template:c,is:"paper-checkbox",behaviors:[o.K],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){(0,l.T8)(this,(function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var e=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),t="px",a=e.match(/[A-Za-z]+$/);null!==a&&(t=a[0]);var o=parseFloat(e),r=8/3*o;"px"===t&&(r=Math.floor(r))%2!=o%2&&r++,this.updateStyles({"--paper-checkbox-ink-size":r+t})}}))},_computeCheckboxClass:function(e,t){var a="";return e&&(a+="checked "),t&&(a+="invalid"),a},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,r.S._createRipple.call(this)}})},46002:(e,t,a)=>{"use strict";a(43437),a(8621),a(63207),a(78814),a(1656),a(57548),a(73962);var o=a(51644),r=a(26110),i=a(21006),n=a(98235),l=a(84938),c=a(9672),s=a(87156),p=a(81668),d=a(50856);(0,c.k)({_template:d.d`
<style include="paper-dropdown-menu-shared-styles">
:host(:focus) {
outline: none;
}
:host {
width: 200px; /* Default size of an <input> */
}
/**
* All of these styles below are for styling the fake-input display
*/
[slot="dropdown-trigger"] {
box-sizing: border-box;
position: relative;
width: 100%;
padding: 16px 0 8px 0;
}
:host([disabled]) [slot="dropdown-trigger"] {
pointer-events: none;
opacity: var(--paper-dropdown-menu-disabled-opacity, 0.33);
}
:host([no-label-float]) [slot="dropdown-trigger"] {
padding-top: 8px; /* If there's no label, we need less space up top. */
}
#input {
@apply --paper-font-subhead;
@apply --paper-font-common-nowrap;
line-height: 1.5;
border-bottom: 1px solid var(--paper-dropdown-menu-color, var(--secondary-text-color));
color: var(--paper-dropdown-menu-color, var(--primary-text-color));
width: 100%;
box-sizing: border-box;
padding: 12px 20px 0 0; /* Right padding so that text doesn't overlap the icon */
outline: none;
@apply --paper-dropdown-menu-input;
}
#input:dir(rtl) {
padding-right: 0px;
padding-left: 20px;
}
:host([disabled]) #input {
border-bottom: 1px dashed var(--paper-dropdown-menu-color, var(--secondary-text-color));
}
:host([invalid]) #input {
border-bottom: 2px solid var(--paper-dropdown-error-color, var(--error-color));
}
:host([no-label-float]) #input {
padding-top: 0; /* If there's no label, we need less space up top. */
}
label {
@apply --paper-font-subhead;
@apply --paper-font-common-nowrap;
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
/**
* The container has a 16px top padding, and there's 12px of padding
* between the input and the label (from the input's padding-top)
*/
top: 28px;
box-sizing: border-box;
width: 100%;
padding-right: 20px; /* Right padding so that text doesn't overlap the icon */
text-align: left;
transition-duration: .2s;
transition-timing-function: cubic-bezier(.4,0,.2,1);
color: var(--paper-dropdown-menu-color, var(--secondary-text-color));
@apply --paper-dropdown-menu-label;
}
label:dir(rtl) {
padding-right: 0px;
padding-left: 20px;
}
:host([no-label-float]) label {
top: 8px;
/* Since the label doesn't need to float, remove the animation duration
which slows down visibility changes (i.e. when a selection is made) */
transition-duration: 0s;
}
label.label-is-floating {
font-size: 12px;
top: 8px;
}
label.label-is-hidden {
visibility: hidden;
}
:host([focused]) label.label-is-floating {
color: var(--paper-dropdown-menu-focus-color, var(--primary-color));
}
:host([invalid]) label.label-is-floating {
color: var(--paper-dropdown-error-color, var(--error-color));
}
/**
* Sets up the focused underline. It's initially hidden, and becomes
* visible when it's focused.
*/
label:after {
background-color: var(--paper-dropdown-menu-focus-color, var(--primary-color));
bottom: 7px; /* The container has an 8px bottom padding */
content: '';
height: 2px;
left: 45%;
position: absolute;
transition-duration: .2s;
transition-timing-function: cubic-bezier(.4,0,.2,1);
visibility: hidden;
width: 8px;
z-index: 10;
}
:host([invalid]) label:after {
background-color: var(--paper-dropdown-error-color, var(--error-color));
}
:host([no-label-float]) label:after {
bottom: 7px; /* The container has a 8px bottom padding */
}
:host([focused]:not([disabled])) label:after {
left: 0;
visibility: visible;
width: 100%;
}
iron-icon {
position: absolute;
right: 0px;
bottom: 8px; /* The container has an 8px bottom padding */
@apply --paper-font-subhead;
color: var(--disabled-text-color);
@apply --paper-dropdown-menu-icon;
}
iron-icon:dir(rtl) {
left: 0;
right: auto;
}
:host([no-label-float]) iron-icon {
margin-top: 0px;
}
.error {
display: inline-block;
visibility: hidden;
color: var(--paper-dropdown-error-color, var(--error-color));
@apply --paper-font-caption;
position: absolute;
left:0;
right:0;
bottom: -12px;
}
:host([invalid]) .error {
visibility: visible;
}
</style>
<!-- this div fulfills an a11y requirement for combobox, do not remove -->
<span role="button"></span>
<paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]">
<!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> -->
<div class="dropdown-trigger" slot="dropdown-trigger">
<label class\$="[[_computeLabelClass(noLabelFloat,alwaysFloatLabel,hasContent)]]">
[[label]]
</label>
<div id="input" tabindex="-1"> </div>
<iron-icon icon="paper-dropdown-menu:arrow-drop-down"></iron-icon>
<span class="error">[[errorMessage]]</span>
</div>
<slot id="content" name="dropdown-content" slot="dropdown-content"></slot>
</paper-menu-button>
`,is:"paper-dropdown-menu-light",behaviors:[o.P,r.a,l.o,i.V,n.x],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,observer:"_valueChanged"},label:{type:String},placeholder:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,hasContent:{type:Boolean,readOnly:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{tabindex:0,role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=(0,s.vz)(this.$.content).getDistributedNodes(),t=0,a=e.length;t<a;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){p.nJ(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";t=e?e.label||e.getAttribute("label")||e.textContent.trim():"",this.value=t,this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e,t){return t||(e?-4:8)},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)},_computeLabelClass:function(e,t,a){var o="";return!0===e?a?"label-is-hidden":"":((a||!0===t)&&(o+=" label-is-floating"),o)},_valueChanged:function(){this.$.input&&this.$.input.textContent!==this.value&&(this.$.input.textContent=this.value),this._setHasContent(!!this.value)}})},25856:(e,t,a)=>{"use strict";a(43437),a(65660);var o=a(26110),r=a(98235),i=a(9672),n=a(87156),l=a(50856);(0,i.k)({_template:l.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   instead of to allow this element to be used in XHTML -->
<div id="mirror" class="mirror-text" aria-hidden="true"> </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]]" autocapitalize$="[[autocapitalize]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]"></textarea>
</div>
`,is:"iron-autogrow-textarea",behaviors:[r.x,o.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},autocapitalize:{type:String,value:"none"},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(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&!navigator.userAgent.match(/OS 1[3456789]/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=r.x.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;t&&(t.value!==e&&(t.value=e||0===e?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=(0,n.vz)(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+" "},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&").replace(/"/gm,""").replace(/'/gm,"'").replace(/</gm,"<").replace(/>/gm,">").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});a(2178),a(98121),a(65911);var c=a(21006),s=a(66668);(0,i.k)({_template:l.d`
<style>
:host {
display: block;
}
:host([hidden]) {
display: none ;
}
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:[s.d0,c.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(e){this.$.input.textarea.selectionStart=e},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(e){this.$.input.textarea.selectionEnd=e},_ariaLabelledByChanged:function(e){this._focusableElement.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this._focusableElement.setAttribute("aria-describedby",e)},get _focusableElement(){return this.inputElement.textarea}})},25782:(e,t,a)=>{"use strict";a(43437),a(65660),a(47686),a(97968);var o=a(9672),r=a(50856),i=a(33760);(0,o.k)({_template:r.d`
<style include="paper-item-shared-styles"></style>
<style>
:host {
@apply --layout-horizontal;
@apply --layout-center;
@apply --paper-font-subhead;
@apply --paper-item;
@apply --paper-icon-item;
}
.content-icon {
@apply --layout-horizontal;
@apply --layout-center;
width: var(--paper-item-icon-width, 56px);
@apply --paper-item-icon;
}
</style>
<div id="contentIcon" class="content-icon">
<slot name="item-icon"></slot>
</div>
<slot></slot>
`,is:"paper-icon-item",behaviors:[i.U]})},27662:(e,t,a)=>{"use strict";a(43437),a(1656),a(65660);var o=a(62132),r=a(9672),i=a(50856),n=a(87529);const l=i.d`
<style>
:host {
display: inline-block;
line-height: 0;
white-space: nowrap;
cursor: pointer;
@apply --paper-font-common-base;
--calculated-paper-radio-button-size: var(--paper-radio-button-size, 16px);
/* -1px is a sentinel for the default and is replace in \`attached\`. */
--calculated-paper-radio-button-ink-size: var(--paper-radio-button-ink-size, -1px);
}
:host(:focus) {
outline: none;
}
#radioContainer {
@apply --layout-inline;
@apply --layout-center-center;
position: relative;
width: var(--calculated-paper-radio-button-size);
height: var(--calculated-paper-radio-button-size);
vertical-align: middle;
@apply --paper-radio-button-radio-container;
}
#ink {
position: absolute;
top: 50%;
left: 50%;
right: auto;
width: var(--calculated-paper-radio-button-ink-size);
height: var(--calculated-paper-radio-button-ink-size);
color: var(--paper-radio-button-unchecked-ink-color, var(--primary-text-color));
opacity: 0.6;
pointer-events: none;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
#ink[checked] {
color: var(--paper-radio-button-checked-ink-color, var(--primary-color));
}
#offRadio, #onRadio {
position: absolute;
box-sizing: border-box;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 50%;
}
#offRadio {
border: 2px solid var(--paper-radio-button-unchecked-color, var(--primary-text-color));
background-color: var(--paper-radio-button-unchecked-background-color, transparent);
transition: border-color 0.28s;
}
#onRadio {
background-color: var(--paper-radio-button-checked-color, var(--primary-color));
-webkit-transform: scale(0);
transform: scale(0);
transition: -webkit-transform ease 0.28s;
transition: transform ease 0.28s;
will-change: transform;
}
:host([checked]) #offRadio {
border-color: var(--paper-radio-button-checked-color, var(--primary-color));
}
:host([checked]) #onRadio {
-webkit-transform: scale(0.5);
transform: scale(0.5);
}
#radioLabel {
line-height: normal;
position: relative;
display: inline-block;
vertical-align: middle;
margin-left: var(--paper-radio-button-label-spacing, 10px);
white-space: normal;
color: var(--paper-radio-button-label-color, var(--primary-text-color));
@apply --paper-radio-button-label;
}
:host([checked]) #radioLabel {
@apply --paper-radio-button-label-checked;
}
#radioLabel:dir(rtl) {
margin-left: 0;
margin-right: var(--paper-radio-button-label-spacing, 10px);
}
#radioLabel[hidden] {
display: none;
}
/* disabled state */
:host([disabled]) #offRadio {
border-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));
opacity: 0.5;
}
:host([disabled][checked]) #onRadio {
background-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));
opacity: 0.5;
}
:host([disabled]) #radioLabel {
/* slightly darker than the button, so that it's readable */
opacity: 0.65;
}
</style>
<div id="radioContainer">
<div id="offRadio"></div>
<div id="onRadio"></div>
</div>
<div id="radioLabel"><slot></slot></div>`;l.setAttribute("strip-whitespace",""),(0,r.k)({_template:l,is:"paper-radio-button",behaviors:[o.K],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){(0,n.T8)(this,(function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim()){var e=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),t=Math.floor(3*e);t%2!=e%2&&t++,this.updateStyles({"--paper-radio-button-ink-size":t+"px"})}}))}})},84281:(e,t,a)=>{"use strict";a(43437),a(8621),a(27662);var o=a(85753),r=a(11018),i=a(9672),n=a(50856);(0,i.k)({_template:n.d`
<style>
:host {
display: inline-block;
}
:host ::slotted(*) {
padding: var(--paper-radio-group-item-padding, 12px);
}
</style>
<slot></slot>
`,is:"paper-radio-group",behaviors:[o.E],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!t||!t.hasAttribute("disabled")){if(this.selected){var a=this._valueToItem(this.selected);if(this.selected==e){if(!this.allowEmptySelection)return void(a&&(a.checked=!0));e=""}a&&(a.checked=!1)}r.P.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){o.I._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){o.I._onRightKey.apply(this,arguments),this._activateFocusedItem()}})},1275:(e,t,a)=>{"use strict";a.d(t,{l:()=>i});var o=a(94707);const r=new WeakMap,i=(0,o.XM)(((e,t)=>a=>{const o=r.get(a);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every(((e,t)=>e===o[t])))return}else if(o===e&&(void 0!==e||r.has(a)))return;a.setValue(t()),r.set(a,Array.isArray(e)?Array.from(e):e)}))},4268:(e,t,a)=>{"use strict";function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach((function(t){o(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function n(e,t){if(null==e)return{};var a,o,r=function(e,t){if(null==e)return{};var a,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)a=i[o],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)a=i[o],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function l(e,t){return!0===e?[]:!1===e?[t.fail()]:e}a.d(t,{DD:()=>s,Yj:()=>b,IX:()=>v,hu:()=>p,O7:()=>f,Rx:()=>m,Ry:()=>g,jt:()=>k,Z_:()=>x,n_:()=>w,dt:()=>_,G0:()=>$});class c{constructor(e){const{type:t,schema:a,coercer:o=(e=>e),validator:r=(()=>[]),refiner:i=(()=>[])}=e;this.type=t,this.schema=a,this.coercer=o,this.validator=r,this.refiner=i}}class s extends TypeError{constructor(e,t){const{path:a,value:o,type:r,branch:i}=e,l=n(e,["path","value","type","branch"]);super(`Expected a value of type \`${r}\`${a.length?` for \`${a.join(".")}\``:""} but received \`${JSON.stringify(o)}\`.`),this.value=o,Object.assign(this,l),this.type=r,this.path=a,this.branch=i,this.failures=function*(){yield e,yield*t},this.stack=(new Error).stack,this.__proto__=s.prototype}}function p(e,t){const a=h(e,t);if(a[0])throw a[0]}function d(e,t){const a=t.coercer(e);return p(a,t),a}function h(e,t,a=!1){a&&(e=t.coercer(e));const o=u(e,t),[r]=o;if(r){return[new s(r,o),void 0]}return[void 0,e]}function*u(e,t,a=[],o=[]){const{type:r}=t,n={value:e,type:r,branch:o,path:a,fail:(t={})=>i({value:e,type:r,path:a,branch:[...o,e]},t),check:(e,t,r,i)=>u(e,t,void 0!==r?[...a,i]:a,void 0!==r?[...o,r]:o)},c=l(t.validator(e,n),n),[s]=c;s?(yield s,yield*c):yield*l(t.refiner(e,n),n)}function b(){return w("any",(()=>!0))}function v(e){return new c({type:`Array<${e?e.type:"unknown"}>`,schema:e,coercer:t=>e&&Array.isArray(t)?t.map((t=>d(t,e))):t,*validator(t,a){if(Array.isArray(t)){if(e)for(const[o,r]of t.entries())yield*a.check(r,e,t,o)}else yield a.fail()}})}function f(){return w("boolean",(e=>"boolean"==typeof e))}function y(){return w("never",(()=>!1))}function m(){return w("number",(e=>"number"==typeof e&&!isNaN(e)))}function g(e){const t=e?Object.keys(e):[],a=y();return new c({type:e?`Object<{${t.join(",")}}>`:"Object",schema:e||null,coercer:e?z(e):e=>e,*validator(o,r){if("object"==typeof o&&null!=o){if(e){const i=new Set(Object.keys(o));for(const a of t){i.delete(a);const t=e[a],n=o[a];yield*r.check(n,t,o,a)}for(const e of i){const t=o[e];yield*r.check(t,a,o,e)}}}else yield r.fail()}})}function k(e){return new c({type:e.type+"?",schema:e.schema,validator:(t,a)=>void 0===t||a.check(t,e)})}function x(){return w("string",(e=>"string"==typeof e))}function w(e,t){return new c({type:e,validator:t,schema:null})}function _(e){const t=Object.keys(e);return w(`Type<{${t.join(",")}}>`,(function*(a,o){if("object"==typeof a&&null!=a)for(const r of t){const t=e[r],i=a[r];yield*o.check(i,t,a,r)}else yield o.fail()}))}function $(e){return w(""+e.map((e=>e.type)).join(" | "),(function*(t,a){for(const o of e){const[...e]=a.check(t,o);if(0===e.length)return}yield a.fail()}))}function z(e){const t=Object.keys(e);return a=>{if("object"!=typeof a||null==a)return a;const o={},r=new Set(Object.keys(a));for(const i of t){r.delete(i);const t=e[i],n=a[i];o[i]=d(n,t)}for(const e of r)o[e]=a[e];return o}}}}]);
//# sourceMappingURL=chunk.b232991bc195ad48c931.js.map