UNPKG

ce-decorators

Version:

Custom Element decorators for typescript

137 lines 67.2 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("lit-html"),require("lit-html/lib/shady-render")):"function"==typeof define&&define.amd?define("ce-decorators",["lit-html","lit-html/lib/shady-render"],e):"object"==typeof exports?exports["ce-decorators"]=e(require("lit-html"),require("lit-html/lib/shady-render")):t["ce-decorators"]=e(t["lit-html"],t["lit-html/lib/shady-render"])}(window,function(__WEBPACK_EXTERNAL_MODULE__34__,__WEBPACK_EXTERNAL_MODULE__35__){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return 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 o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));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="",n(n.s=56)}([function(t,e,n){"use strict";var r=n(5),o=n(7),i=n(2),a=(new(function(){function t(){Object(r.a)(this,t)}return Object(o.a)(t,[{key:"handleAttributeExpressions",value:function(t,e,n,r){var o=e[0];return"."===o?new i.f(t,e.slice(1),n).parts:"@"===o?[new i.d(t,e.slice(1),r.eventContext)]:"?"===o?[new i.c(t,e.slice(1),n)]:new i.a(t,e,n).parts}},{key:"handleTextExpression",value:function(t){return new i.e(t)}}]),t}()),n(19)),c=n(18),u=n(14),s=(n(8),n(3));new Map,new WeakMap,n(25); /** * @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 */n.d(e,"f",function(){return c.a}),n.d(e,"g",function(){return u.b}),n.d(e,"h",function(){return u.c}),n.d(e,"a",function(){return i.b}),n.d(e,"b",function(){return i.e}),n.d(e,"c",function(){return i.g}),n.d(e,"d",function(){return a.b}),n.d(e,"e",function(){return s.c}), /** * @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")},function(t,e,n){"use strict";function r(t){return"class"===t.kind}function o(t){return"field"===t.kind||"method"===t.kind}function i(t){return"method"===t.kind}function a(t,e){var n=e({kind:"class",elements:[]}),r=void 0;return n.finisher&&(r=n.constructor?n.finisher(n.constructor):n.finisher(t)),r||n.constructor||t}function c(t,e,n,r){var o={key:e,initializer:n?n.initializer:void 0,initialize:n?n.initializer:void 0,kind:n&&(n.get||n.set||"function"==typeof n.value)?"method":"field",descriptor:n||{configurable:!0,enumerable:!1,value:null},placement:"own"},i=r(o);return i.extras&&i.extras.length>0&&i.extras.forEach(function(e){return Object.defineProperty(t.constructor.prototype,e.key,{configurable:!0,enumerable:!1,value:o.initialize?o.initialize():void 0,writable:!0})}),i.finisher&&i.finisher(t.constructor),i.descriptor}function u(t,e,n,r){var o=r({descriptor:n,key:e,kind:"method",placement:"prototype"});return o.extras&&o.extras.length>0&&o.extras.forEach(function(e){return Object.defineProperty(t.constructor.prototype,e.key,e.descriptor)}),o.finisher&&o.finisher(t.constructor),o.descriptor}n.d(e,"d",function(){return r}),n.d(e,"e",function(){return o}),n.d(e,"f",function(){return i}),n.d(e,"c",function(){return a}),n.d(e,"a",function(){return c}),n.d(e,"b",function(){return u})},function(t,e,n){"use strict";n.d(e,"h",function(){return y}),n.d(e,"a",function(){return m}),n.d(e,"b",function(){return b}),n.d(e,"e",function(){return g}),n.d(e,"c",function(){return _}),n.d(e,"f",function(){return O}),n.d(e,"g",function(){return w}),n.d(e,"d",function(){return S});var r=n(23),o=n(9),i=n(31),a=n(21),c=n(5),u=n(7),s=n(4),l=n(18),f=n(14),d=n(8),p=n(25),h=n(19),v=n(3),y=function(t){return null===t||!("object"===Object(s.a)(t)||"function"==typeof t)},m=function(){function t(e,n,r){Object(c.a)(this,t),this.dirty=!0,this.element=e,this.name=n,this.strings=r,this.parts=[];for(var o=0;o<r.length-1;o++)this.parts[o]=this._createPart()}return Object(u.a)(t,[{key:"_createPart",value:function(){return new b(this)}},{key:"_getValue",value:function(){for(var t=this.strings,e=t.length-1,n="",r=0;r<e;r++){n+=t[r];var o=this.parts[r];if(void 0!==o){var i=o.value;if(null!=i&&(Array.isArray(i)||"string"!=typeof i&&i[Symbol.iterator])){var a=!0,c=!1,u=void 0;try{for(var s,l=i[Symbol.iterator]();!(a=(s=l.next()).done);a=!0){var f=s.value;n+="string"==typeof f?f:String(f)}}catch(t){c=!0,u=t}finally{try{a||null==l.return||l.return()}finally{if(c)throw u}}}else n+="string"==typeof i?i:String(i)}}return n+=t[e]}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}]),t}(),b=function(){function t(e){Object(c.a)(this,t),this.value=void 0,this.committer=e}return Object(u.a)(t,[{key:"setValue",value:function(t){t===d.a||y(t)&&t===this.value||(this.value=t,Object(l.b)(t)||(this.committer.dirty=!0))}},{key:"commit",value:function(){for(;Object(l.b)(this.value);){var t=this.value;this.value=d.a,t(this)}this.value!==d.a&&this.committer.commit()}}]),t}(),g=function(){function t(e){Object(c.a)(this,t),this.value=void 0,this._pendingValue=void 0,this.options=e}return Object(u.a)(t,[{key:"appendInto",value:function(t){this.startNode=t.appendChild(Object(v.c)()),this.endNode=t.appendChild(Object(v.c)())}},{key:"insertAfterNode",value:function(t){this.startNode=t,this.endNode=t.nextSibling}},{key:"appendIntoPart",value:function(t){t._insert(this.startNode=Object(v.c)()),t._insert(this.endNode=Object(v.c)())}},{key:"insertAfterPart",value:function(t){t._insert(this.startNode=Object(v.c)()),this.endNode=t.endNode,t.endNode=this.startNode}},{key:"setValue",value:function(t){this._pendingValue=t}},{key:"commit",value:function(){for(;Object(l.b)(this._pendingValue);){var t=this._pendingValue;this._pendingValue=d.a,t(this)}var e=this._pendingValue;e!==d.a&&(y(e)?e!==this.value&&this._commitText(e):e instanceof h.b?this._commitTemplateResult(e):e instanceof Node?this._commitNode(e):Array.isArray(e)||e[Symbol.iterator]?this._commitIterable(e):e===d.b?(this.value=d.b,this.clear()):this._commitText(e))}},{key:"_insert",value:function(t){this.endNode.parentNode.insertBefore(t,this.endNode)}},{key:"_commitNode",value:function(t){this.value!==t&&(this.clear(),this._insert(t),this.value=t)}},{key:"_commitText",value:function(t){var e=this.startNode.nextSibling;t=null==t?"":t,e===this.endNode.previousSibling&&3===e.nodeType?e.data=t:this._commitNode(document.createTextNode("string"==typeof t?t:String(t))),this.value=t}},{key:"_commitTemplateResult",value:function(t){var e=this.options.templateFactory(t);if(this.value instanceof p.a&&this.value.template===e)this.value.update(t.values);else{var n=new p.a(e,t.processor,this.options),r=n._clone();n.update(t.values),this._commitNode(r),this.value=n}}},{key:"_commitIterable",value:function(e){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,o=0,i=!0,a=!1,c=void 0;try{for(var u,s=e[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var l=u.value;void 0===(n=r[o])&&(n=new t(this.options),r.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(r[o-1])),n.setValue(l),n.commit(),o++}}catch(t){a=!0,c=t}finally{try{i||null==s.return||s.return()}finally{if(a)throw c}}o<r.length&&(r.length=o,this.clear(n&&n.endNode))}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.startNode;Object(f.b)(this.startNode.parentNode,t.nextSibling,this.endNode)}}]),t}(),_=function(){function t(e,n,r){if(Object(c.a)(this,t),this.value=void 0,this._pendingValue=void 0,2!==r.length||""!==r[0]||""!==r[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=n,this.strings=r}return Object(u.a)(t,[{key:"setValue",value:function(t){this._pendingValue=t}},{key:"commit",value:function(){for(;Object(l.b)(this._pendingValue);){var t=this._pendingValue;this._pendingValue=d.a,t(this)}if(this._pendingValue!==d.a){var e=!!this._pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=e,this._pendingValue=d.a}}}]),t}(),O=function(t){function e(t,n,i){var a;return Object(c.a)(this,e),(a=Object(r.a)(this,Object(o.a)(e).call(this,t,n,i))).single=2===i.length&&""===i[0]&&""===i[1],a}return Object(a.a)(e,t),Object(u.a)(e,[{key:"_createPart",value:function(){return new w(this)}},{key:"_getValue",value:function(){return this.single?this.parts[0].value:Object(i.a)(Object(o.a)(e.prototype),"_getValue",this).call(this)}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]),e}(m),w=function(t){function e(){return Object(c.a)(this,e),Object(r.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(a.a)(e,t),e}(b),E=!1;try{var j={get capture(){return E=!0,!1}};window.addEventListener("test",j,j),window.removeEventListener("test",j,j)}catch(t){}var S=function(){function t(e,n,r){var o=this;Object(c.a)(this,t),this.value=void 0,this._pendingValue=void 0,this.element=e,this.eventName=n,this.eventContext=r,this._boundHandleEvent=function(t){return o.handleEvent(t)}}return Object(u.a)(t,[{key:"setValue",value:function(t){this._pendingValue=t}},{key:"commit",value:function(){for(;Object(l.b)(this._pendingValue);){var t=this._pendingValue;this._pendingValue=d.a,t(this)}if(this._pendingValue!==d.a){var e=this._pendingValue,n=this.value,r=null==e||null!=n&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive),o=null!=e&&(null==n||r);r&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),o&&(this._options=k(e),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=e,this._pendingValue=d.a}}},{key:"handleEvent",value:function(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}]),t}(),k=function(t){return t&&(E?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)}},function(t,e,n){"use strict";n.d(e,"f",function(){return o}),n.d(e,"g",function(){return i}),n.d(e,"b",function(){return c}),n.d(e,"a",function(){return u}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return l}),n.d(e,"e",function(){return f});var r=n(5),o="{{lit-".concat(String(Math.random()).slice(2),"}}"),i="\x3c!--".concat(o,"--\x3e"),a=new RegExp("".concat(o,"|").concat(i)),c="$lit$",u=function t(e,n){var i=this;Object(r.a)(this,t),this.parts=[],this.element=n;var u=-1,s=0,d=[];!function t(n){for(var r=n.content,p=document.createTreeWalker(r,133,null,!1),h=0;p.nextNode();){u++;var v=p.currentNode;if(1===v.nodeType){if(v.hasAttributes()){for(var y=v.attributes,m=0,b=0;b<y.length;b++)y[b].value.indexOf(o)>=0&&m++;for(;m-- >0;){var g=e.strings[s],_=f.exec(g)[2],O=_.toLowerCase()+c,w=v.getAttribute(O).split(a);i.parts.push({type:"attribute",index:u,name:_,strings:w}),v.removeAttribute(O),s+=w.length-1}}"TEMPLATE"===v.tagName&&t(v)}else if(3===v.nodeType){var E=v.data;if(E.indexOf(o)>=0){for(var j=v.parentNode,S=E.split(a),k=S.length-1,x=0;x<k;x++)j.insertBefore(""===S[x]?l():document.createTextNode(S[x]),v),i.parts.push({type:"node",index:++u});""===S[k]?(j.insertBefore(l(),v),d.push(v)):v.data=S[k],s+=k}}else if(8===v.nodeType)if(v.data===o){var T=v.parentNode;null!==v.previousSibling&&u!==h||(u++,T.insertBefore(l(),v)),h=u,i.parts.push({type:"node",index:u}),null===v.nextSibling?v.data="":(d.push(v),u--),s++}else for(var C=-1;-1!==(C=v.data.indexOf(o,C+1));)i.parts.push({type:"node",index:-1})}}(n);for(var p=0;p<d.length;p++){var h=d[p];h.parentNode.removeChild(h)}},s=function(t){return-1!==t.index},l=function(){return document.createComment("")},f=/([ \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 */},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(4);function o(t){return(o="function"==typeof Symbol&&"symbol"===Object(r.a)(Symbol.iterator)?function(t){return Object(r.a)(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Object(r.a)(t)})(t)}function i(t){return(i="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(t){return o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)})(t)}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",function(){return r})},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",function(){return deserializeValue}),__webpack_require__.d(__webpack_exports__,"f",function(){return serializeValue}),__webpack_require__.d(__webpack_exports__,"a",function(){return camelToKebapCase}),__webpack_require__.d(__webpack_exports__,"c",function(){return kebapToCamelCase}),__webpack_require__.d(__webpack_exports__,"d",function(){return makeTemplateString}),__webpack_require__.d(__webpack_exports__,"e",function(){return needShadyDOM}),__webpack_require__.d(__webpack_exports__,"g",function(){return supportsAdoptingStyleSheets});var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(22);function deserializeValue(value,type){if(null==value&&type!==Boolean)return null;if(type===Boolean)return"false"!==value&&null!==value;if(type===Number)return parseFloat(value);if(type===String)return value;if(type===RegExp){var _Array$from=Array.from(/(\/(.*)\/([a-z]*))|(.+)/.exec(value)),_Array$from2=Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__.a)(_Array$from,5),_2=_Array$from2[2],_3=_Array$from2[3],_4=_Array$from2[4];return _4?new RegExp(_4):_2?new RegExp(_2,_3||""):null}if(type===Function){var callback=eval("( function() {"+value+"} )");return callback}return type instanceof Object?JSON.parse(value):value}function serializeValue(t,e){return null==t?null:e===String?t:e instanceof Object?JSON.stringify(t):"".concat(t)}function camelToKebapCase(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function kebapToCamelCase(t){return t.toLowerCase().replace(/-([a-zA-Z])/g,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1].toUpperCase()})}function makeTemplateString(t,e){return Object.defineProperty(t,"raw",{value:e}),t}function needShadyDOM(){return window.ShadyCSS&&!window.ShadyCSS.nativeShadow}var supportsAdoptingStyleSheets="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,"a",function(){return o})},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return o}); /** * @license * Copyright (c) 2018 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 */ var r={},o={}},function(t,e,n){"use strict";function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"c",function(){return i}),n.d(e,"a",function(){return a});var r=new Map;function o(t){return r.get(t)}function i(t,e){r.set(t,e)}function a(){return Array.from(r.keys())}},function(t,e,n){"use strict";var r;n.d(e,"a",function(){return r}),function(t){t[t.INIT=0]="INIT",t[t.DIRTY=1]="DIRTY",t[t.UPDATE_PROPERTY=2]="UPDATE_PROPERTY",t[t.REFLECTING=3]="REFLECTING",t[t.UPDATE_FROM_ATTRIBUTE=4]="UPDATE_FROM_ATTRIBUTE",t[t.UPDATED=5]="UPDATED",t[t.EXECUTING_WATCHER=6]="EXECUTING_WATCHER"}(r||(r={}))},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=new Map;function o(t){var e=r.get(t);return e||(e=new Map,r.set(t,e)),e}},function(t,e,n){"use strict";var r;n.d(e,"a",function(){return r}),function(t){t[t.CONNECTED=0]="CONNECTED",t[t.DISCONNECTED=1]="DISCONNECTED",t[t.INIT=2]="INIT",t[t.CONSTRUCTED=3]="CONSTRUCTED"}(r||(r={}))},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return o}),n.d(e,"b",function(){return i}); /** * @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 */ var r=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=e;o!==n;){var i=o.nextSibling;t.insertBefore(o,r),o=i}},i=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e;r!==n;){var o=r.nextSibling;t.removeChild(r),r=o}}},function(t,e,n){"use strict";var r=n(16),o=n.n(r),i=n(26),a=n(5),c=n(23),u=n(9),s=n(7),l=n(21),f=n(30);function d(t,e,n){return(d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Object(f.a)(o,n.prototype),o}).apply(null,arguments)}function p(t){var e="function"==typeof Map?new Map:void 0;return(p=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return d(t,arguments,Object(u.a)(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Object(f.a)(r,t)})(t)}var h=n(6),v=n(12),y=n(13),m=n(11),b=n(27),g=n(28),_=n(10),O=n(17);function w(){var t=this;this.componentWillRender(),this._renderScheduled=!1;var e=this.renderToElement();e===this.shadowRoot?function(t){if(null===this._templateCache){var e=Object(_.b)(this.constructor),n=e.cssStyles,r=e.tag,o=e.shadyCSSStyleSheetAdopted,i=e.templateCache;if(window.ShadyCSS&&!window.ShadyCSS.nativeShadow&&window.ShadyCSS.ScopingShim.prepareAdoptedCssText)o||(window.ShadyCSS.ScopingShim.prepareAdoptedCssText(n.map(function(t){return t.cssText}),r),Object(_.b)(this.constructor).shadyCSSStyleSheetAdopted=!0),this._templateCache=i||Object(h.d)(["",""],["",""]);else if(h.g)this.shadowRoot.adoptedStyleSheets=n,this._templateCache=i||Object(h.d)(["",""],["",""]);else{var a=n.map(function(t){return t.cssText}).reduce(function(t,e){return t+"\n"+e});this._templateCache=i||Object(h.d)(["<style>".concat(a,"</style>"),""],["<style>".concat(a,"</style>"),""])}i||(Object(_.b)(this.constructor).templateCache=this._templateCache)}Object(h.e)()?Object(O.shadyRender)(Object(O.html)(this._templateCache,this.render()),t,{scopeName:Object(_.b)(this.constructor).tag,eventContext:this}):Object(O.render)(Object(O.html)(this._templateCache,this.render()),t,{eventContext:this})}.apply(this,[e]):function(t){if(null===this._templateCache){var e=Object(_.b)(this.constructor),n=e.cssStyles,r=e.tag,o=e.shadyCSSStyleSheetAdopted,i=e.templateCache;if(!o){var a=document.createElement("style");a.setAttribute("scope",r);var c=n.map(function(t){return h.g?Array.from(t.rules).reduce(function(t,e){return t+e.cssText},""):t.cssText}).reduce(function(t,e){return t+e});a.textContent=c.replace(/(};?|,)\s*((\.?|#?)[a-z\-A-Z]+)/g,function(t){return"".concat(arguments.length<=1?void 0:arguments[1]," :host ").concat(arguments.length<=2?void 0:arguments[2])}).replace(/((:host\(([^\(]*)\))|(:host))/g,function(t){return"".concat(r).concat((arguments.length<=3?void 0:arguments[3])?arguments.length<=3?void 0:arguments[3]:"")}),document.querySelector("head").appendChild(a),Object(_.b)(this.constructor).shadyCSSStyleSheetAdopted=!0}this._templateCache=i||Object(h.d)(["",""],["",""]),Object(_.b)(this.constructor).templateCache=this._templateCache}Object(O.render)(this.render(),t,{eventContext:this})}.apply(this,[e]),this.componentDidRender(),this._firstRender&&(this.componentFirstRender(),this._firstRender=!1),this._propertyState=m.a.UPDATED,this._renderCompletedCallbacks.forEach(function(t){return t()}),this._renderCompletedCallbacks=[],null===this._layoutRAFReference&&(this._layoutRAFReference=window.requestAnimationFrame(function(){Promise.resolve().then(function(){t.componentDidLayout(),t._layoutRAFReference=null})}))}var E,j=[],S=null,k=1e3/60;function x(t){j.indexOf(t)<0&&j.push(t),function t(){null===S&&(S=window.requestAnimationFrame(function(){var e=k;do{var n=j.splice(0,1)[0];if(!n)break;var r=performance.now();w.apply(n);var o=performance.now()-r;e-=o}while(e>0);S=null,t()}))}()}n.d(e,"a",function(){return T}),n.d(e,"b",function(){return C}),function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LAZY=1]="LAZY",t[t.PIPELINE_EXPERIMENTAL=2]="PIPELINE_EXPERIMENTAL"}(E||(E={}));var T=function(t){function e(){var t;return Object(a.a)(this,e),(t=Object(c.a)(this,Object(u.a)(e).call(this)))._renderStrategy=E.DEFAULT,t._renderCallbackResolver=null,t._componentState=y.a.INIT,t._propertyState=m.a.DIRTY,t._renderScheduled=!1,t._templateCache=null,t._firstRender=!0,t._renderCompletedCallbacks=[],t._constructedCompletedCallbacks=[],t._layoutRAFReference=null,Promise.resolve().then(function(){t._componentState===y.a.INIT&&(t._componentState=y.a.CONSTRUCTED,t._constructedCompletedCallbacks.forEach(function(t){return t()}),t._constructedCompletedCallbacks=[])}),t}return Object(l.a)(e,t),Object(s.a)(e,null,[{key:"_fromAttribute",value:function(t,e,n,r){if(r._propertyState!==m.a.REFLECTING){var o=Object(h.c)(t),i=Object(v.a)(this).get(o);(e=r[o])!==(n=i.converter?i.converter.fromAttribute?i.converter.fromAttribute(n,i.type):i.converter(n,i.type):Object(h.b)(n,i.type))&&(r._propertyState=m.a.UPDATE_FROM_ATTRIBUTE,this._fromProperty(o,e,n,r))}}},{key:"_fromProperty",value:function(t,e,n,r){if(e!==n){var o=Object(v.a)(this).get(t),i=Object(g.b)(this,t);n=i.reduce(function(t,n){return n.apply(r,[e,t])||t},n),this._reflectAttributes(o,r,n,t),r._propertyState=m.a.UPDATE_PROPERTY,r[t]=n,r._propertyState=m.a.DIRTY,Object(b.b)(this,t).forEach(function(t){return t.apply(r,[e,n])}),r.scheduleRender()}}},{key:"_reflectAttributes",value:function(t,e,n,r){!t.reflectAsAttribute&&void 0!==t.reflectAsAttribute||e._componentState===y.a.INIT||t.type!==Boolean&&t.type!==String&&t.type!==Number&&!0!==t.reflectAsAttribute||e._propertyState!==m.a.UPDATE_FROM_ATTRIBUTE&&(e._propertyState=m.a.REFLECTING,!1===n||null==n?e.removeAttribute(Object(h.a)(r)):t.converter&&t.converter.toAttribute?e.setAttribute(Object(h.a)(r),t.converter.toAttribute(n,t.type)):e.setAttribute(Object(h.a)(r),Object(h.f)(n,t.type)))}},{key:"observedAttributes",get:function(){return Array.from(Object(v.a)(this)).filter(function(t){return void 0!==t[1].type}).map(function(t){return Object(h.a)(t[0].toString())})}}]),Object(s.a)(e,[{key:"componentConnected",value:function(){}},{key:"componentDisconnected",value:function(){}},{key:"componentWillRender",value:function(){}},{key:"componentDidRender",value:function(){}},{key:"componentFirstRender",value:function(){}},{key:"componentDidLayout",value:function(){}},{key:"renderToElement",value:function(){return this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot}},{key:"waitForConstruction",value:function(){var t=Object(i.a)(o.a.mark(function t(){var e=this;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t){e._constructedCompletedCallbacks.push(t)}));case 1:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()},{key:"waitForRender",value:function(){var t=Object(i.a)(o.a.mark(function t(){var e=this;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t){e._renderCompletedCallbacks.push(t)}));case 1:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}()},{key:"scheduleRender",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._componentState!==y.a.CONNECTED||this._propertyState!==m.a.DIRTY||this._renderScheduled){if(n){if(this._renderScheduled){if(this._renderCallbackResolver)return void Promise.resolve().then(function(){e._renderCallbackResolver()});if(this._renderStrategy!==E.PIPELINE_EXPERIMENTAL)return;t=this,j.splice(j.indexOf(t),1)}Promise.resolve().then(function(){w.apply(e)})}}else switch(this._renderScheduled=!0,this._renderStrategy){case E.PIPELINE_EXPERIMENTAL:x(this);break;case E.LAZY:if(!n){new Promise(function(t){setTimeout(t),e._renderCallbackResolver=t}).then(function(){w.apply(e),e._renderCallbackResolver=null});break}default:Promise.resolve().then(function(){w.apply(e)})}}},{key:"connectedCallback",value:function(){var t=this;if(this._componentState===y.a.INIT||this._componentState===y.a.CONSTRUCTED){this._componentState=y.a.CONNECTED;var e=this._propertyState;this._propertyState=m.a.REFLECTING,Object(v.a)(this.constructor).forEach(function(e,n){var r=t[n.toString()];(r||0===r)&&t.constructor._reflectAttributes(e,t,r,n.toString())}),this._propertyState=e}else this._componentState=y.a.CONNECTED;this.componentConnected(),this.scheduleRender()}},{key:"disconnectedCallback",value:function(){this._componentState=y.a.DISCONNECTED,this.componentDisconnected()}},{key:"attributeChangedCallback",value:function(t,e,n){e!==n&&this.constructor._fromAttribute(t,e,n,this)}}]),e}(p(HTMLElement)),C=function(t){function e(){var t;return Object(a.a)(this,e),(t=Object(c.a)(this,Object(u.a)(e).call(this)))._renderStrategy=E.LAZY,t}return Object(l.a)(e,t),e}(T);"ShadyCSS"in window&&void 0===window.ShadyCSS.ScopingShim.prepareAdoptedCssText&&console.error('Please check your "@webcomponents/webcomponentsjs" polyfill, minimum version 2.2.6 required')},function(t,e,n){t.exports=n(57)},function(t,e,n){"use strict";n.r(e);var r=n(34);for(var o in r)["shadyRender","default"].indexOf(o)<0&&function(t){n.d(e,t,function(){return r[t]})}(o);var i=n(35);n.d(e,"shadyRender",function(){return i.render});var a=n(36);n.d(e,"asyncAppend",function(){return a.a});var c=n(37);n.d(e,"asyncReplace",function(){return c.a});var u=n(38);n.d(e,"cache",function(){return u.a});var s=n(39);n.d(e,"classMap",function(){return s.a});var l=n(40);n.d(e,"guard",function(){return l.a});var f=n(41);n.d(e,"ifDefined",function(){return f.a});var d=n(42);n.d(e,"repeat",function(){return d.a});var p=n(43);n.d(e,"styleMap",function(){return p.a});var h=n(44);n.d(e,"unsafeHTML",function(){return h.a});var v=n(45);n.d(e,"until",function(){return v.a})},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i}); /** * @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 */ var r=new WeakMap,o=function(t){return function(){var e=t.apply(void 0,arguments);return r.set(e,!0),e}},i=function(t){return"function"==typeof t&&r.has(t)}},function(t,e,n){"use strict";n.d(e,"b",function(){return f}),n.d(e,"a",function(){return d});var r=n(23),o=n(9),i=n(31),a=n(21),c=n(5),u=n(7),s=n(14),l=n(3),f=function(){function t(e,n,r,o){Object(c.a)(this,t),this.strings=e,this.values=n,this.type=r,this.processor=o}return Object(u.a)(t,[{key:"getHTML",value:function(){for(var t=this.strings.length-1,e="",n=0;n<t;n++){var r=this.strings[n],o=l.e.exec(r);e+=o?r.substr(0,o.index)+o[1]+o[2]+l.b+o[3]+l.f:r+l.g}return e+this.strings[t]}},{key:"getTemplateElement",value:function(){var t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}]),t}(),d=function(t){function e(){return Object(c.a)(this,e),Object(r.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(a.a)(e,t),Object(u.a)(e,[{key:"getHTML",value:function(){return"<svg>".concat(Object(i.a)(Object(o.a)(e.prototype),"getHTML",this).call(this),"</svg>")}},{key:"getTemplateElement",value:function(){var t=Object(i.a)(Object(o.a)(e.prototype),"getTemplateElement",this).call(this),n=t.content,r=n.firstChild;return n.removeChild(r),Object(s.c)(n,r.firstChild),t}}]),e}(f)},function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){r(t,e,n[e])})}return t}n.d(e,"a",function(){return o})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(30);function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(r.a)(t,e)}},function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";var r=n(4);function o(t,e){return!e||"object"!==Object(r.a)(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}n.d(e,"a",function(){return o})},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(24),o=n(5),i=n(7),a=n(14),c=n(3),u=function(){function t(e,n,r){Object(o.a)(this,t),this._parts=[],this.template=e,this.processor=n,this.options=r}return Object(i.a)(t,[{key:"update",value:function(t){var e=0,n=!0,r=!1,o=void 0;try{for(var i,a=this._parts[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var c=i.value;void 0!==c&&c.setValue(t[e]),e++}}catch(t){r=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}var u=!0,s=!1,l=void 0;try{for(var f,d=this._parts[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value;void 0!==p&&p.commit()}}catch(t){s=!0,l=t}finally{try{u||null==d.return||d.return()}finally{if(s)throw l}}}},{key:"_clone",value:function(){var t=this,e=a.a?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=this.template.parts,o=0,i=0;return function e(a){for(var u=document.createTreeWalker(a,133,null,!1),s=u.nextNode();o<n.length&&null!==s;){var l=n[o];if(Object(c.d)(l))if(i===l.index){if("node"===l.type){var f=t.processor.handleTextExpression(t.options);f.insertAfterNode(s.previousSibling),t._parts.push(f)}else{var d;(d=t._parts).push.apply(d,Object(r.a)(t.processor.handleAttributeExpressions(s,l.name,l.strings,t.options)))}o++}else i++,"TEMPLATE"===s.nodeName&&e(s.content),s=u.nextNode();else t._parts.push(void 0),o++}}(e),a.a&&(document.adoptNode(e),customElements.upgrade(e)),e}}]),t}()},function(t,e,n){"use strict";function r(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)})}}n.d(e,"a",function(){return o})},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return i});var r=new Map;function o(t,e){var n=r.get(t);n||(n=new Map,r.set(t,n));var o=n.get(e);return o||(o=[],n.set(e,o)),o}function i(t){var e=r.get(t);return e||(e=new Map,r.set(t,e)),e}},function(t,e,n){"use strict";n.d(e,"b",function(){return o}),n.d(e,"a",function(){return i});var r=new Map;function o(t,e){var n=r.get(t);n||(n=new Map,r.set(t,n));var o=n.get(e);return o||(o=[],n.set(e,o)),o}function i(t){var e=r.get(t);return e||(e=new Map,r.set(t,e)),e}},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=new Map;function o(t){var e=r.get(t);return e||(e=new Map,r.set(t,e)),e}},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";var r=n(9);function o(t,e,n){return(o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var o=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}(t,e);if(o){var i=Object.getOwnPropertyDescriptor(o,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}n.d(e,"a",function(){return o})},function(t,e,n){"use strict";var r=n(4),o=window.Reflect||{},i=new Map;function a(t,e){var n=t.get(e);return n||(n=new Map,t.set(e,n)),n}function c(t,e){var n=t.get(e);return n||(n=new Map,t.set(e,n)),n}function u(t,e,n,i){return"object"===Object(r.a)(o)&&"function"==typeof o.decorate&&o.decorate!==u&&o.decorate(t,e,n,i),t.reverse().reduce(function(t,r){return r(e,n,t)||t},i)||i}function s(t,e){return"object"===Object(r.a)(o)&&"function"==typeof o.metadata&&o.metadata!==s?o.metadata(t,e):function(n,r){r||(r=""),a(c(i,n),r).set(t,e)}}function l(t,e,n){return"object"===Object(r.a)(o)&&"function"==typeof o.getMetadata&&o.getMetadata!==l?o.getMetadata(t,e,n):a(c(i,e),n).get(t)}window.Reflect?(window.Reflect.decorate||(window.Reflect.decorate=u),window.Reflect.getMetadata||(window.Reflect.getMetadata=l),window.Reflect.metadata||(window.Reflect.metadata=s),window.ReflectPoorlyFill={decorate:u,getMetadata:l,metadata:s}):(window.Reflect={decorate:u,getMetadata:l,metadata:s},window.ReflectPoorlyFill={decorate:u,getMetadata:l,metadata:s});var f=n(15),d=n(12),p=n(11);function h(){return v({reflectAsAttribute:!1,type:void 0})}function v(t){return function(e){var n="symbol"===Object(r.a)(e.key)?Symbol():"__".concat(e.key);return"field"===e.kind?{kind:"method",descriptor:{configurable:!0,enumerable:!1,get:function(){return this[n]},set:function(t){this._propertyState===p.a.UPDATE_PROPERTY?this[n]=t:this.constructor._fromProperty(e.key.toString(),this[e.key.toString()],t,this)}},key:e.key,placement:"own",extras:[{placement:"own",initializer:e.initializer,initialize:e.initialize,key:n,descriptor:{enumerable:!1,configurable:!0,writable:!0},kind:"field"}],finisher:function(n){if(!f.a.isPrototypeOf(n))throw new Error("".concat(n.name," the property must be within a class which extends CustomElement"));t||(t={}),t.type||(t.type=Reflect.getMetadata("design:type",n.prototype,e.key.toString())),Object(d.a)(n).set(e.key,t)}}:{kind:"method",descriptor:{configurable:!0,enumerable:!1,get:function(){return e.descriptor.get.apply(this)},set:function(t){this._propertyState===p.a.UPDATE_PROPERTY?e.descriptor.set.apply(this,[t]):this.constructor._fromProperty(e.key.toString(),this[e.key.toString()],t,this)}},key:e.key,placement:"own",finisher:function(n){if(!f.a.isPrototypeOf(n))throw new Error("".concat(n.name," the property must be within a class which extends CustomElement"));t||(t={}),Object(d.a)(n).set(e.key,t)}}}}var y=n(1);function m(t){return function(e,n,r){if(Object(y.e)(e)){if(t&&!t.type)throw new Error("type not defined for property");return v(t)(e)}return t&&t.type||(t||(t={}),t.type=Reflect.getMetadata("design:type",e,n.toString())),Object(y.a)(e,n,r,v(t))}}function b(){return function(t,e,n){return Object(y.e)(t)?h()(t):Object(y.a)(t,e,n,h())}}n.d(e,"a",function(){return m}),n.d(e,"b",function(){return b})},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE__34__},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE__35__},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(16),o=n.n(r),i=n(26),a=n(0),c=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise(function(r,o){(function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)})(r,o,(e=t[n](e)).done,e.value)})}}},u=Object(a.f)(function(t,e){return function(){var n=Object(i.a)(o.a.mark(function n(r){var i,u,s,l,f,d,p,h;return o.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(r instanceof a.b){n.next=2;break}throw new Error("asyncAppend can only be used in text bindings");case 2:if(t!==r.value){n.next=4;break}return n.abrupt("return");case 4:r.value=t,l=0,n.prev=6,f=c(t);case 8:return n.next=10,f.next();case 10:if((d=n.sent).done){n.next=26;break}if(p=d.value,r.value===t){n.next=15;break}return n.abrupt("break",26);case 15:0===l&&r.clear(),void 0!==e&&(p=e(p,l)),h=r.startNode,void 0!==s&&(h=Object(a.e)(),s.endNode=h,r.endNode.parentNode.insertBefore(h,r.endNode)),(s=new a.b(r.options)).insertAfterNode(h),s.setValue(p),s.commit(),l++;case 24:n.next=8;break;case 26:n.next=31;break;case 28:n.prev=28,n.t0=n.catch(6),i={error:n.t0};case 31:if(n.prev=31,n.prev=32,!d||d.done||!(u=f.return)){n.next=36;break}return n.next=36,u.call(f);case 36:if(n.prev=36,!i){n.next=39;break}throw i.error;case 39:return n.finish(36);case 40:return n.finish(31);case 41:case"end":return n.stop()}},n,null,[[6,28,31,41],[32,,36,40]])}));return function(t){return n.apply(this,arguments)}}()})},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(16),o=n.n(r),i=n(26),a=n(0),c=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise(function(r,o){(function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)})(r,o,(e=t[n](e)).done,e.value)})}}},u=Object(a.f)(function(t,e){return function(){var n=Object(i.a)(o.a.mark(function n(r){var i,u,s,l,f,d,p;return o.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(r instanceof a.b){n.next=2;break}throw new Error("asyncReplace can only be used in text bindings");case 2:if(t!==r.value){n.next=4;break}return n.abrupt("return");case 4:s=new a.b(r.options),r.value=t,l=0,n.prev=7,f=c(t);case 9:return n.next=11,f.next();case 11:if((d=n.sent).done){n.next=23;break}if(p=d.value,r.value===t){n.next=16;break}return n.abrupt("break",23);case 16:0===l&&(r.clear(),s.appendIntoPart(r)),void 0!==e&&(p=e(p,l)),s.setValue(p),s.commit(),l++;case 21:n.next=9;break;case 23:n.next=28;break;case 25:n.prev=25,n.t0=n.catch(7),i={error:n.t0};case 28:if(n.prev=28,n.prev=29,!d||d.done||!(u=f.return)){n.next=33;break}return n.next=33,u.call(f);case 33:if(n.prev=33,!i){n.next=36;break}throw i.error;case 36:return n.finish(33);case 37:return n.finish(28);case 38:case"end":return n.stop()}},n,null,[[7,25,28,38],[29,,33,37]])}));return function(t){return n.apply(this,arguments)}}()})},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(25),o=n(0),i=new WeakMap,a=Object(o.f)(function(t){return function(e){if(!(e instanceof o.b))throw new Error("cache can only be used in text bindings");var n=i.get(e);void 0===n&&(n=new WeakMap,i.set(e,n));var a=e.value;if(a instanceof r.a){if(t instanceof o.d&&a.template===e.options.templateFactory(t))return void e.setValue(t);var c=n.get(a.template);void 0===c&&(c={instance:a,nodes:document.createDocumentFragment()},n.set(a.template,c)),Object(o.h)(c.nodes,e.startNode.nextSibling,e.endNode)}if(t instanceof o.d){var u=e.options.templateFactory(t),s=n.get(u);void 0!==s&&(e.setValue(s.nodes),e.commit(),e.value=s.instance)}e.setValue(t)}})},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0); /** * @license * Copyright (c) 2018 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.navigator.userAgent.match("Trident")&&(DOMTokenList.prototype.toggle=function(t,e){return void 0===e||e?this.add(t):this.remove(t),void 0===e||e});var o=new WeakMap,i=new WeakMap,a=Object(r.f)(function(t){return function(e){if(!(e instanceof r.a)||e instanceof r.c||"class"!==e.committer.name||e.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");i.has(e)||(e.committer.element.className=e.committer.strings.join(" "),i.set(e,!0));var n=o.get(e);for(var a in n)a in t||e.committer.element.classList.remove(a);for(var c in t)n&&n[c]===t[c]||e.committer.element.classList.toggle(c,Boolean(t[c]));o.set(e,t)}})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),o=new WeakMap,i=Object(r.f)(function(t,e){return function(n){var r=o.get(n);if(Array.isArray(t)){if(Array.isArray(r)&&r.length===t.length&&t.every(function(t,e){return t===r[e]}))return}else if(r===t&&(void 0!==t||o.has(n)))return;n.setValue(e()),o.set(n,Array.isArray(t)?Array.from(t):t)}}); /** * @license * Copyright (c) 2018 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(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(0),o=Object(r.f)(function(t){return function(e){if(void 0===t&&e instanceof r.a){if(t!==e.value){var n=e.committer.name;e.committer.element.removeAttribute(n)}}else e.setValue(t)}}); /** * @license * Copyright (c) 2018 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(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(0),o=function(t,e){var n=t.startNode.parentNode,o=void 0===e?t.endNode:e.startNode,i=n.insertBefore(Object(r.e)(),o);n.insertBefore(Object(r.e)(),o);var a=new r.b(t.options);return a.insertAfterNode(i),a},i=function(t,e){return t.setValue(e),t.commit(),t},a=function(t,e,n){var o=t.startNode.parentNode,i=n?n.startNode:t.endNode,a=e.endNode.nextSibling;a!==i&&Object(r.h)(o,e.startNode,a,i)},c=function(t){Object(r.g)(t.startNode.parentNode,t.startNode,t.endNode.nextSibling)},u=function(t,e,n){for(var r=new Map,o=e;o<=n;o++)r.set(t[o],o);return r},s=new WeakMap,l=new WeakMap,f=Object(r.f)(function(t,e,n){var f;return void 0===n?n=e:void 0!==e&&(f=e),function(e){if(!(e instanceof r.b))throw new Error("repeat can only be used in text bindings");var d,p,h=s.get(e)||[],v=l.get(e)||[],y=[],m=[],b=[],g=0,_=!0,O=!1,w=void 0;try{for(var E,j=t[Symbol.iterator]();!(_=(E=j.next()).done);_=!0){var S=E.value;b[g]=f?f(S,g):g,m[g]=n(S,g),g++}}catch(t){O=!0,w=t}finally{try{_||null==j.return||j.return()}finally{if(O)throw w}}for(var k=0,x=h.length-1,T=0,C=m.length-1;k<=x&&T<=C;)if(null===h[k])k++;else if(null===h[x])x--;else if(v[k]===b[T])y[T]=i(h[k],m[T]),k++,T++;else if(v[x]===b[C])y[C]=i(h[x],m[C]),x--,C--;else if(v[k]===b[C])y[C]=i(h[k],m[C]),a(e,h[k],y[C+1]),k++,C--;else if(v[x]===b[T])y[T]=i(h[x],m[T]),a(e,h[x],h[k]),x--,T++;else if(void 0===d&&(d=u(b,T,C),p=u(v,k,x)),d.has(v[k]))if(d.has(v[x])){var A=p.get(b[T]),N=void 0!==A?h[A]:null;if(null===N){var R=o(e,h[k]);i(R,m[T]),y[T]=R}else y[T]=i(N,m[T]),a(e,N,h[k]),h[A]=null;T++}else c(h[x]),x--;else c(h[k]),k++;for(;T<=C;){var P=o(e,y[C+1]);i(P,m[T]),y[T++]=P}for(;k<=x;){var L=h[k++];null!==L&&c(L)}s.set(e,y),l.set(e,b)}}); /** * @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(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),o=new WeakMap,i=new WeakMap,a=Object(r.f)(function(t){return function(e){if(!(e instanceof r.a)||e instanceof r.c||"style"!==e.committer.name||e.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");i.has(e)||(e.committer.element.style.cssText=e.committer.strings.join(" "),i.set(e,!0));var n=e.committer.element.style,a=o.get(e);for(var c in a)c in t||(-1===c.indexOf("-")?n[c]=null:n.removeProperty(c));for(var u in t)-1===u.indexOf("-")?n[u]=t[u]:n.setProperty(u,t[u]);o.set(e,t)}}); /** * @licen