diff --git a/README.md b/README.md index 652bede..1a3d321 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ -

Light Entity Card

-

Control any light/switch entity through lovelace

+# Light Entity Card +#### Control any light/switch entity through lovelace -

- -

+ -

Features

+[![GitHub Release][releases-shield]][releases] +[![License][license-shield]](LICENSE.md) + +![Project Maintenance][maintenance-shield] +[![GitHub Activity][commits-shield]][commits] + +## Features * Works on any light and switch based entity * Toggle on/off @@ -17,7 +21,7 @@ * use `effects_list` to add custom effects list or use `input_select` entity * always show or hide header and each input -

Track Updates

+## Track Updates This custom card can be tracked with the help of [custom-updater](https://github.com/custom-components/custom_updater). @@ -36,14 +40,14 @@ custom_updater: entity: light.downstairs ``` -

Options

+## Options | Name | Type | Requirement | `Default value` Description | ---- | ---- | ------- | ----------- | type | string | **Required** | `custom:light-entity-card` | entity | string | **Required** | The entity name of the light entity to control | group | boolean | **Optional** | `false` Compacts card -| colorWheel | boolean | **Optional** | `true` Show color-picker if entity has support +| color_wheel | boolean | **Optional** | `true` Show color-picker if entity has support | persist_features | boolean | **Optional** | `false` always show entity features | effects_list | list|string|boolean | **Optional** | custom list of effects, an input_select entity, or set false to always hide | header | boolean | string | **Optional** | custom header name or `false` to hide header @@ -53,7 +57,7 @@ custom_updater: | color_picker | boolean | **Optional** | `true` show color picker wheel if available -

Configuration

+## Configuration Download `light-entity-card.js` from the [latest release](https://github.com/ljmerza/light-entity-card/releases/latest/) and upload it your /www folder of your Home Assistant config directory. @@ -96,3 +100,15 @@ views: group: true persist_features: true ``` + +Enjoy my card? Help me out for a couple of :beers: or a :coffee:! + +[![coffee](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)](https://www.buymeacoffee.com/JMISm06AD) + + +[commits-shield]: https://img.shields.io/github/commit-activity/y/ljmerza/light-entity-card.svg?style=for-the-badge +[commits]: https://github.com/ljmerza/light-entity-card/commits/master +[license-shield]: https://img.shields.io/github/license/ljmerza/light-entity-card.svg?style=for-the-badge +[maintenance-shield]: https://img.shields.io/badge/maintainer-Leonardo%20Merza%20%40ljmerza-blue.svg?style=for-the-badge +[releases-shield]: https://img.shields.io/github/release/ljmerza/light-entity-card.svg?style=for-the-badge +[releases]: https://github.com/ljmerza/light-entity-card/releases \ No newline at end of file diff --git a/custom_updater.json b/custom_updater.json index f48e421..0ba40b4 100644 --- a/custom_updater.json +++ b/custom_updater.json @@ -1,7 +1,7 @@ { "light-entity-card": { - "updated_at": "2019-04-03", - "version": "2.3.1", + "updated_at": "2019-04-09", + "version": "2.4.0", "remote_location": "https://raw.githubusercontent.com/ljmerza/light-entity-card/master/light-entity-card.js", "visit_repo": "https://github.com/ljmerza/light-entity-card", "changelog": "https://github.com/ljmerza/light-entity-card/releases/latest" diff --git a/light-entity-card.js b/light-entity-card.js index 1b0e6d6..647a061 100644 --- a/light-entity-card.js +++ b/light-entity-card.js @@ -1,4 +1,153 @@ -!function(){"use strict";const t=new WeakMap,e=e=>"function"==typeof e&&t.has(e),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,i=(t,e,s=null)=>{let i=e;for(;i!==s;){const e=i.nextSibling;t.removeChild(i),i=e}},r={},n={},o=`{{lit-${String(Math.random()).slice(2)}}}`,a=`\x3c!--${o}--\x3e`,l=new RegExp(`${o}|${a}`),h="$lit$";class c{constructor(t,e){this.parts=[],this.element=e;let s=-1,i=0;const r=[],n=e=>{const a=e.content,c=document.createTreeWalker(a,133,null,!1);let d=0;for(;c.nextNode();){s++;const e=c.currentNode;if(1===e.nodeType){if(e.hasAttributes()){const r=e.attributes;let n=0;for(let t=0;t=0&&n++;for(;n-- >0;){const r=t.strings[i],n=u.exec(r)[2],o=n.toLowerCase()+h,a=e.getAttribute(o).split(l);this.parts.push({type:"attribute",index:s,name:n,strings:a}),e.removeAttribute(o),i+=a.length-1}}"TEMPLATE"===e.tagName&&n(e)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(o)>=0){const n=e.parentNode,o=t.split(l),a=o.length-1;for(let t=0;t-1!==t.index,p=()=>document.createComment(""),u=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class g{constructor(t,e,s){this._parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this._parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this._parts)void 0!==t&&t.commit()}_clone(){const t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;let i=0,r=0;const n=t=>{const s=document.createTreeWalker(t,133,null,!1);let o=s.nextNode();for(;inull===t||!("object"==typeof t||"function"==typeof t);class _{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;tthis.handleEvent(t))}setValue(t){this._pendingValue=t}commit(){for(;e(this._pendingValue);){const t=this._pendingValue;this._pendingValue=r,t(this)}if(this._pendingValue===r)return;const t=this._pendingValue,s=this.value,i=null==t||null!=s&&(t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive),n=null!=t&&(null==s||i);i&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),n&&(this._options=C(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=r}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const C=t=>t&&(x?{capture:t.capture,passive:t.passive,once:t.once}:t.capture);const N=new class{handleAttributeExpressions(t,e,s,i){const r=e[0];return"."===r?new w(t,e.slice(1),s).parts:"@"===r?[new P(t,e.slice(1),i.eventContext)]:"?"===r?[new S(t,e.slice(1),s)]:new _(t,e,s).parts}handleTextExpression(t){return new v(t)}};function E(t){let e=T.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},T.set(t.type,e));let s=e.stringsArray.get(t.strings);if(void 0!==s)return s;const i=t.strings.join(o);return void 0===(s=e.keyString.get(i))&&(s=new c(t,t.getTemplateElement()),e.keyString.set(i,s)),e.stringsArray.set(t.strings,s),s}const T=new Map,A=new WeakMap;(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");const k=(t,...e)=>new f(t,e,"html",N),V=133;function $(t,e){const{element:{content:s},parts:i}=t,r=document.createTreeWalker(s,V,null,!1);let n=R(i),o=i[n],a=-1,l=0;const h=[];let c=null;for(;r.nextNode();){a++;const t=r.currentNode;for(t.previousSibling===c&&(c=null),e.has(t)&&(h.push(t),null===c&&(c=t)),null!==c&&l++;void 0!==o&&o.index===a;)o.index=null!==c?-1:o.index-l,o=i[n=R(i,n)]}h.forEach(t=>t.parentNode.removeChild(t))}const O=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,V,null,!1);for(;s.nextNode();)e++;return e},R=(t,e=-1)=>{for(let s=e+1;s`${t}--${e}`;let M=!0;void 0===window.ShadyCSS?M=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected.Please update to at least @webcomponents/webcomponentsjs@2.0.2 and@webcomponents/shadycss@1.3.1."),M=!1);const j=t=>e=>{const s=U(e.type,t);let i=T.get(s);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},T.set(s,i));let r=i.stringsArray.get(e.strings);if(void 0!==r)return r;const n=e.strings.join(o);if(void 0===(r=i.keyString.get(n))){const s=e.getTemplateElement();M&&window.ShadyCSS.prepareTemplateDom(s,t),r=new c(e,s),i.keyString.set(n,r)}return i.stringsArray.set(e.strings,r),r},I=["html","svg"],L=new Set,z=(t,e,s)=>{L.add(s);const i=t.querySelectorAll("style");if(0===i.length)return void window.ShadyCSS.prepareTemplateStyles(e.element,s);const r=document.createElement("style");for(let t=0;t{I.forEach(e=>{const s=T.get(U(e,t));void 0!==s&&s.keyString.forEach(t=>{const{element:{content:e}}=t,s=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{s.add(t)}),$(t,s)})})})(s),function(t,e,s=null){const{element:{content:i},parts:r}=t;if(null==s)return void i.appendChild(e);const n=document.createTreeWalker(i,V,null,!1);let o=R(r),a=0,l=-1;for(;n.nextNode();)for(l++,n.currentNode===s&&(a=O(e),s.parentNode.insertBefore(e,s));-1!==o&&r[o].index===l;){if(a>0){for(;-1!==o;)r[o].index+=a,o=R(r,o);return}o=R(r,o)}}(e,r,e.element.content.firstChild),window.ShadyCSS.prepareTemplateStyles(e.element,s),window.ShadyCSS.nativeShadow){const s=e.element.content.querySelector("style");t.insertBefore(s.cloneNode(!0),t.firstChild)}else{e.element.content.insertBefore(r,e.element.content.firstChild);const t=new Set;t.add(r),$(e,t)}};window.JSCompiler_renameProperty=((t,e)=>t);const F={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},q=(t,e)=>e!==t&&(e==e||t==t),B={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:q},H=Promise.resolve(!0),W=1,J=4,D=8,G=16,K=32;class Q extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=H,this._hasConnectedResolver=void 0,this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,s)=>{const i=this._attributeNameForProperty(s,e);void 0!==i&&(this._attributeToPropertyMap.set(i,s),t.push(i))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=B){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const s="symbol"==typeof t?Symbol():`__${t}`;Object.defineProperty(this.prototype,t,{get(){return this[s]},set(e){const i=this[t];this[s]=e,this.requestUpdate(t,i)},configurable:!0,enumerable:!0})}static finalize(){if(this.hasOwnProperty(JSCompiler_renameProperty("finalized",this))&&this.finalized)return;const t=Object.getPrototypeOf(this);if("function"==typeof t.finalize&&t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const s of e)this.createProperty(s,t[s])}}static _attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,s=q){return s(t,e)}static _propertyValueFromAttribute(t,e){const s=e.type,i=e.converter||F,r="function"==typeof i?i:i.fromAttribute;return r?r(t,s):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const s=e.type,i=e.converter;return(i&&i.toAttribute||F.toAttribute)(t,s)}initialize(){this._saveInstanceProperties()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this._updateState=this._updateState|K,this._hasConnectedResolver?(this._hasConnectedResolver(),this._hasConnectedResolver=void 0):this.requestUpdate()}disconnectedCallback(){}attributeChangedCallback(t,e,s){e!==s&&this._attributeToProperty(t,s)}_propertyToAttribute(t,e,s=B){const i=this.constructor,r=i._attributeNameForProperty(t,s);if(void 0!==r){const t=i._propertyValueToAttribute(e,s);if(void 0===t)return;this._updateState=this._updateState|D,null==t?this.removeAttribute(r):this.setAttribute(r,t),this._updateState=this._updateState&~D}}_attributeToProperty(t,e){if(this._updateState&D)return;const s=this.constructor,i=s._attributeToPropertyMap.get(t);if(void 0!==i){const t=s._classProperties.get(i)||B;this._updateState=this._updateState|G,this[i]=s._propertyValueFromAttribute(e,t),this._updateState=this._updateState&~G}}requestUpdate(t,e){let s=!0;if(void 0!==t&&!this._changedProperties.has(t)){const i=this.constructor,r=i._classProperties.get(t)||B;i._valueHasChanged(this[t],e,r.hasChanged)?(this._changedProperties.set(t,e),!0!==r.reflect||this._updateState&G||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,r))):s=!1}return!this._hasRequestedUpdate&&s&&this._enqueueUpdate(),this.updateComplete}async _enqueueUpdate(){let t;this._updateState=this._updateState|J;const e=this._updatePromise;this._updatePromise=new Promise(e=>t=e),await e,this._hasConnected||await new Promise(t=>this._hasConnectedResolver=t);const s=this.performUpdate();null!=s&&"function"==typeof s.then&&await s,t(!this._hasRequestedUpdate)}get _hasConnected(){return this._updateState&K}get _hasRequestedUpdate(){return this._updateState&J}get hasUpdated(){return this._updateState&W}performUpdate(){if(this._instanceProperties&&this._applyInstanceProperties(),this.shouldUpdate(this._changedProperties)){const t=this._changedProperties;this.update(t),this._markUpdated(),this._updateState&W||(this._updateState=this._updateState|W,this.firstUpdated(t)),this.updated(t)}else this._markUpdated()}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~J}get updateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0)}updated(t){}firstUpdated(t){}}Q.finalized=!0;const X="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol();class Z{constructor(t,e){if(e!==Y)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(X?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}(window.litElementVersions||(window.litElementVersions=[])).push("2.0.1");const tt=t=>t.flat?t.flat(1/0):function t(e,s=[]){for(let i=0,r=e.length;i(t.add(e),t),new Set).forEach(t=>e.unshift(t))}else t&&e.push(t);return e}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?X?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){super.update(t);const e=this.render();e instanceof f&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){}}et.finalized=!0,et.render=((t,e,s)=>{const r=s.scopeName,n=A.has(e),o=e instanceof ShadowRoot&&M&&t instanceof f,a=o&&!L.has(r),l=a?document.createDocumentFragment():e;if(((t,e,s)=>{let r=A.get(e);void 0===r&&(i(e,e.firstChild),A.set(e,r=new v(Object.assign({templateFactory:E},s))),r.appendInto(e)),r.setValue(t),r.commit()})(t,l,Object.assign({templateFactory:j(r)},s)),a){const t=A.get(l);A.delete(l),t.value instanceof g&&z(l,t.value.template,r),i(e,e.firstChild),e.appendChild(l),A.set(e,t)}!n&&o&&window.ShadyCSS.styleElement(e.host)});const st=((t,...e)=>{const s=e.reduce((e,s,i)=>e+(t=>{if(t instanceof Z)return t.cssText;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[i+1],t[0]);return new Z(s,Y)})` +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/local/",n(n.s=307)}([function(t,e,n){var r=n(1),i=n(7),o=n(14),s=n(11),c=n(17),a=function(t,e,n){var u,f,l,h,p=t&a.F,d=t&a.G,v=t&a.S,g=t&a.P,y=t&a.B,m=d?r:v?r[e]||(r[e]={}):(r[e]||{}).prototype,_=d?i:i[e]||(i[e]={}),b=_.prototype||(_.prototype={});for(u in d&&(n=e),n)l=((f=!p&&m&&void 0!==m[u])?m:n)[u],h=y&&f?c(l,r):g&&"function"==typeof l?c(Function.call,l):l,m&&s(m,u,l,t&a.U),_[u]!=l&&o(_,u,h),g&&b[u]!=l&&(b[u]=l)};r.core=i,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(48)("wks"),i=n(29),o=n(1).Symbol,s="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(19),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(3),i=n(88),o=n(26),s=Object.defineProperty;e.f=n(9)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){t.exports=!n(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(24);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(1),i=n(14),o=n(13),s=n(29)("src"),c=n(125),a=(""+c).split("toString");n(7).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,s)||i(n,s,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||c.call(this)})},function(t,e,n){var r=n(0),i=n(2),o=n(24),s=/"/g,c=function(t,e,n,r){var i=String(o(t)),c="<"+e;return""!==n&&(c+=" "+n+'="'+String(r).replace(s,""")+'"'),c+">"+i+""};t.exports=function(t,e){var n={};n[t]=e(c),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(8),i=n(28);t.exports=n(9)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(44),i=n(24);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){var r=n(18);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(45),i=n(28),o=n(15),s=n(26),c=n(13),a=n(88),u=Object.getOwnPropertyDescriptor;e.f=n(9)?u:function(t,e){if(t=o(t),e=s(e,!0),a)try{return u(t,e)}catch(t){}if(c(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(0),i=n(7),o=n(2);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){var r=n(17),i=n(44),o=n(10),s=n(6),c=n(104);t.exports=function(t,e){var n=1==t,a=2==t,u=3==t,f=4==t,l=6==t,h=5==t||l,p=e||c;return function(e,c,d){for(var v,g,y=o(e),m=i(y),_=r(c,d,3),b=s(m.length),S=0,x=n?p(e,b):a?p(e,0):void 0;b>S;S++)if((h||S in m)&&(g=_(v=m[S],S,y),t))if(n)x[S]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return S;case 2:x.push(v)}else if(f)return!1;return l?-1:u||f?f:x}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";if(n(9)){var r=n(30),i=n(1),o=n(2),s=n(0),c=n(59),a=n(84),u=n(17),f=n(42),l=n(28),h=n(14),p=n(43),d=n(19),v=n(6),g=n(115),y=n(32),m=n(26),_=n(13),b=n(46),S=n(4),x=n(10),w=n(76),E=n(33),P=n(35),O=n(34).f,A=n(78),N=n(29),k=n(5),F=n(22),M=n(49),T=n(47),C=n(80),j=n(40),I=n(52),R=n(41),L=n(79),V=n(106),$=n(8),U=n(20),W=$.f,B=U.f,D=i.RangeError,G=i.TypeError,z=i.Uint8Array,q=Array.prototype,H=a.ArrayBuffer,J=a.DataView,Y=F(0),K=F(2),X=F(3),Z=F(4),Q=F(5),tt=F(6),et=M(!0),nt=M(!1),rt=C.values,it=C.keys,ot=C.entries,st=q.lastIndexOf,ct=q.reduce,at=q.reduceRight,ut=q.join,ft=q.sort,lt=q.slice,ht=q.toString,pt=q.toLocaleString,dt=k("iterator"),vt=k("toStringTag"),gt=N("typed_constructor"),yt=N("def_constructor"),mt=c.CONSTR,_t=c.TYPED,bt=c.VIEW,St=F(1,function(t,e){return Ot(T(t,t[yt]),e)}),xt=o(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),wt=!!z&&!!z.prototype.set&&o(function(){new z(1).set({})}),Et=function(t,e){var n=d(t);if(n<0||n%e)throw D("Wrong offset!");return n},Pt=function(t){if(S(t)&&_t in t)return t;throw G(t+" is not a typed array!")},Ot=function(t,e){if(!(S(t)&> in t))throw G("It is not a typed array constructor!");return new t(e)},At=function(t,e){return Nt(T(t,t[yt]),e)},Nt=function(t,e){for(var n=0,r=e.length,i=Ot(t,r);r>n;)i[n]=e[n++];return i},kt=function(t,e,n){W(t,e,{get:function(){return this._d[n]}})},Ft=function(t){var e,n,r,i,o,s,c=x(t),a=arguments.length,f=a>1?arguments[1]:void 0,l=void 0!==f,h=A(c);if(null!=h&&!w(h)){for(s=h.call(c),r=[],e=0;!(o=s.next()).done;e++)r.push(o.value);c=r}for(l&&a>2&&(f=u(f,arguments[2],2)),e=0,n=v(c.length),i=Ot(this,n);n>e;e++)i[e]=l?f(c[e],e):c[e];return i},Mt=function(){for(var t=0,e=arguments.length,n=Ot(this,e);e>t;)n[t]=arguments[t++];return n},Tt=!!z&&o(function(){pt.call(new z(1))}),Ct=function(){return pt.apply(Tt?lt.call(Pt(this)):Pt(this),arguments)},jt={copyWithin:function(t,e){return V.call(Pt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(Pt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Pt(this),arguments)},filter:function(t){return At(this,K(Pt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Pt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Y(Pt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Pt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(Pt(this),arguments)},lastIndexOf:function(t){return st.apply(Pt(this),arguments)},map:function(t){return St(Pt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(Pt(this),arguments)},reduceRight:function(t){return at.apply(Pt(this),arguments)},reverse:function(){for(var t,e=Pt(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Pt(this),t)},subarray:function(t,e){var n=Pt(this),r=n.length,i=y(t,r);return new(T(n,n[yt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?r:y(e,r))-i))}},It=function(t,e){return At(this,lt.call(Pt(this),t,e))},Rt=function(t){Pt(this);var e=Et(arguments[1],1),n=this.length,r=x(t),i=v(r.length),o=0;if(i+e>n)throw D("Wrong length!");for(;o255?255:255&r),i.v[p](n*e+i.o,r,xt)}(this,n,t)},enumerable:!0})};_?(d=n(function(t,n,r,i){f(t,d,u,"_d");var o,s,c,a,l=0,p=0;if(S(n)){if(!(n instanceof H||"ArrayBuffer"==(a=b(n))||"SharedArrayBuffer"==a))return _t in n?Nt(d,n):Ft.call(d,n);o=n,p=Et(r,e);var y=n.byteLength;if(void 0===i){if(y%e)throw D("Wrong length!");if((s=y-p)<0)throw D("Wrong length!")}else if((s=v(i)*e)+p>y)throw D("Wrong length!");c=s/e}else c=g(n),o=new H(s=c*e);for(h(t,"_d",{b:o,o:p,l:s,e:c,v:new J(o)});ldocument.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[o[r]];return a()};t.exports=Object.create||function(t,e){var n;return null!==t?(c.prototype=r(t),n=new c,c.prototype=null,n[s]=t):n=a(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(90),i=n(63).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(13),i=n(10),o=n(62)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var r=n(5)("unscopables"),i=Array.prototype;null==i[r]&&n(14)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){var r=n(8).f,i=n(13),o=n(5)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(0),i=n(24),o=n(2),s=n(66),c="["+s+"]",a=RegExp("^"+c+c+"*"),u=RegExp(c+c+"*$"),f=function(t,e,n){var i={},c=o(function(){return!!s[t]()||"​…"!="​…"[t]()}),a=i[t]=c?e(l):s[t];n&&(i[n]=a),r(r.P+r.F*c,"String",i)},l=f.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(u,"")),t};t.exports=f},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(1),i=n(8),o=n(9),s=n(5)("species");t.exports=function(t){var e=r[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(11);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(23);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(23),i=n(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(3),i=n(18),o=n(5)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[o])?e:i(n)}},function(t,e,n){var r=n(7),i=n(1),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(30)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(15),i=n(6),o=n(32);t.exports=function(t){return function(e,n,s){var c,a=r(e),u=i(a.length),f=o(s,u);if(t&&n!=n){for(;u>f;)if((c=a[f++])!=c)return!0}else for(;u>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(23);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(3);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(46),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(108);var r=n(11),i=n(14),o=n(2),s=n(24),c=n(5),a=n(81),u=c("species"),f=!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var h=c(t),p=!o(function(){var e={};return e[h]=function(){return 7},7!=""[t](e)}),d=p?!o(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[u]=function(){return n}),n[h](""),!e}):void 0;if(!p||!d||"replace"===t&&!f||"split"===t&&!l){var v=/./[h],g=n(s,h,""[t],function(t,e,n,r,i){return e.exec===a?p&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),y=g[0],m=g[1];r(String.prototype,t,y),i(RegExp.prototype,h,2==e?function(t,e){return m.call(t,this,e)}:function(t){return m.call(t,this)})}}},function(t,e,n){var r=n(17),i=n(103),o=n(76),s=n(3),c=n(6),a=n(78),u={},f={};(e=t.exports=function(t,e,n,l,h){var p,d,v,g,y=h?function(){return t}:a(t),m=r(n,l,e?2:1),_=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(p=c(t.length);p>_;_++)if((g=e?m(s(d=t[_])[0],d[1]):m(t[_]))===u||g===f)return g}else for(v=y.call(t);!(d=v.next()).done;)if((g=i(v,m,d.value,e))===u||g===f)return g}).BREAK=u,e.RETURN=f},function(t,e,n){var r=n(1).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(1),i=n(0),o=n(11),s=n(43),c=n(27),a=n(56),u=n(42),f=n(4),l=n(2),h=n(52),p=n(38),d=n(67);t.exports=function(t,e,n,v,g,y){var m=r[t],_=m,b=g?"set":"add",S=_&&_.prototype,x={},w=function(t){var e=S[t];o(S,t,"delete"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof _&&(y||S.forEach&&!l(function(){(new _).entries().next()}))){var E=new _,P=E[b](y?{}:-0,1)!=E,O=l(function(){E.has(1)}),A=h(function(t){new _(t)}),N=!y&&l(function(){for(var t=new _,e=5;e--;)t[b](e,e);return!t.has(-0)});A||((_=e(function(e,n){u(e,_,t);var r=d(new m,e,_);return null!=n&&a(n,g,r[b],r),r})).prototype=S,S.constructor=_),(O||N)&&(w("delete"),w("has"),g&&w("get")),(N||P)&&w(b),y&&S.clear&&delete S.clear}else _=v.getConstructor(e,t,g,b),s(_.prototype,n),c.NEED=!0;return p(_,t),x[t]=_,i(i.G+i.W+i.F*(_!=m),x),y||v.setStrong(_,t,g),_}},function(t,e,n){for(var r,i=n(1),o=n(14),s=n(29),c=s("typed_array"),a=s("view"),u=!(!i.ArrayBuffer||!i.DataView),f=u,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,c,!0),o(r.prototype,a,!0)):f=!1;t.exports={ABV:u,CONSTR:f,TYPED:c,VIEW:a}},function(t,e,n){var r=n(4),i=n(1).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){e.f=n(5)},function(t,e,n){var r=n(48)("keys"),i=n(29);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(4),i=n(3),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(17)(Function.call,n(20).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(4),i=n(65).set;t.exports=function(t,e,n){var o,s=e.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(19),i=n(24);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(19),i=n(24);t.exports=function(t){return function(e,n){var o,s,c=String(i(e)),a=r(n),u=c.length;return a<0||a>=u?t?"":void 0:(o=c.charCodeAt(a))<55296||o>56319||a+1===u||(s=c.charCodeAt(a+1))<56320||s>57343?t?c.charAt(a):o:t?c.slice(a,a+2):s-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(30),i=n(0),o=n(11),s=n(14),c=n(40),a=n(102),u=n(38),f=n(35),l=n(5)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,v,g,y){a(n,e,d);var m,_,b,S=function(t){if(!h&&t in P)return P[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",w="values"==v,E=!1,P=t.prototype,O=P[l]||P["@@iterator"]||v&&P[v],A=O||S(v),N=v?w?S("entries"):A:void 0,k="Array"==e&&P.entries||O;if(k&&(b=f(k.call(new t)))!==Object.prototype&&b.next&&(u(b,x,!0),r||"function"==typeof b[l]||s(b,l,p)),w&&O&&"values"!==O.name&&(E=!0,A=function(){return O.call(this)}),r&&!y||!h&&!E&&P[l]||s(P,l,A),c[e]=A,c[x]=p,v)if(m={values:w?A:S("values"),keys:g?A:S("keys"),entries:N},y)for(_ in m)_ in P||o(P,_,m[_]);else i(i.P+i.F*(h||E),e,m);return m}},function(t,e,n){var r=n(74),i=n(24);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(4),i=n(23),o=n(5)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(5)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(40),i=n(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(8),i=n(28);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(46),i=n(5)("iterator"),o=n(40);t.exports=n(7).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(10),i=n(32),o=n(6);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,c=i(s>1?arguments[1]:void 0,n),a=s>2?arguments[2]:void 0,u=void 0===a?n:i(a,n);u>c;)e[c++]=t;return e}},function(t,e,n){"use strict";var r=n(36),i=n(107),o=n(40),s=n(15);t.exports=n(72)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,i,o=n(53),s=RegExp.prototype.exec,c=String.prototype.replace,a=s,u=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(u||f)&&(a=function(t){var e,n,r,i,a=this;return f&&(n=new RegExp("^"+a.source+"$(?!\\s)",o.call(a))),u&&(e=a.lastIndex),r=s.call(a,t),u&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),f&&r&&r.length>1&&c.call(r[0],n,function(){for(i=1;in;)e.push(arguments[n++]);return y[++g]=function(){c("function"==typeof t?t:Function(t),e)},r(g),g},p=function(t){delete y[t]},"process"==n(23)(l)?r=function(t){l.nextTick(s(m,t,1))}:v&&v.now?r=function(t){v.now(s(m,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=_,r=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r="onreadystatechange"in u("script")?function(t){a.appendChild(u("script")).onreadystatechange=function(){a.removeChild(this),m.call(t)}}:function(t){setTimeout(s(m,t,1),0)}),t.exports={set:h,clear:p}},function(t,e,n){"use strict";var r=n(1),i=n(9),o=n(30),s=n(59),c=n(14),a=n(43),u=n(2),f=n(42),l=n(19),h=n(6),p=n(115),d=n(34).f,v=n(8).f,g=n(79),y=n(38),m="prototype",_="Wrong index!",b=r.ArrayBuffer,S=r.DataView,x=r.Math,w=r.RangeError,E=r.Infinity,P=b,O=x.abs,A=x.pow,N=x.floor,k=x.log,F=x.LN2,M=i?"_b":"buffer",T=i?"_l":"byteLength",C=i?"_o":"byteOffset";function j(t,e,n){var r,i,o,s=new Array(n),c=8*n-e-1,a=(1<>1,f=23===e?A(2,-24)-A(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===E?(i=t!=t?1:0,r=a):(r=N(k(t)/F),t*(o=A(2,-r))<1&&(r--,o*=2),(t+=r+u>=1?f/o:f*A(2,1-u))*o>=2&&(r++,o/=2),r+u>=a?(i=0,r=a):r+u>=1?(i=(t*o-1)*A(2,e),r+=u):(i=t*A(2,u-1)*A(2,e),r=0));e>=8;s[l++]=255&i,i/=256,e-=8);for(r=r<0;s[l++]=255&r,r/=256,c-=8);return s[--l]|=128*h,s}function I(t,e,n){var r,i=8*n-e-1,o=(1<>1,c=i-7,a=n-1,u=t[a--],f=127&u;for(u>>=7;c>0;f=256*f+t[a],a--,c-=8);for(r=f&(1<<-c)-1,f>>=-c,c+=e;c>0;r=256*r+t[a],a--,c-=8);if(0===f)f=1-s;else{if(f===o)return r?NaN:u?-E:E;r+=A(2,e),f-=s}return(u?-1:1)*r*A(2,f-e)}function R(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function L(t){return[255&t]}function V(t){return[255&t,t>>8&255]}function $(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function U(t){return j(t,52,8)}function W(t){return j(t,23,4)}function B(t,e,n){v(t[m],e,{get:function(){return this[n]}})}function D(t,e,n,r){var i=p(+n);if(i+e>t[T])throw w(_);var o=t[M]._b,s=i+t[C],c=o.slice(s,s+e);return r?c:c.reverse()}function G(t,e,n,r,i,o){var s=p(+n);if(s+e>t[T])throw w(_);for(var c=t[M]._b,a=s+t[C],u=r(+i),f=0;fJ;)(z=H[J++])in b||c(b,z,P[z]);o||(q.constructor=b)}var Y=new S(new b(2)),K=S[m].setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||a(S[m],{setInt8:function(t,e){K.call(this,t,e<<24>>24)},setUint8:function(t,e){K.call(this,t,e<<24>>24)}},!0)}else b=function(t){f(this,b,"ArrayBuffer");var e=p(t);this._b=g.call(new Array(e),0),this[T]=e},S=function(t,e,n){f(this,S,"DataView"),f(t,b,"DataView");var r=t[T],i=l(e);if(i<0||i>r)throw w("Wrong offset!");if(i+(n=void 0===n?r-i:h(n))>r)throw w("Wrong length!");this[M]=t,this[C]=i,this[T]=n},i&&(B(b,"byteLength","_l"),B(S,"buffer","_b"),B(S,"byteLength","_l"),B(S,"byteOffset","_o")),a(S[m],{getInt8:function(t){return D(this,1,t)[0]<<24>>24},getUint8:function(t){return D(this,1,t)[0]},getInt16:function(t){var e=D(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=D(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(D(this,4,t,arguments[1]))},getUint32:function(t){return R(D(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return I(D(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return I(D(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,L,e)},setUint8:function(t,e){G(this,1,t,L,e)},setInt16:function(t,e){G(this,2,t,V,e,arguments[2])},setUint16:function(t,e){G(this,2,t,V,e,arguments[2])},setInt32:function(t,e){G(this,4,t,$,e,arguments[2])},setUint32:function(t,e){G(this,4,t,$,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,W,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,U,e,arguments[2])}});y(b,"ArrayBuffer"),y(S,"DataView"),c(S[m],s.VIEW,!0),e.ArrayBuffer=b,e.DataView=S},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(120)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(9)&&!n(2)(function(){return 7!=Object.defineProperty(n(60)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(1),i=n(7),o=n(30),s=n(61),c=n(8).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:s.f(t)})}},function(t,e,n){var r=n(13),i=n(15),o=n(49)(!1),s=n(62)("IE_PROTO");t.exports=function(t,e){var n,c=i(t),a=0,u=[];for(n in c)n!=s&&r(c,n)&&u.push(n);for(;e.length>a;)r(c,n=e[a++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(8),i=n(3),o=n(31);t.exports=n(9)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),c=s.length,a=0;c>a;)r.f(t,n=s[a++],e[n]);return t}},function(t,e,n){var r=n(15),i=n(34).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(31),i=n(50),o=n(45),s=n(10),c=n(44),a=Object.assign;t.exports=!a||n(2)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=a({},t)[n]||Object.keys(a({},e)).join("")!=r})?function(t,e){for(var n=s(t),a=arguments.length,u=1,f=i.f,l=o.f;a>u;)for(var h,p=c(arguments[u++]),d=f?r(p).concat(f(p)):r(p),v=d.length,g=0;v>g;)l.call(p,h=d[g++])&&(n[h]=p[h]);return n}:a},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(18),i=n(4),o=n(96),s=[].slice,c={};t.exports=Function.bind||function(t){var e=r(this),n=s.call(arguments,1),a=function(){var r=n.concat(s.call(arguments));return this instanceof a?function(t,e,n){if(!(e in c)){for(var r=[],i=0;i>>0||(s.test(n)?16:10))}:r},function(t,e,n){var r=n(1).parseFloat,i=n(39).trim;t.exports=1/r(n(66)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(23);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var r=n(33),i=n(28),o=n(38),s={};n(14)(s,n(5)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(3);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(215);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(18),i=n(10),o=n(44),s=n(6);t.exports=function(t,e,n,c,a){r(e);var u=i(t),f=o(u),l=s(u.length),h=a?l-1:0,p=a?-1:1;if(n<2)for(;;){if(h in f){c=f[h],h+=p;break}if(h+=p,a?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;a?h>=0:l>h;h+=p)h in f&&(c=e(c,f[h],h,u));return c}},function(t,e,n){"use strict";var r=n(10),i=n(32),o=n(6);t.exports=[].copyWithin||function(t,e){var n=r(this),s=o(n.length),c=i(t,s),a=i(e,s),u=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===u?s:i(u,s))-a,s-c),l=1;for(a0;)a in n?n[c]=n[a]:delete n[c],c+=l,a+=l;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(81);n(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(9)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(53)})},function(t,e,n){"use strict";var r,i,o,s,c=n(30),a=n(1),u=n(17),f=n(46),l=n(0),h=n(4),p=n(18),d=n(42),v=n(56),g=n(47),y=n(83).set,m=n(235)(),_=n(111),b=n(236),S=n(57),x=n(112),w=a.TypeError,E=a.process,P=E&&E.versions,O=P&&P.v8||"",A=a.Promise,N="process"==f(E),k=function(){},F=i=_.f,M=!!function(){try{var t=A.resolve(1),e=(t.constructor={})[n(5)("species")]=function(t){t(k,k)};return(N||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof e&&0!==O.indexOf("6.6")&&-1===S.indexOf("Chrome/66")}catch(t){}}(),T=function(t){var e;return!(!h(t)||"function"!=typeof(e=t.then))&&e},C=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){for(var r=t._v,i=1==t._s,o=0,s=function(e){var n,o,s,c=i?e.ok:e.fail,a=e.resolve,u=e.reject,f=e.domain;try{c?(i||(2==t._h&&R(t),t._h=1),!0===c?n=r:(f&&f.enter(),n=c(r),f&&(f.exit(),s=!0)),n===e.promise?u(w("Promise-chain cycle")):(o=T(n))?o.call(n,a,u):a(n)):u(r)}catch(t){f&&!s&&f.exit(),u(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&j(t)})}},j=function(t){y.call(a,function(){var e,n,r,i=t._v,o=I(t);if(o&&(e=b(function(){N?E.emit("unhandledRejection",i,t):(n=a.onunhandledrejection)?n({promise:t,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=N||I(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},I=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){y.call(a,function(){var e;N?E.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),C(e,!0))},V=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=T(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,u(V,r,1),u(L,r,1))}catch(t){L.call(r,t)}}):(n._v=t,n._s=1,C(n,!1))}catch(t){L.call({_w:n,_d:!1},t)}}};M||(A=function(t){d(this,A,"Promise","_h"),p(t),r.call(this);try{t(u(V,this,1),u(L,this,1))}catch(t){L.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(43)(A.prototype,{then:function(t,e){var n=F(g(this,A));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=N?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&C(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(V,t,1),this.reject=u(L,t,1)},_.f=F=function(t){return t===A||t===s?new o(t):i(t)}),l(l.G+l.W+l.F*!M,{Promise:A}),n(38)(A,"Promise"),n(41)("Promise"),s=n(7).Promise,l(l.S+l.F*!M,"Promise",{reject:function(t){var e=F(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(c||!M),"Promise",{resolve:function(t){return x(c&&this===s?A:this,t)}}),l(l.S+l.F*!(M&&n(52)(function(t){A.all(t).catch(k)})),"Promise",{all:function(t){var e=this,n=F(e),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,s=1;v(t,!1,function(t){var c=o++,a=!1;n.push(void 0),s++,e.resolve(t).then(function(t){a||(a=!0,n[c]=t,--s||r(n))},i)}),--s||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=F(e),r=n.reject,i=b(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(18);function i(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){var r=n(3),i=n(4),o=n(111);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(8).f,i=n(33),o=n(43),s=n(17),c=n(42),a=n(56),u=n(72),f=n(107),l=n(41),h=n(9),p=n(27).fastKey,d=n(37),v=h?"_s":"size",g=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var f=t(function(t,r){c(t,f,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=r&&a(r,n,t[u],t)});return o(f.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=d(this,e),r=g(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[v]--}return!!r},forEach:function(t){d(this,e);for(var n,r=s(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(d(this,e),t)}}),h&&r(f.prototype,"size",{get:function(){return d(this,e)[v]}}),f},def:function(t,e,n){var r,i,o=g(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[v]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,e,n){u(t,e,function(t,n){this._t=d(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(43),i=n(27).getWeak,o=n(3),s=n(4),c=n(42),a=n(56),u=n(22),f=n(13),l=n(37),h=u(5),p=u(6),d=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return h(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var u=t(function(t,r){c(t,u,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=r&&a(r,n,t[o],t)});return r(u.prototype,{delete:function(t){if(!s(t))return!1;var n=i(t);return!0===n?v(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!s(t))return!1;var n=i(t);return!0===n?v(l(this,e)).has(t):n&&f(n,this._i)}}),u},def:function(t,e,n){var r=i(o(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},function(t,e,n){var r=n(19),i=n(6);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(34),i=n(50),o=n(3),s=n(1).Reflect;t.exports=s&&s.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(6),i=n(68),o=n(24);t.exports=function(t,e,n,s){var c=String(o(t)),a=c.length,u=void 0===n?" ":String(n),f=r(e);if(f<=a||""==u)return c;var l=f-a,h=i.call(u,Math.ceil(l/u.length));return h.length>l&&(h=h.slice(0,l)),s?h+c:c+h}},function(t,e,n){var r=n(31),i=n(15),o=n(45).f;t.exports=function(t){return function(e){for(var n,s=i(e),c=r(s),a=c.length,u=0,f=[];a>u;)o.call(s,n=c[u++])&&f.push(t?[n,s[n]]:s[n]);return f}}},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";function r(){const t=(e=n(294))&&e.__esModule?e:{default:e};var e;return r=function(){return t},t}n(122),r().default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),r().default._babelPolyfill=!0},function(t,e,n){"use strict";n(123),n(266),n(268),n(271),n(273),n(275),n(277),n(279),n(281),n(283),n(285),n(287),n(289),n(293)},function(t,e,n){n(124),n(127),n(128),n(129),n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(205),n(206),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(80),n(229),n(108),n(230),n(109),n(231),n(232),n(233),n(234),n(110),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),t.exports=n(7)},function(t,e,n){"use strict";var r=n(1),i=n(13),o=n(9),s=n(0),c=n(11),a=n(27).KEY,u=n(2),f=n(48),l=n(38),h=n(29),p=n(5),d=n(61),v=n(89),g=n(126),y=n(51),m=n(3),_=n(4),b=n(15),S=n(26),x=n(28),w=n(33),E=n(92),P=n(20),O=n(8),A=n(31),N=P.f,k=O.f,F=E.f,M=r.Symbol,T=r.JSON,C=T&&T.stringify,j=p("_hidden"),I=p("toPrimitive"),R={}.propertyIsEnumerable,L=f("symbol-registry"),V=f("symbols"),$=f("op-symbols"),U=Object.prototype,W="function"==typeof M,B=r.QObject,D=!B||!B.prototype||!B.prototype.findChild,G=o&&u(function(){return 7!=w(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=N(U,e);r&&delete U[e],k(t,e,n),r&&t!==U&&k(U,e,r)}:k,z=function(t){var e=V[t]=w(M.prototype);return e._k=t,e},q=W&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},H=function(t,e,n){return t===U&&H($,e,n),m(t),e=S(e,!0),m(n),i(V,e)?(n.enumerable?(i(t,j)&&t[j][e]&&(t[j][e]=!1),n=w(n,{enumerable:x(0,!1)})):(i(t,j)||k(t,j,x(1,{})),t[j][e]=!0),G(t,e,n)):k(t,e,n)},J=function(t,e){m(t);for(var n,r=g(e=b(e)),i=0,o=r.length;o>i;)H(t,n=r[i++],e[n]);return t},Y=function(t){var e=R.call(this,t=S(t,!0));return!(this===U&&i(V,t)&&!i($,t))&&(!(e||!i(this,t)||!i(V,t)||i(this,j)&&this[j][t])||e)},K=function(t,e){if(t=b(t),e=S(e,!0),t!==U||!i(V,e)||i($,e)){var n=N(t,e);return!n||!i(V,e)||i(t,j)&&t[j][e]||(n.enumerable=!0),n}},X=function(t){for(var e,n=F(b(t)),r=[],o=0;n.length>o;)i(V,e=n[o++])||e==j||e==a||r.push(e);return r},Z=function(t){for(var e,n=t===U,r=F(n?$:b(t)),o=[],s=0;r.length>s;)!i(V,e=r[s++])||n&&!i(U,e)||o.push(V[e]);return o};W||(c((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===U&&e.call($,n),i(this,j)&&i(this[j],t)&&(this[j][t]=!1),G(this,t,x(1,n))};return o&&D&&G(U,t,{configurable:!0,set:e}),z(t)}).prototype,"toString",function(){return this._k}),P.f=K,O.f=H,n(34).f=E.f=X,n(45).f=Y,n(50).f=Z,o&&!n(30)&&c(U,"propertyIsEnumerable",Y,!0),d.f=function(t){return z(p(t))}),s(s.G+s.W+s.F*!W,{Symbol:M});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Q.length>tt;)p(Q[tt++]);for(var et=A(p.store),nt=0;et.length>nt;)v(et[nt++]);s(s.S+s.F*!W,"Symbol",{for:function(t){return i(L,t+="")?L[t]:L[t]=M(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in L)if(L[e]===t)return e},useSetter:function(){D=!0},useSimple:function(){D=!1}}),s(s.S+s.F*!W,"Object",{create:function(t,e){return void 0===e?w(t):J(w(t),e)},defineProperty:H,defineProperties:J,getOwnPropertyDescriptor:K,getOwnPropertyNames:X,getOwnPropertySymbols:Z}),T&&s(s.S+s.F*(!W||u(function(){var t=M();return"[null]"!=C([t])||"{}"!=C({a:t})||"{}"!=C(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(_(e)||void 0!==t)&&!q(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!q(e))return e}),r[1]=e,C.apply(T,r)}}),M.prototype[I]||n(14)(M.prototype,I,M.prototype.valueOf),l(M,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(48)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(31),i=n(50),o=n(45);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,c=n(t),a=o.f,u=0;c.length>u;)a.call(t,s=c[u++])&&e.push(s);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(33)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(9),"Object",{defineProperty:n(8).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(9),"Object",{defineProperties:n(91)})},function(t,e,n){var r=n(15),i=n(20).f;n(21)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(10),i=n(35);n(21)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(10),i=n(31);n(21)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(21)("getOwnPropertyNames",function(){return n(92).f})},function(t,e,n){var r=n(4),i=n(27).onFreeze;n(21)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(4),i=n(27).onFreeze;n(21)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(4),i=n(27).onFreeze;n(21)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(4);n(21)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(4);n(21)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(4);n(21)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(93)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(94)})},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(65).set})},function(t,e,n){"use strict";var r=n(46),i={};i[n(5)("toStringTag")]="z",i+""!="[object z]"&&n(11)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(95)})},function(t,e,n){var r=n(8).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(9)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(4),i=n(35),o=n(5)("hasInstance"),s=Function.prototype;o in s||n(8).f(s,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),i=n(97);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(0),i=n(98);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(1),i=n(13),o=n(23),s=n(67),c=n(26),a=n(2),u=n(34).f,f=n(20).f,l=n(8).f,h=n(39).trim,p=r.Number,d=p,v=p.prototype,g="Number"==o(n(33)(v)),y="trim"in String.prototype,m=function(t){var e=c(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=y?e.trim():h(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var s,a=e.slice(2),u=0,f=a.length;ui)return NaN;return parseInt(a,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?a(function(){v.valueOf.call(n)}):"Number"!=o(n))?s(new d(m(e)),n,p):m(e)};for(var _,b=n(9)?u(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),S=0;b.length>S;S++)i(d,_=b[S])&&!i(p,_)&&l(p,_,f(d,_));p.prototype=v,v.constructor=p,n(11)(r,"Number",p)}},function(t,e,n){"use strict";var r=n(0),i=n(19),o=n(99),s=n(68),c=1..toFixed,a=Math.floor,u=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*u[n],u[n]=r%1e7,r=a(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=u[e],u[e]=a(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var n=String(u[t]);e=""===e?n:e+s.call("0",7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(2)(function(){c.call({})})),"Number",{toFixed:function(t){var e,n,r,c,a=o(this,f),u=i(t),v="",g="0";if(u<0||u>20)throw RangeError(f);if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return String(a);if(a<0&&(v="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*d(2,69,1))-69)<0?a*d(2,-e,1):a/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=u;r>=7;)l(1e7,0),r-=7;for(l(d(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<0?v+((c=g.length)<=u?"0."+s.call("0",u-c)+g:g.slice(0,c-u)+"."+g.slice(c-u)):v+g}})},function(t,e,n){"use strict";var r=n(0),i=n(2),o=n(99),s=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==s.call(1,void 0)})||!i(function(){s.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),i=n(1).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(100)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),i=n(100),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),i=n(98);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(0),i=n(97);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(0),i=n(101),o=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var r=n(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),i=n(69);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(0),i=n(70);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(169)})},function(t,e,n){var r=n(69),i=Math.pow,o=i(2,-52),s=i(2,-23),c=i(2,127)*(2-s),a=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),u=r(t);return ic||n!=n?u*(1/0):u*n}},function(t,e,n){var r=n(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,s=0,c=arguments.length,a=0;s0?(r=n/a)*r:n;return a===1/0?1/0:a*Math.sqrt(o)}})},function(t,e,n){var r=n(0),i=Math.imul;r(r.S+r.F*n(2)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(101)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(69)})},function(t,e,n){var r=n(0),i=n(70),o=Math.exp;r(r.S+r.F*n(2)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),i=n(70),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),i=n(32),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,s=0;r>s;){if(e=+arguments[s++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),i=n(15),o=n(6);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,s=[],c=0;n>c;)s.push(String(e[c++])),c=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),i=n(71)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(0),i=n(6),o=n(73),s="".endsWith;r(r.P+r.F*n(75)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),c=void 0===n?r:Math.min(i(n),r),a=String(t);return s?s.call(e,a,c):e.slice(c-a.length,c)===a}})},function(t,e,n){"use strict";var r=n(0),i=n(73);r(r.P+r.F*n(75)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(68)})},function(t,e,n){"use strict";var r=n(0),i=n(6),o=n(73),s="".startsWith;r(r.P+r.F*n(75)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(12)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(12)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(12)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(12)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(12)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(12)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(12)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(12)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(12)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(12)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(12)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(12)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(12)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),i=n(10),o=n(26);r(r.P+r.F*n(2)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),i=n(204);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(2),i=Date.prototype.getTime,o=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN))})?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(11)(r,"toString",function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"})},function(t,e,n){var r=n(5)("toPrimitive"),i=Date.prototype;r in i||n(14)(i,r,n(207))},function(t,e,n){"use strict";var r=n(3),i=n(26);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(51)})},function(t,e,n){"use strict";var r=n(17),i=n(0),o=n(10),s=n(103),c=n(76),a=n(6),u=n(77),f=n(78);i(i.S+i.F*!n(52)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,l,h=o(t),p="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,g=void 0!==v,y=0,m=f(h);if(g&&(v=r(v,d>2?arguments[2]:void 0,2)),null==m||p==Array&&c(m))for(n=new p(e=a(h.length));e>y;y++)u(n,y,g?v(h[y],y):h[y]);else for(l=m.call(h),n=new p;!(i=l.next()).done;y++)u(n,y,g?s(l,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){"use strict";var r=n(0),i=n(77);r(r.S+r.F*n(2)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),i=n(15),o=[].join;r(r.P+r.F*(n(44)!=Object||!n(16)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),i=n(64),o=n(23),s=n(32),c=n(6),a=[].slice;r(r.P+r.F*n(2)(function(){i&&a.call(i)}),"Array",{slice:function(t,e){var n=c(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return a.call(this,t,e);for(var i=s(t,n),u=s(e,n),f=c(u-i),l=new Array(f),h=0;h1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(106)}),n(36)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(79)}),n(36)("fill")},function(t,e,n){"use strict";var r=n(0),i=n(22)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(36)("find")},function(t,e,n){"use strict";var r=n(0),i=n(22)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),r(r.P+r.F*s,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(36)(o)},function(t,e,n){n(41)("Array")},function(t,e,n){var r=n(1),i=n(67),o=n(8).f,s=n(34).f,c=n(74),a=n(53),u=r.RegExp,f=u,l=u.prototype,h=/a/g,p=/a/g,d=new u(h)!==h;if(n(9)&&(!d||n(2)(function(){return p[n(5)("match")]=!1,u(h)!=h||u(p)==p||"/a/i"!=u(h,"i")}))){u=function(t,e){var n=this instanceof u,r=c(t),o=void 0===e;return!n&&r&&t.constructor===u&&o?t:i(d?new f(r&&!o?t.source:t,e):f((r=t instanceof u)?t.source:t,r&&o?a.call(t):e),n?this:l,u)};for(var v=function(t){t in u||o(u,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},g=s(f),y=0;g.length>y;)v(g[y++]);l.constructor=u,u.prototype=l,n(11)(r,"RegExp",u)}n(41)("RegExp")},function(t,e,n){"use strict";n(109);var r=n(3),i=n(53),o=n(9),s=/./.toString,c=function(t){n(11)(RegExp.prototype,"toString",t,!0)};n(2)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):"toString"!=s.name&&c(function(){return s.call(this)})},function(t,e,n){"use strict";var r=n(3),i=n(6),o=n(82),s=n(54);n(55)("match",1,function(t,e,n,c){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=c(n,t,this);if(e.done)return e.value;var a=r(t),u=String(this);if(!a.global)return s(a,u);var f=a.unicode;a.lastIndex=0;for(var l,h=[],p=0;null!==(l=s(a,u));){var d=String(l[0]);h[p]=d,""===d&&(a.lastIndex=o(u,i(a.lastIndex),f)),p++}return 0===p?null:h}]})},function(t,e,n){"use strict";var r=n(3),i=n(10),o=n(6),s=n(19),c=n(82),a=n(54),u=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(55)("replace",2,function(t,e,n,d){return[function(r,i){var o=t(this),s=null==r?void 0:r[e];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=d(n,t,this,e);if(i.done)return i.value;var l=r(t),h=String(this),p="function"==typeof e;p||(e=String(e));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var _=a(l,h);if(null===_)break;if(m.push(_),!g)break;""===String(_[0])&&(l.lastIndex=c(h,o(l.lastIndex),y))}for(var b,S="",x=0,w=0;w=x&&(S+=h.slice(x,P)+F,x=P+E.length)}return S+h.slice(x)}];function v(t,e,r,o,s,c){var a=r+t.length,u=o.length,f=p;return void 0!==s&&(s=i(s),f=h),n.call(c,f,function(n,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":c=s[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>u){var h=l(f/10);return 0===h?n:h<=u?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):n}c=o[f-1]}return void 0===c?"":c})}})},function(t,e,n){"use strict";var r=n(3),i=n(94),o=n(54);n(55)("search",1,function(t,e,n,s){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var c=r(t),a=String(this),u=c.lastIndex;i(u,0)||(c.lastIndex=0);var f=o(c,a);return i(c.lastIndex,u)||(c.lastIndex=u),null===f?-1:f.index}]})},function(t,e,n){"use strict";var r=n(74),i=n(3),o=n(47),s=n(82),c=n(6),a=n(54),u=n(81),f=n(2),l=Math.min,h=[].push,p=!f(function(){RegExp(4294967295,"y")});n(55)("split",2,function(t,e,n,f){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,s,c,a=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,p=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,f+"g");(o=u.call(d,i))&&!((s=d.lastIndex)>l&&(a.push(i.slice(l,o.index)),o.length>1&&o.index=p));)d.lastIndex===o.index&&d.lastIndex++;return l===i.length?!c&&d.test("")||a.push(""):a.push(i.slice(l)),a.length>p?a.slice(0,p):a}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):d.call(String(i),n,r)},function(t,e){var r=f(d,t,this,e,d!==n);if(r.done)return r.value;var u=i(t),h=String(this),v=o(u,RegExp),g=u.unicode,y=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(p?"y":"g"),m=new v(p?u:"^(?:"+u.source+")",y),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===h.length)return null===a(m,h)?[h]:[];for(var b=0,S=0,x=[];S0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(113),i=n(37);t.exports=n(58)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(1),o=n(22)(0),s=n(11),c=n(27),a=n(93),u=n(114),f=n(4),l=n(37),h=n(37),p=!i.ActiveXObject&&"ActiveXObject"in i,d=c.getWeak,v=Object.isExtensible,g=u.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var e=d(t);return!0===e?g(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(l(this,"WeakMap"),t,e)}},_=t.exports=n(58)("WeakMap",y,m,u,!0,!0);h&&p&&(a((r=u.getConstructor(y,"WeakMap")).prototype,m),c.NEED=!0,o(["delete","has","get","set"],function(t){var e=_.prototype,n=e[t];s(e,t,function(e,i){if(f(e)&&!v(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(114),i=n(37);n(58)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),i=n(59),o=n(84),s=n(3),c=n(32),a=n(6),u=n(4),f=n(1).ArrayBuffer,l=n(47),h=o.ArrayBuffer,p=o.DataView,d=i.ABV&&f.isView,v=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||u(t)&&g in t}}),r(r.P+r.U+r.F*n(2)(function(){return!new h(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(s(this),t);for(var n=s(this).byteLength,r=c(t,n),i=c(void 0===e?n:e,n),o=new(l(this,h))(a(i-r)),u=new p(this),f=new p(o),d=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(20),i=n(35),o=n(13),s=n(0),c=n(4),a=n(3);s(s.S,"Reflect",{get:function t(e,n){var s,u,f=arguments.length<3?e:arguments[2];return a(e)===f?e[n]:(s=r.f(e,n))?o(s,"value")?s.value:void 0!==s.get?s.get.call(f):void 0:c(u=i(e))?t(u,n,f):void 0}})},function(t,e,n){var r=n(20),i=n(0),o=n(3);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(0),i=n(35),o=n(3);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),i=n(3),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(116)})},function(t,e,n){var r=n(0),i=n(3),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(8),i=n(20),o=n(35),s=n(13),c=n(0),a=n(28),u=n(3),f=n(4);c(c.S,"Reflect",{set:function t(e,n,c){var l,h,p=arguments.length<4?e:arguments[3],d=i.f(u(e),n);if(!d){if(f(h=o(e)))return t(h,n,c,p);d=a(0)}if(s(d,"value")){if(!1===d.writable||!f(p))return!1;if(l=i.f(p,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=c,r.f(p,n,l)}else r.f(p,n,a(0,c));return!0}return void 0!==d.set&&(d.set.call(p,c),!0)}})},function(t,e,n){var r=n(0),i=n(65);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(267),t.exports=n(7).Array.includes},function(t,e,n){"use strict";var r=n(0),i=n(49)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(36)("includes")},function(t,e,n){n(269),t.exports=n(7).Array.flatMap},function(t,e,n){"use strict";var r=n(0),i=n(270),o=n(10),s=n(6),c=n(18),a=n(104);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return c(t),e=s(r.length),n=a(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(36)("flatMap")},function(t,e,n){"use strict";var r=n(51),i=n(4),o=n(6),s=n(17),c=n(5)("isConcatSpreadable");t.exports=function t(e,n,a,u,f,l,h,p){for(var d,v,g=f,y=0,m=!!h&&s(h,p,3);y0)g=t(e,n,d,o(d.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=d}g++}y++}return g}},function(t,e,n){n(272),t.exports=n(7).String.padStart},function(t,e,n){"use strict";var r=n(0),i=n(117),o=n(57),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*s,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(274),t.exports=n(7).String.padEnd},function(t,e,n){"use strict";var r=n(0),i=n(117),o=n(57),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*s,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(276),t.exports=n(7).String.trimLeft},function(t,e,n){"use strict";n(39)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){n(278),t.exports=n(7).String.trimRight},function(t,e,n){"use strict";n(39)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){n(280),t.exports=n(61).f("asyncIterator")},function(t,e,n){n(89)("asyncIterator")},function(t,e,n){n(282),t.exports=n(7).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(0),i=n(116),o=n(15),s=n(20),c=n(77);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),a=s.f,u=i(r),f={},l=0;u.length>l;)void 0!==(n=a(r,e=u[l++]))&&c(f,e,n);return f}})},function(t,e,n){n(284),t.exports=n(7).Object.values},function(t,e,n){var r=n(0),i=n(118)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){n(286),t.exports=n(7).Object.entries},function(t,e,n){var r=n(0),i=n(118)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";n(110),n(288),t.exports=n(7).Promise.finally},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(1),s=n(47),c=n(112);r(r.P+r.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return c(e,t()).then(function(){return n})}:t,n?function(n){return c(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){n(290),n(291),n(292),t.exports=n(7)},function(t,e,n){var r=n(1),i=n(0),o=n(57),s=[].slice,c=/MSIE .\./.test(o),a=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&s.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*c,{setTimeout:a(r.setTimeout),setInterval:a(r.setInterval)})},function(t,e,n){var r=n(0),i=n(83);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(80),i=n(31),o=n(11),s=n(1),c=n(14),a=n(40),u=n(5),f=u("iterator"),l=u("toStringTag"),h=a.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=i(p),v=0;v=0;--o){var s=this.tryEntries[o],c=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var a=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(a&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){n(295),t.exports=n(119).global},function(t,e,n){var r=n(296);r(r.G,{global:n(85)})},function(t,e,n){var r=n(85),i=n(119),o=n(297),s=n(299),c=n(306),a=function(t,e,n){var u,f,l,h=t&a.F,p=t&a.G,d=t&a.S,v=t&a.P,g=t&a.B,y=t&a.W,m=p?i:i[e]||(i[e]={}),_=m.prototype,b=p?r:d?r[e]:(r[e]||{}).prototype;for(u in p&&(n=e),n)(f=!h&&b&&void 0!==b[u])&&c(m,u)||(l=f?b[u]:n[u],m[u]=p&&"function"!=typeof b[u]?n[u]:g&&f?o(l,r):y&&b[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((m.virtual||(m.virtual={}))[u]=l,t&a.R&&_&&!_[u]&&s(_,u,l)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){var r=n(298);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(300),i=n(305);t.exports=n(87)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(301),i=n(302),o=n(304),s=Object.defineProperty;e.f=n(87)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(86);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(87)&&!n(120)(function(){return 7!=Object.defineProperty(n(303)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(86),i=n(85).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(86);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";n.r(e);n(121); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */const r=new WeakMap,i=t=>"function"==typeof t&&r.has(t),o=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,s=(t,e,n=null)=>{let r=e;for(;r!==n;){const e=r.nextSibling;t.removeChild(r),r=e}},c={},a={},u=`{{lit-${String(Math.random()).slice(2)}}}`,f=`\x3c!--${u}--\x3e`,l=new RegExp(`${u}|${f}`),h="$lit$";class p{constructor(t,e){this.parts=[],this.element=e;let n=-1,r=0;const i=[],o=e=>{const s=e.content,c=document.createTreeWalker(s,133,null,!1);let a=0;for(;c.nextNode();){n++;const e=c.currentNode;if(1===e.nodeType){if(e.hasAttributes()){const i=e.attributes;let o=0;for(let t=0;t=0&&o++;for(;o-- >0;){const i=t.strings[r],o=g.exec(i)[2],s=o.toLowerCase()+h,c=e.getAttribute(s).split(l);this.parts.push({type:"attribute",index:n,name:o,strings:c}),e.removeAttribute(s),r+=c.length-1}}"TEMPLATE"===e.tagName&&o(e)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(u)>=0){const o=e.parentNode,s=t.split(l),c=s.length-1;for(let t=0;t-1!==t.index,v=()=>document.createComment(""),g=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/; +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +class y{constructor(t,e,n){this._parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this._parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this._parts)void 0!==t&&t.commit()}_clone(){const t=o?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;let n=0,r=0;const i=t=>{const o=document.createTreeWalker(t,133,null,!1);let s=o.nextNode();for(;nnull===t||!("object"==typeof t||"function"==typeof t);class b{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;tthis.handleEvent(t))}setValue(t){this._pendingValue=t}commit(){for(;i(this._pendingValue);){const t=this._pendingValue;this._pendingValue=c,t(this)}if(this._pendingValue===c)return;const t=this._pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),r=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),r&&(this._options=N(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=c}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const N=t=>t&&(O?{capture:t.capture,passive:t.passive,once:t.once}:t.capture); +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */const k=new class{handleAttributeExpressions(t,e,n,r){const i=e[0];return"."===i?new E(t,e.slice(1),n).parts:"@"===i?[new A(t,e.slice(1),r.eventContext)]:"?"===i?[new w(t,e.slice(1),n)]:new b(t,e,n).parts}handleTextExpression(t){return new x(t)}}; +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */function F(t){let e=M.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},M.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const r=t.strings.join(u);return void 0===(n=e.keyString.get(r))&&(n=new p(t,t.getTemplateElement()),e.keyString.set(r,n)),e.stringsArray.set(t.strings,n),n}const M=new Map,T=new WeakMap; +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");const C=(t,...e)=>new m(t,e,"html",k),j=133;function I(t,e){const{element:{content:n},parts:r}=t,i=document.createTreeWalker(n,j,null,!1);let o=L(r),s=r[o],c=-1,a=0;const u=[];let f=null;for(;i.nextNode();){c++;const t=i.currentNode;for(t.previousSibling===f&&(f=null),e.has(t)&&(u.push(t),null===f&&(f=t)),null!==f&&a++;void 0!==s&&s.index===c;)s.index=null!==f?-1:s.index-a,s=r[o=L(r,o)]}u.forEach(t=>t.parentNode.removeChild(t))}const R=t=>{let e=11===t.nodeType?0:1;const n=document.createTreeWalker(t,j,null,!1);for(;n.nextNode();)e++;return e},L=(t,e=-1)=>{for(let n=e+1;n`${t}--${e}`;let $=!0;void 0===window.ShadyCSS?$=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected.Please update to at least @webcomponents/webcomponentsjs@2.0.2 and@webcomponents/shadycss@1.3.1."),$=!1);const U=t=>e=>{const n=V(e.type,t);let r=M.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},M.set(n,r));let i=r.stringsArray.get(e.strings);if(void 0!==i)return i;const o=e.strings.join(u);if(void 0===(i=r.keyString.get(o))){const n=e.getTemplateElement();$&&window.ShadyCSS.prepareTemplateDom(n,t),i=new p(e,n),r.keyString.set(o,i)}return r.stringsArray.set(e.strings,i),i},W=["html","svg"],B=new Set,D=(t,e,n)=>{B.add(n);const r=t.querySelectorAll("style");if(0===r.length)return void window.ShadyCSS.prepareTemplateStyles(e.element,n);const i=document.createElement("style");for(let t=0;t{W.forEach(e=>{const n=M.get(V(e,t));void 0!==n&&n.keyString.forEach(t=>{const{element:{content:e}}=t,n=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{n.add(t)}),I(t,n)})})})(n),function(t,e,n=null){const{element:{content:r},parts:i}=t;if(null==n)return void r.appendChild(e);const o=document.createTreeWalker(r,j,null,!1);let s=L(i),c=0,a=-1;for(;o.nextNode();)for(a++,o.currentNode===n&&(c=R(e),n.parentNode.insertBefore(e,n));-1!==s&&i[s].index===a;){if(c>0){for(;-1!==s;)i[s].index+=c,s=L(i,s);return}s=L(i,s)}}(e,i,e.element.content.firstChild),window.ShadyCSS.prepareTemplateStyles(e.element,n),window.ShadyCSS.nativeShadow){const n=e.element.content.querySelector("style");t.insertBefore(n.cloneNode(!0),t.firstChild)}else{e.element.content.insertBefore(i,e.element.content.firstChild);const t=new Set;t.add(i),I(e,t)}}; +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +window.JSCompiler_renameProperty=((t,e)=>t);const G={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},z=(t,e)=>e!==t&&(e==e||t==t),q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:z},H=Promise.resolve(!0),J=1,Y=4,K=8,X=16,Z=32;class Q extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=H,this._hasConnectedResolver=void 0,this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,n)=>{const r=this._attributeNameForProperty(n,e);void 0!==r&&(this._attributeToPropertyMap.set(r,n),t.push(r))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=q){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const n="symbol"==typeof t?Symbol():`__${t}`;Object.defineProperty(this.prototype,t,{get(){return this[n]},set(e){const r=this[t];this[n]=e,this.requestUpdate(t,r)},configurable:!0,enumerable:!0})}static finalize(){if(this.hasOwnProperty(JSCompiler_renameProperty("finalized",this))&&this.finalized)return;const t=Object.getPrototypeOf(this);if("function"==typeof t.finalize&&t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const n of e)this.createProperty(n,t[n])}}static _attributeNameForProperty(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,n=z){return n(t,e)}static _propertyValueFromAttribute(t,e){const n=e.type,r=e.converter||G,i="function"==typeof r?r:r.fromAttribute;return i?i(t,n):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const n=e.type,r=e.converter;return(r&&r.toAttribute||G.toAttribute)(t,n)}initialize(){this._saveInstanceProperties()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this._updateState=this._updateState|Z,this._hasConnectedResolver?(this._hasConnectedResolver(),this._hasConnectedResolver=void 0):this.requestUpdate()}disconnectedCallback(){}attributeChangedCallback(t,e,n){e!==n&&this._attributeToProperty(t,n)}_propertyToAttribute(t,e,n=q){const r=this.constructor,i=r._attributeNameForProperty(t,n);if(void 0!==i){const t=r._propertyValueToAttribute(e,n);if(void 0===t)return;this._updateState=this._updateState|K,null==t?this.removeAttribute(i):this.setAttribute(i,t),this._updateState=this._updateState&~K}}_attributeToProperty(t,e){if(this._updateState&K)return;const n=this.constructor,r=n._attributeToPropertyMap.get(t);if(void 0!==r){const t=n._classProperties.get(r)||q;this._updateState=this._updateState|X,this[r]=n._propertyValueFromAttribute(e,t),this._updateState=this._updateState&~X}}requestUpdate(t,e){let n=!0;if(void 0!==t&&!this._changedProperties.has(t)){const r=this.constructor,i=r._classProperties.get(t)||q;r._valueHasChanged(this[t],e,i.hasChanged)?(this._changedProperties.set(t,e),!0!==i.reflect||this._updateState&X||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,i))):n=!1}return!this._hasRequestedUpdate&&n&&this._enqueueUpdate(),this.updateComplete}async _enqueueUpdate(){let t;this._updateState=this._updateState|Y;const e=this._updatePromise;this._updatePromise=new Promise(e=>t=e),await e,this._hasConnected||await new Promise(t=>this._hasConnectedResolver=t);const n=this.performUpdate();null!=n&&"function"==typeof n.then&&await n,t(!this._hasRequestedUpdate)}get _hasConnected(){return this._updateState&Z}get _hasRequestedUpdate(){return this._updateState&Y}get hasUpdated(){return this._updateState&J}performUpdate(){if(this._instanceProperties&&this._applyInstanceProperties(),this.shouldUpdate(this._changedProperties)){const t=this._changedProperties;this.update(t),this._markUpdated(),this._updateState&J||(this._updateState=this._updateState|J,this.firstUpdated(t)),this.updated(t)}else this._markUpdated()}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Y}get updateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0)}updated(t){}firstUpdated(t){}}Q.finalized=!0;nt((t,e)=>t.querySelector(e)),nt((t,e)=>t.querySelectorAll(e));const tt=(t,e,n)=>{Object.defineProperty(e,n,t)},et=(t,e)=>({kind:"method",placement:"prototype",key:e.key,descriptor:t});function nt(t){return e=>(n,r)=>{const i={get(){return t(this.renderRoot,e)},enumerable:!0,configurable:!0};return void 0!==r?tt(i,n,r):et(i,n)}}const rt="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol();class ot{constructor(t,e){if(e!==it)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(rt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const st=(t,...e)=>{const n=e.reduce((e,n,r)=>e+(t=>{if(t instanceof ot)return t.cssText;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+t[r+1],t[0]);return new ot(n,it)}; +/** + * @license + * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at + * http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at + * http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at + * http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at + * http://polymer.github.io/PATENTS.txt + */ +(window.litElementVersions||(window.litElementVersions=[])).push("2.0.1");const ct=t=>t.flat?t.flat(1/0):function t(e,n=[]){for(let r=0,i=e.length;r(t.add(e),t),new Set).forEach(t=>e.unshift(t))}else t&&e.push(t);return e}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?rt?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){super.update(t);const e=this.render();e instanceof m&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){}}at.finalized=!0,at.render=((t,e,n)=>{const r=n.scopeName,i=T.has(e),o=e instanceof ShadowRoot&&$&&t instanceof m,c=o&&!B.has(r),a=c?document.createDocumentFragment():e;if(((t,e,n)=>{let r=T.get(e);void 0===r&&(s(e,e.firstChild),T.set(e,r=new x(Object.assign({templateFactory:F},n))),r.appendInto(e)),r.setValue(t),r.commit()})(t,a,Object.assign({templateFactory:U(r)},n)),c){const t=T.get(a);T.delete(a),t.value instanceof y&&D(a,t.value.template,r),s(e,e.firstChild),e.appendChild(a),T.set(e,t)}!i&&o&&window.ShadyCSS.styleElement(e.host)});var ut=st` .light-entity-card { padding: 16px; } @@ -64,11 +213,119 @@ justify-content:center; cursor: pointer; } -`;class it extends et{static get properties(){return{hass:Object,config:Object}}static get featureNames(){return{brightness:1,colorTemp:2,effectList:4,color:16,whiteValue:128}}static get cmdToggle(){return{on:"turn_on",off:"turn_off"}}static get entityLength(){return{light:10,switch:1}}constructor(){super()}getCardSize(){if(!this.config||!this.__hass||!this.__hass.states[this.config.entity])return 1;let t=0;const e=this.__hass.states[this.config.entity];return Array.isArray(e.attributes.entity_id)?e.attributes.entity_id.forEach(e=>t+=this.getEntityLength(e)):t+=this.getEntityLength(e.attributes.entity_id),this.config.group&&(t*=.8),parseInt(t,1)}getEntityLength(t){return/^light\./.test(t)?it.entityLength.light:/^switch\./.test(t)?it.entityLength.switch:0}get styles(){return st}get language(){return this.__hass.resources[this.__hass.language]}isEntityOn(t){return"on"===t.state}updated(){this._isUpdating=!1,this._shownStateObjects.forEach(t=>{const e=this.generateColorPickerId(t),s=this.shadowRoot.querySelectorAll(`#${e}`);if(s.length){const e=t.attributes.hs_color&&t.attributes.hs_color[0]||0,i=t.attributes.hs_color&&t.attributes.hs_color[1]/100||0;s[0].desiredHsColor={h:e,s:i}}})}setConfig(t){if(!t.entity)throw Error("entity required.");this.config={group:!1,persist_features:!1,brightness:!0,color_temp:!0,white_value:!0,color_picker:!0,...t}}render(){const t=this.__hass.states[this.config.entity];if(!t)throw Error(`Invalid entity: ${this.config.entity}`);return this._isUpdating=!0,this._shownStateObjects=this.getEntitiesToShow(t),this._shownStateObjects.reduce((t,e)=>k` +`,ft={group:!1,color_wheel:!0,persist_features:!1,brightness:!0,color_temp:!0,white_value:!0,color_picker:!0};var lt=st` + .entities { + padding-top: 10px; + padding-bottom: 10px; + } + + .entities paper-checkbox { + display: block; + margin-bottom: 10px; + margin-left: 10px; + } + + .checkbox-options { + display: flex; + justify-content: space-between; + } + + .checkbox-options paper-checkbox { + margin-top: 10px; + } + + .overall-config { + margin-bottom: 10px; + } +`;const ht=(t,e,n={},r={})=>{const i=new Event(e,{bubbles:void 0===r.bubbles||r.bubbles,cancelable:Boolean(r.cancelable),composed:void 0===r.composed||r.composed});return i.detail=n,t.dispatchEvent(i),i};const pt="light-entity-card-editor";customElements.define(pt,class extends at{static get styles(){return lt}static get properties(){return{hass:{},_config:{}}}setConfig(t){this._config={...ft,...t}}get entityOptions(){return Object.keys(this.hass.states).filter(t=>["switch","light","group"].includes(t.substr(0,t.indexOf("."))))}firstUpdated(){this._firstRendered=!0}render(){return this.hass?C` +
+ +
+ +
+ +
+ + + ${this.entityOptions.map(t=>C`${t}`)} + + + +
+ +
+
+ Show Color Wheel + Group Entities +
+ +
+ Persist Features + Show Brightness +
+ +
+ Show Color Temp + Show White Value +
+ +
+ Show Color Picker + Show Effects List +
+
+ +
+ + `:C``}_valueChanged(t){if(console.log({ev:t}),!this._config||!this.hass||!this._firstRendered)return;const{target:{configValue:e,value:n},detail:{value:r}}=t;this._config=void 0!==r||null!==r?{...this._config,[e]:r}:{...this._config,[e]:n},console.log(this._config),ht(this,"config-changed",{config:this._config})}});class dt extends at{static get properties(){return{hass:Object,config:Object}}setConfig(t){if(!t.entity)throw Error("entity required.");this.config={...ft,...t}}static async getConfigElement(){return document.createElement(pt)}static get featureNames(){return{brightness:1,colorTemp:2,effectList:4,color:16,whiteValue:128}}static get cmdToggle(){return{on:"turn_on",off:"turn_off"}}static get entityLength(){return{light:10,switch:1}}getCardSize(){if(!this.config||!this.__hass||!this.__hass.states[this.config.entity])return 1;let t=0;const e=this.__hass.states[this.config.entity];return Array.isArray(e.attributes.entity_id)?e.attributes.entity_id.forEach(e=>t+=this.getEntityLength(e)):t+=this.getEntityLength(e.attributes.entity_id),this.config.group&&(t*=.8),parseInt(t,1)}getEntityLength(t){return/^light\./.test(t)?dt.entityLength.light:/^switch\./.test(t)?dt.entityLength.switch:0}get styles(){return ut}get language(){return this.__hass.resources[this.__hass.language]}isEntityOn(t){return"on"===t.state}updated(){this._isUpdating=!1,this._shownStateObjects.forEach(t=>{const e=this.generateColorPickerId(t),n=this.shadowRoot.querySelectorAll(`#${e}`);if(n.length){const e=t.attributes.hs_color&&t.attributes.hs_color[0]||0,r=t.attributes.hs_color&&t.attributes.hs_color[1]/100||0;n[0].desiredHsColor={h:e,s:r}}})}render(){const t=this.__hass.states[this.config.entity];if(!t)throw Error(`Invalid entity: ${this.config.entity}`);return this._isUpdating=!0,this._shownStateObjects=this.getEntitiesToShow(t),this._shownStateObjects.reduce((t,e)=>C` ${t} ${this.createCard(e)} - `,k``)}getEntitiesToShow(t){return t.attributes.entity_id&&Array.isArray(t.attributes.entity_id)?t.attributes.entity_id.map(t=>this.__hass.states[t]).filter(Boolean):[t]}createCard(t){return k` - + `,C``)}getEntitiesToShow(t){return t.attributes.entity_id&&Array.isArray(t.attributes.entity_id)?t.attributes.entity_id.map(t=>this.__hass.states[t]).filter(Boolean):[t]}createCard(t){return C` + ${this.createHeader(t)}
${this.createBrightnessSlider(t)} @@ -78,7 +335,7 @@ ${this.createColorPicker(t)} ${this.createEffectList(t)} - `}createHeader(t){if(!1===this.config.header)return k``;const e=this.config.header||t.attributes.friendly_name||t.entity_id;return k` + `}createHeader(t){if(!1===this.config.header)return C``;const e=this.config.header||t.attributes.friendly_name||t.entity_id;return C`
${e}
@@ -86,54 +343,38 @@
- `}createBrightnessSlider(t){return!1===this.config.brightness?k``:this.dontShowFeature("brightness",t)?k``:k` + `}createBrightnessSlider(t){return!1===this.config.brightness?C``:this.dontShowFeature("brightness",t)?C``:C`
- +
- `}createColorTemperature(t){return!1===this.config.color_temp?k``:this.dontShowFeature("colorTemp",t)?k``:k` + `}createColorTemperature(t){return!1===this.config.color_temp?C``:this.dontShowFeature("colorTemp",t)?C``:C`
- + +
- `}createWhiteValue(t){return!1===this.config.white_value?k``:this.dontShowFeature("whiteValue",t)?k``:k` + `}createWhiteValue(t){return!1===this.config.white_value?C``:this.dontShowFeature("whiteValue",t)?C``:C`
- + +
- `}createEffectList(t){if(!1===this.config.effects_list)return k``;if(!this.config.persist_features&&!this.isEntityOn(t))return k``;let e=t.attributes.effect_list||[];if(this.config.effects_list&&Array.isArray(this.config.effects_list))e=this.config.effects_list;else if(this.config.effects_list&&this.hass.states[this.config.effects_list]){const t=this.hass.states[this.config.effects_list];e=t.attributes&&t.attributes.options||[]}else if(this.dontShowFeature("effectList",t))return k``;const s=e.map(t=>k`${t}`),i=e.indexOf(t.attributes.effect),r=this.language["ui.card.light.effect"];return k` + `}createEffectList(t){if(!1===this.config.effects_list)return C``;if(!this.config.persist_features&&!this.isEntityOn(t))return C``;let e=t.attributes.effect_list||[];if(this.config.effects_list&&Array.isArray(this.config.effects_list))e=this.config.effects_list;else if(this.config.effects_list&&this.hass.states[this.config.effects_list]){const t=this.hass.states[this.config.effects_list];e=t.attributes&&t.attributes.options||[]}else if(this.dontShowFeature("effectList",t))return C``;const n=e.map(t=>C`${t}`),r=e.indexOf(t.attributes.effect),i=this.language["ui.card.light.effect"];return C`
- this.setEffect(e,t)} label="${r}"> - - ${s} + this.setEffect(e,t)} label="${i}"> + + ${n}
- `}createColorPicker(t){return!1===this.config.color_picker?k``:this.dontShowFeature("color",t)?k``:k` + `}createColorPicker(t){return!1===this.config.color_picker?C``:this.dontShowFeature("color",t)?C``:C`
- this.setColorPicker(e,t)} - > + this.setColorPicker(e,t)} + >
- `}dontShowFeature(t,e){return!(it.featureNames[t]&e.attributes.supported_features)||(!this.config.persist_features&&!this.isEntityOn(e)||void 0)}generateColorPickerId(t){return`light-entity-card-${t.entity_id.replace(".","-")}`}setColorPicker(t,e){this.callEntityService({hs_color:[t.detail.hs.h,100*t.detail.hs.s]},e)}setBrightness(t,e){const s=parseInt(t.target.value,0);isNaN(s)||parseInt(e.attributes.brightness,0)===s||this.callEntityService({brightness:s},e)}setColorTemp(t,e){const s=parseInt(t.target.value,0);isNaN(s)||parseInt(e.attributes.color_temp,0)===s||this.callEntityService({color_temp:s},e)}setWhiteValue(t,e){const s=parseInt(t.target.value,0);isNaN(s)||parseInt(e.attributes.white_value,0)===s||this.callEntityService({white_value:s},e)}setToggle(t,e){const s=this.isEntityOn(e)?it.cmdToggle.off:it.cmdToggle.on;this.callEntityService({},e,s)}setEffect(t,e){this.callEntityService({effect:t.detail.value},e)}callEntityService(t,e,s){if(this._isUpdating)return;const i=e.entity_id.split(".")[0];this.hass.callService(i,s||it.cmdToggle.on,{entity_id:e.entity_id,...t})}}customElements.define("light-entity-card",it)}(); + `}dontShowFeature(t,e){return!(dt.featureNames[t]&e.attributes.supported_features)||(!this.config.persist_features&&!this.isEntityOn(e)||void 0)}generateColorPickerId(t){return`light-entity-card-${t.entity_id.replace(".","-")}`}setColorPicker(t,e){this.callEntityService({hs_color:[t.detail.hs.h,100*t.detail.hs.s]},e)}setBrightness(t,e){const n=parseInt(t.target.value,0);isNaN(n)||parseInt(e.attributes.brightness,0)===n||this.callEntityService({brightness:n},e)}setColorTemp(t,e){const n=parseInt(t.target.value,0);isNaN(n)||parseInt(e.attributes.color_temp,0)===n||this.callEntityService({color_temp:n},e)}setWhiteValue(t,e){const n=parseInt(t.target.value,0);isNaN(n)||parseInt(e.attributes.white_value,0)===n||this.callEntityService({white_value:n},e)}setToggle(t,e){const n=this.isEntityOn(e)?dt.cmdToggle.off:dt.cmdToggle.on;this.callEntityService({},e,n)}setEffect(t,e){this.callEntityService({effect:t.detail.value},e)}callEntityService(t,e,n){if(this._isUpdating)return;const r=e.entity_id.split(".")[0];this.hass.callService(r,n||dt.cmdToggle.on,{entity_id:e.entity_id,...t})}}customElements.define("light-entity-card",dt)}]); \ No newline at end of file diff --git a/package.json b/package.json index 0e093fb..34e17e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "light-entity-card", - "version": "2.3.1", + "version": "2.4.0", "description": "A light-entity card for Home Assistant Lovelace UI", "keywords": [ "home-assistant", @@ -11,8 +11,6 @@ "custom-cards", "light-entity" ], - "main": "main.js", - "module": "main.js", "repository": "git@github.com:ljmerza/light-entity-card.git", "author": "Leonardo Merza ", "license": "MIT", @@ -20,19 +18,22 @@ "lit-element": "^2.0.1" }, "devDependencies": { + "@babel/cli": "^7.4.3", + "@babel/core": "^7.4.3", + "@babel/plugin-transform-modules-umd": "^7.2.0", + "@babel/polyfill": "^7.4.3", + "@babel/preset-env": "^7.4.3", + "babel-loader": "^8.0.5", "eslint": "^5.13.0", "eslint-config-airbnb-base": "^13.1.0", "eslint-plugin-import": "^2.16.0", - "rollup": "^0.66.6", - "rollup-plugin-commonjs": "^9.2.0", - "rollup-plugin-node-resolve": "^3.4.0", - "rollup-plugin-replace": "^2.1.0", - "rollup-plugin-terser": "^3.0.0" + "webpack": "^4.29.6", + "webpack-cli": "^3.3.0", + "webpack-merge": "^4.2.1" }, "scripts": { - "build": "npm run lint && npm run rollup", - "rollup": "rollup -c", - "lint": "eslint main.js style.js", - "watch": "rollup -c --watch" + "lint": "eslint ./src", + "start": "webpack --watch --config webpack/config.dev.js", + "build": "webpack --config webpack/config.prod.js" } } diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index fa04f9c..0000000 --- a/rollup.config.js +++ /dev/null @@ -1,16 +0,0 @@ -import resolve from 'rollup-plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; -import { terser } from "rollup-plugin-terser"; - -export default { - input: 'main.js', - output: { - file: 'light-entity-card.js', - format: 'iife' - }, - plugins: [ - resolve(), - commonjs(), - terser() - ] -}; \ No newline at end of file diff --git a/src/defaults.js b/src/defaults.js new file mode 100644 index 0000000..acaf9f8 --- /dev/null +++ b/src/defaults.js @@ -0,0 +1,9 @@ +export default { + group: false, + color_wheel: true, + persist_features: false, + brightness: true, + color_temp: true, + white_value: true, + color_picker: true, +}; diff --git a/src/index-editor.js b/src/index-editor.js new file mode 100644 index 0000000..f8b3164 --- /dev/null +++ b/src/index-editor.js @@ -0,0 +1,157 @@ +import { LitElement, html } from 'lit-element'; +import style from './style-editor'; +import defaultConfig from './defaults'; + + +const fireEvent = (node, type, detail = {}, options = {}) => { + const event = new Event(type, { + bubbles: options.bubbles === undefined ? true : options.bubbles, + cancelable: Boolean(options.cancelable), + composed: options.composed === undefined ? true : options.composed, + }); + + event.detail = detail; + node.dispatchEvent(event); + return event; +}; + + +export default class LightEntityCardEditor extends LitElement { + static get styles() { + return style; + } + + static get properties() { + return { hass: {}, _config: {} }; + } + + setConfig(config) { + this._config = { + ...defaultConfig, + ...config + }; + } + + get entityOptions() { + return Object.keys(this.hass.states).filter(eid => { + return ['switch', 'light', 'group'].includes( eid.substr(0, eid.indexOf('.')) ) + }); + } + + firstUpdated(){ + this._firstRendered = true; + } + + render() { + if (!this.hass) { + return html``; + } + + return html` +
+ +
+ +
+ +
+ + + ${ + this.entityOptions.map(entity => { + return html`${entity}`; + }) + } + + + +
+ +
+
+ Show Color Wheel + Group Entities +
+ +
+ Persist Features + Show Brightness +
+ +
+ Show Color Temp + Show White Value +
+ +
+ Show Color Picker + Show Effects List +
+
+ +
+
+ `; + } + + _valueChanged(ev) { + console.log({ ev }); + + if (!this._config || !this.hass || !this._firstRendered) return; + const { target: { configValue, value }, detail: { value: checkedValue} } = ev; + + if (checkedValue !== undefined || checkedValue !== null){ + this._config = { ...this._config, [configValue]: checkedValue }; + } else { + this._config = { ...this._config, [configValue]: value }; + } + + console.log(this._config); + fireEvent(this, 'config-changed', { config: this._config }); + } +} + diff --git a/main.js b/src/index.js similarity index 89% rename from main.js rename to src/index.js index fbba4c5..d3fbf6c 100644 --- a/main.js +++ b/src/index.js @@ -1,7 +1,15 @@ +import '@babel/polyfill'; import { LitElement, html } from 'lit-element'; import style from './style'; +import defaultConfig from './defaults'; +import LightEntityCardEditor from './index-editor'; + + +const editorName = 'light-entity-card-editor'; +customElements.define(editorName, LightEntityCardEditor); + class LightEntityCard extends LitElement { static get properties() { @@ -11,6 +19,23 @@ class LightEntityCard extends LitElement { }; } + /** + * checks and saves config of entity + * @param {*} config + */ + setConfig(config) { + if (!config.entity) throw Error('entity required.'); + + this.config = { + ...defaultConfig, + ...config, + }; + } + + static async getConfigElement() { + return document.createElement(editorName); + } + static get featureNames() { return { brightness: 1, @@ -35,10 +60,6 @@ class LightEntityCard extends LitElement { }; } - constructor() { - super(); - } - /** * get the current size of the card * @return {Number} @@ -122,24 +143,6 @@ class LightEntityCard extends LitElement { }); } - /** - * checks and saves config of entity - * @param {*} config - */ - setConfig(config) { - if (!config.entity) throw Error('entity required.'); - - this.config = { - group: false, - persist_features: false, - brightness: true, - color_temp: true, - white_value: true, - color_picker: true, - ...config, - }; - } - /** * generates a card for each given entiy in the config * @return {TemplateResult} @@ -176,7 +179,7 @@ class LightEntityCard extends LitElement { */ createCard(stateObj) { return html` - + ${this.createHeader(stateObj)}
${this.createBrightnessSlider(stateObj)} @@ -202,7 +205,7 @@ class LightEntityCard extends LitElement {
${title}
- this.setToggle(e, stateObj)}> + this.setToggle(e, stateObj)}>
@@ -221,12 +224,8 @@ class LightEntityCard extends LitElement { return html`
- +
`; } @@ -243,13 +242,9 @@ class LightEntityCard extends LitElement { return html`
- + +
`; } @@ -266,11 +261,8 @@ class LightEntityCard extends LitElement { return html`
- + +
`; } @@ -308,7 +300,7 @@ class LightEntityCard extends LitElement { return html`
- this.setEffect(e, stateObj)} label="${caption}"> + this.setEffect(e, stateObj)} label="${caption}"> ${listItems} @@ -328,14 +320,9 @@ class LightEntityCard extends LitElement { return html`
- this.setColorPicker(e, stateObj)} - > + this.setColorPicker(e, stateObj)} + >
`; diff --git a/src/style-editor.js b/src/style-editor.js new file mode 100644 index 0000000..36338fc --- /dev/null +++ b/src/style-editor.js @@ -0,0 +1,29 @@ +import { css } from 'lit-element'; + +const style = css` + .entities { + padding-top: 10px; + padding-bottom: 10px; + } + + .entities paper-checkbox { + display: block; + margin-bottom: 10px; + margin-left: 10px; + } + + .checkbox-options { + display: flex; + justify-content: space-between; + } + + .checkbox-options paper-checkbox { + margin-top: 10px; + } + + .overall-config { + margin-bottom: 10px; + } +`; + +export default style; diff --git a/style.js b/src/style.js similarity index 100% rename from style.js rename to src/style.js diff --git a/webpack/config.common.js b/webpack/config.common.js new file mode 100644 index 0000000..d6c7d8c --- /dev/null +++ b/webpack/config.common.js @@ -0,0 +1,36 @@ +const path = require('path'); + + +const rootPath = path.resolve(__dirname, '../'); + +module.exports = { + entry: { + "light-entity-card": path.resolve(rootPath, './src/index.js'), + }, + output: { + filename: '[name].js', + path: rootPath + }, + module: { + rules: [ + { + test: /\.m?js$/, + exclude: /(node_modules|bower_components)/, + include: [ + /node_modules(?:\/|\\)lit-element|lit-html/ + ], + use: { + loader: 'babel-loader', + options: { + presets: [ + ["@babel/env"], + ], + plugins: [ + "@babel/plugin-transform-modules-umd" + ] + } + } + } + ] + } +}; diff --git a/webpack/config.dev.js b/webpack/config.dev.js new file mode 100644 index 0000000..b1b16c4 --- /dev/null +++ b/webpack/config.dev.js @@ -0,0 +1,8 @@ +const merge = require('webpack-merge'); + +const commonConfig = require('./config.common'); + + +module.exports = merge(commonConfig, { + mode: 'development' +}); \ No newline at end of file diff --git a/webpack/config.prod.js b/webpack/config.prod.js new file mode 100644 index 0000000..f3af29d --- /dev/null +++ b/webpack/config.prod.js @@ -0,0 +1,14 @@ +const merge = require('webpack-merge'); + +const commonConfig = require('./config.common'); + + +module.exports = merge(commonConfig, { + mode: 'production', + optimization: { + minimize: true + }, + output: { + publicPath: '/local/' + }, +}); \ No newline at end of file