polymer-neon-rails 1.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +39 -0
  3. data/Rakefile +1 -0
  4. data/app/assets/components/iron-flex-layout/README.md +4 -0
  5. data/app/assets/components/iron-flex-layout/bower.json +21 -0
  6. data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
  7. data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
  8. data/app/assets/components/iron-flex-layout/demo/index.html +40 -0
  9. data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
  10. data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
  11. data/app/assets/components/iron-meta/README.md +46 -0
  12. data/app/assets/components/iron-meta/bower.json +28 -0
  13. data/app/assets/components/iron-meta/demo/index.html +45 -0
  14. data/app/assets/components/iron-meta/hero.svg +33 -0
  15. data/app/assets/components/iron-meta/index.html +27 -0
  16. data/app/assets/components/iron-meta/iron-meta.html +352 -0
  17. data/app/assets/components/iron-meta/test/basic.html +48 -0
  18. data/app/assets/components/iron-meta/test/index.html +30 -0
  19. data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
  20. data/app/assets/components/iron-resizable-behavior/README.md +16 -0
  21. data/app/assets/components/iron-resizable-behavior/bower.json +26 -0
  22. data/app/assets/components/iron-resizable-behavior/demo/index.html +29 -0
  23. data/app/assets/components/iron-resizable-behavior/demo/src/x-app.html +114 -0
  24. data/app/assets/components/iron-resizable-behavior/index.html +25 -0
  25. data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
  26. data/app/assets/components/iron-resizable-behavior/test/basic.html +263 -0
  27. data/app/assets/components/iron-resizable-behavior/test/index.html +31 -0
  28. data/app/assets/components/iron-resizable-behavior/test/test-elements.html +143 -0
  29. data/app/assets/components/iron-selector/README.md +50 -0
  30. data/app/assets/components/iron-selector/bower.json +31 -0
  31. data/app/assets/components/iron-selector/demo/index.html +66 -0
  32. data/app/assets/components/iron-selector/index.html +28 -0
  33. data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
  34. data/app/assets/components/iron-selector/iron-selectable.html +307 -0
  35. data/app/assets/components/iron-selector/iron-selection.html +115 -0
  36. data/app/assets/components/iron-selector/iron-selector.html +71 -0
  37. data/app/assets/components/iron-selector/test/activate-event.html +138 -0
  38. data/app/assets/components/iron-selector/test/basic.html +150 -0
  39. data/app/assets/components/iron-selector/test/content-element.html +43 -0
  40. data/app/assets/components/iron-selector/test/content.html +168 -0
  41. data/app/assets/components/iron-selector/test/index.html +36 -0
  42. data/app/assets/components/iron-selector/test/multi.html +135 -0
  43. data/app/assets/components/iron-selector/test/next-previous.html +134 -0
  44. data/app/assets/components/iron-selector/test/selected-attribute.html +72 -0
  45. data/app/assets/components/iron-selector/test/template-repeat.html +110 -0
  46. data/app/assets/components/neon-animation/README.md +304 -0
  47. data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
  48. data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
  49. data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
  50. data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
  51. data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
  52. data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
  53. data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
  54. data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
  55. data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
  56. data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
  57. data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
  58. data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
  59. data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
  60. data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
  61. data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
  62. data/app/assets/components/neon-animation/bower.json +51 -0
  63. data/app/assets/components/neon-animation/demo/declarative/index.html +108 -0
  64. data/app/assets/components/neon-animation/demo/doc/basic.html +47 -0
  65. data/app/assets/components/neon-animation/demo/doc/my-animatable.html +73 -0
  66. data/app/assets/components/neon-animation/demo/doc/my-dialog.html +97 -0
  67. data/app/assets/components/neon-animation/demo/doc/types.html +53 -0
  68. data/app/assets/components/neon-animation/demo/dropdown/animated-dropdown.html +97 -0
  69. data/app/assets/components/neon-animation/demo/dropdown/index.html +54 -0
  70. data/app/assets/components/neon-animation/demo/grid/animated-grid.html +166 -0
  71. data/app/assets/components/neon-animation/demo/grid/fullsize-page-with-card.html +124 -0
  72. data/app/assets/components/neon-animation/demo/grid/index.html +70 -0
  73. data/app/assets/components/neon-animation/demo/index.html +6 -0
  74. data/app/assets/components/neon-animation/demo/list/full-view.html +122 -0
  75. data/app/assets/components/neon-animation/demo/list/index.html +29 -0
  76. data/app/assets/components/neon-animation/demo/list/list-demo.html +112 -0
  77. data/app/assets/components/neon-animation/demo/list/list-view.html +127 -0
  78. data/app/assets/components/neon-animation/demo/load/animated-grid.html +147 -0
  79. data/app/assets/components/neon-animation/demo/load/full-page.html +86 -0
  80. data/app/assets/components/neon-animation/demo/load/index.html +45 -0
  81. data/app/assets/components/neon-animation/demo/reprojection/animated-grid.html +166 -0
  82. data/app/assets/components/neon-animation/demo/reprojection/fullsize-page-with-card.html +124 -0
  83. data/app/assets/components/neon-animation/demo/reprojection/index.html +66 -0
  84. data/app/assets/components/neon-animation/demo/reprojection/reprojected-pages.html +42 -0
  85. data/app/assets/components/neon-animation/demo/shared.css +40 -0
  86. data/app/assets/components/neon-animation/demo/tiles/circles-page.html +110 -0
  87. data/app/assets/components/neon-animation/demo/tiles/index.html +77 -0
  88. data/app/assets/components/neon-animation/demo/tiles/squares-page.html +104 -0
  89. data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
  90. data/app/assets/components/neon-animation/index.html +30 -0
  91. data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
  92. data/app/assets/components/neon-animation/neon-animatable.html +54 -0
  93. data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
  94. data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
  95. data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
  96. data/app/assets/components/neon-animation/neon-animation.html +17 -0
  97. data/app/assets/components/neon-animation/neon-animations.html +25 -0
  98. data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
  99. data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
  100. data/app/assets/components/neon-animation/web-animations.html +11 -0
  101. data/app/assets/components/neon-elements/README.md +19 -0
  102. data/app/assets/components/neon-elements/bower.json +26 -0
  103. data/app/assets/components/paper-styles/README.md +3 -0
  104. data/app/assets/components/paper-styles/bower.json +27 -0
  105. data/app/assets/components/paper-styles/classes/global.html +96 -0
  106. data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
  107. data/app/assets/components/paper-styles/classes/shadow.html +39 -0
  108. data/app/assets/components/paper-styles/classes/typography.html +171 -0
  109. data/app/assets/components/paper-styles/color.html +333 -0
  110. data/app/assets/components/paper-styles/default-theme.html +39 -0
  111. data/app/assets/components/paper-styles/demo-pages.html +72 -0
  112. data/app/assets/components/paper-styles/demo.css +25 -0
  113. data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
  114. data/app/assets/components/paper-styles/paper-styles.html +17 -0
  115. data/app/assets/components/paper-styles/shadow.html +61 -0
  116. data/app/assets/components/paper-styles/typography.html +240 -0
  117. data/app/assets/components/polymer/LICENSE.txt +27 -0
  118. data/app/assets/components/polymer/bower.json +26 -0
  119. data/app/assets/components/polymer/build.log +27 -0
  120. data/app/assets/components/polymer/polymer-micro.html +523 -0
  121. data/app/assets/components/polymer/polymer-mini.html +1368 -0
  122. data/app/assets/components/polymer/polymer.html +3768 -0
  123. data/app/assets/components/web-animations-js/COPYING +202 -0
  124. data/app/assets/components/web-animations-js/History.md +108 -0
  125. data/app/assets/components/web-animations-js/README.md +161 -0
  126. data/app/assets/components/web-animations-js/bower.json +31 -0
  127. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  128. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js.map +1 -0
  129. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  130. data/app/assets/components/web-animations-js/web-animations-next.min.js.map +1 -0
  131. data/app/assets/components/web-animations-js/web-animations.html +50 -0
  132. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  133. data/app/assets/components/web-animations-js/web-animations.min.js.gz +0 -0
  134. data/app/assets/components/web-animations-js/web-animations.min.js.map +1 -0
  135. data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
  136. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  137. data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
  138. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  139. data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
  140. data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
  141. data/app/assets/components/webcomponentsjs/README.md +125 -0
  142. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
  143. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
  144. data/app/assets/components/webcomponentsjs/bower.json +14 -0
  145. data/app/assets/components/webcomponentsjs/build.log +33 -0
  146. data/app/assets/components/webcomponentsjs/package.json +31 -0
  147. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
  148. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
  149. data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
  150. data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
  151. data/lib/polymer-neon-rails.rb +2 -0
  152. data/lib/polymer-neon-rails/engine.rb +4 -0
  153. data/lib/polymer-neon-rails/version.rb +3 -0
  154. metadata +264 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
+ * Code distributed by Google as part of the polymer project is also
8
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
+ */
10
+ // @version 0.7.3
11
+ "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];A(e,o,F(t,o))}return e}function o(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}A(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){B.value=n,A(e,t,B)}function s(e,t){var n=e.__proto__||Object.getPrototypeOf(e);if(U)try{k(n)}catch(r){n=n.__proto__}var o=R.get(n);if(o)return o;var i=s(n),a=E(i);return v(n,a,t),a}function c(e,t){m(e,t,!0)}function u(e,t){m(t,e,!1)}function l(e){return/^on[a-z]+$/.test(e)}function p(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function d(e){return I&&p(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function f(e){return I&&p(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function h(e){return I&&p(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function w(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return q}}function m(t,n,r,o){for(var i=k(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){U&&t.__lookupGetter__(s);var c,u,p=w(t,s);if("function"!=typeof p.value){var m=l(s);c=m?e.getEventHandlerGetter(s):d(s),(p.writable||p.set||V)&&(u=m?e.getEventHandlerSetter(s):f(s));var g=V||p.configurable;A(n,s,{get:c,set:u,configurable:g,enumerable:p.enumerable})}else r&&(n[s]=h(s))}}}function g(e,t,n){if(null!=e){var r=e.prototype;v(r,t,n),o(t,e)}}function v(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),P.set(o,e),c(e,o),r&&u(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return v(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function S(e){return e&&e.__impl4cf1e782hg__}function M(e){return!S(e)}function T(e){if(null===e)return null;n(M(e));var t=e.__wrapper8e3dd93a60__;return null!=t?t:e.__wrapper8e3dd93a60__=new(s(e,e))(e)}function O(e){return null===e?null:(n(S(e)),e.__impl4cf1e782hg__)}function N(e){return e.__impl4cf1e782hg__}function j(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function L(e){return e&&S(e)?O(e):e}function _(e){return e&&!S(e)?T(e):e}function C(e,t){null!==t&&(n(M(e)),n(void 0===t||S(t)),e.__wrapper8e3dd93a60__=t)}function D(e,t,n){G.get=n,A(e.prototype,t,G)}function H(e,t){D(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=_(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,P=new WeakMap,W=Object.create(null),I=t(),A=Object.defineProperty,k=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,B={value:void 0,configurable:!0,enumerable:!1,writable:!0};k(window);var U=/Firefox/.test(navigator.userAgent),q={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.assert=n,e.constructorTable=R,e.defineGetter=D,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=p,e.isWrapper=S,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=P,e.oneOf=i,e.registerObject=y,e.registerWrapper=g,e.rewrap=C,e.setWrapper=j,e.unsafeUnwrap=N,e.unwrap=O,e.unwrapIfNeeded=L,e.wrap=T,e.wrapIfNeeded=_,e.wrappers=W}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),u=0;a>u;u++)c[u]=new Array(s),c[u][0]=u;for(var l=0;s>l;l++)c[0][l]=l;for(var u=1;a>u;u++)for(var l=1;s>l;l++)if(this.equals(e[t+l-1],r[o+u-1]))c[u][l]=c[u-1][l-1];else{var p=c[u-1][l]+1,d=c[u][l-1]+1;c[u][l]=d>p?p:d}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var u,l=e[t-1][n-1],p=e[t-1][n],d=e[t][n-1];u=d>p?l>p?p:l:l>d?d:l,u==l?(l==s?c.push(r):(c.push(o),s=l),t--,n--):u==p?(c.push(a),t--,s=p):(c.push(i),n--,s=d)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,u,l){var p=0,d=0,f=Math.min(s-n,l-u);if(0==n&&0==u&&(p=this.sharedPrefix(e,c,f)),s==e.length&&l==c.length&&(d=this.sharedSuffix(e,c,f-p)),n+=p,u+=p,s-=d,l-=d,s-n==0&&l-u==0)return[];if(n==s){for(var h=t(n,[],0);l>u;)h.removed.push(c[u++]);return[h]}if(u==l)return[t(n,[],s-n)];for(var w=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,u,l)),h=void 0,m=[],g=n,v=u,b=0;b<w.length;b++)switch(w[b]){case r:h&&(m.push(h),h=void 0),g++,v++;break;case o:h||(h=t(g,[],0)),h.addedCount++,g++,h.removed.push(c[v]),v++;break;case i:h||(h=t(g,[],0)),h.addedCount++,g++;break;case a:h||(h=t(g,[],0)),h.removed.push(c[v]),v++}return h&&m.push(h),m},sharedPrefix:function(e,t,n){for(var r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)e[t]()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),u=document.createTextNode(s);c.observe(u,{characterData:!0}),r=function(){s=(s+1)%2,u.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,h.push(e),w||(l(n),w=!0))}function n(){for(w=!1;h.length;){var e=h;h=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new d.NodeList,this.removedNodes=new d.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=f.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=f.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=f.get(s);if(c)for(var u=0;u<c.length;u++){var l=c[u],p=l.options;if((s===e||p.subtree)&&!("attributes"===n&&!p.attributes||"attributes"===n&&p.attributeFilter&&(null!==o.namespace||-1===p.attributeFilter.indexOf(o.name))||"characterData"===n&&!p.characterData||"childList"===n&&!p.childList)){var d=l.observer;i[d.uid_]=d,("attributes"===n&&p.attributeOldValue||"characterData"===n&&p.characterDataOldValue)&&(a[d.uid_]=o.oldValue)}}}for(var h in i){var d=i[h],w=new r(n,e);"name"in o&&"namespace"in o&&(w.attributeName=o.name,w.attributeNamespace=o.namespace),o.addedNodes&&(w.addedNodes=o.addedNodes),o.removedNodes&&(w.removedNodes=o.removedNodes),o.previousSibling&&(w.previousSibling=o.previousSibling),o.nextSibling&&(w.nextSibling=o.nextSibling),void 0!==a[h]&&(w.oldValue=a[h]),t(d),d.records_.push(w)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,this.attributes="attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this.characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=m.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++g,this.scheduled_=!1}function u(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var l=e.setEndOfMicrotask,p=e.wrapIfNeeded,d=e.wrappers,f=new WeakMap,h=[],w=!1,m=Array.prototype.slice,g=0;c.prototype={constructor:c,observe:function(e,t){e=p(e);var n,r=new s(t),o=f.get(e);o||f.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new u(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=f.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},u.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=f.get(e);n||f.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=f.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return A(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var u=a(c);if(u&&u.length>0){for(var l=0;l<u.length;l++){var d=u[l];if(i(d)){var f=n(d),h=f.olderShadowRoot;h&&s.push(h)}s.push(d)}c=u[u.length-1]}else if(t(c)){if(p(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=A(t),r=e[0],o=A(r),i=u(n,o),a=0;a<e.length;a++){var s=e[a];if(A(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function u(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function l(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=u(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var l=0;l<s.length;l++){var p=s[l];if(A(p)===c)return p}return null}function p(e,t){return A(e)===A(t)}function d(e){if(!X.get(e)&&(X.set(e,!0),h(V(e),V(e.target)),W)){var t=W;throw W=null,t}}function f(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function h(t,n){if(K.get(t))throw new Error("InvalidStateError");K.set(t,!0),e.renderAllPending();var o,i,a;if(f(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!f(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),w(t,o,a,i)&&m(t,o,a,i)&&g(t,o,a,i),J.set(t,re),$["delete"](t,null),K["delete"](t),t.defaultPrevented}function w(e,t,n,r){var o=oe;if(n&&!v(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!v(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=ie,i=t[0]||n;return v(i,e,o,t,r)}function g(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!v(t[i],e,o,t,r))return;n&&t.length>0&&v(n,e,o,t,r)}function v(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),u=c.relatedTarget;if(u){if(u instanceof Object&&u.addEventListener){var p=V(u),d=l(t,e,p);if(d===a)return!0}else d=null;Z.set(t,d)}}J.set(t,n);var f=t.type,h=!1;Y.set(t,a),$.set(t,e),i.depth++;for(var w=0,m=i.length;m>w;w++){var g=i[w];if(g.removed)h=!0;else if(!(g.type!==f||!g.capture&&n===oe||g.capture&&n===ae))try{if("function"==typeof g.handler?g.handler.call(e,t):g.handler.handleEvent(t),ee.get(t))return!1}catch(v){W||(W=v)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.length=0;for(var w=0;w<b.length;w++)b[w].removed||i.push(b[w])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return ve||"beforeunload"!==n.type||this instanceof O?void B(n,this):new O(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:q(e.relatedTarget)}}):e}function S(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void B(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&k(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function M(e,t){return function(){arguments[t]=q(arguments[t]);var n=q(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(me)return new e(n,E(r));var o=q(document.createEvent(t)),i=we[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=q(t)),a.push(t)}),o["init"+t].apply(o,a),o}function O(e){y.call(this,e)}function N(e){return"function"==typeof e?!0:e&&e.handleEvent}function j(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function L(e){B(e,this)}function _(e){return e instanceof G.ShadowRoot&&(e=e.host),q(e)}function C(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function D(e,t){for(var n=q(e);n;n=n.parentNode)if(C(V(n),t))return!0;return!1}function H(e){I(e,ye)}function x(t,n,o,i){e.renderAllPending();var a=V(Ee.call(U(n),o,i));if(!a)return null;var c=r(a,null),u=c.lastIndexOf(t);return-1==u?null:(c=c.slice(0,u),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function P(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var W,I=e.forwardMethodsToWrapper,A=e.getTreeScope,k=e.mixin,F=e.registerWrapper,B=e.setWrapper,U=e.unsafeUnwrap,q=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),X=new WeakMap,K=new WeakMap,Y=new WeakMap,$=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return Y.get(this)},get currentTarget(){return $.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}},F(se,y,document.createEvent("Event"));var ce=S("UIEvent",y),ue=S("CustomEvent",y),le={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},pe=k({initMouseEvent:M("initMouseEvent",14)},le),de=k({initFocusEvent:M("initFocusEvent",5)},le),fe=S("MouseEvent",ce,pe),he=S("FocusEvent",ce,de),we=Object.create(null),me=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!me){var ge=function(e,t,n){if(n){var r=we[n];t=k(k({},r),t)}we[e]=t};ge("Event",{bubbles:!1,cancelable:!1}),ge("CustomEvent",{detail:null},"Event"),ge("UIEvent",{view:null,detail:0},"Event"),ge("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ge("FocusEvent",{relatedTarget:null},"UIEvent")}var ve=window.BeforeUnloadEvent;O.prototype=Object.create(y.prototype),k(O.prototype,{get returnValue(){return U(this).returnValue},set returnValue(e){U(this).returnValue=e}}),ve&&F(ve,O);var be=window.EventTarget,ye=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;ye.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),L.prototype={addEventListener:function(e,t,n){if(N(t)&&!j(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=_(this);a.addEventListener_(e,d,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=_(this);s.removeEventListener_(e,d,!0)}}},dispatchEvent:function(t){var n=q(t),r=n.type;X.set(n,!1),e.renderAllPending();var o;D(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},be&&F(be,L);var Ee=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=O,e.wrappers.CustomEvent=ue,e.wrappers.Event=y,e.wrappers.EventTarget=L,e.wrappers.FocusEvent=he,e.wrappers.MouseEvent=fe,e.wrappers.UIEvent=ce}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,w)}function n(e){u(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,u=e.setWrapper,l=e.unsafeUnwrap,p=e.wrap,d=window.TouchEvent;if(d){var f;try{f=document.createEvent("TouchEvent")}catch(h){return}var w={enumerable:!1};n.prototype={get target(){return p(l(this).target)}};var m={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){m.get=function(){return l(this)[e]},Object.defineProperty(n.prototype,e,m)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(l(this).touches)},get targetTouches(){return o(l(this).targetTouches)},get changedTouches(){return o(l(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(d,i,f),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){N(e instanceof S)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){L(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){L(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);B=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;B=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function u(e,t){R(e,t),e.nodeIsInserted_()}function l(e,t){for(var n=_(t),r=0;r<e.length;r++)u(e[r],n)}function p(e){R(e,new O(e,null))}function d(e){for(var t=0;t<e.length;t++)p(e[t])}function f(e,t){var n=e.nodeType===S.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function h(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function w(e,t){h(e,t);var n=t.length;if(1===n)return W(t[0]);for(var r=W(e.ownerDocument.createDocumentFragment()),o=0;n>o;o++)r.appendChild(W(t[o]));return r}function m(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function g(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){N(t.parentNode===e);var n=t.nextSibling,r=W(t),o=r.parentNode;o&&Y.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=W(e),a=i.firstChild;a;)n=a.nextSibling,Y.call(i,a),a=n}function v(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=A(n?U.call(n,P(e),!1):q.call(P(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||_(e)!==_(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function S(e){N(e instanceof V),M.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var M=e.wrappers.EventTarget,T=e.wrappers.NodeList,O=e.TreeScope,N=e.assert,j=e.defineWrapGetter,L=e.enqueueMutation,_=e.getTreeScope,C=e.isWrapper,D=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,P=e.unsafeUnwrap,W=e.unwrap,I=e.unwrapIfNeeded,A=e.wrap,k=e.wrapIfNeeded,F=e.wrappers,B=!1,U=document.importNode,q=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),X=V.prototype.isEqualNode,K=V.prototype.insertBefore,Y=V.prototype.removeChild,$=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{Y.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){Y.call(e,t)};S.prototype=Object.create(M.prototype),D(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?C(n)?r=W(n):(r=n,n=A(r)):(n=null,r=null),n&&N(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!v(e);if(o=c?a(e):i(e,this,s,n),c)f(this,e),m(this),K.call(P(this),W(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var u=r?r.parentNode:P(this);u?K.call(u,w(this,o),r):h(this,o)}return L(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),l(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=W(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,u=this.lastChild,l=i.parentNode;l&&J(l,i),c===e&&(this.firstChild_=a),u===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else m(this),J(P(this),i);return B||L(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(C(r)?o=W(r):(o=r,r=A(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,u=r.previousSibling,d=!this.invalidateShadowRenderer()&&!v(e);return d?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,u,c)),d?(f(this,e),m(this),$.call(P(this),W(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&$.call(o.parentNode,w(this,s),o)),L(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:u}),p(r),l(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:A(P(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:A(P(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:A(P(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:A(P(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:A(P(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==S.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=S.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(g(this),""!==e){var n=P(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else m(this),P(this).textContent=e;var r=c(this.childNodes);L(this,"childList",{addedNodes:r,removedNodes:t}),d(t),l(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,k(e))},compareDocumentPosition:function(e){return z.call(P(this),I(e))},isEqualNode:function(e){return X.call(P(this),I(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===S.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),j(S,"ownerDocument"),x(V,S,document.createDocumentFragment()),delete S.prototype.querySelector,delete S.prototype.querySelectorAll,S.prototype=D(Object.create(M.prototype),S.prototype),e.cloneNode=y,e.nodeWasAdded=u,e.nodeWasRemoved=p,e.nodesWereAdded=l,e.nodesWereRemoved=d,e.originalInsertBefore=K,e.originalRemoveChild=Y,e.snapshotNodeList=c,e.wrappers.Node=S}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;c>s;s++)i=b(t[s]),!o&&(a=g(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===C}function s(){return!0}function c(e,t,n){return e.localName===n}function u(e,t){return e.namespaceURI===t}function l(e,t,n){return e.namespaceURI===t&&e.localName===n}function p(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=p(a,t,n,r,o,i),a=a.nextElementSibling;return t}function d(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,null);if(c instanceof L)s=M.call(c,i);else{if(!(c instanceof _))return p(this,r,o,n,i,null);s=S.call(c,i)}return t(s,r,o,a)}function f(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=O.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function h(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=j.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=N.call(c,i,a)}return t(s,r,o,!1)}var w=e.wrappers.HTMLCollection,m=e.wrappers.NodeList,g=e.getTreeScope,v=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,S=document.querySelectorAll,M=document.documentElement.querySelectorAll,T=document.getElementsByTagName,O=document.documentElement.getElementsByTagName,N=document.getElementsByTagNameNS,j=document.documentElement.getElementsByTagNameNS,L=window.Element,_=window.HTMLDocument||window.Document,C="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=v(this),c=g(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof L)a=b(E.call(s,t));else{if(!(s instanceof _))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=g(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new m;return o.length=d.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(v(this),t)}},x={getElementsByTagName:function(e){var t=new w,n="*"===e?s:a;return t.length=f.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new w,r=null;return r="*"===e?"*"===t?s:c:"*"===t?u:l,n.length=h.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;
12
+
13
+ return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,u,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){l(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,u=e.MatchesInterface,l=(e.addWrapNodeListMethod,e.enqueueMutation),p=e.mixin,d=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wrappers,w=window.Element,m=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return w.prototype[e]}),g=m[0],v=w.prototype[g],b=new WeakMap;r.prototype=Object.create(a.prototype),p(r.prototype,{createShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this).getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=f(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return f(this).className},set className(e){this.setAttribute("class",e)},get id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),m.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),w.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),p(r.prototype,o),p(r.prototype,i),p(r.prototype,s),p(r.prototype,c),p(r.prototype,u),d(w,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=m,e.originalMatches=v,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function n(e){return e.replace(j,t)}function r(e){return e.replace(L,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e){if(e.namespaceURI!==D)return!0;var t=e.ownerDocument.doctype;return t&&t.publicId&&t.systemId}function a(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,a=e.tagName.toLowerCase(),c="<"+a,u=e.attributes,l=0;o=u[l];l++)c+=" "+o.name+'="'+n(o.value)+'"';return _[a]?(i(e)&&(c+="/"),c+">"):c+">"+s(e)+"</"+a+">";case Node.TEXT_NODE:var p=e.data;return t&&C[t.localName]?p:r(p);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof N.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(O(i))}function u(e){w.call(this,e)}function l(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return O(o)}function p(t){return function(){return e.renderAllPending(),M(this)[t]}}function d(e){m(u,e,p(e))}function f(t){Object.defineProperty(u.prototype,t,{get:p(t),set:function(n){e.renderAllPending(),M(this)[t]=n},configurable:!0,enumerable:!0})}function h(t){Object.defineProperty(u.prototype,t,{value:function(){return e.renderAllPending(),M(this)[t].apply(M(this),arguments)},configurable:!0,enumerable:!0})}var w=e.wrappers.Element,m=e.defineGetter,g=e.enqueueMutation,v=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,S=e.snapshotNodeList,M=e.unsafeUnwrap,T=e.unwrap,O=e.wrap,N=e.wrappers,j=/[&\u00A0"]/g,L=/[&\u00A0<>]/g,_=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;u.prototype=Object.create(w.prototype),v(u.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&C[this.localName])return void(this.textContent=e);var t=S(this.childNodes);this.invalidateShadowRenderer()?this instanceof N.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof N.HTMLTemplateElement?c(this.content,e):M(this).innerHTML=e;var n=S(this.childNodes);g(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=l(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=l(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(d),["scrollLeft","scrollTop"].forEach(f),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(h),E(x,u,document.createElement("b")),e.wrappers.HTMLElement=u,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=p.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);p.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!d){var t=n(e);l.set(this,u(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.wrap,l=new WeakMap,p=new WeakMap,d=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return d?u(s(this).content):l.get(this)}}),d&&a(d,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,u=e.wrap,l=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return u(c(this).form)}}),a(l,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o=e.defineWrapGetter,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,"title"),s=r(a),c=Object.getPrototypeOf(s.prototype).constructor;if(!("classList"in a)){var u=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",u),delete t.prototype.classList}o(c,"ownerSVGElement"),e.wrappers.SVGElement=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){d.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),u=document.createElementNS(s,"use"),l=c.constructor,p=Object.getPrototypeOf(l.prototype),d=p.constructor;t.prototype=Object.create(p),"instanceRoot"in u&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,u),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(u,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var u=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,u),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.NonElementParentNodeInterface,r=e.ParentNodeInterface,o=e.SelectorsInterface,i=e.mixin,a=e.registerObject,s=a(document.createDocumentFragment());i(s.prototype,r),i(s.prototype,o),i(s.prototype,t),i(s.prototype,n);var c=a(document.createComment(""));e.wrappers.Comment=c,e.wrappers.DocumentFragment=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(l(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_=new r(this,a(o||e)),d.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,u=e.setInnerHTML,l=e.unsafeUnwrap,p=e.unwrap,d=new WeakMap,f=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){u(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return f.get(this)||null},get host(){return d.get(this)||null},invalidateShadowRenderer:function(){return d.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(e).root;return t instanceof f?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=l(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.unwrapIfNeeded,l=e.wrap,p=e.getTreeScope,d=window.Range,f=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(u(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(u(e),t)},setStartBefore:function(e){s(this).setStartBefore(u(e))},setStartAfter:function(e){s(this).setStartAfter(u(e))},setEndBefore:function(e){s(this).setEndBefore(u(e))},setEndAfter:function(e){s(this).setEndAfter(u(e))},selectNode:function(e){s(this).selectNode(u(e))},selectNodeContents:function(e){s(this).selectNodeContents(u(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return l(s(this).extractContents())},cloneContents:function(){return l(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(u(e))},surroundContents:function(e){s(this).surroundContents(u(e))},cloneRange:function(){return l(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(u(e),t)},comparePoint:function(e,t){return s(this).comparePoint(u(e),t)},intersectsNode:function(e){return s(this).intersectsNode(u(e))},toString:function(){return s(this).toString()}},d.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return l(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var u=R(a.lastChild);u&&(u.nextSibling_=u.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){W.set(e,[])}function i(e){var t=W.get(e);return t||W.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function u(e){var t=A.get(e);return t||(t=new f(e),A.set(e,t)),t}function l(e){var t=C(e).root;return t instanceof _?t:null}function p(e){return u(e.host)}function d(e){this.skip=!1,this.node=e,this.childNodes=[]}function f(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function h(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function w(e){if(e instanceof j)return e;if(e instanceof N)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=w(t);if(n)return n}return null}function m(e,t){i(t).push(e);var n=I.get(e);n?n.push(t):I.set(e,[t])}function g(e){return I.get(e)}function v(e){I.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof O))return!1;if(!U.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=g(t);return n&&n[n.length-1]===e}function E(e){return e instanceof N||e instanceof j}function S(e){return e.shadowRoot}function M(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,O=e.wrappers.Element,N=e.wrappers.HTMLContentElement,j=e.wrappers.HTMLShadowElement,L=e.wrappers.Node,_=e.wrappers.ShadowRoot,C=(e.assert,e.getTreeScope),D=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,P=e.ArraySplice,W=new WeakMap,I=new WeakMap,A=new WeakMap,k=D(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],B=new P;B.equals=function(e,t){return x(e.node)===t},d.prototype={append:function(e){var t=new d(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=B.calculateSplices(o,i),u=0,l=0,p=0,d=0;d<c.length;d++){for(var f=c[d];p<f.index;p++)l++,o[u++].sync(s);for(var h=f.removed.length,w=0;h>w;w++){var m=R(i[l++]);s.get(m)||r(m)}for(var g=f.addedCount,v=i[l]&&R(i[l]),w=0;g>w;w++){var b=o[u++],y=b.node;n(t,y,v),s.set(y,!0),b.sync(s)}p+=g}for(var d=p;d<o.length;d++)o[d].sync(s)}}},f.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new d(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return C(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[k](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):v(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(S(e)){for(var t=e,n=h(t),r=M(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=w(i);if(a){var s=i.olderShadowRoot;s&&(n=h(s));for(var c=0;c<n.length;c++)m(n[c],a)}this.distributionResolution(i)}}for(var u=e.firstChild;u;u=u.nextSibling)this.distributionResolution(u)},poolDistribution:function(e,t){if(!(e instanceof j))if(e instanceof N){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(m(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)m(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(S(t)){var a=u(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var U=/^(:not\()?[*.#[a-zA-Z_|]/;L.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return t?(t.invalidate(),!0):!1},N.prototype.getDistributedNodes=j.prototype.getDistributedNodes=function(){return s(),i(this)},O.prototype.getDestinationInsertionPoints=function(){return s(),g(this)||[]},N.prototype.nodeIsInserted_=j.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=l(this);t&&(e=p(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=u,e.getShadowTrees=M,e.renderAllPending=s,e.getDestinationInsertionPoints=g,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){l.call(this,e),this.treeScope_=new m(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return _(n.apply(j(this),arguments))}}function r(e,t){H.call(j(t),L(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof w&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){N(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return _(n.apply(j(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(j(this),arguments)}}var u=e.GetElementsByInterface,l=e.wrappers.Node,p=e.ParentNodeInterface,d=e.NonElementParentNodeInterface,f=e.wrappers.Selection,h=e.SelectorsInterface,w=e.wrappers.ShadowRoot,m=e.TreeScope,g=e.cloneNode,v=e.defineWrapGetter,b=e.elementFromPoint,y=e.forwardMethodsToWrapper,E=e.matchesNames,S=e.mixin,M=e.registerWrapper,T=e.renderAllPending,O=e.rewrap,N=e.setWrapper,j=e.unsafeUnwrap,L=e.unwrap,_=e.wrap,C=e.wrapEventTargetMethods,D=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(l.prototype),v(t,"documentElement"),v(t,"body"),v(t,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var H=document.adoptNode,x=document.getSelection;S(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return b(this,this,e,t)},importNode:function(e,t){return g(e,t,j(this))},getSelection:function(){return T(),new f(x.call(L(this)))},getElementsByName:function(e){return h.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var R=document.createTreeWalker,P=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(_(e))}}:"function"==typeof n&&(o=function(e){return n(_(e))})),new P(R.call(L(this),L(e),t,o,r))},document.registerElement){var W=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void N(e,this):i?document.createElement(i,t):document.createElement(t);
14
+
15
+ }var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var u=Object.create(a),l=c.length-1;l>=0;l--)u=Object.create(u);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(u[e]=function(){_(this)instanceof r||O(this),t.apply(_(this),arguments)})});var p={prototype:u};i&&(p["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(u,r),e.nativePrototypeTable.set(o,u);W.call(L(this),t,p);return r},y([window.HTMLDocument||window.Document],["registerElement"])}y([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),y([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],E),y([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),S(t.prototype,u),S(t.prototype,p),S(t.prototype,h),S(t.prototype,d),S(t.prototype,{get implementation(){var e=D.get(this);return e?e:(e=new a(L(this).implementation),D.set(this,e),e)},get defaultView(){return _(L(this).defaultView)}}),M(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&M(window.HTMLDocument,t),C([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var I=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=L(arguments[2]),_(I.apply(j(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),M(window.DOMImplementation,a),y([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,u=e.wrap,l=window.Window,p=window.getComputedStyle,d=window.getDefaultComputedStyle,f=window.getSelection;t.prototype=Object.create(n.prototype),l.prototype.getComputedStyle=function(e,t){return u(this||window).getComputedStyle(c(e),t)},d&&(l.prototype.getDefaultComputedStyle=function(e,t){return u(this||window).getDefaultComputedStyle(c(e),t)}),l.prototype.getSelection=function(){return u(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){l.prototype[e]=function(){var t=u(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),p.call(s(this),c(e),t)},getSelection:function(){return a(),new r(f.call(s(this)))},get document(){return u(s(this).document)}}),d&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),d.call(s(this),c(e),t)}),i(l,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill);
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "webcomponentsjs",
3
+ "main": "webcomponents.js",
4
+ "version": "0.7.3",
5
+ "homepage": "http://webcomponents.org",
6
+ "authors": [
7
+ "The Polymer Authors"
8
+ ],
9
+ "keywords": [
10
+ "webcomponents"
11
+ ],
12
+ "license": "BSD",
13
+ "ignore": []
14
+ }
@@ -0,0 +1,33 @@
1
+ BUILD LOG
2
+ ---------
3
+ Build Time: 2015-06-03T16:30:51-0700
4
+
5
+ NODEJS INFORMATION
6
+ ==================
7
+ nodejs: v2.0.2
8
+ gulp: 3.9.0
9
+ gulp-audit: 1.0.0
10
+ gulp-concat: 2.5.2
11
+ gulp-header: 1.2.2
12
+ gulp-uglify: 1.2.0
13
+ run-sequence: 1.1.0
14
+ web-component-tester: 3.1.4
15
+
16
+ REPO REVISIONS
17
+ ==============
18
+ webcomponentsjs: da802598acc91d10d0205cf6130d15bd75fa12d1
19
+
20
+ BUILD HASHES
21
+ ============
22
+ CustomElements.js: 89978a89cdf96d509b8e399bf8e6aff4431c41ea
23
+ CustomElements.min.js: e8d9ac81e56720cccef8e1ba01400d4f403531b1
24
+ HTMLImports.js: 5a393509ce18b7ee605cd4474750e783a6afa5a5
25
+ HTMLImports.min.js: 6ce4c8c1340b3ceea4a2c05942cf4e8ef685fae3
26
+ MutationObserver.js: 60074504bbdf487e192215647375bffb70888997
27
+ MutationObserver.min.js: 76658a548e3785ee931d45fad4a0bd2b81594aa3
28
+ ShadowDOM.js: 35dceaf9eca85b593764a05b5324173e84f07608
29
+ ShadowDOM.min.js: 80ab65804971765c3450864b24f108efd8bd6086
30
+ webcomponents-lite.js: 94a081e93a4b2c65e645787b6e69c2a0aac204ff
31
+ webcomponents-lite.min.js: 80158c463eb7fda32995d908b9fbabcf95595c0e
32
+ webcomponents.js: de93a7fee51ce01dd61546598f12e481755c44ca
33
+ webcomponents.min.js: 0a70cae0a9589e463aa36d1ec9c1fbc87c1b1c5c
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "webcomponents.js",
3
+ "version": "0.7.3",
4
+ "description": "webcomponents.js",
5
+ "main": "webcomponents.js",
6
+ "directories": {
7
+ "test": "tests"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/webcomponents/webcomponentsjs.git"
12
+ },
13
+ "author": "The Polymer Authors",
14
+ "license": {
15
+ "type": "BSD-3-Clause",
16
+ "url": "http://polymer.github.io/LICENSE.txt"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/webcomponents/webcomponentsjs/issues"
20
+ },
21
+ "homepage": "http://webcomponents.org",
22
+ "devDependencies": {
23
+ "gulp": "^3.8.8",
24
+ "gulp-audit": "^1.0.0",
25
+ "gulp-concat": "^2.4.1",
26
+ "gulp-header": "^1.1.1",
27
+ "gulp-uglify": "^1.0.1",
28
+ "run-sequence": "^1.0.1",
29
+ "web-component-tester": "*"
30
+ }
31
+ }
@@ -0,0 +1,2300 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
+ * Code distributed by Google as part of the polymer project is also
8
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
+ */
10
+ // @version 0.7.3
11
+ window.WebComponents = window.WebComponents || {};
12
+
13
+ (function(scope) {
14
+ var flags = scope.flags || {};
15
+ var file = "webcomponents-lite.js";
16
+ var script = document.querySelector('script[src*="' + file + '"]');
17
+ if (!flags.noOpts) {
18
+ location.search.slice(1).split("&").forEach(function(option) {
19
+ var parts = option.split("=");
20
+ var match;
21
+ if (parts[0] && (match = parts[0].match(/wc-(.+)/))) {
22
+ flags[match[1]] = parts[1] || true;
23
+ }
24
+ });
25
+ if (script) {
26
+ for (var i = 0, a; a = script.attributes[i]; i++) {
27
+ if (a.name !== "src") {
28
+ flags[a.name] = a.value || true;
29
+ }
30
+ }
31
+ }
32
+ if (flags.log) {
33
+ var parts = flags.log.split(",");
34
+ flags.log = {};
35
+ parts.forEach(function(f) {
36
+ flags.log[f] = true;
37
+ });
38
+ } else {
39
+ flags.log = {};
40
+ }
41
+ }
42
+ flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;
43
+ if (flags.shadow === "native") {
44
+ flags.shadow = false;
45
+ } else {
46
+ flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;
47
+ }
48
+ if (flags.register) {
49
+ window.CustomElements = window.CustomElements || {
50
+ flags: {}
51
+ };
52
+ window.CustomElements.flags.register = flags.register;
53
+ }
54
+ scope.flags = flags;
55
+ })(window.WebComponents);
56
+
57
+ (function(scope) {
58
+ "use strict";
59
+ var hasWorkingUrl = false;
60
+ if (!scope.forceJURL) {
61
+ try {
62
+ var u = new URL("b", "http://a");
63
+ u.pathname = "c%20d";
64
+ hasWorkingUrl = u.href === "http://a/c%20d";
65
+ } catch (e) {}
66
+ }
67
+ if (hasWorkingUrl) return;
68
+ var relative = Object.create(null);
69
+ relative["ftp"] = 21;
70
+ relative["file"] = 0;
71
+ relative["gopher"] = 70;
72
+ relative["http"] = 80;
73
+ relative["https"] = 443;
74
+ relative["ws"] = 80;
75
+ relative["wss"] = 443;
76
+ var relativePathDotMapping = Object.create(null);
77
+ relativePathDotMapping["%2e"] = ".";
78
+ relativePathDotMapping[".%2e"] = "..";
79
+ relativePathDotMapping["%2e."] = "..";
80
+ relativePathDotMapping["%2e%2e"] = "..";
81
+ function isRelativeScheme(scheme) {
82
+ return relative[scheme] !== undefined;
83
+ }
84
+ function invalid() {
85
+ clear.call(this);
86
+ this._isInvalid = true;
87
+ }
88
+ function IDNAToASCII(h) {
89
+ if ("" == h) {
90
+ invalid.call(this);
91
+ }
92
+ return h.toLowerCase();
93
+ }
94
+ function percentEscape(c) {
95
+ var unicode = c.charCodeAt(0);
96
+ if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {
97
+ return c;
98
+ }
99
+ return encodeURIComponent(c);
100
+ }
101
+ function percentEscapeQuery(c) {
102
+ var unicode = c.charCodeAt(0);
103
+ if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {
104
+ return c;
105
+ }
106
+ return encodeURIComponent(c);
107
+ }
108
+ var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
109
+ function parse(input, stateOverride, base) {
110
+ function err(message) {
111
+ errors.push(message);
112
+ }
113
+ var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];
114
+ loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
115
+ var c = input[cursor];
116
+ switch (state) {
117
+ case "scheme start":
118
+ if (c && ALPHA.test(c)) {
119
+ buffer += c.toLowerCase();
120
+ state = "scheme";
121
+ } else if (!stateOverride) {
122
+ buffer = "";
123
+ state = "no scheme";
124
+ continue;
125
+ } else {
126
+ err("Invalid scheme.");
127
+ break loop;
128
+ }
129
+ break;
130
+
131
+ case "scheme":
132
+ if (c && ALPHANUMERIC.test(c)) {
133
+ buffer += c.toLowerCase();
134
+ } else if (":" == c) {
135
+ this._scheme = buffer;
136
+ buffer = "";
137
+ if (stateOverride) {
138
+ break loop;
139
+ }
140
+ if (isRelativeScheme(this._scheme)) {
141
+ this._isRelative = true;
142
+ }
143
+ if ("file" == this._scheme) {
144
+ state = "relative";
145
+ } else if (this._isRelative && base && base._scheme == this._scheme) {
146
+ state = "relative or authority";
147
+ } else if (this._isRelative) {
148
+ state = "authority first slash";
149
+ } else {
150
+ state = "scheme data";
151
+ }
152
+ } else if (!stateOverride) {
153
+ buffer = "";
154
+ cursor = 0;
155
+ state = "no scheme";
156
+ continue;
157
+ } else if (EOF == c) {
158
+ break loop;
159
+ } else {
160
+ err("Code point not allowed in scheme: " + c);
161
+ break loop;
162
+ }
163
+ break;
164
+
165
+ case "scheme data":
166
+ if ("?" == c) {
167
+ this._query = "?";
168
+ state = "query";
169
+ } else if ("#" == c) {
170
+ this._fragment = "#";
171
+ state = "fragment";
172
+ } else {
173
+ if (EOF != c && " " != c && "\n" != c && "\r" != c) {
174
+ this._schemeData += percentEscape(c);
175
+ }
176
+ }
177
+ break;
178
+
179
+ case "no scheme":
180
+ if (!base || !isRelativeScheme(base._scheme)) {
181
+ err("Missing scheme.");
182
+ invalid.call(this);
183
+ } else {
184
+ state = "relative";
185
+ continue;
186
+ }
187
+ break;
188
+
189
+ case "relative or authority":
190
+ if ("/" == c && "/" == input[cursor + 1]) {
191
+ state = "authority ignore slashes";
192
+ } else {
193
+ err("Expected /, got: " + c);
194
+ state = "relative";
195
+ continue;
196
+ }
197
+ break;
198
+
199
+ case "relative":
200
+ this._isRelative = true;
201
+ if ("file" != this._scheme) this._scheme = base._scheme;
202
+ if (EOF == c) {
203
+ this._host = base._host;
204
+ this._port = base._port;
205
+ this._path = base._path.slice();
206
+ this._query = base._query;
207
+ this._username = base._username;
208
+ this._password = base._password;
209
+ break loop;
210
+ } else if ("/" == c || "\\" == c) {
211
+ if ("\\" == c) err("\\ is an invalid code point.");
212
+ state = "relative slash";
213
+ } else if ("?" == c) {
214
+ this._host = base._host;
215
+ this._port = base._port;
216
+ this._path = base._path.slice();
217
+ this._query = "?";
218
+ this._username = base._username;
219
+ this._password = base._password;
220
+ state = "query";
221
+ } else if ("#" == c) {
222
+ this._host = base._host;
223
+ this._port = base._port;
224
+ this._path = base._path.slice();
225
+ this._query = base._query;
226
+ this._fragment = "#";
227
+ this._username = base._username;
228
+ this._password = base._password;
229
+ state = "fragment";
230
+ } else {
231
+ var nextC = input[cursor + 1];
232
+ var nextNextC = input[cursor + 2];
233
+ if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {
234
+ this._host = base._host;
235
+ this._port = base._port;
236
+ this._username = base._username;
237
+ this._password = base._password;
238
+ this._path = base._path.slice();
239
+ this._path.pop();
240
+ }
241
+ state = "relative path";
242
+ continue;
243
+ }
244
+ break;
245
+
246
+ case "relative slash":
247
+ if ("/" == c || "\\" == c) {
248
+ if ("\\" == c) {
249
+ err("\\ is an invalid code point.");
250
+ }
251
+ if ("file" == this._scheme) {
252
+ state = "file host";
253
+ } else {
254
+ state = "authority ignore slashes";
255
+ }
256
+ } else {
257
+ if ("file" != this._scheme) {
258
+ this._host = base._host;
259
+ this._port = base._port;
260
+ this._username = base._username;
261
+ this._password = base._password;
262
+ }
263
+ state = "relative path";
264
+ continue;
265
+ }
266
+ break;
267
+
268
+ case "authority first slash":
269
+ if ("/" == c) {
270
+ state = "authority second slash";
271
+ } else {
272
+ err("Expected '/', got: " + c);
273
+ state = "authority ignore slashes";
274
+ continue;
275
+ }
276
+ break;
277
+
278
+ case "authority second slash":
279
+ state = "authority ignore slashes";
280
+ if ("/" != c) {
281
+ err("Expected '/', got: " + c);
282
+ continue;
283
+ }
284
+ break;
285
+
286
+ case "authority ignore slashes":
287
+ if ("/" != c && "\\" != c) {
288
+ state = "authority";
289
+ continue;
290
+ } else {
291
+ err("Expected authority, got: " + c);
292
+ }
293
+ break;
294
+
295
+ case "authority":
296
+ if ("@" == c) {
297
+ if (seenAt) {
298
+ err("@ already seen.");
299
+ buffer += "%40";
300
+ }
301
+ seenAt = true;
302
+ for (var i = 0; i < buffer.length; i++) {
303
+ var cp = buffer[i];
304
+ if (" " == cp || "\n" == cp || "\r" == cp) {
305
+ err("Invalid whitespace in authority.");
306
+ continue;
307
+ }
308
+ if (":" == cp && null === this._password) {
309
+ this._password = "";
310
+ continue;
311
+ }
312
+ var tempC = percentEscape(cp);
313
+ null !== this._password ? this._password += tempC : this._username += tempC;
314
+ }
315
+ buffer = "";
316
+ } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
317
+ cursor -= buffer.length;
318
+ buffer = "";
319
+ state = "host";
320
+ continue;
321
+ } else {
322
+ buffer += c;
323
+ }
324
+ break;
325
+
326
+ case "file host":
327
+ if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
328
+ if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {
329
+ state = "relative path";
330
+ } else if (buffer.length == 0) {
331
+ state = "relative path start";
332
+ } else {
333
+ this._host = IDNAToASCII.call(this, buffer);
334
+ buffer = "";
335
+ state = "relative path start";
336
+ }
337
+ continue;
338
+ } else if (" " == c || "\n" == c || "\r" == c) {
339
+ err("Invalid whitespace in file host.");
340
+ } else {
341
+ buffer += c;
342
+ }
343
+ break;
344
+
345
+ case "host":
346
+ case "hostname":
347
+ if (":" == c && !seenBracket) {
348
+ this._host = IDNAToASCII.call(this, buffer);
349
+ buffer = "";
350
+ state = "port";
351
+ if ("hostname" == stateOverride) {
352
+ break loop;
353
+ }
354
+ } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
355
+ this._host = IDNAToASCII.call(this, buffer);
356
+ buffer = "";
357
+ state = "relative path start";
358
+ if (stateOverride) {
359
+ break loop;
360
+ }
361
+ continue;
362
+ } else if (" " != c && "\n" != c && "\r" != c) {
363
+ if ("[" == c) {
364
+ seenBracket = true;
365
+ } else if ("]" == c) {
366
+ seenBracket = false;
367
+ }
368
+ buffer += c;
369
+ } else {
370
+ err("Invalid code point in host/hostname: " + c);
371
+ }
372
+ break;
373
+
374
+ case "port":
375
+ if (/[0-9]/.test(c)) {
376
+ buffer += c;
377
+ } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {
378
+ if ("" != buffer) {
379
+ var temp = parseInt(buffer, 10);
380
+ if (temp != relative[this._scheme]) {
381
+ this._port = temp + "";
382
+ }
383
+ buffer = "";
384
+ }
385
+ if (stateOverride) {
386
+ break loop;
387
+ }
388
+ state = "relative path start";
389
+ continue;
390
+ } else if (" " == c || "\n" == c || "\r" == c) {
391
+ err("Invalid code point in port: " + c);
392
+ } else {
393
+ invalid.call(this);
394
+ }
395
+ break;
396
+
397
+ case "relative path start":
398
+ if ("\\" == c) err("'\\' not allowed in path.");
399
+ state = "relative path";
400
+ if ("/" != c && "\\" != c) {
401
+ continue;
402
+ }
403
+ break;
404
+
405
+ case "relative path":
406
+ if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {
407
+ if ("\\" == c) {
408
+ err("\\ not allowed in relative path.");
409
+ }
410
+ var tmp;
411
+ if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
412
+ buffer = tmp;
413
+ }
414
+ if (".." == buffer) {
415
+ this._path.pop();
416
+ if ("/" != c && "\\" != c) {
417
+ this._path.push("");
418
+ }
419
+ } else if ("." == buffer && "/" != c && "\\" != c) {
420
+ this._path.push("");
421
+ } else if ("." != buffer) {
422
+ if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {
423
+ buffer = buffer[0] + ":";
424
+ }
425
+ this._path.push(buffer);
426
+ }
427
+ buffer = "";
428
+ if ("?" == c) {
429
+ this._query = "?";
430
+ state = "query";
431
+ } else if ("#" == c) {
432
+ this._fragment = "#";
433
+ state = "fragment";
434
+ }
435
+ } else if (" " != c && "\n" != c && "\r" != c) {
436
+ buffer += percentEscape(c);
437
+ }
438
+ break;
439
+
440
+ case "query":
441
+ if (!stateOverride && "#" == c) {
442
+ this._fragment = "#";
443
+ state = "fragment";
444
+ } else if (EOF != c && " " != c && "\n" != c && "\r" != c) {
445
+ this._query += percentEscapeQuery(c);
446
+ }
447
+ break;
448
+
449
+ case "fragment":
450
+ if (EOF != c && " " != c && "\n" != c && "\r" != c) {
451
+ this._fragment += c;
452
+ }
453
+ break;
454
+ }
455
+ cursor++;
456
+ }
457
+ }
458
+ function clear() {
459
+ this._scheme = "";
460
+ this._schemeData = "";
461
+ this._username = "";
462
+ this._password = null;
463
+ this._host = "";
464
+ this._port = "";
465
+ this._path = [];
466
+ this._query = "";
467
+ this._fragment = "";
468
+ this._isInvalid = false;
469
+ this._isRelative = false;
470
+ }
471
+ function jURL(url, base) {
472
+ if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
473
+ this._url = url;
474
+ clear.call(this);
475
+ var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");
476
+ parse.call(this, input, null, base);
477
+ }
478
+ jURL.prototype = {
479
+ toString: function() {
480
+ return this.href;
481
+ },
482
+ get href() {
483
+ if (this._isInvalid) return this._url;
484
+ var authority = "";
485
+ if ("" != this._username || null != this._password) {
486
+ authority = this._username + (null != this._password ? ":" + this._password : "") + "@";
487
+ }
488
+ return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;
489
+ },
490
+ set href(href) {
491
+ clear.call(this);
492
+ parse.call(this, href);
493
+ },
494
+ get protocol() {
495
+ return this._scheme + ":";
496
+ },
497
+ set protocol(protocol) {
498
+ if (this._isInvalid) return;
499
+ parse.call(this, protocol + ":", "scheme start");
500
+ },
501
+ get host() {
502
+ return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;
503
+ },
504
+ set host(host) {
505
+ if (this._isInvalid || !this._isRelative) return;
506
+ parse.call(this, host, "host");
507
+ },
508
+ get hostname() {
509
+ return this._host;
510
+ },
511
+ set hostname(hostname) {
512
+ if (this._isInvalid || !this._isRelative) return;
513
+ parse.call(this, hostname, "hostname");
514
+ },
515
+ get port() {
516
+ return this._port;
517
+ },
518
+ set port(port) {
519
+ if (this._isInvalid || !this._isRelative) return;
520
+ parse.call(this, port, "port");
521
+ },
522
+ get pathname() {
523
+ return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;
524
+ },
525
+ set pathname(pathname) {
526
+ if (this._isInvalid || !this._isRelative) return;
527
+ this._path = [];
528
+ parse.call(this, pathname, "relative path start");
529
+ },
530
+ get search() {
531
+ return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;
532
+ },
533
+ set search(search) {
534
+ if (this._isInvalid || !this._isRelative) return;
535
+ this._query = "?";
536
+ if ("?" == search[0]) search = search.slice(1);
537
+ parse.call(this, search, "query");
538
+ },
539
+ get hash() {
540
+ return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;
541
+ },
542
+ set hash(hash) {
543
+ if (this._isInvalid) return;
544
+ this._fragment = "#";
545
+ if ("#" == hash[0]) hash = hash.slice(1);
546
+ parse.call(this, hash, "fragment");
547
+ },
548
+ get origin() {
549
+ var host;
550
+ if (this._isInvalid || !this._scheme) {
551
+ return "";
552
+ }
553
+ switch (this._scheme) {
554
+ case "data":
555
+ case "file":
556
+ case "javascript":
557
+ case "mailto":
558
+ return "null";
559
+ }
560
+ host = this.host;
561
+ if (!host) {
562
+ return "";
563
+ }
564
+ return this._scheme + "://" + host;
565
+ }
566
+ };
567
+ var OriginalURL = scope.URL;
568
+ if (OriginalURL) {
569
+ jURL.createObjectURL = function(blob) {
570
+ return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
571
+ };
572
+ jURL.revokeObjectURL = function(url) {
573
+ OriginalURL.revokeObjectURL(url);
574
+ };
575
+ }
576
+ scope.URL = jURL;
577
+ })(this);
578
+
579
+ if (typeof WeakMap === "undefined") {
580
+ (function() {
581
+ var defineProperty = Object.defineProperty;
582
+ var counter = Date.now() % 1e9;
583
+ var WeakMap = function() {
584
+ this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
585
+ };
586
+ WeakMap.prototype = {
587
+ set: function(key, value) {
588
+ var entry = key[this.name];
589
+ if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
590
+ value: [ key, value ],
591
+ writable: true
592
+ });
593
+ return this;
594
+ },
595
+ get: function(key) {
596
+ var entry;
597
+ return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
598
+ },
599
+ "delete": function(key) {
600
+ var entry = key[this.name];
601
+ if (!entry || entry[0] !== key) return false;
602
+ entry[0] = entry[1] = undefined;
603
+ return true;
604
+ },
605
+ has: function(key) {
606
+ var entry = key[this.name];
607
+ if (!entry) return false;
608
+ return entry[0] === key;
609
+ }
610
+ };
611
+ window.WeakMap = WeakMap;
612
+ })();
613
+ }
614
+
615
+ (function(global) {
616
+ var registrationsTable = new WeakMap();
617
+ var setImmediate;
618
+ if (/Trident|Edge/.test(navigator.userAgent)) {
619
+ setImmediate = setTimeout;
620
+ } else if (window.setImmediate) {
621
+ setImmediate = window.setImmediate;
622
+ } else {
623
+ var setImmediateQueue = [];
624
+ var sentinel = String(Math.random());
625
+ window.addEventListener("message", function(e) {
626
+ if (e.data === sentinel) {
627
+ var queue = setImmediateQueue;
628
+ setImmediateQueue = [];
629
+ queue.forEach(function(func) {
630
+ func();
631
+ });
632
+ }
633
+ });
634
+ setImmediate = function(func) {
635
+ setImmediateQueue.push(func);
636
+ window.postMessage(sentinel, "*");
637
+ };
638
+ }
639
+ var isScheduled = false;
640
+ var scheduledObservers = [];
641
+ function scheduleCallback(observer) {
642
+ scheduledObservers.push(observer);
643
+ if (!isScheduled) {
644
+ isScheduled = true;
645
+ setImmediate(dispatchCallbacks);
646
+ }
647
+ }
648
+ function wrapIfNeeded(node) {
649
+ return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
650
+ }
651
+ function dispatchCallbacks() {
652
+ isScheduled = false;
653
+ var observers = scheduledObservers;
654
+ scheduledObservers = [];
655
+ observers.sort(function(o1, o2) {
656
+ return o1.uid_ - o2.uid_;
657
+ });
658
+ var anyNonEmpty = false;
659
+ observers.forEach(function(observer) {
660
+ var queue = observer.takeRecords();
661
+ removeTransientObserversFor(observer);
662
+ if (queue.length) {
663
+ observer.callback_(queue, observer);
664
+ anyNonEmpty = true;
665
+ }
666
+ });
667
+ if (anyNonEmpty) dispatchCallbacks();
668
+ }
669
+ function removeTransientObserversFor(observer) {
670
+ observer.nodes_.forEach(function(node) {
671
+ var registrations = registrationsTable.get(node);
672
+ if (!registrations) return;
673
+ registrations.forEach(function(registration) {
674
+ if (registration.observer === observer) registration.removeTransientObservers();
675
+ });
676
+ });
677
+ }
678
+ function forEachAncestorAndObserverEnqueueRecord(target, callback) {
679
+ for (var node = target; node; node = node.parentNode) {
680
+ var registrations = registrationsTable.get(node);
681
+ if (registrations) {
682
+ for (var j = 0; j < registrations.length; j++) {
683
+ var registration = registrations[j];
684
+ var options = registration.options;
685
+ if (node !== target && !options.subtree) continue;
686
+ var record = callback(options);
687
+ if (record) registration.enqueue(record);
688
+ }
689
+ }
690
+ }
691
+ }
692
+ var uidCounter = 0;
693
+ function JsMutationObserver(callback) {
694
+ this.callback_ = callback;
695
+ this.nodes_ = [];
696
+ this.records_ = [];
697
+ this.uid_ = ++uidCounter;
698
+ }
699
+ JsMutationObserver.prototype = {
700
+ observe: function(target, options) {
701
+ target = wrapIfNeeded(target);
702
+ if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
703
+ throw new SyntaxError();
704
+ }
705
+ var registrations = registrationsTable.get(target);
706
+ if (!registrations) registrationsTable.set(target, registrations = []);
707
+ var registration;
708
+ for (var i = 0; i < registrations.length; i++) {
709
+ if (registrations[i].observer === this) {
710
+ registration = registrations[i];
711
+ registration.removeListeners();
712
+ registration.options = options;
713
+ break;
714
+ }
715
+ }
716
+ if (!registration) {
717
+ registration = new Registration(this, target, options);
718
+ registrations.push(registration);
719
+ this.nodes_.push(target);
720
+ }
721
+ registration.addListeners();
722
+ },
723
+ disconnect: function() {
724
+ this.nodes_.forEach(function(node) {
725
+ var registrations = registrationsTable.get(node);
726
+ for (var i = 0; i < registrations.length; i++) {
727
+ var registration = registrations[i];
728
+ if (registration.observer === this) {
729
+ registration.removeListeners();
730
+ registrations.splice(i, 1);
731
+ break;
732
+ }
733
+ }
734
+ }, this);
735
+ this.records_ = [];
736
+ },
737
+ takeRecords: function() {
738
+ var copyOfRecords = this.records_;
739
+ this.records_ = [];
740
+ return copyOfRecords;
741
+ }
742
+ };
743
+ function MutationRecord(type, target) {
744
+ this.type = type;
745
+ this.target = target;
746
+ this.addedNodes = [];
747
+ this.removedNodes = [];
748
+ this.previousSibling = null;
749
+ this.nextSibling = null;
750
+ this.attributeName = null;
751
+ this.attributeNamespace = null;
752
+ this.oldValue = null;
753
+ }
754
+ function copyMutationRecord(original) {
755
+ var record = new MutationRecord(original.type, original.target);
756
+ record.addedNodes = original.addedNodes.slice();
757
+ record.removedNodes = original.removedNodes.slice();
758
+ record.previousSibling = original.previousSibling;
759
+ record.nextSibling = original.nextSibling;
760
+ record.attributeName = original.attributeName;
761
+ record.attributeNamespace = original.attributeNamespace;
762
+ record.oldValue = original.oldValue;
763
+ return record;
764
+ }
765
+ var currentRecord, recordWithOldValue;
766
+ function getRecord(type, target) {
767
+ return currentRecord = new MutationRecord(type, target);
768
+ }
769
+ function getRecordWithOldValue(oldValue) {
770
+ if (recordWithOldValue) return recordWithOldValue;
771
+ recordWithOldValue = copyMutationRecord(currentRecord);
772
+ recordWithOldValue.oldValue = oldValue;
773
+ return recordWithOldValue;
774
+ }
775
+ function clearRecords() {
776
+ currentRecord = recordWithOldValue = undefined;
777
+ }
778
+ function recordRepresentsCurrentMutation(record) {
779
+ return record === recordWithOldValue || record === currentRecord;
780
+ }
781
+ function selectRecord(lastRecord, newRecord) {
782
+ if (lastRecord === newRecord) return lastRecord;
783
+ if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
784
+ return null;
785
+ }
786
+ function Registration(observer, target, options) {
787
+ this.observer = observer;
788
+ this.target = target;
789
+ this.options = options;
790
+ this.transientObservedNodes = [];
791
+ }
792
+ Registration.prototype = {
793
+ enqueue: function(record) {
794
+ var records = this.observer.records_;
795
+ var length = records.length;
796
+ if (records.length > 0) {
797
+ var lastRecord = records[length - 1];
798
+ var recordToReplaceLast = selectRecord(lastRecord, record);
799
+ if (recordToReplaceLast) {
800
+ records[length - 1] = recordToReplaceLast;
801
+ return;
802
+ }
803
+ } else {
804
+ scheduleCallback(this.observer);
805
+ }
806
+ records[length] = record;
807
+ },
808
+ addListeners: function() {
809
+ this.addListeners_(this.target);
810
+ },
811
+ addListeners_: function(node) {
812
+ var options = this.options;
813
+ if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
814
+ if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
815
+ if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
816
+ if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
817
+ },
818
+ removeListeners: function() {
819
+ this.removeListeners_(this.target);
820
+ },
821
+ removeListeners_: function(node) {
822
+ var options = this.options;
823
+ if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
824
+ if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
825
+ if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
826
+ if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
827
+ },
828
+ addTransientObserver: function(node) {
829
+ if (node === this.target) return;
830
+ this.addListeners_(node);
831
+ this.transientObservedNodes.push(node);
832
+ var registrations = registrationsTable.get(node);
833
+ if (!registrations) registrationsTable.set(node, registrations = []);
834
+ registrations.push(this);
835
+ },
836
+ removeTransientObservers: function() {
837
+ var transientObservedNodes = this.transientObservedNodes;
838
+ this.transientObservedNodes = [];
839
+ transientObservedNodes.forEach(function(node) {
840
+ this.removeListeners_(node);
841
+ var registrations = registrationsTable.get(node);
842
+ for (var i = 0; i < registrations.length; i++) {
843
+ if (registrations[i] === this) {
844
+ registrations.splice(i, 1);
845
+ break;
846
+ }
847
+ }
848
+ }, this);
849
+ },
850
+ handleEvent: function(e) {
851
+ e.stopImmediatePropagation();
852
+ switch (e.type) {
853
+ case "DOMAttrModified":
854
+ var name = e.attrName;
855
+ var namespace = e.relatedNode.namespaceURI;
856
+ var target = e.target;
857
+ var record = new getRecord("attributes", target);
858
+ record.attributeName = name;
859
+ record.attributeNamespace = namespace;
860
+ var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
861
+ forEachAncestorAndObserverEnqueueRecord(target, function(options) {
862
+ if (!options.attributes) return;
863
+ if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
864
+ return;
865
+ }
866
+ if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
867
+ return record;
868
+ });
869
+ break;
870
+
871
+ case "DOMCharacterDataModified":
872
+ var target = e.target;
873
+ var record = getRecord("characterData", target);
874
+ var oldValue = e.prevValue;
875
+ forEachAncestorAndObserverEnqueueRecord(target, function(options) {
876
+ if (!options.characterData) return;
877
+ if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
878
+ return record;
879
+ });
880
+ break;
881
+
882
+ case "DOMNodeRemoved":
883
+ this.addTransientObserver(e.target);
884
+
885
+ case "DOMNodeInserted":
886
+ var changedNode = e.target;
887
+ var addedNodes, removedNodes;
888
+ if (e.type === "DOMNodeInserted") {
889
+ addedNodes = [ changedNode ];
890
+ removedNodes = [];
891
+ } else {
892
+ addedNodes = [];
893
+ removedNodes = [ changedNode ];
894
+ }
895
+ var previousSibling = changedNode.previousSibling;
896
+ var nextSibling = changedNode.nextSibling;
897
+ var record = getRecord("childList", e.target.parentNode);
898
+ record.addedNodes = addedNodes;
899
+ record.removedNodes = removedNodes;
900
+ record.previousSibling = previousSibling;
901
+ record.nextSibling = nextSibling;
902
+ forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
903
+ if (!options.childList) return;
904
+ return record;
905
+ });
906
+ }
907
+ clearRecords();
908
+ }
909
+ };
910
+ global.JsMutationObserver = JsMutationObserver;
911
+ if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
912
+ })(this);
913
+
914
+ window.HTMLImports = window.HTMLImports || {
915
+ flags: {}
916
+ };
917
+
918
+ (function(scope) {
919
+ var IMPORT_LINK_TYPE = "import";
920
+ var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
921
+ var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
922
+ var wrap = function(node) {
923
+ return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
924
+ };
925
+ var rootDocument = wrap(document);
926
+ var currentScriptDescriptor = {
927
+ get: function() {
928
+ var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
929
+ return wrap(script);
930
+ },
931
+ configurable: true
932
+ };
933
+ Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
934
+ Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
935
+ var isIE = /Trident|Edge/.test(navigator.userAgent);
936
+ function whenReady(callback, doc) {
937
+ doc = doc || rootDocument;
938
+ whenDocumentReady(function() {
939
+ watchImportsLoad(callback, doc);
940
+ }, doc);
941
+ }
942
+ var requiredReadyState = isIE ? "complete" : "interactive";
943
+ var READY_EVENT = "readystatechange";
944
+ function isDocumentReady(doc) {
945
+ return doc.readyState === "complete" || doc.readyState === requiredReadyState;
946
+ }
947
+ function whenDocumentReady(callback, doc) {
948
+ if (!isDocumentReady(doc)) {
949
+ var checkReady = function() {
950
+ if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {
951
+ doc.removeEventListener(READY_EVENT, checkReady);
952
+ whenDocumentReady(callback, doc);
953
+ }
954
+ };
955
+ doc.addEventListener(READY_EVENT, checkReady);
956
+ } else if (callback) {
957
+ callback();
958
+ }
959
+ }
960
+ function markTargetLoaded(event) {
961
+ event.target.__loaded = true;
962
+ }
963
+ function watchImportsLoad(callback, doc) {
964
+ var imports = doc.querySelectorAll("link[rel=import]");
965
+ var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
966
+ function checkDone() {
967
+ if (parsedCount == importCount && callback) {
968
+ callback({
969
+ allImports: imports,
970
+ loadedImports: newImports,
971
+ errorImports: errorImports
972
+ });
973
+ }
974
+ }
975
+ function loadedImport(e) {
976
+ markTargetLoaded(e);
977
+ newImports.push(this);
978
+ parsedCount++;
979
+ checkDone();
980
+ }
981
+ function errorLoadingImport(e) {
982
+ errorImports.push(this);
983
+ parsedCount++;
984
+ checkDone();
985
+ }
986
+ if (importCount) {
987
+ for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
988
+ if (isImportLoaded(imp)) {
989
+ parsedCount++;
990
+ checkDone();
991
+ } else {
992
+ imp.addEventListener("load", loadedImport);
993
+ imp.addEventListener("error", errorLoadingImport);
994
+ }
995
+ }
996
+ } else {
997
+ checkDone();
998
+ }
999
+ }
1000
+ function isImportLoaded(link) {
1001
+ return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;
1002
+ }
1003
+ if (useNative) {
1004
+ new MutationObserver(function(mxns) {
1005
+ for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {
1006
+ if (m.addedNodes) {
1007
+ handleImports(m.addedNodes);
1008
+ }
1009
+ }
1010
+ }).observe(document.head, {
1011
+ childList: true
1012
+ });
1013
+ function handleImports(nodes) {
1014
+ for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
1015
+ if (isImport(n)) {
1016
+ handleImport(n);
1017
+ }
1018
+ }
1019
+ }
1020
+ function isImport(element) {
1021
+ return element.localName === "link" && element.rel === "import";
1022
+ }
1023
+ function handleImport(element) {
1024
+ var loaded = element.import;
1025
+ if (loaded) {
1026
+ markTargetLoaded({
1027
+ target: element
1028
+ });
1029
+ } else {
1030
+ element.addEventListener("load", markTargetLoaded);
1031
+ element.addEventListener("error", markTargetLoaded);
1032
+ }
1033
+ }
1034
+ (function() {
1035
+ if (document.readyState === "loading") {
1036
+ var imports = document.querySelectorAll("link[rel=import]");
1037
+ for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {
1038
+ handleImport(imp);
1039
+ }
1040
+ }
1041
+ })();
1042
+ }
1043
+ whenReady(function(detail) {
1044
+ HTMLImports.ready = true;
1045
+ HTMLImports.readyTime = new Date().getTime();
1046
+ var evt = rootDocument.createEvent("CustomEvent");
1047
+ evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
1048
+ rootDocument.dispatchEvent(evt);
1049
+ });
1050
+ scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
1051
+ scope.useNative = useNative;
1052
+ scope.rootDocument = rootDocument;
1053
+ scope.whenReady = whenReady;
1054
+ scope.isIE = isIE;
1055
+ })(window.HTMLImports);
1056
+
1057
+ (function(scope) {
1058
+ var modules = [];
1059
+ var addModule = function(module) {
1060
+ modules.push(module);
1061
+ };
1062
+ var initializeModules = function() {
1063
+ modules.forEach(function(module) {
1064
+ module(scope);
1065
+ });
1066
+ };
1067
+ scope.addModule = addModule;
1068
+ scope.initializeModules = initializeModules;
1069
+ })(window.HTMLImports);
1070
+
1071
+ window.HTMLImports.addModule(function(scope) {
1072
+ var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
1073
+ var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
1074
+ var path = {
1075
+ resolveUrlsInStyle: function(style, linkUrl) {
1076
+ var doc = style.ownerDocument;
1077
+ var resolver = doc.createElement("a");
1078
+ style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
1079
+ return style;
1080
+ },
1081
+ resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
1082
+ var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
1083
+ r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
1084
+ return r;
1085
+ },
1086
+ replaceUrls: function(text, urlObj, linkUrl, regexp) {
1087
+ return text.replace(regexp, function(m, pre, url, post) {
1088
+ var urlPath = url.replace(/["']/g, "");
1089
+ if (linkUrl) {
1090
+ urlPath = new URL(urlPath, linkUrl).href;
1091
+ }
1092
+ urlObj.href = urlPath;
1093
+ urlPath = urlObj.href;
1094
+ return pre + "'" + urlPath + "'" + post;
1095
+ });
1096
+ }
1097
+ };
1098
+ scope.path = path;
1099
+ });
1100
+
1101
+ window.HTMLImports.addModule(function(scope) {
1102
+ var xhr = {
1103
+ async: true,
1104
+ ok: function(request) {
1105
+ return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
1106
+ },
1107
+ load: function(url, next, nextContext) {
1108
+ var request = new XMLHttpRequest();
1109
+ if (scope.flags.debug || scope.flags.bust) {
1110
+ url += "?" + Math.random();
1111
+ }
1112
+ request.open("GET", url, xhr.async);
1113
+ request.addEventListener("readystatechange", function(e) {
1114
+ if (request.readyState === 4) {
1115
+ var locationHeader = request.getResponseHeader("Location");
1116
+ var redirectedUrl = null;
1117
+ if (locationHeader) {
1118
+ var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
1119
+ }
1120
+ next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
1121
+ }
1122
+ });
1123
+ request.send();
1124
+ return request;
1125
+ },
1126
+ loadDocument: function(url, next, nextContext) {
1127
+ this.load(url, next, nextContext).responseType = "document";
1128
+ }
1129
+ };
1130
+ scope.xhr = xhr;
1131
+ });
1132
+
1133
+ window.HTMLImports.addModule(function(scope) {
1134
+ var xhr = scope.xhr;
1135
+ var flags = scope.flags;
1136
+ var Loader = function(onLoad, onComplete) {
1137
+ this.cache = {};
1138
+ this.onload = onLoad;
1139
+ this.oncomplete = onComplete;
1140
+ this.inflight = 0;
1141
+ this.pending = {};
1142
+ };
1143
+ Loader.prototype = {
1144
+ addNodes: function(nodes) {
1145
+ this.inflight += nodes.length;
1146
+ for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
1147
+ this.require(n);
1148
+ }
1149
+ this.checkDone();
1150
+ },
1151
+ addNode: function(node) {
1152
+ this.inflight++;
1153
+ this.require(node);
1154
+ this.checkDone();
1155
+ },
1156
+ require: function(elt) {
1157
+ var url = elt.src || elt.href;
1158
+ elt.__nodeUrl = url;
1159
+ if (!this.dedupe(url, elt)) {
1160
+ this.fetch(url, elt);
1161
+ }
1162
+ },
1163
+ dedupe: function(url, elt) {
1164
+ if (this.pending[url]) {
1165
+ this.pending[url].push(elt);
1166
+ return true;
1167
+ }
1168
+ var resource;
1169
+ if (this.cache[url]) {
1170
+ this.onload(url, elt, this.cache[url]);
1171
+ this.tail();
1172
+ return true;
1173
+ }
1174
+ this.pending[url] = [ elt ];
1175
+ return false;
1176
+ },
1177
+ fetch: function(url, elt) {
1178
+ flags.load && console.log("fetch", url, elt);
1179
+ if (!url) {
1180
+ setTimeout(function() {
1181
+ this.receive(url, elt, {
1182
+ error: "href must be specified"
1183
+ }, null);
1184
+ }.bind(this), 0);
1185
+ } else if (url.match(/^data:/)) {
1186
+ var pieces = url.split(",");
1187
+ var header = pieces[0];
1188
+ var body = pieces[1];
1189
+ if (header.indexOf(";base64") > -1) {
1190
+ body = atob(body);
1191
+ } else {
1192
+ body = decodeURIComponent(body);
1193
+ }
1194
+ setTimeout(function() {
1195
+ this.receive(url, elt, null, body);
1196
+ }.bind(this), 0);
1197
+ } else {
1198
+ var receiveXhr = function(err, resource, redirectedUrl) {
1199
+ this.receive(url, elt, err, resource, redirectedUrl);
1200
+ }.bind(this);
1201
+ xhr.load(url, receiveXhr);
1202
+ }
1203
+ },
1204
+ receive: function(url, elt, err, resource, redirectedUrl) {
1205
+ this.cache[url] = resource;
1206
+ var $p = this.pending[url];
1207
+ for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
1208
+ this.onload(url, p, resource, err, redirectedUrl);
1209
+ this.tail();
1210
+ }
1211
+ this.pending[url] = null;
1212
+ },
1213
+ tail: function() {
1214
+ --this.inflight;
1215
+ this.checkDone();
1216
+ },
1217
+ checkDone: function() {
1218
+ if (!this.inflight) {
1219
+ this.oncomplete();
1220
+ }
1221
+ }
1222
+ };
1223
+ scope.Loader = Loader;
1224
+ });
1225
+
1226
+ window.HTMLImports.addModule(function(scope) {
1227
+ var Observer = function(addCallback) {
1228
+ this.addCallback = addCallback;
1229
+ this.mo = new MutationObserver(this.handler.bind(this));
1230
+ };
1231
+ Observer.prototype = {
1232
+ handler: function(mutations) {
1233
+ for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {
1234
+ if (m.type === "childList" && m.addedNodes.length) {
1235
+ this.addedNodes(m.addedNodes);
1236
+ }
1237
+ }
1238
+ },
1239
+ addedNodes: function(nodes) {
1240
+ if (this.addCallback) {
1241
+ this.addCallback(nodes);
1242
+ }
1243
+ for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {
1244
+ if (n.children && n.children.length) {
1245
+ this.addedNodes(n.children);
1246
+ }
1247
+ }
1248
+ },
1249
+ observe: function(root) {
1250
+ this.mo.observe(root, {
1251
+ childList: true,
1252
+ subtree: true
1253
+ });
1254
+ }
1255
+ };
1256
+ scope.Observer = Observer;
1257
+ });
1258
+
1259
+ window.HTMLImports.addModule(function(scope) {
1260
+ var path = scope.path;
1261
+ var rootDocument = scope.rootDocument;
1262
+ var flags = scope.flags;
1263
+ var isIE = scope.isIE;
1264
+ var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
1265
+ var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
1266
+ var importParser = {
1267
+ documentSelectors: IMPORT_SELECTOR,
1268
+ importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
1269
+ map: {
1270
+ link: "parseLink",
1271
+ script: "parseScript",
1272
+ style: "parseStyle"
1273
+ },
1274
+ dynamicElements: [],
1275
+ parseNext: function() {
1276
+ var next = this.nextToParse();
1277
+ if (next) {
1278
+ this.parse(next);
1279
+ }
1280
+ },
1281
+ parse: function(elt) {
1282
+ if (this.isParsed(elt)) {
1283
+ flags.parse && console.log("[%s] is already parsed", elt.localName);
1284
+ return;
1285
+ }
1286
+ var fn = this[this.map[elt.localName]];
1287
+ if (fn) {
1288
+ this.markParsing(elt);
1289
+ fn.call(this, elt);
1290
+ }
1291
+ },
1292
+ parseDynamic: function(elt, quiet) {
1293
+ this.dynamicElements.push(elt);
1294
+ if (!quiet) {
1295
+ this.parseNext();
1296
+ }
1297
+ },
1298
+ markParsing: function(elt) {
1299
+ flags.parse && console.log("parsing", elt);
1300
+ this.parsingElement = elt;
1301
+ },
1302
+ markParsingComplete: function(elt) {
1303
+ elt.__importParsed = true;
1304
+ this.markDynamicParsingComplete(elt);
1305
+ if (elt.__importElement) {
1306
+ elt.__importElement.__importParsed = true;
1307
+ this.markDynamicParsingComplete(elt.__importElement);
1308
+ }
1309
+ this.parsingElement = null;
1310
+ flags.parse && console.log("completed", elt);
1311
+ },
1312
+ markDynamicParsingComplete: function(elt) {
1313
+ var i = this.dynamicElements.indexOf(elt);
1314
+ if (i >= 0) {
1315
+ this.dynamicElements.splice(i, 1);
1316
+ }
1317
+ },
1318
+ parseImport: function(elt) {
1319
+ if (HTMLImports.__importsParsingHook) {
1320
+ HTMLImports.__importsParsingHook(elt);
1321
+ }
1322
+ if (elt.import) {
1323
+ elt.import.__importParsed = true;
1324
+ }
1325
+ this.markParsingComplete(elt);
1326
+ if (elt.__resource && !elt.__error) {
1327
+ elt.dispatchEvent(new CustomEvent("load", {
1328
+ bubbles: false
1329
+ }));
1330
+ } else {
1331
+ elt.dispatchEvent(new CustomEvent("error", {
1332
+ bubbles: false
1333
+ }));
1334
+ }
1335
+ if (elt.__pending) {
1336
+ var fn;
1337
+ while (elt.__pending.length) {
1338
+ fn = elt.__pending.shift();
1339
+ if (fn) {
1340
+ fn({
1341
+ target: elt
1342
+ });
1343
+ }
1344
+ }
1345
+ }
1346
+ this.parseNext();
1347
+ },
1348
+ parseLink: function(linkElt) {
1349
+ if (nodeIsImport(linkElt)) {
1350
+ this.parseImport(linkElt);
1351
+ } else {
1352
+ linkElt.href = linkElt.href;
1353
+ this.parseGeneric(linkElt);
1354
+ }
1355
+ },
1356
+ parseStyle: function(elt) {
1357
+ var src = elt;
1358
+ elt = cloneStyle(elt);
1359
+ src.__appliedElement = elt;
1360
+ elt.__importElement = src;
1361
+ this.parseGeneric(elt);
1362
+ },
1363
+ parseGeneric: function(elt) {
1364
+ this.trackElement(elt);
1365
+ this.addElementToDocument(elt);
1366
+ },
1367
+ rootImportForElement: function(elt) {
1368
+ var n = elt;
1369
+ while (n.ownerDocument.__importLink) {
1370
+ n = n.ownerDocument.__importLink;
1371
+ }
1372
+ return n;
1373
+ },
1374
+ addElementToDocument: function(elt) {
1375
+ var port = this.rootImportForElement(elt.__importElement || elt);
1376
+ port.parentNode.insertBefore(elt, port);
1377
+ },
1378
+ trackElement: function(elt, callback) {
1379
+ var self = this;
1380
+ var done = function(e) {
1381
+ if (callback) {
1382
+ callback(e);
1383
+ }
1384
+ self.markParsingComplete(elt);
1385
+ self.parseNext();
1386
+ };
1387
+ elt.addEventListener("load", done);
1388
+ elt.addEventListener("error", done);
1389
+ if (isIE && elt.localName === "style") {
1390
+ var fakeLoad = false;
1391
+ if (elt.textContent.indexOf("@import") == -1) {
1392
+ fakeLoad = true;
1393
+ } else if (elt.sheet) {
1394
+ fakeLoad = true;
1395
+ var csr = elt.sheet.cssRules;
1396
+ var len = csr ? csr.length : 0;
1397
+ for (var i = 0, r; i < len && (r = csr[i]); i++) {
1398
+ if (r.type === CSSRule.IMPORT_RULE) {
1399
+ fakeLoad = fakeLoad && Boolean(r.styleSheet);
1400
+ }
1401
+ }
1402
+ }
1403
+ if (fakeLoad) {
1404
+ setTimeout(function() {
1405
+ elt.dispatchEvent(new CustomEvent("load", {
1406
+ bubbles: false
1407
+ }));
1408
+ });
1409
+ }
1410
+ }
1411
+ },
1412
+ parseScript: function(scriptElt) {
1413
+ var script = document.createElement("script");
1414
+ script.__importElement = scriptElt;
1415
+ script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
1416
+ scope.currentScript = scriptElt;
1417
+ this.trackElement(script, function(e) {
1418
+ script.parentNode.removeChild(script);
1419
+ scope.currentScript = null;
1420
+ });
1421
+ this.addElementToDocument(script);
1422
+ },
1423
+ nextToParse: function() {
1424
+ this._mayParse = [];
1425
+ return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());
1426
+ },
1427
+ nextToParseInDoc: function(doc, link) {
1428
+ if (doc && this._mayParse.indexOf(doc) < 0) {
1429
+ this._mayParse.push(doc);
1430
+ var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
1431
+ for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
1432
+ if (!this.isParsed(n)) {
1433
+ if (this.hasResource(n)) {
1434
+ return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
1435
+ } else {
1436
+ return;
1437
+ }
1438
+ }
1439
+ }
1440
+ }
1441
+ return link;
1442
+ },
1443
+ nextToParseDynamic: function() {
1444
+ return this.dynamicElements[0];
1445
+ },
1446
+ parseSelectorsForNode: function(node) {
1447
+ var doc = node.ownerDocument || node;
1448
+ return doc === rootDocument ? this.documentSelectors : this.importsSelectors;
1449
+ },
1450
+ isParsed: function(node) {
1451
+ return node.__importParsed;
1452
+ },
1453
+ needsDynamicParsing: function(elt) {
1454
+ return this.dynamicElements.indexOf(elt) >= 0;
1455
+ },
1456
+ hasResource: function(node) {
1457
+ if (nodeIsImport(node) && node.import === undefined) {
1458
+ return false;
1459
+ }
1460
+ return true;
1461
+ }
1462
+ };
1463
+ function nodeIsImport(elt) {
1464
+ return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;
1465
+ }
1466
+ function generateScriptDataUrl(script) {
1467
+ var scriptContent = generateScriptContent(script);
1468
+ return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);
1469
+ }
1470
+ function generateScriptContent(script) {
1471
+ return script.textContent + generateSourceMapHint(script);
1472
+ }
1473
+ function generateSourceMapHint(script) {
1474
+ var owner = script.ownerDocument;
1475
+ owner.__importedScripts = owner.__importedScripts || 0;
1476
+ var moniker = script.ownerDocument.baseURI;
1477
+ var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";
1478
+ owner.__importedScripts++;
1479
+ return "\n//# sourceURL=" + moniker + num + ".js\n";
1480
+ }
1481
+ function cloneStyle(style) {
1482
+ var clone = style.ownerDocument.createElement("style");
1483
+ clone.textContent = style.textContent;
1484
+ path.resolveUrlsInStyle(clone);
1485
+ return clone;
1486
+ }
1487
+ scope.parser = importParser;
1488
+ scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
1489
+ });
1490
+
1491
+ window.HTMLImports.addModule(function(scope) {
1492
+ var flags = scope.flags;
1493
+ var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
1494
+ var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
1495
+ var rootDocument = scope.rootDocument;
1496
+ var Loader = scope.Loader;
1497
+ var Observer = scope.Observer;
1498
+ var parser = scope.parser;
1499
+ var importer = {
1500
+ documents: {},
1501
+ documentPreloadSelectors: IMPORT_SELECTOR,
1502
+ importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),
1503
+ loadNode: function(node) {
1504
+ importLoader.addNode(node);
1505
+ },
1506
+ loadSubtree: function(parent) {
1507
+ var nodes = this.marshalNodes(parent);
1508
+ importLoader.addNodes(nodes);
1509
+ },
1510
+ marshalNodes: function(parent) {
1511
+ return parent.querySelectorAll(this.loadSelectorsForNode(parent));
1512
+ },
1513
+ loadSelectorsForNode: function(node) {
1514
+ var doc = node.ownerDocument || node;
1515
+ return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;
1516
+ },
1517
+ loaded: function(url, elt, resource, err, redirectedUrl) {
1518
+ flags.load && console.log("loaded", url, elt);
1519
+ elt.__resource = resource;
1520
+ elt.__error = err;
1521
+ if (isImportLink(elt)) {
1522
+ var doc = this.documents[url];
1523
+ if (doc === undefined) {
1524
+ doc = err ? null : makeDocument(resource, redirectedUrl || url);
1525
+ if (doc) {
1526
+ doc.__importLink = elt;
1527
+ this.bootDocument(doc);
1528
+ }
1529
+ this.documents[url] = doc;
1530
+ }
1531
+ elt.import = doc;
1532
+ }
1533
+ parser.parseNext();
1534
+ },
1535
+ bootDocument: function(doc) {
1536
+ this.loadSubtree(doc);
1537
+ this.observer.observe(doc);
1538
+ parser.parseNext();
1539
+ },
1540
+ loadedAll: function() {
1541
+ parser.parseNext();
1542
+ }
1543
+ };
1544
+ var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));
1545
+ importer.observer = new Observer();
1546
+ function isImportLink(elt) {
1547
+ return isLinkRel(elt, IMPORT_LINK_TYPE);
1548
+ }
1549
+ function isLinkRel(elt, rel) {
1550
+ return elt.localName === "link" && elt.getAttribute("rel") === rel;
1551
+ }
1552
+ function hasBaseURIAccessor(doc) {
1553
+ return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
1554
+ }
1555
+ function makeDocument(resource, url) {
1556
+ var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
1557
+ doc._URL = url;
1558
+ var base = doc.createElement("base");
1559
+ base.setAttribute("href", url);
1560
+ if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
1561
+ Object.defineProperty(doc, "baseURI", {
1562
+ value: url
1563
+ });
1564
+ }
1565
+ var meta = doc.createElement("meta");
1566
+ meta.setAttribute("charset", "utf-8");
1567
+ doc.head.appendChild(meta);
1568
+ doc.head.appendChild(base);
1569
+ doc.body.innerHTML = resource;
1570
+ if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
1571
+ HTMLTemplateElement.bootstrap(doc);
1572
+ }
1573
+ return doc;
1574
+ }
1575
+ if (!document.baseURI) {
1576
+ var baseURIDescriptor = {
1577
+ get: function() {
1578
+ var base = document.querySelector("base");
1579
+ return base ? base.href : window.location.href;
1580
+ },
1581
+ configurable: true
1582
+ };
1583
+ Object.defineProperty(document, "baseURI", baseURIDescriptor);
1584
+ Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);
1585
+ }
1586
+ scope.importer = importer;
1587
+ scope.importLoader = importLoader;
1588
+ });
1589
+
1590
+ window.HTMLImports.addModule(function(scope) {
1591
+ var parser = scope.parser;
1592
+ var importer = scope.importer;
1593
+ var dynamic = {
1594
+ added: function(nodes) {
1595
+ var owner, parsed, loading;
1596
+ for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
1597
+ if (!owner) {
1598
+ owner = n.ownerDocument;
1599
+ parsed = parser.isParsed(owner);
1600
+ }
1601
+ loading = this.shouldLoadNode(n);
1602
+ if (loading) {
1603
+ importer.loadNode(n);
1604
+ }
1605
+ if (this.shouldParseNode(n) && parsed) {
1606
+ parser.parseDynamic(n, loading);
1607
+ }
1608
+ }
1609
+ },
1610
+ shouldLoadNode: function(node) {
1611
+ return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));
1612
+ },
1613
+ shouldParseNode: function(node) {
1614
+ return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));
1615
+ }
1616
+ };
1617
+ importer.observer.addCallback = dynamic.added.bind(dynamic);
1618
+ var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;
1619
+ });
1620
+
1621
+ (function(scope) {
1622
+ var initializeModules = scope.initializeModules;
1623
+ var isIE = scope.isIE;
1624
+ if (scope.useNative) {
1625
+ return;
1626
+ }
1627
+ if (isIE && typeof window.CustomEvent !== "function") {
1628
+ window.CustomEvent = function(inType, params) {
1629
+ params = params || {};
1630
+ var e = document.createEvent("CustomEvent");
1631
+ e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
1632
+ return e;
1633
+ };
1634
+ window.CustomEvent.prototype = window.Event.prototype;
1635
+ }
1636
+ initializeModules();
1637
+ var rootDocument = scope.rootDocument;
1638
+ function bootstrap() {
1639
+ HTMLImports.importer.bootDocument(rootDocument);
1640
+ }
1641
+ if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
1642
+ bootstrap();
1643
+ } else {
1644
+ document.addEventListener("DOMContentLoaded", bootstrap);
1645
+ }
1646
+ })(window.HTMLImports);
1647
+
1648
+ window.CustomElements = window.CustomElements || {
1649
+ flags: {}
1650
+ };
1651
+
1652
+ (function(scope) {
1653
+ var flags = scope.flags;
1654
+ var modules = [];
1655
+ var addModule = function(module) {
1656
+ modules.push(module);
1657
+ };
1658
+ var initializeModules = function() {
1659
+ modules.forEach(function(module) {
1660
+ module(scope);
1661
+ });
1662
+ };
1663
+ scope.addModule = addModule;
1664
+ scope.initializeModules = initializeModules;
1665
+ scope.hasNative = Boolean(document.registerElement);
1666
+ scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
1667
+ })(window.CustomElements);
1668
+
1669
+ window.CustomElements.addModule(function(scope) {
1670
+ var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
1671
+ function forSubtree(node, cb) {
1672
+ findAllElements(node, function(e) {
1673
+ if (cb(e)) {
1674
+ return true;
1675
+ }
1676
+ forRoots(e, cb);
1677
+ });
1678
+ forRoots(node, cb);
1679
+ }
1680
+ function findAllElements(node, find, data) {
1681
+ var e = node.firstElementChild;
1682
+ if (!e) {
1683
+ e = node.firstChild;
1684
+ while (e && e.nodeType !== Node.ELEMENT_NODE) {
1685
+ e = e.nextSibling;
1686
+ }
1687
+ }
1688
+ while (e) {
1689
+ if (find(e, data) !== true) {
1690
+ findAllElements(e, find, data);
1691
+ }
1692
+ e = e.nextElementSibling;
1693
+ }
1694
+ return null;
1695
+ }
1696
+ function forRoots(node, cb) {
1697
+ var root = node.shadowRoot;
1698
+ while (root) {
1699
+ forSubtree(root, cb);
1700
+ root = root.olderShadowRoot;
1701
+ }
1702
+ }
1703
+ function forDocumentTree(doc, cb) {
1704
+ _forDocumentTree(doc, cb, []);
1705
+ }
1706
+ function _forDocumentTree(doc, cb, processingDocuments) {
1707
+ doc = wrap(doc);
1708
+ if (processingDocuments.indexOf(doc) >= 0) {
1709
+ return;
1710
+ }
1711
+ processingDocuments.push(doc);
1712
+ var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
1713
+ for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
1714
+ if (n.import) {
1715
+ _forDocumentTree(n.import, cb, processingDocuments);
1716
+ }
1717
+ }
1718
+ cb(doc);
1719
+ }
1720
+ scope.forDocumentTree = forDocumentTree;
1721
+ scope.forSubtree = forSubtree;
1722
+ });
1723
+
1724
+ window.CustomElements.addModule(function(scope) {
1725
+ var flags = scope.flags;
1726
+ var forSubtree = scope.forSubtree;
1727
+ var forDocumentTree = scope.forDocumentTree;
1728
+ function addedNode(node) {
1729
+ return added(node) || addedSubtree(node);
1730
+ }
1731
+ function added(node) {
1732
+ if (scope.upgrade(node)) {
1733
+ return true;
1734
+ }
1735
+ attached(node);
1736
+ }
1737
+ function addedSubtree(node) {
1738
+ forSubtree(node, function(e) {
1739
+ if (added(e)) {
1740
+ return true;
1741
+ }
1742
+ });
1743
+ }
1744
+ function attachedNode(node) {
1745
+ attached(node);
1746
+ if (inDocument(node)) {
1747
+ forSubtree(node, function(e) {
1748
+ attached(e);
1749
+ });
1750
+ }
1751
+ }
1752
+ var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
1753
+ scope.hasPolyfillMutations = hasPolyfillMutations;
1754
+ var isPendingMutations = false;
1755
+ var pendingMutations = [];
1756
+ function deferMutation(fn) {
1757
+ pendingMutations.push(fn);
1758
+ if (!isPendingMutations) {
1759
+ isPendingMutations = true;
1760
+ setTimeout(takeMutations);
1761
+ }
1762
+ }
1763
+ function takeMutations() {
1764
+ isPendingMutations = false;
1765
+ var $p = pendingMutations;
1766
+ for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
1767
+ p();
1768
+ }
1769
+ pendingMutations = [];
1770
+ }
1771
+ function attached(element) {
1772
+ if (hasPolyfillMutations) {
1773
+ deferMutation(function() {
1774
+ _attached(element);
1775
+ });
1776
+ } else {
1777
+ _attached(element);
1778
+ }
1779
+ }
1780
+ function _attached(element) {
1781
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
1782
+ if (!element.__attached && inDocument(element)) {
1783
+ element.__attached = true;
1784
+ if (element.attachedCallback) {
1785
+ element.attachedCallback();
1786
+ }
1787
+ }
1788
+ }
1789
+ }
1790
+ function detachedNode(node) {
1791
+ detached(node);
1792
+ forSubtree(node, function(e) {
1793
+ detached(e);
1794
+ });
1795
+ }
1796
+ function detached(element) {
1797
+ if (hasPolyfillMutations) {
1798
+ deferMutation(function() {
1799
+ _detached(element);
1800
+ });
1801
+ } else {
1802
+ _detached(element);
1803
+ }
1804
+ }
1805
+ function _detached(element) {
1806
+ if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
1807
+ if (element.__attached && !inDocument(element)) {
1808
+ element.__attached = false;
1809
+ if (element.detachedCallback) {
1810
+ element.detachedCallback();
1811
+ }
1812
+ }
1813
+ }
1814
+ }
1815
+ function inDocument(element) {
1816
+ var p = element;
1817
+ var doc = wrap(document);
1818
+ while (p) {
1819
+ if (p == doc) {
1820
+ return true;
1821
+ }
1822
+ p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
1823
+ }
1824
+ }
1825
+ function watchShadow(node) {
1826
+ if (node.shadowRoot && !node.shadowRoot.__watched) {
1827
+ flags.dom && console.log("watching shadow-root for: ", node.localName);
1828
+ var root = node.shadowRoot;
1829
+ while (root) {
1830
+ observe(root);
1831
+ root = root.olderShadowRoot;
1832
+ }
1833
+ }
1834
+ }
1835
+ function handler(mutations) {
1836
+ if (flags.dom) {
1837
+ var mx = mutations[0];
1838
+ if (mx && mx.type === "childList" && mx.addedNodes) {
1839
+ if (mx.addedNodes) {
1840
+ var d = mx.addedNodes[0];
1841
+ while (d && d !== document && !d.host) {
1842
+ d = d.parentNode;
1843
+ }
1844
+ var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
1845
+ u = u.split("/?").shift().split("/").pop();
1846
+ }
1847
+ }
1848
+ console.group("mutations (%d) [%s]", mutations.length, u || "");
1849
+ }
1850
+ mutations.forEach(function(mx) {
1851
+ if (mx.type === "childList") {
1852
+ forEach(mx.addedNodes, function(n) {
1853
+ if (!n.localName) {
1854
+ return;
1855
+ }
1856
+ addedNode(n);
1857
+ });
1858
+ forEach(mx.removedNodes, function(n) {
1859
+ if (!n.localName) {
1860
+ return;
1861
+ }
1862
+ detachedNode(n);
1863
+ });
1864
+ }
1865
+ });
1866
+ flags.dom && console.groupEnd();
1867
+ }
1868
+ function takeRecords(node) {
1869
+ node = wrap(node);
1870
+ if (!node) {
1871
+ node = wrap(document);
1872
+ }
1873
+ while (node.parentNode) {
1874
+ node = node.parentNode;
1875
+ }
1876
+ var observer = node.__observer;
1877
+ if (observer) {
1878
+ handler(observer.takeRecords());
1879
+ takeMutations();
1880
+ }
1881
+ }
1882
+ var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
1883
+ function observe(inRoot) {
1884
+ if (inRoot.__observer) {
1885
+ return;
1886
+ }
1887
+ var observer = new MutationObserver(handler);
1888
+ observer.observe(inRoot, {
1889
+ childList: true,
1890
+ subtree: true
1891
+ });
1892
+ inRoot.__observer = observer;
1893
+ }
1894
+ function upgradeDocument(doc) {
1895
+ doc = wrap(doc);
1896
+ flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
1897
+ addedNode(doc);
1898
+ observe(doc);
1899
+ flags.dom && console.groupEnd();
1900
+ }
1901
+ function upgradeDocumentTree(doc) {
1902
+ forDocumentTree(doc, upgradeDocument);
1903
+ }
1904
+ var originalCreateShadowRoot = Element.prototype.createShadowRoot;
1905
+ if (originalCreateShadowRoot) {
1906
+ Element.prototype.createShadowRoot = function() {
1907
+ var root = originalCreateShadowRoot.call(this);
1908
+ CustomElements.watchShadow(this);
1909
+ return root;
1910
+ };
1911
+ }
1912
+ scope.watchShadow = watchShadow;
1913
+ scope.upgradeDocumentTree = upgradeDocumentTree;
1914
+ scope.upgradeSubtree = addedSubtree;
1915
+ scope.upgradeAll = addedNode;
1916
+ scope.attachedNode = attachedNode;
1917
+ scope.takeRecords = takeRecords;
1918
+ });
1919
+
1920
+ window.CustomElements.addModule(function(scope) {
1921
+ var flags = scope.flags;
1922
+ function upgrade(node) {
1923
+ if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
1924
+ var is = node.getAttribute("is");
1925
+ var definition = scope.getRegisteredDefinition(is || node.localName);
1926
+ if (definition) {
1927
+ if (is && definition.tag == node.localName) {
1928
+ return upgradeWithDefinition(node, definition);
1929
+ } else if (!is && !definition.extends) {
1930
+ return upgradeWithDefinition(node, definition);
1931
+ }
1932
+ }
1933
+ }
1934
+ }
1935
+ function upgradeWithDefinition(element, definition) {
1936
+ flags.upgrade && console.group("upgrade:", element.localName);
1937
+ if (definition.is) {
1938
+ element.setAttribute("is", definition.is);
1939
+ }
1940
+ implementPrototype(element, definition);
1941
+ element.__upgraded__ = true;
1942
+ created(element);
1943
+ scope.attachedNode(element);
1944
+ scope.upgradeSubtree(element);
1945
+ flags.upgrade && console.groupEnd();
1946
+ return element;
1947
+ }
1948
+ function implementPrototype(element, definition) {
1949
+ if (Object.__proto__) {
1950
+ element.__proto__ = definition.prototype;
1951
+ } else {
1952
+ customMixin(element, definition.prototype, definition.native);
1953
+ element.__proto__ = definition.prototype;
1954
+ }
1955
+ }
1956
+ function customMixin(inTarget, inSrc, inNative) {
1957
+ var used = {};
1958
+ var p = inSrc;
1959
+ while (p !== inNative && p !== HTMLElement.prototype) {
1960
+ var keys = Object.getOwnPropertyNames(p);
1961
+ for (var i = 0, k; k = keys[i]; i++) {
1962
+ if (!used[k]) {
1963
+ Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
1964
+ used[k] = 1;
1965
+ }
1966
+ }
1967
+ p = Object.getPrototypeOf(p);
1968
+ }
1969
+ }
1970
+ function created(element) {
1971
+ if (element.createdCallback) {
1972
+ element.createdCallback();
1973
+ }
1974
+ }
1975
+ scope.upgrade = upgrade;
1976
+ scope.upgradeWithDefinition = upgradeWithDefinition;
1977
+ scope.implementPrototype = implementPrototype;
1978
+ });
1979
+
1980
+ window.CustomElements.addModule(function(scope) {
1981
+ var isIE11OrOlder = scope.isIE11OrOlder;
1982
+ var upgradeDocumentTree = scope.upgradeDocumentTree;
1983
+ var upgradeAll = scope.upgradeAll;
1984
+ var upgradeWithDefinition = scope.upgradeWithDefinition;
1985
+ var implementPrototype = scope.implementPrototype;
1986
+ var useNative = scope.useNative;
1987
+ function register(name, options) {
1988
+ var definition = options || {};
1989
+ if (!name) {
1990
+ throw new Error("document.registerElement: first argument `name` must not be empty");
1991
+ }
1992
+ if (name.indexOf("-") < 0) {
1993
+ throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
1994
+ }
1995
+ if (isReservedTag(name)) {
1996
+ throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
1997
+ }
1998
+ if (getRegisteredDefinition(name)) {
1999
+ throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
2000
+ }
2001
+ if (!definition.prototype) {
2002
+ definition.prototype = Object.create(HTMLElement.prototype);
2003
+ }
2004
+ definition.__name = name.toLowerCase();
2005
+ definition.lifecycle = definition.lifecycle || {};
2006
+ definition.ancestry = ancestry(definition.extends);
2007
+ resolveTagName(definition);
2008
+ resolvePrototypeChain(definition);
2009
+ overrideAttributeApi(definition.prototype);
2010
+ registerDefinition(definition.__name, definition);
2011
+ definition.ctor = generateConstructor(definition);
2012
+ definition.ctor.prototype = definition.prototype;
2013
+ definition.prototype.constructor = definition.ctor;
2014
+ if (scope.ready) {
2015
+ upgradeDocumentTree(document);
2016
+ }
2017
+ return definition.ctor;
2018
+ }
2019
+ function overrideAttributeApi(prototype) {
2020
+ if (prototype.setAttribute._polyfilled) {
2021
+ return;
2022
+ }
2023
+ var setAttribute = prototype.setAttribute;
2024
+ prototype.setAttribute = function(name, value) {
2025
+ changeAttribute.call(this, name, value, setAttribute);
2026
+ };
2027
+ var removeAttribute = prototype.removeAttribute;
2028
+ prototype.removeAttribute = function(name) {
2029
+ changeAttribute.call(this, name, null, removeAttribute);
2030
+ };
2031
+ prototype.setAttribute._polyfilled = true;
2032
+ }
2033
+ function changeAttribute(name, value, operation) {
2034
+ name = name.toLowerCase();
2035
+ var oldValue = this.getAttribute(name);
2036
+ operation.apply(this, arguments);
2037
+ var newValue = this.getAttribute(name);
2038
+ if (this.attributeChangedCallback && newValue !== oldValue) {
2039
+ this.attributeChangedCallback(name, oldValue, newValue);
2040
+ }
2041
+ }
2042
+ function isReservedTag(name) {
2043
+ for (var i = 0; i < reservedTagList.length; i++) {
2044
+ if (name === reservedTagList[i]) {
2045
+ return true;
2046
+ }
2047
+ }
2048
+ }
2049
+ var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
2050
+ function ancestry(extnds) {
2051
+ var extendee = getRegisteredDefinition(extnds);
2052
+ if (extendee) {
2053
+ return ancestry(extendee.extends).concat([ extendee ]);
2054
+ }
2055
+ return [];
2056
+ }
2057
+ function resolveTagName(definition) {
2058
+ var baseTag = definition.extends;
2059
+ for (var i = 0, a; a = definition.ancestry[i]; i++) {
2060
+ baseTag = a.is && a.tag;
2061
+ }
2062
+ definition.tag = baseTag || definition.__name;
2063
+ if (baseTag) {
2064
+ definition.is = definition.__name;
2065
+ }
2066
+ }
2067
+ function resolvePrototypeChain(definition) {
2068
+ if (!Object.__proto__) {
2069
+ var nativePrototype = HTMLElement.prototype;
2070
+ if (definition.is) {
2071
+ var inst = document.createElement(definition.tag);
2072
+ var expectedPrototype = Object.getPrototypeOf(inst);
2073
+ if (expectedPrototype === definition.prototype) {
2074
+ nativePrototype = expectedPrototype;
2075
+ }
2076
+ }
2077
+ var proto = definition.prototype, ancestor;
2078
+ while (proto && proto !== nativePrototype) {
2079
+ ancestor = Object.getPrototypeOf(proto);
2080
+ proto.__proto__ = ancestor;
2081
+ proto = ancestor;
2082
+ }
2083
+ definition.native = nativePrototype;
2084
+ }
2085
+ }
2086
+ function instantiate(definition) {
2087
+ return upgradeWithDefinition(domCreateElement(definition.tag), definition);
2088
+ }
2089
+ var registry = {};
2090
+ function getRegisteredDefinition(name) {
2091
+ if (name) {
2092
+ return registry[name.toLowerCase()];
2093
+ }
2094
+ }
2095
+ function registerDefinition(name, definition) {
2096
+ registry[name] = definition;
2097
+ }
2098
+ function generateConstructor(definition) {
2099
+ return function() {
2100
+ return instantiate(definition);
2101
+ };
2102
+ }
2103
+ var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
2104
+ function createElementNS(namespace, tag, typeExtension) {
2105
+ if (namespace === HTML_NAMESPACE) {
2106
+ return createElement(tag, typeExtension);
2107
+ } else {
2108
+ return domCreateElementNS(namespace, tag);
2109
+ }
2110
+ }
2111
+ function createElement(tag, typeExtension) {
2112
+ if (tag) {
2113
+ tag = tag.toLowerCase();
2114
+ }
2115
+ if (typeExtension) {
2116
+ typeExtension = typeExtension.toLowerCase();
2117
+ }
2118
+ var definition = getRegisteredDefinition(typeExtension || tag);
2119
+ if (definition) {
2120
+ if (tag == definition.tag && typeExtension == definition.is) {
2121
+ return new definition.ctor();
2122
+ }
2123
+ if (!typeExtension && !definition.is) {
2124
+ return new definition.ctor();
2125
+ }
2126
+ }
2127
+ var element;
2128
+ if (typeExtension) {
2129
+ element = createElement(tag);
2130
+ element.setAttribute("is", typeExtension);
2131
+ return element;
2132
+ }
2133
+ element = domCreateElement(tag);
2134
+ if (tag.indexOf("-") >= 0) {
2135
+ implementPrototype(element, HTMLElement);
2136
+ }
2137
+ return element;
2138
+ }
2139
+ var domCreateElement = document.createElement.bind(document);
2140
+ var domCreateElementNS = document.createElementNS.bind(document);
2141
+ var isInstance;
2142
+ if (!Object.__proto__ && !useNative) {
2143
+ isInstance = function(obj, ctor) {
2144
+ var p = obj;
2145
+ while (p) {
2146
+ if (p === ctor.prototype) {
2147
+ return true;
2148
+ }
2149
+ p = p.__proto__;
2150
+ }
2151
+ return false;
2152
+ };
2153
+ } else {
2154
+ isInstance = function(obj, base) {
2155
+ return obj instanceof base;
2156
+ };
2157
+ }
2158
+ function wrapDomMethodToForceUpgrade(obj, methodName) {
2159
+ var orig = obj[methodName];
2160
+ obj[methodName] = function() {
2161
+ var n = orig.apply(this, arguments);
2162
+ upgradeAll(n);
2163
+ return n;
2164
+ };
2165
+ }
2166
+ wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
2167
+ wrapDomMethodToForceUpgrade(document, "importNode");
2168
+ if (isIE11OrOlder) {
2169
+ (function() {
2170
+ var importNode = document.importNode;
2171
+ document.importNode = function() {
2172
+ var n = importNode.apply(document, arguments);
2173
+ if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
2174
+ var f = document.createDocumentFragment();
2175
+ f.appendChild(n);
2176
+ return f;
2177
+ } else {
2178
+ return n;
2179
+ }
2180
+ };
2181
+ })();
2182
+ }
2183
+ document.registerElement = register;
2184
+ document.createElement = createElement;
2185
+ document.createElementNS = createElementNS;
2186
+ scope.registry = registry;
2187
+ scope.instanceof = isInstance;
2188
+ scope.reservedTagList = reservedTagList;
2189
+ scope.getRegisteredDefinition = getRegisteredDefinition;
2190
+ document.register = document.registerElement;
2191
+ });
2192
+
2193
+ (function(scope) {
2194
+ var useNative = scope.useNative;
2195
+ var initializeModules = scope.initializeModules;
2196
+ var isIE11OrOlder = /Trident/.test(navigator.userAgent);
2197
+ if (useNative) {
2198
+ var nop = function() {};
2199
+ scope.watchShadow = nop;
2200
+ scope.upgrade = nop;
2201
+ scope.upgradeAll = nop;
2202
+ scope.upgradeDocumentTree = nop;
2203
+ scope.upgradeSubtree = nop;
2204
+ scope.takeRecords = nop;
2205
+ scope.instanceof = function(obj, base) {
2206
+ return obj instanceof base;
2207
+ };
2208
+ } else {
2209
+ initializeModules();
2210
+ }
2211
+ var upgradeDocumentTree = scope.upgradeDocumentTree;
2212
+ if (!window.wrap) {
2213
+ if (window.ShadowDOMPolyfill) {
2214
+ window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
2215
+ window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
2216
+ } else {
2217
+ window.wrap = window.unwrap = function(node) {
2218
+ return node;
2219
+ };
2220
+ }
2221
+ }
2222
+ function bootstrap() {
2223
+ upgradeDocumentTree(wrap(document));
2224
+ if (window.HTMLImports) {
2225
+ HTMLImports.__importsParsingHook = function(elt) {
2226
+ upgradeDocumentTree(wrap(elt.import));
2227
+ };
2228
+ }
2229
+ CustomElements.ready = true;
2230
+ setTimeout(function() {
2231
+ CustomElements.readyTime = Date.now();
2232
+ if (window.HTMLImports) {
2233
+ CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
2234
+ }
2235
+ document.dispatchEvent(new CustomEvent("WebComponentsReady", {
2236
+ bubbles: true
2237
+ }));
2238
+ });
2239
+ }
2240
+ if (isIE11OrOlder && typeof window.CustomEvent !== "function") {
2241
+ window.CustomEvent = function(inType, params) {
2242
+ params = params || {};
2243
+ var e = document.createEvent("CustomEvent");
2244
+ e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
2245
+ return e;
2246
+ };
2247
+ window.CustomEvent.prototype = window.Event.prototype;
2248
+ }
2249
+ if (document.readyState === "complete" || scope.flags.eager) {
2250
+ bootstrap();
2251
+ } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
2252
+ bootstrap();
2253
+ } else {
2254
+ var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
2255
+ window.addEventListener(loadEvent, bootstrap);
2256
+ }
2257
+ scope.isIE11OrOlder = isIE11OrOlder;
2258
+ })(window.CustomElements);
2259
+
2260
+ if (typeof HTMLTemplateElement === "undefined") {
2261
+ (function() {
2262
+ var TEMPLATE_TAG = "template";
2263
+ HTMLTemplateElement = function() {};
2264
+ HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
2265
+ HTMLTemplateElement.decorate = function(template) {
2266
+ if (!template.content) {
2267
+ template.content = template.ownerDocument.createDocumentFragment();
2268
+ }
2269
+ var child;
2270
+ while (child = template.firstChild) {
2271
+ template.content.appendChild(child);
2272
+ }
2273
+ };
2274
+ HTMLTemplateElement.bootstrap = function(doc) {
2275
+ var templates = doc.querySelectorAll(TEMPLATE_TAG);
2276
+ for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {
2277
+ HTMLTemplateElement.decorate(t);
2278
+ }
2279
+ };
2280
+ addEventListener("DOMContentLoaded", function() {
2281
+ HTMLTemplateElement.bootstrap(document);
2282
+ });
2283
+ var createElement = document.createElement;
2284
+ document.createElement = function() {
2285
+ "use strict";
2286
+ var el = createElement.apply(document, arguments);
2287
+ if (el.localName == "template") {
2288
+ HTMLTemplateElement.decorate(el);
2289
+ }
2290
+ return el;
2291
+ };
2292
+ })();
2293
+ }
2294
+
2295
+ (function(scope) {
2296
+ var style = document.createElement("style");
2297
+ style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
2298
+ var head = document.querySelector("head");
2299
+ head.insertBefore(style, head.firstChild);
2300
+ })(window.WebComponents);