main.b0f43c75.js 418 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. !function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t){
  2. /**
  3. @license
  4. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  5. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  6. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  7. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  8. Code distributed by Google as part of the polymer project is also
  9. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  10. */
  11. window.JSCompiler_renameProperty=function(e){return e}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return e===t}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,n=null,r=null;return function(){return function(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return function(){for(var t=arguments.length,i=Array(t),a=0;a<t;a++)i[a]=arguments[a];var s=0,l=i.pop(),u=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var n=t.map(function(e){return r(e)}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}(i),c=e.apply(void 0,[function(){return s++,l.apply(null,arguments)}].concat(n)),p=o(function(){for(var e=[],t=u.length,n=0;n<t;n++)e.push(u[n].apply(null,arguments));return c.apply(null,e)});return p.resultFunc=l,p.recomputations=function(){return s},p.resetRecomputations=function(){return s=0},p}}t.__esModule=!0,t.defaultMemoize=o,t.createSelectorCreator=a,t.createStructuredSelector=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;if("object"!==r(e))throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+r(e));var n=Object.keys(e);return t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t,r){return e[n[r]]=t,e},{})})};var s=t.createSelector=a(o)},function(e,t,n){"use strict";(function(e,r){var i,o=n(3);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var a=Object(o.a)(i);t.a=a}).call(this,n(7),n(8)(e))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return r})},function(e,t,n){(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(n){"use strict";var r,i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag",c="object"===t(e),p=n.regeneratorRuntime;if(p)c&&(e.exports=p);else{(p=n.regeneratorRuntime=c?e.exports:{}).wrap=w;var f="suspendedStart",h="suspendedYield",d="executing",y="completed",v={},m={};m[s]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(N([])));_&&_!==i&&o.call(_,s)&&(m=_);var g=S.prototype=O.prototype=Object.create(m);x.prototype=g.constructor=S,S.constructor=x,S[u]=x.displayName="GeneratorFunction",p.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===x||"GeneratorFunction"===(t.displayName||t.name))},p.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(g),e},p.awrap=function(e){return{__await:e}},P(C.prototype),C.prototype[l]=function(){return this},p.AsyncIterator=C,p.async=function(e,t,n,r){var i=new C(w(e,t,n,r));return p.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},P(g),g[u]="Generator",g[s]=function(){return this},g.toString=function(){return"[object Generator]"},p.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},p.values=N,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),v}}}function w(e,t,n,r){var i=t&&t.prototype instanceof O?t:O,o=Object.create(i.prototype),a=new j(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===y){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var l=k(e,t,n);if("normal"===l.type){if(r=n.done?y:h,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=y,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function k(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function O(){}function x(){}function S(){}function P(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function C(e){var n;this._invoke=function(r,i){function a(){return new Promise(function(n,a){!function n(r,i,a,s){var l=k(e[r],e,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"===t(c)&&o.call(c,"__await")?Promise.resolve(c.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):Promise.resolve(c).then(function(e){u.value=e,a(u)},s)}s(l.arg)}(r,i,n,a)})}return n=n?n.then(a,a):a()}}function E(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,E(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=k(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function N(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:R}}function R(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())}).call(this,n(5)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],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}}),e.webpackPolyfill=1),e}},function(e,t){
  12. /**
  13. @license @nocompile
  14. Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
  15. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  16. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  17. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  18. Code distributed by Google as part of the polymer project is also
  19. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  20. */
  21. !function(){"use strict";!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.hasOwnProperty("polyfillWrapFlushCallback")){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}}()}()},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(r=window)}e.exports=r},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){
  22. /**
  23. @license
  24. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  25. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  26. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  27. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  28. Code distributed by Google as part of the polymer project is also
  29. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  30. */
  31. function n(){document.body.removeAttribute("unresolved")}"interactive"===document.readyState||"complete"===document.readyState?n():window.addEventListener("DOMContentLoaded",n)},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"dashToCamelCase",function(){return Uo}),n.d(r,"camelToDashCase",function(){return qo});var i={};n.r(i),n.d(i,"gestures",function(){return el}),n.d(i,"recognizers",function(){return tl}),n.d(i,"deepTargetFind",function(){return nl}),n.d(i,"addListener",function(){return ol}),n.d(i,"removeListener",function(){return al}),n.d(i,"register",function(){return sl}),n.d(i,"setTouchAction",function(){return ll}),n.d(i,"prevent",function(){return cl}),n.d(i,"resetMouseCanceller",function(){return pl}),n.d(i,"findOriginalTarget",function(){return fl}),n.d(i,"add",function(){return hl}),n.d(i,"remove",function(){return dl});n(4),n(6);var o=new WeakMap,a=function(e){return"function"==typeof e&&o.has(e)},s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,l=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t;r!==n;){var i=r.nextSibling;e.removeChild(r),r=i}},u={},c={};
  32. /**
  33. * @license
  34. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  35. * This code may only be used under the BSD style license found at
  36. * http://polymer.github.io/LICENSE.txt
  37. * The complete set of authors may be found at
  38. * http://polymer.github.io/AUTHORS.txt
  39. * The complete set of contributors may be found at
  40. * http://polymer.github.io/CONTRIBUTORS.txt
  41. * Code distributed by Google as part of the polymer project is also
  42. * subject to an additional IP rights grant found at
  43. * http://polymer.github.io/PATENTS.txt
  44. */
  45. var p="{{lit-".concat(String(Math.random()).slice(2),"}}"),f="\x3c!--".concat(p,"--\x3e"),h=new RegExp("".concat(p,"|").concat(f)),d=function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.parts=[],this.element=n;var i=-1,o=0,a=[];!function e(n){for(var s=n.content,l=document.createTreeWalker(s,133,null,!1),u=0;l.nextNode();){i++;var c=l.currentNode;if(1===c.nodeType){if(c.hasAttributes()){for(var f=c.attributes,d=0,y=0;y<f.length;y++)f[y].value.indexOf(p)>=0&&d++;for(;d-- >0;){var b=t.strings[o],_=m.exec(b)[2],g=_.toLowerCase()+"$lit$",w=c.getAttribute(g).split(h);r.parts.push({type:"attribute",index:i,name:_,strings:w}),c.removeAttribute(g),o+=w.length-1}}"TEMPLATE"===c.tagName&&e(c)}else if(3===c.nodeType){var k=c.data;if(k.indexOf(p)>=0){for(var O=c.parentNode,x=k.split(h),S=x.length-1,P=0;P<S;P++)O.insertBefore(""===x[P]?v():document.createTextNode(x[P]),c),r.parts.push({type:"node",index:++i});""===x[S]?(O.insertBefore(v(),c),a.push(c)):c.data=x[S],o+=S}}else if(8===c.nodeType)if(c.data===p){var C=c.parentNode;null!==c.previousSibling&&i!==u||(i++,C.insertBefore(v(),c)),u=i,r.parts.push({type:"node",index:i}),null===c.nextSibling?c.data="":(a.push(c),i--),o++}else for(var E=-1;-1!==(E=c.data.indexOf(p,E+1));)r.parts.push({type:"node",index:-1})}}(n);for(var s=0;s<a.length;s++){var l=a[s];l.parentNode.removeChild(l)}},y=function(e){return-1!==e.index},v=function(){return document.createComment("")},m=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function b(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
  46. /**
  47. * @license
  48. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  49. * This code may only be used under the BSD style license found at
  50. * http://polymer.github.io/LICENSE.txt
  51. * The complete set of authors may be found at
  52. * http://polymer.github.io/AUTHORS.txt
  53. * The complete set of contributors may be found at
  54. * http://polymer.github.io/CONTRIBUTORS.txt
  55. * Code distributed by Google as part of the polymer project is also
  56. * subject to an additional IP rights grant found at
  57. * http://polymer.github.io/PATENTS.txt
  58. */
  59. var g=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._parts=[],this.template=t,this.processor=n,this.options=r}var t,n,r;return t=e,(n=[{key:"update",value:function(e){var t=0,n=!0,r=!1,i=void 0;try{for(var o,a=this._parts[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;void 0!==s&&s.setValue(e[t]),t++}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}var l=!0,u=!1,c=void 0;try{for(var p,f=this._parts[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var h=p.value;void 0!==h&&h.commit()}}catch(e){u=!0,c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}}},{key:"_clone",value:function(){var e=this,t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=this.template.parts,r=0,i=0;return function t(o){for(var a=document.createTreeWalker(o,133,null,!1),s=a.nextNode();r<n.length&&null!==s;){var l=n[r];if(y(l))if(i===l.index){if("node"===l.type){var u=e.processor.handleTextExpression(e.options);u.insertAfterNode(s.previousSibling),e._parts.push(u)}else{var c;(c=e._parts).push.apply(c,b(e.processor.handleAttributeExpressions(s,l.name,l.strings,e.options)))}r++}else i++,"TEMPLATE"===s.nodeName&&t(s.content),s=a.nextNode();else e._parts.push(void 0),r++}}(t),s&&(document.adoptNode(t),customElements.upgrade(t)),t}}])&&_(t.prototype,n),r&&_(t,r),e}();function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t,n){return t&&k(e.prototype,t),n&&k(e,n),e}
  60. /**
  61. * @license
  62. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  63. * This code may only be used under the BSD style license found at
  64. * http://polymer.github.io/LICENSE.txt
  65. * The complete set of authors may be found at
  66. * http://polymer.github.io/AUTHORS.txt
  67. * The complete set of contributors may be found at
  68. * http://polymer.github.io/CONTRIBUTORS.txt
  69. * Code distributed by Google as part of the polymer project is also
  70. * subject to an additional IP rights grant found at
  71. * http://polymer.github.io/PATENTS.txt
  72. */var x=function(){function e(t,n,r,i){w(this,e),this.strings=t,this.values=n,this.type=r,this.processor=i}return O(e,[{key:"getHTML",value:function(){for(var e=this.strings.length-1,t="",n=0;n<e;n++){var r=this.strings[n],i=m.exec(r);t+=i?r.substr(0,i.index)+i[1]+i[2]+"$lit$"+i[3]+p:r+f}return t+this.strings[e]}},{key:"getTemplateElement",value:function(){var e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}]),e}();function S(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function P(e,t,n){return(P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=C(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function N(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),e}function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
  73. /**
  74. * @license
  75. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  76. * This code may only be used under the BSD style license found at
  77. * http://polymer.github.io/LICENSE.txt
  78. * The complete set of authors may be found at
  79. * http://polymer.github.io/AUTHORS.txt
  80. * The complete set of contributors may be found at
  81. * http://polymer.github.io/CONTRIBUTORS.txt
  82. * Code distributed by Google as part of the polymer project is also
  83. * subject to an additional IP rights grant found at
  84. * http://polymer.github.io/PATENTS.txt
  85. */var I=function(e){return null===e||!("object"===R(e)||"function"==typeof e)},z=function(){function e(t,n,r){A(this,e),this.dirty=!0,this.element=t,this.name=n,this.strings=r,this.parts=[];for(var i=0;i<r.length-1;i++)this.parts[i]=this._createPart()}return N(e,[{key:"_createPart",value:function(){return new L(this)}},{key:"_getValue",value:function(){for(var e=this.strings,t=e.length-1,n="",r=0;r<t;r++){n+=e[r];var i=this.parts[r];if(void 0!==i){var o=i.value;if(null!=o&&(Array.isArray(o)||"string"!=typeof o&&o[Symbol.iterator])){var a=!0,s=!1,l=void 0;try{for(var u,c=o[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var p=u.value;n+="string"==typeof p?p:String(p)}}catch(e){s=!0,l=e}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}}else n+="string"==typeof o?o:String(o)}}return n+=e[t]}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}]),e}(),L=function(){function e(t){A(this,e),this.value=void 0,this.committer=t}return N(e,[{key:"setValue",value:function(e){e===u||I(e)&&e===this.value||(this.value=e,a(e)||(this.committer.dirty=!0))}},{key:"commit",value:function(){for(;a(this.value);){var e=this.value;this.value=u,e(this)}this.value!==u&&this.committer.commit()}}]),e}(),M=function(){function e(t){A(this,e),this.value=void 0,this._pendingValue=void 0,this.options=t}return N(e,[{key:"appendInto",value:function(e){this.startNode=e.appendChild(v()),this.endNode=e.appendChild(v())}},{key:"insertAfterNode",value:function(e){this.startNode=e,this.endNode=e.nextSibling}},{key:"appendIntoPart",value:function(e){e._insert(this.startNode=v()),e._insert(this.endNode=v())}},{key:"insertAfterPart",value:function(e){e._insert(this.startNode=v()),this.endNode=e.endNode,e.endNode=this.startNode}},{key:"setValue",value:function(e){this._pendingValue=e}},{key:"commit",value:function(){for(;a(this._pendingValue);){var e=this._pendingValue;this._pendingValue=u,e(this)}var t=this._pendingValue;t!==u&&(I(t)?t!==this.value&&this._commitText(t):t instanceof x?this._commitTemplateResult(t):t instanceof Node?this._commitNode(t):Array.isArray(t)||t[Symbol.iterator]?this._commitIterable(t):t===c?(this.value=c,this.clear()):this._commitText(t))}},{key:"_insert",value:function(e){this.endNode.parentNode.insertBefore(e,this.endNode)}},{key:"_commitNode",value:function(e){this.value!==e&&(this.clear(),this._insert(e),this.value=e)}},{key:"_commitText",value:function(e){var t=this.startNode.nextSibling;e=null==e?"":e,t===this.endNode.previousSibling&&3===t.nodeType?t.data=e:this._commitNode(document.createTextNode("string"==typeof e?e:String(e))),this.value=e}},{key:"_commitTemplateResult",value:function(e){var t=this.options.templateFactory(e);if(this.value instanceof g&&this.value.template===t)this.value.update(e.values);else{var n=new g(t,e.processor,this.options),r=n._clone();n.update(e.values),this._commitNode(r),this.value=n}}},{key:"_commitIterable",value:function(t){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,i=0,o=!0,a=!1,s=void 0;try{for(var l,u=t[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;void 0===(n=r[i])&&(n=new e(this.options),r.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(r[i-1])),n.setValue(c),n.commit(),i++}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}i<r.length&&(r.length=i,this.clear(n&&n.endNode))}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.startNode;l(this.startNode.parentNode,e.nextSibling,this.endNode)}}]),e}(),D=function(){function e(t,n,r){if(A(this,e),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=t,this.name=n,this.strings=r}return N(e,[{key:"setValue",value:function(e){this._pendingValue=e}},{key:"commit",value:function(){for(;a(this._pendingValue);){var e=this._pendingValue;this._pendingValue=u,e(this)}if(this._pendingValue!==u){var t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=u}}}]),e}(),F=function(e){function t(e,n,r){var i;return A(this,t),(i=S(this,C(t).call(this,e,n,r))).single=2===r.length&&""===r[0]&&""===r[1],i}return E(t,z),N(t,[{key:"_createPart",value:function(){return new B(this)}},{key:"_getValue",value:function(){return this.single?this.parts[0].value:P(C(t.prototype),"_getValue",this).call(this)}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]),t}(),B=function(e){function t(){return A(this,t),S(this,C(t).apply(this,arguments))}return E(t,L),t}(),H=!1;try{var K={get capture(){return H=!0,!1}};window.addEventListener("test",K,K),window.removeEventListener("test",K,K)}catch(e){}var V=function(){function e(t,n,r){var i=this;A(this,e),this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=n,this.eventContext=r,this._boundHandleEvent=function(e){return i.handleEvent(e)}}return N(e,[{key:"setValue",value:function(e){this._pendingValue=e}},{key:"commit",value:function(){for(;a(this._pendingValue);){var e=this._pendingValue;this._pendingValue=u,e(this)}if(this._pendingValue!==u){var t=this._pendingValue,n=this.value,r=null==t||null!=n&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=null!=t&&(null==n||r);r&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),i&&(this._options=U(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=u}}},{key:"handleEvent",value:function(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}]),e}(),U=function(e){return e&&(H?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)};function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
  86. /**
  87. * @license
  88. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  89. * This code may only be used under the BSD style license found at
  90. * http://polymer.github.io/LICENSE.txt
  91. * The complete set of authors may be found at
  92. * http://polymer.github.io/AUTHORS.txt
  93. * The complete set of contributors may be found at
  94. * http://polymer.github.io/CONTRIBUTORS.txt
  95. * Code distributed by Google as part of the polymer project is also
  96. * subject to an additional IP rights grant found at
  97. * http://polymer.github.io/PATENTS.txt
  98. */
  99. var Y=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"handleAttributeExpressions",value:function(e,t,n,r){var i=t[0];return"."===i?new F(e,t.slice(1),n).parts:"@"===i?[new V(e,t.slice(1),r.eventContext)]:"?"===i?[new D(e,t.slice(1),n)]:new z(e,t,n).parts}},{key:"handleTextExpression",value:function(e){return new M(e)}}])&&q(t.prototype,n),r&&q(t,r),e}());
  100. /**
  101. * @license
  102. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  103. * This code may only be used under the BSD style license found at
  104. * http://polymer.github.io/LICENSE.txt
  105. * The complete set of authors may be found at
  106. * http://polymer.github.io/AUTHORS.txt
  107. * The complete set of contributors may be found at
  108. * http://polymer.github.io/CONTRIBUTORS.txt
  109. * Code distributed by Google as part of the polymer project is also
  110. * subject to an additional IP rights grant found at
  111. * http://polymer.github.io/PATENTS.txt
  112. */
  113. function W(e){var t=G.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},G.set(e.type,t));var n=t.stringsArray.get(e.strings);if(void 0!==n)return n;var r=e.strings.join(p);return void 0===(n=t.keyString.get(r))&&(n=new d(e,e.getTemplateElement()),t.keyString.set(r,n)),t.stringsArray.set(e.strings,n),n}var G=new Map,X=new WeakMap;
  114. /**
  115. * @license
  116. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  117. * This code may only be used under the BSD style license found at
  118. * http://polymer.github.io/LICENSE.txt
  119. * The complete set of authors may be found at
  120. * http://polymer.github.io/AUTHORS.txt
  121. * The complete set of contributors may be found at
  122. * http://polymer.github.io/CONTRIBUTORS.txt
  123. * Code distributed by Google as part of the polymer project is also
  124. * subject to an additional IP rights grant found at
  125. * http://polymer.github.io/PATENTS.txt
  126. */
  127. /**
  128. * @license
  129. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  130. * This code may only be used under the BSD style license found at
  131. * http://polymer.github.io/LICENSE.txt
  132. * The complete set of authors may be found at
  133. * http://polymer.github.io/AUTHORS.txt
  134. * The complete set of contributors may be found at
  135. * http://polymer.github.io/CONTRIBUTORS.txt
  136. * Code distributed by Google as part of the polymer project is also
  137. * subject to an additional IP rights grant found at
  138. * http://polymer.github.io/PATENTS.txt
  139. */
  140. (window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");var $=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new x(e,n,"html",Y)},J=133;function Z(e,t){for(var n=e.element.content,r=e.parts,i=document.createTreeWalker(n,J,null,!1),o=ee(r),a=r[o],s=-1,l=0,u=[],c=null;i.nextNode();){s++;var p=i.currentNode;for(p.previousSibling===c&&(c=null),t.has(p)&&(u.push(p),null===c&&(c=p)),null!==c&&l++;void 0!==a&&a.index===s;)a.index=null!==c?-1:a.index-l,a=r[o=ee(r,o)]}u.forEach(function(e){return e.parentNode.removeChild(e)})}var Q=function(e){for(var t=11===e.nodeType?0:1,n=document.createTreeWalker(e,J,null,!1);n.nextNode();)t++;return t},ee=function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1)+1;t<e.length;t++){var n=e[t];if(y(n))return t}return-1};
  141. /**
  142. * @license
  143. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  144. * This code may only be used under the BSD style license found at
  145. * http://polymer.github.io/LICENSE.txt
  146. * The complete set of authors may be found at
  147. * http://polymer.github.io/AUTHORS.txt
  148. * The complete set of contributors may be found at
  149. * http://polymer.github.io/CONTRIBUTORS.txt
  150. * Code distributed by Google as part of the polymer project is also
  151. * subject to an additional IP rights grant found at
  152. * http://polymer.github.io/PATENTS.txt
  153. */
  154. var te=function(e,t){return"".concat(e,"--").concat(t)},ne=!0;void 0===window.ShadyCSS?ne=!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."),ne=!1);var re=function(e){return function(t){var n=te(t.type,e),r=G.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},G.set(n,r));var i=r.stringsArray.get(t.strings);if(void 0!==i)return i;var o=t.strings.join(p);if(void 0===(i=r.keyString.get(o))){var a=t.getTemplateElement();ne&&window.ShadyCSS.prepareTemplateDom(a,e),i=new d(t,a),r.keyString.set(o,i)}return r.stringsArray.set(t.strings,i),i}},ie=["html","svg"],oe=new Set,ae=function(e,t,n){oe.add(n);var r=e.querySelectorAll("style");if(0!==r.length){for(var i=document.createElement("style"),o=0;o<r.length;o++){var a=r[o];a.parentNode.removeChild(a),i.textContent+=a.textContent}if(function(e){ie.forEach(function(t){var n=G.get(te(t,e));void 0!==n&&n.keyString.forEach(function(e){var t=e.element.content,n=new Set;Array.from(t.querySelectorAll("style")).forEach(function(e){n.add(e)}),Z(e,n)})})}(n),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=e.element.content,i=e.parts;if(null!=n)for(var o=document.createTreeWalker(r,J,null,!1),a=ee(i),s=0,l=-1;o.nextNode();)for(l++,o.currentNode===n&&(s=Q(t),n.parentNode.insertBefore(t,n));-1!==a&&i[a].index===l;){if(s>0){for(;-1!==a;)i[a].index+=s,a=ee(i,a);return}a=ee(i,a)}else r.appendChild(t)}(t,i,t.element.content.firstChild),window.ShadyCSS.prepareTemplateStyles(t.element,n),window.ShadyCSS.nativeShadow){var s=t.element.content.querySelector("style");e.insertBefore(s.cloneNode(!0),e.firstChild)}else{t.element.content.insertBefore(i,t.element.content.firstChild);var l=new Set;l.add(i),Z(t,l)}}else window.ShadyCSS.prepareTemplateStyles(t.element,n)};function se(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fe(e){var t="function"==typeof Map?new Map:void 0;return(fe=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return he(e,arguments,ye(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),de(r,e)})(e)}function he(e,t,n){return(he=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(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&de(i,n.prototype),i}).apply(null,arguments)}function de(e,t){return(de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ye(e){return(ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
  155. /**
  156. * @license
  157. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  158. * This code may only be used under the BSD style license found at
  159. * http://polymer.github.io/LICENSE.txt
  160. * The complete set of authors may be found at
  161. * http://polymer.github.io/AUTHORS.txt
  162. * The complete set of contributors may be found at
  163. * http://polymer.github.io/CONTRIBUTORS.txt
  164. * Code distributed by Google as part of the polymer project is also
  165. * subject to an additional IP rights grant found at
  166. * http://polymer.github.io/PATENTS.txt
  167. */window.JSCompiler_renameProperty=function(e,t){return e};var ve={toAttribute:function(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute:function(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},me=function(e,t){return t!==e&&(t==t||e==e)},be={attribute:!0,type:String,converter:ve,reflect:!1,hasChanged:me},_e=Promise.resolve(!0),ge=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=pe(this,ye(t).call(this)))._updateState=0,e._instanceProperties=void 0,e._updatePromise=_e,e._hasConnectedResolver=void 0,e._changedProperties=new Map,e._reflectingProperties=void 0,e.initialize(),e}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&de(e,t)}(t,fe(HTMLElement)),n=t,r=[{key:"initialize",value:function(){this._saveInstanceProperties()}},{key:"_saveInstanceProperties",value:function(){var e=this;this.constructor._classProperties.forEach(function(t,n){if(e.hasOwnProperty(n)){var r=e[n];delete e[n],e._instanceProperties||(e._instanceProperties=new Map),e._instanceProperties.set(n,r)}})}},{key:"_applyInstanceProperties",value:function(){var e=this;this._instanceProperties.forEach(function(t,n){return e[n]=t}),this._instanceProperties=void 0}},{key:"connectedCallback",value:function(){this._updateState=32|this._updateState,this._hasConnectedResolver?(this._hasConnectedResolver(),this._hasConnectedResolver=void 0):this.requestUpdate()}},{key:"disconnectedCallback",value:function(){}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&this._attributeToProperty(e,n)}},{key:"_propertyToAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be,r=this.constructor,i=r._attributeNameForProperty(e,n);if(void 0!==i){var o=r._propertyValueToAttribute(t,n);if(void 0===o)return;this._updateState=8|this._updateState,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._updateState=-9&this._updateState}}},{key:"_attributeToProperty",value:function(e,t){if(!(8&this._updateState)){var n=this.constructor,r=n._attributeToPropertyMap.get(e);if(void 0!==r){var i=n._classProperties.get(r)||be;this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(t,i),this._updateState=-17&this._updateState}}}},{key:"requestUpdate",value:function(e,t){var n=!0;if(void 0!==e&&!this._changedProperties.has(e)){var r=this.constructor,i=r._classProperties.get(e)||be;r._valueHasChanged(this[e],t,i.hasChanged)?(this._changedProperties.set(e,t),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,i))):n=!1}return!this._hasRequestedUpdate&&n&&this._enqueueUpdate(),this.updateComplete}},{key:"_enqueueUpdate",value:function(){var e,t=(e=regeneratorRuntime.mark(function e(){var t,n,r,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._updateState=4|this._updateState,n=this._updatePromise,this._updatePromise=new Promise(function(e){return t=e}),e.next=5,n;case 5:if(this._hasConnected){e.next=8;break}return e.next=8,new Promise(function(e){return i._hasConnectedResolver=e});case 8:if(null==(r=this.performUpdate())||"function"!=typeof r.then){e.next=12;break}return e.next=12,r;case 12:t(!this._hasRequestedUpdate);case 13:case"end":return e.stop()}},e,this)}),function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){ue(o,r,i,a,s,"next",e)}function s(e){ue(o,r,i,a,s,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}()},{key:"performUpdate",value:function(){if(this._instanceProperties&&this._applyInstanceProperties(),this.shouldUpdate(this._changedProperties)){var e=this._changedProperties;this.update(e),this._markUpdated(),1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e)}else this._markUpdated()}},{key:"_markUpdated",value:function(){this._changedProperties=new Map,this._updateState=-5&this._updateState}},{key:"shouldUpdate",value:function(e){return!0}},{key:"update",value:function(e){var t=this;void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(function(e,n){return t._propertyToAttribute(n,t[n],e)}),this._reflectingProperties=void 0)}},{key:"updated",value:function(e){}},{key:"firstUpdated",value:function(e){}},{key:"_hasConnected",get:function(){return 32&this._updateState}},{key:"_hasRequestedUpdate",get:function(){return 4&this._updateState}},{key:"hasUpdated",get:function(){return 1&this._updateState}},{key:"updateComplete",get:function(){return this._updatePromise}}],i=[{key:"_ensureClassProperties",value:function(){var e=this;if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;var t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach(function(t,n){return e._classProperties.set(n,t)})}}},{key:"createProperty",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be;if(this._ensureClassProperties(),this._classProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){var n="symbol"===le(e)?Symbol():"__".concat(e);Object.defineProperty(this.prototype,e,{get:function(){return this[n]},set:function(t){var r=this[e];this[n]=t,this.requestUpdate(e,r)},configurable:!0,enumerable:!0})}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("finalized",this))||!this.finalized){var e=Object.getPrototypeOf(this);if("function"==typeof e.finalize&&e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){var t=this.properties,n=se(Object.getOwnPropertyNames(t)).concat(se("function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[])),r=!0,i=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value;this.createProperty(l,t[l])}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}}}}},{key:"_attributeNameForProperty",value:function(e,t){var n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}},{key:"_valueHasChanged",value:function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:me)(e,t)}},{key:"_propertyValueFromAttribute",value:function(e,t){var n=t.type,r=t.converter||ve,i="function"==typeof r?r:r.fromAttribute;return i?i(e,n):e}},{key:"_propertyValueToAttribute",value:function(e,t){if(void 0!==t.reflect){var n=t.type,r=t.converter;return(r&&r.toAttribute||ve.toAttribute)(e,n)}}},{key:"observedAttributes",get:function(){var e=this;this.finalize();var t=[];return this._classProperties.forEach(function(n,r){var i=e._attributeNameForProperty(r,n);void 0!==i&&(e._attributeToPropertyMap.set(i,r),t.push(i))}),t}}],r&&ce(n.prototype,r),i&&ce(n,i),t}();ge.finalized=!0;Oe(function(e,t){return e.querySelector(t)}),Oe(function(e,t){return e.querySelectorAll(t)});var we=function(e,t,n){Object.defineProperty(t,n,e)},ke=function(e,t){return{kind:"method",placement:"prototype",key:t.key,descriptor:e}};function Oe(e){return function(t){return function(n,r){var i={get:function(){return e(this.renderRoot,t)},enumerable:!0,configurable:!0};return void 0!==r?we(i,n,r):ke(i,n)}}}
  168. /**
  169. @license
  170. Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
  171. This code may only be used under the BSD style license found at
  172. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  173. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  174. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  175. part of the polymer project is also subject to an additional IP rights grant
  176. found at http://polymer.github.io/PATENTS.txt
  177. */
  178. var xe="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;Symbol();function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t){return!t||"object"!==Se(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ee(e,t,n){return(Ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Te(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Te(e){return(Te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  179. /**
  180. * @license
  181. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  182. * This code may only be used under the BSD style license found at
  183. * http://polymer.github.io/LICENSE.txt
  184. * The complete set of authors may be found at
  185. * http://polymer.github.io/AUTHORS.txt
  186. * The complete set of contributors may be found at
  187. * http://polymer.github.io/CONTRIBUTORS.txt
  188. * Code distributed by Google as part of the polymer project is also
  189. * subject to an additional IP rights grant found at
  190. * http://polymer.github.io/PATENTS.txt
  191. */
  192. /**
  193. * @license
  194. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  195. * This code may only be used under the BSD style license found at
  196. * http://polymer.github.io/LICENSE.txt
  197. * The complete set of authors may be found at
  198. * http://polymer.github.io/AUTHORS.txt
  199. * The complete set of contributors may be found at
  200. * http://polymer.github.io/CONTRIBUTORS.txt
  201. * Code distributed by Google as part of the polymer project is also
  202. * subject to an additional IP rights grant found at
  203. * http://polymer.github.io/PATENTS.txt
  204. */
  205. (window.litElementVersions||(window.litElementVersions=[])).push("2.0.1");var je=function(e){return e.flat?e.flat(1/0):function e(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=0,i=t.length;r<i;r++){var o=t[r];Array.isArray(o)?e(o,n):n.push(o)}return n}(e)},Ne=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ce(this,Te(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ae(e,t)}(t,ge),n=t,i=[{key:"finalize",value:function(){Ee(Te(t),"finalize",this).call(this),this._styles=this.hasOwnProperty(JSCompiler_renameProperty("styles",this))?this._getUniqueStyles():this._styles||[]}},{key:"_getUniqueStyles",value:function(){var e=this.styles,t=[];Array.isArray(e)?je(e).reduceRight(function(e,t){return e.add(t),e},new Set).forEach(function(e){return t.unshift(e)}):e&&t.push(e);return t}}],(r=[{key:"initialize",value:function(){Ee(Te(t.prototype),"initialize",this).call(this),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}},{key:"createRenderRoot",value:function(){return this.attachShadow({mode:"open"})}},{key:"adoptStyles",value:function(){var e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?xe?this.renderRoot.adoptedStyleSheets=e.map(function(e){return e.styleSheet}):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(function(e){return e.cssText}),this.localName))}},{key:"connectedCallback",value:function(){Ee(Te(t.prototype),"connectedCallback",this).call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}},{key:"update",value:function(e){var n=this;Ee(Te(t.prototype),"update",this).call(this,e);var r=this.render();r instanceof x&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(function(e){var t=document.createElement("style");t.textContent=e.cssText,n.renderRoot.appendChild(t)}))}},{key:"render",value:function(){}}])&&Pe(n.prototype,r),i&&Pe(n,i),t}();Ne.finalized=!0,Ne.render=function(e,t,n){var r=n.scopeName,i=X.has(t),o=t instanceof ShadowRoot&&ne&&e instanceof x,a=o&&!oe.has(r),s=a?document.createDocumentFragment():t;if(function(e,t,n){var r=X.get(t);void 0===r&&(l(t,t.firstChild),X.set(t,r=new M(Object.assign({templateFactory:W},n))),r.appendInto(t)),r.setValue(e),r.commit()}(e,s,Object.assign({templateFactory:re(r)},n)),a){var u=X.get(s);X.delete(s),u.value instanceof g&&ae(s,u.value.template,r),l(t,t.firstChild),t.appendChild(s),X.set(t,u)}!i&&o&&window.ShadyCSS.styleElement(t.host)};
  206. /**
  207. * @license
  208. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  209. * This code may only be used under the BSD style license found at
  210. * http://polymer.github.io/LICENSE.txt
  211. * The complete set of authors may be found at
  212. * http://polymer.github.io/AUTHORS.txt
  213. * The complete set of contributors may be found at
  214. * http://polymer.github.io/CONTRIBUTORS.txt
  215. * Code distributed by Google as part of the polymer project is also
  216. * subject to an additional IP rights grant found at
  217. * http://polymer.github.io/PATENTS.txt
  218. */
  219. var Re=new WeakMap,Ie=function(e){return"function"==typeof e&&Re.has(e)},ze=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,Le=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=t;i!==n;){var o=i.nextSibling;e.insertBefore(i,r),i=o}},Me=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t;r!==n;){var i=r.nextSibling;e.removeChild(r),r=i}},De={},Fe={};
  220. /**
  221. * @license
  222. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  223. * This code may only be used under the BSD style license found at
  224. * http://polymer.github.io/LICENSE.txt
  225. * The complete set of authors may be found at
  226. * http://polymer.github.io/AUTHORS.txt
  227. * The complete set of contributors may be found at
  228. * http://polymer.github.io/CONTRIBUTORS.txt
  229. * Code distributed by Google as part of the polymer project is also
  230. * subject to an additional IP rights grant found at
  231. * http://polymer.github.io/PATENTS.txt
  232. */
  233. var Be="{{lit-".concat(String(Math.random()).slice(2),"}}"),He="\x3c!--".concat(Be,"--\x3e"),Ke=(new RegExp("".concat(Be,"|").concat(He)),function(e){return-1!==e.index}),Ve=function(){return document.createComment("")},Ue=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function qe(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
  234. /**
  235. * @license
  236. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  237. * This code may only be used under the BSD style license found at
  238. * http://polymer.github.io/LICENSE.txt
  239. * The complete set of authors may be found at
  240. * http://polymer.github.io/AUTHORS.txt
  241. * The complete set of contributors may be found at
  242. * http://polymer.github.io/CONTRIBUTORS.txt
  243. * Code distributed by Google as part of the polymer project is also
  244. * subject to an additional IP rights grant found at
  245. * http://polymer.github.io/PATENTS.txt
  246. */
  247. var We=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._parts=[],this.template=t,this.processor=n,this.options=r}var t,n,r;return t=e,(n=[{key:"update",value:function(e){var t=0,n=!0,r=!1,i=void 0;try{for(var o,a=this._parts[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;void 0!==s&&s.setValue(e[t]),t++}}catch(e){r=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}var l=!0,u=!1,c=void 0;try{for(var p,f=this._parts[Symbol.iterator]();!(l=(p=f.next()).done);l=!0){var h=p.value;void 0!==h&&h.commit()}}catch(e){u=!0,c=e}finally{try{l||null==f.return||f.return()}finally{if(u)throw c}}}},{key:"_clone",value:function(){var e=this,t=ze?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=this.template.parts,r=0,i=0;return function t(o){for(var a=document.createTreeWalker(o,133,null,!1),s=a.nextNode();r<n.length&&null!==s;){var l=n[r];if(Ke(l))if(i===l.index){if("node"===l.type){var u=e.processor.handleTextExpression(e.options);u.insertAfterNode(s.previousSibling),e._parts.push(u)}else{var c;(c=e._parts).push.apply(c,qe(e.processor.handleAttributeExpressions(s,l.name,l.strings,e.options)))}r++}else i++,"TEMPLATE"===s.nodeName&&t(s.content),s=a.nextNode();else e._parts.push(void 0),r++}}(t),ze&&(document.adoptNode(t),customElements.upgrade(t)),t}}])&&Ye(t.prototype,n),r&&Ye(t,r),e}();function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $e(e,t,n){return t&&Xe(e.prototype,t),n&&Xe(e,n),e}
  248. /**
  249. * @license
  250. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  251. * This code may only be used under the BSD style license found at
  252. * http://polymer.github.io/LICENSE.txt
  253. * The complete set of authors may be found at
  254. * http://polymer.github.io/AUTHORS.txt
  255. * The complete set of contributors may be found at
  256. * http://polymer.github.io/CONTRIBUTORS.txt
  257. * Code distributed by Google as part of the polymer project is also
  258. * subject to an additional IP rights grant found at
  259. * http://polymer.github.io/PATENTS.txt
  260. */var Je=function(){function e(t,n,r,i){Ge(this,e),this.strings=t,this.values=n,this.type=r,this.processor=i}return $e(e,[{key:"getHTML",value:function(){for(var e=this.strings.length-1,t="",n=0;n<e;n++){var r=this.strings[n],i=Ue.exec(r);t+=i?r.substr(0,i.index)+i[1]+i[2]+"$lit$"+i[3]+Be:r+He}return t+this.strings[e]}},{key:"getTemplateElement",value:function(){var e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}]),e}();function Ze(e,t){return!t||"object"!==at(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qe(e,t,n){return(Qe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=et(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nt(e,t)}function nt(e,t){return(nt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ot(e,t,n){return t&&it(e.prototype,t),n&&it(e,n),e}function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
  261. /**
  262. * @license
  263. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  264. * This code may only be used under the BSD style license found at
  265. * http://polymer.github.io/LICENSE.txt
  266. * The complete set of authors may be found at
  267. * http://polymer.github.io/AUTHORS.txt
  268. * The complete set of contributors may be found at
  269. * http://polymer.github.io/CONTRIBUTORS.txt
  270. * Code distributed by Google as part of the polymer project is also
  271. * subject to an additional IP rights grant found at
  272. * http://polymer.github.io/PATENTS.txt
  273. */var st=function(e){return null===e||!("object"===at(e)||"function"==typeof e)},lt=function(){function e(t,n,r){rt(this,e),this.dirty=!0,this.element=t,this.name=n,this.strings=r,this.parts=[];for(var i=0;i<r.length-1;i++)this.parts[i]=this._createPart()}return ot(e,[{key:"_createPart",value:function(){return new ut(this)}},{key:"_getValue",value:function(){for(var e=this.strings,t=e.length-1,n="",r=0;r<t;r++){n+=e[r];var i=this.parts[r];if(void 0!==i){var o=i.value;if(null!=o&&(Array.isArray(o)||"string"!=typeof o&&o[Symbol.iterator])){var a=!0,s=!1,l=void 0;try{for(var u,c=o[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var p=u.value;n+="string"==typeof p?p:String(p)}}catch(e){s=!0,l=e}finally{try{a||null==c.return||c.return()}finally{if(s)throw l}}}else n+="string"==typeof o?o:String(o)}}return n+=e[t]}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}]),e}(),ut=function(){function e(t){rt(this,e),this.value=void 0,this.committer=t}return ot(e,[{key:"setValue",value:function(e){e===De||st(e)&&e===this.value||(this.value=e,Ie(e)||(this.committer.dirty=!0))}},{key:"commit",value:function(){for(;Ie(this.value);){var e=this.value;this.value=De,e(this)}this.value!==De&&this.committer.commit()}}]),e}(),ct=function(){function e(t){rt(this,e),this.value=void 0,this._pendingValue=void 0,this.options=t}return ot(e,[{key:"appendInto",value:function(e){this.startNode=e.appendChild(Ve()),this.endNode=e.appendChild(Ve())}},{key:"insertAfterNode",value:function(e){this.startNode=e,this.endNode=e.nextSibling}},{key:"appendIntoPart",value:function(e){e._insert(this.startNode=Ve()),e._insert(this.endNode=Ve())}},{key:"insertAfterPart",value:function(e){e._insert(this.startNode=Ve()),this.endNode=e.endNode,e.endNode=this.startNode}},{key:"setValue",value:function(e){this._pendingValue=e}},{key:"commit",value:function(){for(;Ie(this._pendingValue);){var e=this._pendingValue;this._pendingValue=De,e(this)}var t=this._pendingValue;t!==De&&(st(t)?t!==this.value&&this._commitText(t):t instanceof Je?this._commitTemplateResult(t):t instanceof Node?this._commitNode(t):Array.isArray(t)||t[Symbol.iterator]?this._commitIterable(t):t===Fe?(this.value=Fe,this.clear()):this._commitText(t))}},{key:"_insert",value:function(e){this.endNode.parentNode.insertBefore(e,this.endNode)}},{key:"_commitNode",value:function(e){this.value!==e&&(this.clear(),this._insert(e),this.value=e)}},{key:"_commitText",value:function(e){var t=this.startNode.nextSibling;e=null==e?"":e,t===this.endNode.previousSibling&&3===t.nodeType?t.data=e:this._commitNode(document.createTextNode("string"==typeof e?e:String(e))),this.value=e}},{key:"_commitTemplateResult",value:function(e){var t=this.options.templateFactory(e);if(this.value instanceof We&&this.value.template===t)this.value.update(e.values);else{var n=new We(t,e.processor,this.options),r=n._clone();n.update(e.values),this._commitNode(r),this.value=n}}},{key:"_commitIterable",value:function(t){Array.isArray(this.value)||(this.value=[],this.clear());var n,r=this.value,i=0,o=!0,a=!1,s=void 0;try{for(var l,u=t[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var c=l.value;void 0===(n=r[i])&&(n=new e(this.options),r.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(r[i-1])),n.setValue(c),n.commit(),i++}}catch(e){a=!0,s=e}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}i<r.length&&(r.length=i,this.clear(n&&n.endNode))}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.startNode;Me(this.startNode.parentNode,e.nextSibling,this.endNode)}}]),e}(),pt=function(){function e(t,n,r){if(rt(this,e),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=t,this.name=n,this.strings=r}return ot(e,[{key:"setValue",value:function(e){this._pendingValue=e}},{key:"commit",value:function(){for(;Ie(this._pendingValue);){var e=this._pendingValue;this._pendingValue=De,e(this)}if(this._pendingValue!==De){var t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=De}}}]),e}(),ft=function(e){function t(e,n,r){var i;return rt(this,t),(i=Ze(this,et(t).call(this,e,n,r))).single=2===r.length&&""===r[0]&&""===r[1],i}return tt(t,lt),ot(t,[{key:"_createPart",value:function(){return new ht(this)}},{key:"_getValue",value:function(){return this.single?this.parts[0].value:Qe(et(t.prototype),"_getValue",this).call(this)}},{key:"commit",value:function(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}]),t}(),ht=function(e){function t(){return rt(this,t),Ze(this,et(t).apply(this,arguments))}return tt(t,ut),t}(),dt=!1;try{var yt={get capture(){return dt=!0,!1}};window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,yt)}catch(e){}var vt=function(){function e(t,n,r){var i=this;rt(this,e),this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=n,this.eventContext=r,this._boundHandleEvent=function(e){return i.handleEvent(e)}}return ot(e,[{key:"setValue",value:function(e){this._pendingValue=e}},{key:"commit",value:function(){for(;Ie(this._pendingValue);){var e=this._pendingValue;this._pendingValue=De,e(this)}if(this._pendingValue!==De){var t=this._pendingValue,n=this.value,r=null==t||null!=n&&(t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive),i=null!=t&&(null==n||r);r&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),i&&(this._options=mt(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=De}}},{key:"handleEvent",value:function(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}]),e}(),mt=function(e){return e&&(dt?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)};function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
  274. /**
  275. * @license
  276. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  277. * This code may only be used under the BSD style license found at
  278. * http://polymer.github.io/LICENSE.txt
  279. * The complete set of authors may be found at
  280. * http://polymer.github.io/AUTHORS.txt
  281. * The complete set of contributors may be found at
  282. * http://polymer.github.io/CONTRIBUTORS.txt
  283. * Code distributed by Google as part of the polymer project is also
  284. * subject to an additional IP rights grant found at
  285. * http://polymer.github.io/PATENTS.txt
  286. */
  287. new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"handleAttributeExpressions",value:function(e,t,n,r){var i=t[0];return"."===i?new ft(e,t.slice(1),n).parts:"@"===i?[new vt(e,t.slice(1),r.eventContext)]:"?"===i?[new pt(e,t.slice(1),n)]:new lt(e,t,n).parts}},{key:"handleTextExpression",value:function(e){return new ct(e)}}])&&bt(t.prototype,n),r&&bt(t,r),e}());new Map,new WeakMap;
  288. /**
  289. * @license
  290. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  291. * This code may only be used under the BSD style license found at
  292. * http://polymer.github.io/LICENSE.txt
  293. * The complete set of authors may be found at
  294. * http://polymer.github.io/AUTHORS.txt
  295. * The complete set of contributors may be found at
  296. * http://polymer.github.io/CONTRIBUTORS.txt
  297. * Code distributed by Google as part of the polymer project is also
  298. * subject to an additional IP rights grant found at
  299. * http://polymer.github.io/PATENTS.txt
  300. */
  301. /**
  302. * @license
  303. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  304. * This code may only be used under the BSD style license found at
  305. * http://polymer.github.io/LICENSE.txt
  306. * The complete set of authors may be found at
  307. * http://polymer.github.io/AUTHORS.txt
  308. * The complete set of contributors may be found at
  309. * http://polymer.github.io/CONTRIBUTORS.txt
  310. * Code distributed by Google as part of the polymer project is also
  311. * subject to an additional IP rights grant found at
  312. * http://polymer.github.io/PATENTS.txt
  313. */
  314. (window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");var _t,gt=function(e,t){var n=e.startNode.parentNode,r=void 0===t?e.endNode:t.startNode,i=n.insertBefore(Ve(),r);n.insertBefore(Ve(),r);var o=new ct(e.options);return o.insertAfterNode(i),o},wt=function(e,t){return e.setValue(t),e.commit(),e},kt=function(e,t,n){var r=e.startNode.parentNode,i=n?n.startNode:e.endNode,o=t.endNode.nextSibling;o!==i&&Le(r,t.startNode,o,i)},Ot=function(e){Me(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},xt=function(e,t,n){for(var r=new Map,i=t;i<=n;i++)r.set(e[i],i);return r},St=new WeakMap,Pt=new WeakMap;_t=function(e,t,n){var r;return void 0===n?n=t:void 0!==t&&(r=t),function(t){if(!(t instanceof ct))throw new Error("repeat can only be used in text bindings");var i,o,a=St.get(t)||[],s=Pt.get(t)||[],l=[],u=[],c=[],p=0,f=!0,h=!1,d=void 0;try{for(var y,v=e[Symbol.iterator]();!(f=(y=v.next()).done);f=!0){var m=y.value;c[p]=r?r(m,p):p,u[p]=n(m,p),p++}}catch(e){h=!0,d=e}finally{try{f||null==v.return||v.return()}finally{if(h)throw d}}for(var b=0,_=a.length-1,g=0,w=u.length-1;b<=_&&g<=w;)if(null===a[b])b++;else if(null===a[_])_--;else if(s[b]===c[g])l[g]=wt(a[b],u[g]),b++,g++;else if(s[_]===c[w])l[w]=wt(a[_],u[w]),_--,w--;else if(s[b]===c[w])l[w]=wt(a[b],u[w]),kt(t,a[b],l[w+1]),b++,w--;else if(s[_]===c[g])l[g]=wt(a[_],u[g]),kt(t,a[_],a[b]),_--,g++;else if(void 0===i&&(i=xt(c,g,w),o=xt(s,b,_)),i.has(s[b]))if(i.has(s[_])){var k=o.get(c[g]),O=void 0!==k?a[k]:null;if(null===O){var x=gt(t,a[b]);wt(x,u[g]),l[g]=x}else l[g]=wt(O,u[g]),kt(t,O,a[b]),a[k]=null;g++}else Ot(a[_]),_--;else Ot(a[b]),b++;for(;g<=w;){var S=gt(t,l[w+1]);wt(S,u[g]),l[g++]=S}for(;b<=_;){var P=a[b++];null!==P&&Ot(P)}St.set(t,l),Pt.set(t,c)}};function Ct(){var e=Mt(['<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24"><path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"/><path d="M0 0h24v24H0z" fill="none"/></svg>']);return Ct=function(){return e},e}function Et(){var e=Mt(['<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg>']);return Et=function(){return e},e}function Tt(){var e=Mt(['<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"/></svg>']);return Tt=function(){return e},e}function At(){var e=Mt(['<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" viewBox="0 0 24 24" id="svg4248" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="baseline-flash_off-24px.svg"> <metadata id="metadata4258"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <defs id="defs4256" /> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1535" inkscape:window-height="876" id="namedview4254" showgrid="false" inkscape:zoom="9.8333333" inkscape:cx="-3.0508475" inkscape:cy="12" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg4248" /> <path d="M0 0h24v24H0z" fill="none" id="path4250" /> <path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z" id="path4252" style="fill:#b70000;fill-opacity:1" /> </svg>']);return At=function(){return e},e}function jt(){var e=Mt(['<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" viewBox="0 0 24 24" id="svg3386" version="1.1" inkscape:version="0.91 r13725" sodipodi:docname="baseline-flash_on-24px.svg"> <metadata id="metadata3396"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <defs id="defs3394" /> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1535" inkscape:window-height="876" id="namedview3392" showgrid="false" inkscape:zoom="30.791667" inkscape:cx="7.1935047" inkscape:cy="12" inkscape:window-x="65" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg3386" /> <path d="M0 0h24v24H0z" fill="none" id="path3388" /> <path d="M7 2v11h3v9l7-12h-4l4-8z" id="path3390" style="fill:#009c00;fill-opacity:1" /> </svg>']);return jt=function(){return e},e}function Nt(){var e=Mt(['<svg height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>']);return Nt=function(){return e},e}function Rt(){var e=Mt(['<svg height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></svg>']);return Rt=function(){return e},e}function It(){var e=Mt(['<svg height="24" viewBox="0 0 24 24" width="24"><path d="M22.73 22.73L2.77 2.77 2 2l-.73-.73L0 2.54l4.39 4.39 2.21 4.66-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h7.46l1.38 1.38c-.5.36-.83.95-.83 1.62 0 1.1.89 2 1.99 2 .67 0 1.26-.33 1.62-.84L21.46 24l1.27-1.27zM7.42 15c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h2.36l2 2H7.42zm8.13-2c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H6.54l9.01 9zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>']);return It=function(){return e},e}function zt(){var e=Mt(['<svg height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0zm18.31 6l-2.76 5z" fill="none"/><path id="cart-path" d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></svg>']);return zt=function(){return e},e}function Lt(){var e=Mt(['<svg height="24" viewBox="0 0 24 24" width="24"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></svg>']);return Lt=function(){return e},e}function Mt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}$(Lt()),$(zt()),$(It()),$(Rt()),$(Nt());var Dt=$(jt()),Ft=$(At()),Bt=($(Tt()),$(Et()),$(Ct()),n(2));function Ht(e){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Kt=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Kt(),REPLACE:"@@redux/REPLACE"+Kt(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Kt()}};function Ut(e){if("object"!==Ht(e)||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function qt(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function Gt(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var Xt=Gt();Xt.withExtraArgument=Gt;var $t,Jt=Xt,Zt=function(e){return function(t){var n=window.hostUrl+"/api/pos/login/"+e;fetch(n,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(e){"Ok"==e.status?t({type:"LOGIN",isLogin:!0,user:e.data.user,station:e.data.station}):t(Qt("Login failed"))}).catch(function(e){return t(Qt("Unable to login"))})}},Qt=function(e){return function(t){t({type:"OPEN_SNACKBAR",msg:e}),window.clearTimeout($t),$t=window.setTimeout(function(){return t({type:"CLOSE_SNACKBAR"})},3e3)}};
  315. /**
  316. @license
  317. Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
  318. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  319. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  320. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  321. Code distributed by Google as part of the polymer project is also
  322. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  323. */function en(e){var t=e.sales;null!=t&&null!=t&&0!=t.length?"Credit"==t[0].mop?(tn(e,"station-copy"),tn(e,"customer-copy")):tn(e,""):alert("zero transactions")}function tn(e,t){var n=e.sales,r=e.station,i=e.date,o=e.station.money_divider,a=e.station.volume_divider;if(null!=n&&null!=n&&0!=n.length)if("undefined"!=typeof Android&&Android&&null!==Android){var s=n[0];s.receiptCount>1&&Android.print(" [Copy #"+s.receiptCount+"]\n"),null!=t&&null!=t&&""!=t&&Android.print(" "+t+"\n\n"),Android.printL(r.name+"\n"),Android.print("--------------------------------------------\n"),Android.print(r.address+"\n"),Android.print(r.phones+"\n"),Android.print(i+"\n"),Android.print("--------------------------------------------\n"),Android.print("Car Plate:"+s.carNumber+"\n"),Android.print("Receipt#:"+s.receiptNumber+"\n"),Android.print("Cashier:"+s.salePerson+"\n"),Android.print("MOP:"+s.mop+"\n"),"Credit"==s.mop&&Android.print("Customer:"+s.CustomerName+"\n"),Android.print("--------------------------------------------\n"),Android.print("Item Pump Price Volume Amount\n"),Android.print("--------------------------------------------\n");var l=0;n.forEach(function(e){var t=e.product.trim();Android.print(t+" P"+e.fpId+" "+e.price/o+" "+(e.volume/a).toFixed(3)+" "+e.amount/o+"\n"),l+=parseInt(e.amount)}),Android.print("--------------------------------------------\n"),Android.print("Total: "+l/o+"\n"),Android.printL("\n\n Thank you! \n\n"),Android.cut()}else console.log("Printing receipt");else alert("zero transactions")}function nn(e){var t="";"undefined"!=e&&null!=e&&(t=JSON.stringify(e)),"undefined"!=typeof Android&&Android&&null!==Android?Android.saveData(t):localStorage.setItem("data",t)}var rn=window.host,on=window.port,an=function(e){return function(t,n){var r=n();if(r.app.isLogin){var i=window.hostUrl+"/api/pos/lockTran/"+r.app.user.id+"/"+e.FpId+"/"+e.TranSeq;fetch(i,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){t(dn(e)),t(Qt("Successfully lock tran "))}).catch(function(e){return t(Qt("Error:"+e.message))})}else t(Qt("Error: No login"))}},sn=function(e,t){return function(n,r){if(r().app.isLogin){var i=window.hostUrl+"/api/pos/unlockTran/"+e+"/"+t;fetch(i,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){n(yn(t)),n(Qt("Successfully unlock tran "))}).catch(function(e){return n(Qt("Error:"+e.message))})}else n(Qt("Error: No login"))}},ln=null,un=function(){return window.alert("Error loading fps!"),{type:"ERROR"}},cn=function(e){return function(t,n){if("Ok"!=e.status||"FPS"!=e.type)return windows.alert("Error loading fueling points:"+e.message),{type:"RECEIVE_FPS",fps:[]};var r=e.data;r.sort(function(e,t){return e.FpId>t.FpId?1:-1}),r=r.reduce(function(e,t){return e[t.FpId]=t,e},{}),pn(t,n),t({type:"RECEIVE_FPS",fps:r})}},pn=function e(t,n){window.WebSocket?((ln=new WebSocket("ws://"+rn+":"+on+"/ws")).onclose=function(r){setTimeout(function(){e(t,n)},5e3)},ln.onmessage=function(e){for(var r=e.data.split("\n"),i=0;i<r.length;i++){var o=JSON.parse(r[i]);if("FP"==o.type){n();var a=o.data;t(fn(a))}if("SALE"==o.type){n();var s=o.data;t(hn(s))}}}):console.log("<b>Your browser does not support WebSockets.</b>")},fn=function(e){return{type:"UPDATE_FP",fp:e}},hn=function(e){return{type:"ADD_SALE",sale:e}},dn=function(e){return function(t,n){t({type:"ADD_TRAN",tran:e})}},yn=function(e){return function(t,n){t({type:"REMOVE_TRAN",TranSeq:e})}},vn=function(){return function(e,t){e({type:"CLEAR_TRAN"})}},mn=n(1);function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_n(e,t,n[t])})}return e}function _n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gn={trans:[]},wn=function(e,t){switch(t.type){case"ADD_TRAN":var n=t.tran;return bn({},e,_n({},n.TranSeq,n));case"REMOVE_TRAN":var r=bn({},e);return delete r[t.TranSeq],r;default:return e}},kn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ADD_TRAN":case"REMOVE_TRAN":return bn({},e,{trans:wn(e.trans,t)});case"CLEAR_TRAN":return bn({},e,{trans:{}});default:return e}},On=function(e){return e.transactions.trans},xn=Object(mn.createSelector)(On,function(e){var t=0;return e?(Object.keys(e).map(function(n){var r=e[n];t+=r.Money}),t):0}),Sn=Object(mn.createSelector)(On,function(e){return e?Object.keys(e).reduce(function(e,t){0},0):0});function Pn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Cn(e,t,n[t])})}return e}function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var En={fps:[],fpId:0,sales:[],error:""},Tn=function(e,t){switch(t.type){case"UPDATE_FP":var n=t.fp;return Pn({},e,Cn({},n.FpId,n));default:return e}},An=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:En,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_FPS":return Pn({},e,{fps:t.fps});case"UPDATE_FP":return Pn({},e,{fps:Tn(e.fps,t)});case"SELECT_FP":return Pn({},e,{fpId:t.fpId});case"RECEIVE_SALES":return Pn({},e,{sales:t.sales});case"ADD_SALE":return Pn({},e,{sales:sales(e.sales,t)});case"RECEIVE_OLD_TRANS":return Pn({},e,{oldsales:t.data.data});case"ADD_TO_CART":case"REMOVE_FROM_CART":case"CHECKOUT_SUCCESS":return Pn({},e,{products:products(e.products,t),cart:cart(e.cart,t),error:""});case"CHECKOUT_FAILURE":return Pn({},e,{error:"Checkout failed. Please try again"});case"PRINT_RECEIPT":return Pn({},e,{printData:t.receiptData});case"OPEN_PRINT_RECEIPT_DIALOG":return Pn({},e,{receiptDialog:!0});case"CLOSE_PRINT_RECEIPT_DIALOG":return Pn({},e,{receiptDialog:!1});default:return e}},jn=Object(mn.createSelector)(function(e){return e.pumps.fps},function(e){return e.app.user},function(e){return e.app.isLogin},function(e,t,n){if(1==n){var r=t.pump_list;if(""==r)return e;var i={};return Object.keys(e).map(function(t){var n=e[t].FpId;r.split(",").map(Number).indexOf(n)>-1&&(i[t]=e[t])}),i}return e});function Nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Rn(e,t,n[t])})}return e}function Rn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var In={offline:!1,snackbarOpened:!1,isLogin:!1,user:Object},zn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:In,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"STATION":return Nn({},e,{station:t.station});case"LOGIN":return Nn({},e,{isLogin:t.isLogin,user:t.user,station:t.station});case"LOGOUT":return Nn({},e,{isLogin:!1,user:null});case"OPEN_CUSTOMER_DIALOG":return Nn({},e,{customerDialog:!0});case"CLOSE_CUSTOMER_DIALOG":return Nn({},e,{customerDialog:!1});case"UPDATE_OFFLINE":return Nn({},e,{offline:t.offline});case"OPEN_SNACKBAR":return Nn({},e,{snackbarOpened:!0,msg:t.msg});case"CLOSE_SNACKBAR":return Nn({},e,{snackbarOpened:!1});case"CREDIT_CUSTOMER":return Nn({},e,{customer:t.customer});case"RESET_PASSCODE":return Nn({},e,{user:t.user});default:return e}},Ln=function e(t,n,r){var i;if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function");if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(e)(t,n)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var o=t,a=n,s=[],l=s,u=!1;function c(){l===s&&(l=s.slice())}function p(){if(u)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function f(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(u)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return c(),l.push(e),function(){if(t){if(u)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,c();var n=l.indexOf(e);l.splice(n,1)}}}function h(e){if(!Ut(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(u)throw new Error("Reducers may not dispatch actions.");try{u=!0,a=o(a,e)}finally{u=!1}for(var t=s=l,n=0;n<t.length;n++)(0,t[n])();return e}return h({type:Vt.INIT}),(i={dispatch:h,subscribe:f,getState:p,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");o=e,h({type:Vt.REPLACE})}})[Bt.a]=function(){var e,t=f;return(e={subscribe:function(e){if("object"!==Ht(e)||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(p())}return n(),{unsubscribe:t(n)}}})[Bt.a]=function(){return this},e},i}(function(e,t){return e},(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Wt)(function(e){return function(t){return function(n,r){var i={},o=t(n,r);return Object.assign({},o,{addReducers:function(t){var n=Object.assign({},i,t);this.replaceReducer(e(i=n))}})}}}(function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var o,a=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:Vt.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:Vt.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+Vt.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(n)}catch(e){o=e}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},s=0;s<a.length;s++){var l=a[s],u=n[l],c=e[l],p=u(c,t);if(void 0===p){var f=qt(l,t);throw new Error(f)}i[l]=p,r=r||p!==c}return r?i:e}}),function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=t.map(function(e){return e(i)});return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Yt(e,t,n[t])})}return e}({},n,{dispatch:r=Wt.apply(void 0,o)(n.dispatch)})}}}(Jt)));function Mn(e){return(Mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fn(e,t){return!t||"object"!==Mn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bn(e,t,n){return(Bn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Hn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Hn(e){return(Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Kn(e,t){return(Kn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  324. /**
  325. @license
  326. Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
  327. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  328. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  329. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  330. Code distributed by Google as part of the polymer project is also
  331. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  332. */Ln.addReducers({pumps:An,transactions:kn,app:zn});var Vn=function(e){return function(t){return function(n){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),Fn(this,Hn(r).apply(this,arguments))}var i,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kn(e,t)}(r,t),i=r,(o=[{key:"connectedCallback",value:function(){var t=this;Bn(Hn(r.prototype),"connectedCallback",this)&&Bn(Hn(r.prototype),"connectedCallback",this).call(this),this._storeUnsubscribe=e.subscribe(function(){return t.stateChanged(e.getState())}),this.stateChanged(e.getState())}},{key:"disconnectedCallback",value:function(){this._storeUnsubscribe(),Bn(Hn(r.prototype),"disconnectedCallback",this)&&Bn(Hn(r.prototype),"disconnectedCallback",this).call(this)}},{key:"stateChanged",value:function(e){}}])&&Dn(i.prototype,o),a&&Dn(i,a),r}()}};function Un(e){return(Un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qn(){var e=fr(['\n <span style="font-size: 16px;">',"</span> \n "]);return qn=function(){return e},e}function Yn(){var e=fr(['\n <span style="font-size: 16px;padding-left: 20px;line-height: 1;vertical-align:middle;">',"</span> "]);return Yn=function(){return e},e}function Wn(){var e=fr([""]);return Wn=function(){return e},e}function Gn(){var e=fr(['<img src="images/closed.png"></img>']);return Gn=function(){return e},e}function Xn(){var e=fr([""]);return Xn=function(){return e},e}function $n(){var e=fr(['<img class="unavailable" src="images/idle.png"></img>']);return $n=function(){return e},e}function Jn(){var e=fr([""]);return Jn=function(){return e},e}function Zn(){var e=fr(['<img class="authorize" src="images/idle.png"></img>']);return Zn=function(){return e},e}function Qn(){var e=fr([""]);return Qn=function(){return e},e}function er(){var e=fr(['<img class="fueling" src="images/fueling.png"></img>']);return er=function(){return e},e}function tr(){var e=fr([""]);return tr=function(){return e},e}function nr(){var e=fr(['<img src="images/idle.png"></img>']);return nr=function(){return e},e}function rr(){var e=fr([""]);return rr=function(){return e},e}function ir(){var e=fr(['<img src="images/idle.png"></img>']);return ir=function(){return e},e}function or(){var e=fr(["",""]);return or=function(){return e},e}function ar(){var e=fr(["",""]);return ar=function(){return e},e}function sr(){var e=fr([""]);return sr=function(){return e},e}function lr(){var e=fr(['<img class="lock-img" src="images/unlock.png"></img>']);return lr=function(){return e},e}function ur(){var e=fr([""]);return ur=function(){return e},e}function cr(){var e=fr(['<img class="lock-img" src="images/lock.png"></img>']);return cr=function(){return e},e}function pr(){var e=fr(['\n <style>\n :host{\n display:block;\n background-color:white;\n }\n .item-container\n {\n font-family: arial, sans-serif;\n border-collapse: collapse;\n border: 1px solid; \n width:130px;\n height:150px;\n background-color:white;\n }\n .idle {\n background-color: #d6d3d3;\n } \n .unavailable {\n background-color: #ff2020;\n }\n .close {\n background-color: #d6d3d3;\n } \n .fueling {\n background-color: #ffffff;\n } \n .authorize {\n background-color: #ffffff;\n } \n .calling {\n animation: blink 1s step-start 0s infinite;\n -webkit-animation: blink 1s step-start 0s infinite;\n -moz-animation: blink 1s linear infinite;\n }\n @keyframes blink{\n 0%{opacity: 0;}\n 50%{opacity: .5;background-color: rgb(117, 209, 63);}\n 100%{opacity: 1;}\n }\n @-webkit-keyframes blink {\n 0%{opacity: 0;}\n 50%{opacity: .5;background-color: rgb(117, 209, 63);}\n 100%{opacity: 1;}\n }\n .connect{\n position: relative;\n text-align: right;\n }\n .item-content {\n height:120px;\n }\n .item-money {\n height: 20px;\n }\n img {\n width:92px;\n height:76px;\n }\n .lock-img {\n width:30px;\n height:30px;\n }\n </style>\n <table class="item-container">\n <tr><td>\n <div style="display:flex;flex:auto;" class=\''," item-content' @click=\"",'">\n <div>\n <svg height="50" width="50">\n <path style="fill:#3f51b5" d="M0 0 L50 0 L0 50 Z" />\n <text x="5" y="17" fill="white" style="font-weight: bold;">',"</text> \n </svg>\n <div>\n ","\n ",'\n </div>\n </div> \n <div class="image">\n <div class="connect">\n ',"\n </div>\n ","\n ","\n ","\n "," \n ","\n ",'\n </div>\n </div>\n </td>\n </tr> \n <tr><td style="border-top:solid 1px;height:40px" valign="middle">\n <div class="item-money" @click="','">\n <span style="float: left;font-size: 27px;padding-right: 10px;font-weight: 700;">$</span>\n ',"\n ","\n </div>\n </td>\n </tr>\n </table>\n "]);return pr=function(){return e},e}function fr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function hr(e,t){return!t||"object"!==Un(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dr(e){return(dr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vr(e,t,n){return t&&yr(e.prototype,t),n&&yr(e,n),e}function mr(e,t){return(mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var br=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=hr(this,dr(t).call(this))).saleTrans=[],e.pump={},e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mr(e,t)}(t,Vn(Ln)(Ne)),vr(t,[{key:"render",value:function(){var e=this;if(null!=this.pump&&null!=this.pump.Trans){var t,n=this.pump.Trans.filter(function(t){return!(t.TranSeq in e.saleTrans)});t=null!=n?n.length:0;var r=this.pump.StateName,i=this.pump.SubStateName;return $(pr(),this.getClassName(r),function(){return e.clickItem()},this.pump.FpId,$("Idle"==r?cr():ur()),$("PreAuthorized"==r?lr():sr()),"Online"==i?$(ar(),Dt):$(or(),Ft),$("Idle"==r?ir():rr()),$("Calling"==r?nr():tr()),$("Fuelling"==r||"Starting"==r?er():Qn()),$("PreAuthorized"==r?Zn():Jn()),$("Unavailable"==r?$n():Xn()),$("Closed"==r?Gn():Wn()),function(){return e.clickItemMoney()},t>1?$(Yn(),t):null,1==t?$(qn(),n[0].Money):null)}}}],[{key:"properties",get:function(){return{pump:{type:Object},trans:{type:Array},station:{type:Object}}}}]),vr(t,[{key:"getClassName",value:function(e){return"Calling"==e?"calling":"Idle"==e?"idle":"Unavailable"==e?"unavailable":"Closed"==e?"close":""}},{key:"stateChanged",value:function(e){e.transactions&&(this.saleTrans=e.transactions.trans,this.requestUpdate()),this.isLogin=e.app.isLogin,this.station=e.app.station}},{key:"clickItem",value:function(){if(this.isLogin){Ln.dispatch({type:"SELECT_FP",fpId:this.pump.FpId});var e=new CustomEvent("click-detail-event",{detail:{fpId:this.pump.FpId}});this.dispatchEvent(e)}else Ln.dispatch(Qt("Error: No login"))}},{key:"clickItemMoney",value:function(){this.isLogin?(this.pump.Trans&&1==this.pump.Trans.length&&Ln.dispatch(an(this.pump.Trans[0])),this.pump.Trans&&this.pump.Trans.length>1&&this.clickItem()):Ln.dispatch(Qt("Error: No login"))}},{key:"authorize",value:function(){}}]),t}();function _r(e){return(_r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gr(){var e=kr(["\n <tr>\n <td>\n ","\n </td>\n <td>\n Pump "," - ","\n </td> \n <td>\n ","\n </td>\n <td>\n ","\n </td>\n <td>\n ",'\n </td>\n <td @click="','"}>\n <span class="icon has-text-danger">\n <img src="./images/remove.png"/>\n </span>\n </td> \n </tr>\n ']);return gr=function(){return e},e}function wr(){var e=kr(['\n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style> \n :host{\n display:block;\n }\n </style> \n<table class="table is-bordered is-striped is-hoverable is-fullwidth">\n <thead>\n <tr>\n <th>#</th>\n <th>Item</th>\n <th>Volume</th>\n <th>Price</th>\n <th>Amount</th>\n <th>Remove</th>\n </tr>\n </thead>\n <tfoot>\n <tr>\n <th></th>\n <th></th>\n <th></th>\n <th>Total:</th>\n <th>',"</th>\n <th></th>\n </tr>\n </tfoot>\n <tbody>\n ","\n </tbody>\n</table>\n "]);return wr=function(){return e},e}function kr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Or(e,t){return!t||"object"!==_r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xr(e){return(xr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Sr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pr(e,t,n){return t&&Sr(e.prototype,t),n&&Sr(e,n),e}function Cr(e,t){return(Cr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("pump-item",br);var Er=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Or(this,xr(t).call(this))).totalAmount=0,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cr(e,t)}(t,Vn(Ln)(Ne)),Pr(t,[{key:"render",value:function(){var e=this;if(0!=Object.keys(this.trans).length)Object.keys(this.trans).map(function(t){return e.trans[t]});return $(wr(),this.totalAmount,Object.keys(this.trans).map(function(t,n){var r=e.trans[t];return $(gr(),n+1,r.FpId,r.GradeName,(r.Vol/e.station.volume_divider).toFixed(3),r.Price/e.station.money_divider,r.Money/e.station.money_divider,function(){return e.removeTran(r.FpId,r.TranSeq)})}))}}]),Pr(t,[{key:"removeTran",value:function(e,t){Ln.dispatch(sn(e,t))}},{key:"stateChanged",value:function(e){e.transactions&&(this.trans=e.transactions.trans,this.totalAmount=xn(e)),this.station=e.app.station}}],[{key:"properties",get:function(){return{trans:{type:Array},totalAmount:{type:Number},station:{type:Object}}}}]),t}();function Tr(e){return(Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ar(){var e=Nr(["\n <tr>\n <td>","</td>\n <td>","</td>\n <td>","</td>\n <td>","</td>\n <td>",'</td>\n <td @click="','"><span class="icon has-text-danger">\n <img src="./images/select.png"/>\n </span></td>\n </tr>\n ']);return Ar=function(){return e},e}function jr(){var e=Nr([' \n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style>\n :host {\n display:block;\n }\n button {\n width:90px;\n height: 70px;\n margin:5px;\n }\n button img {\n width:50px;\n height: 50px;\n }\n .header{\n text-align: center;\n }\n .top-panel {\n padding:5px;\n }\n </style>\n\n<div class="tile is-ancestor">\n <div class="tile is-parent">\n <pump-item .pump="','" ></pump-item> \n </div>\n <div class="tile is-parent is-10">\n <article class="tile is-child box">\n <div class="tabs">\n <ul>\n <li class="is-active"><a>Transactions</a></li>\n \x3c!-- <li><a>Cars</a></li> --\x3e\n </ul>\n </div>\n <div id="trans">\n <table class="table">\n <thead>\n <tr>\n <th>TranId</th>\n <th>Item</th>\n <th>Volume</th>\n <th>Price</th>\n <th>Amount</th>\n <th>Select</th>\n </tr>\n </thead>\n <tfoot>\n <tr>\n <th>TranId</th>\n <th>Item</th>\n <th>Volume</th>\n <th>Price</th>\n <th>Amount</th>\n <th>Select</th>\n </tr>\n </tfoot>\n <tbody>\n ','\n </tbody>\n</table>\n </div>\n </article>\n </div>\n</div>\n\n<div class="tile is-ancestor">\n <div class="tile is-vertical is-12">\n <div class="tile is-parent">\n <article class="tile is-child box">\n <div class="level-left">\n <button @click="','">\n Authorize\n <img src="./images/unlock.png"/>\n </button>\n <button @click="','">\n Unauthorize\n <img src="./images/lock.png"/>\n </button>\n <button @click="','">\n Close\n <img src="./images/closed.png"/>\n </button>\n <button @click="','">\n Open\n <img src="./images/idle.png"/>\n </button> \n </div>\n </article>\n </div>\n </div>\n</div>\n\n\n\n ']);return jr=function(){return e},e}function Nr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Rr(e,t){return!t||"object"!==Tr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ir(e){return(Ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lr(e,t,n){return t&&zr(e.prototype,t),n&&zr(e,n),e}function Mr(e,t){return(Mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("sale-list",Er);var Dr=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Rr(this,Ir(t).call(this))).pump={},e.saleTrans=[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mr(e,t)}(t,Vn(Ln)(Ne)),Lr(t,[{key:"render",value:function(){var e=this,t=[];return null!=this.pump.Trans&&null!=this.pump.Trans&&(t=this.pump.Trans.filter(function(t){return!(t.TranSeq in e.saleTrans)})),$(jr(),this.pump,t.map(function(t){return $(Ar(),t.TranSeq,t.GradeName,(t.Vol/e.station.volume_divider).toFixed(3),t.Price/e.station.money_divider,t.Money/e.station.money_divider,function(){return e.clickTran(t)})}),function(){return e.authorize()},function(){return e.unauthorize()},function(){return e.closeFp()},function(){return e.openFp()})}}],[{key:"properties",get:function(){return{pump:{type:Object},saleTrans:{type:Array},station:{type:Object}}}}]),Lr(t,[{key:"stateChanged",value:function(e){var t=e.pumps.fps[e.pumps.fpId];void 0!==t&&(this.pump=t),e.transactions&&(this.saleTrans=e.transactions.trans,this.requestUpdate()),this.station=e.app.station}},{key:"authorize",value:function(){var e;Ln.dispatch((e=this.pump.FpId,function(t,n){if(n().app.isLogin){var r=window.hostUrl+"/api/pos/auth/"+e;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){return t(Qt("Successfully authorize pump "+e))}).catch(function(){return t(Qt("Error authorize pump "+e))})}else t(Qt("Error: No login"))}))}},{key:"unauthorize",value:function(){var e;Ln.dispatch((e=this.pump.FpId,function(t,n){if(n().app.isLogin){var r=window.hostUrl+"/api/pos/unauth/"+e;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){return t(Qt("Successfully unauthorize pump "+e))}).catch(function(){return t(Qt("Error unauthorize pump "+e))})}else t(Qt("Error: No login"))}))}},{key:"closeFp",value:function(){var e;Ln.dispatch((e=this.pump.FpId,function(t,n){if(n().app.isLogin){var r=window.hostUrl+"/api/pos/close/"+e;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){return t(Qt("Successfully close pump "+e))}).catch(function(){return t(Qt("Error close pump "+e))})}else t(Qt("Error: No login"))}))}},{key:"openFp",value:function(){var e;Ln.dispatch((e=this.pump.FpId,function(t,n){if(n().app.isLogin){var r=window.hostUrl+"/api/pos/open/"+e;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){return t(Qt("Successfully open pump "+e))}).catch(function(){return t(Qt("Error open pump "+e))})}else t(Qt("Error: No login"))}))}},{key:"clickTran",value:function(e){Ln.dispatch(an(e))}}]),t}();customElements.define("pos-detail",Dr);
  333. /**
  334. @license
  335. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  336. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  337. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  338. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  339. Code distributed by Google as part of the polymer project is also
  340. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  341. */
  342. var Fr,Br,Hr=!(window.ShadyDOM&&window.ShadyDOM.inUse);function Kr(e){Fr=(!e||!e.shimcssproperties)&&(Hr||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(Br=window.ShadyCSS.cssBuild),window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Fr=window.ShadyCSS.nativeCss:window.ShadyCSS?(Kr(window.ShadyCSS),window.ShadyCSS=void 0):Kr(window.WebComponents&&window.WebComponents.flags);var Vr=Fr;
  343. /**
  344. @license
  345. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  346. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  347. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  348. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  349. Code distributed by Google as part of the polymer project is also
  350. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  351. */var Ur=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function qr(e){return function e(t,n){var r=n.substring(t.start,t.end-1);t.parsedCssText=t.cssText=r.trim();if(t.parent){var i=t.previous?t.previous.end:t.parent.start;r=(r=(r=function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e})}(r=n.substring(i,t.start-1))).replace($r.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var o=t.parsedSelector=t.selector=r.trim();t.atRule=0===o.indexOf(Qr),t.atRule?0===o.indexOf(Zr)?t.type=Wr.MEDIA_RULE:o.match($r.keyframesRule)&&(t.type=Wr.KEYFRAMES_RULE,t.keyframesName=t.selector.split($r.multipleSpaces).pop()):0===o.indexOf(Jr)?t.type=Wr.MIXIN_RULE:t.type=Wr.STYLE_RULE}var a=t.rules;if(a)for(var s,l=0,u=a.length;l<u&&(s=a[l]);l++)e(s,n);return t}(function(e){var t=new Ur;t.start=0,t.end=e.length;for(var n=t,r=0,i=e.length;r<i;r++)if(e[r]===Gr){n.rules||(n.rules=[]);var o=n,a=o.rules[o.rules.length-1]||null;(n=new Ur).start=r+1,n.parent=o,n.previous=a,o.rules.push(n)}else e[r]===Xr&&(n.end=r+1,n=n.parent||t);return t}(e=e.replace($r.comments,"").replace($r.port,"")),e)}function Yr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="";if(e.cssText||e.rules){var i=e.rules;if(i&&!function(e){var t=e[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(Jr)}(i))for(var o,a=0,s=i.length;a<s&&(o=i[a]);a++)r=Yr(o,t,r);else(r=(r=t?e.cssText:function(e){return function(e){return e.replace($r.mixinApply,"").replace($r.varApply,"")}(e=function(e){return e.replace($r.customProp,"").replace($r.mixinProp,"")}(e))}(e.cssText)).trim())&&(r=" "+r+"\n")}return r&&(e.selector&&(n+=e.selector+" "+Gr+"\n"),n+=r,e.selector&&(n+=Xr+"\n\n")),n}var Wr={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Gr="{",Xr="}",$r={comments:/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},Jr="--",Zr="@media",Qr="@",ei=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,ti=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ni=/@media\s(.*)/,ri=new Set,ii="shady-unscoped";function oi(e){var t=e.textContent;if(!ri.has(t)){ri.add(t);var n=e.cloneNode(!0);document.head.appendChild(n)}}function ai(e){return e.hasAttribute(ii)}
  352. /**
  353. @license
  354. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  355. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  356. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  357. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  358. Code distributed by Google as part of the polymer project is also
  359. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  360. */function si(e,t){return e?("string"==typeof e&&(e=qr(e)),t&&ui(e,t),Yr(e,Vr)):""}function li(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=qr(e.textContent)),e.__cssRules||null}function ui(e,t,n,r){if(e){var i=!1,o=e.type;if(r&&o===Wr.MEDIA_RULE){var a=e.selector.match(ni);a&&(window.matchMedia(a[1]).matches||(i=!0))}o===Wr.STYLE_RULE?t(e):n&&o===Wr.KEYFRAMES_RULE?n(e):o===Wr.MIXIN_RULE&&(i=!0);var s=e.rules;if(s&&!i)for(var l,u=0,c=s.length;u<c&&(l=s[u]);u++)ui(l,t,n,r)}}function ci(e,t){for(var n=0,r=t,i=e.length;r<i;r++)if("("===e[r])n++;else if(")"===e[r]&&0==--n)return r;return-1}window.ShadyDOM&&window.ShadyDOM.wrap;var pi="css-build";function fi(e){if(void 0!==Br)return Br;if(void 0===e.__cssBuild){var t=e.getAttribute(pi);if(t)e.__cssBuild=t;else{var n=function(e){var t="template"===e.localName?e.content.firstChild:e.firstChild;if(t instanceof Comment){var n=t.textContent.trim().split(":");if(n[0]===pi)return n[1]}return""}(e);""!==n&&function(e){var t="template"===e.localName?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)}
  361. /**
  362. @license
  363. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  364. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  365. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  366. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  367. Code distributed by Google as part of the polymer project is also
  368. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  369. */(e),e.__cssBuild=n}}return e.__cssBuild||""}function hi(e){return""!==fi(e)}function di(e,t){for(var n in t)null===n?e.style.removeProperty(n):e.style.setProperty(n,t[n])}function yi(e,t){var n=window.getComputedStyle(e).getPropertyValue(t);return n?n.trim():""}
  370. /**
  371. @license
  372. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  373. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  374. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  375. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  376. Code distributed by Google as part of the polymer project is also
  377. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  378. */
  379. function vi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bi(e,t,n){return t&&mi(e.prototype,t),n&&mi(e,n),e}var _i=/;\s*/m,gi=/^\s*(initial)|(inherit)\s*$/,wi=/\s*!important/,ki=function(){function e(){vi(this,e),this._map={}}return bi(e,[{key:"set",value:function(e,t){e=e.trim(),this._map[e]={properties:t,dependants:{}}}},{key:"get",value:function(e){return e=e.trim(),this._map[e]||null}}]),e}(),Oi=null,xi=function(){function e(){vi(this,e),this._currentElement=null,this._measureElement=null,this._map=new ki}return bi(e,[{key:"detectMixin",value:function(e){return function(e){var t=ti.test(e)||ei.test(e);return ti.lastIndex=0,ei.lastIndex=0,t}(e)}},{key:"gatherStyles",value:function(e){var t=function(e){for(var t=[],n=e.querySelectorAll("style"),r=0;r<n.length;r++){var i=n[r];ai(i)?Hr||(oi(i),i.parentNode.removeChild(i)):(t.push(i.textContent),i.parentNode.removeChild(i))}return t.join("").trim()}(e.content);if(t){var n=document.createElement("style");return n.textContent=t,e.content.insertBefore(n,e.content.firstChild),n}return null}},{key:"transformTemplate",value:function(e,t){void 0===e._gatheredStyle&&(e._gatheredStyle=this.gatherStyles(e));var n=e._gatheredStyle;return n?this.transformStyle(n,t):null}},{key:"transformStyle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=li(e);return this.transformRules(n,t),e.textContent=si(n),n}},{key:"transformCustomStyle",value:function(e){var t=this,n=li(e);return ui(n,function(e){":root"===e.selector&&(e.selector="html"),t.transformRule(e)}),e.textContent=si(n),n}},{key:"transformRules",value:function(e,t){var n=this;this._currentElement=t,ui(e,function(e){n.transformRule(e)}),this._currentElement=null}},{key:"transformRule",value:function(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}},{key:"transformCssText",value:function(e,t){var n=this;return e=e.replace(ei,function(e,r,i,o){return n._produceCssProperties(e,r,i,o,t)}),this._consumeCssProperties(e,t)}},{key:"_getInitialValueForProperty",value:function(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}},{key:"_fallbacksFromPreviousRules",value:function(e){for(var t=this,n=e;n.parent;)n=n.parent;var r={},i=!1;return ui(n,function(n){(i=i||n===e)||n.selector===e.selector&&Object.assign(r,t._cssTextToMap(n.parsedCssText))}),r}},{key:"_consumeCssProperties",value:function(e,t){for(var n=null;n=ti.exec(e);){var r=n[0],i=n[1],o=n.index,a=o+r.indexOf("@apply"),s=o+r.length,l=e.slice(0,a),u=e.slice(s),c=t?this._fallbacksFromPreviousRules(t):{};Object.assign(c,this._cssTextToMap(l));var p=this._atApplyToCssProperties(i,c);e="".concat(l).concat(p).concat(u),ti.lastIndex=o+p.length}return e}},{key:"_atApplyToCssProperties",value:function(e,t){e=e.replace(_i,"");var n=[],r=this._map.get(e);if(r||(this._map.set(e,{}),r=this._map.get(e)),r){var i,o,a;this._currentElement&&(r.dependants[this._currentElement]=!0);var s=r.properties;for(i in s)o=[i,": var(",e,"_-_",i],(a=t&&t[i])&&o.push(",",a.replace(wi,"")),o.push(")"),wi.test(s[i])&&o.push(" !important"),n.push(o.join(""))}return n.join("; ")}},{key:"_replaceInitialOrInherit",value:function(e,t){var n=gi.exec(t);return n&&(t=n[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}},{key:"_cssTextToMap",value:function(e){for(var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e.split(";"),s={},l=0;l<a.length;l++)(r=a[l])&&(i=r.split(":")).length>1&&(t=i[0].trim(),n=i.slice(1).join(":"),o&&(n=this._replaceInitialOrInherit(t,n)),s[t]=n);return s}},{key:"_invalidateMixinEntry",value:function(e){if(Oi)for(var t in e.dependants)t!==this._currentElement&&Oi(t)}},{key:"_produceCssProperties",value:function(e,t,n,r,i){var o=this;if(n&&function e(t,n){var r=t.indexOf("var(");if(-1===r)return n(t,"","","");var i=ci(t,r+3),o=t.substring(r+4,i),a=t.substring(0,r),s=e(t.substring(i+1),n),l=o.indexOf(",");return-1===l?n(a,o.trim(),"",s):n(a,o.substring(0,l).trim(),o.substring(l+1).trim(),s)}(n,function(e,t){t&&o._map.get(t)&&(r="@apply ".concat(t,";"))}),!r)return e;var a=this._consumeCssProperties(""+r,i),s=e.slice(0,e.indexOf("--")),l=this._cssTextToMap(a,!0),u=l,c=this._map.get(t),p=c&&c.properties;p?u=Object.assign(Object.create(p),l):this._map.set(t,u);var f,h,d=[],y=!1;for(f in u)void 0===(h=l[f])&&(h="initial"),!p||f in p||(y=!0),d.push("".concat(t).concat("_-_").concat(f,": ").concat(h));return y&&this._invalidateMixinEntry(c),c&&(c.properties=u),n&&(s="".concat(e,";").concat(s)),"".concat(s).concat(d.join("; "),";")}}]),e}();xi.prototype.detectMixin=xi.prototype.detectMixin,xi.prototype.transformStyle=xi.prototype.transformStyle,xi.prototype.transformCustomStyle=xi.prototype.transformCustomStyle,xi.prototype.transformRules=xi.prototype.transformRules,xi.prototype.transformRule=xi.prototype.transformRule,xi.prototype.transformTemplate=xi.prototype.transformTemplate,xi.prototype._separator="_-_",Object.defineProperty(xi.prototype,"invalidCallback",{get:function(){return Oi},set:function(e){Oi=e}});var Si=xi,Pi={},Ci="_applyShimCurrentVersion",Ei="_applyShimNextVersion",Ti="_applyShimValidatingVersion",Ai=Promise.resolve();
  380. /**
  381. @license
  382. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  383. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  384. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  385. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  386. Code distributed by Google as part of the polymer project is also
  387. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  388. */function ji(e){var t=Pi[e];t&&function(e){e[Ci]=e[Ci]||0,e[Ti]=e[Ti]||0,e[Ei]=(e[Ei]||0)+1}(t)}function Ni(e){return e[Ci]===e[Ei]}function Ri(e){return!Ni(e)&&e[Ti]===e[Ei]}function Ii(e){e[Ti]=e[Ei],e._validating||(e._validating=!0,Ai.then(function(){e[Ci]=e[Ei],e._validating=!1}))}
  389. /**
  390. @license
  391. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  392. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  393. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  394. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  395. Code distributed by Google as part of the polymer project is also
  396. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  397. */
  398. var zi,Li=null,Mi=window.HTMLImports&&window.HTMLImports.whenReady||null;function Di(e){requestAnimationFrame(function(){Mi?Mi(e):(Li||(Li=new Promise(function(e){zi=e}),"complete"===document.readyState?zi():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&zi()})),Li.then(function(){e&&e()}))})}
  399. /**
  400. @license
  401. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  402. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  403. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  404. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  405. Code distributed by Google as part of the polymer project is also
  406. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  407. */function Fi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Bi="__shadyCSSCachedStyle",Hi=null,Ki=null,Vi=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.customStyles=[],this.enqueued=!1,Di(function(){window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}var t,n,r;return t=e,(n=[{key:"enqueueDocumentValidation",value:function(){!this.enqueued&&Ki&&(this.enqueued=!0,Di(Ki))}},{key:"addCustomStyle",value:function(e){e.__seenByShadyCSS||(e.__seenByShadyCSS=!0,this.customStyles.push(e),this.enqueueDocumentValidation())}},{key:"getStyleForCustomStyle",value:function(e){return e[Bi]?e[Bi]:e.getStyle?e.getStyle():e}},{key:"processStyles",value:function(){for(var e=this.customStyles,t=0;t<e.length;t++){var n=e[t];if(!n[Bi]){var r=this.getStyleForCustomStyle(n);if(r){var i=r.__appliedElement||r;Hi&&Hi(i),n[Bi]=i}}}return e}}])&&Fi(t.prototype,n),r&&Fi(t,r),e}();function Ui(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Vi.prototype.addCustomStyle=Vi.prototype.addCustomStyle,Vi.prototype.getStyleForCustomStyle=Vi.prototype.getStyleForCustomStyle,Vi.prototype.processStyles=Vi.prototype.processStyles,Object.defineProperties(Vi.prototype,{transformCallback:{get:function(){return Hi},set:function(e){Hi=e}},validateCallback:{get:function(){return Ki},set:function(e){var t=!1;Ki||(t=!0),Ki=e,t&&this.enqueueDocumentValidation()}}});var qi=new Si,Yi=function(){function e(){!
  408. /**
  409. @license
  410. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  411. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  412. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  413. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  414. Code distributed by Google as part of the polymer project is also
  415. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  416. */
  417. function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.customStyleInterface=null,qi.invalidCallback=ji}var t,n,r;return t=e,(n=[{key:"ensure",value:function(){var e=this;this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=function(e){qi.transformCustomStyle(e)},this.customStyleInterface.validateCallback=function(){requestAnimationFrame(function(){e.customStyleInterface.enqueued&&e.flushCustomStyles()})})}},{key:"prepareTemplate",value:function(e,t){if(this.ensure(),!hi(e)){Pi[t]=e;var n=qi.transformTemplate(e,t);e._styleAst=n}}},{key:"flushCustomStyles",value:function(){if(this.ensure(),this.customStyleInterface){var e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(var t=0;t<e.length;t++){var n=e[t],r=this.customStyleInterface.getStyleForCustomStyle(n);r&&qi.transformCustomStyle(r)}this.customStyleInterface.enqueued=!1}}}},{key:"styleSubtree",value:function(e,t){if(this.ensure(),t&&di(e,t),e.shadowRoot){this.styleElement(e);for(var n=e.shadowRoot.children||e.shadowRoot.childNodes,r=0;r<n.length;r++)this.styleSubtree(n[r])}else for(var i=e.children||e.childNodes,o=0;o<i.length;o++)this.styleSubtree(i[o])}},{key:"styleElement",value:function(e){this.ensure();var t=function(e){var t=e.localName,n="",r="";return t?t.indexOf("-")>-1?n=t:(r=t,n=e.getAttribute&&e.getAttribute("is")||""):(n=e.is,r=e.extends),{is:n,typeExtension:r}}(e).is,n=Pi[t];if((!n||!hi(n))&&n&&!Ni(n)){Ri(n)||(this.prepareTemplate(n,t),Ii(n));var r=e.shadowRoot;if(r){var i=r.querySelector("style");i&&(i.__cssRules=n._styleAst,i.textContent=si(n._styleAst))}}}},{key:"styleDocument",value:function(e){this.ensure(),this.styleSubtree(document.body,e)}}])&&Ui(t.prototype,n),r&&Ui(t,r),e}();if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var Wi=new Yi,Gi=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(e,t,n){Wi.flushCustomStyles(),Wi.prepareTemplate(e,t)},prepareTemplateStyles:function(e,t,n){window.ShadyCSS.prepareTemplate(e,t,n)},prepareTemplateDom:function(e,t){},styleSubtree:function(e,t){Wi.flushCustomStyles(),Wi.styleSubtree(e,t)},styleElement:function(e){Wi.flushCustomStyles(),Wi.styleElement(e)},styleDocument:function(e){Wi.flushCustomStyles(),Wi.styleDocument(e)},getComputedStyleValue:function(e,t){return yi(e,t)},flushCustomStyles:function(){Wi.flushCustomStyles()},nativeCss:Vr,nativeShadow:Hr,cssBuild:Br},Gi&&(window.ShadyCSS.CustomStyleInterface=Gi)}window.ShadyCSS.ApplyShim=qi;n(0);
  418. /**
  419. @license
  420. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  421. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  422. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  423. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  424. Code distributed by Google as part of the polymer project is also
  425. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  426. */var Xi,$i,Ji=/(url\()([^)]*)(\))/g,Zi=/(^\/)|(^#)|(^[\w-\d]*:)/;function Qi(e,t){if(e&&Zi.test(e))return e;if(void 0===Xi){Xi=!1;try{var n=new URL("b","http://a");n.pathname="c%20d",Xi="http://a/c%20d"===n.href}catch(e){}}return t||(t=document.baseURI||window.location.href),Xi?new URL(e,t).href:($i||(($i=document.implementation.createHTMLDocument("temp")).base=$i.createElement("base"),$i.head.appendChild($i.base),$i.anchor=$i.createElement("a"),$i.body.appendChild($i.anchor)),$i.base.href=t,$i.anchor.href=e,$i.anchor.href||e)}function eo(e,t){return e.replace(Ji,function(e,n,r,i){return n+"'"+Qi(r.replace(/["']/g,""),t)+"'"+i})}function to(e){return e.substring(0,e.lastIndexOf("/")+1)}
  427. /**
  428. @license
  429. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  430. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  431. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  432. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  433. Code distributed by Google as part of the polymer project is also
  434. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  435. */var no=!window.ShadyDOM,ro=(Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),window.customElements.polyfillWrapFlushCallback,to(document.baseURI||window.location.href)),io=void 0,oo=!1,ao=0;function so(){}so.prototype.__mixinApplications,so.prototype.__mixinSet;var lo=function(e){var t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);var n=ao++;function r(r){var i=r.__mixinSet;if(i&&i[n])return r;var o=t,a=o.get(r);a||(a=e(r),o.set(r,a));var s=Object.create(a.__mixinSet||i||null);return s[n]=!0,a.__mixinSet=s,a}return r};function uo(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}
  436. /**
  437. @license
  438. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  439. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  440. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  441. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  442. Code distributed by Google as part of the polymer project is also
  443. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  444. */(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var co="link[rel=import][type~=css]",po="include",fo="shady-unscoped";function ho(e){var t=customElements.get("dom-module");return t?t.import(e):null}function yo(e){var t=eo((e.body?e.body:e).textContent,e.baseURI),n=document.createElement("style");return n.textContent=t,n}function vo(e){for(var t=e.trim().split(/\s+/),n=[],r=0;r<t.length;r++)n.push.apply(n,uo(mo(t[r])));return n}function mo(e){var t=ho(e);if(!t)return console.warn("Could not find style data in module named",e),[];if(void 0===t._styles){var n=[];n.push.apply(n,uo(_o(t)));var r=t.querySelector("template");r&&n.push.apply(n,uo(bo(r,t.assetpath))),t._styles=n}return t._styles}function bo(e,t){if(!e._styles){for(var n=[],r=e.content.querySelectorAll("style"),i=0;i<r.length;i++){var o=r[i],a=o.getAttribute(po);a&&n.push.apply(n,uo(vo(a).filter(function(e,t,n){return n.indexOf(e)===t}))),t&&(o.textContent=eo(o.textContent,t)),n.push(o)}e._styles=n}return e._styles}function _o(e){for(var t=[],n=e.querySelectorAll(co),r=0;r<n.length;r++){var i=n[r];if(i.import){var o=i.import,a=i.hasAttribute(fo);if(a&&!o._unscopedStyle){var s=yo(o);s.setAttribute(fo,""),o._unscopedStyle=s}else o._style||(o._style=yo(o));t.push(a?o._unscopedStyle:o._style)}}return t}function go(e){var t=ho(e);if(t&&void 0===t._cssText){var n=wo(t),r=t.querySelector("template");r&&(n+=function(e,t){for(var n="",r=bo(e,t),i=0;i<r.length;i++){var o=r[i];o.parentNode&&o.parentNode.removeChild(o),n+=o.textContent}return n}(r,t.assetpath)),t._cssText=n||null}return t||console.warn("Could not find style data in module named",e),t&&t._cssText||""}function wo(e){for(var t="",n=_o(e),r=0;r<n.length;r++)t+=n[r].textContent;return t}function ko(e){return(ko="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xo(e,t){return!t||"object"!==ko(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function So(e){var t="function"==typeof Map?new Map:void 0;return(So=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Po(e,arguments,Eo(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Co(r,e)})(e)}function Po(e,t,n){return(Po=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(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Co(i,n.prototype),i}).apply(null,arguments)}function Co(e,t){return(Co=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eo(e){return(Eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
  445. /**
  446. @license
  447. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  448. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  449. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  450. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  451. Code distributed by Google as part of the polymer project is also
  452. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  453. */var To={},Ao={};var jo=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xo(this,Eo(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Co(e,t)}(t,So(HTMLElement)),n=t,i=[{key:"import",value:function(e,t){if(e){var n=function(e){return To[e]||Ao[e.toLowerCase()]}(e);return n&&t?n.querySelector(t):n}return null}},{key:"observedAttributes",get:function(){return["id"]}}],(r=[{key:"attributeChangedCallback",value:function(e,t,n,r){t!==n&&this.register()}},{key:"register",value:function(e){var t;(e=e||this.id)&&(this.id=e,To[e]=this,Ao[e.toLowerCase()]=this,(t=this).querySelector("style")&&console.warn("dom-module %s has style outside template",t.id))}},{key:"assetpath",get:function(){if(!this.__assetpath){var e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=Qi(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=to(t)}return this.__assetpath}}])&&Oo(n.prototype,r),i&&Oo(n,i),t}();function No(e){return e.indexOf(".")>=0}function Ro(e){var t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function Io(e,t){return 0===e.indexOf(t+".")}function zo(e,t){return 0===t.indexOf(e+".")}function Lo(e,t,n){return t+n.slice(e.length)}function Mo(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)for(var r=e[n].toString().split("."),i=0;i<r.length;i++)t.push(r[i]);return t.join(".")}return e}function Do(e){return Array.isArray(e)?Mo(e).split("."):e.toString().split(".")}function Fo(e,t,n){for(var r=e,i=Do(t),o=0;o<i.length;o++){if(!r)return;r=r[i[o]]}return n&&(n.path=i.join(".")),r}function Bo(e,t,n){var r=e,i=Do(t),o=i[i.length-1];if(i.length>1){for(var a=0;a<i.length-1;a++){if(!(r=r[i[a]]))return}r[o]=n}else r[t]=n;return i.join(".")}jo.prototype.modules=To,customElements.define("dom-module",jo);var Ho={},Ko=/-[a-z]/g,Vo=/([A-Z])/g;
  454. /**
  455. @license
  456. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  457. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  458. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  459. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  460. Code distributed by Google as part of the polymer project is also
  461. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  462. */function Uo(e){return Ho[e]||(Ho[e]=e.indexOf("-")<0?e:e.replace(Ko,function(e){return e[1].toUpperCase()}))}function qo(e){return Ho[e]||(Ho[e]=e.replace(Vo,"-$1").toLowerCase())}
  463. /**
  464. @license
  465. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  466. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  467. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  468. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  469. Code distributed by Google as part of the polymer project is also
  470. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  471. */var Yo=0,Wo=0,Go=[],Xo=0,$o=document.createTextNode("");new window.MutationObserver(function(){for(var e=Go.length,t=0;t<e;t++){var n=Go[t];if(n)try{n()}catch(e){setTimeout(function(){throw e})}}Go.splice(0,e),Wo+=e}).observe($o,{characterData:!0});var Jo={after:function(e){return{run:function(t){return window.setTimeout(t,e)},cancel:function(e){window.clearTimeout(e)}}},run:function(e,t){return window.setTimeout(e,t)},cancel:function(e){window.clearTimeout(e)}},Zo={run:function(e){return $o.textContent=Xo++,Go.push(e),Yo++},cancel:function(e){var t=e-Wo;if(t>=0){if(!Go[t])throw new Error("invalid async handle: "+e);Go[t]=null}}};function Qo(e){return(Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ea(e,t){return!t||"object"!==Qo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ta(e,t,n){return(ta="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=na(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function na(e){return(na=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ra(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ia(e,t,n){return t&&ra(e.prototype,t),n&&ra(e,n),e}function oa(e,t){return(oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  472. /**
  473. @license
  474. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  475. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  476. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  477. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  478. Code distributed by Google as part of the polymer project is also
  479. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  480. */var aa=Zo,sa=lo(function(e){return function(t){function n(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=ea(this,na(n).call(this))).__dataEnabled=!1,e.__dataReady=!1,e.__dataInvalid=!1,e.__data={},e.__dataPending=null,e.__dataOld=null,e.__dataInstanceProps=null,e.__serializing=!1,e._initializeProperties(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oa(e,t)}(n,e),ia(n,[{key:"_createPropertyAccessor",value:function(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty("__dataHasAccessor")||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}},{key:"_addPropertyToAttributeMap",value:function(e){if(this.hasOwnProperty("__dataAttributes")||(this.__dataAttributes=Object.assign({},this.__dataAttributes)),!this.__dataAttributes[e]){var t=this.constructor.attributeNameForProperty(e);this.__dataAttributes[t]=e}}},{key:"_definePropertyAccessor",value:function(e,t){Object.defineProperty(this,e,{get:function(){return this._getProperty(e)},set:t?function(){}:function(t){this._setProperty(e,t)}})}}],[{key:"createProperties",value:function(e){var t=this.prototype;for(var n in e)n in t||t._createPropertyAccessor(n)}},{key:"attributeNameForProperty",value:function(e){return e.toLowerCase()}},{key:"typeForProperty",value:function(e){}}]),ia(n,[{key:"ready",value:function(){this.__dataReady=!0,this._flushProperties()}},{key:"_initializeProperties",value:function(){for(var e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}},{key:"_initializeInstanceProperties",value:function(e){Object.assign(this,e)}},{key:"_setProperty",value:function(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}},{key:"_getProperty",value:function(e){return this.__data[e]}},{key:"_setPendingProperty",value:function(e,t,n){var r=this.__data[e],i=this._shouldPropertyChange(e,t,r);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),!this.__dataOld||e in this.__dataOld||(this.__dataOld[e]=r),this.__data[e]=t,this.__dataPending[e]=t),i}},{key:"_invalidateProperties",value:function(){var e=this;!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,aa.run(function(){e.__dataInvalid&&(e.__dataInvalid=!1,e._flushProperties())}))}},{key:"_enableProperties",value:function(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}},{key:"_flushProperties",value:function(){var e=this.__data,t=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(e,t,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,n))}},{key:"_shouldPropertiesChange",value:function(e,t,n){return Boolean(t)}},{key:"_propertiesChanged",value:function(e,t,n){}},{key:"_shouldPropertyChange",value:function(e,t,n){return n!==t&&(n==n||t==t)}},{key:"attributeChangedCallback",value:function(e,t,r,i){t!==r&&this._attributeToProperty(e,r),ta(na(n.prototype),"attributeChangedCallback",this)&&ta(na(n.prototype),"attributeChangedCallback",this).call(this,e,t,r,i)}},{key:"_attributeToProperty",value:function(e,t,n){if(!this.__serializing){var r=this.__dataAttributes,i=r&&r[e]||e;this[i]=this._deserializeValue(t,n||this.constructor.typeForProperty(i))}}},{key:"_propertyToAttribute",value:function(e,t,n){this.__serializing=!0,n=arguments.length<3?this[e]:n,this._valueToNodeAttribute(this,n,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}},{key:"_valueToNodeAttribute",value:function(e,t,n){var r=this._serializeValue(t);void 0===r?e.removeAttribute(n):e.setAttribute(n,r)}},{key:"_serializeValue",value:function(e){switch(Qo(e)){case"boolean":return e?"":void 0;default:return null!=e?e.toString():void 0}}},{key:"_deserializeValue",value:function(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}}]),n}()});function la(e){return(la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ca(e,t){return!t||"object"!==la(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pa(e,t,n){return(pa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fa(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function fa(e){return(fa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ha(e,t){return(ha=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  481. /**
  482. @license
  483. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  484. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  485. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  486. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  487. Code distributed by Google as part of the polymer project is also
  488. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  489. */for(var da=r,ya={},va=HTMLElement.prototype;va;){for(var ma=Object.getOwnPropertyNames(va),ba=0;ba<ma.length;ba++)ya[ma[ba]]=!0;va=Object.getPrototypeOf(va)}var _a=lo(function(e){var t=sa(e);return function(e){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),ca(this,fa(n).apply(this,arguments))}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ha(e,t)}(n,t),r=n,o=[{key:"createPropertiesForAttributes",value:function(){for(var e=this.observedAttributes,t=0;t<e.length;t++)this.prototype._createPropertyAccessor(da.dashToCamelCase(e[t]))}},{key:"attributeNameForProperty",value:function(e){return da.camelToDashCase(e)}}],(i=[{key:"_initializeProperties",value:function(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),pa(fa(n.prototype),"_initializeProperties",this).call(this)}},{key:"_initializeProtoProperties",value:function(e){for(var t in e)this._setProperty(t,e[t])}},{key:"_ensureAttribute",value:function(e,t){this.hasAttribute(e)||this._valueToNodeAttribute(this,t,e)}},{key:"_serializeValue",value:function(e){switch(la(e)){case"object":if(e instanceof Date)return e.toString();if(e)try{return JSON.stringify(e)}catch(e){return""}default:return pa(fa(n.prototype),"_serializeValue",this).call(this,e)}}},{key:"_deserializeValue",value:function(e,t){var r;switch(t){case Object:try{r=JSON.parse(e)}catch(t){r=e}break;case Array:try{r=JSON.parse(e)}catch(t){r=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: ".concat(e))}break;case Date:r=isNaN(e)?String(e):Number(e),r=new Date(r);break;default:r=pa(fa(n.prototype),"_deserializeValue",this).call(this,e,t)}return r}},{key:"_definePropertyAccessor",value:function(e,t){!function(e,t){if(!ya[t]){var n=e[t];void 0!==n&&(e.__data?e._setPendingProperty(t,n):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=n))}}(this,e),pa(fa(n.prototype),"_definePropertyAccessor",this).call(this,e,t)}},{key:"_hasAccessor",value:function(e){return this.__dataHasAccessor&&this.__dataHasAccessor[e]}},{key:"_isPropertyPending",value:function(e){return Boolean(this.__dataPending&&e in this.__dataPending)}}])&&ua(r.prototype,i),o&&ua(r,o),n}()});function ga(e){return(ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ka(e,t){return!t||"object"!==ga(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Oa(e){return(Oa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xa(e,t){return(xa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  490. /**
  491. @license
  492. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  493. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  494. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  495. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  496. Code distributed by Google as part of the polymer project is also
  497. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  498. */var Sa={"dom-if":!0,"dom-repeat":!0};function Pa(e){var t=e.getAttribute("is");if(t&&Sa[t]){var n=e;for(n.removeAttribute("is"),e=n.ownerDocument.createElement(t),n.parentNode.replaceChild(e,n),e.appendChild(n);n.attributes.length;)e.setAttribute(n.attributes[0].name,n.attributes[0].value),n.removeAttribute(n.attributes[0].name)}return e}function Ca(e,t){var n=t.parentInfo&&Ca(e,t.parentInfo);if(!n)return e;for(var r=n.firstChild,i=0;r;r=r.nextSibling)if(t.parentIndex===i++)return r}function Ea(e,t,n,r){r.id&&(t[r.id]=n)}function Ta(e,t,n){if(n.events&&n.events.length)for(var r,i=0,o=n.events;i<o.length&&(r=o[i]);i++)e._addMethodEventListenerToNode(t,r.name,r.value,e)}function Aa(e,t,n){n.templateInfo&&(t._templateInfo=n.templateInfo)}var ja=lo(function(e){return function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),ka(this,Oa(n).apply(this,arguments))}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xa(e,t)}(n,e),r=n,o=[{key:"_parseTemplate",value:function(e,t){if(!e._templateInfo){var n=e._templateInfo={};n.nodeInfoList=[],n.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,n,{parent:null})}return e._templateInfo}},{key:"_parseTemplateContent",value:function(e,t,n){return this._parseTemplateNode(e.content,t,n)}},{key:"_parseTemplateNode",value:function(e,t,n){var r,i=e;return"template"!=i.localName||i.hasAttribute("preserve-content")?"slot"===i.localName&&(t.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(i,t,n)||r,i.firstChild&&(r=this._parseTemplateChildNodes(i,t,n)||r),i.hasAttributes&&i.hasAttributes()&&(r=this._parseTemplateNodeAttributes(i,t,n)||r),r}},{key:"_parseTemplateChildNodes",value:function(e,t,n){if("script"!==e.localName&&"style"!==e.localName)for(var r,i=e.firstChild,o=0;i;i=r){if("template"==i.localName&&(i=Pa(i)),r=i.nextSibling,i.nodeType===Node.TEXT_NODE){for(var a=r;a&&a.nodeType===Node.TEXT_NODE;)i.textContent+=a.textContent,r=a.nextSibling,e.removeChild(a),a=r;if(t.stripWhiteSpace&&!i.textContent.trim()){e.removeChild(i);continue}}var s={parentIndex:o,parentInfo:n};this._parseTemplateNode(i,t,s)&&(s.infoIndex=t.nodeInfoList.push(s)-1),i.parentNode&&o++}}},{key:"_parseTemplateNestedTemplate",value:function(e,t,n){var r=this._parseTemplate(e,t);return(r.content=e.content.ownerDocument.createDocumentFragment()).appendChild(e.content),n.templateInfo=r,!0}},{key:"_parseTemplateNodeAttributes",value:function(e,t,n){for(var r,i=!1,o=Array.from(e.attributes),a=o.length-1;r=o[a];a--)i=this._parseTemplateNodeAttribute(e,t,n,r.name,r.value)||i;return i}},{key:"_parseTemplateNodeAttribute",value:function(e,t,n,r,i){return"on-"===r.slice(0,3)?(e.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:i}),!0):"id"===r&&(n.id=i,!0)}},{key:"_contentForTemplate",value:function(e){var t=e._templateInfo;return t&&t.content||e.content}}],(i=[{key:"_stampTemplate",value:function(e){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);var t=this.constructor._parseTemplate(e),n=t.nodeInfoList,r=t.content||e.content,i=document.importNode(r,!0);i.__noInsertionPoint=!t.hasInsertionPoint;var o=i.nodeList=new Array(n.length);i.$={};for(var a,s=0,l=n.length;s<l&&(a=n[s]);s++){var u=o[s]=Ca(i,a);Ea(0,i.$,u,a),Aa(0,u,a),Ta(this,u,a)}return i=i}},{key:"_addMethodEventListenerToNode",value:function(e,t,n,r){var i=function(e,t,n){return e=e._methodHost||e,function(t){e[n]?e[n](t,t.detail):console.warn("listener method `"+n+"` not defined")}}(r=r||e,0,n);return this._addEventListenerToNode(e,t,i),i}},{key:"_addEventListenerToNode",value:function(e,t,n){e.addEventListener(t,n)}},{key:"_removeEventListenerFromNode",value:function(e,t,n){e.removeEventListener(t,n)}}])&&wa(r.prototype,i),o&&wa(r,o),n}()});function Na(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ra(e,t){return!t||"object"!==Ma(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ia(e,t,n){return(Ia="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=za(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function za(e){return(za=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function La(e,t){return(La=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ma(e){return(Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
  499. /**
  500. @license
  501. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  502. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  503. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  504. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  505. Code distributed by Google as part of the polymer project is also
  506. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  507. */var Da=r,Fa=0,Ba={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ha=/[A-Z]/;function Ka(e,t){var n=e[t];if(n){if(!e.hasOwnProperty(t))for(var r in n=e[t]=Object.create(e[t]))for(var i=n[r],o=n[r]=Array(i.length),a=0;a<i.length;a++)o[a]=i[a]}else n=e[t]={};return n}function Va(e,t,n,r,i,o){if(t){var a=!1,s=Fa++;for(var l in n)Ua(e,t,s,l,n,r,i,o)&&(a=!0);return a}return!1}function Ua(e,t,n,r,i,o,a,s){var l=!1,u=t[a?Ro(r):r];if(u)for(var c,p=0,f=u.length;p<f&&(c=u[p]);p++)c.info&&c.info.lastRun===n||a&&!qa(r,c.trigger)||(c.info&&(c.info.lastRun=n),c.fn(e,r,i,o,c.info,a,s),l=!0);return l}function qa(e,t){if(t){var n=t.name;return n==e||t.structured&&Io(n,e)||t.wildcard&&zo(n,e)}return!0}function Ya(e,t,n,r,i){var o="string"==typeof i.method?e[i.method]:i.method,a=i.property;o?o.call(e,e.__data[a],r[a]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function Wa(e,t,n){var r=Ro(t);return r!==t&&(Ga(e,qo(r)+"-changed",n[t],t),!0)}function Ga(e,t,n,r){var i={value:n,queueProperty:!0};r&&(i.path=r),e.dispatchEvent(new CustomEvent(t,{detail:i}))}function Xa(e,t,n,r,i,o){var a=(o?Ro(t):t)!=t?t:null,s=a?Fo(e,a):e.__data[t];a&&void 0===s&&(s=n[t]),Ga(e,i.eventName,s,a)}function $a(e,t,n,r,i){var o=e.__data[t];io&&(o=io(o,i.attrName,"attribute",e)),e._propertyToAttribute(t,i.attrName,o)}function Ja(e,t,n,r,i){var o=is(e,t,n,r,i),a=i.methodInfo;e.__dataHasAccessor&&e.__dataHasAccessor[a]?e._setPendingProperty(a,o,!0):e[a]=o}function Za(e,t,n,r,i,o,a){n.bindings=n.bindings||[];var s={kind:r,target:i,parts:o,literal:a,isCompound:1!==o.length};if(n.bindings.push(s),function(e){return Boolean(e.target)&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode}(s)){var l=s.parts[0],u=l.event,c=l.negate;s.listenerEvent=u||Da.camelToDashCase(i)+"-changed",s.listenerNegate=c}for(var p=t.nodeInfoList.length,f=0;f<s.parts.length;f++){var h=s.parts[f];h.compoundIndex=f,Qa(e,t,s,h,p)}}function Qa(e,t,n,r,i){if(!r.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else for(var o=r.dependencies,a={index:i,binding:n,part:r,evaluator:e},s=0;s<o.length;s++){var l=o[s];"string"==typeof l&&((l=us(l)).wildcard=!0),e._addTemplatePropertyEffect(t,l.rootProperty,{fn:es,info:a,trigger:l})}}function es(e,t,n,r,i,o,a){var s=a[i.index],l=i.binding,u=i.part;if(o&&u.source&&t.length>u.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){var c=n[t];t=Lo(u.source,l.target,t),s._setPendingPropertyOrPath(t,c,!1,!0)&&e._enqueueClient(s)}else{!function(e,t,n,r,i){i=function(e,t,n,r){if(n.isCompound){var i=e.__dataCompoundStorage[n.target];i[r.compoundIndex]=t,t=i.join("")}return"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t)),t}(t,i,n,r),io&&(i=io(i,n.target,n.kind,t));if("attribute"==n.kind)e._valueToNodeAttribute(t,i,n.target);else{var o=n.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[o]?t[Ba.READ_ONLY]&&t[Ba.READ_ONLY][o]||t._setPendingProperty(o,i)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,o,i)}}(e,s,l,u,i.evaluator._evaluateBinding(e,u,t,n,r,o))}}function ts(e,t){if(t.isCompound){for(var n=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),r=t.parts,i=new Array(r.length),o=0;o<r.length;o++)i[o]=r[o].literal;var a=t.target;n[a]=i,t.literal&&"property"==t.kind&&(e[a]=t.literal)}}function ns(e,t,n){if(n.listenerEvent){var r=n.parts[0];e.addEventListener(n.listenerEvent,function(e){!function(e,t,n,r,i){var o,a=e.detail,s=a&&a.path;s?(r=Lo(n,r,s),o=a&&a.value):o=e.target[n],o=i?!o:o,t[Ba.READ_ONLY]&&t[Ba.READ_ONLY][r]||!t._setPendingPropertyOrPath(r,o,!0,Boolean(s))||a&&a.queueProperty||t._invalidateProperties()}(e,t,n.target,r.source,r.negate)})}}function rs(e,t,n,r,i,o){o=t.static||o&&("object"!==Ma(o)||o[t.methodName]);for(var a,s={methodName:t.methodName,args:t.args,methodInfo:i,dynamicFn:o},l=0;l<t.args.length&&(a=t.args[l]);l++)a.literal||e._addPropertyEffect(a.rootProperty,n,{fn:r,info:s,trigger:a});o&&e._addPropertyEffect(t.methodName,n,{fn:r,info:s})}function is(e,t,n,r,i){var o=e._methodHost||e,a=o[i.methodName];if(a){var s=function(e,t,n,r){for(var i=[],o=0,a=t.length;o<a;o++){var s=t[o],l=s.name,u=void 0;if(s.literal?u=s.value:s.structured?void 0===(u=Fo(e,l))&&(u=r[l]):u=e[l],s.wildcard){var c=0===l.indexOf(n+"."),p=0===n.indexOf(l)&&!c;i[o]={path:p?n:l,value:p?r[n]:u,base:u}}else i[o]=u}return i}(e.__data,i.args,t,n);return a.apply(o,s)}i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}var os=[],as=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function ss(e){for(var t="",n=0;n<e.length;n++){t+=e[n].literal||""}return t}function ls(e){var t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){var n={methodName:t[1],static:!0,args:os};return t[2].trim()?function(e,t){return t.args=e.map(function(e){var n=us(e);return n.literal||(t.static=!1),n},this),t}(t[2].replace(/\\,/g,"&comma;").split(","),n):n}return null}function us(e){var t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:t,value:"",literal:!1},r=t[0];switch("-"===r&&(r=t[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(t),n.literal=!0}return n.literal||(n.rootProperty=Ro(t),n.structured=No(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&&(n.name=t.slice(0,-2)))),n}function cs(e,t,n,r){var i=n+".splices";e.notifyPath(i,{indexSplices:r}),e.notifyPath(n+".length",t.length),e.__data[i]={indexSplices:null}}function ps(e,t,n,r,i,o){cs(e,t,n,[{index:r,addedCount:i,removed:o,object:t,type:"splice"}])}var fs=lo(function(e){var t=ja(_a(e)),n=function(e){function n(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=Ra(this,za(n).call(this))).__isPropertyEffectsClient=!0,e.__dataCounter=0,e.__dataClientsReady,e.__dataPendingClients,e.__dataToNotify,e.__dataLinkedPaths,e.__dataHasPaths,e.__dataCompoundStorage,e.__dataHost,e.__dataTemp,e.__dataClientsInitialized,e.__data,e.__dataPending,e.__dataOld,e.__computeEffects,e.__reflectEffects,e.__notifyEffects,e.__propagateEffects,e.__observeEffects,e.__readOnly,e.__templateInfo,e}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&La(e,t)}(n,t),r=n,o=[{key:"addPropertyEffect",value:function(e,t,n){this.prototype._addPropertyEffect(e,t,n)}},{key:"createPropertyObserver",value:function(e,t,n){this.prototype._createPropertyObserver(e,t,n)}},{key:"createMethodObserver",value:function(e,t){this.prototype._createMethodObserver(e,t)}},{key:"createNotifyingProperty",value:function(e){this.prototype._createNotifyingProperty(e)}},{key:"createReadOnlyProperty",value:function(e,t){this.prototype._createReadOnlyProperty(e,t)}},{key:"createReflectedProperty",value:function(e){this.prototype._createReflectedProperty(e)}},{key:"createComputedProperty",value:function(e,t,n){this.prototype._createComputedProperty(e,t,n)}},{key:"bindTemplate",value:function(e){return this.prototype._bindTemplate(e)}},{key:"_addTemplatePropertyEffect",value:function(e,t,n){(e.hostProps=e.hostProps||{})[t]=!0;var r=e.propertyEffects=e.propertyEffects||{};(r[t]=r[t]||[]).push(n)}},{key:"_parseTemplateNode",value:function(e,t,r){var i=Ia(za(n),"_parseTemplateNode",this).call(this,e,t,r);if(e.nodeType===Node.TEXT_NODE){var o=this._parseBindings(e.textContent,t);o&&(e.textContent=ss(o)||" ",Za(this,t,r,"text","textContent",o),i=!0)}return i}},{key:"_parseTemplateNodeAttribute",value:function(e,t,r,i,o){var a=this._parseBindings(o,t);if(a){var s=i,l="property";Ha.test(i)?l="attribute":"$"==i[i.length-1]&&(i=i.slice(0,-1),l="attribute");var u=ss(a);return u&&"attribute"==l&&e.setAttribute(i,u),"input"===e.localName&&"value"===s&&e.setAttribute(s,""),e.removeAttribute(s),"property"===l&&(i=Uo(i)),Za(this,t,r,l,i,a,u),!0}return Ia(za(n),"_parseTemplateNodeAttribute",this).call(this,e,t,r,i,o)}},{key:"_parseTemplateNestedTemplate",value:function(e,t,r){var i=Ia(za(n),"_parseTemplateNestedTemplate",this).call(this,e,t,r),o=r.templateInfo.hostProps;for(var a in o){Za(this,t,r,"property","_host_"+a,[{mode:"{",source:a,dependencies:[a]}])}return i}},{key:"_parseBindings",value:function(e,t){for(var n,r=[],i=0;null!==(n=as.exec(e));){n.index>i&&r.push({literal:e.slice(i,n.index)});var o=n[1][0],a=Boolean(n[2]),s=n[3].trim(),l=!1,u="",c=-1;"{"==o&&(c=s.indexOf("::"))>0&&(u=s.substring(c+2),s=s.substring(0,c),l=!0);var p=ls(s),f=[];if(p){for(var h=p.args,d=p.methodName,y=0;y<h.length;y++){var v=h[y];v.literal||f.push(v)}var m=t.dynamicFns;(m&&m[d]||p.static)&&(f.push(d),p.dynamicFn=!0)}else f.push(s);r.push({source:s,mode:o,negate:a,customEvent:l,signature:p,dependencies:f,event:u}),i=as.lastIndex}if(i&&i<e.length){var b=e.substring(i);b&&r.push({literal:b})}return r.length?r:null}},{key:"_evaluateBinding",value:function(e,t,n,r,i,o){var a;return a=t.signature?is(e,n,r,0,t.signature):n!=t.source?Fo(e,t.source):o&&No(n)?Fo(e,n):e.__data[n],t.negate&&(a=!a),a}}],(i=[{key:"_initializeProperties",value:function(){Ia(za(n.prototype),"_initializeProperties",this).call(this),hs.registerHost(this),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}},{key:"_initializeProtoProperties",value:function(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}},{key:"_initializeInstanceProperties",value:function(e){var t=this[Ba.READ_ONLY];for(var n in e)t&&t[n]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=e[n])}},{key:"_addPropertyEffect",value:function(e,t,n){this._createPropertyAccessor(e,t==Ba.READ_ONLY);var r=Ka(this,t)[e];r||(r=this[t][e]=[]),r.push(n)}},{key:"_removePropertyEffect",value:function(e,t,n){var r=Ka(this,t)[e],i=r.indexOf(n);i>=0&&r.splice(i,1)}},{key:"_hasPropertyEffect",value:function(e,t){var n=this[t];return Boolean(n&&n[e])}},{key:"_hasReadOnlyEffect",value:function(e){return this._hasPropertyEffect(e,Ba.READ_ONLY)}},{key:"_hasNotifyEffect",value:function(e){return this._hasPropertyEffect(e,Ba.NOTIFY)}},{key:"_hasReflectEffect",value:function(e){return this._hasPropertyEffect(e,Ba.REFLECT)}},{key:"_hasComputedEffect",value:function(e){return this._hasPropertyEffect(e,Ba.COMPUTE)}},{key:"_setPendingPropertyOrPath",value:function(e,t,r,i){if(i||Ro(Array.isArray(e)?e[0]:e)!==e){if(!i){var o=Fo(this,e);if(!(e=Bo(this,e,t))||!Ia(za(n.prototype),"_shouldPropertyChange",this).call(this,e,t,o))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,r))return function(e,t,n){var r,i=e.__dataLinkedPaths;if(i)for(var o in i){var a=i[o];zo(o,t)?(r=Lo(o,a,t),e._setPendingPropertyOrPath(r,n,!0,!0)):zo(a,t)&&(r=Lo(a,o,t),e._setPendingPropertyOrPath(r,n,!0,!0))}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,r);this[e]=t}return!1}},{key:"_setUnmanagedPropertyToNode",value:function(e,t,n){n===e[t]&&"object"!=Ma(n)||(e[t]=n)}},{key:"_setPendingProperty",value:function(e,t,n){var r=this.__dataHasPaths&&No(e),i=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,i[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),r?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(r||this[Ba.NOTIFY]&&this[Ba.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=n),!0)}},{key:"_setProperty",value:function(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}},{key:"_invalidateProperties",value:function(){this.__dataReady&&this._flushProperties()}},{key:"_enqueueClient",value:function(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}},{key:"_flushProperties",value:function(){this.__dataCounter++,Ia(za(n.prototype),"_flushProperties",this).call(this),this.__dataCounter--}},{key:"_flushClients",value:function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}},{key:"__enableOrFlushClients",value:function(){var e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(var t=0;t<e.length;t++){var n=e[t];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties()}}}},{key:"_readyClients",value:function(){this.__enableOrFlushClients()}},{key:"setProperties",value:function(e,t){for(var n in e)!t&&this[Ba.READ_ONLY]&&this[Ba.READ_ONLY][n]||this._setPendingPropertyOrPath(n,e[n],!0);this._invalidateProperties()}},{key:"ready",value:function(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}},{key:"_propertiesChanged",value:function(e,t,n){var r=this.__dataHasPaths;this.__dataHasPaths=!1,function(e,t,n,r){var i=e[Ba.COMPUTE];if(i)for(var o=t;Va(e,i,o,n,r);)Object.assign(n,e.__dataOld),Object.assign(t,e.__dataPending),o=e.__dataPending,e.__dataPending=null}(this,t,n,r);var i=this.__dataToNotify;this.__dataToNotify=null,this._propagatePropertyChanges(t,n,r),this._flushClients(),Va(this,this[Ba.REFLECT],t,n,r),Va(this,this[Ba.OBSERVE],t,n,r),i&&function(e,t,n,r,i){var o,a,s=e[Ba.NOTIFY],l=Fa++;for(var u in t)t[u]&&(s&&Ua(e,s,l,u,n,r,i)?o=!0:i&&Wa(e,u,n)&&(o=!0));o&&(a=e.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,i,t,n,r),1==this.__dataCounter&&(this.__dataTemp={})}},{key:"_propagatePropertyChanges",value:function(e,t,n){this[Ba.PROPAGATE]&&Va(this,this[Ba.PROPAGATE],e,t,n);for(var r=this.__templateInfo;r;)Va(this,r.propertyEffects,e,t,n,r.nodeList),r=r.nextTemplateInfo}},{key:"linkPaths",value:function(e,t){e=Mo(e),t=Mo(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}},{key:"unlinkPaths",value:function(e){e=Mo(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}},{key:"notifySplices",value:function(e,t){var n={path:""};cs(this,Fo(this,e,n),n.path,t)}},{key:"get",value:function(e,t){return Fo(t||this,e)}},{key:"set",value:function(e,t,n){n?Bo(n,e,t):this[Ba.READ_ONLY]&&this[Ba.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}},{key:"push",value:function(e){for(var t={path:""},n=Fo(this,e,t),r=n.length,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=n.push.apply(n,o);return o.length&&ps(this,n,t.path,r,o.length,[]),s}},{key:"pop",value:function(e){var t={path:""},n=Fo(this,e,t),r=Boolean(n.length),i=n.pop();return r&&ps(this,n,t.path,n.length,0,[i]),i}},{key:"splice",value:function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a,s={path:""},l=Fo(this,e,s);return t<0?t=l.length-Math.floor(-t):t&&(t=Math.floor(t)),a=2===arguments.length?l.splice(t):l.splice.apply(l,[t,n].concat(i)),(i.length||a.length)&&ps(this,l,s.path,t,i.length,a),a}},{key:"shift",value:function(e){var t={path:""},n=Fo(this,e,t),r=Boolean(n.length),i=n.shift();return r&&ps(this,n,t.path,0,0,[i]),i}},{key:"unshift",value:function(e){for(var t={path:""},n=Fo(this,e,t),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n.unshift.apply(n,i);return i.length&&ps(this,n,t.path,0,i.length,[]),a}},{key:"notifyPath",value:function(e,t){var n;if(1==arguments.length){var r={path:""};t=Fo(this,e,r),n=r.path}else n=Array.isArray(e)?Mo(e):e;this._setPendingPropertyOrPath(n,t,!0,!0)&&this._invalidateProperties()}},{key:"_createReadOnlyProperty",value:function(e,t){var n;this._addPropertyEffect(e,Ba.READ_ONLY),t&&(this["_set"+(n=e,n[0].toUpperCase()+n.substring(1))]=function(t){this._setProperty(e,t)})}},{key:"_createPropertyObserver",value:function(e,t,n){var r={property:e,method:t,dynamicFn:Boolean(n)};this._addPropertyEffect(e,Ba.OBSERVE,{fn:Ya,info:r,trigger:{name:e}}),n&&this._addPropertyEffect(t,Ba.OBSERVE,{fn:Ya,info:r,trigger:{name:t}})}},{key:"_createMethodObserver",value:function(e,t){var n=ls(e);if(!n)throw new Error("Malformed observer expression '"+e+"'");rs(this,n,Ba.OBSERVE,is,null,t)}},{key:"_createNotifyingProperty",value:function(e){this._addPropertyEffect(e,Ba.NOTIFY,{fn:Xa,info:{eventName:Da.camelToDashCase(e)+"-changed",property:e}})}},{key:"_createReflectedProperty",value:function(e){var t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,Ba.REFLECT,{fn:$a,info:{attrName:t}})}},{key:"_createComputedProperty",value:function(e,t,n){var r=ls(t);if(!r)throw new Error("Malformed computed expression '"+t+"'");rs(this,r,Ba.COMPUTE,Ja,e,n)}},{key:"_bindTemplate",value:function(e,t){var n=this.constructor._parseTemplate(e),r=this.__templateInfo==n;if(!r)for(var i in n.propertyEffects)this._createPropertyAccessor(i);if(t&&((n=Object.create(n)).wasPreBound=r,!r&&this.__templateInfo)){var o=this.__templateInfoLast||this.__templateInfo;return this.__templateInfoLast=o.nextTemplateInfo=n,n.previousTemplateInfo=o,n}return this.__templateInfo=n}},{key:"_stampTemplate",value:function(e){hs.beginHosting(this);var t=Ia(za(n.prototype),"_stampTemplate",this).call(this,e);hs.endHosting(this);var r=this._bindTemplate(e,!0);if(r.nodeList=t.nodeList,!r.wasPreBound)for(var i=r.childNodes=[],o=t.firstChild;o;o=o.nextSibling)i.push(o);return t.templateInfo=r,function(e,t){var n=t.nodeList,r=t.nodeInfoList;if(r.length)for(var i=0;i<r.length;i++){var o=r[i],a=n[i],s=o.bindings;if(s)for(var l=0;l<s.length;l++){var u=s[l];ts(a,u),ns(a,e,u)}a.__dataHost=e}}(this,r),this.__dataReady&&Va(this,r.propertyEffects,this.__data,null,!1,r.nodeList),t}},{key:"_removeBoundDom",value:function(e){var t=e.templateInfo;t.previousTemplateInfo&&(t.previousTemplateInfo.nextTemplateInfo=t.nextTemplateInfo),t.nextTemplateInfo&&(t.nextTemplateInfo.previousTemplateInfo=t.previousTemplateInfo),this.__templateInfoLast==t&&(this.__templateInfoLast=t.previousTemplateInfo),t.previousTemplateInfo=t.nextTemplateInfo=null;for(var n=t.childNodes,r=0;r<n.length;r++){var i=n[r];i.parentNode.removeChild(i)}}},{key:"PROPERTY_EFFECT_TYPES",get:function(){return Ba}}])&&Na(r.prototype,i),o&&Na(r,o),n}();return n,n}),hs={stack:[],registerHost:function(e){this.stack.length&&this.stack[this.stack.length-1]._enqueueClient(e)},beginHosting:function(e){this.stack.push(e)},endHosting:function(e){var t=this.stack.length;t&&this.stack[t-1]==e&&this.stack.pop()}};function ds(e){return(ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ys(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vs(e,t){return!t||"object"!==ds(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ms(e,t,n){return(ms="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=bs(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _s(e,t){return(_s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  508. /**
  509. @license
  510. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  511. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  512. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  513. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  514. Code distributed by Google as part of the polymer project is also
  515. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  516. */var gs=lo(function(e){var t=sa(e);function n(e){var t=Object.getPrototypeOf(e);return t.prototype instanceof i?t:null}function r(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){var t=null;e.hasOwnProperty(JSCompiler_renameProperty("properties",e))&&e.properties&&(t=function(e){var t={};for(var n in e){var r=e[n];t[n]="function"==typeof r?{type:r}:r}return t}(e.properties)),e.__ownProperties=t}return e.__ownProperties}var i=function(e){function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),vs(this,bs(i).apply(this,arguments))}var o,a,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_s(e,t)}(i,t),o=i,s=[{key:"finalize",value:function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){var e=n(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}},{key:"_finalizeClass",value:function(){var e=r(this);e&&this.createProperties(e)}},{key:"typeForProperty",value:function(e){var t=this._properties[e];return t&&t.type}},{key:"observedAttributes",get:function(){var e=this,t=this._properties;return t?Object.keys(t).map(function(t){return e.attributeNameForProperty(t)}):[]}},{key:"_properties",get:function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){var e=n(this);this.__properties=Object.assign({},e&&e._properties,r(this))}return this.__properties}}],(a=[{key:"_initializeProperties",value:function(){this.constructor.finalize(),ms(bs(i.prototype),"_initializeProperties",this).call(this)}},{key:"connectedCallback",value:function(){ms(bs(i.prototype),"connectedCallback",this)&&ms(bs(i.prototype),"connectedCallback",this).call(this),this._enableProperties()}},{key:"disconnectedCallback",value:function(){ms(bs(i.prototype),"disconnectedCallback",this)&&ms(bs(i.prototype),"disconnectedCallback",this).call(this)}}])&&ys(o.prototype,a),s&&ys(o,s),i}();return i});function ws(e){return(ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ks(e,t){return!t||"object"!==ws(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Os(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xs(e,t,n){return t&&Os(e.prototype,t),n&&Os(e,n),e}function Ss(e,t){return(Ss=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ps(e,t,n){return(Ps="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Cs(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Cs(e){return(Cs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
  517. /**
  518. @license
  519. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  520. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  521. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  522. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  523. Code distributed by Google as part of the polymer project is also
  524. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  525. */var Es=lo(function(e){var t=gs(fs(e));function n(e,t,n,r){for(var i,o=t.content.querySelectorAll("style"),a=bo(t),s=(i=ho(n))?_o(i):[],l=t.content.firstElementChild,u=0;u<s.length;u++){var c=s[u];c.textContent=e._processStyleText(c.textContent,r),t.content.insertBefore(c,l)}for(var p=0,f=0;f<a.length;f++){var h=a[f],d=o[p];d!==h?(h=h.cloneNode(!0),d.parentNode.insertBefore(h,d)):p++,h.textContent=e._processStyleText(h.textContent,r)}window.ShadyCSS&&window.ShadyCSS.prepareTemplate(t,n)}return function(e){function r(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=ks(this,Cs(r).call(this)))._template,e._importPath,e.rootPath,e.importPath,e.root,e.$,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ss(e,t)}(r,t),xs(r,null,[{key:"_finalizeClass",value:function(){var e;Ps(Cs(r),"_finalizeClass",this).call(this),this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&this.is&&(e=this.prototype,Ts.push(e));var t,n=((t=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",t))||(t.__ownObservers=t.hasOwnProperty(JSCompiler_renameProperty("observers",t))?t.observers:null),t.__ownObservers);n&&this.createObservers(n,this._properties);var i=this.template;i&&("string"==typeof i?(console.error("template getter must return HTMLTemplateElement"),i=null):i=i.cloneNode(!0)),this.prototype._template=i}},{key:"createProperties",value:function(e){for(var t in e)n=this.prototype,r=t,i=e[t],o=e,i.computed&&(i.readOnly=!0),i.computed&&!n._hasReadOnlyEffect(r)&&n._createComputedProperty(r,i.computed,o),i.readOnly&&!n._hasReadOnlyEffect(r)&&n._createReadOnlyProperty(r,!i.computed),i.reflectToAttribute&&!n._hasReflectEffect(r)&&n._createReflectedProperty(r),i.notify&&!n._hasNotifyEffect(r)&&n._createNotifyingProperty(r),i.observer&&n._createPropertyObserver(r,i.observer,o[i.observer]),n._addPropertyToAttributeMap(r);var n,r,i,o}},{key:"createObservers",value:function(e,t){for(var n=this.prototype,r=0;r<e.length;r++)n._createMethodObserver(e[r],t)}},{key:"template",get:function(){return this.hasOwnProperty(JSCompiler_renameProperty("_template",this))||(this._template=jo&&jo.import(this.is,"template")||Object.getPrototypeOf(this.prototype).constructor.template),this._template}},{key:"importPath",get:function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){var e=this.importMeta;if(e)this._importPath=to(e.url);else{var t=jo&&jo.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}}]),xs(r,[{key:"_initializeProperties",value:function(){0,this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),Ps(Cs(r.prototype),"_initializeProperties",this).call(this),this.rootPath=ro,this.importPath=this.constructor.importPath;var e=function(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",e))){e.__propertyDefaults=null;var t=e._properties;for(var n in t){var r=t[n];"value"in r&&(e.__propertyDefaults=e.__propertyDefaults||{},e.__propertyDefaults[n]=r)}}return e.__propertyDefaults}(this.constructor);if(e)for(var t in e){var n=e[t];if(!this.hasOwnProperty(t)){var i="function"==typeof n.value?n.value.call(this):n.value;this._hasAccessor(t)?this._setPendingProperty(t,i,!0):this[t]=i}}}},{key:"connectedCallback",value:function(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),Ps(Cs(r.prototype),"connectedCallback",this).call(this)}},{key:"ready",value:function(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),Ps(Cs(r.prototype),"ready",this).call(this)}},{key:"_readyClients",value:function(){this._template&&(this.root=this._attachDom(this.root)),Ps(Cs(r.prototype),"_readyClients",this).call(this)}},{key:"_attachDom",value:function(e){if(this.attachShadow)return e?(this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(e),this.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}},{key:"updateStyles",value:function(e){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,e)}},{key:"resolveUrl",value:function(e,t){return!t&&this.importPath&&(t=Qi(this.importPath)),Qi(e,t)}}],[{key:"_processStyleText",value:function(e,t){return eo(e,t)}},{key:"_finalizeTemplate",value:function(e){var t=this.prototype._template;if(t&&!t.__polymerFinalized){t.__polymerFinalized=!0;var r=this.importPath;n(this,t,e,r?Qi(r):""),this.prototype._bindTemplate(t)}}},{key:"_parseTemplateContent",value:function(e,t,n){return t.dynamicFns=t.dynamicFns||this._properties,Ps(Cs(r),"_parseTemplateContent",this).call(this,e,t,n)}}]),r}()}),Ts=[];function As(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
  526. /**
  527. @license
  528. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  529. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  530. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  531. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  532. Code distributed by Google as part of the polymer project is also
  533. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  534. */
  535. var js=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._asyncModule=null,this._callback=null,this._timer=null}var t,n,r;return t=e,r=[{key:"debounce",value:function(t,n,r){return t instanceof e?t.cancel():t=new e,t.setConfig(n,r),t}}],(n=[{key:"setConfig",value:function(e,t){var n=this;this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(function(){n._timer=null,n._callback()})}},{key:"cancel",value:function(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}},{key:"flush",value:function(){this.isActive()&&(this.cancel(),this._callback())}},{key:"isActive",value:function(){return null!=this._timer}}])&&As(t.prototype,n),r&&As(t,r),e}(),Ns="string"==typeof document.head.style.touchAction,Rs="__polymerGestures",Is="__polymerGesturesHandled",zs="__polymerGesturesTouchAction",Ls=2500,Ms=["mousedown","mousemove","mouseup","click"],Ds=[0,1,4,2],Fs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}();
  536. /**
  537. @license
  538. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  539. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  540. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  541. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  542. Code distributed by Google as part of the polymer project is also
  543. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  544. */function Bs(e){return Ms.indexOf(e)>-1}var Hs=!1;function Ks(e){if(!Bs(e)&&"touchend"!==e)return Ns&&Hs&&oo?{passive:!0}:void 0}!function(){try{var e=Object.defineProperty({},"passive",{get:function(){Hs=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();var Vs=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),Us=function(){};Us.prototype.reset,Us.prototype.mousedown,Us.prototype.mousemove,Us.prototype.mouseup,Us.prototype.touchstart,Us.prototype.touchmove,Us.prototype.touchend,Us.prototype.click;var qs=[],Ys={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0};function Ws(e){var t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];var n=e.getRootNode();if(e.id)for(var r=n.querySelectorAll("label[for = ".concat(e.id,"]")),i=0;i<r.length;i++)t.push(r[i])}return t}var Gs=function(e){var t,n=e.sourceCapabilities;if((!n||n.firesTouchEvents)&&(e[Is]={skip:!0},"click"===e.type)){var r=!1,i=e.composedPath&&e.composedPath();if(i)for(var o=0;o<i.length;o++){if(i[o].nodeType===Node.ELEMENT_NODE)if("label"===i[o].localName)qs.push(i[o]);else if(t=i[o],Ys[t.localName])for(var a=Ws(i[o]),s=0;s<a.length;s++)r=r||qs.indexOf(a[s])>-1;if(i[o]===Js.mouse.target)return}if(r)return;e.preventDefault(),e.stopPropagation()}};function Xs(e){for(var t,n=Vs?["click"]:Ms,r=0;r<n.length;r++)t=n[r],e?(qs.length=0,document.addEventListener(t,Gs,!0)):document.removeEventListener(t,Gs,!0)}function $s(e){var t=e.type;if(!Bs(t))return!1;if("mousemove"===t){var n=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!Fs&&(n=Ds[e.which]||0),Boolean(1&n)}return 0===(void 0===e.button?0:e.button)}var Js={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Zs(e,t,n){e.movefn=t,e.upfn=n,document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}function Qs(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}document.addEventListener("touchend",function(e){Js.mouse.mouseIgnoreJob||Xs(!0),Js.mouse.target=e.composedPath()[0],Js.mouse.mouseIgnoreJob=js.debounce(Js.mouse.mouseIgnoreJob,Jo.after(Ls),function(){Xs(),Js.mouse.target=null,Js.mouse.mouseIgnoreJob=null})},!!Hs&&{passive:!0});var el={},tl=[];function nl(e,t){for(var n=document.elementFromPoint(e,t),r=n;r&&r.shadowRoot&&!window.ShadyDOM;){if(r===(r=r.shadowRoot.elementFromPoint(e,t)))break;r&&(n=r)}return n}function rl(e){if(e.composedPath){var t=e.composedPath();return t.length>0?t[0]:e.target}return e.target}function il(e){var t,n=e.type,r=e.currentTarget[Rs];if(r){var i=r[n];if(i){if(!e[Is]&&(e[Is]={},"touch"===n.slice(0,5))){var o=(e=e).changedTouches[0];if("touchstart"===n&&1===e.touches.length&&(Js.touch.id=o.identifier),Js.touch.id!==o.identifier)return;Ns||"touchstart"!==n&&"touchmove"!==n||function(e){var t=e.changedTouches[0],n=e.type;if("touchstart"===n)Js.touch.x=t.clientX,Js.touch.y=t.clientY,Js.touch.scrollDecided=!1;else if("touchmove"===n){if(Js.touch.scrollDecided)return;Js.touch.scrollDecided=!0;var r=function(e){var t="auto",n=e.composedPath&&e.composedPath();if(n)for(var r,i=0;i<n.length;i++)if((r=n[i])[zs]){t=r[zs];break}return t}(e),i=!1,o=Math.abs(Js.touch.x-t.clientX),a=Math.abs(Js.touch.y-t.clientY);e.cancelable&&("none"===r?i=!0:"pan-x"===r?i=a>o:"pan-y"===r&&(i=o>a)),i?e.preventDefault():i("track")}}(e)}if(!(t=e[Is]).skip){for(var a,s=0;s<tl.length;s++)i[(a=tl[s]).name]&&!t[a.name]&&a.flow&&a.flow.start.indexOf(e.type)>-1&&a.reset&&a.reset();for(var l,u=0;u<tl.length;u++)i[(l=tl[u]).name]&&!t[l.name]&&(t[l.name]=!0,l[n](e))}}}}function ol(e,t,n){return!!el[t]&&(function(e,t,n){var r=el[t],i=r.deps,o=r.name,a=e[Rs];a||(e[Rs]=a={});for(var s,l,u=0;u<i.length;u++)s=i[u],Vs&&Bs(s)&&"click"!==s||((l=a[s])||(a[s]=l={_count:0}),0===l._count&&e.addEventListener(s,il,Ks(s)),l[o]=(l[o]||0)+1,l._count=(l._count||0)+1);e.addEventListener(t,n),r.touchAction&&ll(e,r.touchAction)}(e,t,n),!0)}function al(e,t,n){return!!el[t]&&(function(e,t,n){var r=el[t],i=r.deps,o=r.name,a=e[Rs];if(a)for(var s,l,u=0;u<i.length;u++)s=i[u],(l=a[s])&&l[o]&&(l[o]=(l[o]||1)-1,l._count=(l._count||1)-1,0===l._count&&e.removeEventListener(s,il,Ks(s)));e.removeEventListener(t,n)}(e,t,n),!0)}function sl(e){tl.push(e);for(var t=0;t<e.emits.length;t++)el[e.emits[t]]=e}function ll(e,t){Ns&&Zo.run(function(){e.style.touchAction=t}),e[zs]=t}function ul(e,t,n){var r=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=n,e.dispatchEvent(r),r.defaultPrevented){var i=n.preventer||n.sourceEvent;i&&i.preventDefault&&i.preventDefault()}}function cl(e){var t=function(e){for(var t,n=0;n<tl.length;n++){t=tl[n];for(var r=0;r<t.emits.length;r++)if(t.emits[r]===e)return t}return null}(e);t.info&&(t.info.prevent=!0)}function pl(){Js.mouse.mouseIgnoreJob&&Js.mouse.mouseIgnoreJob.flush()}sl({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Qs(this.info)},mousedown:function(e){if($s(e)){var t=rl(e),n=this;Zs(this.info,function(e){$s(e)||(n._fire("up",t,e),Qs(n.info))},function(e){$s(e)&&n._fire("up",t,e),Qs(n.info)}),this._fire("down",t,e)}},touchstart:function(e){this._fire("down",rl(e),e.changedTouches[0],e)},touchend:function(e){this._fire("up",rl(e),e.changedTouches[0],e)},_fire:function(e,t,n,r){ul(t,e,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:r,prevent:function(e){return cl(e)}})}}),sl({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Qs(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),r=Math.abs(this.info.y-t);return n>=5||r>=5},mousedown:function(e){if($s(e)){var t=rl(e),n=this,r=function(e){var r=e.clientX,i=e.clientY;n.hasMovedEnough(r,i)&&(n.info.state=n.info.started?"mouseup"===e.type?"end":"track":"start","start"===n.info.state&&cl("tap"),n.info.addMove({x:r,y:i}),$s(e)||(n.info.state="end",Qs(n.info)),n._fire(t,e),n.info.started=!0)};Zs(this.info,r,function(e){n.info.started&&r(e),Qs(n.info)}),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){var t=rl(e),n=e.changedTouches[0],r=n.clientX,i=n.clientY;this.hasMovedEnough(r,i)&&("start"===this.info.state&&cl("tap"),this.info.addMove({x:r,y:i}),this._fire(t,n),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=rl(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this._fire(t,n,e))},_fire:function(e,t){var n,r=this.info.moves[this.info.moves.length-2],i=this.info.moves[this.info.moves.length-1],o=i.x-this.info.x,a=i.y-this.info.y,s=0;r&&(n=i.x-r.x,s=i.y-r.y),ul(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:o,dy:a,ddx:n,ddy:s,sourceEvent:t,hover:function(){return nl(t.clientX,t.clientY)}})}}),sl({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.clientX,this.info.y=e.clientY},mousedown:function(e){$s(e)&&this.save(e)},click:function(e){$s(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0],e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function(e,t){var n=Math.abs(e.clientX-this.info.x),r=Math.abs(e.clientY-this.info.y),i=rl(t||e);i&&!i.disabled&&(isNaN(n)||isNaN(r)||n<=25&&r<=25||function(e){if("click"===e.type){if(0===e.detail)return!0;var t=rl(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;var n=t.getBoundingClientRect(),r=e.pageX,i=e.pageY;return!(r>=n.left&&r<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(this.info.prevent||ul(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}});var fl=rl,hl=ol,dl=al;function yl(e){return(yl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ml(e,t){return!t||"object"!==yl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bl(e,t,n){return(bl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function _l(e){return(_l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gl(e,t){return(gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  545. /**
  546. @license
  547. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  548. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  549. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  550. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  551. Code distributed by Google as part of the polymer project is also
  552. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  553. */var wl=i,kl=lo(function(e){return function(t){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),ml(this,_l(n).apply(this,arguments))}var r,i,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gl(e,t)}(n,e),r=n,(i=[{key:"_addEventListenerToNode",value:function(e,t,r){wl.addListener(e,t,r)||bl(_l(n.prototype),"_addEventListenerToNode",this).call(this,e,t,r)}},{key:"_removeEventListenerFromNode",value:function(e,t,r){wl.removeListener(e,t,r)||bl(_l(n.prototype),"_removeEventListenerFromNode",this).call(this,e,t,r)}}])&&vl(r.prototype,i),o&&vl(r,o),n}()});function Ol(e){return(Ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xl(e,t){return!t||"object"!==Ol(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t,n){return t&&Sl(e.prototype,t),n&&Sl(e,n),e}function Cl(e,t){return(Cl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function El(e,t,n){return(El="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Tl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Tl(e){return(Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
  554. /**
  555. @license
  556. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  557. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  558. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  559. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  560. Code distributed by Google as part of the polymer project is also
  561. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  562. */var Al=/:host\(:dir\((ltr|rtl)\)\)/g,jl=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,Nl=[],Rl=null,Il="";function zl(){Il=document.documentElement.getAttribute("dir")}function Ll(e){e.__autoDirOptOut||e.setAttribute("dir",Il)}function Ml(){zl(),Il=document.documentElement.getAttribute("dir");for(var e=0;e<Nl.length;e++)Ll(Nl[e])}var Dl=lo(function(e){Rl||(zl(),(Rl=new MutationObserver(Ml)).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));var t=_a(e),n=function(e){function n(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=xl(this,Tl(n).call(this))).__autoDirOptOut=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cl(e,t)}(n,t),Pl(n,null,[{key:"_processStyleText",value:function(e,t){return e=El(Tl(n),"_processStyleText",this).call(this,e,t),e=this._replaceDirInCssText(e)}},{key:"_replaceDirInCssText",value:function(e){var t=e;return e!==(t=(t=t.replace(Al,':host([dir="$1"])')).replace(jl,':host([dir="$2"]) $1'))&&(this.__activateDir=!0),t}}]),Pl(n,[{key:"ready",value:function(){El(Tl(n.prototype),"ready",this).call(this),this.__autoDirOptOut=this.hasAttribute("dir")}},{key:"connectedCallback",value:function(){t.prototype.connectedCallback&&El(Tl(n.prototype),"connectedCallback",this).call(this),this.constructor.__activateDir&&(Rl&&Rl.takeRecords().length&&Ml(),Nl.push(this),Ll(this))}},{key:"disconnectedCallback",value:function(){if(t.prototype.disconnectedCallback&&El(Tl(n.prototype),"disconnectedCallback",this).call(this),this.constructor.__activateDir){var e=Nl.indexOf(this);e>-1&&Nl.splice(e,1)}}}]),n}();return n.__activateDir=!1,n});
  563. /**
  564. @license
  565. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  566. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  567. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  568. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  569. Code distributed by Google as part of the polymer project is also
  570. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  571. */function Fl(e){window.HTMLImports?HTMLImports.whenReady(e):e()}n(9);
  572. /**
  573. @license
  574. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  575. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  576. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  577. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  578. Code distributed by Google as part of the polymer project is also
  579. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  580. */function Bl(e,t,n){return{index:e,removed:t,addedCount:n}}var Hl=0,Kl=1,Vl=2,Ul=3;function ql(e,t,n,r,i,o){var a,s=0,l=0,u=Math.min(n-t,o-i);if(0==t&&0==i&&(s=function(e,t,n){for(var r=0;r<n;r++)if(!Wl(e[r],t[r]))return r;return n}(e,r,u)),n==e.length&&o==r.length&&(l=function(e,t,n){var r=e.length,i=t.length,o=0;for(;o<n&&Wl(e[--r],t[--i]);)o++;return o}(e,r,u-s)),i+=s,o-=l,(n-=l)-(t+=s)==0&&o-i==0)return[];if(t==n){for(a=Bl(t,[],0);i<o;)a.removed.push(r[i++]);return[a]}if(i==o)return[Bl(t,[],n-t)];var c=function(e){for(var t=e.length-1,n=e[0].length-1,r=e[t][n],i=[];t>0||n>0;)if(0!=t)if(0!=n){var o=e[t-1][n-1],a=e[t-1][n],s=e[t][n-1],l=void 0;(l=a<s?a<o?a:o:s<o?s:o)==o?(o==r?i.push(Hl):(i.push(Kl),r=o),t--,n--):l==a?(i.push(Ul),t--,r=a):(i.push(Vl),n--,r=s)}else i.push(Ul),t--;else i.push(Vl),n--;return i.reverse(),i}(function(e,t,n,r,i,o){for(var a=o-i+1,s=n-t+1,l=new Array(a),u=0;u<a;u++)l[u]=new Array(s),l[u][0]=u;for(var c=0;c<s;c++)l[0][c]=c;for(var p=1;p<a;p++)for(var f=1;f<s;f++)if(Wl(e[t+f-1],r[i+p-1]))l[p][f]=l[p-1][f-1];else{var h=l[p-1][f]+1,d=l[p][f-1]+1;l[p][f]=h<d?h:d}return l}(e,t,n,r,i,o));a=void 0;for(var p=[],f=t,h=i,d=0;d<c.length;d++)switch(c[d]){case Hl:a&&(p.push(a),a=void 0),f++,h++;break;case Kl:a||(a=Bl(f,[],0)),a.addedCount++,f++,a.removed.push(r[h]),h++;break;case Vl:a||(a=Bl(f,[],0)),a.addedCount++,f++;break;case Ul:a||(a=Bl(f,[],0)),a.removed.push(r[h]),h++}return a&&p.push(a),p}function Yl(e,t){return ql(e,0,e.length,t,0,t.length)}function Wl(e,t){return e===t}function Gl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xl(e,t,n){return t&&Gl(e.prototype,t),n&&Gl(e,n),e}
  581. /**
  582. @license
  583. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  584. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  585. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  586. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  587. Code distributed by Google as part of the polymer project is also
  588. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  589. */function $l(e){return"slot"===e.localName}var Jl=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=n,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=function(){r._schedule()},this.connect(),this._schedule()}return Xl(e,null,[{key:"getFlattenedNodes",value:function(e){return $l(e)?(e=e).assignedNodes({flatten:!0}):Array.from(e.childNodes).map(function(e){return $l(e)?(e=e).assignedNodes({flatten:!0}):[e]}).reduce(function(e,t){return e.concat(t)},[])}}]),Xl(e,[{key:"connect",value:function(){var e=this;$l(this._target)?this._listenSlots([this._target]):this._target.children&&(this._listenSlots(this._target.children),window.ShadyDOM?this._shadyChildrenObserver=ShadyDOM.observeChildren(this._target,function(t){e._processMutations(t)}):(this._nativeChildrenObserver=new MutationObserver(function(t){e._processMutations(t)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}},{key:"disconnect",value:function(){$l(this._target)?this._unlistenSlots([this._target]):this._target.children&&(this._unlistenSlots(this._target.children),window.ShadyDOM&&this._shadyChildrenObserver?(ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}},{key:"_schedule",value:function(){var e=this;this._scheduled||(this._scheduled=!0,Zo.run(function(){return e.flush()}))}},{key:"_processMutations",value:function(e){this._processSlotMutations(e),this.flush()}},{key:"_processSlotMutations",value:function(e){if(e)for(var t=0;t<e.length;t++){var n=e[t];n.addedNodes&&this._listenSlots(n.addedNodes),n.removedNodes&&this._unlistenSlots(n.removedNodes)}}},{key:"flush",value:function(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;for(var e,t={target:this._target,addedNodes:[],removedNodes:[]},n=this.constructor.getFlattenedNodes(this._target),r=Yl(n,this._effectiveNodes),i=0;i<r.length&&(e=r[i]);i++)for(var o,a=0;a<e.removed.length&&(o=e.removed[a]);a++)t.removedNodes.push(o);for(var s,l=0;l<r.length&&(s=r[l]);l++)for(var u=s.index;u<s.index+s.addedCount;u++)t.addedNodes.push(n[u]);this._effectiveNodes=n;var c=!1;return(t.addedNodes.length||t.removedNodes.length)&&(c=!0,this.callback.call(this._target,t)),c}},{key:"_listenSlots",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];$l(n)&&n.addEventListener("slotchange",this._boundSchedule)}}},{key:"_unlistenSlots",value:function(e){for(var t=0;t<e.length;t++){var n=e[t];$l(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}}]),e}(),Zl=[],Ql=function(e){Zl.push(e)};
  590. /**
  591. @license
  592. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  593. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  594. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  595. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  596. Code distributed by Google as part of the polymer project is also
  597. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  598. */function eu(){for(var e=Boolean(Zl.length);Zl.length;)try{Zl.shift().flush()}catch(e){setTimeout(function(){throw e})}return e}var tu=function(){var e,t;do{e=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=eu()}while(e||t)};function nu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ru(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function iu(e,t,n){return t&&ru(e.prototype,t),n&&ru(e,n),e}
  599. /**
  600. @license
  601. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  602. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  603. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  604. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  605. Code distributed by Google as part of the polymer project is also
  606. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  607. */var ou=Element.prototype,au=ou.matches||ou.matchesSelector||ou.mozMatchesSelector||ou.msMatchesSelector||ou.oMatchesSelector||ou.webkitMatchesSelector,su=function(e,t){return au.call(e,t)},lu=function(){function e(t){nu(this,e),this.node=t}return iu(e,[{key:"observeNodes",value:function(e){return new Jl(this.node,e)}},{key:"unobserveNodes",value:function(e){e.disconnect()}},{key:"notifyObserver",value:function(){}},{key:"deepContains",value:function(e){if(this.node.contains(e))return!0;for(var t=e,n=e.ownerDocument;t&&t!==n&&t!==this.node;)t=t.parentNode||t.host;return t===this.node}},{key:"getOwnerRoot",value:function(){return this.node.getRootNode()}},{key:"getDistributedNodes",value:function(){return"slot"===this.node.localName?this.node.assignedNodes({flatten:!0}):[]}},{key:"getDestinationInsertionPoints",value:function(){for(var e=[],t=this.node.assignedSlot;t;)e.push(t),t=t.assignedSlot;return e}},{key:"importNode",value:function(e,t){return(this.node instanceof Document?this.node:this.node.ownerDocument).importNode(e,t)}},{key:"getEffectiveChildNodes",value:function(){return Jl.getFlattenedNodes(this.node)}},{key:"queryDistributedElements",value:function(e){for(var t,n=this.getEffectiveChildNodes(),r=[],i=0,o=n.length;i<o&&(t=n[i]);i++)t.nodeType===Node.ELEMENT_NODE&&su(t,e)&&r.push(t);return r}},{key:"activeElement",get:function(){var e=this.node;return void 0!==e._activeElement?e._activeElement:e.activeElement}}]),e}();!function(e,t){for(var n=function(n){var r=t[n];e[r]=function(){return this.node[r].apply(this.node,arguments)}},r=0;r<t.length;r++)n(r)}(lu.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),function(e,t){for(var n=function(n){var r=t[n];Object.defineProperty(e,r,{get:function(){return this.node[r]},configurable:!0})},r=0;r<t.length;r++)n(r)}(lu.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),function(e,t){for(var n=function(n){var r=t[n];Object.defineProperty(e,r,{get:function(){return this.node[r]},set:function(e){this.node[r]=e},configurable:!0})},r=0;r<t.length;r++)n(r)}(lu.prototype,["textContent","innerHTML"]);var uu=function(){function e(t){nu(this,e),this.event=t}return iu(e,[{key:"rootTarget",get:function(){return this.event.composedPath()[0]}},{key:"localTarget",get:function(){return this.event.target}},{key:"path",get:function(){return this.event.composedPath()}}]),e}();lu.prototype.cloneNode,lu.prototype.appendChild,lu.prototype.insertBefore,lu.prototype.removeChild,lu.prototype.replaceChild,lu.prototype.setAttribute,lu.prototype.removeAttribute,lu.prototype.querySelector,lu.prototype.querySelectorAll;var cu=function(e){var t;(e=e||document).__domApi||(t=e instanceof Event?new uu(e):new lu(e),e.__domApi=t);return e.__domApi};function pu(e){return(pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fu(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function hu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function du(e,t){return!t||"object"!==pu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yu(e,t,n){return(yu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=vu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function vu(e){return(vu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mu(e,t){return(mu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  608. /**
  609. @license
  610. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  611. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  612. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  613. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  614. Code distributed by Google as part of the polymer project is also
  615. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  616. */var bu=window.ShadyCSS,_u=lo(function(e){var t=Dl(kl(Es(e))),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"},r=function(e){function r(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=du(this,vu(r).call(this))).isAttached,e.__boundListeners,e._debouncers,e._applyListeners(),e}var i,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mu(e,t)}(r,t),i=r,a=[{key:"importMeta",get:function(){return this.prototype.importMeta}}],(o=[{key:"created",value:function(){}},{key:"connectedCallback",value:function(){yu(vu(r.prototype),"connectedCallback",this).call(this),this.isAttached=!0,this.attached()}},{key:"attached",value:function(){}},{key:"disconnectedCallback",value:function(){yu(vu(r.prototype),"disconnectedCallback",this).call(this),this.isAttached=!1,this.detached()}},{key:"detached",value:function(){}},{key:"attributeChangedCallback",value:function(e,t,n,i){t!==n&&(yu(vu(r.prototype),"attributeChangedCallback",this).call(this,e,t,n,i),this.attributeChanged(e,t,n))}},{key:"attributeChanged",value:function(e,t,n){}},{key:"_initializeProperties",value:function(){var e=Object.getPrototypeOf(this);e.hasOwnProperty("__hasRegisterFinished")||(e.__hasRegisterFinished=!0,this._registered()),yu(vu(r.prototype),"_initializeProperties",this).call(this),this.root=this,this.created()}},{key:"_registered",value:function(){}},{key:"ready",value:function(){this._ensureAttributes(),yu(vu(r.prototype),"ready",this).call(this)}},{key:"_ensureAttributes",value:function(){}},{key:"_applyListeners",value:function(){}},{key:"serialize",value:function(e){return this._serializeValue(e)}},{key:"deserialize",value:function(e,t){return this._deserializeValue(e,t)}},{key:"reflectPropertyToAttribute",value:function(e,t,n){this._propertyToAttribute(e,t,n)}},{key:"serializeValueToAttribute",value:function(e,t,n){this._valueToNodeAttribute(n||this,e,t)}},{key:"extend",value:function(e,t){if(!e||!t)return e||t;for(var n,r=Object.getOwnPropertyNames(t),i=0;i<r.length&&(n=r[i]);i++){var o=Object.getOwnPropertyDescriptor(t,n);o&&Object.defineProperty(e,n,o)}return e}},{key:"mixin",value:function(e,t){for(var n in t)e[n]=t[n];return e}},{key:"chainObject",value:function(e,t){return e&&t&&e!==t&&(e.__proto__=t),e}},{key:"instanceTemplate",value:function(e){var t=this.constructor._contentForTemplate(e);return document.importNode(t,!0)}},{key:"fire",value:function(e,t,n){n=n||{},t=null==t?{}:t;var r=new Event(e,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return r.detail=t,(n.node||this).dispatchEvent(r),r}},{key:"listen",value:function(e,t,n){e=e||this;var r=this.__boundListeners||(this.__boundListeners=new WeakMap),i=r.get(e);i||(i={},r.set(e,i));var o=t+n;i[o]||(i[o]=this._addMethodEventListenerToNode(e,t,n,this))}},{key:"unlisten",value:function(e,t,n){e=e||this;var r=this.__boundListeners&&this.__boundListeners.get(e),i=t+n,o=r&&r[i];o&&(this._removeEventListenerFromNode(e,t,o),r[i]=null)}},{key:"setScrollDirection",value:function(e,t){ll(t||this,n[e]||"auto")}},{key:"$$",value:function(e){return this.root.querySelector(e)}},{key:"distributeContent",value:function(){window.ShadyDOM&&this.shadowRoot&&ShadyDOM.flush()}},{key:"getEffectiveChildNodes",value:function(){return cu(this).getEffectiveChildNodes()}},{key:"queryDistributedElements",value:function(e){return cu(this).queryDistributedElements(e)}},{key:"getEffectiveChildren",value:function(){return this.getEffectiveChildNodes().filter(function(e){return e.nodeType===Node.ELEMENT_NODE})}},{key:"getEffectiveTextContent",value:function(){for(var e,t=this.getEffectiveChildNodes(),n=[],r=0;e=t[r];r++)e.nodeType!==Node.COMMENT_NODE&&n.push(e.textContent);return n.join("")}},{key:"queryEffectiveChildren",value:function(e){var t=this.queryDistributedElements(e);return t&&t[0]}},{key:"queryAllEffectiveChildren",value:function(e){return this.queryDistributedElements(e)}},{key:"getContentChildNodes",value:function(e){var t=this.root.querySelector(e||"slot");return t?cu(t).getDistributedNodes():[]}},{key:"getContentChildren",value:function(e){return this.getContentChildNodes(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE})}},{key:"isLightDescendant",value:function(e){return this!==e&&this.contains(e)&&this.getRootNode()===e.getRootNode()}},{key:"isLocalDescendant",value:function(e){return this.root===e.getRootNode()}},{key:"scopeSubtree",value:function(e,t){}},{key:"getComputedStyleValue",value:function(e){return bu.getComputedStyleValue(this,e)}},{key:"debounce",value:function(e,t,n){return this._debouncers=this._debouncers||{},this._debouncers[e]=js.debounce(this._debouncers[e],n>0?Jo.after(n):Zo,t.bind(this))}},{key:"isDebouncerActive",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];return!(!t||!t.isActive())}},{key:"flushDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.flush()}},{key:"cancelDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.cancel()}},{key:"async",value:function(e,t){return t>0?Jo.run(e.bind(this),t):~Zo.run(e.bind(this))}},{key:"cancelAsync",value:function(e){e<0?Zo.cancel(~e):Jo.cancel(e)}},{key:"create",value:function(e,t){var n=document.createElement(e);if(t)if(n.setProperties)n.setProperties(t);else for(var r in t)n[r]=t[r];return n}},{key:"importHref",value:function(e,t,n,r){return function(e,t,n,r){var i=document.head.querySelector('link[href="'+e+'"][import-href]');i||((i=document.createElement("link")).rel="import",i.href=e,i.setAttribute("import-href","")),r&&i.setAttribute("async","");var o=function(){i.removeEventListener("load",a),i.removeEventListener("error",s)},a=function(e){o(),i.__dynamicImportLoaded=!0,t&&Fl(function(){t(e)})},s=function(e){o(),i.parentNode&&i.parentNode.removeChild(i),n&&Fl(function(){n(e)})};return i.addEventListener("load",a),i.addEventListener("error",s),null==i.parentNode?document.head.appendChild(i):i.__dynamicImportLoaded&&i.dispatchEvent(new Event("load")),i}(e,t?t.bind(this):null,n?n.bind(this):null,r)}},{key:"elementMatches",value:function(e,t){return su(t||this,e)}},{key:"toggleAttribute",value:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.hasAttribute(e)),t?n.setAttribute(e,""):n.removeAttribute(e)}},{key:"toggleClass",value:function(e,t,n){n=n||this,1==arguments.length&&(t=!n.classList.contains(e)),t?n.classList.add(e):n.classList.remove(e)}},{key:"transform",value:function(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}},{key:"translate3d",value:function(e,t,n,r){r=r||this,this.transform("translate3d("+e+","+t+","+n+")",r)}},{key:"arrayDelete",value:function(e,t){var n;if(Array.isArray(e)){if((n=e.indexOf(t))>=0)return e.splice(n,1)}else if((n=Fo(this,e).indexOf(t))>=0)return this.splice(e,n,1);return null}},{key:"_logger",value:function(e,t){var n;switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":(n=console)[e].apply(n,fu(t))}}},{key:"_log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._logger("log",t)}},{key:"_warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._logger("warn",t)}},{key:"_error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._logger("error",t)}},{key:"_logf",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return["[%s::%s]",this.is,e].concat(n)}},{key:"domHost",get:function(){var e=this.getRootNode();return e instanceof DocumentFragment?e.host:e}}])&&hu(i.prototype,o),a&&hu(i,a),r}();return r.prototype.is="",r});function gu(e){return(gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ku(e,t){return!t||"object"!==gu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ou(e,t,n){return(Ou="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function xu(e){return(xu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Su(e,t){return(Su=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  617. /**
  618. @license
  619. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  620. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  621. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  622. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  623. Code distributed by Google as part of the polymer project is also
  624. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  625. */var Pu={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0};function Cu(e,t){if(!e)return t=t;t=_u(t),Array.isArray(e)||(e=[e]);var n=t.prototype.behaviors;return t=function e(t,n){for(var r=0;r<t.length;r++){var i=t[r];i&&(n=Array.isArray(i)?e(i,n):Eu(i,n))}return n}(e=function e(t,n,r){n=n||[];for(var i=t.length-1;i>=0;i--){var o=t[i];o?Array.isArray(o)?e(o,n):n.indexOf(o)<0&&(!r||r.indexOf(o)<0)&&n.unshift(o):console.warn("behavior is null, check for missing or 404 import")}return n}(e,null,n),t),n&&(e=n.concat(e)),t.prototype.behaviors=e,t}function Eu(e,t){var n=function(n){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),ku(this,xu(r).apply(this,arguments))}var i,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Su(e,t)}(r,t),i=r,a=[{key:"properties",get:function(){return e.properties}},{key:"observers",get:function(){return e.observers}},{key:"template",get:function(){return e._template||jo&&jo.import(this.is,"template")||t.template||this.prototype._template||null}}],(o=[{key:"created",value:function(){Ou(xu(r.prototype),"created",this).call(this),e.created&&e.created.call(this)}},{key:"_registered",value:function(){Ou(xu(r.prototype),"_registered",this).call(this),e.beforeRegister&&e.beforeRegister.call(Object.getPrototypeOf(this)),e.registered&&e.registered.call(Object.getPrototypeOf(this))}},{key:"_applyListeners",value:function(){if(Ou(xu(r.prototype),"_applyListeners",this).call(this),e.listeners)for(var t in e.listeners)this._addMethodEventListenerToNode(this,t,e.listeners[t])}},{key:"_ensureAttributes",value:function(){if(e.hostAttributes)for(var t in e.hostAttributes)this._ensureAttribute(t,e.hostAttributes[t]);Ou(xu(r.prototype),"_ensureAttributes",this).call(this)}},{key:"ready",value:function(){Ou(xu(r.prototype),"ready",this).call(this),e.ready&&e.ready.call(this)}},{key:"attached",value:function(){Ou(xu(r.prototype),"attached",this).call(this),e.attached&&e.attached.call(this)}},{key:"detached",value:function(){Ou(xu(r.prototype),"detached",this).call(this),e.detached&&e.detached.call(this)}},{key:"attributeChanged",value:function(t,n,i){Ou(xu(r.prototype),"attributeChanged",this).call(this,t,n,i),e.attributeChanged&&e.attributeChanged.call(this,t,n,i)}}])&&wu(i.prototype,o),a&&wu(i,a),r}();for(var r in n.generatedFrom=e,e)if(!(r in Pu)){var i=Object.getOwnPropertyDescriptor(e,r);i&&Object.defineProperty(n.prototype,r,i)}return n}var Tu=function e(t){var n;return n="function"==typeof t?t:e.Class(t),customElements.define(n.is,n),n};
  626. /**
  627. @license
  628. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  629. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  630. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  631. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  632. Code distributed by Google as part of the polymer project is also
  633. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  634. */function Au(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ju(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nu(e,t,n){return t&&ju(e.prototype,t),n&&ju(e,n),e}function Ru(e,t){return!t||"object"!==Mu(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Iu(e){return(Iu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lu(e,t)}function Lu(e,t){return(Lu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mu(e){return(Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
  635. /**
  636. @license
  637. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  638. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  639. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  640. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  641. Code distributed by Google as part of the polymer project is also
  642. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  643. */function Du(e,t,n,r,i){var o;i&&(o="object"===Mu(n)&&null!==n)&&(r=e.__dataTemp[t]);var a=r!==n&&(r==r||n==n);return o&&a&&(e.__dataTemp[t]=n),a}Tu.Class=function(e){e||console.warn("Polymer's Class function requires `info` argument");var t=Eu(e,e.behaviors?Cu(e.behaviors,HTMLElement):_u(HTMLElement));return t.is=e.is,t};var Fu=lo(function(e){return function(t){function n(){return Au(this,n),Ru(this,Iu(n).apply(this,arguments))}return zu(n,e),Nu(n,[{key:"_shouldPropertyChange",value:function(e,t,n){return Du(this,e,t,n,!0)}}]),n}()}),Bu=lo(function(e){return function(t){function n(){return Au(this,n),Ru(this,Iu(n).apply(this,arguments))}return zu(n,e),Nu(n,[{key:"_shouldPropertyChange",value:function(e,t,n){return Du(this,e,t,n,this.mutableData)}}],[{key:"properties",get:function(){return{mutableData:Boolean}}}]),n}()});function Hu(e){return(Hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ku(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vu(e,t){return!t||"object"!==Hu(t)&&"function"!=typeof t?Gu(e):t}function Uu(e,t,n){return(Uu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qu(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function qu(e){return(qu=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Yu(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wu(e,t)}function Wu(e,t){return(Wu=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
  644. /**
  645. @license
  646. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  647. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  648. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  649. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  650. Code distributed by Google as part of the polymer project is also
  651. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  652. */Fu._mutablePropertyChange=Du;var $u=null;function Ju(){return $u}Ju.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Ju,writable:!0}});var Zu=fs(Ju),Qu=Fu(Zu);var ec=fs(function(){return function e(){Xu(this,e)}}()),tc=function(e){function t(e){var n;Xu(this,t),(n=Vu(this,qu(t).call(this)))._configureProperties(e),n.root=n._stampTemplate(n.__dataHost);for(var r=n.children=[],i=n.root.firstChild;i;i=i.nextSibling)r.push(i),i.__templatizeInstance=Gu(Gu(n));n.__templatizeOwner&&n.__templatizeOwner.__hideTemplateChildren__&&n._showHideChildren(!0);var o=n.__templatizeOptions;return(e&&o.instanceProps||!o.instanceProps)&&n._enableProperties(),n}var n,r,i;return Yu(t,ec),n=t,(r=[{key:"_configureProperties",value:function(e){if(this.__templatizeOptions.forwardHostProp)for(var t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(var n in e)this._setPendingProperty(n,e[n])}},{key:"forwardHostProp",value:function(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}},{key:"_addEventListenerToNode",value:function(e,t,n){var r=this;if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,function(e){e.model=r,n(e)});else{var i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(e,t,n)}}},{key:"_showHideChildren",value:function(e){for(var t=this.children,n=0;n<t.length;n++){var r=t[n];if(Boolean(e)!=Boolean(r.__hideTemplateChildren__))if(r.nodeType===Node.TEXT_NODE)e?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__;else if("slot"===r.localName)if(e)r.__polymerReplaced__=document.createComment("hidden-slot"),r.parentNode.replaceChild(r.__polymerReplaced__,r);else{var i=r.__polymerReplaced__;i&&i.parentNode.replaceChild(r,i)}else r.style&&(e?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__);r.__hideTemplateChildren__=e,r._showHideChildren&&r._showHideChildren(e)}}},{key:"_setUnmanagedPropertyToNode",value:function(e,n,r){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==n?e.__polymerTextContent__=r:Uu(qu(t.prototype),"_setUnmanagedPropertyToNode",this).call(this,e,n,r)}},{key:"dispatchEvent",value:function(e){return!0}},{key:"parentModel",get:function(){var e=this.__parentModel;if(!e){var t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}}])&&Ku(n.prototype,r),i&&Ku(n,i),t}();tc.prototype.__dataHost,tc.prototype.__templatizeOptions,tc.prototype._methodHost,tc.prototype.__templatizeOwner,tc.prototype.__hostProps;var nc=Fu(tc);function rc(e,t,n){var r=n.mutableData?nc:tc,i=function(e){function t(){return Xu(this,t),Vu(this,qu(t).apply(this,arguments))}return Yu(t,r),t}();return i.prototype.__templatizeOptions=n,i.prototype._bindTemplate(e),function(e,t,n,r){var i=n.hostProps||{};for(var o in r.instanceProps){delete i[o];var a=r.notifyInstanceProp;a&&e.prototype._addPropertyEffect(o,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:ac(o,a)})}if(r.forwardHostProp&&t.__dataHost)for(var s in i)e.prototype._addPropertyEffect(s,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(e,t,n){e.__dataHost._setPendingPropertyOrPath("_host_"+t,n[t],!0,!0)}})}(i,e,t,n),i}function ic(e,t,n){var r=n.forwardHostProp;if(r){var i=t.templatizeTemplateClass;if(!i){var o=n.mutableData?Qu:Zu;i=t.templatizeTemplateClass=function(e){function t(){return Xu(this,t),Vu(this,qu(t).apply(this,arguments))}return Yu(t,o),t}();var a=t.hostProps;for(var s in a)i.prototype._addPropertyEffect("_host_"+s,i.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:oc(s,r)}),i.prototype._createNotifyingProperty("_host_"+s)}!function(e,t){$u=e,Object.setPrototypeOf(e,t.prototype),new t,$u=null}(e,i),e.__dataProto&&Object.assign(e.__data,e.__dataProto),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties()}}function oc(e,t){return function(e,n,r){t.call(e.__templatizeOwner,n.substring("_host_".length),r[n])}}function ac(e,t){return function(e,n,r){t.call(e.__templatizeOwner,e,n,r[n])}}function sc(e,t,n){if(n=n||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;var r=(t?t.constructor:tc)._parseTemplate(e),i=r.templatizeInstanceClass;i||(i=rc(e,r,n),r.templatizeInstanceClass=i),ic(e,r,n);var o=function(e){function t(){return Xu(this,t),Vu(this,qu(t).apply(this,arguments))}return Yu(t,i),t}();return o.prototype._methodHost=function(e){var t=e.__dataHost;return t&&t._methodHost||t}(e),o.prototype.__dataHost=e,o.prototype.__templatizeOwner=t,o.prototype.__hostProps=r.hostProps,o=o}function lc(e,t){for(var n;t;)if(n=t.__templatizeInstance){if(n.__dataHost==e)return n;t=n.__dataHost}else t=t.parentNode;return null}
  653. /**
  654. @license
  655. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  656. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  657. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  658. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  659. Code distributed by Google as part of the polymer project is also
  660. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  661. */function uc(e){return(uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cc(e,t){return!t||"object"!==uc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pc(e){return(pc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hc(e,t,n){return t&&fc(e.prototype,t),n&&fc(e,n),e}function dc(e,t){return(dc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  662. /**
  663. @license
  664. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  665. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  666. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  667. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  668. Code distributed by Google as part of the polymer project is also
  669. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  670. */var yc=kl(Bu(fs(HTMLElement))),vc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=cc(this,pc(t).call(this))).root=null,e.$=null,e.__children=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dc(e,t)}(t,yc),hc(t,null,[{key:"observedAttributes",get:function(){return["mutable-data"]}}]),hc(t,[{key:"attributeChangedCallback",value:function(){this.mutableData=!0}},{key:"connectedCallback",value:function(){this.style.display="none",this.render()}},{key:"disconnectedCallback",value:function(){this.__removeChildren()}},{key:"__insertChildren",value:function(){this.parentNode.insertBefore(this.root,this)}},{key:"__removeChildren",value:function(){if(this.__children)for(var e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}},{key:"render",value:function(){var e,t=this;if(!this.__children){if(!(e=e||this.querySelector("template"))){var n=new MutationObserver(function(){if(!(e=t.querySelector("template")))throw new Error("dom-bind requires a <template> child");n.disconnect(),t.render()});return void n.observe(this,{childList:!0})}this.root=this._stampTemplate(e),this.$=this.root.$,this.__children=[];for(var r=this.root.firstChild;r;r=r.nextSibling)this.__children[this.__children.length]=r;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}]),t}();function mc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}customElements.define("dom-bind",vc);
  671. /**
  672. @license
  673. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  674. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  675. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  676. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  677. Code distributed by Google as part of the polymer project is also
  678. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  679. */
  680. var bc=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=t.toString()}var t,n,r;return t=e,(n=[{key:"toString",value:function(){return this.value}}])&&mc(t.prototype,n),r&&mc(t,r),e}();function _c(e){if(e instanceof bc)return e.value;throw new Error("non-literal value passed to Polymer's htmlLiteral function: ".concat(e))}var gc=function(e){for(var t=document.createElement("template"),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.innerHTML=r.reduce(function(t,n,r){return t+function(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof bc)return _c(e);throw new Error("non-template value passed to Polymer's html function: ".concat(e))}(n)+e[r+1]},e[0]),t},wc=Es(HTMLElement);function kc(e){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Oc(e,t){return!t||"object"!==kc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xc(e,t,n){return(xc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Sc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sc(e){return(Sc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cc(e,t,n){return t&&Pc(e.prototype,t),n&&Pc(e,n),e}function Ec(e,t){return(Ec=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  681. /**
  682. @license
  683. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  684. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  685. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  686. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  687. Code distributed by Google as part of the polymer project is also
  688. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  689. */var Tc=Bu(wc),Ac=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Oc(this,Sc(t).call(this))).__instances=[],e.__limit=1/0,e.__pool=[],e.__renderDebouncer=null,e.__itemsIdxToInstIdx={},e.__chunkCount=null,e.__lastChunkTime=null,e.__sortFn=null,e.__filterFn=null,e.__observePaths=null,e.__ctor=null,e.__isDetached=!0,e.template=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ec(e,t)}(t,Tc),Cc(t,null,[{key:"is",get:function(){return"dom-repeat"}},{key:"template",get:function(){return null}},{key:"properties",get:function(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!0,readOnly:!0},initialCount:{type:Number,observer:"__initializeChunking"},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"}}}},{key:"observers",get:function(){return["__itemsChanged(items.*)"]}}]),Cc(t,[{key:"disconnectedCallback",value:function(){xc(Sc(t.prototype),"disconnectedCallback",this).call(this),this.__isDetached=!0;for(var e=0;e<this.__instances.length;e++)this.__detachInstance(e)}},{key:"connectedCallback",value:function(){if(xc(Sc(t.prototype),"connectedCallback",this).call(this),this.style.display="none",this.__isDetached){this.__isDetached=!1;for(var e=this.parentNode,n=0;n<this.__instances.length;n++)this.__attachInstance(n,e)}}},{key:"__ensureTemplatized",value:function(){var e=this;if(!this.__ctor){var t=this.template=this.querySelector("template");if(!t){var n=new MutationObserver(function(){if(!e.querySelector("template"))throw new Error("dom-repeat requires a <template> child");n.disconnect(),e.__render()});return n.observe(this,{childList:!0}),!1}var r={};r[this.as]=!0,r[this.indexAs]=!0,r[this.itemsIndexAs]=!0,this.__ctor=sc(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:r,forwardHostProp:function(e,t){for(var n,r=this.__instances,i=0;i<r.length&&(n=r[i]);i++)n.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,n){if(function(e,t){return e===t||Io(e,t)||zo(e,t)}(this.as,t)){var r=e[this.itemsIndexAs];t==this.as&&(this.items[r]=n);var i=Lo(this.as,"items."+r,t);this.notifyPath(i,n)}}})}return!0}},{key:"__getMethodHost",value:function(){return this.__dataHost._methodHost||this.__dataHost}},{key:"__functionFromPropertyValue",value:function(e){if("string"==typeof e){var t=e,n=this.__getMethodHost();return function(){return n[t].apply(n,arguments)}}return e}},{key:"__sortChanged",value:function(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}},{key:"__filterChanged",value:function(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}},{key:"__computeFrameTime",value:function(e){return Math.ceil(1e3/e)}},{key:"__initializeChunking",value:function(){this.initialCount&&(this.__limit=this.initialCount,this.__chunkCount=this.initialCount,this.__lastChunkTime=performance.now())}},{key:"__tryRenderChunk",value:function(){this.items&&this.__limit<this.items.length&&this.__debounceRender(this.__requestRenderChunk)}},{key:"__requestRenderChunk",value:function(){var e=this;requestAnimationFrame(function(){return e.__renderChunk()})}},{key:"__renderChunk",value:function(){var e=performance.now(),t=this._targetFrameTime/(e-this.__lastChunkTime);this.__chunkCount=Math.round(this.__chunkCount*t)||1,this.__limit+=this.__chunkCount,this.__lastChunkTime=e,this.__debounceRender(this.__render)}},{key:"__observeChanged",value:function(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}},{key:"__itemsChanged",value:function(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||(this.__initializeChunking(),this.__debounceRender(this.__render))}},{key:"__handleObservedPaths",value:function(e){if(this.__sortFn||this.__filterFn)if(e){if(this.__observePaths)for(var t=this.__observePaths,n=0;n<t.length;n++)0===e.indexOf(t[n])&&this.__debounceRender(this.__render,this.delay)}else this.__debounceRender(this.__render,this.delay)}},{key:"__debounceRender",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.__renderDebouncer=js.debounce(this.__renderDebouncer,t>0?Jo.after(t):Zo,e.bind(this)),Ql(this.__renderDebouncer)}},{key:"render",value:function(){this.__debounceRender(this.__render),tu()}},{key:"__render",value:function(){this.__ensureTemplatized()&&(this.__applyFullRefresh(),this.__pool.length=0,this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this.__tryRenderChunk())}},{key:"__applyFullRefresh",value:function(){for(var e=this,t=this.items||[],n=new Array(t.length),r=0;r<t.length;r++)n[r]=r;this.__filterFn&&(n=n.filter(function(n,r,i){return e.__filterFn(t[n],r,i)})),this.__sortFn&&n.sort(function(n,r){return e.__sortFn(t[n],t[r])});for(var i=this.__itemsIdxToInstIdx={},o=0,a=Math.min(n.length,this.__limit);o<a;o++){var s=this.__instances[o],l=n[o],u=t[l];i[l]=o,s?(s._setPendingProperty(this.as,u),s._setPendingProperty(this.indexAs,o),s._setPendingProperty(this.itemsIndexAs,l),s._flushProperties()):this.__insertInstance(u,o,l)}for(var c=this.__instances.length-1;c>=o;c--)this.__detachAndRemoveInstance(c)}},{key:"__detachInstance",value:function(e){for(var t=this.__instances[e],n=0;n<t.children.length;n++){var r=t.children[n];t.root.appendChild(r)}return t}},{key:"__attachInstance",value:function(e,t){var n=this.__instances[e];t.insertBefore(n.root,this)}},{key:"__detachAndRemoveInstance",value:function(e){var t=this.__detachInstance(e);t&&this.__pool.push(t),this.__instances.splice(e,1)}},{key:"__stampInstance",value:function(e,t,n){var r={};return r[this.as]=e,r[this.indexAs]=t,r[this.itemsIndexAs]=n,new this.__ctor(r)}},{key:"__insertInstance",value:function(e,t,n){var r=this.__pool.pop();r?(r._setPendingProperty(this.as,e),r._setPendingProperty(this.indexAs,t),r._setPendingProperty(this.itemsIndexAs,n),r._flushProperties()):r=this.__stampInstance(e,t,n);var i=this.__instances[t+1],o=i?i.children[0]:this;return this.parentNode.insertBefore(r.root,o),this.__instances[t]=r,r}},{key:"_showHideChildren",value:function(e){for(var t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}},{key:"__handleItemPath",value:function(e,t){var n=e.slice(6),r=n.indexOf("."),i=r<0?n:n.substring(0,r);if(i==parseInt(i,10)){var o=r<0?"":n.substring(r+1);this.__handleObservedPaths(o);var a=this.__itemsIdxToInstIdx[i],s=this.__instances[a];if(s){var l=this.as+(o?"."+o:"");s._setPendingPropertyOrPath(l,t,!1,!0),s._flushProperties()}return!0}}},{key:"itemForElement",value:function(e){var t=this.modelForElement(e);return t&&t[this.as]}},{key:"indexForElement",value:function(e){var t=this.modelForElement(e);return t&&t[this.indexAs]}},{key:"modelForElement",value:function(e){return lc(this.template,e)}}]),t}();function jc(e){return(jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nc(e,t){return!t||"object"!==jc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rc(e,t,n){return(Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ic(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ic(e){return(Ic=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function zc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lc(e,t,n){return t&&zc(e.prototype,t),n&&zc(e,n),e}function Mc(e,t){return(Mc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  690. /**
  691. @license
  692. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  693. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  694. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  695. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  696. Code distributed by Google as part of the polymer project is also
  697. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  698. */customElements.define(Ac.is,Ac);var Dc=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Nc(this,Ic(t).call(this))).__renderDebouncer=null,e.__invalidProps=null,e.__instance=null,e._lastIf=!1,e.__ctor=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mc(e,t)}(t,wc),Lc(t,null,[{key:"is",get:function(){return"dom-if"}},{key:"template",get:function(){return null}},{key:"properties",get:function(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"}}}}]),Lc(t,[{key:"__debounceRender",value:function(){var e=this;this.__renderDebouncer=js.debounce(this.__renderDebouncer,Zo,function(){return e.__render()}),Ql(this.__renderDebouncer)}},{key:"disconnectedCallback",value:function(){Rc(Ic(t.prototype),"disconnectedCallback",this).call(this),this.parentNode&&(this.parentNode.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||this.parentNode.host)||this.__teardownInstance()}},{key:"connectedCallback",value:function(){Rc(Ic(t.prototype),"connectedCallback",this).call(this),this.style.display="none",this.if&&this.__debounceRender()}},{key:"render",value:function(){tu()}},{key:"__render",value:function(){if(this.if){if(!this.__ensureInstance())return;this._showHideChildren()}else this.restamp&&this.__teardownInstance();!this.restamp&&this.__instance&&this._showHideChildren(),this.if!=this._lastIf&&(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}},{key:"__ensureInstance",value:function(){var e=this,t=this.parentNode;if(t){if(!this.__ctor){var n=this.querySelector("template");if(!n){var r=new MutationObserver(function(){if(!e.querySelector("template"))throw new Error("dom-if requires a <template> child");r.disconnect(),e.__render()});return r.observe(this,{childList:!0}),!1}this.__ctor=sc(n,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[Ro(e)]=!0))}})}if(this.__instance){this.__syncHostProperties();var i=this.__instance.children;if(i&&i.length)if(this.previousSibling!==i[i.length-1])for(var o,a=0;a<i.length&&(o=i[a]);a++)t.insertBefore(o,this)}else this.__instance=new this.__ctor,t.insertBefore(this.__instance.root,this)}return!0}},{key:"__syncHostProperties",value:function(){var e=this.__invalidProps;if(e){for(var t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__invalidProps=null,this.__instance._flushProperties()}}},{key:"__teardownInstance",value:function(){if(this.__instance){var e=this.__instance.children;if(e&&e.length)for(var t,n=e[0].parentNode,r=0;r<e.length&&(t=e[r]);r++)n.removeChild(t);this.__instance=null,this.__invalidProps=null}}},{key:"_showHideChildren",value:function(){var e=this.__hideTemplateChildren__||!this.if;this.__instance&&this.__instance._showHideChildren(e)}}]),t}();function Fc(e){return(Fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hc(e,t){return!t||"object"!==Fc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kc(e){return(Kc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uc(e,t,n){return t&&Vc(e.prototype,t),n&&Vc(e,n),e}function qc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yc(e,t)}function Yc(e,t){return(Yc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}
  699. /**
  700. @license
  701. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  702. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  703. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  704. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  705. Code distributed by Google as part of the polymer project is also
  706. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  707. */customElements.define(Dc.is,Dc);var Wc=lo(function(e){var t=Es(e);return function(e){function n(){var e;return Bc(this,n),(e=Hc(this,Kc(n).call(this))).__lastItems=null,e.__lastMulti=null,e.__selectedMap=null,e}return qc(n,t),Uc(n,null,[{key:"properties",get:function(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["__updateSelection(multi, items.*)"]}}]),Uc(n,[{key:"__updateSelection",value:function(e,t){var n=t.path;if("items"==n){var r=t.base||[],i=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),i){var o=Yl(r,i);this.__applySplices(o)}this.__lastItems=r,this.__lastMulti=e}else if("items.splices"==t.path)this.__applySplices(t.value.indexSplices);else{var a=n.slice("items.".length),s=parseInt(a,10);a.indexOf(".")<0&&a==s&&this.__deselectChangedIdx(s)}}},{key:"__applySplices",value:function(e){for(var t=this,n=this.__selectedMap,r=function(r){var i=e[r];n.forEach(function(e,t){e<i.index||(e>=i.index+i.removed.length?n.set(t,e+i.addedCount-i.removed.length):n.set(t,-1))});for(var o=0;o<i.addedCount;o++){var a=i.index+o;n.has(t.items[a])&&n.set(t.items[a],a)}},i=0;i<e.length;i++)r(i);this.__updateLinks();var o=0;n.forEach(function(e,r){e<0?(t.multi?t.splice("selected",o,1):t.selected=t.selectedItem=null,n.delete(r)):o++})}},{key:"__updateLinks",value:function(){var e=this;if(this.__dataLinkedPaths={},this.multi){var t=0;this.__selectedMap.forEach(function(n){n>=0&&e.linkPaths("items."+n,"selected."+t++)})}else this.__selectedMap.forEach(function(t){e.linkPaths("selected","items."+t),e.linkPaths("selectedItem","items."+t)})}},{key:"clearSelection",value:function(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}},{key:"isSelected",value:function(e){return this.__selectedMap.has(e)}},{key:"isIndexSelected",value:function(e){return this.isSelected(this.items[e])}},{key:"__deselectChangedIdx",value:function(e){var t=this,n=this.__selectedIndexForItemIndex(e);if(n>=0){var r=0;this.__selectedMap.forEach(function(e,i){n==r++&&t.deselect(i)})}}},{key:"__selectedIndexForItemIndex",value:function(e){var t=this.__dataLinkedPaths["items."+e];if(t)return parseInt(t.slice("selected.".length),10)}},{key:"deselect",value:function(e){var t,n=this.__selectedMap.get(e);n>=0&&(this.__selectedMap.delete(e),this.multi&&(t=this.__selectedIndexForItemIndex(n)),this.__updateLinks(),this.multi?this.splice("selected",t,1):this.selected=this.selectedItem=null)}},{key:"deselectIndex",value:function(e){this.deselect(this.items[e])}},{key:"select",value:function(e){this.selectIndex(this.items.indexOf(e))}},{key:"selectIndex",value:function(e){var t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push("selected",t):this.selected=this.selectedItem=t)}}]),n}()})(wc),Gc=function(e){function t(){return Bc(this,t),Hc(this,Kc(t).apply(this,arguments))}return qc(t,Wc),Uc(t,null,[{key:"is",get:function(){return"array-selector"}}]),t}();customElements.define(Gc.is,Gc);
  708. /**
  709. @license
  710. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  711. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  712. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  713. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  714. Code distributed by Google as part of the polymer project is also
  715. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  716. */
  717. var Xc=new Vi;function $c(e){return($c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qc(e){var t="function"==typeof Map?new Map:void 0;return(Qc=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return ep(e,arguments,np(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),tp(r,e)})(e)}function ep(e,t,n){return(ep=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(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&tp(i,n.prototype),i}).apply(null,arguments)}function tp(e,t){return(tp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function np(e){return(np=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}
  718. /**
  719. @license
  720. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  721. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
  722. The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
  723. The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
  724. Code distributed by Google as part of the polymer project is also
  725. subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  726. */window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(e,t,n){},prepareTemplateDom:function(e,t){},prepareTemplateStyles:function(e,t,n){},styleSubtree:function(e,t){Xc.processStyles(),di(e,t)},styleElement:function(e){Xc.processStyles()},styleDocument:function(e){Xc.processStyles(),di(document.body,e)},getComputedStyleValue:function(e,t){return yi(e,t)},flushCustomStyles:function(){},nativeCss:Vr,nativeShadow:Hr,cssBuild:Br}),window.ShadyCSS.CustomStyleInterface=Xc;var rp=window.ShadyCSS.CustomStyleInterface,ip=function(e){function t(){var e,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,(e=!(r=np(t).call(this))||"object"!==$c(r)&&"function"!=typeof r?Zc(n):r)._style=null,rp.addCustomStyle(Zc(Zc(e))),e}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tp(e,t)}(t,Qc(HTMLElement)),n=t,(r=[{key:"getStyle",value:function(){if(this._style)return this._style;var e=this.querySelector("style");if(!e)return null;this._style=e;var t=e.getAttribute("include");return t&&(e.removeAttribute("include"),e.textContent=function(e){for(var t=e.trim().split(/\s+/),n="",r=0;r<t.length;r++)n+=go(t[r]);return n}(t)+e.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}])&&Jc(n.prototype,r),i&&Jc(n,i),t}();window.customElements.define("custom-style",ip),Fu._mutablePropertyChange;Boolean;var op=_u(HTMLElement).prototype;function ap(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  727. /**
  728. @license
  729. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  730. This code may only be used under the BSD style license found at
  731. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  732. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  733. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  734. part of the polymer project is also subject to an additional IP rights grant
  735. found at http://polymer.github.io/PATENTS.txt
  736. */(['\n<custom-style>\n <style is="custom-style">\n [hidden] {\n display: none !important;\n }\n </style>\n</custom-style>\n<custom-style>\n <style is="custom-style">\n html {\n\n --layout: {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n };\n\n --layout-inline: {\n display: -ms-inline-flexbox;\n display: -webkit-inline-flex;\n display: inline-flex;\n };\n\n --layout-horizontal: {\n @apply --layout;\n\n -ms-flex-direction: row;\n -webkit-flex-direction: row;\n flex-direction: row;\n };\n\n --layout-horizontal-reverse: {\n @apply --layout;\n\n -ms-flex-direction: row-reverse;\n -webkit-flex-direction: row-reverse;\n flex-direction: row-reverse;\n };\n\n --layout-vertical: {\n @apply --layout;\n\n -ms-flex-direction: column;\n -webkit-flex-direction: column;\n flex-direction: column;\n };\n\n --layout-vertical-reverse: {\n @apply --layout;\n\n -ms-flex-direction: column-reverse;\n -webkit-flex-direction: column-reverse;\n flex-direction: column-reverse;\n };\n\n --layout-wrap: {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n };\n\n --layout-wrap-reverse: {\n -ms-flex-wrap: wrap-reverse;\n -webkit-flex-wrap: wrap-reverse;\n flex-wrap: wrap-reverse;\n };\n\n --layout-flex-auto: {\n -ms-flex: 1 1 auto;\n -webkit-flex: 1 1 auto;\n flex: 1 1 auto;\n };\n\n --layout-flex-none: {\n -ms-flex: none;\n -webkit-flex: none;\n flex: none;\n };\n\n --layout-flex: {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n };\n\n --layout-flex-2: {\n -ms-flex: 2;\n -webkit-flex: 2;\n flex: 2;\n };\n\n --layout-flex-3: {\n -ms-flex: 3;\n -webkit-flex: 3;\n flex: 3;\n };\n\n --layout-flex-4: {\n -ms-flex: 4;\n -webkit-flex: 4;\n flex: 4;\n };\n\n --layout-flex-5: {\n -ms-flex: 5;\n -webkit-flex: 5;\n flex: 5;\n };\n\n --layout-flex-6: {\n -ms-flex: 6;\n -webkit-flex: 6;\n flex: 6;\n };\n\n --layout-flex-7: {\n -ms-flex: 7;\n -webkit-flex: 7;\n flex: 7;\n };\n\n --layout-flex-8: {\n -ms-flex: 8;\n -webkit-flex: 8;\n flex: 8;\n };\n\n --layout-flex-9: {\n -ms-flex: 9;\n -webkit-flex: 9;\n flex: 9;\n };\n\n --layout-flex-10: {\n -ms-flex: 10;\n -webkit-flex: 10;\n flex: 10;\n };\n\n --layout-flex-11: {\n -ms-flex: 11;\n -webkit-flex: 11;\n flex: 11;\n };\n\n --layout-flex-12: {\n -ms-flex: 12;\n -webkit-flex: 12;\n flex: 12;\n };\n\n /* alignment in cross axis */\n\n --layout-start: {\n -ms-flex-align: start;\n -webkit-align-items: flex-start;\n align-items: flex-start;\n };\n\n --layout-center: {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n };\n\n --layout-end: {\n -ms-flex-align: end;\n -webkit-align-items: flex-end;\n align-items: flex-end;\n };\n\n --layout-baseline: {\n -ms-flex-align: baseline;\n -webkit-align-items: baseline;\n align-items: baseline;\n };\n\n /* alignment in main axis */\n\n --layout-start-justified: {\n -ms-flex-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n };\n\n --layout-center-justified: {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n };\n\n --layout-end-justified: {\n -ms-flex-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n };\n\n --layout-around-justified: {\n -ms-flex-pack: distribute;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n };\n\n --layout-justified: {\n -ms-flex-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n };\n\n --layout-center-center: {\n @apply --layout-center;\n @apply --layout-center-justified;\n };\n\n /* self alignment */\n\n --layout-self-start: {\n -ms-align-self: flex-start;\n -webkit-align-self: flex-start;\n align-self: flex-start;\n };\n\n --layout-self-center: {\n -ms-align-self: center;\n -webkit-align-self: center;\n align-self: center;\n };\n\n --layout-self-end: {\n -ms-align-self: flex-end;\n -webkit-align-self: flex-end;\n align-self: flex-end;\n };\n\n --layout-self-stretch: {\n -ms-align-self: stretch;\n -webkit-align-self: stretch;\n align-self: stretch;\n };\n\n --layout-self-baseline: {\n -ms-align-self: baseline;\n -webkit-align-self: baseline;\n align-self: baseline;\n };\n\n /* multi-line alignment in main axis */\n\n --layout-start-aligned: {\n -ms-flex-line-pack: start; /* IE10 */\n -ms-align-content: flex-start;\n -webkit-align-content: flex-start;\n align-content: flex-start;\n };\n\n --layout-end-aligned: {\n -ms-flex-line-pack: end; /* IE10 */\n -ms-align-content: flex-end;\n -webkit-align-content: flex-end;\n align-content: flex-end;\n };\n\n --layout-center-aligned: {\n -ms-flex-line-pack: center; /* IE10 */\n -ms-align-content: center;\n -webkit-align-content: center;\n align-content: center;\n };\n\n --layout-between-aligned: {\n -ms-flex-line-pack: justify; /* IE10 */\n -ms-align-content: space-between;\n -webkit-align-content: space-between;\n align-content: space-between;\n };\n\n --layout-around-aligned: {\n -ms-flex-line-pack: distribute; /* IE10 */\n -ms-align-content: space-around;\n -webkit-align-content: space-around;\n align-content: space-around;\n };\n\n /*******************************\n Other Layout\n *******************************/\n\n --layout-block: {\n display: block;\n };\n\n --layout-invisible: {\n visibility: hidden !important;\n };\n\n --layout-relative: {\n position: relative;\n };\n\n --layout-fit: {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n };\n\n --layout-scroll: {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n };\n\n --layout-fullbleed: {\n margin: 0;\n height: 100vh;\n };\n\n /* fixed position */\n\n --layout-fixed-top: {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n };\n\n --layout-fixed-right: {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n };\n\n --layout-fixed-bottom: {\n position: fixed;\n right: 0;\n bottom: 0;\n left: 0;\n };\n\n --layout-fixed-left: {\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n };\n\n }\n </style>\n</custom-style>']);return ap=function(){return e},e}var sp=gc(ap());sp.setAttribute("style","display: none;"),document.head.appendChild(sp.content);var lp=document.createElement("style");function up(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  737. /**
  738. @license
  739. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  740. This code may only be used under the BSD style license found at
  741. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  742. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  743. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  744. part of the polymer project is also subject to an additional IP rights grant
  745. found at http://polymer.github.io/PATENTS.txt
  746. */(['\n<custom-style>\n <style is="custom-style">\n html {\n\n /* Material Design color palette for Google products */\n\n --google-red-100: #f4c7c3;\n --google-red-300: #e67c73;\n --google-red-500: #db4437;\n --google-red-700: #c53929;\n\n --google-blue-100: #c6dafc;\n --google-blue-300: #7baaf7;\n --google-blue-500: #4285f4;\n --google-blue-700: #3367d6;\n\n --google-green-100: #b7e1cd;\n --google-green-300: #57bb8a;\n --google-green-500: #0f9d58;\n --google-green-700: #0b8043;\n\n --google-yellow-100: #fce8b2;\n --google-yellow-300: #f7cb4d;\n --google-yellow-500: #f4b400;\n --google-yellow-700: #f09300;\n\n --google-grey-100: #f5f5f5;\n --google-grey-300: #e0e0e0;\n --google-grey-500: #9e9e9e;\n --google-grey-700: #616161;\n\n /* Material Design color palette from online spec document */\n\n --paper-red-50: #ffebee;\n --paper-red-100: #ffcdd2;\n --paper-red-200: #ef9a9a;\n --paper-red-300: #e57373;\n --paper-red-400: #ef5350;\n --paper-red-500: #f44336;\n --paper-red-600: #e53935;\n --paper-red-700: #d32f2f;\n --paper-red-800: #c62828;\n --paper-red-900: #b71c1c;\n --paper-red-a100: #ff8a80;\n --paper-red-a200: #ff5252;\n --paper-red-a400: #ff1744;\n --paper-red-a700: #d50000;\n\n --paper-pink-50: #fce4ec;\n --paper-pink-100: #f8bbd0;\n --paper-pink-200: #f48fb1;\n --paper-pink-300: #f06292;\n --paper-pink-400: #ec407a;\n --paper-pink-500: #e91e63;\n --paper-pink-600: #d81b60;\n --paper-pink-700: #c2185b;\n --paper-pink-800: #ad1457;\n --paper-pink-900: #880e4f;\n --paper-pink-a100: #ff80ab;\n --paper-pink-a200: #ff4081;\n --paper-pink-a400: #f50057;\n --paper-pink-a700: #c51162;\n\n --paper-purple-50: #f3e5f5;\n --paper-purple-100: #e1bee7;\n --paper-purple-200: #ce93d8;\n --paper-purple-300: #ba68c8;\n --paper-purple-400: #ab47bc;\n --paper-purple-500: #9c27b0;\n --paper-purple-600: #8e24aa;\n --paper-purple-700: #7b1fa2;\n --paper-purple-800: #6a1b9a;\n --paper-purple-900: #4a148c;\n --paper-purple-a100: #ea80fc;\n --paper-purple-a200: #e040fb;\n --paper-purple-a400: #d500f9;\n --paper-purple-a700: #aa00ff;\n\n --paper-deep-purple-50: #ede7f6;\n --paper-deep-purple-100: #d1c4e9;\n --paper-deep-purple-200: #b39ddb;\n --paper-deep-purple-300: #9575cd;\n --paper-deep-purple-400: #7e57c2;\n --paper-deep-purple-500: #673ab7;\n --paper-deep-purple-600: #5e35b1;\n --paper-deep-purple-700: #512da8;\n --paper-deep-purple-800: #4527a0;\n --paper-deep-purple-900: #311b92;\n --paper-deep-purple-a100: #b388ff;\n --paper-deep-purple-a200: #7c4dff;\n --paper-deep-purple-a400: #651fff;\n --paper-deep-purple-a700: #6200ea;\n\n --paper-indigo-50: #e8eaf6;\n --paper-indigo-100: #c5cae9;\n --paper-indigo-200: #9fa8da;\n --paper-indigo-300: #7986cb;\n --paper-indigo-400: #5c6bc0;\n --paper-indigo-500: #3f51b5;\n --paper-indigo-600: #3949ab;\n --paper-indigo-700: #303f9f;\n --paper-indigo-800: #283593;\n --paper-indigo-900: #1a237e;\n --paper-indigo-a100: #8c9eff;\n --paper-indigo-a200: #536dfe;\n --paper-indigo-a400: #3d5afe;\n --paper-indigo-a700: #304ffe;\n\n --paper-blue-50: #e3f2fd;\n --paper-blue-100: #bbdefb;\n --paper-blue-200: #90caf9;\n --paper-blue-300: #64b5f6;\n --paper-blue-400: #42a5f5;\n --paper-blue-500: #2196f3;\n --paper-blue-600: #1e88e5;\n --paper-blue-700: #1976d2;\n --paper-blue-800: #1565c0;\n --paper-blue-900: #0d47a1;\n --paper-blue-a100: #82b1ff;\n --paper-blue-a200: #448aff;\n --paper-blue-a400: #2979ff;\n --paper-blue-a700: #2962ff;\n\n --paper-light-blue-50: #e1f5fe;\n --paper-light-blue-100: #b3e5fc;\n --paper-light-blue-200: #81d4fa;\n --paper-light-blue-300: #4fc3f7;\n --paper-light-blue-400: #29b6f6;\n --paper-light-blue-500: #03a9f4;\n --paper-light-blue-600: #039be5;\n --paper-light-blue-700: #0288d1;\n --paper-light-blue-800: #0277bd;\n --paper-light-blue-900: #01579b;\n --paper-light-blue-a100: #80d8ff;\n --paper-light-blue-a200: #40c4ff;\n --paper-light-blue-a400: #00b0ff;\n --paper-light-blue-a700: #0091ea;\n\n --paper-cyan-50: #e0f7fa;\n --paper-cyan-100: #b2ebf2;\n --paper-cyan-200: #80deea;\n --paper-cyan-300: #4dd0e1;\n --paper-cyan-400: #26c6da;\n --paper-cyan-500: #00bcd4;\n --paper-cyan-600: #00acc1;\n --paper-cyan-700: #0097a7;\n --paper-cyan-800: #00838f;\n --paper-cyan-900: #006064;\n --paper-cyan-a100: #84ffff;\n --paper-cyan-a200: #18ffff;\n --paper-cyan-a400: #00e5ff;\n --paper-cyan-a700: #00b8d4;\n\n --paper-teal-50: #e0f2f1;\n --paper-teal-100: #b2dfdb;\n --paper-teal-200: #80cbc4;\n --paper-teal-300: #4db6ac;\n --paper-teal-400: #26a69a;\n --paper-teal-500: #009688;\n --paper-teal-600: #00897b;\n --paper-teal-700: #00796b;\n --paper-teal-800: #00695c;\n --paper-teal-900: #004d40;\n --paper-teal-a100: #a7ffeb;\n --paper-teal-a200: #64ffda;\n --paper-teal-a400: #1de9b6;\n --paper-teal-a700: #00bfa5;\n\n --paper-green-50: #e8f5e9;\n --paper-green-100: #c8e6c9;\n --paper-green-200: #a5d6a7;\n --paper-green-300: #81c784;\n --paper-green-400: #66bb6a;\n --paper-green-500: #4caf50;\n --paper-green-600: #43a047;\n --paper-green-700: #388e3c;\n --paper-green-800: #2e7d32;\n --paper-green-900: #1b5e20;\n --paper-green-a100: #b9f6ca;\n --paper-green-a200: #69f0ae;\n --paper-green-a400: #00e676;\n --paper-green-a700: #00c853;\n\n --paper-light-green-50: #f1f8e9;\n --paper-light-green-100: #dcedc8;\n --paper-light-green-200: #c5e1a5;\n --paper-light-green-300: #aed581;\n --paper-light-green-400: #9ccc65;\n --paper-light-green-500: #8bc34a;\n --paper-light-green-600: #7cb342;\n --paper-light-green-700: #689f38;\n --paper-light-green-800: #558b2f;\n --paper-light-green-900: #33691e;\n --paper-light-green-a100: #ccff90;\n --paper-light-green-a200: #b2ff59;\n --paper-light-green-a400: #76ff03;\n --paper-light-green-a700: #64dd17;\n\n --paper-lime-50: #f9fbe7;\n --paper-lime-100: #f0f4c3;\n --paper-lime-200: #e6ee9c;\n --paper-lime-300: #dce775;\n --paper-lime-400: #d4e157;\n --paper-lime-500: #cddc39;\n --paper-lime-600: #c0ca33;\n --paper-lime-700: #afb42b;\n --paper-lime-800: #9e9d24;\n --paper-lime-900: #827717;\n --paper-lime-a100: #f4ff81;\n --paper-lime-a200: #eeff41;\n --paper-lime-a400: #c6ff00;\n --paper-lime-a700: #aeea00;\n\n --paper-yellow-50: #fffde7;\n --paper-yellow-100: #fff9c4;\n --paper-yellow-200: #fff59d;\n --paper-yellow-300: #fff176;\n --paper-yellow-400: #ffee58;\n --paper-yellow-500: #ffeb3b;\n --paper-yellow-600: #fdd835;\n --paper-yellow-700: #fbc02d;\n --paper-yellow-800: #f9a825;\n --paper-yellow-900: #f57f17;\n --paper-yellow-a100: #ffff8d;\n --paper-yellow-a200: #ffff00;\n --paper-yellow-a400: #ffea00;\n --paper-yellow-a700: #ffd600;\n\n --paper-amber-50: #fff8e1;\n --paper-amber-100: #ffecb3;\n --paper-amber-200: #ffe082;\n --paper-amber-300: #ffd54f;\n --paper-amber-400: #ffca28;\n --paper-amber-500: #ffc107;\n --paper-amber-600: #ffb300;\n --paper-amber-700: #ffa000;\n --paper-amber-800: #ff8f00;\n --paper-amber-900: #ff6f00;\n --paper-amber-a100: #ffe57f;\n --paper-amber-a200: #ffd740;\n --paper-amber-a400: #ffc400;\n --paper-amber-a700: #ffab00;\n\n --paper-orange-50: #fff3e0;\n --paper-orange-100: #ffe0b2;\n --paper-orange-200: #ffcc80;\n --paper-orange-300: #ffb74d;\n --paper-orange-400: #ffa726;\n --paper-orange-500: #ff9800;\n --paper-orange-600: #fb8c00;\n --paper-orange-700: #f57c00;\n --paper-orange-800: #ef6c00;\n --paper-orange-900: #e65100;\n --paper-orange-a100: #ffd180;\n --paper-orange-a200: #ffab40;\n --paper-orange-a400: #ff9100;\n --paper-orange-a700: #ff6500;\n\n --paper-deep-orange-50: #fbe9e7;\n --paper-deep-orange-100: #ffccbc;\n --paper-deep-orange-200: #ffab91;\n --paper-deep-orange-300: #ff8a65;\n --paper-deep-orange-400: #ff7043;\n --paper-deep-orange-500: #ff5722;\n --paper-deep-orange-600: #f4511e;\n --paper-deep-orange-700: #e64a19;\n --paper-deep-orange-800: #d84315;\n --paper-deep-orange-900: #bf360c;\n --paper-deep-orange-a100: #ff9e80;\n --paper-deep-orange-a200: #ff6e40;\n --paper-deep-orange-a400: #ff3d00;\n --paper-deep-orange-a700: #dd2c00;\n\n --paper-brown-50: #efebe9;\n --paper-brown-100: #d7ccc8;\n --paper-brown-200: #bcaaa4;\n --paper-brown-300: #a1887f;\n --paper-brown-400: #8d6e63;\n --paper-brown-500: #795548;\n --paper-brown-600: #6d4c41;\n --paper-brown-700: #5d4037;\n --paper-brown-800: #4e342e;\n --paper-brown-900: #3e2723;\n\n --paper-grey-50: #fafafa;\n --paper-grey-100: #f5f5f5;\n --paper-grey-200: #eeeeee;\n --paper-grey-300: #e0e0e0;\n --paper-grey-400: #bdbdbd;\n --paper-grey-500: #9e9e9e;\n --paper-grey-600: #757575;\n --paper-grey-700: #616161;\n --paper-grey-800: #424242;\n --paper-grey-900: #212121;\n\n --paper-blue-grey-50: #eceff1;\n --paper-blue-grey-100: #cfd8dc;\n --paper-blue-grey-200: #b0bec5;\n --paper-blue-grey-300: #90a4ae;\n --paper-blue-grey-400: #78909c;\n --paper-blue-grey-500: #607d8b;\n --paper-blue-grey-600: #546e7a;\n --paper-blue-grey-700: #455a64;\n --paper-blue-grey-800: #37474f;\n --paper-blue-grey-900: #263238;\n\n /* opacity for dark text on a light background */\n --dark-divider-opacity: 0.12;\n --dark-disabled-opacity: 0.38; /* or hint text or icon */\n --dark-secondary-opacity: 0.54;\n --dark-primary-opacity: 0.87;\n\n /* opacity for light text on a dark background */\n --light-divider-opacity: 0.12;\n --light-disabled-opacity: 0.3; /* or hint text or icon */\n --light-secondary-opacity: 0.7;\n --light-primary-opacity: 1.0;\n\n }\n\n </style>\n</custom-style>\n']);return up=function(){return e},e}lp.textContent="[hidden] { display: none !important; }",document.head.appendChild(lp);var cp=gc(up());function pp(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  747. /**
  748. @license
  749. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  750. This code may only be used under the BSD style license found at
  751. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  752. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  753. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  754. part of the polymer project is also subject to an additional IP rights grant
  755. found at http://polymer.github.io/PATENTS.txt
  756. */(['\n<custom-style>\n <style is="custom-style">\n html {\n /*\n * You can use these generic variables in your elements for easy theming.\n * For example, if all your elements use `--primary-text-color` as its main\n * color, then switching from a light to a dark theme is just a matter of\n * changing the value of `--primary-text-color` in your application.\n */\n --primary-text-color: var(--light-theme-text-color);\n --primary-background-color: var(--light-theme-background-color);\n --secondary-text-color: var(--light-theme-secondary-color);\n --disabled-text-color: var(--light-theme-disabled-color);\n --divider-color: var(--light-theme-divider-color);\n --error-color: var(--paper-deep-orange-a700);\n\n /*\n * Primary and accent colors. Also see color.js for more colors.\n */\n --primary-color: var(--paper-indigo-500);\n --light-primary-color: var(--paper-indigo-100);\n --dark-primary-color: var(--paper-indigo-700);\n\n --accent-color: var(--paper-pink-a200);\n --light-accent-color: var(--paper-pink-a100);\n --dark-accent-color: var(--paper-pink-a400);\n\n\n /*\n * Material Design Light background theme\n */\n --light-theme-background-color: #ffffff;\n --light-theme-base-color: #000000;\n --light-theme-text-color: var(--paper-grey-900);\n --light-theme-secondary-color: #737373; /* for secondary text and icons */\n --light-theme-disabled-color: #9b9b9b; /* disabled/hint text */\n --light-theme-divider-color: #dbdbdb;\n\n /*\n * Material Design Dark background theme\n */\n --dark-theme-background-color: var(--paper-grey-900);\n --dark-theme-base-color: #ffffff;\n --dark-theme-text-color: #ffffff;\n --dark-theme-secondary-color: #bcbcbc; /* for secondary text and icons */\n --dark-theme-disabled-color: #646464; /* disabled/hint text */\n --dark-theme-divider-color: #3c3c3c;\n\n /*\n * Deprecated values because of their confusing names.\n */\n --text-primary-color: var(--dark-theme-text-color);\n --default-primary-color: var(--primary-color);\n }\n </style>\n</custom-style>'],['\n<custom-style>\n <style is="custom-style">\n html {\n /*\n * You can use these generic variables in your elements for easy theming.\n * For example, if all your elements use \\`--primary-text-color\\` as its main\n * color, then switching from a light to a dark theme is just a matter of\n * changing the value of \\`--primary-text-color\\` in your application.\n */\n --primary-text-color: var(--light-theme-text-color);\n --primary-background-color: var(--light-theme-background-color);\n --secondary-text-color: var(--light-theme-secondary-color);\n --disabled-text-color: var(--light-theme-disabled-color);\n --divider-color: var(--light-theme-divider-color);\n --error-color: var(--paper-deep-orange-a700);\n\n /*\n * Primary and accent colors. Also see color.js for more colors.\n */\n --primary-color: var(--paper-indigo-500);\n --light-primary-color: var(--paper-indigo-100);\n --dark-primary-color: var(--paper-indigo-700);\n\n --accent-color: var(--paper-pink-a200);\n --light-accent-color: var(--paper-pink-a100);\n --dark-accent-color: var(--paper-pink-a400);\n\n\n /*\n * Material Design Light background theme\n */\n --light-theme-background-color: #ffffff;\n --light-theme-base-color: #000000;\n --light-theme-text-color: var(--paper-grey-900);\n --light-theme-secondary-color: #737373; /* for secondary text and icons */\n --light-theme-disabled-color: #9b9b9b; /* disabled/hint text */\n --light-theme-divider-color: #dbdbdb;\n\n /*\n * Material Design Dark background theme\n */\n --dark-theme-background-color: var(--paper-grey-900);\n --dark-theme-base-color: #ffffff;\n --dark-theme-text-color: #ffffff;\n --dark-theme-secondary-color: #bcbcbc; /* for secondary text and icons */\n --dark-theme-disabled-color: #646464; /* disabled/hint text */\n --dark-theme-divider-color: #3c3c3c;\n\n /*\n * Deprecated values because of their confusing names.\n */\n --text-primary-color: var(--dark-theme-text-color);\n --default-primary-color: var(--primary-color);\n }\n </style>\n</custom-style>']);return pp=function(){return e},e}cp.setAttribute("style","display: none;"),document.head.appendChild(cp.content);var fp=gc(pp());
  757. /**
  758. @license
  759. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  760. This code may only be used under the BSD style license found at
  761. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  762. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  763. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  764. part of the polymer project is also subject to an additional IP rights grant
  765. found at http://polymer.github.io/PATENTS.txt
  766. */
  767. if(fp.setAttribute("style","display: none;"),document.head.appendChild(fp.content),!window.polymerSkipLoadingFontRoboto){var hp=document.createElement("link");hp.rel="stylesheet",hp.type="text/css",hp.crossOrigin="anonymous",hp.href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic",document.head.appendChild(hp)}function dp(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  768. /**
  769. @license
  770. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  771. This code may only be used under the BSD style license found at
  772. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  773. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  774. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  775. part of the polymer project is also subject to an additional IP rights grant
  776. found at http://polymer.github.io/PATENTS.txt
  777. */(["<custom-style>\n <style is=\"custom-style\">\n html {\n\n /* Shared Styles */\n --paper-font-common-base: {\n font-family: 'Roboto', 'Noto', sans-serif;\n -webkit-font-smoothing: antialiased;\n };\n\n --paper-font-common-code: {\n font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;\n -webkit-font-smoothing: antialiased;\n };\n\n --paper-font-common-expensive-kerning: {\n text-rendering: optimizeLegibility;\n };\n\n --paper-font-common-nowrap: {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n };\n\n /* Material Font Styles */\n\n --paper-font-display4: {\n @apply --paper-font-common-base;\n @apply --paper-font-common-nowrap;\n\n font-size: 112px;\n font-weight: 300;\n letter-spacing: -.044em;\n line-height: 120px;\n };\n\n --paper-font-display3: {\n @apply --paper-font-common-base;\n @apply --paper-font-common-nowrap;\n\n font-size: 56px;\n font-weight: 400;\n letter-spacing: -.026em;\n line-height: 60px;\n };\n\n --paper-font-display2: {\n @apply --paper-font-common-base;\n\n font-size: 45px;\n font-weight: 400;\n letter-spacing: -.018em;\n line-height: 48px;\n };\n\n --paper-font-display1: {\n @apply --paper-font-common-base;\n\n font-size: 34px;\n font-weight: 400;\n letter-spacing: -.01em;\n line-height: 40px;\n };\n\n --paper-font-headline: {\n @apply --paper-font-common-base;\n\n font-size: 24px;\n font-weight: 400;\n letter-spacing: -.012em;\n line-height: 32px;\n };\n\n --paper-font-title: {\n @apply --paper-font-common-base;\n @apply --paper-font-common-nowrap;\n\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n };\n\n --paper-font-subhead: {\n @apply --paper-font-common-base;\n\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n };\n\n --paper-font-body2: {\n @apply --paper-font-common-base;\n\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n };\n\n --paper-font-body1: {\n @apply --paper-font-common-base;\n\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n };\n\n --paper-font-caption: {\n @apply --paper-font-common-base;\n @apply --paper-font-common-nowrap;\n\n font-size: 12px;\n font-weight: 400;\n letter-spacing: 0.011em;\n line-height: 20px;\n };\n\n --paper-font-menu: {\n @apply --paper-font-common-base;\n @apply --paper-font-common-nowrap;\n\n font-size: 13px;\n font-weight: 500;\n line-height: 24px;\n };\n\n --paper-font-button: {\n @apply --paper-font-common-base;\n @apply --paper-font-common-nowrap;\n\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.018em;\n line-height: 24px;\n text-transform: uppercase;\n };\n\n --paper-font-code2: {\n @apply --paper-font-common-code;\n\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n };\n\n --paper-font-code1: {\n @apply --paper-font-common-code;\n\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n };\n\n }\n\n </style>\n</custom-style>"]);return dp=function(){return e},e}var yp=gc(dp());function vp(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  778. /**
  779. @license
  780. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  781. This code may only be used under the BSD style license found at
  782. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  783. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  784. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  785. part of the polymer project is also subject to an additional IP rights grant
  786. found at http://polymer.github.io/PATENTS.txt
  787. */(['\n<custom-style>\n <style is="custom-style">\n html {\n\n --shadow-transition: {\n transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);\n };\n\n --shadow-none: {\n box-shadow: none;\n };\n\n /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */\n\n --shadow-elevation-2dp: {\n box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),\n 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n 0 3px 1px -2px rgba(0, 0, 0, 0.2);\n };\n\n --shadow-elevation-3dp: {\n box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),\n 0 1px 8px 0 rgba(0, 0, 0, 0.12),\n 0 3px 3px -2px rgba(0, 0, 0, 0.4);\n };\n\n --shadow-elevation-4dp: {\n box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),\n 0 1px 10px 0 rgba(0, 0, 0, 0.12),\n 0 2px 4px -1px rgba(0, 0, 0, 0.4);\n };\n\n --shadow-elevation-6dp: {\n box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),\n 0 1px 18px 0 rgba(0, 0, 0, 0.12),\n 0 3px 5px -1px rgba(0, 0, 0, 0.4);\n };\n\n --shadow-elevation-8dp: {\n box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),\n 0 3px 14px 2px rgba(0, 0, 0, 0.12),\n 0 5px 5px -3px rgba(0, 0, 0, 0.4);\n };\n\n --shadow-elevation-12dp: {\n box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),\n 0 4px 22px 3px rgba(0, 0, 0, 0.12),\n 0 6px 7px -4px rgba(0, 0, 0, 0.4);\n };\n\n --shadow-elevation-16dp: {\n box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12),\n 0 8px 10px -5px rgba(0, 0, 0, 0.4);\n };\n\n --shadow-elevation-24dp: {\n box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),\n 0 9px 46px 8px rgba(0, 0, 0, 0.12),\n 0 11px 15px -7px rgba(0, 0, 0, 0.4);\n };\n }\n </style>\n</custom-style>']);return vp=function(){return e},e}yp.setAttribute("style","display: none;"),document.head.appendChild(yp.content);var mp=gc(vp());mp.setAttribute("style","display: none;"),document.head.appendChild(mp.content);
  788. /**
  789. @license
  790. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  791. This code may only be used under the BSD style license found at
  792. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  793. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  794. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  795. part of the polymer project is also subject to an additional IP rights grant
  796. found at http://polymer.github.io/PATENTS.txt
  797. */
  798. var bp=document.createElement("template");bp.setAttribute("style","display: none;"),bp.innerHTML='<dom-module id="paper-dialog-shared-styles">\n <template>\n <style>\n :host {\n display: block;\n margin: 24px 40px;\n\n background: var(--paper-dialog-background-color, var(--primary-background-color));\n color: var(--paper-dialog-color, var(--primary-text-color));\n\n @apply --paper-font-body1;\n @apply --shadow-elevation-16dp;\n @apply --paper-dialog;\n }\n\n :host > ::slotted(*) {\n margin-top: 20px;\n padding: 0 24px;\n }\n\n :host > ::slotted(.no-padding) {\n padding: 0;\n }\n\n \n :host > ::slotted(*:first-child) {\n margin-top: 24px;\n }\n\n :host > ::slotted(*:last-child) {\n margin-bottom: 24px;\n }\n\n /* In 1.x, this selector was `:host > ::content h2`. In 2.x <slot> allows\n to select direct children only, which increases the weight of this\n selector, so we have to re-define first-child/last-child margins below. */\n :host > ::slotted(h2) {\n position: relative;\n margin: 0;\n\n @apply --paper-font-title;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-top. */\n :host > ::slotted(h2:first-child) {\n margin-top: 24px;\n @apply --paper-dialog-title;\n }\n\n /* Apply mixin again, in case it sets margin-bottom. */\n :host > ::slotted(h2:last-child) {\n margin-bottom: 24px;\n @apply --paper-dialog-title;\n }\n\n :host > ::slotted(.paper-dialog-buttons),\n :host > ::slotted(.buttons) {\n position: relative;\n padding: 8px 8px 8px 24px;\n margin: 0;\n\n color: var(--paper-dialog-button-color, var(--primary-color));\n\n @apply --layout-horizontal;\n @apply --layout-end-justified;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(bp.content);
  799. /**
  800. @license
  801. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  802. This code may only be used under the BSD style license found at
  803. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  804. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  805. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  806. part of the polymer project is also subject to an additional IP rights grant
  807. found at http://polymer.github.io/PATENTS.txt
  808. */
  809. var _p=[{properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var n in t)e[n]=t[n]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,n){var r;if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else if(r=e?this.animationConfig[e]:this.animationConfig,Array.isArray(r)||(r=[r]),r)for(var i,o=0;i=r[o];o++)if(i.animatable)i.animatable._getAnimationConfigRecursive(i.type||e,t,n);else if(i.id){var a=t[i.id];a?(a.isClone||(t[i.id]=this._cloneConfig(a),a=t[i.id]),this._copyProperties(a,i)):t[i.id]=i}else n.push(i)},getAnimationConfig:function(e){var t={},n=[];for(var r in this._getAnimationConfigRecursive(e,t,n),t)n.push(t[r]);return n}},{_configureAnimations:function(e){var t=[],n=[];if(e.length>0)for(var r,i=0;r=e[i];i++){var o=document.createElement(r.name);if(o.isNeonAnimation){var a;o.configure||(o.configure=function(e){return null}),a=o.configure(r),n.push({result:a,config:r,neonAnimation:o})}else console.warn(this.is+":",r.name,"not found!")}for(var s=0;s<n.length;s++){var l=n[s].result,u=n[s].config,c=n[s].neonAnimation;try{"function"!=typeof l.cancel&&(l=document.timeline.play(l))}catch(e){l=null,console.warn("Couldnt play","(",u.name,").",e)}l&&t.push({neonAnimation:c,config:u,animation:l})}return t},_shouldComplete:function(e){for(var t=!0,n=0;n<e.length;n++)if("finished"!=e[n].animation.playState){t=!1;break}return t},_complete:function(e){for(var t=0;t<e.length;t++)e[t].neonAnimation.complete(e[t].config);for(t=0;t<e.length;t++)e[t].animation.cancel()},playAnimation:function(e,t){var n=this.getAnimationConfig(e);if(n){this._active=this._active||{},this._active[e]&&(this._complete(this._active[e]),delete this._active[e]);var r=this._configureAnimations(n);if(0!=r.length){this._active[e]=r;for(var i=0;i<r.length;i++)r[i].animation.onfinish=function(){this._shouldComplete(r)&&(this._complete(r),delete this._active[e],this.fire("neon-animation-finish",t,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",t,{bubbles:!1})}},cancelAnimation:function(){for(var e in this._active){var t=this._active[e];for(var n in t)t[n].animation.cancel()}this._active={}}}],gp={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var e=cu(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},attached:function(){void 0===this._isRTL&&(this._isRTL="rtl"==window.getComputedStyle(this).direction),this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==e.top?"top":"auto"!==e.bottom?"bottom":null,horizontally:"auto"!==e.left?"left":"auto"!==e.right?"right":null},sizedBy:{height:"none"!==t.maxHeight,width:"none"!==t.maxWidth,minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}}}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(this.__shouldPosition){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),n=this.__getNormalizedRect(this.fitInto),r=this._fitInfo.margin,i={width:e.width+r.left+r.right,height:e.height+r.top+r.bottom},o=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,i,e,t,n),a=o.left+r.left,s=o.top+r.top,l=Math.min(n.right-r.right,a+e.width),u=Math.min(n.bottom-r.bottom,s+e.height);a=Math.max(n.left+r.left,Math.min(a,l-this._fitInfo.sizedBy.minWidth)),s=Math.max(n.top+r.top,Math.min(s,u-this._fitInfo.sizedBy.minHeight)),this.sizingTarget.style.maxWidth=Math.max(l-a,this._fitInfo.sizedBy.minWidth)+"px",this.sizingTarget.style.maxHeight=Math.max(u-s,this._fitInfo.sizedBy.minHeight)+"px",this.style.left=a-e.left+"px",this.style.top=s-e.top+"px"}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,n,r,i){this.__sizeDimension(e,t,n,r,i)},__sizeDimension:function(e,t,n,r,i){var o=this._fitInfo,a=this.__getNormalizedRect(this.fitInto),s="Width"===i?a.width:a.height,l=t===r,u=l?s-e[r]:e[n],c=o.margin[l?n:r],p="offset"+i,f=this[p]-this.sizingTarget[p];this.sizingTarget.style["max"+i]=s-c-u-f+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!e.vertically||!e.horizontally){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),n=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var r=n.top-t.top+(n.height-t.height)/2;this.style.top=r+"px"}if(!e.horizontally){var i=n.left-t.left+(n.width-t.width)/2;this.style.left=i+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getOffscreenArea:function(e,t,n){var r=Math.min(0,e.top)+Math.min(0,n.bottom-(e.top+t.height)),i=Math.min(0,e.left)+Math.min(0,n.right-(e.left+t.width));return Math.abs(r)*t.width+Math.abs(i)*t.height},__getPosition:function(e,t,n,r,i,o){var a,s=[{verticalAlign:"top",horizontalAlign:"left",top:i.top+this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:i.top+this.verticalOffset,left:i.right-n.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:i.bottom-n.height-this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:i.bottom-n.height-this.verticalOffset,left:i.right-n.width-this.horizontalOffset}];if(this.noOverlap){for(var l=0,u=s.length;l<u;l++){var c={};for(var p in s[l])c[p]=s[l][p];s.push(c)}s[0].top=s[1].top+=i.height,s[2].top=s[3].top-=i.height,s[4].left=s[6].left+=i.width,s[5].left=s[7].left-=i.width}t="auto"===t?null:t,(e="auto"===e?null:e)&&"center"!==e||(s.push({verticalAlign:"top",horizontalAlign:"center",top:i.top+this.verticalOffset+(this.noOverlap?i.height:0),left:i.left-r.width/2+i.width/2+this.horizontalOffset}),s.push({verticalAlign:"bottom",horizontalAlign:"center",top:i.bottom-n.height-this.verticalOffset-(this.noOverlap?i.height:0),left:i.left-r.width/2+i.width/2+this.horizontalOffset})),t&&"middle"!==t||(s.push({verticalAlign:"middle",horizontalAlign:"left",top:i.top-r.height/2+i.height/2+this.verticalOffset,left:i.left+this.horizontalOffset+(this.noOverlap?i.width:0)}),s.push({verticalAlign:"middle",horizontalAlign:"right",top:i.top-r.height/2+i.height/2+this.verticalOffset,left:i.right-n.width-this.horizontalOffset-(this.noOverlap?i.width:0)})),"middle"===t&&"center"===e&&s.push({verticalAlign:"middle",horizontalAlign:"center",top:i.top-r.height/2+i.height/2+this.verticalOffset,left:i.left-r.width/2+i.width/2+this.horizontalOffset});for(l=0;l<s.length;l++){var f=s[l],h=f.verticalAlign===t,d=f.horizontalAlign===e;if(!this.dynamicAlign&&!this.noOverlap&&h&&d){a=f;break}var y=(!t||h)&&(!e||d);if(this.dynamicAlign||y){if(f.offscreenArea=this.__getOffscreenArea(f,n,o),0===f.offscreenArea&&y){a=f;break}a=a||f;var v=f.offscreenArea-a.offscreenArea;(v<0||0===v&&(h||d))&&(a=f)}}return a}},wp=new Set,kp={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(wp.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():no||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=cu(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function t(){document.removeEventListener("readystatechange",t),e()})}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach(function(e){e!==this&&e._findParent()},this):(wp.forEach(function(e){e!==this&&e._findParent()},this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?wp.delete(this):wp.add(this)}},Op=Element.prototype,xp=Op.matches||Op.matchesSelector||Op.mozMatchesSelector||Op.msMatchesSelector||Op.oMatchesSelector||Op.webkitMatchesSelector,Sp={getTabbableNodes:function(e){var t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t},isFocusable:function(e){return xp.call(e,"input, select, textarea, button, object")?xp.call(e,":not([disabled])"):xp.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")},isTabbable:function(e){return this.isFocusable(e)&&xp.call(e,':not([tabindex="-1"])')&&this._isVisible(e)},_normalizedTabIndex:function(e){if(this.isFocusable(e)){var t=e.getAttribute("tabindex")||0;return Number(t)}return-1},_collectTabbableNodes:function(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;var n,r=e,i=this._normalizedTabIndex(r),o=i>0;i>=0&&t.push(r),n="content"===r.localName||"slot"===r.localName?cu(r).getDistributedNodes():cu(r.root||r).children;for(var a=0;a<n.length;a++)o=this._collectTabbableNodes(n[a],t)||o;return o},_isVisible:function(e){var t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&("hidden"!==(t=window.getComputedStyle(e)).visibility&&"none"!==t.display)},_sortByTabIndex:function(e){var t=e.length;if(t<2)return e;var n=Math.ceil(t/2),r=this._sortByTabIndex(e.slice(0,n)),i=this._sortByTabIndex(e.slice(n));return this._mergeSortByTabIndex(r,i)},_mergeSortByTabIndex:function(e,t){for(var n=[];e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)},_hasLowerTabOrder:function(e,t){var n=Math.max(e.tabIndex,0),r=Math.max(t.tabIndex,0);return 0===n||0===r?r>n:n>r}};
  810. /**
  811. @license
  812. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  813. This code may only be used under the BSD style license found at
  814. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  815. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  816. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  817. part of the polymer project is also subject to an additional IP rights grant
  818. found at http://polymer.github.io/PATENTS.txt
  819. */function Pp(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  820. /**
  821. @license
  822. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  823. This code may only be used under the BSD style license found at
  824. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  825. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  826. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  827. part of the polymer project is also subject to an additional IP rights grant
  828. found at http://polymer.github.io/PATENTS.txt
  829. */(["\n <style>\n :host {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: var(--iron-overlay-backdrop-background-color, #000);\n opacity: 0;\n transition: opacity 0.2s;\n pointer-events: none;\n @apply --iron-overlay-backdrop;\n }\n\n :host(.opened) {\n opacity: var(--iron-overlay-backdrop-opacity, 0.6);\n pointer-events: auto;\n @apply --iron-overlay-backdrop-opened;\n }\n </style>\n\n <slot></slot>\n"]);return Pp=function(){return e},e}Tu({_template:gc(Pp()),is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&cu(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||cu(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});
  830. /**
  831. @license
  832. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  833. This code may only be used under the BSD style license found at
  834. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  835. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  836. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  837. part of the polymer project is also subject to an additional IP rights grant
  838. found at http://polymer.github.io/PATENTS.txt
  839. */
  840. var Cp={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},Ep={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},Tp={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},Ap=/[a-z0-9*]/,jp=/U\+/,Np=/^arrow/,Rp=/^space(bar)?/,Ip=/^escape$/;function zp(e,t){var n="";if(e){var r=e.toLowerCase();" "===r||Rp.test(r)?n="space":Ip.test(r)?n="esc":1==r.length?t&&!Ap.test(r)||(n=r):n=Np.test(r)?r.replace("arrow",""):"multiply"==r?"*":r}return n}function Lp(e,t){return e.key?zp(e.key,t):e.detail&&e.detail.key?zp(e.detail.key,t):(n=e.keyIdentifier,r="",n&&(n in Cp?r=Cp[n]:jp.test(n)?(n=parseInt(n.replace("U+","0x"),16),r=String.fromCharCode(n).toLowerCase()):r=n.toLowerCase()),r||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):Ep[e]),t}(e.keyCode)||"");var n,r}function Mp(e,t){return Lp(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function Dp(e){return e.trim().split(" ").map(function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var n=t.split(":"),r=n[0],i=n[1];return r in Tp?(e[Tp[r]]=!0,e.hasModifiers=!0):(e.key=r,e.event=i||"keydown"),e},{combo:e.split(":").shift()})}(e)})}var Fp={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=Dp(t),r=0;r<n.length;++r)if(Mp(n[r],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(e){return e.keyBindings});return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach(function(e){for(var t in e)this._addKeyBinding(t,e[t])},this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1})},_addKeyBinding:function(e,t){Dp(e).forEach(function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)},this)},_unlistenKeyEventListeners:function(){for(var e,t,n,r;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],r=e[2],t.removeEventListener(n,r)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var r=e[n][0],i=e[n][1];if(Mp(r,t)&&(this._triggerKeyHandler(r,i,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var r=Object.create(e);r.keyboardEvent=n;var i=new CustomEvent(e.event,{detail:r,cancelable:!0});this[t].call(this,i),i.defaultPrevented&&n.preventDefault()}},Bp=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,hl(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)};
  841. /**
  842. @license
  843. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  844. This code may only be used under the BSD style license found at
  845. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  846. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  847. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  848. part of the polymer project is also subject to an additional IP rights grant
  849. found at http://polymer.github.io/PATENTS.txt
  850. */Bp.prototype={constructor:Bp,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){var e=document.activeElement;for(e&&e instanceof Element!=!1||(e=document.body);e.root&&cu(e.root).activeElement;)e=cu(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var n=this._overlays.length-1,r=this._overlays[n];if(r&&this._shouldBeBehindOverlay(t,r)&&n--,!(e>=n)){var i=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=i&&this._applyOverlayZ(t,i);e<n;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[n]=t}}},addOrRemoveOverlay:function(e){e.opened?this.addOverlay(e):this.removeOverlay(e)},addOverlay:function(e){var t=this._overlays.indexOf(e);if(t>=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var n=this._overlays.length,r=this._overlays[n-1],i=Math.max(this._getZ(r),this._minimumZ),o=this._getZ(e);if(r&&this._shouldBeBehindOverlay(e,r)){this._applyOverlayZ(r,i),n--;var a=this._overlays[n-1];i=Math.max(this._getZ(a),this._minimumZ)}o<=i&&this._applyOverlayZ(e,i),this._overlays.splice(n,0,e),this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);-1!==t&&(this._overlays.splice(t,1),this.trackBackdrop())},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e,this.backdropElement.prepare())},getBackdrops:function(){for(var e=[],t=0;t<this._overlays.length;t++)this._overlays[t].withBackdrop&&e.push(this._overlays[t]);return e},backdropZ:function(){return this._getZ(this._overlayWithBackdrop())-1},_overlayWithBackdrop:function(){for(var e=this._overlays.length-1;e>=0;e--)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var n=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);n==n&&(t=n)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayInPath:function(e){e=e||[];for(var t=0;t<e.length;t++)if(e[t]._manager===this)return e[t]},_onCaptureClick:function(e){var t=this._overlays.length-1;if(-1!==t)for(var n,r=cu(e).path;(n=this._overlays[t])&&this._overlayInPath(r)!==n&&(n._onCaptureClick(e),n.allowClickThrough);)t--},_onCaptureFocus:function(e){var t=this.currentOverlay();t&&t._onCaptureFocus(e)},_onCaptureKeyDown:function(e){var t=this.currentOverlay();t&&(Fp.keyboardEventMatchesKeys(e,"esc")?t._onCaptureEsc(e):Fp.keyboardEventMatchesKeys(e,"tab")&&t._onCaptureTab(e))},_shouldBeBehindOverlay:function(e,t){return!e.alwaysOnTop&&t.alwaysOnTop}};var Hp,Kp,Vp=new Bp,Up={pageX:0,pageY:0},qp=null,Yp=[],Wp=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];
  851. /**
  852. @license
  853. Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  854. This code may only be used under the BSD style license found at
  855. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  856. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  857. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  858. part of the polymer project is also subject to an additional IP rights grant
  859. found at http://polymer.github.io/PATENTS.txt
  860. */function Gp(e){$p.indexOf(e)>=0||(0===$p.length&&function(){Hp=Hp||function(e){e.cancelable&&function(e){var t=cu(e).rootTarget;"touchmove"!==e.type&&qp!==t&&(qp=t,Yp=function(e){for(var t=[],n=e.indexOf(Kp),r=0;r<=n;r++)if(e[r].nodeType===Node.ELEMENT_NODE){var i=e[r],o=i.style;"scroll"!==o.overflow&&"auto"!==o.overflow&&(o=window.getComputedStyle(i)),"scroll"!==o.overflow&&"auto"!==o.overflow||t.push(i)}return t}(cu(e).path));if(!Yp.length)return!0;if("touchstart"===e.type)return!1;var n=function(e){var t={deltaX:e.deltaX,deltaY:e.deltaY};if("deltaX"in e);else if("wheelDeltaX"in e&&"wheelDeltaY"in e)t.deltaX=-e.wheelDeltaX,t.deltaY=-e.wheelDeltaY;else if("wheelDelta"in e)t.deltaX=0,t.deltaY=-e.wheelDelta;else if("axis"in e)t.deltaX=1===e.axis?e.detail:0,t.deltaY=2===e.axis?e.detail:0;else if(e.targetTouches){var n=e.targetTouches[0];t.deltaX=Up.pageX-n.pageX,t.deltaY=Up.pageY-n.pageY}return t}
  861. /**
  862. @license
  863. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  864. This code may only be used under the BSD style license found at
  865. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  866. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  867. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  868. part of the polymer project is also subject to an additional IP rights grant
  869. found at http://polymer.github.io/PATENTS.txt
  870. */(e);return!function(e,t,n){if(!t&&!n)return;for(var r=Math.abs(n)>=Math.abs(t),i=0;i<e.length;i++){var o=e[i];if(r?n<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:t<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth)return o}}(Yp,n.deltaX,n.deltaY)}(e)&&e.preventDefault();if(e.targetTouches){var t=e.targetTouches[0];Up.pageX=t.pageX,Up.pageY=t.pageY}}.bind(void 0);for(var e=0,t=Wp.length;e<t;e++)document.addEventListener(Wp[e],Hp,{capture:!0,passive:!1})}(),$p.push(e),Kp=$p[$p.length-1],[],[])}function Xp(e){var t=$p.indexOf(e);-1!==t&&($p.splice(t,1),Kp=$p[$p.length-1],[],[],0===$p.length&&function(){for(var e=0,t=Wp.length;e<t;e++)document.removeEventListener(Wp[e],Hp,{capture:!0,passive:!1})}())}var $p=[];var Jp=[[gp,kp,{properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:Vp},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||cu(this).querySelector("[autofocus]")||this},get _focusableNodes(){return Sp.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=cu(this).observeNodes(this._onNodesChange)},detached:function(){for(var e in cu(this).unobserveNodes(this._observer),this._observer=null,this.__rafs)null!==this.__rafs[e]&&cancelAnimationFrame(this.__rafs[e]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){this.fire("iron-overlay-canceled",e,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||cu(this).deepContains(e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=cu(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,n=t?this.__firstFocusableNode:this.__lastFocusableNode,r=t?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(n===r)i=!0;else{var o=this._manager.deepActiveElement;i=o===n||o===this}i&&(e.preventDefault(),this._focusedChild=r,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(e,t){var n=this.__rafs;null!==n[e]&&cancelAnimationFrame(n[e]),n[e]=requestAnimationFrame(function(){n[e]=null,t.call(this)}.bind(this))},__updateScrollObservers:function(e,t,n){e&&t&&this.__isValidScrollAction(n)?("lock"===n&&(this.__saveScrollPosition(),Gp(this)),this.__addScrollListeners()):(Xp(this),this.__removeScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],no)for(var e=this;e;)e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host&&this.__rootNodes.push(e),e=e.host||e.assignedSlot||e.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach(function(e){e.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach(function(e){e.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(e){return"lock"===e||"refit"===e||"cancel"===e},__onCaptureScroll:function(e){if(!(this.__isAnimating||cu(e).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(e)}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}}],{hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){t&&(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=cu(e).path,n=0,r=t.indexOf(this);n<r;n++){var i=t[n];if(i.hasAttribute&&(i.hasAttribute("dialog-dismiss")||i.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(i.hasAttribute("dialog-confirm")),this.close(),e.stopPropagation();break}}}}];function Zp(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  871. /**
  872. @license
  873. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  874. This code may only be used under the BSD style license found at
  875. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  876. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  877. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  878. part of the polymer project is also subject to an additional IP rights grant
  879. found at http://polymer.github.io/PATENTS.txt
  880. */(['\n <style include="paper-dialog-shared-styles"></style>\n <slot></slot>\n']);return Zp=function(){return e},e}function Qp(e){return(Qp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ef(){var e=rf(['\n <li>\n <div class="blank-item"></div>\n </li>\n ']);return ef=function(){return e},e}function tf(){var e=rf(['\n <li>\n <pump-item @click-detail-event="','" .pump="','" ></pump-item>\n </li>\n ']);return tf=function(){return e},e}function nf(){var e=rf(['\n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style>\n :host {\n display:block;\n }\n .pumps-scroll{\n overflow: -moz-scrollbars-vertical; \n overflow-y: scroll;\n height: 300px;\n }\n .grid {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n margin: 0 10px 32px 10px;\n padding: 0;\n list-style: none; \n }\n \n .grid li {\n -webkit-flex-basis: 33%;\n flex-basis: 10%;\n padding-bottom: 10px;\n padding-left: 10px;\n padding-top: 10px;\n }\n\n .blank-item {\n width: 150px;\n height: 170px;\n }\n\n @media (max-width: 467px) { \n .grid li {\n -webkit-flex-basis: 40%;\n flex-basis: 40%;\n max-width: 40%;\n padding-bottom: 10px;\n padding-left: 3px;\n }\n }\n </style>\n <div class="pumps-scroll">\n <ul class="grid">\n ',"\n\n ",'\n </ul>\n </div>\n <paper-dialog id="actions" style="width:1100px;">\n <pos-detail></pos-detail>\n </paper-dialog>\n ']);return nf=function(){return e},e}function rf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function of(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function af(e,t){return!t||"object"!==Qp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sf(e){return(sf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function lf(e,t){return(lf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Tu({_template:gc(Zp()),is:"paper-dialog",behaviors:[Jp,_p],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});var uf=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),af(this,sf(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lf(e,t)}(t,Vn(Ln)(Ne)),n=t,i=[{key:"properties",get:function(){return{pumpsLists:{type:Array}}}}],(r=[{key:"render",value:function(){var e=this;if(null!=this.pumpsLists){for(var t=Object.keys(this.pumpsLists).length<10?10-Object.keys(this.pumpsLists).length:0,n=[],r=0;r<t;r++)n[r]=r;return $(nf(),Object.keys(this.pumpsLists).map(function(t){var n=e.pumpsLists[t];return $(tf(),function(){e.openDialog()},n)}),n.map(function(e){return $(ef())}))}}},{key:"firstUpdated",value:function(){Ln.dispatch(function(e){var t=window.hostUrl+"/api/pos/fps";fetch(t).then(function(e){return e.json()}).then(function(t){return e(cn(t))}).catch(function(){return e(un())})})}},{key:"openDialog",value:function(){this.shadowRoot.getElementById("actions").open()}},{key:"stateChanged",value:function(e){var t=this;if(this.pumpsLists=jn(e),null!=this.pumpsLists&&null!=this.pumpsLists){var n=!1,r=!1;Object.keys(this.pumpsLists).forEach(function(e){var i=t.pumpsLists[e];i.Trans.length>0&&(r=!0),"Calling"==i.StateName&&(n=!0)}),"undefined"!=typeof Android&&Android&&null!==Android&&(n?Android.playHorn():Android.stopHorn(),r?Android.playBell():Android.stopBell())}}}])&&of(n.prototype,r),i&&of(n,i),t}();function cf(e){return(cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pf(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n .table\n {\n display: table;\n font-family: arial, sans-serif;\n border-collapse: collapse;\n width: 100%;\n }\n .fueling\n {\n background: cyan;\n }\n .error\n {\n background: red;\n }\n .calling\n {\n background: yellow;\n }\n .row\n {\n display: table-row;\n border-bottom: 1px solid;\n text-align: center;\n }\n .row > img {\n width: 100px;\n height: 108px;\n }\n </style>\n <div class="table">\n <svg width="9" height="60">\n <rect width="9" height="60" style="fill:blue;stroke-width:1;stroke:rgb(0,0,0)" /> \n </svg>\n </div>\n ']);return pf=function(){return e},e}function ff(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hf(e,t){return!t||"object"!==cf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function df(e){return(df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function yf(e,t){return(yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("pump-list",uf);var vf=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),hf(this,df(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yf(e,t)}(t,Ne),n=t,i=[{key:"properties",get:function(){return{pump_data:{type:String}}}}],(r=[{key:"render",value:function(){return $(pf())}}])&&ff(n.prototype,r),i&&ff(n,i),t}();function mf(e){return(mf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bf(){var e=gf(["\n <tr>\n <td>","</td>\n <td>"," ","</td>\n <td>","</td>\n <td>","</td>\n <td>","</td>\n <td>","</td>\n <td>","</td>\n <td>",'</td>\n <td @click="','"><span class="icon has-text-danger">\n <img src="./images/print.png"/>\n </span></td>\n </tr>\n ']);return bf=function(){return e},e}function _f(){var e=gf([' \n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style>\n :host {\n display:block;\n }\n button {\n width:90px;\n height: 70px;\n margin:5px;\n }\n button img {\n width:50px;\n height: 50px;\n }\n .header{\n text-align: center;\n }\n .top-panel {\n padding:5px;\n }\n .is-scrollable {\n overflow-y: scroll;\n }\n .receipt-container {\n overflow:auto;\n width:800px;\n height:500px;\n }\n </style>\n\n<div class="tile is-ancestor has-text-black-bis">\n <div class="tile is-parent">\n <h2 class="title is-4 has-text-link">Old Receipts</h2>\n </div>\n <div class="tile is-parent is-10">\n <article class="tile is-child box">\n <div class="receipt-container has-text-black-bis"> \n <table class="table is-scrollable is-striped has-text-black-bis">\n <thead>\n <tr>\n <th>Ref No</th>\n <th>Date</th>\n <th>Pump</th>\n <th>Product</th>\n <th>Volume</th>\n <th>Price</th>\n <th>Amount</th>\n <th>Car No</th>\n <th>Print</th>\n </tr>\n </thead>\n \n <tbody>\n ',"\n </tbody>\n </table>\n </div>\n </article>\n </div>\n</div>\n "]);return _f=function(){return e},e}function gf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function wf(e,t){return!t||"object"!==mf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kf(e){return(kf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Of(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xf(e,t,n){return t&&Of(e.prototype,t),n&&Of(e,n),e}function Sf(e,t){return(Sf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("pump-outline",vf);var Pf=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=wf(this,kf(t).call(this))).pump={},e.saleTrans=[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sf(e,t)}(t,Vn(Ln)(Ne)),xf(t,[{key:"render",value:function(){var e=this;return this.saleTrans.sort(this.compare),$(_f(),this.saleTrans.map(function(t){var n=new Date(1e3*t.timeSec),r=n.getDate(),i=n.getMonth()+1,o=n.getFullYear(),a=n.getHours(),s=n.getMinutes(),l=n.getSeconds();r<10&&(r="0"+r),i<10&&(i="0"+i),a<10&&(a="0"+a),s<10&&(s="0"+s),l<10&&(l="0"+l);var u=o+"-"+i+"-"+r,c=a+":"+s+":"+l;return $(bf(),t.receiptNumber,u,c,t.fpId,t.product,t.volume/e.station.volume_divider,t.price/e.station.money_divider,t.amount/e.station.money_divider,t.carNumber,function(){return e.clickTran(t)})}))}}],[{key:"properties",get:function(){return{pump:{type:Object},saleTrans:{type:Array},station:{type:Object}}}}]),xf(t,[{key:"stateChanged",value:function(e){null!=e.pumps.oldsales&&null!=e.pumps.oldsales&&(this.saleTrans=e.pumps.oldsales.sales,this.station=e.pumps.oldsales.station)}},{key:"clickTran",value:function(e){var t;Ln.dispatch((t=e.receiptNumber,function(e,n){if(n().app.isLogin){var r=window.hostUrl+"/api/pos/print/"+t;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(t){"Ok"==t.status&&(en(t.data),e(Qt("Successfully print old receipt ")))}).catch(function(t){return e(Qt("Error:"+t.message))})}else e(Qt("Error: No login"))}))}},{key:"compare",value:function(e,t){return e.id>t.id?-1:e.id<t.id?1:0}}]),t}();function Cf(e){return(Cf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ef(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}([' \n <link rel="stylesheet" href="css/font_awesome.css">\n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style>\n :host {\n display:block;\n }\n\n #passcode_field{\n width: 70%;\n }\n\n .passcode-container {\n width:190px;\n height:120px;\n }\n .confirmButton{\n width: 257px;\n margin-left: 66px;\n }\n </style>\n\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">Name</label>\n </div>\n <div class="field-body">\n <div class="field">\n <p class="control">\n <input class="input is-static" type="text" value="','" readonly>\n </p>\n </div>\n </div>\n </div>\n \n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">Role</label>\n </div>\n <div class="field-body">\n <div class="field">\n <p class="control">\n <input class="input is-static" type="text" value="','" readonly>\n </p>\n </div>\n </div>\n </div>\n\n <div class="field is-horizontal">\n <div class="field-label is-normal">\n <label class="label">Pass Code</label>\n </div>\n <div class="field-body">\n <div class="field">\n <p class="control"> \n <input id="passcode_field" class="input" type="password" value="','">\n <span id="eye_icon" toggle="#passcode_field" \n class="fa fa-fw fa-eye field-icon toggle-password" @click="','">\n </span> \n </p>\n </div> \n </div>\n </div>\n\n <div class="field is-horizontal">\n <div class="control" style="padding-left: 22%;">\n <a class="button" @click="','">Reset PassCode</a>\n </div>\n </div>\n <paper-dialog id="resetPassCodeConfirm" style="style="width:500px;height:200px;border-radius: 6px;">\n <div class="passcode-container" style="padding: 10px;width:450px;">\n \n <h2 class="is-size-5">Reset PassCode?</h2>\n <div class="confirmButton level">\n <a class="button is-medium is-link is-outlined level-item" style="margin: 10px;" @click="','">Yes</a>\n <a class="button is-medium is-danger is-outlined level-item" @click="','">No</a>\n </div>\n </div>\n </paper-dialog>\n\n ']);return Ef=function(){return e},e}function Tf(e,t){return!t||"object"!==Cf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Af(e){return(Af=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nf(e,t,n){return t&&jf(e.prototype,t),n&&jf(e,n),e}function Rf(e,t){return(Rf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("old-receipts",Pf);var If=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Tf(this,Af(t).call(this))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rf(e,t)}(t,Vn(Ln)(Ne)),Nf(t,[{key:"render",value:function(){var e=this;return $(Ef(),this._user.name,this._user.role,this._user.passcode,function(){e.showHidePasscode()},function(){return e.openConfirm()},function(){return e.resetPassCode(e._user.id,e._user.passcode)},function(){return e.closeDialog()})}}],[{key:"properties",get:function(){return{_isLogin:{type:Boolean},_user:{type:Object}}}}]),Nf(t,[{key:"stateChanged",value:function(e){this._isLogin=e.app.isLogin,null!=e.app.user&&null!=e.app.user&&(this._user=e.app.user)}},{key:"resetPassCode",value:function(e,t){1==window.confirm("Reset Pass Code ?")&&Ln.dispatch(function(e,t){return function(n){var r=window.hostUrl+"/api/pos/resetPasscode/"+e+"/"+t;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(e){"Ok"==e.status?n({type:"RESET_PASSCODE",user:e.data}):n(Qt("Reset Pass Code failed"))}).catch(function(e){return n(Qt("Unable to login"))})}}(e,t))}},{key:"showHidePasscode",value:function(){this.shadowRoot.getElementById("eye_icon").classList.toggle("fa-eye-slash");var e=this.shadowRoot.getElementById("passcode_field");"password"==e.getAttribute("type")?e.setAttribute("type","text"):e.setAttribute("type","password")}},{key:"openConfirm",value:function(){this.shadowRoot.getElementById("resetPassCodeConfirm").open()}},{key:"closeDialog",value:function(){this.shadowRoot.getElementById("resetPassCodeConfirm").close()}}]),t}();function zf(e){return(zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lf(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host{\n display:block;\n -webkit-user-select: none; /* Chrome all / Safari all */\n -moz-user-select: none; /* Firefox all */\n -ms-user-select: none; /* IE 10+ */\n user-select: none; /* Likely future */ \n }\n .keyboard {\n display: inline-flex;\n padding: 0.75em 1.5em;\n text-align: center;\n }\n .item{\n width: 61em;\n }\n \n .number-panel{\n width: 15em;\n display: block;\n }\n .number-row {\n width: 15em;\n display: block;\n }\n .key{\n height: 5em;\n width: 5em;\n margin: 0.4em 0;\n }\n .number-key {\n width: 30px;\n height: 30px;\n border: solid 1px black;\n display: inline-block;\n }\n #text{\n width: 10em;\n height: 2em;\n }\n #task{\n width: 20em;\n height: 2em;\n }\n #space {\n width: 15em;\n }\n #back {\n font-weight: bold;\n height: 5em;\n width: 9em;\n }\n #enter{\n width: 6em;\n height: 6em;\n }\n label{\n margin-left: 1em;\n }\n .money{\n margin-left: 10px;\n }\n </style>\n\n <div class="input-layout"> \n <slot></slot>\n <input type="text" id="text" autocomplete="off" value="','"\n @click="','" readonly="readonly"> \n </div>\n\n <paper-dialog id="actions">\n <div>\n <label>Car Plate Number</label>:\n <input type="text" id="task" autocomplete="off" value="','"\n @change="','" readonly="readonly">\n </div>\n <div class="keyboard">\n <div class="item">\n <button class="key" @tap="','"\n @touchstart="','">Q</button>\n <button class="key" @tap="','"\n @touchstart="','">W</button>\n <button class="key" @tap="','"\n @touchstart="','">E</button>\n <button class="key" @tap="','"\n @touchstart="','">R</button>\n <button class="key" @tap="','"\n @touchstart="','">T</button>\n <button class="key" @tap="','"\n @touchstart="','">Y</button>\n <button class="key" @tap="','"\n @touchstart="','">U</button>\n <button class="key" @tap="','"\n @touchstart="','">I</button>\n <button class="key" @tap="','"\n @touchstart="','">O</button>\n <button class="key" @tap="','"\n @touchstart="','">P</button>\n\n <button id="back" @tap="','"\n @touchstart="','">&#8592;</button>\n\n <button class="key" @tap="','"\n @touchstart="','">A</button>\n <button class="key" @tap="','"\n @touchstart="','">S</button>\n <button class="key" @tap="','"\n @touchstart="','">D</button>\n <button class="key" @tap="','"\n @touchstart="','">F</button>\n <button class="key" @tap="','"\n @touchstart="','">G</button>\n <button class="key" @tap="','"\n @touchstart="','">H</button>\n <button class="key" @tap="','"\n @touchstart="','">J</button>\n <button class="key" @tap="','"\n @touchstart="','">K</button>\n <button class="key" @tap="','"\n @touchstart="','">L</button>\n\n <button id="enter" @tap="','"\n @touchstart="','">Enter</button><br>\n\n <button class="key" @tap="','"\n @touchstart="','">Z</button>\n <button class="key" @tap="','"\n @touchstart="','">X</button>\n <button class="key" @tap="','"\n @touchstart="','">C</button>\n <button class="key" @tap="','"\n @touchstart="','">V</button>\n <button class="key" @tap="','"\n @touchstart="','">B</button>\n <button class="key" @tap="','"\n @touchstart="','">N</button>\n <button class="key" @tap="','"\n @touchstart="','">M</button>\n\n <button class="key" @tap="','"\n @touchstart="','">clear</button><br>\n\n \n <button id="space" class="key" @tap="','"\n @touchstart="','">Space</button>\n <button class="key" @tap="','"\n @touchstart="','">close</button>\n \n </div>\n <div class="number-panel">\n <div class="number-row">\n <button class="key" @tap="','"\n @touchstart="','">7</button>\n <button class="key" @tap="','"\n @touchstart="','">8</button>\n <button class="key" @tap="','"\n @touchstart="','">9</button>\n </div>\n <div class="number-row">\n <button class="key" @tap="','"\n @touchstart="','">4</button>\n <button class="key" @tap="','"\n @touchstart="','">5</button>\n <button class="key" @tap="','"\n @touchstart="','">6</button>\n </div>\n <div class="number-row">\n <button class="key" @tap="','"\n @touchstart="','">1</button>\n <button class="key" @tap="','"\n @touchstart="','">2</button>\n <button class="key" @tap="','"\n @touchstart="','">3</button>\n </div>\n <div class="number-row">\n <button class="key" @tap="','"\n @touchstart="','">/</button>\n <button class="key" @tap="','"\n @touchstart="','">0</button>\n <button class="key" @tap="','"\n @touchstart="','">-</button>\n </div>\n </div>\n </div> \n </paper-dialog>\n ']);return Lf=function(){return e},e}function Mf(e,t){return!t||"object"!==zf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Df(e){return(Df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ff(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bf(e,t,n){return t&&Ff(e.prototype,t),n&&Ff(e,n),e}function Hf(e,t){return(Hf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("user-profile",If);var Kf=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Mf(this,Df(t).call(this))).task="",e.text="",e.isTouch=!1,e.activate=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hf(e,t)}(t,Vn(Ln)(Ne)),Bf(t,null,[{key:"properties",get:function(){return{task:{type:String},text:{type:String},isTouch:{type:Boolean}}}}]),Bf(t,[{key:"render",value:function(){var e=this;return $(Lf(),this.text||"",function(){return e.showModal()},this.task||"",this.updateTask,function(){return e.addToKey("Q")},function(){return e.addToKey("Q",!0)},function(){return e.addToKey("W")},function(){return e.addToKey("W",!0)},function(){return e.addToKey("E")},function(){return e.addToKey("E",!0)},function(){return e.addToKey("R")},function(){return e.addToKey("R",!0)},function(){return e.addToKey("T")},function(){return e.addToKey("T",!0)},function(){return e.addToKey("Y")},function(){return e.addToKey("Y",!0)},function(){return e.addToKey("U")},function(){return e.addToKey("U",!0)},function(){return e.addToKey("I")},function(){return e.addToKey("I",!0)},function(){return e.addToKey("O")},function(){return e.addToKey("O",!0)},function(){return e.addToKey("P")},function(){return e.addToKey("P",!0)},function(){return e.addToBack()},function(){return e.addToBack(!0)},function(){return e.addToKey("A")},function(){return e.addToKey("A",!0)},function(){return e.addToKey("S")},function(){return e.addToKey("S",!0)},function(){return e.addToKey("D")},function(){return e.addToKey("D",!0)},function(){return e.addToKey("F")},function(){return e.addToKey("F",!0)},function(){return e.addToKey("G")},function(){return e.addToKey("G",!0)},function(){return e.addToKey("H")},function(){return e.addToKey("H",!0)},function(){return e.addToKey("J")},function(){return e.addToKey("J",!0)},function(){return e.addToKey("K")},function(){return e.addToKey("K",!0)},function(){return e.addToKey("L")},function(){return e.addToKey("L",!0)},function(){return e.addToEnter()},function(){return e.addToEnter(!0)},function(){return e.addToKey("Z")},function(){return e.addToKey("Z",!0)},function(){return e.addToKey("X")},function(){return e.addToKey("X",!0)},function(){return e.addToKey("C")},function(){return e.addToKey("C",!0)},function(){return e.addToKey("V")},function(){return e.addToKey("V",!0)},function(){return e.addToKey("B")},function(){return e.addToKey("B",!0)},function(){return e.addToKey("N")},function(){return e.addToKey("N",!0)},function(){return e.addToKey("M")},function(){return e.addToKey("M",!0)},function(){return e.addToClear()},function(){return e.addToClear(!0)},function(){return e.addToKey(" ")},function(){return e.addToKey(" ",!0)},function(){return e.closeModel()},function(){return e.closeModel(!0)},function(){return e.addToKey("7")},function(){return e.addToKey("7",!0)},function(){return e.addToKey("8")},function(){return e.addToKey("8",!0)},function(){return e.addToKey("9")},function(){return e.addToKey("9",!0)},function(){return e.addToKey("4")},function(){return e.addToKey("4",!0)},function(){return e.addToKey("5")},function(){return e.addToKey("5",!0)},function(){return e.addToKey("6")},function(){return e.addToKey("6",!0)},function(){return e.addToKey("1")},function(){return e.addToKey("1",!0)},function(){return e.addToKey("2")},function(){return e.addToKey("2",!0)},function(){return e.addToKey("3")},function(){return e.addToKey("3",!0)},function(){return e.addToKey("/")},function(){return e.addToKey("/",!0)},function(){return e.addToKey("0")},function(){return e.addToKey("0",!0)},function(){return e.addToKey("-")},function(){return e.addToKey("-",!0)})}},{key:"addToKey",value:function(e,t){t&&(this.isTouch=t),this.isTouch&&!t||(this.task+=e)}},{key:"addToEnter",value:function(e){if(e&&(this.isTouch=e),!this.isTouch||e){this.text=this.task,this.shadowRoot.getElementById("actions").close();var t=new CustomEvent("click-enter-event",{detail:{value:this.task}});this.dispatchEvent(t)}}},{key:"addToBack",value:function(e){e&&(this.isTouch=e),this.isTouch&&!e||(this.task=this.shadowRoot.getElementById("task").value.replace(/.$/,""))}},{key:"addToClear",value:function(e){e&&(this.isTouch=e),this.isTouch&&!e||(this.task="")}},{key:"showModal",value:function(){this.shadowRoot.getElementById("actions").open()}},{key:"closeModel",value:function(e){e&&(this.isTouch=e),this.isTouch&&!e||this.shadowRoot.getElementById("actions").close()}},{key:"updateTask",value:function(e){this.task=e.target.value}},{key:"clear",value:function(){this.text="",this.task=""}}]),t}();function Vf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}customElements.define("input-element",Kf);
  881. /**
  882. @license
  883. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  884. This code may only be used under the BSD style license found at
  885. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  886. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  887. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  888. part of the polymer project is also subject to an additional IP rights grant
  889. found at http://polymer.github.io/PATENTS.txt
  890. */
  891. var Uf=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),e[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)}var t,n,r;return t=e,(n=[{key:"byKey",value:function(e){return this.key=e,this.value}},{key:"value",get:function(){var t=this.type,n=this.key;if(t&&n)return e.types[t]&&e.types[t][n]},set:function(t){var n=this.type,r=this.key;n&&r&&(n=e.types[n]=e.types[n]||{},null==t?delete n[r]:n[r]=t)}},{key:"list",get:function(){if(this.type){var t=e.types[this.type];return t?Object.keys(t).map(function(e){return qf[this.type][e]},this):[]}}}])&&Vf(t.prototype,n),r&&Vf(t,r),e}();Uf[" "]=function(){},Uf.types={};var qf=Uf.types;function Yf(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  892. /**
  893. @license
  894. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  895. This code may only be used under the BSD style license found at
  896. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  897. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  898. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  899. part of the polymer project is also subject to an additional IP rights grant
  900. found at http://polymer.github.io/PATENTS.txt
  901. */(["\n <style>\n :host {\n @apply --layout-inline;\n @apply --layout-center-center;\n position: relative;\n\n vertical-align: middle;\n\n fill: var(--iron-icon-fill-color, currentcolor);\n stroke: var(--iron-icon-stroke-color, none);\n\n width: var(--iron-icon-width, 24px);\n height: var(--iron-icon-height, 24px);\n @apply --iron-icon;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n"]);return Yf=function(){return e},e}Tu({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,n){var r=new Uf({type:e,key:t});return void 0!==n&&n!==r.value?r.value=n:this.value!==r.value&&(this.value=r.value),r},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new Uf({type:this.type,key:e}).value}}),Tu({_template:gc(Yf()),is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:op.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&cu(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,cu(this.root).appendChild(this._img))}});
  902. /**
  903. @license
  904. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  905. This code may only be used under the BSD style license found at
  906. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  907. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  908. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  909. part of the polymer project is also subject to an additional IP rights grant
  910. found at http://polymer.github.io/PATENTS.txt
  911. */
  912. var Wf={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){this._setFocused("focus"===e.type)},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(null===this._oldTabIndex?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}},Gf={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_focusChanged:function(e){this._detectKeyboardFocus(e),e||this._setPressed(!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,n=cu(t).localTarget;this.isLightDescendant(n)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,n=cu(t).localTarget;this.isLightDescendant(n)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Xf=[Fp,Gf];
  913. /**
  914. @license
  915. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  916. This code may only be used under the BSD style license found at
  917. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  918. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  919. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  920. part of the polymer project is also subject to an additional IP rights grant
  921. found at http://polymer.github.io/PATENTS.txt
  922. */function $f(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  923. /**
  924. @license
  925. Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
  926. This code may only be used under the BSD style license found at
  927. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  928. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  929. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  930. part of the polymer project is also subject to an additional IP rights grant
  931. found at http://polymer.github.io/PATENTS.txt
  932. */(['\n <style>\n :host {\n display: block;\n position: absolute;\n border-radius: inherit;\n overflow: hidden;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n /* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,\n * creating a node (with a position:absolute) in the middle of an event\n * handler "interrupts" that event handler (which happens when the\n * ripple is created on demand) */\n pointer-events: none;\n }\n\n :host([animating]) {\n /* This resolves a rendering issue in Chrome (as of 40) where the\n ripple is not properly clipped by its parent (which may have\n rounded corners). See: http://jsbin.com/temexa/4\n\n Note: We only apply this style conditionally. Otherwise, the browser\n will create a new compositing layer for every ripple element on the\n page, and that would be bad. */\n -webkit-transform: translate(0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n #background,\n #waves,\n .wave-container,\n .wave {\n pointer-events: none;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n #background,\n .wave {\n opacity: 0;\n }\n\n #waves,\n .wave {\n overflow: hidden;\n }\n\n .wave-container,\n .wave {\n border-radius: 50%;\n }\n\n :host(.circle) #background,\n :host(.circle) #waves {\n border-radius: 50%;\n }\n\n :host(.circle) .wave-container {\n overflow: hidden;\n }\n </style>\n\n <div id="background"></div>\n <div id="waves"></div>\n']);return $f=function(){return e},e}var Jf={distance:function(e,t,n,r){var i=e-n,o=t-r;return Math.sqrt(i*i+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function Zf(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function Qf(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),cu(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}Zf.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var n=Jf.distance(e,t,0,0),r=Jf.distance(e,t,this.width,0),i=Jf.distance(e,t,0,this.height),o=Jf.distance(e,t,this.width,this.height);return Math.max(n,r,i,o)}},Qf.MAX_RADIUS=300,Qf.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=Jf.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?Jf.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(e+t),Qf.MAX_RADIUS)+5,r=1.1-n/Qf.MAX_RADIUS*.2,i=this.mouseInteractionSeconds/r,o=n*(1-Math.pow(80,-i));return Math.abs(o)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=.3*this.mouseUpElapsedSeconds,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,Qf.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,Qf.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new Zf(this.element)},draw:function(){var e,t,n;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,n=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+n+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+n+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=Jf.now(),this.center?(this.xStart=t,this.yStart=n,this.slideDistance=Jf.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=n,this.slideDistance=Jf.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){this.isMouseDown&&(this.mouseUpStart=Jf.now())},remove:function(){cu(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Tu({_template:gc($f()),is:"paper-ripple",behaviors:[Fp],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=cu(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e<this.ripples.length;++e)if(!this.ripples[e].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(e){this.noink||this.downAction(e)},downAction:function(e){this.holdDown&&this.ripples.length>0||(this.addRipple().downAction(e),this._animating||(this._animating=!0,this.animate()))},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var e=new Qf(this);return cu(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var e,t;for(e=0;e<this.ripples.length;++e)(t=this.ripples[e]).draw(),this.$.background.style.opacity=t.outerOpacity,t.isOpacityFullyDecayed&&!t.isRestingAtMaxRadius&&this.removeRipple(t);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()}},animateRipple:function(){return this.animate()},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(e,t){void 0!==t&&(e?this.downAction():this.upAction())}});
  933. /**
  934. @license
  935. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  936. This code may only be used under the BSD style license found at
  937. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  938. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  939. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  940. part of the polymer project is also subject to an additional IP rights grant
  941. found at http://polymer.github.io/PATENTS.txt
  942. */
  943. var eh={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Gf._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var t=this._rippleContainer||this.root;if(t&&cu(t).appendChild(this._ripple),e){var n=cu(this._rippleContainer||this),r=cu(e).rootTarget;n.deepContains(r)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}},th={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=eh._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},nh=[Xf,Wf,eh,th];
  944. /**
  945. @license
  946. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  947. This code may only be used under the BSD style license found at
  948. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  949. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  950. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  951. part of the polymer project is also subject to an additional IP rights grant
  952. found at http://polymer.github.io/PATENTS.txt
  953. */function rh(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
  954. /**
  955. @license
  956. Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
  957. This code may only be used under the BSD style license found at
  958. http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
  959. http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
  960. found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
  961. part of the polymer project is also subject to an additional IP rights grant
  962. found at http://polymer.github.io/PATENTS.txt
  963. */(['\n <style>\n :host {\n display: inline-block;\n position: relative;\n padding: 8px;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n z-index: 0;\n line-height: 1;\n\n width: 40px;\n height: 40px;\n\n /*\n NOTE: Both values are needed, since some phones require the value to\n be `transparent`.\n */\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n\n /* Because of polymer/2558, this style has lower specificity than * */\n box-sizing: border-box !important;\n\n @apply --paper-icon-button;\n }\n\n :host #ink {\n color: var(--paper-icon-button-ink-color, var(--primary-text-color));\n opacity: 0.6;\n }\n\n :host([disabled]) {\n color: var(--paper-icon-button-disabled-text, var(--disabled-text-color));\n pointer-events: none;\n cursor: auto;\n\n @apply --paper-icon-button-disabled;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:hover) {\n @apply --paper-icon-button-hover;\n }\n\n iron-icon {\n --iron-icon-width: 100%;\n --iron-icon-height: 100%;\n }\n </style>\n\n <iron-icon id="icon" src="[[src]]" icon="[[icon]]"\n alt$="[[alt]]"></iron-icon>\n '],['\n <style>\n :host {\n display: inline-block;\n position: relative;\n padding: 8px;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n cursor: pointer;\n z-index: 0;\n line-height: 1;\n\n width: 40px;\n height: 40px;\n\n /*\n NOTE: Both values are needed, since some phones require the value to\n be \\`transparent\\`.\n */\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-tap-highlight-color: transparent;\n\n /* Because of polymer/2558, this style has lower specificity than * */\n box-sizing: border-box !important;\n\n @apply --paper-icon-button;\n }\n\n :host #ink {\n color: var(--paper-icon-button-ink-color, var(--primary-text-color));\n opacity: 0.6;\n }\n\n :host([disabled]) {\n color: var(--paper-icon-button-disabled-text, var(--disabled-text-color));\n pointer-events: none;\n cursor: auto;\n\n @apply --paper-icon-button-disabled;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:hover) {\n @apply --paper-icon-button-hover;\n }\n\n iron-icon {\n --iron-icon-width: 100%;\n --iron-icon-height: 100%;\n }\n </style>\n\n <iron-icon id="icon" src="[[src]]" icon="[[icon]]"\n alt$="[[alt]]"></iron-icon>\n ']);return rh=function(){return e},e}function ih(e){return(ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oh(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style>\n :host { \n display: block;\n } \n button {\n width:130px;\n height: 130px;\n margin:20px;\n }\n button img {\n width:110px;\n height: 100px;\n }\n .cash-button {\n background-color: #3f51b5;\n }\n .credit-button {\n background-color: #3f51b5;\n }\n </style>\n <button @click="','">\n Cash\n <img class="cash-button" src="images/cash.png" >\n </button>\n <button @click="','">\n Credit\n <img class="credit-button" src="images/credit.png" >\n </button>\n <button @click="','">\n Pump Test\n <img class="credit-button" src="images/test.png" >\n </button> \n ']);return oh=function(){return e},e}function ah(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sh(e,t){return!t||"object"!==ih(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lh(e){return(lh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function uh(e,t){return(uh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}Tu({is:"paper-icon-button",_template:gc(rh()),hostAttributes:{role:"button",tabindex:"0"},behaviors:[nh],registered:function(){this._template.setAttribute("strip-whitespace","")},properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(e,t){var n=this.getAttribute("aria-label");n&&t!=n||this.setAttribute("aria-label",e)}});var ch=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),sh(this,lh(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uh(e,t)}(t,Vn(Ln)(Ne)),n=t,(r=[{key:"render",value:function(){var e=this;return $(oh(),function(){return e.cash()},function(){return e.credit()},function(){return e.test()})}},{key:"_menuButtonClicked",value:function(){document.getElementById("posmenu").toggle("open")}},{key:"cash",value:function(){var e=new CustomEvent("click-cash-event",{detail:{}});this.dispatchEvent(e)}},{key:"credit",value:function(){var e=new CustomEvent("click-credit-event",{detail:{}});this.dispatchEvent(e)}},{key:"test",value:function(){var e=new CustomEvent("click-test-event",{detail:{}});this.dispatchEvent(e)}}])&&ah(n.prototype,r),i&&ah(n,i),t}();function ph(e){return(ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fh(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n <style>\n :host {\n display: block;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n padding: 12px;\n background-color: #3f51b5;\n color: white;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n text-align: center;\n will-change: transform;\n transform: translate3d(0, -100%, 0);\n transition-property: visibility, transform;\n transition-duration: 0.2s;\n visibility: hidden;\n line-height: 1; \n z-index:1000;\n }\n :host([active]) {\n visibility: visible;\n transform: translate3d(0, 0, 0);\n }\n @media (min-width: 460px) {\n :host {\n width: 320px;\n margin: auto;\n }\n }\n </style>\n <slot></slot>\n "]);return fh=function(){return e},e}function hh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dh(e,t){return!t||"object"!==ph(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yh(e){return(yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vh(e,t){return(vh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}customElements.define("pos-buttons",ch);var mh=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),dh(this,yh(t).apply(this,arguments))}var n,r,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vh(e,t)}(t,Ne),n=t,i=[{key:"properties",get:function(){return{active:{type:Boolean}}}}],(r=[{key:"render",value:function(){return $(fh())}}])&&hh(n.prototype,r),i&&hh(n,i),t}();function bh(e){return(bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(){var e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style media="screen">\n :host{\n -webkit-user-select: none; /* Chrome all / Safari all */\n -moz-user-select: none; /* Firefox all */\n -ms-user-select: none; /* IE 10+ */\n user-select: none; /* Likely future */ \n }\n .input-layout {\n width: 100%;\n text-align: center;\n }\n \n .keyboard {\n display: inline-block;\n padding: 0.75em 1.5em;\n text-align: center;\n display: flex;\n }\n\n .item{\n width: 39em;\n }\n .number-panel{\n width: 10em;\n display: block;\n }\n .number-row {\n width: 10em;\n display: block;\n }\n .key{\n height: 3em;\n width: 3em;\n margin: 0.4em 0;\n }\n .number-key {\n width: 30px;\n height: 30px;\n border: solid 1px black;\n display: inline-block;\n }\n #text{\n width: 10em;\n height: 2em;\n }\n #task{\n width: 20em;\n height: 2em;\n }\n #space {\n width: 15em;\n height: 3em;\n }\n #back {\n font-weight: bold;\n height: 3em;\n width: 6em;\n }\n #enter{\n width: 5em;\n height: 5em;\n }\n label{\n margin-left: 1em;\n }\n .money{\n margin-left: 10px;\n }\n @media (max-width: 767px) {\n \n\n }\n </style>\n\n\n <div>\n <label>Passcode</label>\n <input type="password" id="task" autocomplete="off" value="','"\n @change="','" readonly="readonly">\n </div class="columns">\n <div class=" column">\n <div class="columns">\n <button class="key column" @tap="','"\n @touchstart="','">7</button>\n <button class="key column" @tap="','"\n @touchstart="','">8</button>\n <button class="key column" @tap="','"\n @touchstart="','">9</button>\n </div>\n <div class="columns">\n <button class="key column" @tap="','"\n @touchstart="','">4</button>\n <button class="key column" @tap="','"\n @touchstart="','">5</button>\n <button class="key column" @tap="','"\n @touchstart="','">6</button>\n </div>\n <div class="columns">\n <button class="key column" @tap="','"\n @touchstart="','">1</button>\n <button class="key column" @tap="','"\n @touchstart="','">2</button>\n <button class="key column" @tap="','"\n @touchstart="','">3</button>\n </div>\n <div class="columns">\n <button class="key column" @tap="','"\n @touchstart="','">0</button>\n <button class="key column" @tap="','"\n @touchstart="','">clear</button><br>\n </div>\n <div class="columns">\n <button id="enter" class="column" @tap="','"\n @touchstart="','">Enter</button><br>\n </div>\n </div>\n </div>\n ']);return _h=function(){return e},e}function gh(e,t){return!t||"object"!==bh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wh(e){return(wh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oh(e,t,n){return t&&kh(e.prototype,t),n&&kh(e,n),e}function xh(e,t){return(xh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}window.customElements.define("snack-bar",mh);var Sh=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=gh(this,wh(t).call(this))).task="",e.text="",e.isTouch=!1,e.activate=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xh(e,t)}(t,Vn(Ln)(Ne)),Oh(t,null,[{key:"properties",get:function(){return{task:{type:String},text:{type:String},isTouch:{type:Boolean}}}}]),Oh(t,[{key:"render",value:function(){var e=this;return $(_h(),this.task||"",this.updateTask,function(){return e.addToKey("7")},function(){return e.addToKey("7",!0)},function(){return e.addToKey("8")},function(){return e.addToKey("8",!0)},function(){return e.addToKey("9")},function(){return e.addToKey("9",!0)},function(){return e.addToKey("4")},function(){return e.addToKey("4",!0)},function(){return e.addToKey("5")},function(){return e.addToKey("5",!0)},function(){return e.addToKey("6")},function(){return e.addToKey("6",!0)},function(){return e.addToKey("1")},function(){return e.addToKey("1",!0)},function(){return e.addToKey("2")},function(){return e.addToKey("2",!0)},function(){return e.addToKey("3")},function(){return e.addToKey("3",!0)},function(){return e.addToKey("0")},function(){return e.addToKey("0",!0)},function(){return e.addToClear()},function(){return e.addToClear(!0)},function(){return e.addToEnter()},function(){return e.addToEnter(!0)})}},{key:"addToKey",value:function(e,t){t&&(this.isTouch=t),this.isTouch&&!t||(this.task+=e)}},{key:"addToEnter",value:function(e){if(e&&(this.isTouch=e),!this.isTouch||e){this.text=this.task;var t=new CustomEvent("click-enter-event",{detail:{passcode:this.task}});this.dispatchEvent(t),this.task=""}}},{key:"addToBack",value:function(e){e&&(this.isTouch=e),this.isTouch&&!e||(this.task=this.shadowRoot.getElementById("task").value.replace(/.$/,""))}},{key:"addToClear",value:function(e){e&&(this.isTouch=e),this.isTouch&&!e||(this.task="")}},{key:"showModal",value:function(){this.shadowRoot.getElementById("actions").open()}},{key:"closeModel",value:function(e){e&&(this.isTouch=e),this.isTouch}},{key:"updateTask",value:function(e){this.task=e.target.value}},{key:"addToCarNo",value:function(){this.text="",this.task=""}}]),t}();customElements.define("pos-passcode",Sh);function Ph(e){return(Ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ch(){var e=jh(["\n <tr>\n <td>","</td>\n <td>","</td> \n \n "]);return Ch=function(){return e},e}function Eh(){var e=jh([' \n <a class="button has-text-link" @click="','">\n <strong>Login</strong>\n </a>\n ']);return Eh=function(){return e},e}function Th(){var e=jh(['\n <a class="button has-text-link" @click="','">\n <strong>Logout</strong>\n </a>']);return Th=function(){return e},e}function Ah(){var e=jh(['\n <link rel="stylesheet" href="node_modules/bulma/css/bulma.css">\n <style>\n :host { \n display: block;\n -webkit-user-select: none; /* Chrome all / Safari all */\n -moz-user-select: none; /* Firefox all */\n -ms-user-select: none; /* IE 10+ */\n user-select: none; /* Likely future */ \n background-color:darkgray;\n }\n .logo {\n width: 50px;\n height: 50px !important;\n max-height: 50px !important;\n } \n pos-buttons {\n padding:10px;\n }\n sale-list {\n width:700px;\n padding:10px;\n }\n input-element {\n padding:10px;\n width:600px;\n }\n .title-text {\n color:#3f51b5;\n }\n .confirmButton{\n width: 257px;\n margin-left: 66px;\n }\n </style>\n\n<nav class="navbar title-bar" role="navigation" aria-label="main navigation">\n <div class="navbar-brand">\n <div class="navbar-item">\n <img class="logo" src="images/forward-96x96.png" >\n </div>\n\n <div class="navbar-item">\n <span class="title is-6 title-text">\n ','<span class="is-size-7">(',')</span>\n </span>\n </div> \n\n <div class="navbar-item navbar-end has-text-centered" style="width:100%;">\n <span class="title is-4">\n ','\n </span>\n </div> \n\n <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample">\n <span aria-hidden="true"></span>\n <span aria-hidden="true"></span>\n <span aria-hidden="true"></span>\n </a>\n </div>\n\n <div class="navbar-menu">\n <div class="navbar-end">\n <div class="navbar-item has-text-weight-bold has-text-link" @click="','">\n ','\n </div>\n <div class="navbar-item">\n <div class="navbar-item has-dropdown is-hoverable">\n <a class="navbar-link">\n More\n </a>\n <div class="navbar-dropdown">\n <a class="navbar-item" @click="','">\n Old Receipts\n </a>\n <a class="navbar-item" @click="','">\n Close All Pumps\n </a>\n <a class="navbar-item" @click="','">\n Open All Pumps\n </a>\n </div>\n </div>\n </div>\n <div class="navbar-item">\n <div class="buttons">\n ','\n </div> \n </div>\n </div>\n </div>\n</nav>\n<table>\n <tr>\n <td colspan="2" style="border:solid 1px black"><pump-list></pump-list></td>\n </tr>\n</table>\n\n<table>\n <tr><td>\n <sale-list></sale-list>\n </td>\n <td>\n <table>\n <tr><td>\n <input-element id="car-plate-input" @click-enter-event="','">Car Plate Number:</input-element> \n </td></tr>\n <tr><td>\n <pos-buttons @click-cash-event="','"\n @click-credit-event="','"\n @click-test-event="','"></pos-buttons>\n <tr><td>\n </table>\n </td></tr>\n </table>\n\n<paper-dialog id="customerDialog" style="width:300px;" modal>\n<table class="table" style="margin-left: 42px;">\n <thead>\n <tr>\n <th>Customer</th>\n <th>Car Plate</th>\n </tr>\n </thead>\n <tbody>\n\n ','\n </tbody>\n</table>\n<div class="has-text-centered">\n <a class="button is-medium is-link is-outlined" @click="','">Ok</a>\n <a class="button is-medium is-link is-outlined" @click="','">Cancel</a>\n</div> \n</paper-dialog>\n\n\n<paper-dialog id="passcodeDialog">\n <pos-passcode @click-enter-event="','"></pos-passcode>\n</paper-dialog>\n\n<paper-dialog id="receiptsDialog" style="width:1100px;height:800px;">\n <old-receipts></old-receipts>\n</paper-dialog>\n\n\n\n<paper-dialog id="confirmDialog" style="width:500px;height:200px;">\n <div class="container" style="padding: 10px;width:450px;">\n <div class="notification" >\n <h2 class="is-size-5">Successfully clear transactions.</h2>\n <h2 class="is-size-5">Print receipt?</h2>\n </div>\n\n <div class="confirmButton level">\n <a class="button is-medium is-link is-outlined level-item" style="margin: 10px;" @click="','">Yes</a>\n <a class="button is-medium is-danger is-outlined level-item" @click="','">No</a>\n </div>\n </div>\n</paper-dialog>\n\n<paper-dialog id="profile" style="width:475px;border-radius: 6px;">\n <user-profile></user-profile>\n</paper-dialog>\n\n\n<snack-bar ?active="','">',".</snack-bar>\n\n\n"]);return Ah=function(){return e},e}function jh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Nh(e,t){return!t||"object"!==Ph(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rh(e){return(Rh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ih(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zh(e,t,n){return t&&Ih(e.prototype,t),n&&Ih(e,n),e}function Lh(e,t){return(Lh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Mh=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Nh(this,Rh(t).call(this)))._isLogin=!1,e.car="-",e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lh(e,t)}(t,Vn(Ln)(Ne)),zh(t,[{key:"render",value:function(){var e=this,t=this._user;return $(Ah(),"Forward POS","v0.1.7",null!=this.station?this.station.name:"",function(){e.userProfile()},this._isLogin?t.name:"",function(){e.openDialog()},function(){return e.closeAllFp()},function(){return e.openAllFp()},this._isLogin?$(Th(),function(){return e.logout()}):$(Eh(),function(){return e.showPasscode()}),function(t){e.enterCar(t)},function(t){e.cash(t)},function(t){e.credit(t)},function(t){e.test(t)},this.customer?$(Ch(),this.customer.name,this.car):null,function(){return e.clickCreditTran()},function(){return e.clickCreditCancel()},function(t){e.enterPress(t)},function(){return e.confirmPrintReceipt()},function(){return e.cancelPrint()},this._snackbarOpened,this._msg)}}],[{key:"properties",get:function(){return{appTitle:{type:String},_snackbarOpened:{type:Boolean},_msg:{type:String},_offline:{type:Boolean},_isLogin:{type:Boolean},_user:{type:Object},_tranCount:{type:Number},station:{type:Object},car:{type:String},host:{type:String},port:{type:String},customer:{type:Object},_printData:{type:Object}}}}]),zh(t,[{key:"stateChanged",value:function(e){this.station=e.app.station,this._snackbarOpened=e.app.snackbarOpened,this._msg=e.app.msg,this._isLogin=e.app.isLogin,this._user=e.app.user,this._trans=e.transactions.trans,this.customer=e.app.customer,this._isLogin&&(nn(this._user),this.shadowRoot.getElementById("passcodeDialog").close()),e.app.customerDialog?this.shadowRoot.getElementById("customerDialog").open():null!=this.shadowRoot.getElementById("customerDialog")&&this.shadowRoot.getElementById("customerDialog").close(),this._tranCount=Sn(e),this._printData=e.pumps.printData,e.pumps.receiptDialog?this.shadowRoot.getElementById("confirmDialog").open():null!=this.shadowRoot.getElementById("confirmDialog")&&this.shadowRoot.getElementById("confirmDialog").close()}},{key:"firstUpdated",value:function(){var e;Ln.dispatch(function(e){var t=window.hostUrl+"/api/pos/station";fetch(t,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(t){"Ok"==t.status?e({type:"STATION",station:t.data}):e(Qt("Station not found"))}).catch(function(t){return e(Qt("Unable to get station"))})}),e=function(e){return Ln.dispatch(function(e){return function(t,n){e!==n().app.offline&&t(Qt("You are now "+(e?"offline":"online"))),1==e?console.log("offline"):pn(t,n),t({type:"UPDATE_OFFLINE",offline:e})}}(e))},window.addEventListener("online",function(){return e(!1)}),window.addEventListener("offline",function(){return e(!0)}),e(!1===navigator.onLine),this.car="";var t,n=(t="",""==(t="undefined"!=typeof Android&&Android&&null!==Android?Android.getData():localStorage.getItem("data"))?null:JSON.parse(t));"undefined"!=n&&null!=n&&Ln.dispatch(Zt(n.passcode))}},{key:"_menuButtonClicked",value:function(){document.getElementById("posmenu").toggle("open")}},{key:"showPasscode",value:function(){this.shadowRoot.getElementById("passcodeDialog").open()}},{key:"logout",value:function(){var e=this;Object.keys(this._trans).map(function(t){var n=e._trans[t];Ln.dispatch(sn(n.FpId,n.TranSeq))}),Ln.dispatch(function(e,t){e({type:"LOGOUT"})}),nn(null)}},{key:"enterPress",value:function(e){Ln.dispatch(Zt(e.detail.passcode))}},{key:"cash",value:function(){var e;this._tranCount<=0?Ln.dispatch(Qt("No transaction to clear")):(Ln.dispatch((e=this.car,function(t,n){var r=n();if(r.app.isLogin){""==e&&(e="-");var i=encodeURIComponent(btoa(e)),o=window.hostUrl+"/api/pos/clearTran/cash/"+r.app.user.id+"/"+i;fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(e){"Ok"==e.status?(t(vn()),t({type:"PRINT_RECEIPT",receiptData:e.data}),t({type:"OPEN_PRINT_RECEIPT_DIALOG"}),t(Qt("Successfully clear transactions "))):t(Qt("Error: "+e.message))}).catch(function(e){return t(Qt("Error:"+e.message))})}else t(Qt("Error: No login"))})),this.shadowRoot.getElementById("car-plate-input").clear(),this.car="")}},{key:"credit",value:function(){var e;this._tranCount<=0?Ln.dispatch(Qt("No transaction to clear")):""!=this.car?Ln.dispatch((e=this.car,function(t){var n=encodeURIComponent(btoa(e)),r=window.hostUrl+"/api/pos/customer/"+n;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(e){"Ok"==e.status?(t({type:"CREDIT_CUSTOMER",customer:e.data}),t({type:"OPEN_CUSTOMER_DIALOG"})):t(Qt("Unable to find customer"))}).catch(function(e){return t(Qt("Unable to login"))})})):Ln.dispatch(Qt("Please input car number"))}},{key:"enterCar",value:function(e){e.detail.value?this.car=e.detail.value:this.car=""}},{key:"openDialog",value:function(){Ln.dispatch(function(e){var t=window.hostUrl+"/api/pos/oldreceipt";fetch(t,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(t){return e({type:"RECEIVE_OLD_TRANS",data:t})})}),this.shadowRoot.getElementById("receiptsDialog").open()}},{key:"closeAllFp",value:function(){Ln.dispatch(function(e,t){if(t().app.isLogin){var n=window.hostUrl+"/api/pos/allclose";fetch(n,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){return e(Qt("Successfully all close pump "))}).catch(function(){return e(Qt("Error all close pump "))})}else e(Qt("Error: No login"))})}},{key:"openAllFp",value:function(){Ln.dispatch(function(e,t){if(t().app.isLogin){var n=window.hostUrl+"/api/pos/allopen";fetch(n,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(){return e(Qt("Successfully all open pump "))}).catch(function(){return e(Qt("Error all open pump "))})}else e(Qt("Error: No login"))})}},{key:"clickCreditTran",value:function(){var e;Ln.dispatch((e=this.car,function(t,n){var r=n();if(r.app.isLogin){var i=encodeURIComponent(btoa(e)),o=window.hostUrl+"/api/pos/clearTran/credit/"+r.app.user.id+"/"+i;fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(e){"Ok"==e.status?(t(vn()),en(e.data),t(Qt("Successfully clear transactions "))):t(Qt("Errors: "+e.message))}).catch(function(e){return t(Qt("Error:"+e.message))})}else t(Qt("Error: No login"))})),this.shadowRoot.getElementById("car-plate-input").clear(),Ln.dispatch(function(e){e({type:"CLOSE_CUSTOMER_DIALOG"})})}},{key:"clickCreditCancel",value:function(){Ln.dispatch(function(e){e({type:"CLOSE_CUSTOMER_DIALOG"})})}},{key:"test",value:function(){this._tranCount<=0?Ln.dispatch(Qt("No transaction to clear")):Ln.dispatch(function(e,t){var n=t();if(n.app.isLogin)if("supervisor"==n.app.user.role||"super"==n.app.user.role){var r=window.hostUrl+"/api/pos/clearTran/test/"+n.app.user.id;fetch(r,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"GET"}).then(function(e){return e.json()}).then(function(t){"Ok"==t.status&&(e(vn()),en(t.data)),e(Qt("Successfully clear transactions "))}).catch(function(t){return e(Qt("Error:"+t.message))})}else e(Qt("Error: Unauthorized"));else e(Qt("Error: No login"))})}},{key:"userProfile",value:function(){this.shadowRoot.getElementById("profile").open()}},{key:"confirmPrintReceipt",value:function(){en(this._printData),Ln.dispatch(function(e){e({type:"CLOSE_PRINT_RECEIPT_DIALOG"})})}},{key:"cancelPrint",value:function(){Ln.dispatch(function(e){e({type:"CLOSE_PRINT_RECEIPT_DIALOG"})})}}]),t}();customElements.define("pos-app",Mh)}]);