1(function(){ 2/* 3 4 Copyright (c) 2020 The Polymer Project Authors. All rights reserved. 5 This code may only be used under the BSD style license found at 6 http://polymer.github.io/LICENSE.txt 7 The complete set of authors may be found at 8 http://polymer.github.io/AUTHORS.txt 9 The complete set of contributors may be found at 10 http://polymer.github.io/CONTRIBUTORS.txt 11 Code distributed by Google as part of the polymer project is also 12 subject to an additional IP rights grant found at 13 http://polymer.github.io/PATENTS.txt 14*/ 15'use strict';function g(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}} 16if(!ShadowRoot.prototype.createElement){var h=window.HTMLElement,l=window.customElements.define,m=window.customElements.get,n=window.customElements,p=new WeakMap,q=new WeakMap,r=new WeakMap,t=new WeakMap;window.CustomElementRegistry=function(){this.l=new Map;this.o=new Map;this.i=new Map;this.h=new Map};window.CustomElementRegistry.prototype.define=function(a,b){a=a.toLowerCase();if(void 0!==this.j(a))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': the name \""+a+'" has already been used with this registry'); 17if(void 0!==this.o.get(b))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");var c=b.prototype.attributeChangedCallback,d=new Set(b.observedAttributes||[]);u(b,d,c);c={g:b,connectedCallback:b.prototype.connectedCallback,disconnectedCallback:b.prototype.disconnectedCallback,adoptedCallback:b.prototype.adoptedCallback,attributeChangedCallback:c,observedAttributes:d};this.l.set(a,c);this.o.set(b,c);d=m.call(n,a); 18d||(d=v(a),l.call(n,a,d));this===window.customElements&&(r.set(b,c),c.s=d);if(d=this.h.get(a)){this.h.delete(a);var e="undefined"!=typeof Symbol&&Symbol.iterator&&d[Symbol.iterator];d=e?e.call(d):{next:g(d)};for(e=d.next();!e.done;e=d.next())e=e.value,q.delete(e),w(e,c,!0)}c=this.i.get(a);void 0!==c&&(c.resolve(b),this.i.delete(a));return b};window.CustomElementRegistry.prototype.upgrade=function(){x.push(this);n.upgrade.apply(n,arguments);x.pop()};window.CustomElementRegistry.prototype.get=function(a){var b; 19return null==(b=this.l.get(a))?void 0:b.g};window.CustomElementRegistry.prototype.j=function(a){return this.l.get(a)};window.CustomElementRegistry.prototype.whenDefined=function(a){var b=this.j(a);if(void 0!==b)return Promise.resolve(b.g);var c=this.i.get(a);void 0===c&&(c={},c.promise=new Promise(function(d){return c.resolve=d}),this.i.set(a,c));return c.promise};window.CustomElementRegistry.prototype.m=function(a,b,c){var d=this.h.get(b);d||this.h.set(b,d=new Set);c?d.add(a):d.delete(a)};var y; 20window.HTMLElement=function(){var a=y;if(a)return y=void 0,a;var b=r.get(this.constructor);if(!b)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");a=Reflect.construct(h,[],b.s);Object.setPrototypeOf(a,this.constructor.prototype);p.set(a,b);return a};window.HTMLElement.prototype=h.prototype;var v=function(a){function b(){var c=Reflect.construct(h,[],this.constructor);Object.setPrototypeOf(c,HTMLElement.prototype); 21a:{var d=c.getRootNode();if(!(d===document||d instanceof ShadowRoot)){d=x[x.length-1];if(d instanceof CustomElementRegistry){var e=d;break a}d=d.getRootNode();d===document||d instanceof ShadowRoot||(d=(null==(e=t.get(d))?void 0:e.getRootNode())||document)}e=d.customElements}e=e||window.customElements;(d=e.j(a))?w(c,d):q.set(c,e);return c}b.prototype.connectedCallback=function(){var c=p.get(this);c?c.connectedCallback&&c.connectedCallback.apply(this,arguments):q.get(this).m(this,a,!0)};b.prototype.disconnectedCallback= 22function(){var c=p.get(this);c?c.disconnectedCallback&&c.disconnectedCallback.apply(this,arguments):q.get(this).m(this,a,!1)};b.prototype.adoptedCallback=function(){var c,d;null==(c=p.get(this))||null==(d=c.adoptedCallback)||d.apply(this,arguments)};return b},u=function(a,b,c){if(0!==b.size&&void 0!==c){var d=a.prototype.setAttribute;d&&(a.prototype.setAttribute=function(f,k){if(b.has(f)){var C=this.getAttribute(f);d.call(this,f,k);c.call(this,f,C,k)}else d.call(this,f,k)});var e=a.prototype.removeAttribute; 23e&&(a.prototype.removeAttribute=function(f){if(b.has(f)){var k=this.getAttribute(f);e.call(this,f);c.call(this,f,k,null)}else e.call(this,f)})}},z=function(a){var b=Object.getPrototypeOf(a);if(b!==window.HTMLElement)return b===h?Object.setPrototypeOf(a,window.HTMLElement):z(b)},w=function(a,b,c){c=void 0===c?!1:c;Object.setPrototypeOf(a,b.g.prototype);p.set(a,b);y=a;try{new b.g}catch(d){z(b.g),new b.g}
23b.observedAttributes.forEach(function(d){a.hasAttribute(d)&&b.attributeChangedCallback.call(a,d, 24null,a.getAttribute(d))});c&&b.connectedCallback&&a.isConnected&&b.connectedCallback.call(a)},A=Element.prototype.attachShadow;Element.prototype.attachShadow=function(a){var b=A.apply(this,arguments);a.customElements&&(b.customElements=a.customElements);return b};var x=[document],B=function(a,b,c){var d=(c?Object.getPrototypeOf(c):a.prototype)[b];a.prototype[b]=function(){x.push(this);var e=d.apply(c||this,arguments);void 0!==e&&t.set(e,this);x.pop();return e}};B(ShadowRoot,"createElement",document); 25B(ShadowRoot,"importNode",document);B(Element,"insertAdjacentHTML");var D=function(a){var b=Object.getOwnPropertyDescriptor(a.prototype,"innerHTML");Object.defineProperty(a.prototype,"innerHTML",Object.assign({},b,{set:function(c){x.push(this);b.set.call(this,c);x.pop()}}))};D(Element);D(ShadowRoot);Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0})}; 26}).call(self); 27 28//# sourceMappingURL=scoped-custom-element-registry.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.