@teipublisher/pb-components 2.25.2 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +3 -3
- package/.github/workflows/node.js.yml +2 -2
- package/.github/workflows/release.js.yml +3 -2
- package/.releaserc.json +1 -1
- package/CHANGELOG.md +21 -0
- package/css/pb-styles.css +51 -0
- package/dist/demo/demos.json +3 -0
- package/dist/demo/pb-dialog.html +28 -0
- package/dist/demo/pb-i18n.html +29 -29
- package/dist/demo/pb-login.html +2 -0
- package/dist/{es-global-bridge-4240f389.js → es-global-bridge-d8ce175d.js} +1 -1
- package/dist/{iron-form-a25b58de.js → iron-form-7b5c5d03.js} +1 -1
- package/dist/jinn-codemirror-da0e2d1f.js +1 -0
- package/dist/{paper-checkbox-c9177e35.js → paper-checkbox-4f410b1f.js} +33 -32
- package/dist/{paper-icon-button-c15eb1cf.js → paper-icon-button-0fb125c4.js} +4 -4
- package/dist/{paper-listbox-1fc346ac.js → paper-listbox-5f42cff5.js} +1 -1
- package/dist/pb-code-editor.js +3 -3
- package/dist/pb-component-docs.js +19 -8
- package/dist/pb-components-bundle.js +145 -171
- package/dist/pb-edit-app.js +5 -5
- package/dist/pb-elements.json +137 -27
- package/dist/{pb-i18n-b62828ba.js → pb-i18n-0611135a.js} +1 -1
- package/dist/pb-leaflet-map.js +1 -1
- package/dist/pb-mei.js +6 -6
- package/dist/pb-odd-editor.js +32 -32
- package/dist/pb-tify.js +3 -3
- package/dist/{vaadin-element-mixin-96dff806.js → vaadin-element-mixin-859a0132.js} +38 -29
- package/package.json +5 -5
- package/pb-elements.json +137 -27
- package/src/assets/pb-styles.css +51 -0
- package/src/pb-dialog.js +78 -0
- package/src/pb-lang.js +18 -33
- package/src/pb-light-dom.js +40 -0
- package/src/pb-login.js +52 -76
- package/src/pb-navigation.js +15 -2
- package/src/pb-timeline.js +1 -1
- package/dist/jinn-codemirror-63cf45e9.js +0 -1
- /package/dist/{pb-mixin-e1183270.js → pb-mixin-b1caa22e.js} +0 -0
|
@@ -25,7 +25,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
25
25
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
26
26
|
Code distributed by Google as part of the polymer project is also
|
|
27
27
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
28
|
-
*/function N(e,t){return e?("string"==typeof e&&(e=a(e)),t&&M(e,t),p(e,s)):""}function I(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=a(e.textContent)),e.__cssRules||null}function M(e,t,i,n){if(!e)return;let r=!1,s=e.type;if(n&&s===y.MEDIA_RULE){let t=e.selector.match(k);t&&(window.matchMedia(t[1]).matches||(r=!0))}s===y.STYLE_RULE?t(e):i&&s===y.KEYFRAMES_RULE?i(e):s===y.MIXIN_RULE&&(r=!0);let o=e.rules;if(o&&!r)for(let e,r=0,s=o.length;r<s&&(e=o[r]);r++)M(e,t,i,n)}function D(e,t){let i=0;for(let n=t,r=e.length;n<r;n++)if("("===e[n])i++;else if(")"===e[n]&&0==--i)return n;return-1}function R(e,t){let i=e.indexOf("var(");if(-1===i)return t(e,"","","");let n=D(e,i+3),r=e.substring(i+4,n),s=e.substring(0,i),o=R(e.substring(n+1),t),a=r.indexOf(",");return-1===a?t(s,r.trim(),"",o):t(s,r.substring(0,a).trim(),r.substring(a+1).trim(),o)}
|
|
28
|
+
*/function N(e,t){return e?("string"==typeof e&&(e=a(e)),t&&M(e,t),p(e,s)):""}function I(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=a(e.textContent)),e.__cssRules||null}function M(e,t,i,n){if(!e)return;let r=!1,s=e.type;if(n&&s===y.MEDIA_RULE){let t=e.selector.match(k);t&&(window.matchMedia(t[1]).matches||(r=!0))}s===y.STYLE_RULE?t(e):i&&s===y.KEYFRAMES_RULE?i(e):s===y.MIXIN_RULE&&(r=!0);let o=e.rules;if(o&&!r)for(let e,r=0,s=o.length;r<s&&(e=o[r]);r++)M(e,t,i,n)}function D(e,t){let i=0;for(let n=t,r=e.length;n<r;n++)if("("===e[n])i++;else if(")"===e[n]&&0==--i)return n;return-1}function R(e,t){let i=e.indexOf("var(");if(-1===i)return t(e,"","","");let n=D(e,i+3),r=e.substring(i+4,n),s=e.substring(0,i),o=R(e.substring(n+1),t),a=r.indexOf(",");return-1===a?t(s,r.trim(),"",o):t(s,r.substring(0,a).trim(),r.substring(a+1).trim(),o)}function L(e){let t=e.localName,i="",n="";return t?t.indexOf("-")>-1?i=t:(n=t,i=e.getAttribute&&e.getAttribute("is")||""):(i=e.is,n=e.extends),{is:i,typeExtension:n}}function F(t){const i=[],n=t.querySelectorAll("style");for(let t=0;t<n.length;t++){const r=n[t];O(r)?e||(T(r),r.parentNode.removeChild(r)):(i.push(r.textContent),r.parentNode.removeChild(r))}return i.join("").trim()}window.ShadyDOM&&window.ShadyDOM.wrap;const B="css-build";function H(e){if(void 0!==i)return i;if(void 0===e.__cssBuild){const t=e.getAttribute(B);if(t)e.__cssBuild=t;else{const t=j(e);""!==t&&U(e),e.__cssBuild=t}}return e.__cssBuild||""}function z(e){return""!==H(e)}function j(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;if(t instanceof Comment){const e=t.textContent.trim().split(":");if(e[0]===B)return e[1]}return""}function U(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)}
|
|
29
29
|
/**
|
|
30
30
|
@license
|
|
31
31
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -119,7 +119,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
119
119
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
120
120
|
Code distributed by Google as part of the polymer project is also
|
|
121
121
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
122
|
-
*/const Ee=!window.ShadyDOM||!window.ShadyDOM.inUse
|
|
122
|
+
*/const Ee=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const Ae=Ee&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const e=new CSSStyleSheet;e.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})();let Te=window.Polymer&&window.Polymer.rootPath||ke(document.baseURI||window.location.href),Oe=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Ne=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,Ie=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Me=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,De=window.Polymer&&window.Polymer.legacyOptimizations||!1,Re=window.Polymer&&window.Polymer.legacyWarnings||!1,Le=window.Polymer&&window.Polymer.syncInitialRender||!1,Fe=window.Polymer&&window.Polymer.legacyUndefined||!1,Be=window.Polymer&&window.Polymer.orderedComputed||!1,He=window.Polymer&&window.Polymer.removeNestedTemplates||!1,ze=window.Polymer&&window.Polymer.fastDomIf||!1,je=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Ue=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,Ke=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,qe=0;const $e=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let i=qe++;function n(n){let r=n.__mixinSet;if(r&&r[i])return n;let s=t,o=s.get(n);if(!o){o=e(n),s.set(n,o);let t=Object.create(o.__mixinSet||r||null);t[i]=!0,o.__mixinSet=t}return o}return n};
|
|
123
123
|
/**
|
|
124
124
|
@license
|
|
125
125
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -328,7 +328,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
328
328
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
329
329
|
* Google as part of the polymer project is also subject to an additional IP
|
|
330
330
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
331
|
-
*/const os="disable-upgrade",as=e=>{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]}
|
|
331
|
+
*/const os="disable-upgrade",as=e=>{for(;e;){const t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]};$e(e=>{const t=sn(e);let i=as(t);class n extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return i.call(this).concat(os)}_initializeProperties(){this.hasAttribute(os)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}attributeChangedCallback(e,t,i,n){e==os?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,pt(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(e,t,i,n)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}return n});
|
|
332
332
|
/**
|
|
333
333
|
@license
|
|
334
334
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -337,7 +337,8 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
337
337
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
338
338
|
Code distributed by Google as part of the polymer project is also
|
|
339
339
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
340
|
-
*/
|
|
340
|
+
*/
|
|
341
|
+
const ls="disable-upgrade";let cs=window.ShadyCSS;const ds=$e(e=>{const t=ar(sn(e)),i=rn?t:wr(t),n=as(i),r={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class s extends i{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(e,t,i){(this.__dataAttributes&&this.__dataAttributes[e]||e===ls)&&this.attributeChangedCallback(e,t,i,null)}setAttribute(e,t){if(Ue&&!this._legacyForceObservedAttributes){const i=this.getAttribute(e);super.setAttribute(e,t),this.__attributeReaction(e,i,String(t))}else super.setAttribute(e,t)}removeAttribute(e){if(Ue&&!this._legacyForceObservedAttributes){const t=this.getAttribute(e);super.removeAttribute(e),this.__attributeReaction(e,t,null)}else super.removeAttribute(e)}static get observedAttributes(){return Ue&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],Qi(this.prototype)),this.__observedAttributes):n.call(this).concat(ls)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(e){return super._canApplyPropertyDefault(e)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(e))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(e,t,i,n){t!==i&&(e==ls?this.__isUpgradeDisabled&&null==i&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,pt(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(e,t,i,n),this.attributeChanged(e,t,i)))}attributeChanged(e,t,i){}_initializeProperties(){if(De&&this.hasAttribute(ls))this.__isUpgradeDisabled=!0;else{let e=Object.getPrototypeOf(this);e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))||(this._registered(),e.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),Ue&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const e=this.attributes;for(let t=0,i=e.length;t<i;t++){const i=e[t];this.__attributeReaction(i.name,null,i.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(e){return this._serializeValue(e)}deserialize(e,t){return this._deserializeValue(e,t)}reflectPropertyToAttribute(e,t,i){this._propertyToAttribute(e,t,i)}serializeValueToAttribute(e,t,i){this._valueToNodeAttribute(i||this,e,t)}extend(e,t){if(!e||!t)return e||t;let i=Object.getOwnPropertyNames(t);for(let n,r=0;r<i.length&&(n=i[r]);r++){let i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}return e}mixin(e,t){for(let i in t)e[i]=t[i];return e}chainObject(e,t){return e&&t&&e!==t&&(e.__proto__=t),e}instanceTemplate(e){let t=this.constructor._contentForTemplate(e);return document.importNode(t,!0)}fire(e,t,i){i=i||{},t=null==t?{}:t;let n=new Event(e,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});n.detail=t;let r=i.node||this;return pt(r).dispatchEvent(n),n}listen(e,t,i){e=e||this;let n=this.__boundListeners||(this.__boundListeners=new WeakMap),r=n.get(e);r||(r={},n.set(e,r));let s=t+i;r[s]||(r[s]=this._addMethodEventListenerToNode(e,t,i,this))}unlisten(e,t,i){e=e||this;let n=this.__boundListeners&&this.__boundListeners.get(e),r=t+i,s=n&&n[r];s&&(this._removeEventListenerFromNode(e,t,s),n[r]=null)}setScrollDirection(e,t){Zn(t||this,r[e]||"auto")}$$(e){return this.root.querySelector(e)}get domHost(){let e=pt(this).getRootNode();return e instanceof DocumentFragment?e.host:e}distributeContent(){const e=ts(this);window.ShadyDOM&&e.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return ts(this).getEffectiveChildNodes()}queryDistributedElements(e){return ts(this).queryDistributedElements(e)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let e=this.getEffectiveChildNodes(),t=[];for(let i,n=0;i=e[n];n++)i.nodeType!==Node.COMMENT_NODE&&t.push(i.textContent);return t.join("")}queryEffectiveChildren(e){let t=this.queryDistributedElements(e);return t&&t[0]}queryAllEffectiveChildren(e){return this.queryDistributedElements(e)}getContentChildNodes(e){let t=this.root.querySelector(e||"slot");return t?ts(t).getDistributedNodes():[]}getContentChildren(e){return this.getContentChildNodes(e).filter((function(e){return e.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(e){const t=this;return t!==e&&pt(t).contains(e)&&pt(t).getRootNode()===pt(e).getRootNode()}isLocalDescendant(e){return this.root===pt(e).getRootNode()}scopeSubtree(e,t=!1){return ss(e,t)}getComputedStyleValue(e){return cs.getComputedStyleValue(this,e)}debounce(e,t,i){return this._debouncers=this._debouncers||{},this._debouncers[e]=on.debounce(this._debouncers[e],i>0?Rt.after(i):Bt,t.bind(this))}isDebouncerActive(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];return!(!t||!t.isActive())}flushDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.flush()}cancelDebouncer(e){this._debouncers=this._debouncers||{};let t=this._debouncers[e];t&&t.cancel()}async(e,t){return t>0?Rt.run(e.bind(this),t):~Bt.run(e.bind(this))}cancelAsync(e){e<0?Bt.cancel(~e):Rt.cancel(e)}create(e,t){let i=document.createElement(e);if(t)if(i.setProperties)i.setProperties(t);else for(let e in t)i[e]=t[e];return i}elementMatches(e,t){return Jr(t||this,e)}toggleAttribute(e,t){let i=this;return 3===arguments.length&&(i=arguments[2]),1==arguments.length&&(t=!i.hasAttribute(e)),t?(pt(i).setAttribute(e,""),!0):(pt(i).removeAttribute(e),!1)}toggleClass(e,t,i){i=i||this,1==arguments.length&&(t=!i.classList.contains(e)),t?i.classList.add(e):i.classList.remove(e)}transform(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}translate3d(e,t,i,n){n=n||this,this.transform("translate3d("+e+","+t+","+i+")",n)}arrayDelete(e,t){let i;if(Array.isArray(e)){if(i=e.indexOf(t),i>=0)return e.splice(i,1)}else{if(i=wt(this,e).indexOf(t),i>=0)return this.splice(e,i,1)}return null}_logger(e,t){switch(Array.isArray(t)&&1===t.length&&Array.isArray(t[0])&&(t=t[0]),e){case"log":case"warn":case"error":console[e](...t)}}_log(...e){this._logger("log",e)}_warn(...e){this._logger("warn",e)}_error(...e){this._logger("error",e)}_logf(e,...t){return["[%s::%s]",this.is,e,...t]}}return s.prototype.is="",s}),hs={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},ps={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},us=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},ps);
|
|
341
342
|
/**
|
|
342
343
|
@license
|
|
343
344
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -346,7 +347,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
346
347
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
347
348
|
Code distributed by Google as part of the polymer project is also
|
|
348
349
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
349
|
-
*/
|
|
350
|
+
*/function _s(e,t,i){const n=e._noAccessors,r=Object.getOwnPropertyNames(e);for(let s=0;s<r.length;s++){let o=r[s];if(!(o in i))if(n)t[o]=e[o];else{let i=Object.getOwnPropertyDescriptor(e,o);i&&(i.configurable=!0,Object.defineProperty(t,o,i))}}}function fs(e,t){return ws({},ds(t),e)}function ms(e,t,i){for(let n=0;n<t.length;n++)ys(e,t[n],i,us)}function ys(e,t,i,n){_s(t,e,n);for(let e in hs)t[e]&&(i[e]=i[e]||[],i[e].push(t[e]))}function gs(e,t,i){t=t||[];for(let n=e.length-1;n>=0;n--){let r=e[n];r?Array.isArray(r)?gs(r,t):t.indexOf(r)<0&&(!i||i.indexOf(r)<0)&&t.unshift(r):console.warn("behavior is null, check for missing or 404 import")}return t}function bs(e,t){for(const i in t){const n=e[i],r=t[i];e[i]=!("value"in r)&&n&&"value"in n?Object.assign({value:n.value},r):r}}const vs=ds(HTMLElement);function ws(e,t,i){let n;const r={};class s extends t{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(n)for(let e,t=0;t<n.length;t++)e=n[t],e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties);e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties),this._prepareTemplate()}else t._finalizeClass.call(this)}static get properties(){const t={};if(n)for(let e=0;e<n.length;e++)bs(t,n[e].properties);return bs(t,e.properties),t}static get observers(){let t=[];if(n)for(let e,i=0;i<n.length;i++)e=n[i],e.observers&&(t=t.concat(e.observers));return e.observers&&(t=t.concat(e.observers)),t}created(){super.created();const e=r.created;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}_registered(){const e=s.prototype;if(!e.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",e))){e.__hasRegisterFinished=!0,super._registered(),De&&o(e);const t=Object.getPrototypeOf(this);let i=r.beforeRegister;if(i)for(let e=0;e<i.length;e++)i[e].call(t);if(i=r.registered,i)for(let e=0;e<i.length;e++)i[e].call(t)}}_applyListeners(){super._applyListeners();const e=r.listeners;if(e)for(let t=0;t<e.length;t++){const i=e[t];if(i)for(let e in i)this._addMethodEventListenerToNode(this,e,i[e])}}_ensureAttributes(){const e=r.hostAttributes;if(e)for(let t=e.length-1;t>=0;t--){const i=e[t];for(let e in i)this._ensureAttribute(e,i[e])}super._ensureAttributes()}ready(){super.ready();let e=r.ready;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attached(){super.attached();let e=r.attached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}detached(){super.detached();let e=r.detached;if(e)for(let t=0;t<e.length;t++)e[t].call(this)}attributeChanged(e,t,i){super.attributeChanged();let n=r.attributeChanged;if(n)for(let r=0;r<n.length;r++)n[r].call(this,e,t,i)}}if(i){Array.isArray(i)||(i=[i]);let e=t.prototype.behaviors;n=gs(i,null,e),s.prototype.behaviors=e?e.concat(i):n}const o=t=>{n&&ms(t,n,r),ys(t,e,r,ps)};return De||o(s.prototype),s.generatedFrom=e,s}const Cs=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let i=t?t(vs):vs;return i=ws(e,i,e.behaviors),i.is=i.prototype.is=e.is,i},Ps=function(e){let t;return t="function"==typeof e?e:Ps.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};
|
|
350
351
|
/**
|
|
351
352
|
@license
|
|
352
353
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -356,7 +357,6 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
356
357
|
Code distributed by Google as part of the polymer project is also
|
|
357
358
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
358
359
|
*/
|
|
359
|
-
function Ss(e,t,i,n,r){let s;r&&(s="object"==typeof i&&null!==i,s&&(n=e.__dataTemp[t]));let o=n!==i&&(n==n||i==i);return s&&o&&(e.__dataTemp[t]=i),o}Ps.Class=Cs;const xs=$e(e=>{class t extends e{_shouldPropertyChange(e,t,i){return Ss(this,e,t,i,!0)}}return t}),ks=$e(e=>{class t extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,i){return Ss(this,e,t,i,this.mutableData)}}return t});xs._mutablePropertyChange=Ss;
|
|
360
360
|
/**
|
|
361
361
|
@license
|
|
362
362
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -366,7 +366,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
366
366
|
Code distributed by Google as part of the polymer project is also
|
|
367
367
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
368
368
|
*/
|
|
369
|
-
|
|
369
|
+
function Ss(e,t,i,n,r){let s;r&&(s="object"==typeof i&&null!==i,s&&(n=e.__dataTemp[t]));let o=n!==i&&(n==n||i==i);return s&&o&&(e.__dataTemp[t]=i),o}Ps.Class=Cs;const xs=$e(e=>{class t extends e{_shouldPropertyChange(e,t,i){return Ss(this,e,t,i,!0)}}return t}),ks=$e(e=>{class t extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(e,t,i){return Ss(this,e,t,i,this.mutableData)}}return t});xs._mutablePropertyChange=Ss;
|
|
370
370
|
/**
|
|
371
371
|
@license
|
|
372
372
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -375,7 +375,8 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
375
375
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
376
376
|
Code distributed by Google as part of the polymer project is also
|
|
377
377
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
378
|
-
*/
|
|
378
|
+
*/
|
|
379
|
+
let Es=null;function As(){return Es}As.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:As,writable:!0}});const Ts=Gi(As),Os=xs(Ts);function Ns(e,t){Es=e,Object.setPrototypeOf(e,t.prototype),new t,Es=null}const Is=Gi(class{});function Ms(e,t){for(let i=0;i<t.length;i++){let n=t[i];if(Boolean(e)!=Boolean(n.__hideTemplateChildren__))if(n.nodeType===Node.TEXT_NODE)e?(n.__polymerTextContent__=n.textContent,n.textContent=""):n.textContent=n.__polymerTextContent__;else if("slot"===n.localName)if(e)n.__polymerReplaced__=document.createComment("hidden-slot"),pt(pt(n).parentNode).replaceChild(n.__polymerReplaced__,n);else{const e=n.__polymerReplaced__;e&&pt(pt(e).parentNode).replaceChild(n,e)}else n.style&&(e?(n.__polymerDisplay__=n.style.display,n.style.display="none"):n.style.display=n.__polymerDisplay__);n.__hideTemplateChildren__=e,n._showHideChildren&&n._showHideChildren(e)}}class Ds extends Is{constructor(e){super(),this._configureProperties(e),this.root=this._stampTemplate(this.__dataHost);let t=[];this.children=t;for(let e=this.root.firstChild;e;e=e.nextSibling)t.push(e),e.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(e&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(e){if(this.__templatizeOptions.forwardHostProp)for(let e in this.__hostProps)this._setPendingProperty(e,this.__dataHost["_host_"+e]);for(let t in e)this._setPendingProperty(t,e[t])}forwardHostProp(e,t){this._setPendingPropertyOrPath(e,t,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(e,t,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(e,t,e=>{e.model=this,i(e)});else{let n=this.__dataHost.__dataHost;n&&n._addEventListenerToNode(e,t,i)}}_showHideChildren(e){Ms(e,this.children)}_setUnmanagedPropertyToNode(e,t,i){e.__hideTemplateChildren__&&e.nodeType==Node.TEXT_NODE&&"textContent"==t?e.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(e,t,i)}get parentModel(){let e=this.__parentModel;if(!e){let t;e=this;do{e=e.__dataHost.__dataHost}while((t=e.__templatizeOptions)&&!t.parentModel);this.__parentModel=e}return e}dispatchEvent(e){return!0}}Ds.prototype.__dataHost,Ds.prototype.__templatizeOptions,Ds.prototype._methodHost,Ds.prototype.__templatizeOwner,Ds.prototype.__hostProps;const Rs=xs(Ds);function Ls(e){let t=e.__dataHost;return t&&t._methodHost||t}function Fs(e,t,i){let n=i.mutableData?Rs:Ds;Ks.mixin&&(n=Ks.mixin(n));let r=class extends n{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(e),zs(r,e,t,i),r}function Bs(e,t,i,n){let r=i.forwardHostProp;if(r&&t.hasHostProps){const s="template"==e.localName;let o=t.templatizeTemplateClass;if(!o){if(s){let e=i.mutableData?Os:Ts;class n extends e{}o=t.templatizeTemplateClass=n}else{const i=e.constructor;class n extends i{}o=t.templatizeTemplateClass=n}let a=t.hostProps;for(let e in a)o.prototype._addPropertyEffect("_host_"+e,o.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Hs(e,r)}),o.prototype._createNotifyingProperty("_host_"+e);Re&&n&&qs(t,i,n)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),s)Ns(e,o),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties();else{Object.setPrototypeOf(e,o.prototype);const i=t.hostProps;for(let t in i)if(t="_host_"+t,t in e){const i=e[t];delete e[t],e.__data[t]=i}}}}function Hs(e,t){return function(e,i,n){t.call(e.__templatizeOwner,i.substring("_host_".length),n[i])}}function zs(e,t,i,n){let r=i.hostProps||{};for(let t in n.instanceProps){delete r[t];let i=n.notifyInstanceProp;i&&e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:js(t,i)})}if(n.forwardHostProp&&t.__dataHost)for(let t in r)i.hasHostProps||(i.hasHostProps=!0),e.prototype._addPropertyEffect(t,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Us()})}function js(e,t){return function(e,i,n){t.call(e.__templatizeOwner,e,i,n[i])}}function Us(){return function(e,t,i){e.__dataHost._setPendingPropertyOrPath("_host_"+t,i[t],!0,!0)}}function Ks(e,t,i){if(Ie&&!Ls(e))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;let n=(t?t.constructor:Ds)._parseTemplate(e),r=n.templatizeInstanceClass;r||(r=Fs(e,n,i),n.templatizeInstanceClass=r);const s=Ls(e);Bs(e,n,i,s);let o=class extends r{};return o.prototype._methodHost=s,o.prototype.__dataHost=e,o.prototype.__templatizeOwner=t,o.prototype.__hostProps=n.hostProps,o=o,o}function qs(e,t,i){const n=i.constructor._properties,{propertyEffects:r}=e,{instanceProps:s}=t;for(let e in r)if(!(n[e]||s&&s[e])){const t=r[e];for(let i=0;i<t.length;i++){const{part:n}=t[i].info;if(!n.signature||!n.signature.static){console.warn(`Property '${e}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function $s(e,t){let i;for(;t;)if(i=t.__dataHost?t:t.__templatizeInstance){if(i.__dataHost==e)return i;t=i.__dataHost}else t=pt(t).parentNode;return null}
|
|
379
380
|
/**
|
|
380
381
|
@license
|
|
381
382
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -384,7 +385,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
384
385
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
385
386
|
Code distributed by Google as part of the polymer project is also
|
|
386
387
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
387
|
-
*/let
|
|
388
|
+
*/let Ys=!1;function Vs(){if(De&&!Ee){if(!Ys){Ys=!0;const e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}
|
|
388
389
|
/**
|
|
389
390
|
@license
|
|
390
391
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -393,7 +394,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
393
394
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
394
395
|
Code distributed by Google as part of the polymer project is also
|
|
395
396
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
396
|
-
*/const
|
|
397
|
+
*/const Js=ar(ks(Gi(HTMLElement)));class Xs extends Js{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),Ie)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(e,t,i,n){this.mutableData=!0}connectedCallback(){Vs()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){pt(pt(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}render(){let e;if(!this.__children){if(e=e||this.querySelector("template"),!e){let t=new MutationObserver(()=>{if(e=this.querySelector("template"),!e)throw new Error("dom-bind requires a <template> child");t.disconnect(),this.render()});return void t.observe(this,{childList:!0})}this.root=this._stampTemplate(e),this.$=this.root.$,this.__children=[];for(let e=this.root.firstChild;e;e=e.nextSibling)this.__children[this.__children.length]=e;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}customElements.define("dom-bind",Xs);
|
|
397
398
|
/**
|
|
398
399
|
@license
|
|
399
400
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -403,7 +404,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
403
404
|
Code distributed by Google as part of the polymer project is also
|
|
404
405
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
405
406
|
*/
|
|
406
|
-
const
|
|
407
|
+
const Ws=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:e=>e});class Gs{constructor(e,t){to(e,t);const i=t.reduce((t,i,n)=>t+Zs(i)+e[n+1],e[0]);this.value=i.toString()}toString(){return this.value}}function Zs(e){if(e instanceof Gs)return e.value;throw new Error("non-literal value passed to Polymer's htmlLiteral function: "+e)}function Qs(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof Gs)return Zs(e);throw new Error("non-template value passed to Polymer's html function: "+e)}const eo=function(e,...t){to(e,t);const i=document.createElement("template");let n=t.reduce((t,i,n)=>t+Qs(i)+e[n+1],e[0]);return Ws&&(n=Ws.createHTML(n)),i.innerHTML=n,i},to=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(e.raw)||t.length!==e.length-1)throw new TypeError("Invalid call to the html template tag")},io=sn(HTMLElement),no=ks(io);class ro extends no{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){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:!je,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let e=0;e<this.__instances.length;e++)this.__detachInstance(e);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),Vs()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let e=pt(pt(this).parentNode);for(let t=0;t<this.__instances.length;t++)this.__attachInstance(t,e);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const e=this;let t=this.template=e._templateInfo?e:this.querySelector("template");if(!t){let e=new MutationObserver(()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");e.disconnect(),this.__render()});return e.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Ks(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(e,t){let i=this.__instances;for(let n,r=0;r<i.length&&(n=i[r]);r++)n.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,i){if(gt(this.as,t)){let n=e[this.itemsIndexAs];t==this.as&&(this.items[n]=i);let r=yt(this.as,`${JSCompiler_renameProperty("items",this)}.${n}`,t);this.notifyPath(r,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(e){if("string"==typeof e){let t=e,i=this.__getMethodHost();return function(){return i[t].apply(i,arguments)}}return e}__sortChanged(e){this.__sortFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__filterChanged(e){this.__filterFn=this.__functionFromPropertyValue(e),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(e){return Math.ceil(1e3/e)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(e){if(this.__sortFn||this.__filterFn)if(e){if(this.__observePaths){let t=this.__observePaths;for(let i=0;i<t.length;i++)0===e.indexOf(t[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||("items"===e.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(e,t=0){this.__renderDebouncer=on.debounce(this.__renderDebouncer,t>0?Rt.after(t):Bt,e.bind(this)),ln(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),$r()}__render(){if(!this.__ensureTemplatized())return;let e=this.items||[];const t=this.__sortAndFilterItems(e),i=this.__calculateLimit(t.length);this.__updateInstances(e,i,t),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>{this.__chunkingId=null,this.__continueChunking()})),this._setRenderedItemCount(this.__instances.length),je&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(e){let t=new Array(e.length);for(let i=0;i<e.length;i++)t[i]=i;return this.__filterFn&&(t=t.filter((t,i,n)=>this.__filterFn(e[t],i,n))),this.__sortFn&&t.sort((t,i)=>this.__sortFn(e[t],e[i])),t}__calculateLimit(e){let t=e;const i=this.__instances.length;if(this.initialCount){let n;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(t=Math.min(e,this.initialCount),n=Math.max(t-i,0),this.__chunkCount=n||1):(n=Math.min(Math.max(e-i,0),this.__chunkCount),t=Math.min(i+n,e)),this.__shouldMeasureChunk=n===this.__chunkCount,this.__shouldContinueChunking=t<e,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,t}__continueChunking(){if(this.__shouldMeasureChunk){const e=performance.now()-this.__renderStartTime,t=this._targetFrameTime/e;this.__chunkCount=Math.round(this.__chunkCount*t)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(e,t,i){const n=this.__itemsIdxToInstIdx={};let r;for(r=0;r<t;r++){let t=this.__instances[r],s=i[r],o=e[s];n[s]=r,t?(t._setPendingProperty(this.as,o),t._setPendingProperty(this.indexAs,r),t._setPendingProperty(this.itemsIndexAs,s),t._flushProperties()):this.__insertInstance(o,r,s)}for(let e=this.__instances.length-1;e>=r;e--)this.__detachAndRemoveInstance(e)}__detachInstance(e){let t=this.__instances[e];const i=pt(t.root);for(let e=0;e<t.children.length;e++){let n=t.children[e];i.appendChild(n)}return t}__attachInstance(e,t){let i=this.__instances[e];t.insertBefore(i.root,this)}__detachAndRemoveInstance(e){this.__detachInstance(e),this.__instances.splice(e,1)}__stampInstance(e,t,i){let n={};return n[this.as]=e,n[this.indexAs]=t,n[this.itemsIndexAs]=i,new this.__ctor(n)}__insertInstance(e,t,i){const n=this.__stampInstance(e,t,i);let r=this.__instances[t+1],s=r?r.children[0]:this;return pt(pt(this).parentNode).insertBefore(n.root,s),this.__instances[t]=n,n}_showHideChildren(e){for(let t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}__handleItemPath(e,t){let i=e.slice(6),n=i.indexOf("."),r=n<0?i:i.substring(0,n);if(r==parseInt(r,10)){let e=n<0?"":i.substring(n+1);this.__handleObservedPaths(e);let s=this.__itemsIdxToInstIdx[r],o=this.__instances[s];if(o){let i=this.as+(e?"."+e:"");o._setPendingPropertyOrPath(i,t,!1,!0),o._flushProperties()}return!0}}itemForElement(e){let t=this.modelForElement(e);return t&&t[this.as]}indexForElement(e){let t=this.modelForElement(e);return t&&t[this.indexAs]}modelForElement(e){return $s(this.template,e)}}customElements.define(ro.is,ro);
|
|
407
408
|
/**
|
|
408
409
|
@license
|
|
409
410
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -413,7 +414,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
413
414
|
Code distributed by Google as part of the polymer project is also
|
|
414
415
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
415
416
|
*/
|
|
416
|
-
class
|
|
417
|
+
class so extends io{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=on.debounce(this.__renderDebouncer,Bt,()=>this.__render()),ln(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const e=pt(this).parentNode;e&&(e.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||pt(e).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),Vs()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const e=this;let t=e._templateInfo?e:pt(e).querySelector("template");if(!t){let e=new MutationObserver(()=>{if(!pt(this).querySelector("template"))throw new Error("dom-if requires a <template> child");e.disconnect(),this.__render()});return e.observe(this,{childList:!0}),!1}this.__template=t}return!0}__ensureInstance(){let e=pt(this).parentNode;if(this.__hasInstance()){let t=this.__getInstanceNodes();if(t&&t.length){if(pt(this).previousSibling!==t[t.length-1])for(let i,n=0;n<t.length&&(i=t[n]);n++)pt(e).insertBefore(i,this)}}else{if(!e)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(e)}return!0}render(){$r()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),je&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(e){}__teardownInstance(){}_showHideChildren(){}}class oo extends so{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(e){const t=this.__dataHost||this;if(Ie&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const i=t._bindTemplate(this.__template,!0);i.runEffects=(e,t,i)=>{let n=this.__syncInfo;if(this.if)n&&(this.__syncInfo=null,this._showHideChildren(),t=Object.assign(n.changedProps,t)),e(t,i);else if(this.__instance)if(n||(n=this.__syncInfo={runEffects:e,changedProps:{}}),i)for(const e in t){const t=_t(e);n.changedProps[t]=this.__dataHost[t]}else Object.assign(n.changedProps,t)},this.__instance=t._stampTemplate(this.__template,i),pt(e).insertBefore(this.__instance,this)}__syncHostProperties(){const e=this.__syncInfo;e&&(this.__syncInfo=null,e.runEffects(e.changedProps,!1))}__teardownInstance(){const e=this.__dataHost||this;this.__instance&&(e._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,Ms(e,this.__instance.templateInfo.childNodes)),e||this.__syncHostProperties()}}class ao extends so{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(e){this.__ctor||(this.__ctor=Ks(this.__template,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[_t(e)]=!0))}})),this.__instance=new this.__ctor,pt(e).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let e=this.__instance.children;if(e&&e.length){let t=pt(e[0]).parentNode;if(t){t=pt(t);for(let i,n=0;n<e.length&&(i=e[n]);n++)t.removeChild(i)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let e=this.__invalidProps;if(e){this.__invalidProps=null;for(let t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__instance._flushProperties()}}_showHideChildren(){const e=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==e&&(this.__instance.__hidden=e,this.__instance._showHideChildren(e)),e||this.__syncHostProperties()}}const lo=ze?oo:ao;customElements.define(lo.is,lo);
|
|
417
418
|
/**
|
|
418
419
|
@license
|
|
419
420
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -423,7 +424,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
423
424
|
Code distributed by Google as part of the polymer project is also
|
|
424
425
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
425
426
|
*/
|
|
426
|
-
let
|
|
427
|
+
let co=$e(e=>{let t=sn(e);class i extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(e,t){let i=t.path;if(i==JSCompiler_renameProperty("items",this)){let i=t.base||[],n=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),n){let e=jr(i,n);this.__applySplices(e)}this.__lastItems=i,this.__lastMulti=e}else if(t.path==JSCompiler_renameProperty("items",this)+".splices")this.__applySplices(t.value.indexSplices);else{let e=i.slice((JSCompiler_renameProperty("items",this)+".").length),t=parseInt(e,10);e.indexOf(".")<0&&e==t&&this.__deselectChangedIdx(t)}}__applySplices(e){let t=this.__selectedMap;for(let i=0;i<e.length;i++){let n=e[i];t.forEach((e,i)=>{e<n.index||(e>=n.index+n.removed.length?t.set(i,e+n.addedCount-n.removed.length):t.set(i,-1))});for(let e=0;e<n.addedCount;e++){let i=n.index+e;t.has(this.items[i])&&t.set(this.items[i],i)}}this.__updateLinks();let i=0;t.forEach((e,n)=>{e<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),i,1):this.selected=this.selectedItem=null,t.delete(n)):i++})}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let e=0;this.__selectedMap.forEach(t=>{t>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${t}`,`${JSCompiler_renameProperty("selected",this)}.${e++}`)})}else this.__selectedMap.forEach(e=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${e}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${e}`)})}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(e){return this.__selectedMap.has(e)}isIndexSelected(e){return this.isSelected(this.items[e])}__deselectChangedIdx(e){let t=this.__selectedIndexForItemIndex(e);if(t>=0){let e=0;this.__selectedMap.forEach((i,n)=>{t==e++&&this.deselect(n)})}}__selectedIndexForItemIndex(e){let t=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${e}`];if(t)return parseInt(t.slice((JSCompiler_renameProperty("selected",this)+".").length),10)}deselect(e){let t=this.__selectedMap.get(e);if(t>=0){let i;this.__selectedMap.delete(e),this.multi&&(i=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),i,1):this.selected=this.selectedItem=null}}deselectIndex(e){this.deselect(this.items[e])}select(e){this.selectIndex(this.items.indexOf(e))}selectIndex(e){let 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(JSCompiler_renameProperty("selected",this),t):this.selected=this.selectedItem=t)}}return i})(io);class ho extends co{static get is(){return"array-selector"}static get template(){return null}}customElements.define(ho.is,ho);
|
|
427
428
|
/**
|
|
428
429
|
@license
|
|
429
430
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -433,7 +434,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
433
434
|
Code distributed by Google as part of the polymer project is also
|
|
434
435
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
435
436
|
*/
|
|
436
|
-
const
|
|
437
|
+
const po=new ye;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(e,t,i){},prepareTemplateDom(e,t){},prepareTemplateStyles(e,t,i){},styleSubtree(e,t){po.processStyles(),K(e,t)},styleElement(e){po.processStyles()},styleDocument(e){po.processStyles(),K(document.body,e)},getComputedStyleValue:(e,t)=>q(e,t),flushCustomStyles(){},nativeCss:s,nativeShadow:e,cssBuild:i,disableRuntime:r}),window.ShadyCSS.CustomStyleInterface=po;
|
|
437
438
|
/**
|
|
438
439
|
@license
|
|
439
440
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -443,7 +444,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
443
444
|
Code distributed by Google as part of the polymer project is also
|
|
444
445
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
445
446
|
*/
|
|
446
|
-
const
|
|
447
|
+
const uo="include",_o=window.ShadyCSS.CustomStyleInterface;class fo extends HTMLElement{constructor(){super(),this._style=null,_o.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const e=this.querySelector("style");if(!e)return null;this._style=e;const t=e.getAttribute(uo);return t&&(e.removeAttribute(uo),e.textContent=lt(t)+e.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}window.customElements.define("custom-style",fo);
|
|
447
448
|
/**
|
|
448
449
|
@license
|
|
449
450
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -453,7 +454,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
453
454
|
Code distributed by Google as part of the polymer project is also
|
|
454
455
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
455
456
|
*/
|
|
456
|
-
const
|
|
457
|
+
const mo=ds(HTMLElement).prototype,yo=eo`
|
|
457
458
|
<custom-style>
|
|
458
459
|
<style is="custom-style">
|
|
459
460
|
[hidden] {
|
|
@@ -815,7 +816,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
815
816
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
816
817
|
part of the polymer project is also subject to an additional IP rights grant
|
|
817
818
|
found at http://polymer.github.io/PATENTS.txt
|
|
818
|
-
*/
|
|
819
|
+
*/yo.setAttribute("style","display: none;"),document.head.appendChild(yo.content);var go=document.createElement("style");go.textContent="[hidden] { display: none !important; }",document.head.appendChild(go);
|
|
819
820
|
/**
|
|
820
821
|
@license
|
|
821
822
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -826,7 +827,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
826
827
|
part of the polymer project is also subject to an additional IP rights grant
|
|
827
828
|
found at http://polymer.github.io/PATENTS.txt
|
|
828
829
|
*/
|
|
829
|
-
class
|
|
830
|
+
class bo{constructor(e){bo[" "](e),this.type=e&&e.type||"default",this.key=e&&e.key,e&&"value"in e&&(this.value=e.value)}get value(){var e=this.type,t=this.key;if(e&&t)return bo.types[e]&&bo.types[e][t]}set value(e){var t=this.type,i=this.key;t&&i&&(t=bo.types[t]=bo.types[t]||{},null==e?delete t[i]:t[i]=e)}get list(){if(this.type){var e=bo.types[this.type];return e?Object.keys(e).map((function(e){return vo[this.type][e]}),this):[]}}byKey(e){return this.key=e,this.value}}bo[" "]=function(){},bo.types={};var vo=bo.types;Ps({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,i){var n=new bo({type:e,key:t});return void 0!==i&&i!==n.value?n.value=i:this.value!==n.value&&(this.value=n.value),n},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new bo({type:this.type,key:e}).value}}),
|
|
830
831
|
/**
|
|
831
832
|
@license
|
|
832
833
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -837,7 +838,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
837
838
|
part of the polymer project is also subject to an additional IP rights grant
|
|
838
839
|
found at http://polymer.github.io/PATENTS.txt
|
|
839
840
|
*/
|
|
840
|
-
Ps({_template:
|
|
841
|
+
Ps({_template:eo`
|
|
841
842
|
<style>
|
|
842
843
|
:host {
|
|
843
844
|
@apply --layout-inline;
|
|
@@ -858,7 +859,7 @@ Ps({_template:to`
|
|
|
858
859
|
display: none;
|
|
859
860
|
}
|
|
860
861
|
</style>
|
|
861
|
-
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:
|
|
862
|
+
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:mo.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&&ts(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,ts(this.root).appendChild(this._img))}});
|
|
862
863
|
/**
|
|
863
864
|
@license
|
|
864
865
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -869,7 +870,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
869
870
|
part of the polymer project is also subject to an additional IP rights grant
|
|
870
871
|
found at http://polymer.github.io/PATENTS.txt
|
|
871
872
|
*/
|
|
872
|
-
const
|
|
873
|
+
const wo=eo`
|
|
873
874
|
<custom-style>
|
|
874
875
|
<style is="custom-style">
|
|
875
876
|
html {
|
|
@@ -1192,7 +1193,7 @@ const Co=to`
|
|
|
1192
1193
|
|
|
1193
1194
|
</style>
|
|
1194
1195
|
</custom-style>
|
|
1195
|
-
`;
|
|
1196
|
+
`;wo.setAttribute("style","display: none;"),document.head.appendChild(wo.content);
|
|
1196
1197
|
/**
|
|
1197
1198
|
@license
|
|
1198
1199
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1203,7 +1204,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1203
1204
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1204
1205
|
found at http://polymer.github.io/PATENTS.txt
|
|
1205
1206
|
*/
|
|
1206
|
-
const
|
|
1207
|
+
const Co=eo`
|
|
1207
1208
|
<custom-style>
|
|
1208
1209
|
<style is="custom-style">
|
|
1209
1210
|
html {
|
|
@@ -1259,7 +1260,7 @@ const Po=to`
|
|
|
1259
1260
|
--default-primary-color: var(--primary-color);
|
|
1260
1261
|
}
|
|
1261
1262
|
</style>
|
|
1262
|
-
</custom-style>`;
|
|
1263
|
+
</custom-style>`;Co.setAttribute("style","display: none;"),document.head.appendChild(Co.content);
|
|
1263
1264
|
/**
|
|
1264
1265
|
@license
|
|
1265
1266
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1270,7 +1271,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1270
1271
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1271
1272
|
found at http://polymer.github.io/PATENTS.txt
|
|
1272
1273
|
*/
|
|
1273
|
-
const
|
|
1274
|
+
const Po={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()}};
|
|
1274
1275
|
/**
|
|
1275
1276
|
@license
|
|
1276
1277
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1280,7 +1281,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1280
1281
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1281
1282
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1282
1283
|
found at http://polymer.github.io/PATENTS.txt
|
|
1283
|
-
*/var
|
|
1284
|
+
*/var So={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},xo={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:"*"},ko={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},Eo=/[a-z0-9*]/,Ao=/U\+/,To=/^arrow/,Oo=/^space(bar)?/,No=/^escape$/;function Io(e,t){var i="";if(e){var n=e.toLowerCase();" "===n||Oo.test(n)?i="space":No.test(n)?i="esc":1==n.length?t&&!Eo.test(n)||(i=n):i=To.test(n)?n.replace("arrow",""):"multiply"==n?"*":n}return i}function Mo(e){var t="";return e&&(e in So?t=So[e]:Ao.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function Do(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):xo[e]),t}function Ro(e,t){return e.key?Io(e.key,t):e.detail&&e.detail.key?Io(e.detail.key,t):Mo(e.keyIdentifier)||Do(e.keyCode)||""}function Lo(e,t){return Ro(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function Fo(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var i=t.split(":"),n=i[0],r=i[1];return n in ko?(e[ko[n]]=!0,e.hasModifiers=!0):(e.key=n,e.event=r||"keydown"),e}),{combo:e.split(":").shift()})}function Bo(e){return e.trim().split(" ").map((function(e){return Fo(e)}))}const Ho={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 i=Bo(t),n=0;n<i.length;++n)if(Lo(i[n],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 i=e[0].hasModifiers;return i===t[0].hasModifiers?0:i?-1:1}))},_addKeyBinding:function(e,t){Bo(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],i=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,i]),this.keyEventTarget.addEventListener(e,i)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,i,n;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],i=e[1],n=e[2],t.removeEventListener(i,n)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var i=0;i<e.length;i++){var n=e[i][0],r=e[i][1];if(Lo(n,t)&&(this._triggerKeyHandler(n,r,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,i){var n=Object.create(e);n.keyboardEvent=i;var r=new CustomEvent(e.event,{detail:n,cancelable:!0});this[t].call(this,r),r.defaultPrevented&&i.preventDefault()}},zo={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,i=ts(t).localTarget;this.isLightDescendant(i)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,i=ts(t).localTarget;this.isLightDescendant(i)||(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()}},jo=[Ho,zo];
|
|
1284
1285
|
/**
|
|
1285
1286
|
@license
|
|
1286
1287
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1301,7 +1302,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1301
1302
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1302
1303
|
found at http://polymer.github.io/PATENTS.txt
|
|
1303
1304
|
*/
|
|
1304
|
-
var
|
|
1305
|
+
var Uo={distance:function(e,t,i,n){var r=e-i,s=t-n;return Math.sqrt(r*r+s*s)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function Ko(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function qo(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"),ts(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}Ko.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var i=Uo.distance(e,t,0,0),n=Uo.distance(e,t,this.width,0),r=Uo.distance(e,t,0,this.height),s=Uo.distance(e,t,this.width,this.height);return Math.max(i,n,r,s)}},qo.MAX_RADIUS=300,qo.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=Uo.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?Uo.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,i=1.1*Math.min(Math.sqrt(e+t),qo.MAX_RADIUS)+5,n=1.1-i/qo.MAX_RADIUS*.2,r=this.mouseInteractionSeconds/n,s=i*(1-Math.pow(80,-r));return Math.abs(s)},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,qo.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,qo.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 Ko(this.element)},draw:function(){var e,t,i;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,i=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+i+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+i+"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,i=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=Uo.now(),this.center?(this.xStart=t,this.yStart=i,this.slideDistance=Uo.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=i,this.slideDistance=Uo.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=Uo.now())},remove:function(){ts(ts(this.waveContainer).parentNode).removeChild(this.waveContainer)}},Ps({_template:eo`
|
|
1305
1306
|
<style>
|
|
1306
1307
|
:host {
|
|
1307
1308
|
display: block;
|
|
@@ -1371,7 +1372,7 @@ var Ko={distance:function(e,t,i,n){var r=e-i,s=t-n;return Math.sqrt(r*r+s*s)},no
|
|
|
1371
1372
|
|
|
1372
1373
|
<div id="background"></div>
|
|
1373
1374
|
<div id="waves"></div>
|
|
1374
|
-
`,is:"paper-ripple",behaviors:[
|
|
1375
|
+
`,is:"paper-ripple",behaviors:[Ho],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==ts(this).parentNode.nodeType?this.keyEventTarget=ts(this).getOwnerRoot().host:this.keyEventTarget=ts(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="",this.fire("transitionend")},addRipple:function(){var e=new qo(this);return ts(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())}});
|
|
1375
1376
|
/**
|
|
1376
1377
|
@license
|
|
1377
1378
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1382,7 +1383,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1382
1383
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1383
1384
|
found at http://polymer.github.io/PATENTS.txt
|
|
1384
1385
|
*/
|
|
1385
|
-
const
|
|
1386
|
+
const $o={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){zo._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&&ts(t).appendChild(this._ripple),e){var i=ts(this._rippleContainer||this),n=ts(e).rootTarget;i.deepContains(n)&&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)}};
|
|
1386
1387
|
/**
|
|
1387
1388
|
@license
|
|
1388
1389
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1392,7 +1393,7 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1392
1393
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1393
1394
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1394
1395
|
found at http://polymer.github.io/PATENTS.txt
|
|
1395
|
-
*/Ps({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new
|
|
1396
|
+
*/Ps({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new bo({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map((function(e){return this.name+":"+e}),this)},applyIcon:function(e,t){this.removeIcon(e);var i=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(i){var n=ts(e.root||e);return n.insertBefore(i,n.childNodes[0]),e._svgIcon=i}return null},removeIcon:function(e){e._svgIcon&&(ts(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async((function(){this.fire("iron-iconset-added",this,{node:window})}))},_createIconMap:function(){var e=Object.create(null);return ts(this).querySelectorAll("[id]").forEach((function(t){e[t.id]=t})),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,i){if(e){var n=e.cloneNode(!0),r=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=n.getAttribute("viewBox")||"0 0 "+t+" "+t,o="pointer-events: none; display: block; width: 100%; height: 100%;";return i&&n.hasAttribute("mirror-in-rtl")&&(o+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),r.setAttribute("viewBox",s),r.setAttribute("preserveAspectRatio","xMidYMid meet"),r.setAttribute("focusable","false"),r.style.cssText=o,r.appendChild(n).removeAttribute("id"),r}return null}});
|
|
1396
1397
|
/**
|
|
1397
1398
|
@license
|
|
1398
1399
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
@@ -1403,7 +1404,7 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
1403
1404
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1404
1405
|
found at http://polymer.github.io/PATENTS.txt
|
|
1405
1406
|
*/
|
|
1406
|
-
let
|
|
1407
|
+
let Yo=null;const Vo={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){Yo=new bo({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return Yo&&Yo.byKey(this.validator)},hasValidator:function(){return null!=this._validator},validate:function(e){return void 0===e&&void 0!==this.value?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return!this.hasValidator()||this._validator.validate(e)}},Jo={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1}},attached:function(){},detached:function(){}},Xo={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},Wo={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=$o._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},Go=[jo,Po,$o,Wo],Zo=[Go,[Jo,Vo,Xo],{_checkedChanged:function(){Xo._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){$o._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}}],Qo=eo`<style>
|
|
1407
1408
|
:host {
|
|
1408
1409
|
display: inline-block;
|
|
1409
1410
|
white-space: nowrap;
|
|
@@ -1593,4 +1594,4 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
|
1593
1594
|
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
1594
1595
|
part of the polymer project is also subject to an additional IP rights grant
|
|
1595
1596
|
found at http://polymer.github.io/PATENTS.txt
|
|
1596
|
-
*/
|
|
1597
|
+
*/Qo.setAttribute("strip-whitespace",""),Ps({_template:Qo,is:"paper-checkbox",behaviors:[Zo],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){Tr(this,(function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var e=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),t="px",i=e.match(/[A-Za-z]+$/);null!==i&&(t=i[0]);var n=parseFloat(e),r=8/3*n;"px"===t&&(r=Math.floor(r))%2!=n%2&&r++,this.updateStyles({"--paper-checkbox-ink-size":r+t})}}))},_computeCheckboxClass:function(e,t){var i="";return e&&(i+="checked "),t&&(i+="invalid"),i},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Wo._createRipple.call(this)}});export{fs as A,mo as B,on as D,qr as F,ar as G,Po as I,ds as L,Ps as P,jo as a,$o as b,Tr as c,ts as d,Lt as e,ln as f,io as g,eo as h,Yn as i,Vo as j,Jo as k,Se as l,$s as m,$r as n,Ge as o,Ft as p,zo as q,tr as r,Ho as s,Ks as t,Ee as u,kt as v,pt as w,or as x,Go as y,Rt as z};
|